Compare commits

...

42 Commits

Author SHA1 Message Date
f905518c9c updates 2020-11-21 15:18:11 +01:00
fad4db6f29 [TASK] Text über Blogroll hinzufügen 2020-05-20 18:10:12 +02:00
1c911373d7 [TASK] optimize welcome.jpg 2020-05-20 18:09:53 +02:00
800f296c4e [TASK] Zrückbutton-Text spezifieren 2020-05-20 18:02:59 +02:00
d1a53ca906 [TASK] add png to git-lfs 2020-05-20 18:02:25 +02:00
8ca2c950cd [CONTENT] Blogeinträge angepasst 2020-05-20 17:59:15 +02:00
6558bd5460 Add images with lfs 2020-05-20 17:58:24 +02:00
275ac1d8cc [TASK] Layout-Anpassungen 2020-05-20 17:39:42 +02:00
f5f43b2173 [TASK] Formstyle 2020-05-20 17:34:25 +02:00
327b33a92e [TASK] composer update 2020-05-20 15:52:28 +02:00
6180fa411a [TASK] Layout for homepage 2020-05-20 15:52:17 +02:00
9bd1c17396 [TASK] color from config 2020-05-20 15:51:34 +02:00
3ede56caf1 [TASK] einrückung 2020-05-20 15:51:15 +02:00
TLRZ Seyfferth
bc3a113254 [SAVE] Zwischencommit 2020-05-07 19:38:38 +02:00
TLRZ Seyfferth
03ebd97cd0 [TASK] progressive loaded images 2020-05-07 18:54:10 +02:00
TLRZ Seyfferth
2cd70552b0 [TASK] starting lazy-load 2020-05-06 19:37:58 +02:00
TLRZ Seyfferth
b2460c08d4 [CONTENT] blog 2020-05-06 19:28:50 +02:00
TLRZ Seyfferth
f5ee5a1438 [CONTENT] projects 2020-05-06 19:28:36 +02:00
TLRZ Seyfferth
b060d0df01 [FIX] images_path 2020-05-06 19:28:15 +02:00
TLRZ Seyfferth
75188172cd [CONFIG] disable widescreen 2020-05-06 19:28:02 +02:00
TLRZ Seyfferth
28960c96d3 [TASK] update layout 2020-05-06 19:27:33 +02:00
TLRZ Seyfferth
d3814c7251 [TASK] add partials 2020-05-06 19:26:55 +02:00
TLRZ Seyfferth
32d0950f4c [TASK] remove fixed-sidebar 2020-05-06 19:26:37 +02:00
TLRZ Seyfferth
d97a34e6b9 [TASK] fix layout 2020-05-06 17:44:15 +02:00
TLRZ Seyfferth
e2cfaf098d [CONTENT] move inventur 2020-05-06 17:43:59 +02:00
TLRZ Seyfferth
95616cc17d [TASK] add feed 2020-05-06 17:42:56 +02:00
TLRZ Seyfferth
23794ac9d3 [CONTENT] add placeholder image 2020-05-05 19:40:17 +02:00
TLRZ Seyfferth
72c4349aaf [TASK] edit option 2020-05-05 19:40:00 +02:00
TLRZ Seyfferth
85a7a4809a [CONTENT] use Templates 2020-05-05 19:39:43 +02:00
TLRZ Seyfferth
d43891667f [TASK] add templates 2020-05-05 19:39:21 +02:00
TLRZ Seyfferth
7f1f0495a8 [TASK] option for widescreen 2020-05-05 19:39:05 +02:00
TLRZ Seyfferth
d88070fab7 [TASK] removes Template-path 2020-05-05 18:41:00 +02:00
TLRZ Seyfferth
572e85f5db [TASK] refactor Theme to be able to ad styled code 2020-05-05 18:40:30 +02:00
TLRZ Seyfferth
57d7278090 [TASK] simplify theme 2020-05-05 18:39:49 +02:00
TLRZ Seyfferth
a8a2384183 [TASK] cleanup layout 2020-05-05 18:21:52 +02:00
TLRZ Seyfferth
b453515c6f [TASK] install picocms 3.0 alpha 2020-05-04 19:58:41 +02:00
TLRZ Seyfferth
18e0245f88 [TASK] ignore themes-dir-content 2020-05-04 19:48:22 +02:00
TLRZ Seyfferth
a181513cbb [TASK] update config 2020-05-04 19:48:03 +02:00
TLRZ Seyfferth
8a54bfd47f [CONTENT] update 2020-05-04 19:47:49 +02:00
TLRZ Seyfferth
6d3b0e6117 [TASK] update composer 2020-05-04 19:47:34 +02:00
TLRZ Seyfferth
32c7ed5dec [TASK] add materialize-theme 2020-05-04 19:47:14 +02:00
TLRZ Seyfferth
e64da153cd [TASK] remove old theme 2020-05-04 19:46:50 +02:00
78 changed files with 22470 additions and 3471 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
*.jpg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1 @@
node_modules

View File

@ -0,0 +1,3 @@
Pico Materialize Theme
==================

View File

