From 9d1f8897c90736b6e300b3337b8af8bb9615781e Mon Sep 17 00:00:00 2001 From: marko Date: Wed, 30 May 2018 05:08:00 +0200 Subject: [PATCH] =?UTF-8?q?Erweiterung=20im=20html5Template=20-=20ampLink?= =?UTF-8?q?=20hinzugef=C3=BCgt=20-=20bei=20einer=20Seite=20metaDescription?= =?UTF-8?q?=20hinzugef=C3=BCgt=20=09ge=C3=A4ndert:=20=20=20=20=20=20=20md/?= =?UTF-8?q?index.md=20=09ge=C3=A4ndert:=20=20=20=20=20=20=20pandocTemplate?= =?UTF-8?q?/cwsvJudo.html5.pandocTemplate=20-=20Graphikerzeugung=20=C3=BCb?= =?UTF-8?q?erarbeitet=20=09ge=C3=A4ndert:=20=20=20=20=20=20=20Makefile=20-?= =?UTF-8?q?=20Funktion=20zur=20R=C3=BCcklieferung=20des=20Galerielinks=20?= =?UTF-8?q?=09ge=C3=A4ndert:=20=20=20=20=20=20=20phpLib/cwsvJudo/galTable.?= =?UTF-8?q?php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../redesign2018/markdownExperiment/Makefile | 29 +++++++++++++------ .../markdownExperiment/md/index.md | 5 ++-- .../cwsvJudo.html5.pandocTemplate | 3 ++ .../phpLib/cwsvJudo/galTable.php | 21 ++++++++++++++ 4 files changed, 47 insertions(+), 11 deletions(-) diff --git a/homepage/redesign2018/markdownExperiment/Makefile b/homepage/redesign2018/markdownExperiment/Makefile index d3613ca..2115ed9 100644 --- a/homepage/redesign2018/markdownExperiment/Makefile +++ b/homepage/redesign2018/markdownExperiment/Makefile @@ -1,3 +1,5 @@ +RES_LIST = 64 128 256 512 + cssFiles = $(wildcard css/*.css) mdFiles = $(wildcard md/*.md) phpFiles = $(patsubst md/%.md, build/%.php, $(mdFiles)) @@ -106,12 +108,21 @@ build/.uploadMarker/config/%: config/% .PHONY: graphiken -graphiken: - convert -resize 128x graphiken/cwsvLogoWappen.x250.png build/graphiken/cwsvLogoWappen.128w.png - pngnq -Qf -s9 -e.png -f build/graphiken/cwsvLogoWappen.128w.png - convert -resize 64x graphiken/cwsvLogoWappen.x250.png build/graphiken/cwsvLogoWappen.64w.png - pngnq -Qf -s9 -e.png -f build/graphiken/cwsvLogoWappen.64w.png - convert -resize 128x graphiken/cwsvJudoLogoWappen.x256.png build/graphiken/cwsvJudoLogoWappen.128w.png - pngnq -Qf -s9 -e.png -f build/graphiken/cwsvJudoLogoWappen.128w.png - convert -resize 64x graphiken/cwsvJudoLogoWappen.x256.png build/graphiken/cwsvJudoLogoWappen.64w.png - pngnq -Qf -s9 -e.png -f build/graphiken/cwsvJudoLogoWappen.64w.png +graphiken: cwsvLogoWappen cwsvJudoLogoWappen + +cwsvJudoLogoWappen: $(addprefix build/graphiken/cwsvJudoLogoWappen/cwsvJudoLogoWappen., $(addsuffix w.png, $(RES_LIST))) +cwsvLogoWappen: $(addprefix build/graphiken/cwsvLogoWappen/cwsvLogoWappen., $(addsuffix w.png, $(RES_LIST))) + +build/graphiken/cwsvJudoLogoWappen/cwsvJudoLogoWappen.png: graphiken/cwsvJudoLogoWappen.xcf +build/graphiken/cwsvLogoWappen/cwsvLogoWappen.png: graphiken/cwsvLogoWappen.xcf + mkdir -p $(dir $@) + convert -layers flatten -background transparent $< $@ + +build/graphiken/cwsvJudoLogoWappen/cwsvJudoLogoWappen.%w.png: build/graphiken/cwsvJudoLogoWappen/cwsvJudoLogoWappen.png +build/graphiken/cwsvLogoWappen/cwsvLogoWappen.%w.png: build/graphiken/cwsvLogoWappen/cwsvLogoWappen.png + mkdir -p $(dir $@) + convert -layers flatten -background transparent -resize $*x $< $@ +# zopfli/zopflipng --iterations=500 --filters=01234mepb --lossy_8bit --lossy_transparent $@ $@ + zopflipng -my $@ $@ + +echo: diff --git a/homepage/redesign2018/markdownExperiment/md/index.md b/homepage/redesign2018/markdownExperiment/md/index.md index b1db8cd..8fba8ed 100644 --- a/homepage/redesign2018/markdownExperiment/md/index.md +++ b/homepage/redesign2018/markdownExperiment/md/index.md @@ -1,6 +1,7 @@ --- -title: Homepage der Judoka des Chemnitzer Freizeit- und Wohngebietssportvereines e. V. -author: marko +title: "Judo im Chemnitzer WSV - Kinder- und Erwachsenentraining" +description: "Informationen zu Trainingszeiten, Wettkämpfen und anderen Veranstaltungen der Abteilung Judo des Chemnitzer Freizeit- und Wohngebietssportvereines e. V." +author: "marko" keywords: - "Judo" - "Chemnitzer Freizeit- und Wohngebietssportverein" diff --git a/homepage/redesign2018/markdownExperiment/pandocTemplate/cwsvJudo.html5.pandocTemplate b/homepage/redesign2018/markdownExperiment/pandocTemplate/cwsvJudo.html5.pandocTemplate index e1f5db7..007fe7c 100644 --- a/homepage/redesign2018/markdownExperiment/pandocTemplate/cwsvJudo.html5.pandocTemplate +++ b/homepage/redesign2018/markdownExperiment/pandocTemplate/cwsvJudo.html5.pandocTemplate @@ -36,6 +36,9 @@ $if(keywords)$ $endif$ $if(description)$ +$endif$ +$if(ampVersionLink)$ + $endif$ $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ diff --git a/homepage/redesign2018/markdownExperiment/phpLib/cwsvJudo/galTable.php b/homepage/redesign2018/markdownExperiment/phpLib/cwsvJudo/galTable.php index de40474..207f396 100644 --- a/homepage/redesign2018/markdownExperiment/phpLib/cwsvJudo/galTable.php +++ b/homepage/redesign2018/markdownExperiment/phpLib/cwsvJudo/galTable.php @@ -129,3 +129,24 @@ $messages=array(); return; } + +function getGalleryLink( $aGallerId ){ + +if( is_positive_integer($aGalleryId) ){ + try{ + $db_connection = new PDO('mysql:host='.$db_server.';dbname='.$db_name, $db_user, $db_password); + $query="SELECT url FROM wkGalerien WHERE id = \"".$_aGalleryId."\" ORDER BY Datum ASC LIMIT 1;"; + $ergebnis = $db_connection->query( $query ); + $galleryLink = $ergebnis->fetchAll(); + + return $galleryLink[0]['url']; + $db_connection = NULL; + } + catch(PDOException $db_error){ + print "Error!: " . $db_error->getMessage() . "
"; +// echoGalTable(); + } +} +return ""; +} +?>