Compare commits

..

No commits in common. "picocms-v3" and "master" have entirely different histories.

78 changed files with 3472 additions and 22471 deletions

2
.gitattributes vendored
View File

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

View File

@ -1 +0,0 @@
node_modules

View File

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

View File

@ -1,19 +0,0 @@
{
"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

@ -1,80 +0,0 @@
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;
}
}
*/

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,15 +0,0 @@
{% 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

@ -1,50 +0,0 @@
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

@ -1,31 +0,0 @@
{% 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

@ -1,18 +0,0 @@
{% 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

@ -1,7 +0,0 @@
{% 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

@ -1,19 +0,0 @@
{% 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

@ -1,18 +0,0 @@
{% 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

@ -1,29 +0,0 @@
<?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

@ -1,15 +0,0 @@
{% 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

@ -1,64 +0,0 @@
<!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

@ -1,19 +0,0 @@
<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

@ -1,61 +0,0 @@
<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>

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

Binary file not shown.

View File

@ -1,29 +1,36 @@
{
"name": "chrosey/homepage",
"name": "picocms/pico-composer",
"type": "project",
"description": "Homepage based on PicoCMS",
"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.",
"keywords": ["pico", "picocms", "pico-cms", "simple", "flat-file", "cms", "content-management", "website", "markdown-to-html", "php", "markdown", "yaml", "twig", "composer-project"],
"homepage": "https://chrosey.de/",
"homepage": "http://picocms.org/",
"license": "MIT",
"authors": [{
"name": "Chrosey",
"email": "info@chrosey.de",
"role": "Developer"
}],
"repositories": [{
"type": "path",
"url": "Packages/*"
}],
"require": {
"chrosey/pico-theme-materializecss": "@dev",
"phrozenbyte/pico-file-prefixes": "^2.0",
"picocms/composer-installer": "^1.0",
"picocms/pico": "^v3.0.0-alpha.1",
"picocms/pico-deprecated": "^v3.0.0-alpha.1"
"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-composer/graphs/contributors"
}
],
"support": {
"docs": "http://picocms.org/docs",
"issues": "https://github.com/picocms/Pico/issues",
"source": "https://github.com/picocms/Pico"
},
"require": {
"picocms/pico": "^2.1",
"picocms/pico-theme": "^2.1",
"picocms/pico-deprecated": "^2.1",
"picocms/composer-installer": "^1.0",
"phrozenbyte/pico-file-prefixes": "^2.0"
},
"prefer-stable": true,
"minimum-stability": "beta",
"config": {
"sort-packages": true
}
"prefer-stable": true
}

331
composer.lock generated
View File

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

View File

@ -12,21 +12,19 @@ timezone: Europe/Berlin # Your PHP installation might require you to manually sp
##
# Theme
#
theme: pico-materializecss # The name of your custom theme
theme: chrosey # The name of your custom theme
themes_url:
~ # 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/
theme_config: # Additional theme-specific config
widescreen: false # Default theme: Use more horizontal space (i.e. make the site container wider)
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
widescreen: true # Default theme: Use more horizontal space (i.e. make the site container wider)
color: default
twig_config: # Twig template engine config
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
charset: utf-8 # The charset used by Twig templates
debug: ~ # Enable Twig's debug mode
cache: false # Enable Twig template caching by specifying a path to a writable directory
cache: cache # Enable Twig template caching by specifying a path to a writable directory
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: ~

View File

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

View File

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

View File

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

View File

@ -4,20 +4,8 @@ Description: Erster Blogeintrag mit PicoCMS
Author: Christian Seyfferth
Date: 2020-01-21 17:00
Robots: noindex,nofollow
Categories:
- Homepage
Template: templates/blogitem
Template: templates/blog/item
category: Test
---
# Hallo Welt
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 ;)
dies ist mein erster Blogeintrag

View File

@ -0,0 +1,10 @@
---
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

@ -1,21 +0,0 @@
---
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

@ -1,87 +0,0 @@
---
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
Date: 2020-01-21
Robots: noindex,nofollow
Template: templates/blog
Template: templates/blog/index
---
# Meine letzten Blogeinträge
# Meine letzten Blogeinträge

View File

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

View File

@ -4,19 +4,16 @@ Description: Startseite
Author: Christian Seyfferth
Date: 2020-01-21
Robots: noindex,nofollow
Template: templates/home
Template: templates/index
---
# Hallo Welt
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.
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,6 +4,7 @@ Description: Kontaktformular
Author: Christian Seyfferth
Date: 2020-01-29
Robots: noindex,nofollow
Template: templates/index
---
# Kontakt

View File

@ -1,16 +0,0 @@
---
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

@ -1,16 +0,0 @@
---
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

@ -1,10 +0,0 @@
---
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

@ -1,10 +0,0 @@
---
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

17
content/projekte/index.md Normal file
View File

@ -0,0 +1,17 @@
---
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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 406 KiB

Binary file not shown.

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

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@ -1,15 +0,0 @@
<?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,12 +5,5 @@
"test",
"Christian Seyfferth",
"error"
],
[
"20\/05\/2020 19:30:22",
"info@chrosey.de",
"(kein Betreff)",
"Anonym",
"error"
]
]

View File

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

View File

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

View File

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

View File

@ -1,13 +1,12 @@
<?php
/**
* 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>
* @license http://opensource.org/licenses/MIT The MIT License
*
* @see http://nliautaud.fr
* @see http://picocms.org
* @link http://nliautaud.fr
* @link http://picocms.org
*/
class PicoPagesImages extends AbstractPicoPlugin
{
@ -17,7 +16,7 @@ class PicoPagesImages extends AbstractPicoPlugin
/**
* 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
*
@ -37,33 +36,29 @@ class PicoPagesImages extends AbstractPicoPlugin
}
$contentExt = $this->getConfig('content_ext');
$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);
if ($this->path) {
$this->path .= '/';
}
}
/**
* Triggered after Pico has read its configuration.
* Triggered after Pico has read its configuration
*
* @see Pico::getConfig()
*
* @param array &$config array of config variables
*
* @param array &$config array of config variables
* @return void
*/
public function onConfigLoaded(array &$config)
{
if (!empty($config['images_path'])) {
$this->root = rtrim($config['images_path'], '/').'/';
$this->root = rtrim($config['images_path'], '/') . '/';
} else {
$this->root = 'images/';
}
}
/**
* Triggered before Pico renders the page.
* Triggered before Pico renders the page
*
* @see DummyPlugin::onPageRendered()
*
@ -77,7 +72,6 @@ class PicoPagesImages extends AbstractPicoPlugin
// Create images array
$twigVariables['images'] = $this->getImages();
}
/**
* Return the list and infos of images in the current directory.
*
@ -85,47 +79,46 @@ class PicoPagesImages extends AbstractPicoPlugin
*/
private function getImages()
{
$images_path = $this->root.$this->path;
$images_path = $this->root . $this->path;
// Filter images path for extra slashes
$images_path = preg_replace('/(\/+)/', '/', $images_path);
$images_path = preg_replace('/(\/+)/','/',$images_path);
$data = [];
$data = array();
$pattern = '*.{[jJ][pP][gG],[jJ][pP][eE][gG],[pP][nN][gG],[gG][iI][fF]}';
$images = glob($images_path.$pattern, GLOB_BRACE);
$meta = [];
$images = glob($images_path . $pattern, GLOB_BRACE);
$meta = array();
if (!is_array($images)) {
return [];
return array();
}
foreach ($images as $path) {
$imagesize = getimagesize($path);
if (!is_array($imagesize)) {
$imagesize = [];
$imagesize = array();
}
list($width, $height, , $size) = array_pad($imagesize, 4, '');
list($width, $height,, $size) = array_pad($imagesize, 4, '');
// Find meta files for images if they exist
$metapath = $path.'.meta.yml';
$metapath = $path . '.meta.yml';
if (is_file($metapath)) {
$yamlparser = $this->getPico()->getYamlParser();
$meta = $yamlparser->parse(file_get_contents($metapath));
}
$data[] = [
'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),
$data[] = array (
'url' => $this->getBaseUrl() . $images_path . pathinfo($path, PATHINFO_BASENAME),
'path' => $images_path,
'name' => pathinfo($path, PATHINFO_FILENAME),
'ext' => pathinfo($path, PATHINFO_EXTENSION),
'width' => $width,
'height' => $height,
'size' => $size,
'meta' => $meta,
];
}
'meta' => $meta
);
}
return $data;
}
}

1
themes/.gitignore vendored
View File

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

67
themes/chrosey/README.md Normal file
View File

@ -0,0 +1,67 @@
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

@ -0,0 +1,38 @@
{
"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"
}
}
}

1
themes/chrosey/css/mini-dark.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2414
themes/chrosey/css/mini-nord.min.css vendored Normal file

File diff suppressed because it is too large Load Diff

349
themes/chrosey/css/normalize.css vendored Normal file
View File

@ -0,0 +1,349 @@
/*! 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

@ -0,0 +1,97 @@
@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

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,35 @@
{% 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

@ -0,0 +1,31 @@
{% 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

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

View File

@ -0,0 +1,79 @@
<!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

@ -0,0 +1,13 @@
<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

@ -0,0 +1,15 @@
<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

@ -0,0 +1,14 @@
{% 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

@ -0,0 +1,33 @@
{% 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

@ -0,0 +1,11 @@
<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>