Create Events page
This commit is contained in:
parent
19fc8f3cd1
commit
3420e18d68
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 14 KiB |
|
@ -1,7 +1,6 @@
|
|||
[project]
|
||||
name = chaoswest.tv
|
||||
url = https://chaoswest.tv/
|
||||
url_style = relative
|
||||
excluded_assets = *.scss
|
||||
upscale = false
|
||||
output_path = temp/builds/chaoswest.tv/
|
||||
|
|
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 32 KiB |
|
@ -0,0 +1,20 @@
|
|||
title: 36c3
|
||||
---
|
||||
event_end_date: 2019-12-30
|
||||
---
|
||||
event_start_date: 2019-12-27
|
||||
---
|
||||
preview: Am 36c3 in Leipzig hat Chaos-West TV in Halle 3 eine Bühne gebaut. Die Vorträge die dort entstanden sind findet man auf [media.ccc.de/c/36c3/ChaosWest](https://media.ccc.de/c/36c3/ChaosWest).
|
||||
---
|
||||
body:
|
||||
|
||||
Am 36c3 in Leipzig hat Chaos-West TV in Halle 3 eine Bühne gebaut.
|
||||
|
||||
## Vorträge
|
||||
[media.ccc.de/c/36c3/ChaosWest](https://media.ccc.de/c/36c3/ChaosWest)
|
||||
---
|
||||
date: 2019-12-27
|
||||
---
|
||||
logo: 36c3.svg
|
||||
---
|
||||
logodesc: 36. Chaos Communication Congress
|
|
@ -0,0 +1,5 @@
|
|||
_model: blog
|
||||
---
|
||||
title: Veranstaltungen mit Winkekatze TV
|
||||
---
|
||||
body: Chaoswest TV hat Videos auf einigen Veranstaltungen gemacht...
|
|
@ -2,6 +2,13 @@
|
|||
"Über uns": {
|
||||
"href": "/"
|
||||
},
|
||||
"Veranstaltungen": {
|
||||
"href": "/events",
|
||||
"list_childs": true,
|
||||
"items": {
|
||||
"list_namespace": "/events"
|
||||
}
|
||||
},
|
||||
"Kontakt": {
|
||||
"href": "/kontakt"
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[model]
|
||||
name = Blog
|
||||
label = Blog
|
||||
name = Events
|
||||
label = Events
|
||||
hidden = true
|
||||
|
||||
[fields.title]
|
||||
|
@ -10,3 +10,10 @@ type = string
|
|||
[children]
|
||||
model = post
|
||||
order_by = -event_start_date,title
|
||||
|
||||
[fields.body]
|
||||
label = Body
|
||||
type = pythonmarkdown
|
||||
|
||||
[pagination]
|
||||
enabled = True
|
||||
|
|
|
@ -8,18 +8,25 @@ label = Title
|
|||
type = string
|
||||
size = large
|
||||
|
||||
[fiels.tags]
|
||||
label = Tags
|
||||
type = strings
|
||||
|
||||
[fields.date]
|
||||
label = Date
|
||||
type = date
|
||||
|
||||
[fields.logo]
|
||||
lable = Event Logo
|
||||
width = 1/2
|
||||
type = select
|
||||
source = record.attachments.images
|
||||
|
||||
[fields.logodesc]
|
||||
label = Event Description
|
||||
width = 1/2
|
||||
type = string
|
||||
|
||||
[fields.preview]
|
||||
label = Preview
|
||||
label = Preview for displayed on index page
|
||||
type = pythonmarkdown
|
||||
|
||||
[fields.body]
|
||||
label = Body
|
||||
label = Body to be showed here
|
||||
type = pythonmarkdown
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,13 +7,18 @@
|
|||
<li>
|
||||
<a
|
||||
{% if this._path == mapping.href %} class="active"
|
||||
{% endif %} {{- ' ' -}}
|
||||
{% endif %}
|
||||
href="{{ mapping.href|url }}">
|
||||
{{- title -}}
|
||||
{{ title }}
|
||||
</a>
|
||||
{% else %}
|
||||
<li>
|
||||
<a
|
||||
{% if this._path == mapping.href %} class="active"
|
||||
{% endif %}
|
||||
href="{{ mapping.href|url }}">
|
||||
{{ title }}
|
||||
</a>
|
||||
<ul>
|
||||
{% set sub_menu = mapping['items'].items() %}
|
||||
{% for sub_title, href in sub_menu %}
|
||||
|
@ -21,10 +26,10 @@
|
|||
<li>
|
||||
<a
|
||||
{% if this._path == href %}
|
||||
{{- ' class="active"' }}
|
||||
{% endif %} {{- ' ' -}}
|
||||
class="active"
|
||||
{% endif %}
|
||||
href="{{ href }}">
|
||||
{{- sub_title -}}
|
||||
{{ sub_title }}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
|
@ -34,10 +39,10 @@
|
|||
<li>
|
||||
<a
|
||||
{% if this._path + '/' == child.url_path %}
|
||||
{{- ' class="active"' -}}
|
||||
{% endif %} {{- ' ' -}}
|
||||
' class="active"
|
||||
{% endif %}
|
||||
href="{{ child.url_path }}">
|
||||
{{- child.title -}}
|
||||
{{ child.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{% extends "layout.html" %}
|
||||
|
||||
{% from "macros/blog.html" import render_blog_post %}
|
||||
|
||||
{% block title %}{{ this.title }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{{ this.body }}
|
||||
{% for child in this.pagination.items %}
|
||||
{{ render_blog_post(child, from_index=true) }}
|
||||
{% endfor %}
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
{%- macro render_blog_post(post, from_index=false) %}
|
||||
<article>
|
||||
{% if from_index -%}
|
||||
<h2 class="headline"><a href="{{ post|url }}">{{ post.title }}</a></h2>
|
||||
{% else -%}
|
||||
<h2 class="headline"><a>{{ post.title }}</a></h2>
|
||||
{% endif -%}
|
||||
<p class="meta">
|
||||
{% if post.event_start_date != post.event_end_date -%}
|
||||
Vom {{ post.event_start_date | dateformat('long', locale=post.alt ) }} bis {{ post.event_end_date | dateformat('long', locale=post.alt) }}.
|
||||
{%- else -%}
|
||||
Am {{ post.event_start_date | dateformat('long', locale=post.alt) }}.
|
||||
{%- endif %}
|
||||
</p>
|
||||
{% if from_index %}
|
||||
{% if post.logo is defined %}
|
||||
<a href="{{ post|url(absolute=True) }}">
|
||||
<img alt="{{ post.logodesc }}" src="{{ post|url(absolute=True)}}{{ post.logo | url(absolute=False) }}" />
|
||||
</a>
|
||||
{% else %}
|
||||
<h1 class="headline"><a href="{{ post|url }}">{{ post.title }}</a></h1>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<h1 class="headline"><a>{{ post.title }}</a></h1>
|
||||
{% if post.logo is defined %}
|
||||
<img alt="{{ post.logodesc }}" src="{{ post.logo | url }}" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if from_index -%}
|
||||
{{ post.preview }}
|
||||
{% else -%}
|
||||
|
|
|
@ -1,29 +1,4 @@
|
|||
{%- macro render_pagination(pagination) %}
|
||||
<div class="pagination">
|
||||
{% if pagination.has_prev -%}
|
||||
<a href="{{ pagination.prev|url }}">« Previous</a>
|
||||
{% else -%}
|
||||
<a class="disabled">« Previous</a>
|
||||
{% endif -%}
|
||||
{% for site in range(pagination.pages) -%}
|
||||
{% if site == 0 -%}
|
||||
{%- if pagination.page == site + 1 -%}
|
||||
<a class="disabled">{{ pagination.page }}</a>
|
||||
{%- else -%}
|
||||
<a href="{{ './'| url }}">{{ site + 1 }}</a>
|
||||
{%- endif -%}
|
||||
{%- else -%}
|
||||
{%- if pagination.page == site + 1 -%}
|
||||
<a class="disabled" >{{ pagination.page }}</a>
|
||||
{%- else -%}
|
||||
<a href="{{ './'| url }}page/{{ site + 1 }}/">{{ site + 1 }}</a>
|
||||
{%- endif -%}
|
||||
{%- endif %}
|
||||
{% endfor -%}
|
||||
{% if pagination.has_next -%}
|
||||
<a href="{{ pagination.next|url }}">Next »</a>
|
||||
{%- else -%}
|
||||
<a class="disabled">Next »</a>
|
||||
{%- endif %}
|
||||
</div>
|
||||
{% endmacro -%}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{%- extends "layout.html" -%}
|
||||
{%- block title -%}
|
||||
{{- this.title -}}
|
||||
{%- endblock -%}
|
||||
{%- block body -%}
|
||||
{% extends "layout.html" %}
|
||||
{% from "macros/blog.html" import render_blog_post %}
|
||||
{% block title %}{{ this.title }}{% endblock %}
|
||||
{% block body %}
|
||||
{{ this.body }}
|
||||
{%- endblock -%}
|
||||
{% endblock %}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{% extends "layout.html" %}
|
||||
{% from "macros/blog.html" import render_blog_post %}
|
||||
{% block title %}{{ this.title }}{% endblock %}
|
||||
{% block body %}
|
||||
{{ render_blog_post(this) }}
|
||||
{% endblock %}
|
Loading…
Reference in New Issue