WIP: groundstone for letting all subpages use the same template
This commit is contained in:
@@ -22,9 +22,11 @@ all: build/css/cwsvJudo.css images
|
|||||||
|
|
||||||
# minimizing wallpaper sizes
|
# minimizing wallpaper sizes
|
||||||
build/graphiken/wallpapers/%.jpg: graphiken/wallpapers/%.jpg
|
build/graphiken/wallpapers/%.jpg: graphiken/wallpapers/%.jpg
|
||||||
# guetzli $^ $@
|
mkdir -p build/graphiken/wallpapers
|
||||||
$(LN) $^ $@
|
guetzli $^ $@
|
||||||
|
# $(LN) $^ $@
|
||||||
build/graphiken/wallpapers/%.svg: graphiken/wallpapers/%.svg
|
build/graphiken/wallpapers/%.svg: graphiken/wallpapers/%.svg
|
||||||
|
mkdir -p build/graphiken/wallpapers
|
||||||
$(LN) $^ $@
|
$(LN) $^ $@
|
||||||
|
|
||||||
.PHONY: images
|
.PHONY: images
|
||||||
@@ -85,13 +87,22 @@ dist: all
|
|||||||
# - lazysizes
|
# - lazysizes
|
||||||
$(LN) ./submodules/lazysizes/lazysizes.min.js $(distDir)/httpdocs/ressourcen/js/
|
$(LN) ./submodules/lazysizes/lazysizes.min.js $(distDir)/httpdocs/ressourcen/js/
|
||||||
|
|
||||||
# page data
|
# pages
|
||||||
mkdir -p $(distWebRoot)/pages/responsive
|
mkdir -p $(distWebRoot)/pages/responsive
|
||||||
find src/pages/responsive -type f -exec $(LN) {} $(distWebRoot)/pages/responsive \;
|
find src/pages/responsive -type f -exec $(LN) {} $(distWebRoot)/pages/responsive \;
|
||||||
|
|
||||||
mkdir -p $(distWebRoot)/pages/responsive/phpLibs/cwsvJudo
|
mkdir -p $(distWebRoot)/pages/responsive/phpLibs/cwsvJudo
|
||||||
find src/pages/responsive/phpLibs/cwsvJudo -type f -exec $(LN) {} $(distWebRoot)/pages/responsive/phpLibs/cwsvJudo \;
|
find src/pages/responsive/phpLibs/cwsvJudo -type f -exec $(LN) {} $(distWebRoot)/pages/responsive/phpLibs/cwsvJudo \;
|
||||||
|
|
||||||
|
# page data
|
||||||
|
# - new system to save page data
|
||||||
|
# - all page data resides in same directory
|
||||||
|
# - each page gets own directory
|
||||||
|
# - each page directory contains:
|
||||||
|
# - a meta.json
|
||||||
|
# - optional: markdown files
|
||||||
|
cp -Rl src/page_data $(distDir)/pages
|
||||||
|
|
||||||
# structured data
|
# structured data
|
||||||
mkdir -p $(distDir)/httpdocs/ressourcen/structuredData/json
|
mkdir -p $(distDir)/httpdocs/ressourcen/structuredData/json
|
||||||
find src/jsonSd -type f -exec $(LN) {} $(distDir)/httpdocs/ressourcen/structuredData/json \;
|
find src/jsonSd -type f -exec $(LN) {} $(distDir)/httpdocs/ressourcen/structuredData/json \;
|
||||||
@@ -150,16 +161,16 @@ dist: all
|
|||||||
$(LN) ./src/htaccess/heliohost/pages/responsive/.htaccess $(distDir)/httpdocs/pages/responsive/.htaccess
|
$(LN) ./src/htaccess/heliohost/pages/responsive/.htaccess $(distDir)/httpdocs/pages/responsive/.htaccess
|
||||||
|
|
||||||
# config files
|
# config files
|
||||||
$(LN) ./configs/heliohost/pages.config.inc.php $(distDir)/httpdocs/pages/responsive/config.inc.php
|
$(LN) ./configs/heliohost/pages.config.inc.php $(distDir)/httpdocs/pages/responsive/config.php
|
||||||
|
|
||||||
# @todo shouldn't be used any more
|
|
||||||
mkdir -p $(distDir)/.local
|
mkdir -p $(distDir)/.local
|
||||||
|
|
||||||
$(LN) configs/heliohost/config.json $(distDir)/.local/config.json
|
$(LN) configs/heliohost/config.json $(distDir)/.local/config.json
|
||||||
$(LN) configs/heliohost/secrets.json $(distDir)/.local/secrets.json
|
$(LN) configs/heliohost/secrets.json $(distDir)/.local/secrets.json
|
||||||
|
|
||||||
|
# @todo shouldn't be used any more
|
||||||
$(LN) configs/local/db.config.php $(distDir)/.local/db.config.php
|
$(LN) configs/local/db.config.php $(distDir)/.local/db.config.php
|
||||||
|
|
||||||
# docker-compose restart
|
docker-compose restart
|
||||||
|
|
||||||
.PHONY: pages
|
.PHONY: pages
|
||||||
pages: Makefile.heliohost.config $(pandocTemplate) $(phpFiles)
|
pages: Makefile.heliohost.config $(pandocTemplate) $(phpFiles)
|
||||||
@@ -186,6 +197,7 @@ build/yaml/%.yaml: src/yaml/images.yaml src/yaml/navTargets.yaml src/yaml/mainNa
|
|||||||
|
|
||||||
# combine css files into one
|
# combine css files into one
|
||||||
build/css/cwsvJudo.css: $(cssFiles)
|
build/css/cwsvJudo.css: $(cssFiles)
|
||||||
|
mkdir -p build/css
|
||||||
cat $^ | $(CSSO) -o $@
|
cat $^ | $(CSSO) -o $@
|
||||||
|
|
||||||
# .PHONY: download_material_icons
|
# .PHONY: download_material_icons
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
"user": "cwsvjudo_marko",
|
"user": "cwsvjudo_marko",
|
||||||
"dbCharset": "ISO-8859-1",
|
"dbCharset": "ISO-8859-1",
|
||||||
"outCharset": "UTF-8"
|
"outCharset": "UTF-8"
|
||||||
|
},
|
||||||
|
"paths":{
|
||||||
|
"wallpapers": "/ressourcen/graphiken/wallpapers"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,24 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
/// Die Basisdomain, unter der die Hauptseite zu erreichen ist
|
/// Die Basisdomain, unter der die Hauptseite zu erreichen ist
|
||||||
// $baseDomain = "cwsvjudo.bplaced.net";
|
// $baseDomain = "cwsvjudo.bplaced.net";
|
||||||
$baseDomain = "cwsvjudo.helioho.st";
|
$baseDomain = "cwsvjudo.de";
|
||||||
/// Subdomain, unter dem dieses Verzeichnis zu finden ist (falls der Fall gegeben ist)
|
/// Subdomain, unter dem dieses Verzeichnis zu finden ist (falls der Fall gegeben ist)
|
||||||
$subDomain = "";
|
$subDomain = "";
|
||||||
/// homeverzeichnis auf dem server
|
/// homeverzeichnis auf dem server
|
||||||
$home = "/home/cwsvjudo.helioho.st";
|
$home = "/home/cwsvjudo.de";
|
||||||
|
|
||||||
/// Basis(/Root)-Verzeichnis auf dem Server (für Dateizugriffe, insbesondere phpIncludes)
|
/// Basis(/Root)-Verzeichnis auf dem Server (für Dateizugriffe, insbesondere phpIncludes)
|
||||||
/// (ist eigentlich das serve verzeichnis, aka www-data)
|
/// (ist eigentlich das serve verzeichnis, aka www-data)
|
||||||
$basePath = join(separator: "/", array: [$home, "httpdocs"]);
|
$basePath = join(separator: "/", array: [$home, "httpdocs"]);
|
||||||
|
|
||||||
/// Url zum Zugriff auf "shared Data" unter der Hauptadresse
|
/// Url zum Zugriff auf "shared Data" unter der Hauptadresse
|
||||||
$baseUrl = "http://".$baseDomain;
|
$baseUrl = "http://" . $baseDomain;
|
||||||
/// Die kanonische Url dieses Verzeichnisses (unter welcher
|
/// Die kanonische Url dieses Verzeichnisses (unter welcher
|
||||||
/// Domainadresse die Seiten dieses Verzeichnisses bevorzugt zu
|
/// Domainadresse die Seiten dieses Verzeichnisses bevorzugt zu
|
||||||
/// erreichen seien sollen, also entweder eine SubdomainUrl, oder die
|
/// erreichen seien sollen, also entweder eine SubdomainUrl, oder die
|
||||||
/// baseUrl mit dem Verzeichnis angehängt)
|
/// baseUrl mit dem Verzeichnis angehängt)
|
||||||
/// Achtung: Gedacht für eine einheitliche Bezeichnung bei internem
|
/// Achtung: Gedacht für eine einheitliche Bezeichnung bei internem
|
||||||
/// Verlinken. Der canonicalLink im Header ist bei ampSeiten nicht die
|
/// Verlinken. Der canonicalLink im Header ist bei ampSeiten nicht die
|
||||||
/// eigene Adresse, sondern die (kanonische) Adresse der "normalen"
|
/// eigene Adresse, sondern die (kanonische) Adresse der "normalen"
|
||||||
/// Version der Seite.
|
/// Version der Seite.
|
||||||
$canonicalBaseUrl = "https://".(empty($subDomain)?"":($subDomain.".")).$baseDomain;
|
$canonicalBaseUrl =
|
||||||
|
"https://" . (empty($subDomain) ? "" : $subDomain . ".") . $baseDomain;
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
"user": "cwsvjudo_marko",
|
"user": "cwsvjudo_marko",
|
||||||
"dbCharset": "UTF-8",
|
"dbCharset": "UTF-8",
|
||||||
"outCharset": "UTF-8"
|
"outCharset": "UTF-8"
|
||||||
|
},
|
||||||
|
"paths":{
|
||||||
|
"wallpapers": "/ressourcen/graphiken/wallpapers"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -15,6 +15,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
# this line maps the content of ./html in your pc to the /var/www/html of the container
|
# this line maps the content of ./html in your pc to the /var/www/html of the container
|
||||||
- ./build/dist/heliohost/httpdocs:/var/www/html
|
- ./build/dist/heliohost/httpdocs:/var/www/html
|
||||||
|
- ./build/dist/heliohost/pages:/home/cwsvjudo.de/pages
|
||||||
- ./configs/localDocker/config.json:/home/cwsvjudo.de/.local/config.json
|
- ./configs/localDocker/config.json:/home/cwsvjudo.de/.local/config.json
|
||||||
- ./configs/localDocker/secrets.json:/home/cwsvjudo.de/.local/secrets.json
|
- ./configs/localDocker/secrets.json:/home/cwsvjudo.de/.local/secrets.json
|
||||||
db:
|
db:
|
||||||
|
|||||||
@@ -14,22 +14,26 @@
|
|||||||
|
|
||||||
/* responsive font sizes */
|
/* responsive font sizes */
|
||||||
|
|
||||||
|
/* small */
|
||||||
.card-content{
|
.card-content{
|
||||||
font-size: 3cqw;
|
font-size: 3cqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* medium */
|
||||||
@media only screen and (min-width: 600px) {
|
@media only screen and (min-width: 600px) {
|
||||||
.card-content {
|
.card-content {
|
||||||
font-size: 2cqw;
|
font-size: 2cqw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* large */
|
||||||
@media only screen and (min-width: 992px) {
|
@media only screen and (min-width: 992px) {
|
||||||
.card-content {
|
.card-content {
|
||||||
font-size: 1.5cqw;
|
font-size: 1.5cqw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* eXtra large */
|
||||||
@media only screen and (min-width: 1200px) {
|
@media only screen and (min-width: 1200px) {
|
||||||
.card-content {
|
.card-content {
|
||||||
font-size: 1.25cqw;
|
font-size: 1.25cqw;
|
||||||
|
|||||||
@@ -12,6 +12,14 @@
|
|||||||
# Url-Rewriting aktivieren
|
# Url-Rewriting aktivieren
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
|
||||||
|
# if the requested resource doesn't exist as ...
|
||||||
|
# - file or ...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
# - directory ...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
# then append the (first) directory part as query string
|
||||||
|
RewriteRule ^(.*?)/?$ /pages/responsive/index.php?page=$1 [L]
|
||||||
|
|
||||||
# Die angeforderte Ressource ist nicht bereits in dem Zielverzeichnis:
|
# Die angeforderte Ressource ist nicht bereits in dem Zielverzeichnis:
|
||||||
RewriteCond %{REQUEST_URI} !^/pages/responsive/
|
RewriteCond %{REQUEST_URI} !^/pages/responsive/
|
||||||
|
|
||||||
|
|||||||
13
homepage/cwsvJudo/src/page_data/index/meta.json
Normal file
13
homepage/cwsvJudo/src/page_data/index/meta.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"head": {
|
||||||
|
"navTargets": [
|
||||||
|
{
|
||||||
|
"url": "training",
|
||||||
|
"caption": "Training",
|
||||||
|
"title": "Trainingszeiten und -orte der Judoka des Chemnitzer WSV"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"main": {},
|
||||||
|
"footer": {}
|
||||||
|
}
|
||||||
@@ -2,17 +2,12 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once "bootstrap.php";
|
require_once "bootstrap.php";
|
||||||
|
|
||||||
$directory_paths = [
|
$page = $_GET["page"] ?? "index";
|
||||||
"wallpapers" => "/ressourcen/graphiken/wallpapers",
|
|
||||||
];
|
|
||||||
|
|
||||||
$mainNav = [
|
$meta = json_decode(
|
||||||
[
|
json: file_get_contents(filename: $home . "/pages/" . $page . "/meta.json"),
|
||||||
"url" => "training",
|
associative: true
|
||||||
"caption" => "Training",
|
);
|
||||||
"title" => "Trainingszeiten und -orte der Judoka des Chemnitzer WSV",
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
$promos = [
|
$promos = [
|
||||||
[
|
[
|
||||||
@@ -78,16 +73,17 @@ $sections = [
|
|||||||
|
|
||||||
$wallpapers = [
|
$wallpapers = [
|
||||||
[
|
[
|
||||||
"src" => $directory_paths["wallpapers"] . "/osae-komi.svg",
|
"src" => $config["cwsvJudo"]["paths"]["wallpapers"] . "/osae-komi.svg",
|
||||||
"data-src" => $directory_paths["wallpapers"] . "/osae-komi.jpg",
|
"data-src" =>
|
||||||
|
$config["cwsvJudo"]["paths"]["wallpapers"] . "/osae-komi.jpg",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"src" => $directory_paths["wallpapers"] . "/nage.svg",
|
"src" => $config["cwsvJudo"]["paths"]["wallpapers"] . "/nage.svg",
|
||||||
"data-src" => $directory_paths["wallpapers"] . "/nage.jpg",
|
"data-src" => $config["cwsvJudo"]["paths"]["wallpapers"] . "/nage.jpg",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"src" => $directory_paths["wallpapers"] . "/kata.svg",
|
"src" => $config["cwsvJudo"]["paths"]["wallpapers"] . "/kata.svg",
|
||||||
"data-src" => $directory_paths["wallpapers"] . "/kata.jpg",
|
"data-src" => $config["cwsvJudo"]["paths"]["wallpapers"] . "/kata.jpg",
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -167,37 +163,11 @@ function main($sections, $wallpapers)
|
|||||||
<header>
|
<header>
|
||||||
<nav class="nav navbar">
|
<nav class="nav navbar">
|
||||||
<div class="nav-wrapper" style="font-family: 'Orbitron-Medium', Impact, Charcoal, sans-serif;">
|
<div class="nav-wrapper" style="font-family: 'Orbitron-Medium', Impact, Charcoal, sans-serif;">
|
||||||
<!-- <img style="height:100%;width:auto;" width="128" height="104" title="Judo im Chemnitzer WSV"
|
|
||||||
alt="Judo im Chemnitzer WSV - Logo" src="/ressourcen/graphiken/logos/cwsvJudoLogoWappen.128w.png"
|
|
||||||
srcset="/ressourcen/graphiken/logos/cwsvJudoLogoWappen.256w.png 2x"> -->
|
|
||||||
<a href="/" class="brand-logo">
|
<a href="/" class="brand-logo">
|
||||||
<span>cwsvJudo</span>
|
<span>cwsvJudo</span>
|
||||||
</a>
|
</a>
|
||||||
<?php mainNavTargets($mainNav); ?>
|
<?php mainNavTargets($meta["head"]["navTargets"]); ?>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="nav-content">
|
|
||||||
$if(subNav)$
|
|
||||||
<ul class="tabs tabs-transparent">
|
|
||||||
$for(subNav)$
|
|
||||||
<li class="tab">
|
|
||||||
<a href="$subNav.url$" $if(subNav.caption)$title="$subNav.caption$" $endif$
|
|
||||||
$if(subNav.active)$class="activeNav" $endif$> -->
|
|
||||||
<!-- $if(subNav.icon)$
|
|
||||||
<img src="$if(subNav.icon.src)$$subNav.icon.src$$else$$subNav.icon$$endif$"
|
|
||||||
$if(subNav.caption)$ alt="$subNav.caption$" $else$ $if(subNav.icon.alt)$
|
|
||||||
alt="$subNav.icon.alt$" $endif$ $endif$ $if(subNav.icon.width)$
|
|
||||||
width="$subNav.icon.width$" $endif$ $if(subNav.icon.height)$
|
|
||||||
height="$subNav.icon.height$" $endif$ $if(subNav.icon.title)$
|
|
||||||
title="$subNav.icon.title$" $endif$ $if(subNav.icon.srcset)$
|
|
||||||
srcset="$subNav.icon.srcset$" $endif$>
|
|
||||||
$endif$ -->
|
|
||||||
<!-- $if(subNav.caption)$<span>$subNav.caption$</span>$endif$
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
$endfor$
|
|
||||||
</ul>
|
|
||||||
$endif$
|
|
||||||
</div> -->
|
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@@ -205,32 +175,29 @@ function main($sections, $wallpapers)
|
|||||||
<?php main($sections, $wallpapers); ?>
|
<?php main($sections, $wallpapers); ?>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<footer class="page-footer">
|
<footer class="page-footer">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="l6 s12">
|
<div class="l6 s12">
|
||||||
<a
|
<a
|
||||||
title="Seite auf HTML 5 Konformität prüfen"
|
title="Seite auf HTML 5 Konformität prüfen"
|
||||||
href="http://validator.w3.org/check?uri=<?php echo urlencode(
|
href="http://validator.w3.org/check?uri=<?php echo urlencode(
|
||||||
getCurPagesUrl()
|
getCurPagesUrl()
|
||||||
); ?>"
|
); ?>"
|
||||||
>
|
>
|
||||||
<i class="material-icons">html</i>5
|
<i class="material-icons">html</i>5
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="footer-copyright">
|
||||||
<div class="footer-copyright">
|
<div class="container">
|
||||||
<div class="container">
|
© 2025 Copyright Text
|
||||||
© 2025 Copyright Text
|
<a class="right" href="#!">More Links</a>
|
||||||
<a class="right" href="#!">More Links</a>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|
||||||
<!--JavaScript at end of body for optimized loading-->
|
<!--JavaScript at end of body for optimized loading-->
|
||||||
<!-- Import external libraries -->
|
<!-- Import external libraries -->
|
||||||
<!-- - materialize framework -->
|
<!-- - materialize framework -->
|
||||||
@@ -247,15 +214,6 @@ function main($sections, $wallpapers)
|
|||||||
// specify options here
|
// specify options here
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
carousels: M.Carousel.init(
|
|
||||||
document.querySelectorAll('.carousel'), {
|
|
||||||
dist: -50,
|
|
||||||
fullWidth: true,
|
|
||||||
indicators: true,
|
|
||||||
noWrap: true,
|
|
||||||
numVisible: 1,
|
|
||||||
}
|
|
||||||
),
|
|
||||||
} // end instances
|
} // end instances
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user