@ -0,0 +1,19 @@
{
"name": "chrosey/pico-theme-materializecss",
"type": "pico-theme",
"description": "PicoCMS Materializecss-Theme",
"keywords": ["pico", "picocms", "picocms-theme", "pico-theme", "materializecss-theme"],
"homepage": "http://picocms.org/",
"license": "MIT",
"authors": [{
"name": "Christian Seyfferth",
"email": "info@chrosey.de",
"role": "Developer"
}],
"require": {
"picocms/pico": "^2.1||^v3.0.0-alpha.1"
},
"extra": {
"installer-name": "pico-materializecss"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,80 @@
nav ul a,
nav .brand-logo {
color: #444;
}
.sidenav-trigger {
color: #26a69a;
}
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1 0 auto;
}
.progressive {
position: relative;
display: block;
overflow: hidden;
outline: none
}
.progressive img {
display: block;
width: 100%;
max-width: none;
height: auto;
border: 0
}
.progressive img.preview {
filter: blur(2vw);
transform: scale(1.05)
}
.progressive img.reveal {
position: absolute;
left: 0;
top: 0;
will-change: transform, opacity;
animation: progressiveReveal 1s ease-out
}
@keyframes progressiveReveal {
0% {
transform: scale(1.05);
filter: blur(20px);
opacity: 0
}
to {
transform: scale(1);
filter: none;
opacity: 1
}
}
/*
header,
main,
body>nav,
footer {
padding-left: 300px;
}
@media only screen and (max-width : 992px) {
header,
main,
body>nav,
footer {
padding-left: 0;
}
}
*/

BIN
Packages/chrosey_materialize/img/categories/Allgemein.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Packages/chrosey_materialize/img/categories/DevOps.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Packages/chrosey_materialize/img/categories/Homepage.jpg (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,15 @@
{% extends "templates/layout/base.twig" %}
{% if page.meta.hasCode %}
{% block css %}
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism-tomorrow.min.css" rel="stylesheet"/>
{{ parent() }}
{% endblock %}
{% block js %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/plugins/autoloader/prism-autoloader.min.js"></script>
{{ parent() }}
{% endblock %}
{% endif %}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,50 @@
M.AutoInit();
window.addEventListener && window.requestAnimationFrame && document.getElementsByClassName && window.addEventListener('load', function () {
'use strict';
var e, t, n = document.getElementsByClassName('progressive replace');
function i() {
t = t || setTimeout(function () {
t = null, r()
}, 300)
}
function r() {
n.length && requestAnimationFrame(function () {
for (var t, i, r = window.innerHeight, a = 0; a < n.length;) 0 < (i = (t = n[a].getBoundingClientRect()).top) + t.height && r > i ? (s(n[a]), n[a].classList.remove('replace')) : a++;
e = n.length
})
}
function s(e, t) {
var n = e && (e.getAttribute('data-href') || e.href);
if (n) {
var i = new Image,
r = e.dataset;
r && (r.srcset && (i.srcset = r.srcset), r.sizes && (i.sizes = r.sizes)), i.onload = function () {
requestAnimationFrame(function () {
n === e.href && (e.style.cursor = 'default', e.addEventListener('click', function (e) {
e.preventDefault()
}, !1));
var t = e.querySelector && e.querySelector('img.preview');
e.insertBefore(i, t && t.nextSibling).addEventListener('animationend', function () {
t && (t.alt && (i.alt = t.alt), e.removeChild(t)), i.classList.remove('reveal')
})
})
}, (t = 1 + (t || 0)) < 3 && (i.onerror = function () {
setTimeout(function () {
s(e, t)
}, 3e3 * t)
}), i.className = 'reveal', i.src = n
}
}
window.addEventListener('scroll', i, !1), window.addEventListener('resize', i, !1), MutationObserver && new MutationObserver(function () {
n.length !== e && r()
}).observe(document.body, {
subtree: !0,
childList: !0,
attributes: !0,
characterData: !0
}), r()
}, !1);

View File

@ -0,0 +1,31 @@
{% import "partials/macros.twig" as macros %}
{% set amount = amount ? amount : 20 %}
{% block blogroll %}
<div class="row">
{% for page in pages("blog", depth=2) | sort_by( 'time' ) | reverse | slice(0,amount) %}
<div class="col s12 m3">
<div class="card hoverable">
<div class="card-image">
{{ macros.variants( theme_url ~ "/img/categories/" ~ page.meta.categories.0 ~ ".jpg") }}
<a href="{{ page.url }}" class="btn-floating halfway-fab waves-effect waves-light {{config.theme_config.primary_color}}">
<i class="material-icons">chevron_right</i>
</a>
</div>
<div class="card-content">
<p class="grey-text">{{ page.date }}</p>
<h5>
{{ page.title }}</h5>
<p class="grey-text text-darken-2">
{{ page.description }}</p>
</div>
<div class="card-action">
<a class="{{config.theme_config.primary_color}}-text" href="{{ page.url }}">Zum Artikel</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% endblock %}

View File

@ -0,0 +1,18 @@
{% import "partials/macros.twig" as macros %}
{% block images %}
<div class="container">
{% if images | length > 1 %}
<div class="carousel">
{% for image in images %}
<a href="{{ image.url }}" class="carousel-item">
{{ macros.variants(image.url, image.preview, image.alt, 300, 400 ) }}
</a>
{% endfor %}
</div>
{% else %}
{{ macros.variants(images.0.url, images.0.preview, images.0.alt, 300, 400, "materialboxed " ) }}
{% endif %}
</div>
{% endblock %}

View File

@ -0,0 +1,7 @@
{% macro variants(fullImage,preview=null,alt="",height=300,width=400,class="") %}
{% set preview = preview!="" ? preview : fullImage %}
<div data-href="{{ fullImage }}" class="progressive replace {{class}}">
<img class="preview" src="{{ preview }}" alt="{{ alt}}" height="{{ height }}" width="{{ width }}">
</div>
{% endmacro %}

View File

@ -0,0 +1,19 @@
{% extends "index.twig" %}
{% block content %}
{{parent()}}
<section class="{% if not config.theme_config.widescreen %} container{% endif %}">
<div class="row">
<div class="col s12">
{% include "partials/blogroll.twig" %}
</div>
</div>
</section>
<section class="{% if not config.theme_config.widescreen %} container{% endif %}">
<div class="row">
<div class="col s12"></div>
</div>
</section>
{% endblock %}

View File

@ -0,0 +1,18 @@
{% extends "templates/blog.twig" %}
{% block content %}
<section class="{% if not config.theme_config.widescreen %} container{% endif %}">
<div class="row">
<div class="col s12 m6">
{{content}}
</div>
<div class="col s12 m6">
{% include "partials/images.twig" %}
</div>
<div class="col s12">
<a href="{{ "blog"|link }}" class="btn {{ config.theme_config.secondary_color }}">Zurück zu den Blogeinträgen</a>
</div>
</div>
</section>
{% endblock %}

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom">
{% set RFC822 = "D, d M Y H:i:s O" %}
<channel>
<title>{{ site_title | e }}</title>
<description>{{ pages.index.meta.description | e }}</description>
<link>{{ base_url }}/</link>
<atom:link href="{{ base_url ~ "/feed" }}"
rel="self"
type="application/rss+xml" />
<pubDate>{{ "now" | date(RFC822) }}</pubDate>
<lastBuildDate>{{ "now" | date(RFC822) }}</lastBuildDate>
<generator>Pico</generator>
{% for page in pages if page.id not in ['index','feed'] and not page.hidden and not end %}
<item>
<title>{{ page.title | e }}</title>
<description>{{ page.id | content | e }}</description>
<pubDate>{{ page.date | date(RFC822) }}</pubDate>
<link>{{ page.url }}</link>
<guid isPermaLink="true">{{ page.url }}</guid>
{% for cat in page.meta.categories %}
<category>{{ cat | e }}</category>
{% endfor %}
</item>
{% if loop.index == 10 %}{% set end = true %}{% endif %}
{% endfor %}
</channel>
</rss>

View File

@ -0,0 +1,15 @@
{% extends "index.twig" %}
{% block content %}
<div class="parallax-container" style="height: 60vh;">
<div class="parallax"><img src="{{ assets_url }}/welcome.jpg"></div>
</div>
{{parent()}}
<div class="{% if not config.theme_config.widescreen %} container{% endif %}">
<h2>Meine letzten Blogeinträge</h2>
{% include "partials/blogroll.twig" with { amount: 4 } %}
</div>
{% endblock %}

View File

@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="de">
<head>
{% block head %}
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>
{% if meta.title %}
{{ meta.title }}
|
{% endif %}
{{ site_title }}</title>
{% if meta.description %}
<meta name="description" content="{{ meta.description|striptags }}"/>
{% endif %}
{% if meta.robots %}
<meta name="robots" content="{{ meta.robots }}"/>
{% endif %}
{% if current_page %}
<link rel="canonical" href="{{ current_page.url }}"/>
{% endif %}
{% endblock %}
{% block css %}
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="{{ theme_url }}/css/materialize.min.css">
<link rel="stylesheet" href="{{ theme_url }}/css/style.css" type="text/css"/>
{% endblock %}
</head>
<body>
{% include "templates/layout/navigationBar.twig" %}
<main>
{% block content %}
<section class="{% if not config.theme_config.widescreen %} container{% endif %}">
<div class="row">
<div class="col s12">
{{ content }}
</div>
</div>
</section>
{% endblock %}
{% block sections %}
{% for section in meta.sections %}
<div class="parallax-container">
<div class="parallax"><img src="{{assets_url}}/{{section.image}}"></div>
</div>
<div class="{% if not config.theme_config.widescreen %} container{% endif %}">
<h2>{{section.title}}</h2>
{{ section.text }}
</div>
{% endfor %}
{% endblock %}
</main>
{% include "templates/layout/footer.twig" %}
{% block js %}
<script type="text/javascript" src="{{ theme_url }}/js/materialize.min.js"></script>
<script src="{{ theme_url }}/js/site.js" type="text/javascript"></script>
{% endblock %}
</body>
</html>

View File

@ -0,0 +1,19 @@
<footer class="page-footer {{ config.theme_config.color }}">
<div class="{% if not config.theme_config.widescreen %} container{% endif %}">
<div class="row">
<div class="col l6 s12"></div>
<div class="col l4 offset-12 s12"></div>
</div>
</div>
<div class="footer-copyright">
<div class="{% if not config.theme_config.widescreen %} container{% endif %} black-text">
<span>&copy; 2013 -
{{ now|date("Y") }}
by chrosey</span>
<span class="hide-on-large-and-up center">&middot;&nbsp;</span>
<span class="right">powered by
<a href="http://picocms.org/">picoCMS</a>
</span>
</div>
</div>
</footer>

View File

@ -0,0 +1,61 @@
<nav class="{{ config.theme_config.color }}" role="navigation">
<div class="nav-wrapper{% if not config.theme_config.widescreen %} container{% endif %}">
<a id="logo-container" href="{{ "index"|link }}" class="brand-logo">
<img src="{{ assets_url }}/logo.svg " alt="Logo" height="64" width="64"/>
</a>
<a data-target="slide-out" class="sidenav-trigger">
<i class="material-icons">menu</i>
</a>
{% block navigation %}
<ul class="right hide-on-med-and-down">
{% for page in pages("index") if not page.hidden %}
{% if pages(page.id) | length < 1 %}
<li>
<a class="" href="{{ page.url }}" tabindex="0">{{ page.title }}</a>
</li>
{% else %}
<li>
<a class="dropdown-trigger" data-target="dropdown_{{ page.id }}" tabindex="0">{{ page.title }}<i class="material-icons left">arrow_drop_down</i>
</a>
<ul class="dropdown-content" id="dropdown_{{ page.id }}">
{% for subpage in pages(page.id) %}
<li>
<a class="" href="{{ subpage.url }}" tabindex="0">{{ subpage.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% endblock %}
</div>
</nav>
<ul id="slide-out" class="sidenav collapsible">
{% block sideNavigation %}
{% for page in pages("index") if not page.hidden %}
{% if pages(page.id) | length < 1 %}
<li>
<a class="waves-effect" href="{{ page.url }}" tabindex="0">{{ page.title }}</a>
{% else %}
<li>
<a class="collapsible-header waves-effect" data-target="collapse_{{page.id}}">{{ page.title }}<i class="material-icons right">arrow_drop_down</i>
</a>
<div class="collapsible-body" id="collapse_{{page.id}}">
<ul>
{% for subpage in pages(page.id) %}
<li>
<a class="waves-effect" href="{{ subpage.url }}">{{ subpage.title }}</a>
</li>
{% endfor %}
</ul>
</li>
{% endif %}
</li>
{% endfor %}
{% endblock %}
</ul>

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/welcome.jpg (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,36 +1,29 @@
{ {
"name": "picocms/pico-composer", "name": "chrosey/homepage",
"type": "project", "type": "project",
"description": "Pico is a flat file CMS, this means there is no administration backend and database to deal with. You simply create .md files in the \"content\" folder and that becomes a page.", "description": "Homepage based on PicoCMS",
"keywords": ["pico", "picocms", "pico-cms", "simple", "flat-file", "cms", "content-management", "website", "markdown-to-html", "php", "markdown", "yaml", "twig", "composer-project"], "keywords": ["pico", "picocms", "pico-cms", "simple", "flat-file", "cms", "content-management", "website", "markdown-to-html", "php", "markdown", "yaml", "twig", "composer-project"],
"homepage": "http://picocms.org/", "homepage": "https://chrosey.de/",
"license": "MIT", "license": "MIT",
"authors": [{ "authors": [{
"name": "Daniel Rudolf", "name": "Chrosey",
"email": "picocms.org@daniel-rudolf.de", "email": "info@chrosey.de",
"role": "Lead Developer" "role": "Developer"
}, }],
{ "repositories": [{
"name": "The Pico Community", "type": "path",
"homepage": "http://picocms.org/" "url": "Packages/*"
}, }],
{
"name": "Contributors",
"homepage": "https://github.com/picocms/pico-composer/graphs/contributors"
}
],
"support": {
"docs": "http://picocms.org/docs",
"issues": "https://github.com/picocms/Pico/issues",
"source": "https://github.com/picocms/Pico"
},
"require": { "require": {
"picocms/pico": "^2.1", "chrosey/pico-theme-materializecss": "@dev",
"picocms/pico-theme": "^2.1", "phrozenbyte/pico-file-prefixes": "^2.0",
"picocms/pico-deprecated": "^2.1",
"picocms/composer-installer": "^1.0", "picocms/composer-installer": "^1.0",
"phrozenbyte/pico-file-prefixes": "^2.0" "picocms/pico": "^v3.0.0-alpha.1",
"picocms/pico-deprecated": "^v3.0.0-alpha.1"
}, },
"prefer-stable": true,
"minimum-stability": "beta", "minimum-stability": "beta",
"prefer-stable": true "config": {
"sort-packages": true
}
} }

333
composer.lock generated
View File

@ -4,20 +4,55 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "05240d1d4512f025e0b0352f78f43b64", "content-hash": "38e0149190743814b17bdc9e92da39f0",
"packages": [ "packages": [
{
"name": "chrosey/pico-theme-materializecss",
"version": "dev-picocms-v3",
"dist": {
"type": "path",
"url": "Packages/chrosey_materialize",
"reference": "12c8123b40e78416179c1fbc70535fc9181578f0"
},
"require": {
"picocms/pico": "^2.1||^v3.0.0-alpha.1"
},
"type": "pico-theme",
"extra": {
"installer-name": "pico-materializecss"
},
"license": [
"MIT"
],
"authors": [
{
"name": "Christian Seyfferth",
"email": "info@chrosey.de",
"role": "Developer"
}
],
"description": "PicoCMS Materializecss-Theme",
"homepage": "http://picocms.org/",
"keywords": [
"materializecss-theme",
"pico",
"pico-theme",
"picocms",
"picocms-theme"
]
},
{ {
"name": "erusev/parsedown", "name": "erusev/parsedown",
"version": "1.8.0-beta-7", "version": "1.7.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/erusev/parsedown.git", "url": "https://github.com/erusev/parsedown.git",
"reference": "fe7a50eceb4a3c867cc9fa9c0aa906b1067d1955" "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/fe7a50eceb4a3c867cc9fa9c0aa906b1067d1955", "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
"reference": "fe7a50eceb4a3c867cc9fa9c0aa906b1067d1955", "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -50,27 +85,24 @@
"markdown", "markdown",
"parser" "parser"
], ],
"time": "2019-03-17T18:47:21+00:00" "time": "2019-12-30T22:54:17+00:00"
}, },
{ {
"name": "erusev/parsedown-extra", "name": "erusev/parsedown-extra",
"version": "0.8.0-beta-1", "version": "0.8.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/erusev/parsedown-extra.git", "url": "https://github.com/erusev/parsedown-extra.git",
"reference": "e756b1bf8642ab1091403e902b0503f1cec7527d" "reference": "91ac3ff98f0cea243bdccc688df43810f044dcef"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/e756b1bf8642ab1091403e902b0503f1cec7527d", "url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/91ac3ff98f0cea243bdccc688df43810f044dcef",
"reference": "e756b1bf8642ab1091403e902b0503f1cec7527d", "reference": "91ac3ff98f0cea243bdccc688df43810f044dcef",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"erusev/parsedown": "^1.8.0|^1.8.0-beta-4", "erusev/parsedown": "^1.7.4"
"ext-dom": "*",
"ext-mbstring": "*",
"php": ">=5.3.6"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^4.8.35" "phpunit/phpunit": "^4.8.35"
@ -100,7 +132,7 @@
"parsedown", "parsedown",
"parser" "parser"
], ],
"time": "2018-05-08T21:54:32+00:00" "time": "2019-12-30T23:20:37+00:00"
}, },
{ {
"name": "phrozenbyte/pico-file-prefixes", "name": "phrozenbyte/pico-file-prefixes",
@ -211,24 +243,24 @@
}, },
{ {
"name": "picocms/pico", "name": "picocms/pico",
"version": "v2.1.1", "version": "v3.0.0-alpha.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/picocms/Pico.git", "url": "https://github.com/picocms/Pico.git",
"reference": "b49936fb3a389b89c1bca659b7841f34c04b95bd" "reference": "039dd4edb21386289ce1903a376e6a44b6a0d558"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/picocms/Pico/zipball/b49936fb3a389b89c1bca659b7841f34c04b95bd", "url": "https://api.github.com/repos/picocms/Pico/zipball/039dd4edb21386289ce1903a376e6a44b6a0d558",
"reference": "b49936fb3a389b89c1bca659b7841f34c04b95bd", "reference": "039dd4edb21386289ce1903a376e6a44b6a0d558",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"erusev/parsedown": "1.8.0-beta-7", "erusev/parsedown": "1.7.4",
"erusev/parsedown-extra": "0.8.0-beta-1", "erusev/parsedown-extra": "0.8.1",
"php": ">=5.3.6", "php": ">=7.0.8",
"symfony/yaml": "^2.8", "symfony/yaml": "^3.4",
"twig/twig": "^1.36" "twig/twig": "^2.12"
}, },
"suggest": { "suggest": {
"picocms/composer-installer": "This Composer plugin is responsible for installing Pico plugins and themes using the Composer package manager.", "picocms/composer-installer": "This Composer plugin is responsible for installing Pico plugins and themes using the Composer package manager.",
@ -238,8 +270,8 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.0.x-dev", "dev-master": "2.1.x-dev",
"dev-pico-2.1": "2.1.x-dev" "dev-pico-3.0": "3.0.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -290,20 +322,26 @@
"website", "website",
"yaml" "yaml"
], ],
"time": "2019-12-31T15:33:55+00:00" "funding": [
{
"url": "https://www.bountysource.com/teams/picocms",
"type": "custom"
}
],
"time": "2020-03-29T13:33:14+00:00"
}, },
{ {
"name": "picocms/pico-deprecated", "name": "picocms/pico-deprecated",
"version": "v2.1.1", "version": "v3.0.0-alpha.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/picocms/pico-deprecated.git", "url": "https://github.com/picocms/pico-deprecated.git",
"reference": "9554c025626bcba4f9160d3f2dabf18376402a1f" "reference": "62af9ec2bbe4eb37e590abeff336dc86cbb65e55"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/picocms/pico-deprecated/zipball/9554c025626bcba4f9160d3f2dabf18376402a1f", "url": "https://api.github.com/repos/picocms/pico-deprecated/zipball/62af9ec2bbe4eb37e590abeff336dc86cbb65e55",
"reference": "9554c025626bcba4f9160d3f2dabf18376402a1f", "reference": "62af9ec2bbe4eb37e590abeff336dc86cbb65e55",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -313,8 +351,8 @@
"type": "pico-plugin", "type": "pico-plugin",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.0.x-dev", "dev-master": "2.1.x-dev",
"dev-pico-2.1": "2.1.x-dev" "dev-pico-3.0": "3.0.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -353,75 +391,20 @@
"picocms", "picocms",
"picocms-plugin" "picocms-plugin"
], ],
"time": "2019-12-31T15:36:04+00:00" "time": "2020-03-29T13:20:25+00:00"
},
{
"name": "picocms/pico-theme",
"version": "v2.1.1",
"source": {
"type": "git",
"url": "https://github.com/picocms/pico-theme.git",
"reference": "a79b9875b1d2dd182617454ad73af3c7caa47682"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/picocms/pico-theme/zipball/a79b9875b1d2dd182617454ad73af3c7caa47682",
"reference": "a79b9875b1d2dd182617454ad73af3c7caa47682",
"shasum": ""
},
"require": {
"picocms/pico": "self.version"
},
"type": "pico-theme",
"extra": {
"installer-name": "default",
"branch-alias": {
"dev-master": "2.0.x-dev",
"dev-pico-2.1": "2.1.x-dev"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Daniel Rudolf",
"email": "picocms.org@daniel-rudolf.de",
"role": "Lead Developer"
},
{
"name": "The Pico Community",
"homepage": "http://picocms.org/"
},
{
"name": "Contributors",
"homepage": "https://github.com/picocms/pico-theme/graphs/contributors"
}
],
"description": "This is Pico's official default theme. Pico is a stupidly simple, blazing fast, flat file CMS.",
"homepage": "http://picocms.org/",
"keywords": [
"default-theme",
"pico",
"pico-theme",
"picocms",
"picocms-theme"
],
"time": "2019-12-31T15:37:35+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.13.1", "version": "v1.17.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -433,7 +416,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.13-dev" "dev-master": "1.17-dev"
} }
}, },
"autoload": { "autoload": {
@ -466,30 +449,126 @@
"polyfill", "polyfill",
"portable" "portable"
], ],
"time": "2019-11-27T13:56:44+00:00" "funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
}, },
{ {
"name": "symfony/yaml", "url": "https://github.com/fabpot",
"version": "v2.8.52", "type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-05-12T16:14:59+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.17.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "02c1859112aa779d9ab394ae4f3381911d84052b" "reference": "fa79b11539418b02fc5e1897267673ba2c19419c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/02c1859112aa779d9ab394ae4f3381911d84052b", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c",
"reference": "02c1859112aa779d9ab394ae4f3381911d84052b", "reference": "fa79b11539418b02fc5e1897267673ba2c19419c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.9", "php": ">=5.3.3"
"symfony/polyfill-ctype": "~1.8" },
"suggest": {
"ext-mbstring": "For best performance"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.8-dev" "dev-master": "1.17-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-05-12T16:47:27+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.4.40",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "8fef49ac1357f4e05c997a1f139467ccb186bffa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/8fef49ac1357f4e05c997a1f139467ccb186bffa",
"reference": "8fef49ac1357f4e05c997a1f139467ccb186bffa",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
"symfony/console": "<3.4"
},
"require-dev": {
"symfony/console": "~3.4|~4.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
} }
}, },
"autoload": { "autoload": {
@ -516,35 +595,49 @@
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-11-11T11:18:13+00:00" "funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-04-24T10:16:04+00:00"
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v1.42.4", "version": "v2.12.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/twigphp/Twig.git",
"reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152" "reference": "18772e0190734944277ee97a02a9a6c6555fcd94"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/e587180584c3d2d6cb864a0454e777bb6dcb6152", "url": "https://api.github.com/repos/twigphp/Twig/zipball/18772e0190734944277ee97a02a9a6c6555fcd94",
"reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152", "reference": "18772e0190734944277ee97a02a9a6c6555fcd94",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.5.0", "php": "^7.0",
"symfony/polyfill-ctype": "^1.8" "symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3"
}, },
"require-dev": { "require-dev": {
"psr/container": "^1.0", "psr/container": "^1.0",
"symfony/debug": "^3.4|^4.2", "symfony/phpunit-bridge": "^4.4|^5.0"
"symfony/phpunit-bridge": "^4.4@dev|^5.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.42-dev" "dev-master": "2.12-dev"
} }
}, },
"autoload": { "autoload": {
@ -568,7 +661,6 @@
}, },
{ {
"name": "Twig Team", "name": "Twig Team",
"homepage": "https://twig.symfony.com/contributors",
"role": "Contributors" "role": "Contributors"
}, },
{ {
@ -582,15 +674,20 @@
"keywords": [ "keywords": [
"templating" "templating"
], ],
"time": "2019-11-11T16:49:32+00:00" "time": "2020-02-11T15:31:23+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],
"aliases": [], "aliases": [],
"minimum-stability": "beta", "minimum-stability": "beta",
"stability-flags": [], "stability-flags": {
"chrosey/pico-theme-materializecss": 20,
"picocms/pico": 15,
"picocms/pico-deprecated": 15
},
"prefer-stable": true, "prefer-stable": true,
"prefer-lowest": false, "prefer-lowest": false,
"platform": [], "platform": [],
"platform-dev": [] "platform-dev": [],
"plugin-api-version": "1.1.0"
} }

