Modèles plus cleans et templates principaux
This commit is contained in:
parent
66fc364739
commit
f5778fed2a
17 changed files with 522 additions and 94 deletions
31
gestioncof/cms/templates/cofcms/base.html
Normal file
31
gestioncof/cms/templates/cofcms/base.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
{% load static menu_tags wagtailuserbar %}
|
||||
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{% block title %}Association des élèves de l'ENS Ulm{% endblock %}</title>
|
||||
<link rel="stylesheet" type="text/css" href="{% static "cofcms/css/screen.css" %}"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<section class="top-menu">
|
||||
<h1 class="cof"><a href="/">COF</a></h1>
|
||||
<nav>
|
||||
{% flat_menu "cof-nav-ext" template="cofcms/base_nav.html" %}
|
||||
</nav>
|
||||
</section>
|
||||
<section class="bottom-menu">
|
||||
<nav>
|
||||
{% flat_menu "cof-nav-int" template="cofcms/base_nav.html" apply_active_classes=True %}
|
||||
</nav>
|
||||
</section>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
{% wagtailuserbar %}
|
||||
</body>
|
||||
</html>
|
9
gestioncof/cms/templates/cofcms/base_nav.html
Normal file
9
gestioncof/cms/templates/cofcms/base_nav.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<ul class="menu">
|
||||
{% for item in menu_items %}
|
||||
<li class="{{ item.active_class }}">
|
||||
<a href="{{ item.href }}">
|
||||
{{ item.text }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
18
gestioncof/cms/templates/cofcms/cof_actu_index_page.html
Normal file
18
gestioncof/cms/templates/cofcms/cof_actu_index_page.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends "cofcms/base.html" %}
|
||||
{% load wagtailimages_tags cofcms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<section class="intro">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<div>{{ page.introduction|safe }}</div>
|
||||
</section>
|
||||
|
||||
<section class="actulist">
|
||||
{% for actu in page.actus %}
|
||||
<article class="actu">
|
||||
<h2>{{ actu.title }}</h2>
|
||||
{{ actu.body|safe }}
|
||||
</article>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endblock %}
|
34
gestioncof/cms/templates/cofcms/cof_directory_page.html
Normal file
34
gestioncof/cms/templates/cofcms/cof_directory_page.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
{% extends "cofcms/base.html" %}
|
||||
{% load wagtailimages_tags cofcms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<section class="intro">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<div>{{ page.introduction|safe }}</div>
|
||||
</section>
|
||||
|
||||
<section class="directory">
|
||||
{% for entry in page.entries %}
|
||||
<article class="entry" id="{{ entry.slug }}">
|
||||
<h2>{{ entry.title }}</h2>
|
||||
{% if entry.image %}
|
||||
{% image entry.image width-400 class="entry-img" %}
|
||||
{% endif %}
|
||||
<div class="desc">{{ entry.body|safe }}</div>
|
||||
{% if entry.links %}
|
||||
<ul class="links">
|
||||
{% for block in entry.links %}
|
||||
<li>
|
||||
{% if block.block_type == "lien" %}
|
||||
<a href="{{ block.value.url }}">{{ block.value.texte }}</a>
|
||||
{% else %}
|
||||
{{ block.value.texte }} : <button data-mref="{{ block.value.email|obfuscate_mail }}" class="mail-contact">Afficher l'adresse mail</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endblock %}
|
23
gestioncof/cms/templates/cofcms/cof_page.html
Normal file
23
gestioncof/cms/templates/cofcms/cof_page.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% extends "cofcms/base.html" %}
|
||||
{% load wagtailimages_tags cofcms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<section class="intro">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<div>{{ page.introduction|safe }}</div>
|
||||
</section>
|
||||
|
||||
<section class="pagecontent">
|
||||
{% for block in page.body %}
|
||||
{% if block.block_type == "heading" %}
|
||||
<h2>{{ block.value }}</h2>
|
||||
{% else %}{% if block.block_type == "paragraph" %}
|
||||
<article class="paragraph">
|
||||
{{ block.value|safe }}
|
||||
</article>
|
||||
{% else %}{% if block.block_type == "image" %}
|
||||
{% image block.value width-400 %}
|
||||
{% endif %}{% endif %}{% endif %}
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endblock %}
|
2
gestioncof/cms/templates/cofcms/cof_root_page.html
Normal file
2
gestioncof/cms/templates/cofcms/cof_root_page.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
{% extends "cofcms/base.html" %}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue