From 23e5c85eea4d7c7086392ca4b14e097682cb3829 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Sat, 29 Aug 2020 11:36:59 +0200 Subject: Start the documentation of the theme build process --- .gitignore | 2 +- site/cleopatra.org | 2 +- site/cleopatra/org.org | 3 ++ site/cleopatra/theme.org | 83 ++++++++++++++++++++++++++++++++---------------- 4 files changed, 61 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index 002b3cc..1907ea8 100644 --- a/.gitignore +++ b/.gitignore @@ -21,9 +21,9 @@ plugins/external-urls.lua plugins/urls-rewriting.lua plugins/fix-org-urls.lua soupault.conf +theme.mk site/style/main.sass templates/main.html -theme.mk build.log *.vo *.vok diff --git a/site/cleopatra.org b/site/cleopatra.org index e5f8437..67fd917 100644 --- a/site/cleopatra.org +++ b/site/cleopatra.org @@ -36,7 +36,7 @@ written as literate programs.
#+END_EXPORT -- [[./cleopatra/theme.org][Theming with SASS ~(TODO)~]] :: +- [[./cleopatra/theme.org][Theming and Templating]] :: - [[file:cleopatra/coq.org][Authoring Contents As Coq Documents ~(TODO)~]] :: diff --git a/site/cleopatra/org.org b/site/cleopatra/org.org index df6c513..e6f7a9a 100644 --- a/site/cleopatra/org.org +++ b/site/cleopatra/org.org @@ -127,6 +127,9 @@ dl content: "\f054" font : normal normal normal 11px/1 ForkAwesome + .org-src-tangled-to, + padding-left : 2rem + .org-src-tangled-to, .org-src-name font-family : 'Fira Code', monospace diff --git a/site/cleopatra/theme.org b/site/cleopatra/theme.org index 79f1921..fe68690 100644 --- a/site/cleopatra/theme.org +++ b/site/cleopatra/theme.org @@ -2,40 +2,37 @@

Theming and Templating

#+END_EXPORT -#+BEGIN_SRC makefile :tangle theme.mk -SASS := site/style/main.sass -CSS := $(SASS:.sass=.css) - -theme-build : ${SASS} - @cleopatra echo Compiling "${CSS}" - @sassc --style=compressed --sass ${SASS} ${CSS} +The purpose of this build process is to implement the default layout of this +website. To that end, it provides a template file (~main.html~), and a +collection of SASS files that *~cleopatra~* then compiles into a single CSS file +using ~sassc~. -soupault-build : theme-build - -ARTIFACTS += ${CSS} -#+END_SRC +We first discuss the structure of the website, by defining the default HTML +template =soupault= will use to generate the website. Then, we specify its +minimal design, implemented in SASS. Finally, we discuss the necessary build +instructions for *~cleopatra~*. * Main HTML Template -#+BEGIN_SRC html :tangle templates/main.html :noweb no-export +#+BEGIN_SRC html :tangle templates/main.html :noweb yes - <> + + <> + <!-- page title will be inserted here --> + <> + <> + <> #+END_SRC ** ~~ -#+NAME: head +#+NAME: meta-tags #+BEGIN_SRC html :noweb no-export - - - - - <> - <> - + + #+END_SRC *** Assets Loading @@ -74,7 +71,7 @@ noscript.parentNode.removeChild(noscript); #+NAME: body #+BEGIN_SRC html :noweb no-export - +
  • News
  • @@ -83,8 +80,7 @@ noscript.parentNode.removeChild(noscript);
- +