View File

@ -12,19 +12,21 @@ timezone: Europe/Berlin # Your PHP installation might require you to manually sp
## ##
# Theme # Theme
# #
theme: chrosey # The name of your custom theme theme: pico-materializecss # The name of your custom theme
themes_url: themes_url:
~ # Pico will try to guess the URL to the themes dir of your installation; ~ # Pico will try to guess the URL to the themes dir of your installation;
# If this fails, override it here. Example: https://example.com/pico/themes/ # If this fails, override it here. Example: https://example.com/pico/themes/
theme_config: # Additional theme-specific config theme_config: # Additional theme-specific config
widescreen: true # Default theme: Use more horizontal space (i.e. make the site container wider) widescreen: false # Default theme: Use more horizontal space (i.e. make the site container wider)
color: default color: white # Color for Navbar and Footer
primary_color: orange # Color for Buttons and links if not defined
secondary_color: indigocategories # Color for Buttons and links if not defined
twig_config: # Twig template engine config twig_config: # Twig template engine config
autoescape: html # Let Twig escape variables by default autoescape: html # Let Twig escape variables by default
strict_variables: false # If set to true, Twig will bail out when unset variables are being used strict_variables: false # If set to true, Twig will bail out when unset variables are being used
charset: utf-8 # The charset used by Twig templates charset: utf-8 # The charset used by Twig templates
debug: ~ # Enable Twig's debug mode debug: ~ # Enable Twig's debug mode
cache: cache # Enable Twig template caching by specifying a path to a writable directory cache: false # Enable Twig template caching by specifying a path to a writable directory
auto_reload: true # Recompile Twig templates whenever the source code changes auto_reload: true # Recompile Twig templates whenever the source code changes
## ##

