diff --git a/assets/css/app.scss b/assets/css/app.scss index 2150af6..08fa99b 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -337,8 +337,9 @@ pre[class*="language-"] { padding: 25px 40px; max-width: $content-max-width; - &.body-full { - max-width: 100%; + &.body--posts { + padding-top: 0; + padding-bottom: 0; } margin-left: auto; @@ -809,7 +810,7 @@ $links: ( } } -.mesh { +.card { border: 1px solid $color-hr-border; border-radius: 10px; margin: 20px; @@ -849,26 +850,34 @@ $links: ( } -.meshes { +.cards { padding: 0 20px 20px 20px; &--posts { padding-left: 0; padding-right: 0; - .mesh-preview { + .card-preview { img { - width: 100%; max-height: 200px; + width: 100%; } } + + .row > .col-4:nth-child(1) .card { + margin-left: 0; + } + + .row > .col-4:nth-child(3) .card { + margin-right: 0; + } } } .ejs-link { - margin: 10px auto; border: 2px solid $color-very-light-grey; border-radius: 5px; + margin: 10px auto; &--anchor { display: block; @@ -967,9 +976,14 @@ $links: ( } @media screen and (max-width: 1280px) { - .mesh-wrapper { + .card-wrapper { width: 100%; } + + .cards--posts .card { + margin-left: 0; + margin-right: 0; + } } @media screen and (max-width: 980px) { @@ -1129,7 +1143,7 @@ $links: ( } } - .mesh { + .card { border-color: #86899f; &-title { diff --git a/assets/js/app.js b/assets/js/app.js index 265cf08..2b676d9 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -4,7 +4,7 @@ const App = require('./app/app') const FormPnw = require('./app/form-pwn') const Post = require('./app/post') const LazyLoad = require('./app/lazy-load') -const QuickPost = require('./app/quick-post') +const PxImage = require('./app/px-image') const Code = require('./app/code') const Knmc = require('./app/knmc') const VideoRatio = require('./app/video-ratio') @@ -17,7 +17,7 @@ const app = new App([ new FormPnw(window), new Post(window), new LazyLoad(window), - new QuickPost(window), + new PxImage(window), new Code(window), new Knmc(window), new VideoRatio(window), diff --git a/assets/js/app/quick-post.js b/assets/js/app/px-image.js similarity index 90% rename from assets/js/app/quick-post.js rename to assets/js/app/px-image.js index 1fb5b87..1584b67 100644 --- a/assets/js/app/quick-post.js +++ b/assets/js/app/px-image.js @@ -1,4 +1,4 @@ -class QuickPost { +class PxImage { constructor(w) { this.window = w } @@ -6,7 +6,7 @@ class QuickPost { init() { const doc = this.window.document - const images = doc.querySelectorAll('.quick-image img, .mesh-preview img') + const images = doc.querySelectorAll('.quick-image img, .card-preview img') for (let i = 0, len = images.length; i < len; i++) { (function(image) { @@ -24,4 +24,4 @@ class QuickPost { } } -module.exports = QuickPost +module.exports = PxImage diff --git a/templates/page/mesh/default.html.twig b/templates/page/mesh/default.html.twig index dac6dd6..2db642f 100644 --- a/templates/page/mesh/default.html.twig +++ b/templates/page/mesh/default.html.twig @@ -10,20 +10,20 @@
-
+
{% for mesh in pager %} -
-
-
+
+
+
{{ mesh.label }}
-

{{ mesh.label }}

-
+

{{ mesh.label }}

+
{{ mesh.description|murph_url|file_attributes|markdown('post') }} {% for key, item in mesh.files %} -
+
  • diff --git a/templates/page/post/_post.html.twig b/templates/page/post/_post.html.twig index 684e23f..f50829a 100644 --- a/templates/page/post/_post.html.twig +++ b/templates/page/post/_post.html.twig @@ -105,16 +105,16 @@ {% if full %} {% if similarPosts is defined and similarPosts|length > 0 %} -
    -
    +
    +
    {% for item in similarPosts %} -
    -
    +
    +
    {% set url = safe_path('blog_menu_post', {post: item.id, slug: item.slug, _domain: _domain}) %} {%- if item.image -%} -
    + {%- endif -%} -

    +

    {{- item.title -}} diff --git a/templates/page/simple/projects.html.twig b/templates/page/simple/projects.html.twig index ff4acf4..c316a5a 100644 --- a/templates/page/simple/projects.html.twig +++ b/templates/page/simple/projects.html.twig @@ -14,22 +14,22 @@

    -
    +
    {% for project in projects %} -
    -
    +
    +
    {% if project.image %} -
    +
    {{ project.label }}
    {% endif %} -

    {{- project.label -}}

    -
    +

    {{- project.label -}}

    +
    {{- project.description|murph_url|markdown('post') -}} {% if project.links %} -
    +
      {% for link in project.links %}