fix the comic thing
This commit is contained in:
parent
e1a56d266a
commit
b3929b1d31
8 changed files with 84 additions and 52 deletions
|
@ -1,3 +1,3 @@
|
|||
_model: comics
|
||||
---
|
||||
title: ungleich penguin comics
|
||||
title: Penguin Comics
|
||||
|
|
8
content/u/penguincomics/somethingelse/contents.lr
Normal file
8
content/u/penguincomics/somethingelse/contents.lr
Normal 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 |
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
{% for child in this.pagination.items %}
|
||||
{{ render_blog_post(child, from_index=true) }}
|
||||
{% endfor %}
|
||||
{{ render_pagination(this.pagination) }}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% from "macros/comic.html" import render_comic %}
|
||||
|
||||
{% block title %}Penguin Comics{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% for child in this.pagination.items %}
|
||||
{{ render_comic(child) }}
|
||||
{% endfor %}
|
||||
|
||||
{{ render_pagination(this.pagination) }}
|
||||
{% endblock %}
|
||||
|
|
36
templates/macros/comic.html
Normal file
36
templates/macros/comic.html
Normal 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 %}
|
|
@ -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 }}">« Previous</a>
|
||||
{% else %}
|
||||
<span class="disabled">« Previous</span>
|
||||
{% endif %} |
|
||||
|
||||
|
||||
« 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 »</a>
|
||||
{% else %}
|
||||
<span class="disabled">Next »</span>
|
||||
Next »
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<!-- unused for centering -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
x-off
|
||||
{% if this.description2 %}
|
||||
<div class="container">
|
||||
<div class="row mb-3">
|
||||
|
|
Loading…
Reference in a new issue