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 _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 %} {% block content %}
{% set image = this.attachments.images.first() %} {% set image = this.attachments.images.first() %}
<div class="container"> <div class="container">
<div class="row mb-5"> <div class="row mb-5">
<div class="col-md-3"> <div class="col-md-3">

View file

@ -1,33 +1,13 @@
{% extends "layout-2020.html" %} {% extends "layout-2020.html" %}
{% from "macros/blog.html" import render_blog_post %}
{% from "macros/pagination.html" import render_pagination %} {% from "macros/pagination.html" import render_pagination %}
{% block title %}{{ this.title }}{% endblock %} {% from "macros/comic.html" import render_comic %}
{% block body %}
<header class="intro-header" style="background-image: url('/u/static/images/home-bg.jpg');"> {% block title %}Penguin Comics{% endblock %}
<div class="container">
<div class="row"> {% block content %}
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> {% for child in this.pagination.items %}
<div class="site-heading"> {{ render_comic(child) }}
<h1>ungleich blog</h1> {% endfor %}
<hr class="small">
<span class="subheading"></span> {{ render_pagination(this.pagination) }}
</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">
{% for child in this.pagination.items %}
{{ render_blog_post(child, from_index=true) }}
{% endfor %}
{{ render_pagination(this.pagination) }}
</section>
</div>
</div>
</div>
</div>
{% endblock %} {% 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) %} {% macro render_pagination(pagination) %}
<div class="ungleich-center-div">
<div class="pagination">
{% if pagination.has_prev %}
<a href="{{ pagination.prev|url }}">&laquo; Previous</a>
{% else %}
<span class="disabled">&laquo; Previous</span>
{% endif %} |
<div class="container">
{% for page in range(1, pagination.pages + 1) %} <div class="row mb-5">
{% if page != pagination.page %} <div class="col-md-3">
<a href="{{ pagination.for_page(page)|url }}">{{ page }}</a> | <!-- unused for centering -->
{% else %} </div>
{{ pagination.page }} | <div class="col-md-6">
{% endif %} {% if pagination.has_prev %}
{% endfor %} <a href="{{ pagination.prev|url }}">&laquo; Previous</a>
{% else %}
&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 %}
{% if pagination.has_next %} {% endfor %}
<a href="{{ pagination.next|url }}">Next &raquo;</a> {% if pagination.has_next %}
{% else %} <a href="{{ pagination.next|url }}">Next &raquo;</a>
<span class="disabled">Next &raquo;</span> {% else %}
{% endif %} Next &raquo;
{% endif %}
</div>
<div class="col-md-3">
<!-- unused for centering -->
</div>
</div> </div>
</div> </div>
{% endmacro %} {% endmacro %}

View file

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