Initial commit

master
Tim de Gruisbourne 2020-04-01 18:13:47 +02:00
commit a0fc2bf3a5
29 changed files with 502 additions and 0 deletions

22
.editorconfig 100644
View File

@ -0,0 +1,22 @@
[*.{css,scss,less,js,json,ts,sass,html,hbs,mustache,phtml,html.twig,md,yml}]
charset = utf-8
indent_style = tab
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
indent_size = 4
trim_trailing_whitespace = false
[site/templates/**.php]
indent_size = 2
[site/snippets/**.php]
indent_size = 2
[package.json,.{babelrc,editorconfig,eslintrc,lintstagedrc,stylelintrc}]
indent_style = tab
indent_size = 2

41
.gitignore vendored 100644
View File

@ -0,0 +1,41 @@
# System files
# ------------
Icon
.DS_Store
# Temporary files
# ---------------
/media/*
!/media/index.html
# Lock files
# ---------------
.lock
# -------------SECURITY-------------
# NEVER publish these files via Git!
# -------------SECURITY-------------
# Cache Files
# ---------------
/site/cache/*
!/site/cache/index.html
# Accounts
# ---------------
/site/accounts/*
!/site/accounts/index.html
# Sessions
# ---------------
/site/sessions/*
!/site/sessions/index.html
# License
# ---------------
/site/config/.license

57
.htaccess 100644
View File

@ -0,0 +1,57 @@
# Kirby .htaccess
# rewrite rules
<IfModule mod_rewrite.c>
# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
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 /
# block files and folders beginning with a dot, such as .git
# except for the .well-known folder, which is used for Let's Encrypt and security.txt
RewriteRule (^|/)\.(?!well-known\/) index.php [L]
# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
# block all files in the site folder from being accessed directly
# except for requests to plugin assets files
RewriteRule ^site/(.*) index.php [L]
# Enable authentication header
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
# block direct access to kirby and the panel sources
RewriteRule ^kirby/(.*) index.php [L]
# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
</IfModule>
# compress text file responses
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>

14
README.md 100644
View File

@ -0,0 +1,14 @@
# Kirby Template
Basis für ein typisches Kirby Projekt.
## Set-Up
1. Projekt über die Web-Oberfläche in Gitea anlegen (https://git.adlerschmidt.de)
2. Projekt auf den Entwicklungs-Rechner kopieren per `git clone` und dem im Projekt angegebenen SSH-Link. Beispiel für dieses Projekt:
`git clone git@git.adlerschmidt.de:tideg/kirby-template.git`
3. git remote add origin git@git.adlerschmidt.de:tideg/kirby-template.git
4. Test \git@git.adlerschmidt.de:tideg/kirby-project-template.git

28
composer.json 100644
View File

@ -0,0 +1,28 @@
{
"name": "adlerschmidt/kirby-template",
"description": "Kirby Template",
"type": "project",
"keywords": [
"adlerschmidt",
"kirby",
"cms"
],
"homepage": "https://adlerschmidt.de",
"authors": [
{
"name": "Tim de Gruisbourne",
"email": "tdg@adlerschmidt.de",
"homepage": "https://adlerschmidt.de"
}
],
"support": {
"email": "tdg@adlerschmidt.de"
},
"require": {
"php": ">=7.1.0",
"getkirby/cms": "^3.0"
},
"config": {
"optimize-autoloader": true
}
}

View File

@ -0,0 +1 @@
Title: Error

View File

@ -0,0 +1 @@
Title: Home

1
content/site.txt 100644
View File

@ -0,0 +1 @@
Title: Site Title

5
index.php 100644
View File

@ -0,0 +1,5 @@
<?php
require 'kirby/bootstrap.php';
echo (new Kirby)->render();

0
media/index.html 100644
View File

View File

View File

@ -0,0 +1,3 @@
label: Intro-Überschrift
type: text
maxlength: 70

View File

@ -0,0 +1,3 @@
title: Default File
fields:

View File

@ -0,0 +1,3 @@
title: Datei
fields:

View File

@ -0,0 +1,20 @@
title: Bild
accept:
mime: image/*
columns:
main:
sections:
content:
type: fields
fields:
alt:
label: Alternativ-Text
type: textarea
buttons: false
width: 1/2
copyright:
label: Copyright-Vermerk
type: text
width: 1/2

View File

@ -0,0 +1,35 @@
tabs:
content:
label: Content
# icon: text
columns:
main:
width: 2/3
sections:
content:
type: fields
fields:
page_intro: fields/page-intro
main_content: fields/main-content
sidebar:
width: 1/3
sticky: true
sections:
pages: sections/pages
images: sections/images
files: sections/files
teaser:
extends: layouts/teaser
metadata:
label: Meta-Daten
icon: tag
extends: layouts/metadata
columns:
metadata:
sections:
metadata:
fields:
togglePageTitleAppendix: false

View File

@ -0,0 +1,143 @@
columns:
metadata:
width: 1/2
sections:
metadata:
type: fields
fields:
panelHeadlineMetadata:
label: Meta-Angaben
type: headline
metaInfo:
label:
type: info
text: Meta-Daten können zusätzliche Angaben zu den sichtbaren Inhalten dieser Seite bereit stellen. Diese Angaben sind unter anderem für Suchmaschinen relevant und sollten sorgfältig und möglichst vollständig ausgefüllt werden.
metadescription:
label: Meta-Description
type: textarea
buttons: false
max: 160
help: Schildere den Inhalt der Seite in ein bis zwei Sätzen (max. 160 Zeichen). Die Beschreibung wird unter anderem in den Suchergebnissen von Google & Co. angezeigt.
metaToggle:
label: Allgemeine Meta-Angaben verwenden?
help: Einige Meta-Angaben sind oftmals für viele Seiten der gesamten Website gültig. Sie werden unter Seite -> Allgemeine Meta-Angaben definiert. Bei abweichenden Seiten-Inhalten sollten diese Angaben jedoch angepasst/überschrieben werden.
type: toggle
text:
- ja
- nein
metatitle:
label: Meta-Titel
type: text
max: 70
help: Der Meta-Titel oder auch Seiten-Titel ist der Name der jeweiligen Seite. Ist dieses Feld unausgefüllt, wird der Seitentitel dieser Seite verwendet.
when:
metaToggle: true
togglePageTitleAppendix:
label: Anhang für Meta-Titel verwenden?
type: toggle
help: Der Meta-Titel oder auch Seiten-Titel ist der Name der jeweiligen Seite. Mit dieser Option kann dem Meta-Titel aller Seiten ein Appendix nachgestellt werden. Die Startseite ist hiervon ausgeschlossen.
text:
- nein
- ja
pageTitleAppendix:
label: Anhang für Meta-Title
type: text
when:
togglePageTitleAppendix: true
metaauthor:
label: Autor(en)
type: text
help: Haupt Autor(en) dieser Seite. Ist dieses Feld unausgefüllt, wird der Wert aus den allgemeinen Meat-Angaben übernommen.
when:
metaToggle: true
metadesigner:
label: Designer
type: text
help: Designer dieser Seite. Ist dieses Feld unausgefüllt, wird der Wert aus den allgemeinen Meat-Angaben übernommen.
when:
metaToggle: true
# metageoposition:
# label: Geo-Position
# type: text
# when:
# metaToggle: true
metacopyright:
label: Copyright
type: text
help: Copyright-Holder dieser Seite. Ist dieses Feld unausgefüllt, wird der Wert aus den allgemeinen Meat-Angaben übernommen.
when:
metaToggle: true
opengraph:
width: 1/2
sections:
openGraph:
type: fields
fields:
panelHeadlineOpenGraph:
label: OpenGraph-Angaben
type: headline
ogInfo:
label:
type: info
text: Mit Hilfe der OpenGraph-Angaben kann gesteuert werden, wie diese Seite dargestellt wird, wenn sie geteilt wird (soziale Netzwerke, Messenger, etc.).
ogToggle:
label: Allgemeine OpenGraph-Angaben verwenden?
help: Die OpenGraph-Angaben sind wie einige Meta-Angaben oftmals für viele Seiten der gesamten Website gültig. Auch sie werden unter Seite -> Allgemeine Meta-Angaben definiert. Bei abweichenden Seiten-Inhalten sollten diese Angaben jedoch angepasst/überschrieben werden.
type: toggle
text:
- ja
- nein
ogImage:
label: OpenGraph Bild
type: files
query: page.images
layout: cards
uploads:
template: image
multiple: false
max: 1
width: 1/1
help: Das Vorschaubild für die Seite. Ist dieses Feld unausgefüllt, wir das Bild aus den allgemeinen OpenGraph-Angaben verwendet. Idealerweise sollte ein Bild mit 880 x 540 Pixeln eingesetzt werden, welches nicht größer als 100 Kilobyte ist.
image:
cover: false
when:
ogToggle: true
ogTitle:
label: OpenGraph Titel
type: text
max: 70
width: 1/2
help: Der Titel, der unter dem Bild angezeigt wird. Ist dieses Feld unausgefüllt, wird der Seitentitel dieser Seite angezeigt.
when:
ogToggle: true
ogType:
label: OpenGraph Medien-Typ
type: select
multiple: false
default: 'website'
width: 1/2
when:
ogToggle: true
options:
- music.song
- music-album
- music.playlist
- music.radio_station
- video.movie
- video.episode
- video.tv_show
- video.other
- article
- book
- profile
- website
ogDescription:
label: OpenGraph Description
type: textarea
buttons: false
max: 160
width: 1/1
help: Der Beschreibungstext, der unter dem Titel steht. Ist dieses Feld unausgefüllt, wird die Meta-Description dieser Seite angezeigt.
when:
ogToggle: true

View File

@ -0,0 +1,29 @@
columns:
main:
width: 2/3
sections:
teasercontent:
type: fields
fields:
teaser_description:
label: Teaser-Kurztext
type: textarea
buttons: false
maxlength: 500
teaser_image:
label: Teaser-Bild
type: files
default: eco-e.svg
query: page.images
uploads:
template: image
layout: cards
multiple: false
# required: true
image:
back: white
sidebar:
width: 1/3
sticky: true
sections:
images: sections/images

View File

@ -0,0 +1,8 @@
title: Default Page
preset: page
fields:
text:
label: Text
type: textarea
size: large

View File

@ -0,0 +1,7 @@
type: files
headline: Dateien
empty: Noch keine Dateien vorhanden
template: file
info: "{{ file.niceSize }}"
image:
back: black

View File

@ -0,0 +1,8 @@
type: files
headline: Bilder
empty: Noch keine Bilder vorhanden
template: image
info: "{{ file.dimensions }}"
image:
# cover: true
back: white

View File

@ -0,0 +1,10 @@
type: pages
headline: Subpages
empty: Noch keine Subpages vorhanden
# templates:
# - default
# - projektdatenbank
create:
- default
image:
query: false

View File

@ -0,0 +1,9 @@
title: Übersicht
num: zero
options:
preview: true
changeTemplate: false
delete: false
duplicate: false

View File

@ -0,0 +1,6 @@
label: Teaser
icon: template
preset: page
fields:
teaser:
extends: fields/teaser

0
site/cache/index.html vendored 100644
View File

View File

@ -0,0 +1,47 @@
<?php
return [
'debug' => true,
'languages' => false,
'languages.detect' => false,
'thumbs' => [
'srcsets' => [
'default' => [300, 800, 1024, 1280, 1920, 3840],
'16to9' => [
'300w' => [
'width' => 300,
'height' => 169,
'crop' => 'center'
],
'800w' => [
'width' => 800,
'height' => 450,
'crop' => 'center'
],
'1024w' => [
'width' => 1024,
'height' => 576,
'crop' => 'center'
],
'1280w' => [
'width' => 1280,
'height' => 720,
'crop' => 'center'
],
'1920w' => [
'width' => 1920,
'height' => 1080,
'crop' => 'center'
],
'3840w' => [
'width' => 3840,
'height' => 2160,
'crop' => 'center'
]
]
]
],
'routes' => [
[]
]
];

View File

View File

View File

@ -0,0 +1 @@
<h1><?= $page->title() ?></h1>