WIP: make it work on cana

This commit is contained in:
marko
2024-12-25 10:20:39 +01:00
parent ee6e9d4dcd
commit ff4cea8f4c
3 changed files with 8 additions and 6 deletions

View File

@@ -12,8 +12,9 @@ phpLibFiles = $(wildcard phpLib/cwsvJudo/*.php) phpLib/phpcount/phpcount.php
configFiles = $(wildcard config/*.php) configFiles = $(wildcard config/*.php)
distDir=./build/dist/heliohost distDir=./build/dist/heliohost
pandocTemplate=bulma-hello-parallax.html
LN = cp -r LN = cp -rf
.PHONY: all .PHONY: all
all: $(phpFiles) all: $(phpFiles)
@@ -28,7 +29,7 @@ clean:
# copy/link all together to get a distributable package # copy/link all together to get a distributable package
.PHONY: dist .PHONY: dist
dist: all dist: all
rm -r $(distDir) rm -rf $(distDir)
mkdir -p $(distDir) mkdir -p $(distDir)
# page data # page data
mkdir -p $(distDir)/httpdocs/pages/ mkdir -p $(distDir)/httpdocs/pages/
@@ -63,13 +64,13 @@ dist: all
docker-compose restart docker-compose restart
# build the materialize version of the page # 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 mkdir -p build/materialize
# create html/php code # create html/php code
pandoc \ pandoc \
--standalone \ --standalone \
--css="ressourcen/css/cwsvJudo.css" \ --css="ressourcen/css/cwsvJudo.css" \
--template=pandocTemplate/materialize.pandocTemplate \ --template=pandocTemplate/$(pandocTemplate) \
--to=html \ --to=html \
--wrap=preserve \ --wrap=preserve \
--output=$@ \ --output=$@ \

View File

@@ -1,4 +1,4 @@
version: '3' version: '3.3'
services: services:
web: web:
# check the php version you need for your project # check the php version you need for your project

View File

@@ -102,8 +102,9 @@ $options = getKeyValueArray($someOptions);
// falls KEIN explizites PromoImage gesetzt ist, versuche es aus dem // falls KEIN explizites PromoImage gesetzt ist, versuche es aus dem
// Nachrichtentext heraus zu lesen // Nachrichtentext heraus zu lesen
// @toDo: woher bekomme ich width and height bei explizitem promoImg? // @toDo: woher bekomme ich width and height bei explizitem promoImg?
if(!$aNews['promoImg']) if(!array_key_exists("promoImg", $aNews)){
$aNews['promoImg'] = array('src'=>""); $aNews['promoImg'] = array('src'=>"");
}
if(is_string($aNews['promoImg'])){ if(is_string($aNews['promoImg'])){
if(json_decode($aNews['promoImg'])){ if(json_decode($aNews['promoImg'])){
$aNews['promoImg'] = json_decode($aNews['promoImg'], true); $aNews['promoImg'] = json_decode($aNews['promoImg'], true);