diff --git a/.woodpecker.yml b/.woodpecker.yml index 39982a5..853c403 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -77,7 +77,6 @@ pipeline: - sed -i "s#app_directory#$APP_DIRECTORY#g" .mage.yml - /root/.config/composer/vendor/bin/mage deploy "$CI_BUILD_DEPLOY_TARGET" when: - branch: [master, master-*, develop, develop-*] event: [deployment] services: diff --git a/assets/css/app.scss b/assets/css/app.scss index b10d387..5b944f3 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -463,10 +463,14 @@ pre[class*="language-"] { cursor: pointer; } - a:not(.button), h1, h2, h3, h4, h5, p, ul { + a:not(.button), h1, h2, h3, h4, h5, p, ul:not(.btn-group) { color: $color-body-text; } + ul.btn-group a { + color: #fff; + } + p a, ul a { border-bottom: 2px dotted $color-blue2; } @@ -1253,7 +1257,7 @@ $links: ( } .bg-box { - background: #fbfcff; + background: #f1f1f1; } .invalid-feedback { diff --git a/assets/images/post-image-logo.png b/assets/images/post-image-logo.png new file mode 100644 index 0000000..f1d9a58 Binary files /dev/null and b/assets/images/post-image-logo.png differ diff --git a/assets/js/app/px-image.js b/assets/js/app/px-image.js index 71cc15d..fa77d1b 100644 --- a/assets/js/app/px-image.js +++ b/assets/js/app/px-image.js @@ -9,16 +9,22 @@ class PxImage { const images = doc.querySelectorAll('.quick-image img, .card figure img') for (let i = 0, len = images.length; i < len; i++) { - (function(image) { + ((image) => { const source = image.getAttribute('data-src') + const sourceError = image.getAttribute('data-src-error') + const color = image.getAttribute('data-color') const loader = new Image() - loader.onload = function() { - image.style.backgroundImage = 'url(' + source + ')' + loader.onload = () => { + image.style.background = `${color ? color : null} url(${source})` image.style.backgroundSize = 'cover' image.style.backgroundPosition = 'center' } + loader.onerror = () => { + image.style.background = `${color ? color : null} url('${sourceError}') center center` + } + loader.src = source })(images[i]) } diff --git a/src/Controller/Blog/PostController.php b/src/Controller/Blog/PostController.php index 918eb90..fe4e369 100644 --- a/src/Controller/Blog/PostController.php +++ b/src/Controller/Blog/PostController.php @@ -95,7 +95,7 @@ class PostController extends PageController public function posts(int $page = 1): Response { $entities = $this->createQuery() - ->paginate($page, 5) + ->paginate($page, 9) ; return $this->defaultRender($this->siteRequest->getPage()->getTemplate(), [ @@ -111,7 +111,7 @@ class PostController extends PageController if ($query || $tag) { $entities = $this->createQuery() ->search($query, $tag) - ->paginate($page, 5) + ->paginate($page, 9) ; } @@ -126,7 +126,7 @@ class PostController extends PageController { $entities = $this->createQuery() ->inCategory($category, false) - ->paginate($page, 5) + ->paginate($page, 9) ; if (!$category->getIsActive() && !$this->getUser()) { diff --git a/src/Twig/Extension/ColorExtension.php b/src/Twig/Extension/ColorExtension.php new file mode 100644 index 0000000..09311bc --- /dev/null +++ b/src/Twig/Extension/ColorExtension.php @@ -0,0 +1,38 @@ + - {% endif %} - - {{ include('page/post/_post.html.twig', {post: post}) }} - {% endfor %} +
{{ content }}{% if content|length >= summarySize %}…{% endif %}
+