diff --git a/homepage/cwsvJudo/Makefile.heliohost b/homepage/cwsvJudo/Makefile.heliohost index d71a6c8..ab323a0 100644 --- a/homepage/cwsvJudo/Makefile.heliohost +++ b/homepage/cwsvJudo/Makefile.heliohost @@ -12,8 +12,9 @@ phpLibFiles = $(wildcard phpLib/cwsvJudo/*.php) phpLib/phpcount/phpcount.php configFiles = $(wildcard config/*.php) distDir=./build/dist/heliohost +pandocTemplate=bulma-hello-parallax.html -LN = cp -r +LN = cp -rf .PHONY: all all: $(phpFiles) @@ -28,7 +29,7 @@ clean: # copy/link all together to get a distributable package .PHONY: dist dist: all - rm -r $(distDir) + rm -rf $(distDir) mkdir -p $(distDir) # page data mkdir -p $(distDir)/httpdocs/pages/ @@ -63,13 +64,13 @@ dist: all docker-compose restart # build the materialize version of the page -build/materialize/%.php: src/md/%.md build/yaml/%.yaml pandocTemplate/materialize.pandocTemplate +build/materialize/%.php: src/md/%.md build/yaml/%.yaml pandocTemplate/$(pandocTemplate) mkdir -p build/materialize # create html/php code pandoc \ --standalone \ --css="ressourcen/css/cwsvJudo.css" \ - --template=pandocTemplate/materialize.pandocTemplate \ + --template=pandocTemplate/$(pandocTemplate) \ --to=html \ --wrap=preserve \ --output=$@ \ diff --git a/homepage/cwsvJudo/docker-compose.yaml b/homepage/cwsvJudo/docker-compose.yaml index e08f502..e87fd6d 100644 --- a/homepage/cwsvJudo/docker-compose.yaml +++ b/homepage/cwsvJudo/docker-compose.yaml @@ -1,4 +1,4 @@ -version: '3' +version: '3.3' services: web: # check the php version you need for your project diff --git a/homepage/cwsvJudo/phpLib/cwsvJudo/newsLib.php b/homepage/cwsvJudo/phpLib/cwsvJudo/newsLib.php index cecba1e..7f1a946 100644 --- a/homepage/cwsvJudo/phpLib/cwsvJudo/newsLib.php +++ b/homepage/cwsvJudo/phpLib/cwsvJudo/newsLib.php @@ -102,8 +102,9 @@ $options = getKeyValueArray($someOptions); // falls KEIN explizites PromoImage gesetzt ist, versuche es aus dem // Nachrichtentext heraus zu lesen // @toDo: woher bekomme ich width and height bei explizitem promoImg? - if(!$aNews['promoImg']) + if(!array_key_exists("promoImg", $aNews)){ $aNews['promoImg'] = array('src'=>""); + } if(is_string($aNews['promoImg'])){ if(json_decode($aNews['promoImg'])){ $aNews['promoImg'] = json_decode($aNews['promoImg'], true);