page backend
This commit is contained in:
parent
c40001daeb
commit
2cbd101c85
3 changed files with 63 additions and 0 deletions
8
app/static/js/menu.js
Normal file
8
app/static/js/menu.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
document.querySelectorAll(".topnav a.icon").forEach(a => {
|
||||||
|
a.onclick = (event) => {
|
||||||
|
var nav = document.querySelector('.topnav nav')
|
||||||
|
nav.style.display = nav.style.display === 'block' ? 'none' : 'block'
|
||||||
|
event.preventDefault()
|
||||||
|
event.stopPropagation()
|
||||||
|
}
|
||||||
|
})
|
8
app/templates/page.html
Normal file
8
app/templates/page.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% block title %}{{ page.title }}– Phantas.ma/polis{% endblock title %}
|
||||||
|
{% block main %}
|
||||||
|
<div class="page {{ page.slug }}">
|
||||||
|
{{ page.body | safe }}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
47
app/text/migrations/0003_auto_20211011_1222.py
Normal file
47
app/text/migrations/0003_auto_20211011_1222.py
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# Generated by Django 3.2.7 on 2021-10-11 12:22
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('text', '0002_rename_essay_text'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='page',
|
||||||
|
name='teaser',
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='page',
|
||||||
|
name='body',
|
||||||
|
field=models.TextField(blank=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='page',
|
||||||
|
name='data',
|
||||||
|
field=models.JSONField(blank=True, default=dict),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='page',
|
||||||
|
name='slug',
|
||||||
|
field=models.SlugField(blank=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='page',
|
||||||
|
name='title',
|
||||||
|
field=models.TextField(blank=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='text',
|
||||||
|
name='body',
|
||||||
|
field=models.TextField(blank=True, default=''),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='text',
|
||||||
|
name='teaser',
|
||||||
|
field=models.TextField(blank=True, default=''),
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in a new issue