fix the comic thing

This commit is contained in:
Nico Schottelius 2020-02-05 13:44:56 +01:00
parent e1a56d266a
commit b3929b1d31
8 changed files with 84 additions and 52 deletions

View File

@ -1,3 +1,3 @@
_model: comics
---
title: ungleich penguin comics
title: Penguin Comics

View File

@ -0,0 +1,8 @@
subtitle: NOT THE Security Policy
---
pub_date: 2020-02-04
---
_hidden: no
---
_discoverable: yes
---

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

View File

@ -5,7 +5,6 @@
{% block content %}
{% set image = this.attachments.images.first() %}
<div class="container">
<div class="row mb-5">
<div class="col-md-3">

View File

@ -1,33 +1,13 @@
{% extends "layout-2020.html" %}
{% from "macros/blog.html" import render_blog_post %}
{% from "macros/pagination.html" import render_pagination %}
{% block title %}{{ this.title }}{% endblock %}
{% block body %}
<header class="intro-header" style="background-image: url('/u/static/images/home-bg.jpg');">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="site-heading">
<h1>ungleich blog</h1>
<hr class="small">
<span class="subheading"></span>
</div>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="app app-blog span8">
<section class="blog-list">
{% from "macros/comic.html" import render_comic %}
{% block title %}Penguin Comics{% endblock %}
{% block content %}
{% for child in this.pagination.items %}
{{ render_blog_post(child, from_index=true) }}
{{ render_comic(child) }}
{% endfor %}
{{ render_pagination(this.pagination) }}
</section>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,36 @@
{% macro render_comic(comic) %}
{% set image = comic.attachments.images.first() %}
<div class="container">
<div class="row mb-5">
<div class="col-md-3">
<!-- unused for centering -->
</div>
<div class="col-md-6">
<h2>{{ comic.subtitle }}</h2>
<img src="{{ image|url }}" alt="{{ comic.subtitle }}"
class="img-fluid"/>
</div>
<div class="col-md-3">
<!-- unused for centering -->
</div>
</div>
</div>
{% if comic.body %}
<div class="container">
<div class="row mb-3">
<div class="col-md-3">
<!-- unused for centering -->
</div>
<div class="col-md-6">
{{ comic.body }}
</div>
<div class="col-md-3">
<!-- unused for centering -->
</div>
</div>
</div>
{% endif %}
{% endmacro %}

View File

@ -1,26 +1,34 @@
{% macro render_pagination(pagination) %}
<div class="ungleich-center-div">
<div class="pagination">
<div class="container">
<div class="row mb-5">
<div class="col-md-3">
<!-- unused for centering -->
</div>
<div class="col-md-6">
{% if pagination.has_prev %}
<a href="{{ pagination.prev|url }}">&laquo; Previous</a>
{% else %}
<span class="disabled">&laquo; Previous</span>
{% endif %} |
&laquo; Previous
{% endif %}
|
{% for page in range(1, pagination.pages + 1) %}
{% if page != pagination.page %}
<a href="{{ pagination.for_page(page)|url }}">{{ page }}</a> |
{% else %}
{{ pagination.page }} |
{% endif %}
{% endfor %}
{% endfor %}
{% if pagination.has_next %}
<a href="{{ pagination.next|url }}">Next &raquo;</a>
{% else %}
<span class="disabled">Next &raquo;</span>
Next &raquo;
{% endif %}
</div>
<div class="col-md-3">
<!-- unused for centering -->
</div>
</div>
</div>
{% endmacro %}

View File

@ -28,6 +28,7 @@
</div>
</div>
</div>
x-off
{% if this.description2 %}
<div class="container">
<div class="row mb-3">