From 4f5df99c8de7ddf2b54781327e8277fb5b168925 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 30 Oct 2013 00:13:58 +0100 Subject: [PATCH] got ourselves a pretty little portal page --- Makefile | 17 ++++++-- content/portal-config.xml | 2 +- content/static/style/default.css | 72 ++++++++++++++++++++++++++++++++ xsl/portal-sort.xsl | 15 +++++++ xsl/portal2items.xsl | 15 ++++--- xsl/xhtml5.xsl | 61 +++++++++++++++++++++++---- 6 files changed, 163 insertions(+), 19 deletions(-) create mode 100644 xsl/portal-sort.xsl diff --git a/Makefile b/Makefile index c57dabdd9..e93f82dff 100644 --- a/Makefile +++ b/Makefile @@ -82,10 +82,11 @@ DS_FEEDS:= \ NEWSITEMS:=$(wildcard content/news/*.xml) CLEAN=$(CONTENT) $(NEWSFILES) $(WWW_CCC_DE_UPDATES) $(CALENDAR_SUMMARY) $(DS_PAGES) $(DS_FEEDS) +NOINPUTVALID:=false NOVALID:=false define xml_process - $(VALIDATOR) $(VFLAGS_IN) $< + $(NOINPUTVALID) || $(VALIDATOR) $(VFLAGS_IN) $< $(PROCESSOR) $(PFLAGS) -o $@ $(STYLE) $< $(NOVALID) || $(VALIDATOR) $(VFLAGS_OUT) $@ || \ { touch -m -t 197001010000 Makefile $@ ; exit 1 ; } @@ -219,16 +220,26 @@ portal: mkdir $@ portal/fetch.sh : STYLE=xsl/portal2fetch.xsl +portal/fetch.sh : NOINPUTVALID:=true portal/fetch.sh : NOVALID:=true portal/fetch.sh: content/portal-config.xml $(STYLE) - $(PROCESSOR) $(PFLAGS) -o $@ $(STYLE) $< + $(call xml_process) chmod a+x $@ portal/items.xml : STYLE=xsl/portal2items.xsl +portal/items.xml : NOINPUTVALID:=true portal/items.xml : NOVALID:=true portal/items.xml: content/portal-config.xml $(STYLE) portal/fetch.sh news.xml ( cd portal && ./fetch.sh ) - $(PROCESSOR) $(PFLAGS) -o $@ $(STYLE) $< + $(call xml_process) + +portal/items-sorted.xml : STYLE=xsl/portal-sort.xsl +portal/items-sorted.xml: portal/items.xml $(STYLE) + $(call xml_process) + +build/portal.html : NOINPUTVALID:=true +build/portal.html: portal/items-sorted.xml $(STYLE) + $(call xml_process) # Pages: build/%.html: content/pages/%.xml $(STYLE) $(NAVIGATION) $(WWW_CCC_DE_UPDATES) $(CALENDAR_SUMMARY) $(DATESTAMP) news.xml diff --git a/content/portal-config.xml b/content/portal-config.xml index b57722b0a..11c698a44 100644 --- a/content/portal-config.xml +++ b/content/portal-config.xml @@ -2,5 +2,5 @@ https://media.c3d2.de/u/lachmoewe/atom/ https://media.c3d2.de/u/bigalex/atom/ https://media.c3d2.de/u/joerg/atom/ - https://wiki.c3d2.de/w/index.php?title=Spezial:Letzte_%C3%84nderungen&feed=atom&days=60&limit=30 + https://wiki.c3d2.de/w/index.php?title=Spezial:Letzte_%C3%84nderungen&feed=atom&days=300&limit=60 \ No newline at end of file diff --git a/content/static/style/default.css b/content/static/style/default.css index 46397d183..e5ce110a5 100644 --- a/content/static/style/default.css +++ b/content/static/style/default.css @@ -432,6 +432,78 @@ abbr.dtstart, abbr.dtend { height: 128px; } +/* -- Portal -- */ +#portal { + text-align: center; + white-space-collapsing: discard; +} +#portal article { + display: inline-block; + text-align: left; +} +#portal article > a { + display: block; + position: relative; + width: 14.5em; + height: 14.5em; + overflow: hidden; + border-bottom: none; + margin: 0; +} +#portal article > a:hover { + margin: 0; +} + +#portal h3, #portal .footer { + position: absolute; + left: 0; + right: 0; + height: 1.3em; + margin: 0; + padding: 0; + font-size: medium; + line-height: 1.3em; + overflow: hidden; + text-overflow: ellipsis; + font-weight: 100; + background-color: black; + color: white; + opacity: 0.7; + z-index: 2; +} +/*
*/ +#portal h3 { + top: -1.3em; + transition: top 0.3s ease-out; + letter-spacing: 0; +} +#portal a:hover h3 { + top: 0; + transition: top 0.1s ease-in; +} +/*