diff options
author | Thomas Letan <lthms@soap.coffee> | 2020-02-20 22:58:42 +0100 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2020-02-20 22:58:42 +0100 |
commit | b3a30963af918d1d4edf03ac67ba44089c1a5417 (patch) | |
tree | 4321e74abe8f1df724848162df9d264b36e15415 | |
parent | Make an heavy use of Makefile variables (diff) |
Adopt a literate programming for `main.sass'
-rw-r--r-- | .gitignore | 39 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | site/posts/meta/Bootstrap.org | 23 | ||||
-rw-r--r-- | site/posts/meta/Contents.org | 35 | ||||
-rw-r--r-- | site/posts/meta/Soupault.org | 2 | ||||
-rw-r--r-- | site/style/main.sass | 174 |
6 files changed, 70 insertions, 209 deletions
@@ -11,26 +11,33 @@ node_modules/ package-lock.json # begin generated files -scripts/tangle-org.el -bootstrap.mk -scripts/export-org.el -org.mk -coq.mk -site/style/main.css -soupault.conf +site/posts.html site/news/ColorlessThemes-0.2.html +site/posts/meta/Contents.html +site/posts/meta/Bootstrap.html +site/posts/meta/Theme.html +site/posts/meta/Soupault.html +site/posts/Thanks.html site/posts/meta.html -site/posts/ExtensibleTypeSafeErrorHandling.html site/posts/DiscoveringCommonLisp.html +site/posts/ExtensibleTypeSafeErrorHandling.html site/posts/MonadTransformers.html -site/posts/meta/Soupault.html -site/posts/meta/Bootstrap.html -site/posts/meta/Contents.html -site/posts/Thanks.html -site/posts.html -site/posts/RewritingInCoq.html -site/posts/StronglySpecifiedFunctions.html -site/posts/Ltac101.html site/posts/StronglySpecifiedFunctionsProgram.html site/posts/MiniHTTPServer.html +site/posts/StronglySpecifiedFunctions.html +site/posts/RewritingInCoq.html +site/posts/Ltac101.html +site/style/main.css +scripts/tangle-org.el +bootstrap.mk +scripts/export-org.el +org.mk +coq.mk +sass.mk +soupault.conf +site/style/org.sass +site/style/coq.sass +site/style/main.sass +site/style/org.sass +site/style/coq.sass # begin generated files @@ -1,14 +1,14 @@ ROOT := $(shell pwd) -CLEODIR := site/posts/meta/ +CLEODIR := site/posts/meta GENFILES := scripts/tangle-org.el bootstrap.mk include bootstrap.mk -bootstrap.mk scripts/tangle-org.el &: site/posts/meta/Bootstrap.org +bootstrap.mk scripts/tangle-org.el &: ${CLEODIR}/Bootstrap.org @echo " tangle $<" @ROOT="${ROOT}" emacs $< --batch \ --eval "(require 'org)" \ --eval "(setq org-src-preserve-indentation t)" \ - --eval "(org-babel-tangle)" + --eval "(org-babel-tangle)" 2>/dev/null .PHONY: clean build force diff --git a/site/posts/meta/Bootstrap.org b/site/posts/meta/Bootstrap.org index 9765d56..5da62a0 100644 --- a/site/posts/meta/Bootstrap.org +++ b/site/posts/meta/Bootstrap.org @@ -9,27 +9,28 @@ #+END_SRC #+BEGIN_SRC makefile :tangle (concat (getenv "ROOT") "/bootstrap.mk") -SASS := $(shell find site/ -name "*.sass") - +GENSASS := +CONTENTS := GENFILES += scripts/export-org.el org.mk coq.mk \ - $(SASS:.sass=.css) soupault.conf + sass.mk soupault.conf EMACS := ROOT="${ROOT}" emacs -include org.mk coq.mk +include org.mk coq.mk sass.mk TANGLEARGS := --batch \ - --load="${ROOT}/scripts/tangle-org.el" + --load="${ROOT}/scripts/tangle-org.el" \ + 2>/dev/null -build : ${GENFILES} +build : ${CONTENTS} ${GENFILES} @echo " run soupault" @soupault @echo " update .gitignore" - @scripts/update-gitignore.sh ${GENFILES} + @scripts/update-gitignore.sh ${CONTENTS} ${GENFILES} ${GENSASS} clean : @echo " remove generated files" - @rm -rf ${GENFILES} build/ + @rm -rf ${CONTENTS} ${GENFILES} build/ force : clean build @@ -41,9 +42,9 @@ org.mk coq.mk scripts/export-org.el &: ${CLEODIR}/Contents.org @echo " tangle $<" @${EMACS} $< ${TANGLEARGS} -%.css : %.sass - @echo " compile $*.sass" - @sassc --style=compressed --sass $< $@ +sass.mk ${SASS} &: ${CLEODIR}/Theme.org + @echo " tangle $<" + @${EMACS} $< ${TANGLEARGS} #+END_SRC # Local Variables: diff --git a/site/posts/meta/Contents.org b/site/posts/meta/Contents.org index ffb3a8e..1690801 100644 --- a/site/posts/meta/Contents.org +++ b/site/posts/meta/Contents.org @@ -6,7 +6,7 @@ ** Author Guidelines -** Generation Process +** Under the Hood #+BEGIN_SRC emacs-lisp :tangle (concat (getenv "ROOT") "/scripts/export-org.el") (setq org-html-htmlize-output-type nil) @@ -16,7 +16,8 @@ #+BEGIN_SRC makefile :tangle (concat (getenv "ROOT") "/org.mk") ORG_POSTS := $(shell find site/ -name "*.org") -GENFILES += $(ORG_POSTS:.org=.html) +CONTENTS += $(ORG_POSTS:.org=.html) +GENSASS += site/style/org.sass EXPORTARGS := --batch \ --load="${ROOT}/scripts/export-org.el" @@ -26,15 +27,25 @@ EXPORTARGS := --batch \ @${EMACS} $< ${EXPORTARGS} #+END_SRC +#+BEGIN_SRC sass :tangle (concat (getenv "ROOT") "/site/style/org.sass") +.footpara + display: inline + margin-left: .2em + +.section-number-2:after, .section-number-3:after, .section-number-4:after + content: ". " +#+END_SRC + * Using Coq files ** Author Guidelines -** Generation Process +** Under the Hood #+BEGIN_SRC makefile :tangle (concat (getenv "ROOT") "/coq.mk") COQ_POSTS := $(shell find site/ -name "*.v") -GENFILES += $(COQ_POSTS:.v=.html) +CONTENTS += $(COQ_POSTS:.v=.html) +GENSASS += site/style/coq.sass COQLIB := "https://coq.inria.fr/distrib/current/stdlib/" COQCARG := -async-proofs-cache force \ @@ -50,6 +61,22 @@ COQDOCARG := --no-index --charset utf8 --short \ @rm -f $(shell dirname $<)/coqdoc.css #+END_SRC +#+BEGIN_SRC sass :tangle (concat (getenv "ROOT") "/site/style/coq.sass") +div.code + white-space: nowrap + overflow-x: visible + +.code a[href] + text-decoration: none + + .fa-external-link + display: none + +.paragraph + margin-top: 1em + margin-bottom: 1em +#+END_SRC + # Local Variables: # org-src-preserve-indentation: t # End: diff --git a/site/posts/meta/Soupault.org b/site/posts/meta/Soupault.org index a935c85..913c8ae 100644 --- a/site/posts/meta/Soupault.org +++ b/site/posts/meta/Soupault.org @@ -4,7 +4,7 @@ <div id="history">site/posts/meta/Soupault.org</div> #+END_EXPORT -#+BEGIN_SRC toml :tangle ../../../soupault.conf +#+BEGIN_SRC toml :tangle (concat (getenv "ROOT") "/soupault.conf") [settings] strict = true verbose = false diff --git a/site/style/main.sass b/site/style/main.sass deleted file mode 100644 index 82eb34d..0000000 --- a/site/style/main.sass +++ /dev/null @@ -1,174 +0,0 @@ -$bg-color: #fcfcfc -$fg-color: #333 -$primary-color: black - -* - box-sizing: border-box - -body, html - width: 100% - height: 100% - padding: 0 - margin: 0 - font-size: 100% - background: $bg-color - color: $fg-color - font-family: 'et-book', serif - -h1, h2, h3, h4, h5, a[href] - color: $primary-color - -h1, h2, h3, h4, h5 - font-family: sans-serif - -h1 - text-align: center - -a[href] .url-mark - font-size: smaller; - padding-left: 0.2em - -/* default */ - -body#default - overflow-x: hidden - - nav - padding-top: 1em - padding-bottom: 1em - width: 100% - - ul - padding: 0 - margin: 0 - width: 100% - display: flex - flex-direction: row - justify-content: center - list-style-type: none - - li - padding-left: .5em - padding-right: .5em - text-transform: uppercase - font-family: sans-serif - font-size: 130% - font-weight: bold - - a - text-decoration: none - - header - text-align: center - - img - text-align: center - border-radius: 50% - width: 125px - - main - max-width: 550px - margin: auto - padding: 0em 1em 1em 1em - font-size: 130% - -body#default main .code, code, pre, .inlinecode, tt - font-family: 'Fira Code', monospace - font-size: 75% - - -body#default - main - /* coqdoc output */ - div.code - white-space: nowrap - overflow-x: visible - - .code a[href] - text-decoration: none - - .fa-external-link - display: none - - .paragraph - margin-top: 1em - margin-bottom: 1em - - /* org-mode output */ - .footpara - display: inline - margin-left: .2em - - .section-number-2:after, .section-number-3:after, .section-number-4:after - content: ". " - - -/* VCARD (index.html) */ -body#vcard - display: flex - align-items: center - flex-direction: column - font-size: 125% - - article - max-width: 400px - width: 80% - margin: auto - - img - display: block - border-radius: 50% - width: 175px - margin: auto - margin-bottom: 3em - - h1 - color: $primary-color - font-size: 300% - text-align: center - - nav dt - font-weight: bold - - a - color: $primary-color - -/* indexes */ - -.index - dt - font-weight: bold - color: $primary-color - - dd - margin-left: 0 - margin-bottom: 1em - - ol - margin-top: 0.3em - -#history - summary - color: $primary-color - font-weight: bold - - table - border-top: 2px solid $primary-color - border-bottom: 2px solid $primary-color - border-collapse: collapse; - - td - border-bottom: 1px solid $primary-color - padding: .5em - vertical-align: top - - td.commit - font-size: smaller - - td.commit - font-family: 'Fira Code', monospace - font-size: 80% - white-space: nowrap; - -.imath - font-size: smaller
\ No newline at end of file |