View File

@ -1,2 +1,2 @@
images_path: images/ images_path: images
images_url: ~ images_url: ~

View File

@ -4,7 +4,7 @@ Description: Das bin ich
Author: Christian Seyfferth Author: Christian Seyfferth
Date: 2020-01-21 Date: 2020-01-21
Robots: noindex,nofollow Robots: noindex,nofollow
Template: templates/index hasCode: true
--- ---
# Ich bin Christian und würde dir gern helfen # Ich bin Christian und würde dir gern helfen

View File

@ -4,7 +4,6 @@ Description: Konfigurationsseite
Author: Christian Seyfferth Author: Christian Seyfferth
Date: 2020-01-21 Date: 2020-01-21
Robots: noindex,nofollow Robots: noindex,nofollow
Template: templates/index
Hidden: true Hidden: true
--- ---

View File

@ -1,7 +1,5 @@
--- ---
hidden: true hidden: true
Template: templates/index
--- ---
Theme Styling Test Theme Styling Test

View File

@ -4,8 +4,20 @@ Description: Erster Blogeintrag mit PicoCMS
Author: Christian Seyfferth Author: Christian Seyfferth
Date: 2020-01-21 17:00 Date: 2020-01-21 17:00
Robots: noindex,nofollow Robots: noindex,nofollow
Template: templates/blog/item Categories:
category: Test - Homepage
Template: templates/blogitem
--- ---
# Hallo Welt # Hallo Welt
dies ist mein erster Blogeintrag
dies ist mein erster Blogeintrag.
Ich möchte einfach mal was neues ausprobieren. Da dachte ich mir, warum nicht ein CMS ohne Datenbank?
Da ich beruflich recht viel mit Markdown arbeite um Dokumentationen (Hallo Github etc.) zu schreiben, konnte ich feststellen, dass ich auch viele andere Sachen in diesem Format kann.
Also warum nicht auch meine Webseite damit pflegen.
Die ist ja eh so ein sonderfall für sich ;)

View File

@ -1,10 +0,0 @@
---
Title: Versteht mich nicht
Description: Zweiter Blogeintrag mit PicoCMS
Author: Christian Seyfferth
Date: 2020-01-22 19:00
Robots: noindex,nofollow
Template: templates/blog/item
---
# etwas Verwirrung
dies ist mein zweiter Blogeintrag

View File

@ -0,0 +1,21 @@
---
Title: Homepage-Fortschritt
Description: Es geht voran
Author: Christian Seyfferth
Date: 2020-05-06 19:00
Robots: noindex,nofollow
categories:
- Homepage
Template: templates/blogitem
---
# Fortschritt mit der Homepage
Langsam mache ich Fortschritte mit meinem Langzeit-Ziel.
- PicoCMS-Theme mit materialize.css &check;
- Links zu meinen Projekten
- Blog-Einträge
-

View File

@ -0,0 +1,87 @@
---
Title: Gitea und Drone
Description: Einrichtung einer CI/CD-Lösung auf der Diskstation
Author: Christian Seyfferth
Date: 2020-05-07 01:00
Categories:
- DevOps
Template: templates/blogitem
hasCode: true
---
# Task-Automatisierung mit der Diskstation
Einige haben ja, wie ich, zu Hause eine Diskstation von Synology stehen. Da ich selbst auch einige kleine Sachen programmiere,
wollte ich mir auch den Komfort wie auf Arbeit gönnen und automatisiert Pipelines starten.
Da ich aber nicht gleich eine Enterprise-Lösung wie GitLab einsetzen wollte, habe ich mir alternativen gesucht.
Und da die DS218+ ja genug Power für ein paar Docker-Container hat sieht diese Alternative folgendermaßen aus:
- Docker
- Gitea
- Drone-Server
- Drone-Runner
- Oauth
- Webhook
- Admin
## Gitea-Setup
Zuerst brauchen wir einen User unter dem Gitea laufen soll. Also legen wir im DSM einen Benutzer und eine Gruppe an. Den User richten wir direkt als Mitglied der Gruppe ein.
In meinem Fall habe ich beide `git` genannt.
Nun brauchen wir die IDs von beiden. Dafür gehe ich per SSH auf die Diskstation und suche mir die IDs zu beiden und das Homeverzeichnis des Users heraus. Letzteres brauchen wir später um gitea über ssh ansprechen zu können.
```bash
id git
#uid=1034(git) gid=100(users) groups=100(users),65540(git)
cat /etc/passwd | grep git
#git:x:1034:100:Gitea-Benutzer:/var/services/homes/git:/sbin/nologin
```
Hieraus habe ich folgende Infos erhalten:
| Name | Wert |
| ---- | ----------------------- |
| UID | 1034 |
| GID | 65540 |
| Home | /var/services/homes/git |
Wenn wir einmal beim User sind, richten wir direkt die möglichkeit für git-per-ssh ein.
```bash
HOMEDIR=/var/services/git
mkdir $GIT_HOMEDIR/.ssh
chown git:git $HOMEDIR/.ssh
```
Um GitCommandos an Gitea weiterzugeben, legen wir die Datei /app/gitea/gitea an und füllen sie.
```bash
mkdir -p /app/gitea
echo "#!/bin/sh" > /app/gitea/gitea
echo "ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND"=\$SSH_ORIGINAL_COMMAND\" $0 @0" >> /app/gitea/gitea
```
Weiterhin brauchen wir eine Datenbank. Ich arbeite hier mit der MariaDB v10, die eh auf der Diskstation läuft.
Also legen wir uns einen DB-User an und geben diesem Rechte auf eine ebenso anzulegende Datenbank.
Nun können wir Gitea im Docker starten:
```bash
docker run -d --name gitea \
-e DB_TYPE=mysql \
-e DB_HOST=127.20.0.1:3307 \
-e DB_NAME=gitea \
-e DB_PASSWD=passwort \
-e TZ=Europe/Berlin \
-e USER_UID=1034 \
-e USER_GID=65540 \
-e ROOT_URL=https://git.example.com/ \
-e SSH_DOMAIN=git.example.com \
-p 2222:22 \
-p 30180:3000 \
-v /var/services/homes/git/.ssh:/data/git/.ssh \
-v /volume1/docker/gitea/data:/data \
gitea/gitea
```

View File

@ -4,7 +4,7 @@ Description: Hier ist die Blog-Einstiegsseite
Author: Christian Seyfferth Author: Christian Seyfferth
Date: 2020-01-21 Date: 2020-01-21
Robots: noindex,nofollow Robots: noindex,nofollow
Template: templates/blog/index Template: templates/blog
--- ---
# Meine letzten Blogeinträge # Meine letzten Blogeinträge

4
content/feed.md Normal file
View File

@ -0,0 +1,4 @@
---
Template: templates/feed
hidden: true
---

View File

@ -4,16 +4,19 @@ Description: Startseite
Author: Christian Seyfferth Author: Christian Seyfferth
Date: 2020-01-21 Date: 2020-01-21
Robots: noindex,nofollow Robots: noindex,nofollow
Template: templates/index Template: templates/home
--- ---
# Hallo Welt # Hallo Welt
Willkommen auf meiner Seite. Ich hoffe sie gefällt dir. Willkommen auf meiner Seite. Ich hoffe sie gefällt dir.
Zur Zeit befindet sich die neue Seite noch voll im Aufbau. Also sei nicht zu streng mit mir. Dennoch freue ich mich über jegliche Art Rückmeldung. ;)
Sieh dich in Ruhe um, zum Beispiel was ich so zuletzt geschrieben habe, oder an was ich gerade arbeite. Sieh dich in Ruhe um, zum Beispiel was ich so zuletzt geschrieben habe, oder an was ich gerade arbeite.
Wenn du dir verloren vorkommst oder einfach nur etwas loswerden möchtest, bekommst du [hier][Kontakt] die Möglichkeit. Wenn du dir verloren vorkommst oder einfach nur etwas loswerden möchtest, bekommst du [hier][Kontakt] die Möglichkeit.
[Kontakt]: %base_url%/kontakt [Kontakt]: %base_url%/kontakt

