From 3960448da409263b381b1c38228087bd21d1b3b8 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 10 Jan 2020 16:35:26 +0100 Subject: isolate local styling on separate overridable file --- slidy/Makefile | 11 +++++++++-- slidy/local.css | 7 +++++++ slidy/slidy.css | 4 ---- 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 slidy/local.css (limited to 'slidy') diff --git a/slidy/Makefile b/slidy/Makefile index 5c066f1..5372f6b 100644 --- a/slidy/Makefile +++ b/slidy/Makefile @@ -1,12 +1,19 @@ pandoc_sources := $(wildcard *.mkd) presentations = $(pandoc_sources:%.mkd=%/index.html) -#aux = slidy.css all: $(presentations) # TODO: use --offline when working with Debian packaging of Pandoc # FIXME: only add local stylesheet if it already exist in target dir -$(presentations): %/index.html : %.mkd +$(presentations): %/index.html : %.mkd %/local.css mkdir -p $(dir $@) pandoc --from Markdown --to Slidy -o $@ -s -c local.css $< perl -i -pe 's{https?://www.w3.org/Talks/Tools/Slidy2/(?:styles|scripts)/(slidy.(?:css|js))(?:\.gz)?}{../../../slidy/$$1}g' $@ + +%/local.css: $(firstword $(wildcard local.scss local.css) ../../slidy/local.css) +#%/local.css: local.scss +#%/local.css: $(wildcard local.scss) + $(if $(filter %.scss,$<),\ + rm --force $@ && \ + sassc --load-path /usr/share/sass/stylesheets --style compressed $< $@,\ + ln --force --symbolic --target-directory=$* ../$<) diff --git a/slidy/local.css b/slidy/local.css new file mode 100644 index 0000000..62b23ad --- /dev/null +++ b/slidy/local.css @@ -0,0 +1,7 @@ +body +{ + background-image: url(openlogo-nd-100.png); + background-attachment: fixed; + background-repeat: no-repeat; + background-position: 95% 5%; +} diff --git a/slidy/slidy.css b/slidy/slidy.css index 6fef585..c713c88 100644 --- a/slidy/slidy.css +++ b/slidy/slidy.css @@ -15,10 +15,6 @@ body height: 100%; color: black; background-color: white; - background-image: url(openlogo-nd-100.png); - background-attachment: fixed; - background-repeat: no-repeat; - background-position: 95% 5%; font-family: "Gill Sans MT", "Gill Sans", GillSans, sans-serif; font-size: 14pt; } -- cgit v1.2.3