diff --git a/.gitignore b/.gitignore index a265103..65cd7e5 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ package-lock.json /build_staging/ /build_production/ /source/assets/build/ -/build_local/ \ No newline at end of file +/build_local/ +/source/_posts/ diff --git a/README.md b/README.md index 38e67f9..c07bc3e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ # Nikus Blog Template -Here is the template of my blog, released under the MIT license. \ No newline at end of file +Here is the template of my blog, released under the MIT license. + +Format Date for Posts like here +https://unicode-org.github.io/icu/userguide/format_parse/datetime/#date-field-symbol-table \ No newline at end of file diff --git a/composer.json b/composer.json index c76d91c..530ce0b 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,6 @@ { "require": { - "tightenco/jigsaw": "^1.3" + "tightenco/jigsaw": "^1.3", + "ext-intl": "*" } } diff --git a/config.php b/config.php index 5aa1813..e11ef72 100644 --- a/config.php +++ b/config.php @@ -1,9 +1,33 @@ false, 'baseUrl' => '', - 'title' => 'Jigsaw', - 'description' => 'Website description.', - 'collections' => [], + 'language' => 'de', + 'title' => 'Nikus Blog', + 'owner' => 'Niku', + 'email' => 'publicmail [at] [thisDomain] [dot] de', + 'description' => 'Blogs über IT-Stuff, meine Projekte und allem was sonst so anfällt.', + 'locale' => 'de_DE', + 'dateFormat' => 'd. MMMM yyyy', + 'collections' => [ + 'posts' => [ + 'excerpt' => function ($page, $length = 75) { + if (count(explode(' ', strip_tags($page->getContent()))) <= $length){ + return strip_tags($page->getContent()); + } else { + return implode(' ', array_slice(explode(' ', strip_tags($page->getContent())), 0, $length)) . '...'; + } + } + ] + ], + 'dateTranslated' => function ($page, $date) { + $format = new IntlDateFormatter( + $page->locale, + IntlDateFormatter::NONE, + IntlDateFormatter::NONE, + Null, + Null, + $page->dateFormat); + return datefmt_format($format, $date); + } ]; diff --git a/source/_assets/css/main.css b/source/_assets/css/main.css index d622059..1450552 100644 --- a/source/_assets/css/main.css +++ b/source/_assets/css/main.css @@ -1,6 +1,6 @@ @font-face { font-family: 'Custom'; - src: url("JetBrainsMono[wght].ttf"); + src: url("/assets/fonts/JetBrainsMono[wght].ttf"); } * { @@ -83,4 +83,56 @@ main hr { main hr:last-of-type { display: none; -} \ No newline at end of file +} + +section.paginationNavigation { + margin-top: 1rem; + display: flex; + justify-content: center; +} + +footer { + margin-top: 4rem; + border-top: thin solid; +} + +footer div { + max-width: 950px; + margin: 0 auto; + padding: 1rem; + display: flex; + gap: 3rem; +} + +footer div section:first-child { + flex: 1; +} + +footer div section:last-child { + flex: .8; +} + +footer div section p { + font-size: .8rem; + margin: .2rem 0; +} + +@media (max-width: 500px) { + footer div { + display: block; + } + + footer div section:last-child { + margin-top: 1rem; + } +} + +@media (max-width: 750px) { + article section { + display: block; + } + + article section h2 { + padding-bottom: .5rem; + } +} diff --git a/source/_layouts/main.blade.php b/source/_layouts/main.blade.php index 35a02b6..c021ae6 100644 --- a/source/_layouts/main.blade.php +++ b/source/_layouts/main.blade.php @@ -6,17 +6,17 @@ -