View File

@ -4,7 +4,6 @@ Description: Kontaktformular
Author: Christian Seyfferth Author: Christian Seyfferth
Date: 2020-01-29 Date: 2020-01-29
Robots: noindex,nofollow Robots: noindex,nofollow
Template: templates/index
--- ---
# Kontakt # Kontakt

16
content/projects/index.md Normal file
View File

@ -0,0 +1,16 @@
---
Title: Projekte
Description: Daran arbeite ich
Author: Christian Seyfferth
Date: 2020-01-21
Robots: noindex,nofollow
---
# Projekte
- [Dienstplan to iCal](https://apps.chrosey.de/orchester_dienstplan/)
- [Wichtel-mini-app](https://apps.chrosey.de/wichteln/)
- [Schulnotenverwaltung](https://apps.chrosey.de/ags_noten)
- [Nextcloud](https://nextcloud.chrosey.de/)
- [Gitea](https://git.chrosey.de/)
- [Bar-Inventur-Rechner](https://apps.chrosey.de/inv/)

View File

@ -0,0 +1,16 @@
---
Title: DienstplanToIcal
Description: Eine kleine Webapp zur Konvertierung einer Excel-Datei ins ical-Format
Author: Christian Seyfferth
Date: 2020-05-06
Robots: noindex,nofollow
url: https://chrosey.de/apps/orchester_dienstplan
embed: true
---
# Dienstplan Converter
eine kleine Webapp in vue.js
- geschrieben für das Orchester im Theater Erfurt
Es liest aus einem bestimmtem Excel-Format Daten aus und erstellt daraus einen Terminkalender im ical-Format.
Dieser lässt sich herunterladen und für die Kollegen verteilen.

View File

@ -0,0 +1,10 @@
---
Title: Gitea
Description: Meine Gitea-Instanz, über die ich Projekte verwalte
Author: Christian Seyfferth
Date: 2020-05-06
Robots: noindex,nofollow
url: https://git.chrosey.de/
embed: true
---
# Gitea

View File

@ -0,0 +1,10 @@
---
Title: Nextcloud
Description: Meine Cloud, über die ich Daten bereitstelle, oder mit mir teilen lasse
Author: Christian Seyfferth
Date: 2020-05-06
Robots: noindex,nofollow
url: https://nextcloud.chrosey.de/
embed: true
---
# Nextcloud

View File

@ -4,8 +4,9 @@ Description: Inventur-App für Theatergastronomie zur Erleichterung der Arbeit f
Author: Christian Seyfferth Author: Christian Seyfferth
Date: 2020-01-29 Date: 2020-01-29
Robots: noindex,nofollow Robots: noindex,nofollow
Template: templates/project/item
url: https://chrosey.de/apps/inv url: https://chrosey.de/apps/inv
embed: true embed: true
--- ---
# Inventur-App
kleine Webanwendung, geschrieben mit vue.js.

View File

@ -1,17 +0,0 @@
---
Title: Meine Projekte
Description: Daran arbeite ich
Author: Christian Seyfferth
Date: 2020-01-21
Robots: noindex,nofollow
Template: templates/index
---
# Projekte
- Dienstplan to iCal
- Wichtel-mini-app
- Schulnotenverwaltung
- Nextcloud
- Gitea
- Bar-Inventur-Rechner

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 KiB

After

Width:  |  Height:  |  Size: 131 B

BIN
images/blog/2020/20200121.hallo-welt/thumbs/ich.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
images/blog/kuh.jpg (Stored with Git LFS) Normal file

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@ -0,0 +1,15 @@
<?php
class ChroseyImageVariants extends AbstractPicoPlugin
{
public function onPageRendering(&$templateName, array &$twigVariables)
{
// Create images array
$twigVariables['variants'] = $this->getImageVariants();
}
private function getImageVariants()
{
// code...
}
}

View File

@ -5,5 +5,12 @@
"test", "test",
"Christian Seyfferth", "Christian Seyfferth",
"error" "error"
],
[
"20\/05\/2020 19:30:22",
"info@chrosey.de",
"(kein Betreff)",
"Anonym",
"error"
] ]
] ]

View File

@ -1,4 +1,5 @@
<?php <?php
/** /**
* p01-contact - A simple contact forms manager. * p01-contact - A simple contact forms manager.
* *
@ -87,13 +88,13 @@ class P01contactField
} }
// value blacklisted or not in whitelist // value blacklisted or not in whitelist
if ($reason = $this->isBlacklisted()) { if ($reason = $this->isBlacklisted()) {
$this->error = 'field_'.$reason; $this->error = 'field_' . $reason;
return false; return false;
} }
// not empty but not valid // not empty but not valid
if (!empty($this->value) && !$this->isValid()) { if (!empty($this->value) && !$this->isValid()) {
$this->error = 'field_'.$this->type; $this->error = 'field_' . $this->type;
return false; return false;
} }
@ -145,7 +146,7 @@ class P01contactField
'secret' => $this->form->config('recaptcha_secret_key'), 'secret' => $this->form->config('recaptcha_secret_key'),
'response' => $answer, 'response' => $answer,
]; ];
$url = 'https://www.google.com/recaptcha/api/siteverify?'.http_build_query($params); $url = 'https://www.google.com/recaptcha/api/siteverify?' . http_build_query($params);
if (function_exists('curl_version')) { if (function_exists('curl_version')) {
$curl = curl_init($url); $curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_HEADER, false);
@ -204,30 +205,25 @@ class P01contactField
*/ */
public function html() public function html()
{ {
$id = 'p01-contact'.$this->form->getId().'_field'.$this->id; $id = 'p01-contact' . $this->form->getId() . '_field' . $this->id;
$name = 'p01-contact_fields['.$this->id.']'; $name = 'p01-contact_fields[' . $this->id . ']';
$type = $this->getGeneralType(); $type = $this->getGeneralType();
$orig = $type != $this->type ? $this->type : ''; $orig = $type != $this->type ? $this->type : '';
$value = $this->value; $value = $this->value;
$disabled = $this->locked ? ' disabled="disabled"' : ''; $disabled = $this->locked ? ' disabled="disabled"' : '';
$required = $this->required ? ' required ' : ''; $required = $this->required ? ' required ' : '';
$placeholder = $this->placeholder ? ' placeholder="'.$this->placeholder.'"' : ''; $placeholder = $this->placeholder ? ' placeholder="' . $this->placeholder . '"' : '';
$is_single_option = is_array($this->value) && 1 == count($this->value) ? 'inline' : ''; $is_single_option = is_array($this->value) && 1 == count($this->value) ? 'inline' : '';
$html = "<div class=\"row field {$is_single_option} {$type} {$orig} {$required}\">"; $html = "<div class=\"col s12 input-field {$is_single_option} {$type} {$orig} {$required}\">";
$html .= '<div class="col-sm-12 col-md-3">';
if ('' === $is_single_option) {
$html .= $this->htmlLabel($id);
}
$html .= '</div>';
$html .= '<div class="col-sm-12 col-md">';
switch ($type) { switch ($type) {
case 'textarea': case 'textarea':
$html .= '<textarea id="'.$id.'" rows="10" '; $html .= '<textarea id="' . $id . '" rows="10" ';
$html .= 'name="'.$name.'"'.$disabled.$required.$placeholder; $html .= 'class="materialize-textarea" ';
$html .= '>'.$value.'</textarea>'; $html .= 'name="' . $name . '"' . $disabled . $required . $placeholder;
$html .= '>' . $value . '</textarea>';
break; break;
case 'captcha': case 'captcha':
@ -238,7 +234,7 @@ class P01contactField
if (1 == $this->form->getId()) { if (1 == $this->form->getId()) {
$html .= '<script src="https://www.google.com/recaptcha/api.js"></script>'; $html .= '<script src="https://www.google.com/recaptcha/api.js"></script>';
} }
$html .= '<div class="g-recaptcha" id="'.$id.'" data-sitekey="'.$key.'"></div>'; $html .= '<div class="g-recaptcha" id="' . $id . '" data-sitekey="' . $key . '"></div>';
$html .= "<input type=\"hidden\" id=\"{$id}\" name=\"{$name}\" value=\"trigger\">"; $html .= "<input type=\"hidden\" id=\"{$id}\" name=\"{$name}\" value=\"trigger\">";
break; break;
@ -248,11 +244,11 @@ class P01contactField
foreach ($this->value as $i => $v) { foreach ($this->value as $i => $v) {
$selected = $this->isSelected($i) ? ' checked' : ''; $selected = $this->isSelected($i) ? ' checked' : '';
$v = !empty($v) ? $v : 'Default'; $v = !empty($v) ? $v : 'Default';
$html .= '<label class="option col-sm-12">'; $html .= '<p><label class="option col s12">';
$html .= "<input id=\"{$id}_option{$i}\""; $html .= "<input id=\"{$id}_option{$i}\"";
$html .= " type=\"{$type}\" class=\"{$type}\" name=\"{$name}\""; $html .= " type=\"{$type}\" class=\"{$type}\" name=\"{$name}\"";
$html .= " value=\"{$i}\"{$disabled}{$required}{$selected} />{$v}"; $html .= " value=\"{$i}\"{$disabled}{$required}{$selected} /><span>{$v}</span>";
$html .= '</label>'; $html .= '</label></p>';
} }
$html .= '</div>'; $html .= '</div>';
@ -263,20 +259,21 @@ class P01contactField
$value = !empty($v) ? $v : 'Default'; $value = !empty($v) ? $v : 'Default';
$selected = $this->isSelected($i) ? ' selected="selected"' : ''; $selected = $this->isSelected($i) ? ' selected="selected"' : '';
$html .= "<option id=\"{$id}_option{$i}\" value=\"{$i}\"{$selected}>"; $html .= "<option id=\"{$id}_option{$i}\" value=\"{$i}\"{$selected}>";
$html .= $value.'</option>'; $html .= $value . '</option>';
} }
$html .= '</select>'; $html .= '</select>';
break; break;
default: default:
$html .= '<input id="'.$id.'" '; $html .= '<input id="' . $id . '" ';
$html .= 'name="'.$name.'" type="'.$type.'" '; $html .= 'name="' . $name . '" type="' . $type . '" ';
$html .= 'value="'.$value.'"'.$disabled.$required.$placeholder.' />'; $html .= 'value="' . $value . '"' . $disabled . $required . $placeholder . ' />';
break; break;
} }
if ('' === $is_single_option) {
$html .= '</div>'; $html .= $this->htmlLabel($id);
}
$html .= '</div>'; $html .= '</div>';
return $html; return $html;
@ -294,7 +291,7 @@ class P01contactField
$emphasis = $this->value ? 'font-weight:bold' : 'font-style:italic'; $emphasis = $this->value ? 'font-weight:bold' : 'font-style:italic';
$html .= "\n\n\n"; $html .= "\n\n\n";
$html .= '<tr style="background-color: #eeeeee">'; $html .= '<tr style="background-color: #eeeeee">';
$html .= '<td style="padding: .5em .75em"><span style="'.$emphasis.'">'; $html .= '<td style="padding: .5em .75em"><span style="' . $emphasis . '">';
$html .= $this->title ? $this->title : ucfirst($this->form->lang($this->type)); $html .= $this->title ? $this->title : ucfirst($this->form->lang($this->type));
$html .= '</span></td>'; $html .= '</span></td>';
$html .= "\t\t"; $html .= "\t\t";
@ -302,7 +299,7 @@ class P01contactField
// properties // properties
$html .= '<td style="padding:.5em 1em; text-transform:lowercase; text-align:right; font-size:.875em; color:#888888; vertical-align: middle"><em>'; $html .= '<td style="padding:.5em 1em; text-transform:lowercase; text-align:right; font-size:.875em; color:#888888; vertical-align: middle"><em>';
if (!$this->value) { if (!$this->value) {
$html .= $this->form->lang('empty').' '; $html .= $this->form->lang('empty') . ' ';
} }
if ($this->title) { if ($this->title) {
$properties[] = $this->type; $properties[] = $this->type;
@ -316,15 +313,15 @@ class P01contactField
} }
} }
if (count($properties)) { if (count($properties)) {
$html .= '('.implode(', ', $properties).') '; $html .= '(' . implode(', ', $properties) . ') ';
} }
$html .= '#'.$this->id; $html .= '#' . $this->id;
$html .= '</em></td></tr>'; $html .= '</em></td></tr>';
$html .= "\n\n"; $html .= "\n\n";
// value // value
if (!$this->value) { if (!$this->value) {
return $html.'</table>'; return $html . '</table>';
} }
$html .= '<tr><td colspan=2 style="padding:0">'; $html .= '<tr><td colspan=2 style="padding:0">';
$html .= '<div style="padding:.5em 1.5em;border:1px solid #ccc">'; $html .= '<div style="padding:.5em 1.5em;border:1px solid #ccc">';
@ -340,7 +337,7 @@ class P01contactField
$html .= '<div style="color:#ccc; font-style:italic">'; $html .= '<div style="color:#ccc; font-style:italic">';
$checkmark = '&#9744;'; $checkmark = '&#9744;';
} }
$html .= '<span style="font-size:1.5em; vertical-align:middle; margin-right:.5em; font-style:normal">'.$checkmark.'</span>'; $html .= '<span style="font-size:1.5em; vertical-align:middle; margin-right:.5em; font-style:normal">' . $checkmark . '</span>';
$html .= empty($v) ? 'Default' : $v; $html .= empty($v) ? 'Default' : $v;
$html .= "</div>\n"; $html .= "</div>\n";
} }
@ -371,17 +368,17 @@ class P01contactField
*/ */
private function htmlLabel($for) private function htmlLabel($for)
{ {
$html .= '<label for="'.$for.'" class="doc">'; $html .= '<label for="' . $for . '" class="doc validate">';
if ($this->title) { if ($this->title) {
$html .= $this->title; $html .= $this->title;
} else { } else {
$html .= ucfirst($this->form->lang($this->type)); $html .= ucfirst($this->form->lang($this->type));
} }
if ($this->description) { if ($this->description) {
$html .= ' <em class="description">'.$this->description.'</em>'; $html .= ' <em class="description">' . $this->description . '</em>';
} }
if ($this->error) { if ($this->error) {
$html .= ' <span class="error-msg">'.$this->form->lang($this->error).'</span>'; $html .= ' <span class="error-msg">' . $this->form->lang($this->error) . '</span>';
} }
$html .= '</label>'; $html .= '</label>';
@ -409,7 +406,7 @@ class P01contactField
function preint($arr, $return = false) function preint($arr, $return = false)
{ {
$out = '<pre class="test" style="white-space:pre-wrap;">'.print_r(@$arr, true).'</pre>'; $out = '<pre class="test" style="white-space:pre-wrap;">' . print_r(@$arr, true) . '</pre>';
if ($return) { if ($return) {
return $out; return $out;
} }
@ -417,9 +414,9 @@ function preint($arr, $return = false)
} }
function predump($arr) function predump($arr)
{ {
echo'<pre class="test" style="white-space:pre-wrap;">'; echo '<pre class="test" style="white-space:pre-wrap;">';
var_dump($arr); var_dump($arr);
echo'</pre>'; echo '</pre>';
} }
function unset_r($a, $i) function unset_r($a, $i)
{ {

View File

@ -1,4 +1,5 @@
<?php <?php
/** /**
* p01-contact - A simple contact forms manager. * p01-contact - A simple contact forms manager.
* *
@ -88,8 +89,10 @@ class P01contactForm
*/ */
public function post() public function post()
{ {
if (empty($_POST['p01-contact_form']) if (
|| $_POST['p01-contact_form']['id'] != $this->id) { empty($_POST['p01-contact_form'])
|| $_POST['p01-contact_form']['id'] != $this->id
) {
return; return;
} }
@ -160,9 +163,10 @@ class P01contactForm
public function html() public function html()
{ {
$html = '<div class="section">'; $html = '<div class="section">';
$html .= '<form action="'.PAGEURL.'#p01-contact'.$this->id.'" autocomplete="off" '; $html .= '<form action="' . PAGEURL . '#p01-contact' . $this->id . '" autocomplete="off" ';
$html .= 'id="p01-contact'.$this->id.'" class="p01-contact" method="post">'; $html .= 'id="p01-contact' . $this->id . '" class="p01-contact" method="post">';
$html .= "<div class=\"row\">";
if ($this->status) { if ($this->status) {
$html .= $this->htmlStatus(); $html .= $this->htmlStatus();
} }
@ -173,10 +177,12 @@ class P01contactForm
if ($this->config('use_honeypot')) { if ($this->config('use_honeypot')) {
$html .= '<input type="checkbox" name="p01-contact_fields[totally_legit]" value="1" style="display:none !important" tabindex="-1" autocomplete="false">'; $html .= '<input type="checkbox" name="p01-contact_fields[totally_legit]" value="1" style="display:none !important" tabindex="-1" autocomplete="false">';
} }
$html .= '<div><input name="p01-contact_form[id]" type="hidden" value="'.$this->id.'" />'; $html .= '<div><input name="p01-contact_form[id]" type="hidden" value="' . $this->id . '" />';
$html .= '<input name="p01-contact_form[token]" type="hidden" value="'.$this->getToken().'" />'; $html .= '<input name="p01-contact_form[token]" type="hidden" value="' . $this->getToken() . '" />';
$html .= '<input class="submit" type="submit" value="'.$this->lang('send').'" /></div>'; $html .= '<button class="btn waves-effect waves-light submit" type="submit" value="' . $this->lang('send') . '">' . $this->lang('send') . '<i class="material-icons right">send</i></button></div>';
} }
$html .= '</div>';
$html .= '</form>'; $html .= '</form>';
$html .= '</div>'; $html .= '</div>';
@ -206,7 +212,7 @@ class P01contactForm
if ($post) { if ($post) {
list($headers, $targets, $subject, $text_content, $html_content) = $post; list($headers, $targets, $subject, $text_content, $html_content) = $post;
$out .= '<h3>Virtually sent mail :</h3>'; $out .= '<h3>Virtually sent mail :</h3>';
$out .= '<pre>'.htmlspecialchars($headers).'</pre>'; $out .= '<pre>' . htmlspecialchars($headers) . '</pre>';
$out .= "<pre>Targets: {$targets}\nSubject: {$subject}</pre>"; $out .= "<pre>Targets: {$targets}\nSubject: {$subject}</pre>";
$out .= "Text content : <pre>{$text_content}</pre>"; $out .= "Text content : <pre>{$text_content}</pre>";
$out .= "HTML content : <div style=\"border:1px solid #ccc;\">{$html_content}</div>"; $out .= "HTML content : <div style=\"border:1px solid #ccc;\">{$html_content}</div>";
@ -272,7 +278,7 @@ class P01contactForm
$targets = implode(',', $this->targets); $targets = implode(',', $this->targets);
$encoded_subject = $this->encodeHeader($subject); $encoded_subject = $this->encodeHeader($subject);
$mime_boundary = '----'.md5(time()); $mime_boundary = '----' . md5(time());
$headers = $this->mailHeaders($name, $email, $mime_boundary); $headers = $this->mailHeaders($name, $email, $mime_boundary);
$content = $this->mailContent($text, 'plain', $mime_boundary); $content = $this->mailContent($text, 'plain', $mime_boundary);
@ -525,7 +531,7 @@ class P01contactForm
{ {
$statusclass = $this->sent ? 'alert success' : 'alert failed'; $statusclass = $this->sent ? 'alert success' : 'alert failed';
return '<div class="'.$statusclass.'">'.$this->lang($this->status).'</div>'; return '<div class="' . $statusclass . '">' . $this->lang($this->status) . '</div>';
} }
/** /**
@ -540,7 +546,7 @@ class P01contactForm
private function mailHeaders($name, $email, $mime_boundary) private function mailHeaders($name, $email, $mime_boundary)
{ {
$encoded_name = $this->encodeHeader($name); $encoded_name = $this->encodeHeader($name);
$headers = "From: {$encoded_name} <no-reply@".SERVERNAME.">\n"; $headers = "From: {$encoded_name} <no-reply@" . SERVERNAME . ">\n";
if ($email) { if ($email) {
$headers .= "Reply-To: {$encoded_name} <{$email}>\n"; $headers .= "Reply-To: {$encoded_name} <{$email}>\n";
$headers .= "Return-Path: {$encoded_name} <{$email}>"; $headers .= "Return-Path: {$encoded_name} <{$email}>";
@ -548,7 +554,7 @@ class P01contactForm
$headers .= "\n"; $headers .= "\n";
$headers .= "MIME-Version: 1.0\n"; $headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: multipart/alternative; boundary=\"{$mime_boundary}\"\n"; $headers .= "Content-type: multipart/alternative; boundary=\"{$mime_boundary}\"\n";
$headers .= 'X-Mailer: PHP/'.phpversion()."\n"; $headers .= 'X-Mailer: PHP/' . phpversion() . "\n";
return $headers; return $headers;
} }
@ -568,7 +574,7 @@ class P01contactForm
$head .= "Content-Type: text/{$type}; charset=UTF-8\n"; $head .= "Content-Type: text/{$type}; charset=UTF-8\n";
$head .= "Content-Transfer-Encoding: 7bit\n\n"; $head .= "Content-Transfer-Encoding: 7bit\n\n";
return $head.$content."\n"; return $head . $content . "\n";
} }
/** /**

View File

@ -1,3 +1,4 @@
/*
.p01-contact * { .p01-contact * {
box-sizing: border-box; box-sizing: border-box;
} }
@ -98,3 +99,4 @@ textarea:invalid {
border-color: #ebccd1; border-color: #ebccd1;
} }
*/

View File

@ -1,12 +1,13 @@
<?php <?php
/** /**
* Get the images of the current page with {{ images }} in Pico CMS. * Get the images of the current page with {{ images }} in Pico CMS.
* Edited September 2018 by Brian Goncalves * Edited September 2018 by Brian Goncalves.
* *
* @author Nicolas Liautaud <contact@nliautaud.fr> * @author Nicolas Liautaud <contact@nliautaud.fr>
* @license http://opensource.org/licenses/MIT The MIT License * @license http://opensource.org/licenses/MIT The MIT License
* @link http://nliautaud.fr *
* @link http://picocms.org * @see http://nliautaud.fr
* @see http://picocms.org
*/ */
class PicoPagesImages extends AbstractPicoPlugin class PicoPagesImages extends AbstractPicoPlugin
{ {
@ -16,7 +17,7 @@ class PicoPagesImages extends AbstractPicoPlugin
/** /**
* Register path relative to content without index and extension * Register path relative to content without index and extension
* var/html/content/foo/bar.md => foo/bar/ * var/html/content/foo/bar.md => foo/bar/.
* *
* Triggered after Pico has discovered the content file to serve * Triggered after Pico has discovered the content file to serve
* *
@ -36,29 +37,33 @@ class PicoPagesImages extends AbstractPicoPlugin
} }
$contentExt = $this->getConfig('content_ext'); $contentExt = $this->getConfig('content_ext');
$this->path = substr($file, $contentDirLength); $this->path = substr($file, $contentDirLength);
$this->path = rtrim($this->path, "index$contentExt"); $this->path = rtrim($this->path, "index{$contentExt}");
$this->path = rtrim($this->path, $contentExt); $this->path = rtrim($this->path, $contentExt);
if ($this->path) { if ($this->path) {
$this->path .= '/'; $this->path .= '/';
} }
} }
/** /**
* Triggered after Pico has read its configuration * Triggered after Pico has read its configuration.
* *
* @see Pico::getConfig() * @see Pico::getConfig()
*
* @param array &$config array of config variables * @param array &$config array of config variables
*
* @return void * @return void
*/ */
public function onConfigLoaded(array &$config) public function onConfigLoaded(array &$config)
{ {
if (!empty($config['images_path'])) { if (!empty($config['images_path'])) {
$this->root = rtrim($config['images_path'], '/') . '/'; $this->root = rtrim($config['images_path'], '/').'/';
} else { } else {
$this->root = 'images/'; $this->root = 'images/';
} }
} }
/** /**
* Triggered before Pico renders the page * Triggered before Pico renders the page.
* *
* @see DummyPlugin::onPageRendered() * @see DummyPlugin::onPageRendered()
* *
@ -72,6 +77,7 @@ class PicoPagesImages extends AbstractPicoPlugin
// Create images array // Create images array
$twigVariables['images'] = $this->getImages(); $twigVariables['images'] = $this->getImages();
} }
/** /**
* Return the list and infos of images in the current directory. * Return the list and infos of images in the current directory.
* *
@ -79,46 +85,47 @@ class PicoPagesImages extends AbstractPicoPlugin
*/ */
private function getImages() private function getImages()
{ {
$images_path = $this->root . $this->path; $images_path = $this->root.$this->path;
// Filter images path for extra slashes // Filter images path for extra slashes
$images_path = preg_replace('/(\/+)/','/',$images_path); $images_path = preg_replace('/(\/+)/', '/', $images_path);
$data = array(); $data = [];
$pattern = '*.{[jJ][pP][gG],[jJ][pP][eE][gG],[pP][nN][gG],[gG][iI][fF]}'; $pattern = '*.{[jJ][pP][gG],[jJ][pP][eE][gG],[pP][nN][gG],[gG][iI][fF]}';
$images = glob($images_path . $pattern, GLOB_BRACE); $images = glob($images_path.$pattern, GLOB_BRACE);
$meta = array(); $meta = [];
if (!is_array($images)) { if (!is_array($images)) {
return array(); return [];
} }
foreach ($images as $path) { foreach ($images as $path) {
$imagesize = getimagesize($path); $imagesize = getimagesize($path);
if (!is_array($imagesize)) { if (!is_array($imagesize)) {
$imagesize = array(); $imagesize = [];
} }
list($width, $height,, $size) = array_pad($imagesize, 4, ''); list($width, $height, , $size) = array_pad($imagesize, 4, '');
// Find meta files for images if they exist // Find meta files for images if they exist
$metapath = $path . '.meta.yml'; $metapath = $path.'.meta.yml';
if (is_file($metapath)) { if (is_file($metapath)) {
$yamlparser = $this->getPico()->getYamlParser(); $yamlparser = $this->getPico()->getYamlParser();
$meta = $yamlparser->parse(file_get_contents($metapath)); $meta = $yamlparser->parse(file_get_contents($metapath));
} }
$data[] = array ( $data[] = [
'url' => $this->getBaseUrl() . $images_path . pathinfo($path, PATHINFO_BASENAME), 'url' => $this->getBaseUrl().$images_path.pathinfo($path, PATHINFO_BASENAME),
'preview' => $this->getBaseUrl().pathinfo($path, PATHINFO_DIRNAME).'/thumbs/'.pathinfo($path, PATHINFO_BASENAME),
'basename' => pathinfo($path, PATHINFO_BASENAME),
'path' => $images_path, 'path' => $images_path,
'name' => pathinfo($path, PATHINFO_FILENAME), 'name' => pathinfo($path, PATHINFO_FILENAME),
'ext' => pathinfo($path, PATHINFO_EXTENSION), 'ext' => pathinfo($path, PATHINFO_EXTENSION),
'width' => $width, 'width' => $width,
'height' => $height, 'height' => $height,
'size' => $size, 'size' => $size,
'meta' => $meta 'meta' => $meta,
); ];
} }
return $data; return $data;
} }
} }

1
themes/.gitignore vendored
View File

@ -1,2 +1,3 @@
# You should add themes installed by Composer here # You should add themes installed by Composer here
/default /default
/*

View File

@ -1,67 +0,0 @@
Pico Default Theme
==================
This is the repository of Pico's official default theme.
Pico is a stupidly simple, blazing fast, flat file CMS. See http://picocms.org/ for more info.
Please refer to [`picocms/Pico`](https://github.com/picocms/Pico) to get info about how to contribute or getting help.
Screenshot
----------
![Pico Screenshot](https://picocms.github.io/screenshots/pico-21.png)
Install
-------
You usually don't have to install this theme manually, it's shipped together with [Pico's pre-built release packages](https://github.com/picocms/Pico/releases/latest) and a default dependency of [`picocms/pico-composer`](https://github.com/picocms/pico-composer).
If you're using a custom theme, you can safely remove this theme.
If you use a `composer`-based installation of Pico and want to either remove or install Pico's default theme, simply open a shell on your server and navigate to Pico's install directory (e.g. `/var/www/html`). Run `composer remove picocms/pico-theme` to remove the theme, or run `composer require picocms/pico-theme` (via [Packagist.org](https://packagist.org/packages/picocms/pico-theme)) to install the theme.
If you rather use one of Pico's pre-built release packages, it is best to simply leave Pico's default theme as it is - it won't hurt... :wink: The reason for this is, that the theme is part of Pico's pre-built release packages, thus it will be automatically re-installed when updating Pico. However, if you really want to remove the theme, simply delete the `themes/default` directory in Pico's install directory (e.g. `/var/www/html`). If you want to install Pico's default theme, you must first create a empty `themes/default` directory on your server, [download the version of the theme](https://github.com/picocms/pico-theme/releases) matching the version of your Pico installation and upload all containing files (i.a. `index.twig`) into said `themes/default` directory (resulting in `themes/default/index.twig`).
The versioning of Pico's default theme strictly follows the version of Pico's core. You *must not* use a version of the theme that doesn't match the version of Pico's core (e.g. version 2.0.1 is *not compatible* with Pico 2.0.0). If you're using a `composer`-based installation of Pico, simply use a version constaint like `^2.0` - `picocms/pico-theme` ensures that its version matches Pico's version. Even if you're using one of Pico's pre-built release packages, you don't have to take care of anything - a matching version of the theme is part of Pico's pre-built release packages anyway.
Usage
-----
Pico's default theme isn't really intended to be used for a productive website, it's rather a starting point for creating your own theme. Simply copy the theme's directory (`themes/default/` to e.g. `themes/my_theme/`) and add the following line to your `config/config.yml`:
```yaml
theme: my_theme
```
You can now edit the theme's stylesheets and JavaScript to fit your needs. If you rather want to use a third-party theme, simply add the theme's directory to your `themes/` directory (e.g. `themes/some_other_theme/`) and update your `config/config.yml` accordingly. Pico's default theme is now completely disabled and won't ever interfere with your custom theme or your website in general anymore. If you want to use Pico's default theme again, either remove the line or replace it by `theme: default`.
Anyway, since Pico's default theme is meant to be a starting point for your own theme, it demonstrates how themes can allow one to tweak a theme's behavior. For this reason it supports a "Widescreen" mode: By adding `theme_config.widescreen: true` to your `config/config.yml`, the theme's main container grows from 768px to 1152px breadth due to adding `class="widescreen"` to the website's `<body>` element. Pico's default theme furthermore supports displaying both a logo and a tagline in its header, as well as adding social buttons to its footer. Rather than using Pico's config for this, it uses the YAML Frontmatter of the `content/_meta.md` Markdown file. Here's `content/_meta.md` from Pico's sample contents:
```yaml
---
Logo: %theme_url%/img/pico-white.svg
Tagline: Making the web easy.
Social:
- title: Visit us on GitHub
url: https://github.com/picocms/Pico
icon: octocat
- title: Join us on Freenode IRC Webchat
url: https://webchat.freenode.net/?channels=%23picocms
icon: chat
---
```
You should also check out the theme's `pico-theme.yml`: First of all it tells Pico to use the latest API version for themes and adjusts Pico's default Twig config. But more importantly it also registers the mentioned `widescreen` theme config as well as the meta headers `Logo`, `Tagline` and `Social`.
Getting Help
------------
Please refer to the ["Getting Help" section](https://github.com/picocms/Pico#getting-help) of our main repository.
Contributing
------------
Please refer to the ["Contributing" section](https://github.com/picocms/Pico#contributing) of our main repository.
By contributing to Pico, you accept and agree to the *Developer Certificate of Origin* for your present and future contributions submitted to Pico. Please refer to the ["Developer Certificate of Origin" section](https://github.com/picocms/Pico/blob/master/CONTRIBUTING.md#developer-certificate-of-origin) in the `CONTRIBUTING.md` of our main repository.

View File

@ -1,38 +0,0 @@
{
"name": "picocms/pico-theme",
"type": "pico-theme",
"description": "This is Pico's official default theme. Pico is a stupidly simple, blazing fast, flat file CMS.",
"keywords": [ "pico", "picocms", "picocms-theme", "pico-theme", "default-theme" ],
"homepage": "http://picocms.org/",
"license": "MIT",
"authors": [
{
"name": "Daniel Rudolf",
"email": "picocms.org@daniel-rudolf.de",
"role": "Lead Developer"
},
{
"name": "The Pico Community",
"homepage": "http://picocms.org/"
},
{
"name": "Contributors",
"homepage": "https://github.com/picocms/pico-theme/graphs/contributors"
}
],
"support": {
"docs": "http://picocms.org/themes/default/",
"issues": "https://github.com/picocms/pico-theme/issues",
"source": "https://github.com/picocms/pico-theme"
},
"require": {
"picocms/pico": "self.version"
},
"extra": {
"installer-name": "default",
"branch-alias": {
"dev-master": "2.0.x-dev",
"dev-pico-2.1": "2.1.x-dev"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,349 +0,0 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

View File

@ -1,97 +0,0 @@
@import url('https://fonts.googleapis.com/css?family=Alegreya|Caveat|Lato&display=swap');
html {
font-family: 'Lato', sans-serif;
}
html,
body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
}
header {
border-bottom: 0;
}
body>.container {
flex: 1 0 auto;
margin: 0;
}
body>.container>.row {
height: 100%
}
h1,
h2,
h3,
h4,
h5,
h6,
.site-title {
font-family: Alegreya;
}
.site-title {
font-size: 1.6em;
line-height: 1.2;
}
.field input[type="text"],
.field input[type="email"],
.field textarea {
width: 95%;
}
footer {
flex-shrink: 0;
border-top: 0;
}
/**
* Blog Section
*/
.blog-entry {
margin-bottom: 3em;
display: flex;
}
.blog-entry .img {
display: block;
height: 150px;
width: 150px;
background-color: var(--secondary-fore-color);
border-radius: 50%;
}
.blog-entry .text {
position: relative;
width: 100%;
width: calc(100% - 200px);
padding-left: 2em;
}
.blog-entry .text h3 {
margin-top: 0;
margin-bottom: .8em;
font-size: 1.6em;
}
.meta-wrap {
display: block;
}
.meta-wrap .meta span:nth-child(2n-1) {
color: var(--secondary-fore-color);
}
.row.field {
align-items: center;
}

View File

@ -1,35 +0,0 @@
{% extends "templates/layout/base.twig" %}
{% block content %}
{{ parent() }}
<section class="articles">
{% for page in pages(current_page.id, depth=3)|sort_by("time")|reverse if not page.hidden %}
<article class="blog-entry">
<a href="{{ page.url }}">
<img src=" {{ config.images_path }}{{ page.id }}"
alt="{{ page.images.0.alt }}"
class="img">
</a>
<div class="text">
<h3>{{ page.title }}</h3>
<div class="meta-wrap">
<p class="meta">
<span> {{ page.meta.date_formatted }}</span>
{% if page.meta.category %}
&middot;
<span> {{ page.meta.category }}</span>
{% endif %}
</p>
</div>
<p>{{ page.description }}</p>
<a href="{{ page.url }}">Weiterlesen ></a>
</div>
</article>
{% endfor %}
</section>
{% endblock %}

View File

@ -1,31 +0,0 @@
{% extends "templates/layout/base.twig" %}
{% block content %}
{{ parent() }}
<section>
<div class="blog-navigation">
<a class="button"
href="{{ "blog"|link }}">Zurück</a>
</div>
</section>
{% endblock %}
{% block aside %}
{% for image in images %}
{% if image.meta %}
<figure>
{% endif %}
<img class="rounded shadowed"
src="{{ image.url }}"
alt="{{ image.name }}"
{{ image.size }}>
{% if image.meta %}
<figcaption>{{ image.meta.title }} ({{ image.meta.year }})<br />{{ image.meta.description }}</figcaption>
</figure>
{% endif %}
{% endfor %}
{% endblock %}

View File

@ -1,8 +0,0 @@
{% extends "templates/layout/base.twig" %}
{% block aside %}
{% include "templates/widgets/bloglist.twig" %}
{% endblock %}

View File

@ -1,79 +0,0 @@
<!DOCTYPE html>
<html class="no-js">
<head>
{% block head %}
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1, user-scalable=no" />
<title>
{% if meta.title %}
{{ meta.title }}
|
{% endif %}
{{ site_title }}</title>
{% if meta.description %}
<meta name="description"
content="{{ meta.description|striptags }}" />
{% endif %}
{% if meta.robots %}
<meta name="robots"
content="{{ meta.robots }}" />
{% endif %}
{% if current_page %}
<link rel="canonical"
href="{{ current_page.url }}" />
{% endif %}
<link rel="stylesheet"
href="{{ theme_url }}/css/mini-{{ config.theme_config.color }}.min.css">
<link rel="stylesheet"
href="{{ theme_url }}/css/style.css"
type="text/css" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/themes/prism-tomorrow.min.css"
rel="stylesheet" />
{% endblock %}
</head>
<body>
{% include "templates/layout/header.twig" %}
<div class="container">
<div class="row">
<nav class="col-sm-12 col-md-3 col-lg-2">
{% include "templates/layout/navigationBar.twig" %}
</nav>
<main class="col-sm-12 col-md-6 col-lg-6">
{% block content %}
<section>
{{ content }}
</section>
{% endblock %}
</main>
<aside class="col-sm-12 col-md-2 col-lg-2">
<div class="row">
<div class="col-sm-12">
{% block aside %}
<section>
{{ aside }}
</section>
{% endblock %}
</div>
</div>
</aside>
</div>
</div>
{% include "templates/layout/footer.twig" %}
<script src="{{ theme_url }}/js/site.js"
type="text/javascript">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/plugins/autoloader/prism-autoloader.min.js">
</script>
</body>
</html>

View File

@ -1,13 +0,0 @@
<footer class="">
<div class="container ">
<span>&copy; 2013 - {{ now|date("Y") }} by chrosey</span>
<span>|</span>
<span>powered by <a href="http://picocms.org/">picoCMS</a></span>
<span>|
</span>
<span>
{% block footer %}
{% endblock %}
</span>
</div>
</footer>

View File

@ -1,15 +0,0 @@
<header clas="sticky container">
<div class="row">
<div class="col-md-offset-3">
<a href="{{ "index"|link }}"
class="logo">
<img src="{{ theme_url }}/img/logo.svg "
alt=""
height="32"
width="32" />
<span class="site-title">{{ site_title }}</span>
</a>
</div>
</div>
</header>

View File

@ -1,14 +0,0 @@
{% block navigation %}
<a class="nav-item"
href="{{ "index"|link }}">Startseite</a>
{% for page in pages("index") if not page.hidden %}
<a class="nav-item sublink-1"
href="{{ page.url }}">{{ page.title }}</a>
{% for subpage in pages(page.id) if not subpage.hidden and not subpage.meta.type == "news" %}
<a class="nav-item sublink-2"
href="{{ subpage.url }}">{{ subpage.title }}</a>
{% endfor %}
{% endfor %}
{% endblock %}

View File

@ -1,33 +0,0 @@
{% extends "templates/layout/base.twig" %}
{% block content %}
{{ parent() }}
{% if meta.embed %}
<iframe src="{{ meta.url }}"
frameborder="0"
style="width:100%; height:80vh;"></iframe>
{% endif %}
{% endblock %}
{% block aside %}
{% for image in images %}
{% if image.meta %}
<figure>
{% endif %}
<img class="rounded shadowed"
src="{{ image.url }}"
alt="{{ image.name }}"
{{ image.size }}>
{% if image.meta %}
<figcaption>{{ image.meta.title }} ({{ image.meta.year }})<br />{{ image.meta.description }}</figcaption>
</figure>
{% endif %}
{% endfor %}
{% endblock %}

View File

@ -1,11 +0,0 @@
<div class="card fluid">
<div class="section">
<h3>Letzte Blogeinträge</h3>
<ul>
{% for page in pages("blog", depth=3)|sort_by("time")|reverse|slice(0,5) if not page.hidden %}
<li>{{ page.title }}</li>
{% endfor %}
</ul>
</div>
</div>