Upgrade to Kirby 3
This commit is contained in:
parent
80004a968c
commit
03ab30b8c1
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,8 +1,8 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/site/accounts
|
/site/accounts
|
||||||
/site/cache
|
/site/cache
|
||||||
/assets/avatars
|
/site/sessions
|
||||||
/thumbs
|
/media
|
||||||
/content
|
/content
|
||||||
|
|
||||||
/video
|
/video
|
||||||
|
|
20
.gitmodules
vendored
20
.gitmodules
vendored
|
@ -1,18 +1,6 @@
|
||||||
[submodule "kirby"]
|
[submodule "kirby"]
|
||||||
path = kirby
|
path = kirby
|
||||||
url = https://github.com/getkirby-v2/kirby
|
url = https://github.com/getkirby/kirby.git
|
||||||
[submodule "panel"]
|
|
||||||
path = panel
|
|
||||||
url = https://github.com/getkirby-v2/panel
|
|
||||||
[submodule "modules/kirby-template-sitemap"]
|
|
||||||
path = modules/kirby-template-sitemap
|
|
||||||
url = https://github.com/jbeyerstedt/kirby-template-sitemap
|
|
||||||
[submodule "modules/kirby-plugin-thumbExt"]
|
|
||||||
path = modules/kirby-plugin-thumbExt
|
|
||||||
url = https://github.com/jbeyerstedt/kirby-plugin-thumbExt.git
|
|
||||||
[submodule "modules/kirby-plugin-kirbytextRaw"]
|
|
||||||
path = modules/kirby-plugin-kirbytextRaw
|
|
||||||
url = https://github.com/jbeyerstedt/kirby-plugin-kirbytextRaw
|
|
||||||
[submodule "modules/kirby-site-snippets"]
|
[submodule "modules/kirby-site-snippets"]
|
||||||
path = modules/kirby-site-snippets
|
path = modules/kirby-site-snippets
|
||||||
url = https://github.com/jbeyerstedt/kirby-site-snippets.git
|
url = https://github.com/jbeyerstedt/kirby-site-snippets.git
|
||||||
|
@ -22,13 +10,7 @@
|
||||||
[submodule "assets/vendors/masonry"]
|
[submodule "assets/vendors/masonry"]
|
||||||
path = assets/vendors/masonry
|
path = assets/vendors/masonry
|
||||||
url = https://github.com/desandro/masonry.git
|
url = https://github.com/desandro/masonry.git
|
||||||
[submodule "modules/kirby-kirbytag-html5video"]
|
|
||||||
path = modules/kirby-kirbytag-html5video
|
|
||||||
url = https://github.com/jbeyerstedt/kirby-kirbytag-html5video.git
|
|
||||||
[submodule "assets/vendors/bootstrap"]
|
[submodule "assets/vendors/bootstrap"]
|
||||||
path = assets/vendors/bootstrap
|
path = assets/vendors/bootstrap
|
||||||
url = https://github.com/twbs/bootstrap.git
|
url = https://github.com/twbs/bootstrap.git
|
||||||
branch = v4-dev
|
branch = v4-dev
|
||||||
[submodule "modules/columns-plugin"]
|
|
||||||
path = modules/columns-plugin
|
|
||||||
url = https://github.com/getkirby-v2/columns-plugin
|
|
||||||
|
|
98
.htaccess
98
.htaccess
|
@ -1,26 +1,39 @@
|
||||||
# Kirby .htaccess
|
# Kirby .htaccess
|
||||||
|
# revision 2020-06-15
|
||||||
|
|
||||||
|
# rewrite rules
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
|
|
||||||
|
# enable awesome urls. i.e.:
|
||||||
|
# http://yourdomain.com/about-us/team
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
|
||||||
|
# make sure to set the RewriteBase correctly
|
||||||
|
# if you are running the site in a subfolder;
|
||||||
|
# otherwise links or the entire site will break.
|
||||||
|
#
|
||||||
|
# If your homepage is http://yourdomain.com/mysite,
|
||||||
|
# set the RewriteBase to:
|
||||||
|
#
|
||||||
|
# RewriteBase /mysite
|
||||||
|
|
||||||
|
# In some environments it's necessary to
|
||||||
|
# set the RewriteBase to:
|
||||||
|
#
|
||||||
RewriteBase /
|
RewriteBase /
|
||||||
|
|
||||||
# block text files in the content folder from being accessed directly
|
# block files and folders beginning with a dot, such as .git
|
||||||
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
|
# except for the .well-known folder, which is used for Let's Encrypt and security.txt
|
||||||
|
RewriteRule (^|/)\.(?!well-known\/) index.php [L]
|
||||||
|
|
||||||
|
# block all files in the content folder from being accessed directly
|
||||||
|
RewriteRule ^content/(.*) index.php [L]
|
||||||
|
|
||||||
# block all files in the site folder from being accessed directly
|
# block all files in the site folder from being accessed directly
|
||||||
# except for requests to plugin assets files
|
|
||||||
RewriteRule ^assets/plugins/([a-zA-Z0-9\.\-_%=]+)/(.*)$ site/plugins/$1/assets/$2 [L,N]
|
|
||||||
RewriteCond $1 !^plugins/[a-zA-Z0-9\.\-_%=]+/assets/.*
|
|
||||||
RewriteRule ^site/(.*) index.php [L]
|
RewriteRule ^site/(.*) index.php [L]
|
||||||
|
|
||||||
# block direct access to kirby and the panel sources
|
# block direct access to Kirby and the Panel sources
|
||||||
RewriteRule ^(kirby|panel\/app|panel\/tests)/(.*) index.php [L]
|
RewriteRule ^kirby/(.*) index.php [L]
|
||||||
|
|
||||||
# make panel links work
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteRule ^panel/(.*) panel/index.php [L]
|
|
||||||
|
|
||||||
# make site links work
|
# make site links work
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
@ -29,57 +42,16 @@ RewriteRule ^(.*) index.php [L]
|
||||||
|
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
# pass the Authorization header to PHP
|
||||||
|
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||||
|
|
||||||
# block update scripts
|
# compress text file responses
|
||||||
RewriteRule ^(.*).sh$ error [R=301,L]
|
|
||||||
|
|
||||||
# block git repo
|
|
||||||
RewriteRule ^.git/(.*) error [R=301,L]
|
|
||||||
RewriteRule ^.gitattributes error [R=301,L]
|
|
||||||
RewriteRule ^.gitignore error [R=301,L]
|
|
||||||
RewriteRule ^.gitmodules error [R=301,L]
|
|
||||||
|
|
||||||
|
|
||||||
# enable gzip compressed transfer
|
|
||||||
<IfModule mod_deflate.c>
|
<IfModule mod_deflate.c>
|
||||||
SetOutputFilter DEFLATE
|
AddOutputFilterByType DEFLATE text/plain
|
||||||
<IfModule mod_setenvif.c>
|
AddOutputFilterByType DEFLATE text/html
|
||||||
# Netscape 4.x has some problems...
|
AddOutputFilterByType DEFLATE text/css
|
||||||
BrowserMatch ^Mozilla/4 gzip-only-text/html
|
AddOutputFilterByType DEFLATE text/javascript
|
||||||
|
AddOutputFilterByType DEFLATE application/json
|
||||||
# Netscape 4.06-4.08 have some more problems
|
AddOutputFilterByType DEFLATE application/javascript
|
||||||
BrowserMatch ^Mozilla/4\.0[678] no-gzip
|
AddOutputFilterByType DEFLATE application/x-javascript
|
||||||
|
|
||||||
# Don't compress images
|
|
||||||
#SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
<IfModule mod_headers.c>
|
|
||||||
# Make sure proxies don't deliver the wrong content
|
|
||||||
Header append Vary User-Agent env=!dont-vary
|
|
||||||
</IfModule>
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
# enable browser caching headers
|
|
||||||
AddType image/svg+xml .svg
|
|
||||||
AddType application/vnd.ms-fontobject .eot
|
|
||||||
AddType application/x-font-opentype .otf
|
|
||||||
AddType application/x-font-ttf .ttf
|
|
||||||
AddType application/font-woff .woff
|
|
||||||
<IfModule mod_expires.c>
|
|
||||||
ExpiresActive On
|
|
||||||
ExpiresDefault "access plus 1 seconds"
|
|
||||||
ExpiresByType text/html "access plus 1 hour"
|
|
||||||
ExpiresByType text/xml "access plus 1 hour"
|
|
||||||
ExpiresByType text/css "access plus 1 month"
|
|
||||||
ExpiresByType image/gif "access plus 1 year"
|
|
||||||
ExpiresByType image/jpeg "access plus 1 year"
|
|
||||||
ExpiresByType image/png "access plus 1 year"
|
|
||||||
ExpiresByType image/svg+xml "access plus 1 year"
|
|
||||||
ExpiresByType text/javascript "access plus 1 month"
|
|
||||||
ExpiresByType application/javascript "access plus 1 month"
|
|
||||||
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
|
|
||||||
ExpiresByType application/x-font-opentype "access plus 1 year"
|
|
||||||
ExpiresByType application/x-font-ttf "access plus 1 year"
|
|
||||||
ExpiresByType application/font-woff "access plus 1 year"
|
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -310,61 +310,30 @@ $header_height: 2*$header_logoPadg + $header_logoSize + 4px; // + weird "padding
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* KIRBY PLUGIN columns by Bastians Allgeier
|
* KIRBY PLUGIN columns
|
||||||
*/
|
*/
|
||||||
$cols-breakdown-width: 600px;
|
$cols-breakdown-width: 600px;
|
||||||
$cols-pad: 15px;
|
$cols-pad: 15px;
|
||||||
.columns {
|
.columns {
|
||||||
margin-right: -$cols-pad;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
margin-left: -$cols-pad;
|
margin-left: -$cols-pad;
|
||||||
|
margin-right: -$cols-pad;
|
||||||
&:before {
|
|
||||||
display: table;
|
|
||||||
content: " ";
|
|
||||||
}
|
|
||||||
&:after {
|
|
||||||
clear: both;
|
|
||||||
display: table;
|
|
||||||
content: " ";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.column {
|
.column {
|
||||||
padding-right: $cols-pad;
|
flex: 0 1 100%;
|
||||||
padding-left: $cols-pad;
|
margin-left: $cols-pad;
|
||||||
|
margin-right: $cols-pad;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
display: block;
|
@media (min-width: $cols-breakdown-width) {
|
||||||
float: left;
|
.column {
|
||||||
position: relative;
|
flex: 1;
|
||||||
min-height: 1px;
|
|
||||||
}
|
|
||||||
.columns-1 .column {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.columns-2 .column {
|
|
||||||
width: 50%;
|
|
||||||
|
|
||||||
@media(max-width: $cols-breakdown-width) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.columns-3 .column {
|
|
||||||
width: 33.33%;
|
|
||||||
@media(max-width: $cols-breakdown-width) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.columns-4 .column {
|
|
||||||
width: 25%;
|
|
||||||
@media(max-width: $cols-breakdown-width*2) {
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
@media(max-width: $cols-breakdown-width) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.columns-5 .column {
|
|
||||||
width: 20%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* to break down col-xs */
|
/* to break down col-xs */
|
||||||
|
|
15
index.php
15
index.php
|
@ -1,16 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('DS', DIRECTORY_SEPARATOR);
|
require 'kirby/bootstrap.php';
|
||||||
|
|
||||||
// load kirby
|
echo (new Kirby)->render();
|
||||||
require(__DIR__ . DS . 'kirby' . DS . 'bootstrap.php');
|
|
||||||
|
|
||||||
// check for a custom site.php
|
|
||||||
if(file_exists(__DIR__ . DS . 'site.php')) {
|
|
||||||
require(__DIR__ . DS . 'site.php');
|
|
||||||
} else {
|
|
||||||
$kirby = kirby();
|
|
||||||
}
|
|
||||||
|
|
||||||
// render
|
|
||||||
echo $kirby->launch();
|
|
||||||
|
|
2
kirby
2
kirby
|
@ -1 +1 @@
|
||||||
Subproject commit e3bc4e4277859249cff1a67c333a5544766cad31
|
Subproject commit 551e2f427eaf18e471df1c304552ab3de35e37c6
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 57b4ccd2c12db25860baa8d3486bf42cacce05a6
|
|
28
modules/columns-plugin/index.php
Normal file
28
modules/columns-plugin/index.php
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
# from https://getkirby.com/docs/cookbook/extensions/columns-in-kirbytext
|
||||||
|
# copied at 2021-01-23
|
||||||
|
|
||||||
|
Kirby::plugin('kirby/columns', [
|
||||||
|
'hooks' => [
|
||||||
|
'kirbytags:before' => function ($text, array $data = []) {
|
||||||
|
|
||||||
|
$text = preg_replace_callback('!\(columns(…|\.{3})\)(.*?)\((…|\.{3})columns\)!is', function($matches) use($text, $data) {
|
||||||
|
|
||||||
|
$columns = preg_split('!(\n|\r\n)\+{4}\s+(\n|\r\n)!', $matches[2]);
|
||||||
|
$html = [];
|
||||||
|
$classItem = $this->option('kirby.columns.item', 'column');
|
||||||
|
$classContainer = $this->option('kirby.columns.container', 'columns');
|
||||||
|
|
||||||
|
foreach ($columns as $column) {
|
||||||
|
$html[] = '<div class="' . $classItem . '">' . $this->kirbytext($column, $data) . '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return '<div class="' . $classContainer . '">' . implode($html) . '</div>';
|
||||||
|
|
||||||
|
}, $text);
|
||||||
|
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
]);
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 81564cfc343f733e47012895ed249bb69f99b96c
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 9cf8c1e749efdedb3b21c8bc31535bbfbb7a68e9
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit d222f4f02eef5574dd7850b40391f86688283f27
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5b56892014a01e3e4f602576e4912c54da911648
|
Subproject commit c17f1c4d6ac66326ca481df8e0ecf720efc29e05
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit b9639427e03917b1ac8bb3cd7c35a61fa90b839e
|
|
1
panel
1
panel
|
@ -1 +0,0 @@
|
||||||
Subproject commit 31a79539294c24f636d2f3af004aa2576eb59040
|
|
|
@ -26,8 +26,7 @@ Im Folgenden wird `$git-url` als Platzhalter für die echte Git-URL verwendet.
|
||||||
git clone --recursive $git-url /path/to/documentroot
|
git clone --recursive $git-url /path/to/documentroot
|
||||||
cd /path/to/documentroot
|
cd /path/to/documentroot
|
||||||
mkdir content
|
mkdir content
|
||||||
mkdir thumbs
|
mkdir media
|
||||||
mkdir site/accounts
|
|
||||||
mkdir site/cache
|
mkdir site/cache
|
||||||
````
|
````
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
title: Blog
|
|
||||||
pages:
|
|
||||||
template:
|
|
||||||
- blogarticle
|
|
||||||
num: date
|
|
||||||
sort: flip
|
|
||||||
|
|
||||||
files: false
|
|
||||||
|
|
||||||
fields:
|
|
||||||
title:
|
|
||||||
label: Title
|
|
||||||
type: text
|
|
||||||
text:
|
|
||||||
label: Text
|
|
||||||
type: textarea
|
|
|
@ -1,29 +0,0 @@
|
||||||
title: Blog Article
|
|
||||||
pages: false
|
|
||||||
|
|
||||||
files: true
|
|
||||||
|
|
||||||
fields:
|
|
||||||
title:
|
|
||||||
label: Title
|
|
||||||
type: text
|
|
||||||
date:
|
|
||||||
label: Date
|
|
||||||
type: date
|
|
||||||
width: 1/4
|
|
||||||
tags:
|
|
||||||
label: Tags
|
|
||||||
type: tags
|
|
||||||
width: 3/4
|
|
||||||
text:
|
|
||||||
label: Text
|
|
||||||
type: textarea
|
|
||||||
en_masonry:
|
|
||||||
text: enable masonry
|
|
||||||
type: checkbox
|
|
||||||
text2:
|
|
||||||
label: Text below masonry
|
|
||||||
type: textarea
|
|
||||||
meta-robots:
|
|
||||||
label: Metatag robots
|
|
||||||
type: text
|
|
|
@ -1,47 +0,0 @@
|
||||||
<?php if(!defined('KIRBY')) exit ?>
|
|
||||||
|
|
||||||
# carousel pseudo-site blueprint
|
|
||||||
|
|
||||||
title: Foto-Diashow
|
|
||||||
pages: false
|
|
||||||
preview: parent
|
|
||||||
files:
|
|
||||||
sortable: true
|
|
||||||
fields:
|
|
||||||
title:
|
|
||||||
label: Titel (z.Zt. nicht benutzt)
|
|
||||||
type: text
|
|
||||||
heading:
|
|
||||||
label: Bildüberschrift
|
|
||||||
type: text
|
|
||||||
caption:
|
|
||||||
label: Bildtext
|
|
||||||
type: textarea
|
|
||||||
header1: h3
|
|
||||||
header2: h4
|
|
||||||
options:
|
|
||||||
preview: true
|
|
||||||
status: false
|
|
||||||
template: false
|
|
||||||
url: false
|
|
||||||
delete: true
|
|
||||||
|
|
||||||
fields:
|
|
||||||
info:
|
|
||||||
label: HINWEIS
|
|
||||||
type: info
|
|
||||||
text: >
|
|
||||||
Auf dieser "Seite" werden die Bilder abgelegt, die in der großen Bildergalerie oben auf der Seite dargestellt werden sollen.
|
|
||||||
Dabei sind ein paar Dinge zu beachten:<br>
|
|
||||||
- Alle Bilder müssen dasselbe Seitenverhältnis haben, wenigstens jedoch im **Querformat** vorliegen.<br>
|
|
||||||
- Diese Seite muss die unter der URL "carousel" abgelegt sein.<br>
|
|
||||||
- Wenn die Bildergalerie leer bleiben soll, muss diese Seite nicht gelöscht werden, sondern kann auch einfach keine Bilder enthalten.<br>
|
|
||||||
- Die Reihenfolge der Bilder kann unter "Dateien -> bearbeiten" angepasst werden.<br>
|
|
||||||
- Um ein Bild mit einer Bildüberschrift zu versehen, einfach die Datei auswählen und die entsprechenden Felder bearbeiten. Speichern nicht vergessen.<br>
|
|
||||||
- HINWEIS: Bei sehr großen Bildern kann es vorkommen, dass keine Vorschau angezeigt wird.
|
|
||||||
|
|
||||||
title:
|
|
||||||
label:
|
|
||||||
en: Title (has no fuction)
|
|
||||||
de: Seitenüberschrift (hat keine Funktion)
|
|
||||||
type: text
|
|
|
@ -1,12 +0,0 @@
|
||||||
title: default Page
|
|
||||||
pages: true
|
|
||||||
|
|
||||||
files: true
|
|
||||||
|
|
||||||
fields:
|
|
||||||
title:
|
|
||||||
label: Title
|
|
||||||
type: text
|
|
||||||
text:
|
|
||||||
label: Text
|
|
||||||
type: textarea
|
|
14
site/blueprints/files/default.yml
Normal file
14
site/blueprints/files/default.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
Title: File
|
||||||
|
|
||||||
|
fields:
|
||||||
|
alt:
|
||||||
|
label: Alt Text
|
||||||
|
type: text
|
||||||
|
heading:
|
||||||
|
label: Bildüberschrift
|
||||||
|
type: text
|
||||||
|
caption:
|
||||||
|
label: Bildtext
|
||||||
|
type: textarea
|
||||||
|
header1: h3
|
||||||
|
header2: h4
|
|
@ -1,18 +0,0 @@
|
||||||
title: Home
|
|
||||||
pages: true
|
|
||||||
|
|
||||||
files: true
|
|
||||||
|
|
||||||
fields:
|
|
||||||
title:
|
|
||||||
label: Title
|
|
||||||
type: text
|
|
||||||
hero_text:
|
|
||||||
label: main text
|
|
||||||
type: textarea
|
|
||||||
subtitle:
|
|
||||||
label: subtitle
|
|
||||||
type: text
|
|
||||||
text:
|
|
||||||
label: text
|
|
||||||
type: textarea
|
|
32
site/blueprints/pages/blog.yml
Normal file
32
site/blueprints/pages/blog.yml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
title: Blog
|
||||||
|
|
||||||
|
columns:
|
||||||
|
main:
|
||||||
|
width: 2/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
content:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
text:
|
||||||
|
label: Text
|
||||||
|
type: textarea
|
||||||
|
|
||||||
|
sidebar:
|
||||||
|
width: 1/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
drafts:
|
||||||
|
headline: Drafts
|
||||||
|
type: pages
|
||||||
|
status: draft
|
||||||
|
create:
|
||||||
|
- blogarticle
|
||||||
|
|
||||||
|
published:
|
||||||
|
headline: Published Articles
|
||||||
|
type: pages
|
||||||
|
status: listed
|
||||||
|
sortBy: date desc
|
||||||
|
|
||||||
|
files: false
|
39
site/blueprints/pages/blogarticle.yml
Normal file
39
site/blueprints/pages/blogarticle.yml
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
title: Blog Article
|
||||||
|
|
||||||
|
num: '{{ page.date.toDate("Ymd") }}'
|
||||||
|
|
||||||
|
columns:
|
||||||
|
main:
|
||||||
|
width: 2/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
content:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
date:
|
||||||
|
label: Date
|
||||||
|
type: date
|
||||||
|
width: 1/4
|
||||||
|
tags:
|
||||||
|
label: Tags
|
||||||
|
type: tags
|
||||||
|
width: 3/4
|
||||||
|
text:
|
||||||
|
label: Text
|
||||||
|
type: textarea
|
||||||
|
en_masonry:
|
||||||
|
label: Masonry
|
||||||
|
type: toggle
|
||||||
|
text: enable
|
||||||
|
text2:
|
||||||
|
label: Text below masonry
|
||||||
|
type: textarea
|
||||||
|
meta-robots:
|
||||||
|
label: Metatag robots
|
||||||
|
type: text
|
||||||
|
|
||||||
|
sidebar:
|
||||||
|
width: 1/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
files: true
|
21
site/blueprints/pages/default.yml
Normal file
21
site/blueprints/pages/default.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
title: default Page
|
||||||
|
|
||||||
|
columns:
|
||||||
|
main:
|
||||||
|
width: 2/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
content:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
text:
|
||||||
|
label: Text
|
||||||
|
type: textarea
|
||||||
|
|
||||||
|
sidebar:
|
||||||
|
width: 1/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
pages: true
|
||||||
|
|
||||||
|
files: true
|
28
site/blueprints/pages/home.yml
Normal file
28
site/blueprints/pages/home.yml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
title: Home
|
||||||
|
|
||||||
|
columns:
|
||||||
|
main:
|
||||||
|
width: 2/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
content:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
hero_text:
|
||||||
|
label: main text
|
||||||
|
type: textarea
|
||||||
|
subtitle:
|
||||||
|
label: subtitle
|
||||||
|
type: text
|
||||||
|
text:
|
||||||
|
label: text
|
||||||
|
type: textarea
|
||||||
|
|
||||||
|
|
||||||
|
sidebar:
|
||||||
|
width: 1/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
pages: true
|
||||||
|
|
||||||
|
files: true
|
44
site/blueprints/pages/photo.yml
Normal file
44
site/blueprints/pages/photo.yml
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
title: Photo
|
||||||
|
|
||||||
|
tabs:
|
||||||
|
content:
|
||||||
|
label: Content
|
||||||
|
icon: text
|
||||||
|
columns:
|
||||||
|
main:
|
||||||
|
width: 2/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
content:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
text:
|
||||||
|
label: Text
|
||||||
|
type: textarea
|
||||||
|
text2:
|
||||||
|
label: Text below masonry
|
||||||
|
type: textarea
|
||||||
|
|
||||||
|
sidebar:
|
||||||
|
width: 1/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
carousel:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
carousel:
|
||||||
|
label: Carousel
|
||||||
|
type: files
|
||||||
|
query: page.images
|
||||||
|
max: 10
|
||||||
|
|
||||||
|
masonry:
|
||||||
|
label: Images
|
||||||
|
icon: image
|
||||||
|
sections:
|
||||||
|
gallery:
|
||||||
|
headline: Masonry
|
||||||
|
type: files
|
||||||
|
layout: cards
|
||||||
|
limit: 50
|
||||||
|
sortable: false
|
37
site/blueprints/pages/project.yml
Normal file
37
site/blueprints/pages/project.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
title: Project
|
||||||
|
|
||||||
|
columns:
|
||||||
|
main:
|
||||||
|
width: 2/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
content:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
exrpt_img:
|
||||||
|
label: Excerpt image
|
||||||
|
type: files
|
||||||
|
multiple: false
|
||||||
|
width: 1/2
|
||||||
|
exrpt_text:
|
||||||
|
label: Excerpt for overview
|
||||||
|
type: textarea
|
||||||
|
width: 1/2
|
||||||
|
text:
|
||||||
|
label: Text
|
||||||
|
type: textarea
|
||||||
|
en_masonry:
|
||||||
|
label: Masonry
|
||||||
|
type: toggle
|
||||||
|
text: enable
|
||||||
|
text2:
|
||||||
|
label: Text below masonry
|
||||||
|
type: textarea
|
||||||
|
|
||||||
|
sidebar:
|
||||||
|
width: 1/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
pages: false
|
||||||
|
|
||||||
|
files: true
|
23
site/blueprints/pages/projects.yml
Normal file
23
site/blueprints/pages/projects.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
title: Projects
|
||||||
|
|
||||||
|
columns:
|
||||||
|
main:
|
||||||
|
width: 2/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
content:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
text:
|
||||||
|
label: Text
|
||||||
|
type: textarea
|
||||||
|
|
||||||
|
sidebar:
|
||||||
|
width: 1/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
pages:
|
||||||
|
type: pages
|
||||||
|
create: project
|
||||||
|
|
||||||
|
files: true
|
29
site/blueprints/pages/redirect.yml
Normal file
29
site/blueprints/pages/redirect.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
title: redirect
|
||||||
|
|
||||||
|
columns:
|
||||||
|
main:
|
||||||
|
width: 2/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
content:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
target:
|
||||||
|
label: Target
|
||||||
|
type: pages
|
||||||
|
multiple: false
|
||||||
|
red_type:
|
||||||
|
label: Redirect Type
|
||||||
|
type: radio
|
||||||
|
default: temporarly
|
||||||
|
options:
|
||||||
|
temp: temporarly (302)
|
||||||
|
perm: permanent (301)
|
||||||
|
|
||||||
|
sidebar:
|
||||||
|
width: 1/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
pages: true
|
||||||
|
|
||||||
|
files: true
|
33
site/blueprints/pages/webdesign.yml
Normal file
33
site/blueprints/pages/webdesign.yml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
title: Webdesign
|
||||||
|
|
||||||
|
columns:
|
||||||
|
main:
|
||||||
|
width: 2/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
content:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
featurette_headline:
|
||||||
|
label: Featurette Headline
|
||||||
|
type: text
|
||||||
|
featurette_text:
|
||||||
|
label: Featurette Text
|
||||||
|
type: textarea
|
||||||
|
width: 1/2
|
||||||
|
featurette_img:
|
||||||
|
label: Featurette Image
|
||||||
|
type: files
|
||||||
|
multiple: false
|
||||||
|
width: 1/2
|
||||||
|
text:
|
||||||
|
label: Text
|
||||||
|
type: textarea
|
||||||
|
|
||||||
|
sidebar:
|
||||||
|
width: 1/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
pages: true
|
||||||
|
|
||||||
|
files: true
|
1
site/blueprints/pages/xmlsitemap.yml
Symbolic link
1
site/blueprints/pages/xmlsitemap.yml
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../modules/kirby-template-sitemap/blueprints/xmlsitemap.yml
|
|
@ -1,22 +0,0 @@
|
||||||
title: Photo
|
|
||||||
pages:
|
|
||||||
build:
|
|
||||||
- title: carousel
|
|
||||||
uid: carousel
|
|
||||||
template: carousel
|
|
||||||
template:
|
|
||||||
- photo
|
|
||||||
- carousel
|
|
||||||
|
|
||||||
files: true
|
|
||||||
|
|
||||||
fields:
|
|
||||||
title:
|
|
||||||
label: Title
|
|
||||||
type: text
|
|
||||||
text:
|
|
||||||
label: Text
|
|
||||||
type: textarea
|
|
||||||
text2:
|
|
||||||
label: Text below masonry
|
|
||||||
type: textarea
|
|
|
@ -1,28 +0,0 @@
|
||||||
title: Project
|
|
||||||
pages:
|
|
||||||
template:
|
|
||||||
- project
|
|
||||||
|
|
||||||
files: true
|
|
||||||
|
|
||||||
fields:
|
|
||||||
title:
|
|
||||||
label: Title
|
|
||||||
type: text
|
|
||||||
exrpt_img:
|
|
||||||
label: Excerpt image
|
|
||||||
type: image
|
|
||||||
width: 1/2
|
|
||||||
exrpt_text:
|
|
||||||
label: Excerpt for overview
|
|
||||||
type: textarea
|
|
||||||
width: 1/2
|
|
||||||
text:
|
|
||||||
label: Text
|
|
||||||
type: textarea
|
|
||||||
en_masonry:
|
|
||||||
type: checkbox
|
|
||||||
text: Enable masonry
|
|
||||||
text2:
|
|
||||||
label: Text below masonry
|
|
||||||
type: textarea
|
|
|
@ -1,14 +0,0 @@
|
||||||
title: Projects
|
|
||||||
pages:
|
|
||||||
template:
|
|
||||||
- project
|
|
||||||
|
|
||||||
files: true
|
|
||||||
|
|
||||||
fields:
|
|
||||||
title:
|
|
||||||
label: Title
|
|
||||||
type: text
|
|
||||||
text:
|
|
||||||
label: Text
|
|
||||||
type: textarea
|
|
|
@ -1,19 +0,0 @@
|
||||||
title: redirect
|
|
||||||
pages: true
|
|
||||||
|
|
||||||
files: false
|
|
||||||
|
|
||||||
fields:
|
|
||||||
title:
|
|
||||||
label: Title (not used)
|
|
||||||
type: text
|
|
||||||
target:
|
|
||||||
label: Target
|
|
||||||
type: page
|
|
||||||
red_type:
|
|
||||||
label: Redirect Type
|
|
||||||
type: radio
|
|
||||||
default: temporarly
|
|
||||||
options:
|
|
||||||
temp: temporarly (302)
|
|
||||||
perm: permanent (301)
|
|
|
@ -1,16 +1,11 @@
|
||||||
Title: Site
|
columns:
|
||||||
pages:
|
main:
|
||||||
template:
|
width: 2/3
|
||||||
- default
|
sections:
|
||||||
- redirect
|
|
||||||
|
|
||||||
fields:
|
|
||||||
title:
|
|
||||||
label:
|
|
||||||
en: Title (shown in browser tab)
|
|
||||||
de: Titel der Website (im Browser Tab)
|
|
||||||
type: text
|
|
||||||
|
|
||||||
|
content:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
author:
|
author:
|
||||||
label:
|
label:
|
||||||
en: Author (for meta data)
|
en: Author (for meta data)
|
||||||
|
@ -26,28 +21,41 @@ fields:
|
||||||
|
|
||||||
title_image:
|
title_image:
|
||||||
label:
|
label:
|
||||||
en: header image / logo (drag and drop)
|
en: Header image / logo (drag and drop)
|
||||||
de: Logo für Kopf der Seite (drag and drop)
|
de: Logo für Kopf der Seite (drag and drop)
|
||||||
type: image
|
type: files
|
||||||
|
multiple: false
|
||||||
|
|
||||||
line:
|
line:
|
||||||
type: line
|
type: line
|
||||||
|
|
||||||
footer_left:
|
footer_left:
|
||||||
label:
|
label:
|
||||||
en: footer left
|
en: Footer left
|
||||||
de: Footer links
|
de: Footer links
|
||||||
type: textarea
|
type: textarea
|
||||||
width: 1/3
|
width: 1/3
|
||||||
footer_center:
|
footer_center:
|
||||||
label:
|
label:
|
||||||
en: footer center
|
en: Footer center
|
||||||
de: Footer Mitte
|
de: Footer Mitte
|
||||||
type: textarea
|
type: textarea
|
||||||
width: 1/3
|
width: 1/3
|
||||||
footer_right:
|
footer_right:
|
||||||
label:
|
label:
|
||||||
en: footer right
|
en: Footer right
|
||||||
de: Footer rechts
|
de: Footer rechts
|
||||||
type: textarea
|
type: textarea
|
||||||
width: 1/3
|
width: 1/3
|
||||||
|
|
||||||
|
sidebar:
|
||||||
|
width: 1/3
|
||||||
|
sections:
|
||||||
|
|
||||||
|
pages:
|
||||||
|
type: pages
|
||||||
|
create:
|
||||||
|
- default
|
||||||
|
- redirect
|
||||||
|
|
||||||
|
files: true
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
title: Webdesign
|
|
||||||
pages: true
|
|
||||||
|
|
||||||
files: true
|
|
||||||
|
|
||||||
fields:
|
|
||||||
title:
|
|
||||||
label: Title
|
|
||||||
type: text
|
|
||||||
featurette_headline:
|
|
||||||
label: Featurette Headline
|
|
||||||
type: text
|
|
||||||
featurette_text:
|
|
||||||
label: Featurette Text
|
|
||||||
type: textarea
|
|
||||||
width: 1/2
|
|
||||||
featurette_img:
|
|
||||||
label: Featurette Image
|
|
||||||
type: image
|
|
||||||
width: 1/2
|
|
||||||
text:
|
|
||||||
label: Text
|
|
||||||
type: textarea
|
|
|
@ -1 +0,0 @@
|
||||||
../../modules/kirby-template-sitemap/blueprints/xmlsitemap.php
|
|
|
@ -4,10 +4,3 @@
|
||||||
c::set('debug', true);
|
c::set('debug', true);
|
||||||
|
|
||||||
c::set('cache', false);
|
c::set('cache', false);
|
||||||
|
|
||||||
c::set('ssl', false);
|
|
||||||
|
|
||||||
/*
|
|
||||||
Piwik Plugin configuration
|
|
||||||
*/
|
|
||||||
c::set('spicy.piwik.active', false);
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
if(!function_exists('panel')) {
|
if(!function_exists('panel')) {
|
||||||
header("Content-Security-Policy: default-src 'self'; style-src 'self' 'nonce-nRfqpuKWNuYyUAFPTr6WVNZk9' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; frame-src https://www.youtube-nocookie.com; script-src 'self' 'unsafe-eval' 'nonce-nRfqpuKWNuYyUAFPTr6WVNZk9' 'unsafe-inline' https://jannikb.aquila.uberspace.de/piwik/; img-src 'self' data: https://jannikb.aquila.uberspace.de/piwik/");
|
## script-src unsafe-inline is needed for kirby panel
|
||||||
|
header("Content-Security-Policy: default-src 'self'; style-src 'self' 'nonce-nRfqpuKWNuYyUAFPTr6WVNZk9'; script-src 'self' 'unsafe-inline'; img-src 'self' data:");
|
||||||
}
|
}
|
||||||
//header("X-Content-Type-Options: nosniff"); // enabled at server-side
|
//header("X-Content-Type-Options: nosniff"); // enabled at server-side
|
||||||
//header("X-Frame-Options: deny"); // enabled at server-side
|
//header("X-Frame-Options: deny"); // enabled at server-side
|
||||||
|
@ -8,11 +9,6 @@ if(!function_exists('panel')) {
|
||||||
header("Strict-Transport-Security: max-age=31536000");
|
header("Strict-Transport-Security: max-age=31536000");
|
||||||
header("Referrer-Policy: no-referrer");
|
header("Referrer-Policy: no-referrer");
|
||||||
|
|
||||||
/*
|
|
||||||
License Setup
|
|
||||||
*/
|
|
||||||
c::set('license', 'K2-PRO-153c9c6accc73d9547e255a0daba8911');
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Kirby Configuration
|
Kirby Configuration
|
||||||
*/
|
*/
|
||||||
|
@ -24,16 +20,12 @@ c::set('smartypants.attr', 2); // -- for en-dash, --- for em-dash
|
||||||
c::set('smartypants.doublequote.open', '„');
|
c::set('smartypants.doublequote.open', '„');
|
||||||
c::set('smartypants.doublequote.close', '“');
|
c::set('smartypants.doublequote.close', '“');
|
||||||
|
|
||||||
c::set('ssl', true);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Modules Configuration
|
Modules Configuration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// plg-carousel
|
// plg-carousel
|
||||||
c::set('plg_carousel.enable', true);
|
c::set('plg_carousel.class', 'carousel-fade'); // additional class on top-most div
|
||||||
c::set('plg_carousel.sort', 'sort'); // sortBy parameter: sort, title, etc.
|
|
||||||
c::set('plg_carousel.dir', 'asc'); // sortBy direction: asc, desc
|
|
||||||
|
|
||||||
// plg-masonry
|
// plg-masonry
|
||||||
c::set('plg_masonry.enable', true);
|
c::set('plg_masonry.enable', true);
|
||||||
|
@ -45,25 +37,18 @@ c::set('plg_masonry.sort', 'sort'); // sortBy parameter: sort, title, etc.
|
||||||
c::set('plg_masonry.dir', 'asc'); // sortBy direction: asc, desc
|
c::set('plg_masonry.dir', 'asc'); // sortBy direction: asc, desc
|
||||||
c::set('plg_masonry.lightbox', 'swipebox');
|
c::set('plg_masonry.lightbox', 'swipebox');
|
||||||
|
|
||||||
// bastians columns.php plugin from https://github.com/getkirby/plugins/tree/master/columns
|
// columns plugin
|
||||||
//c::set('columns.container', 'row');
|
//c::set('kirby.columns.container', 'columns');
|
||||||
//c::set('columns.item', 'col-sm-6 columns');
|
//c::set('kirby.columns.item', 'column');
|
||||||
|
|
||||||
// enhanced sitemap by Jannik Beyerstedt:
|
// enhanced sitemap by Jannik Beyerstedt:
|
||||||
c::set('smap_ignoreSite', array('sitemap', 'error', 'home', 'qr', 'secret', 'test'));
|
c::set('smap_ignoreSite', array('sitemap', 'error', 'home', 'qr', 'secret', 'test'));
|
||||||
c::set('smap_ignoreTemplate', array('carousel', 'redirect'));
|
c::set('smap_ignoreTemplate', array('redirect'));
|
||||||
c::set('smap_showHiddenPagesAtRootLevel', true);
|
c::set('smap_showHiddenPagesAtRootLevel', true);
|
||||||
c::set('smap_heading_visible', 'Hauptmenü');
|
c::set('smap_heading_visible', 'Hauptmenü');
|
||||||
c::set('smap_heading_invisible', 'weitere Seiten');
|
c::set('smap_heading_invisible', 'weitere Seiten');
|
||||||
//c::set('smap_column_class_id', 'class="foo" id="bar"');
|
//c::set('smap_column_class_id', 'class="foo" id="bar"');
|
||||||
|
|
||||||
/*
|
|
||||||
Piwik Plugin configuration
|
|
||||||
*/
|
|
||||||
c::set('spicy.piwik.active', false); /* cookie notice needed! */
|
|
||||||
c::set('spicy.piwik.url', 'https://jannikb.aquila.uberspace.de/piwik');
|
|
||||||
c::set('spicy.piwik.id', 2);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Routes
|
Routes
|
||||||
*/
|
*/
|
||||||
|
@ -73,21 +58,5 @@ c::set('routes', array(
|
||||||
'action' => function() {
|
'action' => function() {
|
||||||
return site()->visit('sitemap');
|
return site()->visit('sitemap');
|
||||||
}
|
}
|
||||||
),
|
|
||||||
|
|
||||||
// redirect legacy urls:
|
|
||||||
// feature/webdesign -> webdesign
|
|
||||||
// feature/fotografie -> fotografie
|
|
||||||
// feature/fotografie/(:any) -> fotografie/(:any)
|
|
||||||
array(
|
|
||||||
'pattern' => 'feature/(:all)',
|
|
||||||
'action' => function($uid) {
|
|
||||||
if (site()->find($uid)) {
|
|
||||||
$target = site()->find($uid)->url();
|
|
||||||
header::redirect($target, 301);
|
|
||||||
}else {
|
|
||||||
go('error');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../modules/columns-plugin
|
|
27
site/plugins/columns/index.php
Normal file
27
site/plugins/columns/index.php
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
# copied at 2021-01-23 from https://getkirby.com/docs/cookbook/extensions/columns-in-kirbytext
|
||||||
|
|
||||||
|
Kirby::plugin('kirby/columns', [
|
||||||
|
'hooks' => [
|
||||||
|
'kirbytags:before' => function ($text, array $data = []) {
|
||||||
|
|
||||||
|
$text = preg_replace_callback('!\(columns(…|\.{3})\)(.*?)\((…|\.{3})columns\)!is', function($matches) use($text, $data) {
|
||||||
|
|
||||||
|
$columns = preg_split('!(\n|\r\n)\+{4}\s+(\n|\r\n)!', $matches[2]);
|
||||||
|
$html = [];
|
||||||
|
$classItem = $this->option('kirby.columns.item', 'column');
|
||||||
|
$classContainer = $this->option('kirby.columns.container', 'columns');
|
||||||
|
|
||||||
|
foreach ($columns as $column) {
|
||||||
|
$html[] = '<div class="' . $classItem . '">' . $this->kirbytext($column, $data) . '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return '<div class="' . $classContainer . '">' . implode($html) . '</div>';
|
||||||
|
|
||||||
|
}, $text);
|
||||||
|
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
]);
|
|
@ -1 +0,0 @@
|
||||||
../../modules/kirby-plugin-kirbytextRaw
|
|
1
site/plugins/piwik/.gitignore
vendored
1
site/plugins/piwik/.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
.idea
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Piwik plugin
|
|
||||||
|
|
||||||
A plugin for [Kirby CMS](http://getkirby.com) that generates piwik analytics code to use in your templates.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Put the `piwik` folder in `/site/plugins`.
|
|
||||||
|
|
||||||
Configure piwik URL and site id in your page config.
|
|
||||||
|
|
||||||
### Config Variables
|
|
||||||
|
|
||||||
- spicy.piwik.active: true / false (Default: true)
|
|
||||||
- spicy.piwik.url: 'stats.yourpage.com'
|
|
||||||
- spicy.piwik.id: 1 (replace with the page ID in your piwik installation)
|
|
||||||
|
|
||||||
## How to use it
|
|
||||||
|
|
||||||
You can use this in a template file.
|
|
||||||
|
|
||||||
## Example usage
|
|
||||||
|
|
||||||
### Snippets
|
|
||||||
|
|
||||||
```php
|
|
||||||
<!-- use this right before closing </body> tag -->
|
|
||||||
<?php echo piwik(); ?>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Author
|
|
||||||
|
|
||||||
Michael Fürmann @ Spicy Web
|
|
||||||
<https://spicyweb.de>
|
|
|
@ -1,18 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Piwik Plugin
|
|
||||||
*
|
|
||||||
* @author Michael Fürmann <michael@spicyweb.de>
|
|
||||||
* @version 1.0.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
function piwik($options = array()) {
|
|
||||||
if(!c::get('spicy.piwik.active', true) || !c::get('spicy.piwik.url') || !c::get('spicy.piwik.id'))
|
|
||||||
return;
|
|
||||||
$options['url'] = c::get('spicy.piwik.url');
|
|
||||||
$options['id'] = c::get('spicy.piwik.id');
|
|
||||||
// Return template HTML
|
|
||||||
return tpl::load(__DIR__ . DS . 'template.php', $options);
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -1,15 +0,0 @@
|
||||||
<!-- Piwik -->
|
|
||||||
<script type="text/javascript" nonce="nRfqpuKWNuYyUAFPTr6WVNZk9">
|
|
||||||
var _paq = _paq || [];
|
|
||||||
_paq.push(['trackPageView']);
|
|
||||||
_paq.push(['enableLinkTracking']);
|
|
||||||
(function() {
|
|
||||||
var u="<?= $url?>/";
|
|
||||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
|
||||||
_paq.push(['setSiteId', <?= $id?>]);
|
|
||||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
|
||||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<noscript><p><img src="<?= $url?>/piwik.php?idsite=<?= $id?>" style="border:0;" alt="" /></p></noscript>
|
|
||||||
<!-- End Piwik Code -->
|
|
|
@ -1 +0,0 @@
|
||||||
../../modules/kirby-plugin-thumbExt
|
|
|
@ -9,12 +9,12 @@
|
||||||
$subnav = false;
|
$subnav = false;
|
||||||
if ($page->depth() == 1) {
|
if ($page->depth() == 1) {
|
||||||
$baseSec = $page;
|
$baseSec = $page;
|
||||||
if ( $page->isVisible() && $baseSec->hasVisibleChildren() && $page->template() != 'blog' ) {
|
if ( $page->isListed() && $baseSec->hasListedChildren() && $page->template() != 'blog' ) {
|
||||||
$subnav = true;
|
$subnav = true;
|
||||||
}
|
}
|
||||||
}else if ($page->depth() == 2) {
|
}else if ($page->depth() == 2) {
|
||||||
$baseSec = $page->parent();
|
$baseSec = $page->parent();
|
||||||
if ( $page->isVisible() && $baseSec->hasVisibleChildren() && $page->template() != 'blogarticle' ) {
|
if ( $page->isListed() && $baseSec->hasListedChildren() && $page->template() != 'blogarticle' ) {
|
||||||
$subnav = true;
|
$subnav = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,11 +26,11 @@ if ($page->depth() == 1) {
|
||||||
<nav class="mobile">
|
<nav class="mobile">
|
||||||
<ul class="nav mobileNav">
|
<ul class="nav mobileNav">
|
||||||
<li><a href="<?php echo $site->url()?>">Home</a></li>
|
<li><a href="<?php echo $site->url()?>">Home</a></li>
|
||||||
<?php foreach ($site->children()->visible() as $p) : ?>
|
<?php foreach ($site->children()->listed() as $p) : ?>
|
||||||
<li><a href="<?php echo $p->url()?>" <?php echo ($page == $p)?'class="active"':'' ?>><?php echo $p->title() ?></a></li>
|
<li><a href="<?php echo $p->url()?>" <?php echo ($page == $p)?'class="active"':'' ?>><?php echo $p->title() ?></a></li>
|
||||||
<?php if ($p->hasVisibleChildren() && $p->template() != 'blog') : ?>
|
<?php if ($p->hasListedChildren() && $p->template() != 'blog') : ?>
|
||||||
<ul class="">
|
<ul class="">
|
||||||
<?php foreach ($p->children()->visible() as $c) : ?>
|
<?php foreach ($p->children()->listed() as $c) : ?>
|
||||||
<li><a href="<?php echo $c->url()?>" <?php echo ($page == $c)?'class="active"':'' ?>><?php echo $c->title() ?></a></li>
|
<li><a href="<?php echo $c->url()?>" <?php echo ($page == $c)?'class="active"':'' ?>><?php echo $c->title() ?></a></li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -52,12 +52,12 @@ if ($page->depth() == 1) {
|
||||||
<nav aria-hidden="true">
|
<nav aria-hidden="true">
|
||||||
<ul class="nav d-none d-sm-block">
|
<ul class="nav d-none d-sm-block">
|
||||||
<?php if(!$subnav) : ?>
|
<?php if(!$subnav) : ?>
|
||||||
<?php foreach ($site->children()->visible() as $p) : ?>
|
<?php foreach ($site->children()->listed() as $p) : ?>
|
||||||
<a href="<?php echo $p->url()?>" <?php echo ($page == $p || $page->parent() == $p)?'class="active"':'' ?>><li><?php echo $p->title() ?></li></a>
|
<a href="<?php echo $p->url()?>" <?php echo ($page == $p || $page->parent() == $p)?'class="active"':'' ?>><li><?php echo $p->title() ?></li></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<a href="<?php echo $baseSec->url()?>" class="section <?php echo ($page == $baseSec)?'active':'' ?>"><li><?php echo $baseSec->title() ?>:</li></a>
|
<a href="<?php echo $baseSec->url()?>" class="section <?php echo ($page == $baseSec)?'active':'' ?>"><li><?php echo $baseSec->title() ?>:</li></a>
|
||||||
<?php foreach ($baseSec->children()->visible() as $p) : ?>
|
<?php foreach ($baseSec->children()->listed() as $p) : ?>
|
||||||
<a href="<?php echo $p->url()?>" <?php echo ($page == $p)?'class="active"':'' ?>><li><?php echo $p->title() ?></li></a>
|
<a href="<?php echo $p->url()?>" <?php echo ($page == $p)?'class="active"':'' ?>><li><?php echo $p->title() ?></li></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -64,8 +64,5 @@ echo js('assets/vendors/bootstrap/js/dist/carousel.js');
|
||||||
</script>
|
</script>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
<?php echo piwik(); ?>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -16,7 +16,7 @@ $a = $article;
|
||||||
<a class="more" href="<?php echo $a->url()?>">»</a>
|
<a class="more" href="<?php echo $a->url()?>">»</a>
|
||||||
</p>
|
</p>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<time datetime="<?php echo $a->date('Y-m-d') ?>"><?php echo $a->date('d. M. Y') ?></time>
|
<time datetime="<?php echo $a->date()->toDate('Y-m-d') ?>"><?php echo $a->date()->toDate('d. M. Y') ?></time>
|
||||||
<?php echo tags($base_url, $a); ?>
|
<?php echo tags($base_url, $a); ?>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
<?php
|
|
||||||
// -------------------------------------------
|
|
||||||
// kirby snippet GENERAL
|
|
||||||
// Title: plg-carousel
|
|
||||||
// funct: twitter bootstap carousel for photos in carousel subpage (folder)
|
|
||||||
// modified for bootstrap 4 !
|
|
||||||
|
|
||||||
// copyright: Jannik Beyerstedt | http://jannikbeyerstedt.de | code@jannikbeyerstedt.de
|
|
||||||
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
|
||||||
|
|
||||||
// usage:
|
|
||||||
// snippet('plg-carousel', array('currentPage'=>$page,
|
|
||||||
// 'preNormal'=>'optional html to add before carousel',
|
|
||||||
// 'preAlt'=>'html if snippet is not displayed (for other styles)'))
|
|
||||||
|
|
||||||
// and set these constants in config.php:
|
|
||||||
//c::set('plg_carousel.sort', 'sort'); // sortBy parameter: sort, title, etc.
|
|
||||||
//c::set('plg_carousel.dir', 'asc'); // sortBy direction: asc, desc
|
|
||||||
// -------------------------------------------
|
|
||||||
|
|
||||||
// display carousel only if there are images
|
|
||||||
$carouselFolder = $currentPage->children()->find('carousel');
|
|
||||||
if (!isset($preNormal)) {$preNormal="";}
|
|
||||||
if (!isset($preAlt)) {$preAlt="";}
|
|
||||||
$sort = c::get('plg_carousel.sort', 'title');
|
|
||||||
$sdir = c::get('plg_carousel.dir', 'desc');
|
|
||||||
|
|
||||||
// if folder exists
|
|
||||||
if (!(false==$carouselFolder) && ($carouselFolder->hasImages())) : echo $preNormal
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div id="myCarousel" class="carousel slide" data-ride="carousel">
|
|
||||||
|
|
||||||
<!-- Indicators -->
|
|
||||||
<ol class="carousel-indicators">
|
|
||||||
<?php $n=-1; foreach($carouselFolder->images()->sortBy($sort, $sdir) as $image): $n++; ?>
|
|
||||||
<li data-target="#myCarousel" data-slide-to="<?php echo $n ?>" class="<?php if($n==0) echo ' active' ?>"></li>
|
|
||||||
<?php endforeach ?>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<div class="carousel-inner" role="listbox">
|
|
||||||
<?php $n=-1; foreach($carouselFolder->images()->sortBy($sort, $sdir) as $image): $n++; ?>
|
|
||||||
<div class="carousel-item<?php if($n==0) echo ' active' ?>">
|
|
||||||
<img src="<?php echo $image->url() ?>" alt="<?php echo $image->title()->html() ?>" />
|
|
||||||
<?php if(($image->heading() != "") || ($image->caption() != "")) : ?>
|
|
||||||
<div class="carousel-caption">
|
|
||||||
<?php if($image->heading() != "") : ?><h3><?php echo $image->heading()->kirbytext() ?></h3><?php endif; ?>
|
|
||||||
<?php echo $image->caption()->kirbytext() ?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
<?php endforeach ?>
|
|
||||||
</div>
|
|
||||||
<a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
|
|
||||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
|
||||||
<span class="sr-only">Previous</span>
|
|
||||||
</a>
|
|
||||||
<a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
|
|
||||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
|
||||||
<span class="sr-only">Next</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php else : echo $preAlt ?>
|
|
||||||
|
|
||||||
<?php endif ?>
|
|
|
@ -1 +0,0 @@
|
||||||
../../modules/kirby-kirbytag-html5video/html5video.php
|
|
|
@ -1,30 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
* kirbytag html5youtube
|
|
||||||
* responsive html5 youtube player embedding
|
|
||||||
*
|
|
||||||
* copyright: Jannik Beyerstedt | http://jannikbeyerstedt.de | code@jannikbeyerstedt.de
|
|
||||||
* license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
|
||||||
*
|
|
||||||
* version 2.0.2 (12.12.2016)
|
|
||||||
* changelog:
|
|
||||||
* - v2.0: kirby 2 support
|
|
||||||
* - v2.0.1: fix some html validation issues with & symbols
|
|
||||||
* - v2.0.2: html5 player is now default, so no url param needed any more
|
|
||||||
*/
|
|
||||||
|
|
||||||
kirbytext::$tags['html5youtube'] = array(
|
|
||||||
'attr' => array(
|
|
||||||
'options'
|
|
||||||
),
|
|
||||||
'html' => function($tag) {
|
|
||||||
$base = 'https://www.youtube-nocookie.com/embed/';
|
|
||||||
$end = '?rel=0';
|
|
||||||
|
|
||||||
$videoID = $tag->attr('html5youtube');
|
|
||||||
$options = $tag->attr('options');
|
|
||||||
|
|
||||||
return '<div class="video-container"><iframe src="' . $base . $videoID . $end . $options . '" allowfullscreen></iframe></div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
);
|
|
|
@ -23,7 +23,7 @@ function tags($base_url, $article) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$articles = $page->children()->visible()->flip();
|
$articles = $page->children()->listed()->flip();
|
||||||
|
|
||||||
$title = $page->title()->html();
|
$title = $page->title()->html();
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ snippet('base/cont-header');
|
||||||
|
|
||||||
<h1><?php echo $page->title()->html() ?></h1>
|
<h1><?php echo $page->title()->html() ?></h1>
|
||||||
<div class="meta title">
|
<div class="meta title">
|
||||||
<time datetime="<?php echo $page->date('Y-m-d') ?>"><?php echo $page->date('d. M. Y') ?></time>
|
<time datetime="<?php echo $page->date()->toDate('Y-m-d') ?>"><?php echo $page->date()->toDate('d. M. Y') ?></time>
|
||||||
</div>
|
</div>
|
||||||
<?php echo $page->text()->kirbytext(); ?>
|
<?php echo $page->text()->kirbytext(); ?>
|
||||||
|
|
||||||
|
@ -42,19 +42,19 @@ snippet('base/cont-header');
|
||||||
<?php echo $page->text2()->kirbytext(); ?>
|
<?php echo $page->text2()->kirbytext(); ?>
|
||||||
|
|
||||||
<div class="meta bottom">
|
<div class="meta bottom">
|
||||||
<time datetime="<?php echo $page->date('Y-m-d') ?>"><?php echo $page->date('d. M. Y') ?></time>
|
<time datetime="<?php echo $page->date()->toDate('Y-m-d') ?>"><?php echo $page->date()->toDate('d. M. Y') ?></time>
|
||||||
<?php echo tags($base_url, $page); ?>
|
<?php echo tags($base_url, $page); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<?php if($page->hasPrevVisible() || $page->hasNextVisible()): ?>
|
<?php if($page->hasPrevListed() || $page->hasNextListed()): ?>
|
||||||
<div class="teasers">
|
<div class="teasers">
|
||||||
<?php if($page->hasNextVisible()) {
|
<?php if($page->hasNextListed()) {
|
||||||
echo snippet('blogexcerpt',["article"=>$page->nextVisible(),"length"=>200,"base_url"=>$base_url]);
|
echo snippet('blogexcerpt',["article"=>$page->nextListed(),"length"=>200,"base_url"=>$base_url]);
|
||||||
} ?>
|
} ?>
|
||||||
<?php if($page->hasPrevVisible()) {
|
<?php if($page->hasPrevListed()) {
|
||||||
echo snippet('blogexcerpt',["article"=>$page->prevVisible(),"length"=>200,"base_url"=>$base_url]);
|
echo snippet('blogexcerpt',["article"=>$page->prevListed(),"length"=>200,"base_url"=>$base_url]);
|
||||||
} ?>
|
} ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
|
@ -25,7 +25,7 @@ snippet('base/cont-header');
|
||||||
01110100 01100101<br>
|
01110100 01100101<br>
|
||||||
01100100 01110100
|
01100100 01110100
|
||||||
</div>
|
</div>
|
||||||
<p><?php echo $page->subtitle()->kirbytextRaw() ?></p>
|
<p><?php echo $page->subtitle()->kirbytextinline() ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php echo $page->text()->kirbytext(); ?>
|
<?php echo $page->text()->kirbytext(); ?>
|
||||||
|
|
|
@ -11,7 +11,7 @@ snippet('base/cont-header');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<main class="section photo">
|
<main class="section photo">
|
||||||
<?php echo snippet('plg-carousel', array('currentPage'=>$page,
|
<?php echo snippet('plg/plg-carousel', array('currentPage'=>$page,
|
||||||
'preNormal'=>'',
|
'preNormal'=>'',
|
||||||
'preAlt'=>'')); ?>
|
'preAlt'=>'')); ?>
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ snippet('base/cont-header');
|
||||||
<?php echo $page->text()->kirbytext(); ?>
|
<?php echo $page->text()->kirbytext(); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if($page->en_masonry() == '1') echo snippet('plg/plg-masonry-sb', array('currentPage'=>$page)); ?>
|
<?php if($page->en_masonry()->bool()) echo snippet('plg/plg-masonry-sb', array('currentPage'=>$page)); ?>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<?php echo $page->text2()->kirbytext(); ?>
|
<?php echo $page->text2()->kirbytext(); ?>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
|
|
||||||
$children = $page->children()->visible();
|
$children = $page->children()->listed();
|
||||||
|
|
||||||
snippet('base/html-head');
|
snippet('base/html-head');
|
||||||
snippet('base/cont-header');
|
snippet('base/cont-header');
|
||||||
|
@ -23,12 +23,16 @@ snippet('base/cont-header');
|
||||||
<div class="col-sm-6 col-lg-3"><div class="card">
|
<div class="col-sm-6 col-lg-3"><div class="card">
|
||||||
<a href="<?php echo $c->url(); ?>">
|
<a href="<?php echo $c->url(); ?>">
|
||||||
<?php if ($img = $c->images()->find($c->exrpt_img())) {
|
<?php if ($img = $c->images()->find($c->exrpt_img())) {
|
||||||
echo ThumbExt($img, ['width'=>400,'quality'=>70,'class'=>"card-img-top",'inline-size'=>false]);
|
$imgurl = $img->url();
|
||||||
|
$srcset = $img->srcset([
|
||||||
|
'1x' => ['width'=>400, 'quality'=>70],
|
||||||
|
'2x' => ['width'=>800, 'quality'=>70]
|
||||||
|
]);
|
||||||
|
echo '<img src="'.$imgurl.'" class="card-img-top" srcset="'.$srcset.'" />';
|
||||||
} ?>
|
} ?>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title"><?php echo $c->title()->html(); ?></h5>
|
<h5 class="card-title"><?php echo $c->title()->html(); ?></h5>
|
||||||
<p class="card-text"><?php echo $c->exrpt_text()->kirbytext(); ?></p>
|
<p class="card-text"><?php echo $c->exrpt_text()->kirbytextinline(); ?></p>
|
||||||
<a href="<?php echo $c->url(); ?>" class="card-link">mehr</a>
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
|
@ -18,11 +18,16 @@ snippet('base/cont-header');
|
||||||
<div class="row featurette">
|
<div class="row featurette">
|
||||||
<div class="col-sm-9 col-12">
|
<div class="col-sm-9 col-12">
|
||||||
<h2 class="featurette-heading"><?php echo $page->featurette_headline()->html() ?></h2>
|
<h2 class="featurette-heading"><?php echo $page->featurette_headline()->html() ?></h2>
|
||||||
<p class="lead"><?php echo $page->featurette_text()->kirbytextRaw() ?></p>
|
<p class="lead"><?php echo $page->featurette_text()->kirbytextinline() ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3 col-12">
|
<div class="col-sm-3 col-12">
|
||||||
<?php if ($img = $page->images()->find($page->featurette_img())) {
|
<?php if ($img = $page->images()->find($page->featurette_img())) {
|
||||||
echo ThumbExt($img, ['width'=>235,'quality'=>70,'class'=>"img-fluid rounded",'alt'=>"Portrait",'inline-size'=>false]);
|
$imgurl = $img->url();
|
||||||
|
$srcset = $img->srcset([
|
||||||
|
'1x' => ['width'=>235, 'quality'=>70],
|
||||||
|
'2x' => ['width'=>235*2, 'quality'=>70]
|
||||||
|
]);
|
||||||
|
echo '<img src="'.$imgurl.'" class="img-fluid rounded" alt="Portrait" srcset="'.$srcset.'" />';
|
||||||
}?>
|
}?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue