summaryrefslogtreecommitdiff
path: root/templates/main
diff options
context:
space:
mode:
Diffstat (limited to 'templates/main')
-rw-r--r--templates/main/base.html28
-rw-r--r--templates/main/calendar_page.html21
-rw-r--r--templates/main/file_page.html17
-rw-r--r--templates/main/file_poly.html1
-rw-r--r--templates/main/file_td.html6
-rw-r--r--templates/main/file_tp.html3
-rw-r--r--templates/main/loggedout.html16
-rw-r--r--templates/main/raw_page.html3
-rw-r--r--templates/main/simple_page.html3
9 files changed, 98 insertions, 0 deletions
diff --git a/templates/main/base.html b/templates/main/base.html
new file mode 100644
index 0000000..b8a56a4
--- /dev/null
+++ b/templates/main/base.html
@@ -0,0 +1,28 @@
+{% extends "layout.html" %}
+
+{% block logo %}
+ <div id="logo">
+ <h1><a href="/" accesskey="4">Spé MP1</a></h1>
+ <span id="tagline">@ Saint-Louis</span>
+ </div>
+{% endblock %}
+
+{% block menu %}
+ <div id="sidebar">
+ {% block menucontent %}
+ <h2 id="sitemenu" class="sidelink menuheader">Menu of Physics</h2>
+ {% for page in pages %}
+ <a class="sidelink" href="/{{ page.name }}.html">{{ page.title }}</a><span class="hide"> | </span>
+ {% endfor %}
+ {% if user.is_staff %}
+ <a class="sidelink" href="/admin/">Administration</a><span class="hide"> | </span>
+ {% endif %}
+ <a class="sidelink" href="/logout/">Déconnexion</a><span class="hide"> | </span>
+ <a class="hide" href="#top" accesskey="1">Top of page</a>
+ {% endblock %}
+ </div>
+{% endblock %}
+
+{% block footer %}
+ [<a href="#top">Back to top</a>]
+{% endblock %}
diff --git a/templates/main/calendar_page.html b/templates/main/calendar_page.html
new file mode 100644
index 0000000..f1c21e6
--- /dev/null
+++ b/templates/main/calendar_page.html
@@ -0,0 +1,21 @@
+{% extends "main/simple_page.html" %}
+{% load utils %}
+
+{% block content %}
+ <div id="intro">
+ <h2 id="maincontent">{{ pagetitle }}</h2>
+ {{ content|safe }}
+ </div>
+ <h2 class="headerstyle">DSs</h2>
+ <ol>
+ {% for test in tests %}
+ <li> DS {{ test.number }} : {{ test.date|date:"d/m/y" }}</li>
+ {% endfor %}
+ </ol>
+ <h2 class="headerstyle">Colles</h2>
+ <ol>
+ {% for colle in colles %}
+ <li> <a href="/get/colle/{{ colle.mainfile|basename }}">{{ colle.name }}</a></li>
+ {% endfor %}
+ </ol>
+{% endblock %}
diff --git a/templates/main/file_page.html b/templates/main/file_page.html
new file mode 100644
index 0000000..486e0ea
--- /dev/null
+++ b/templates/main/file_page.html
@@ -0,0 +1,17 @@
+{% extends "main/simple_page.html" %}
+{% load utils %}
+
+{% block content %}
+ <div id="intro">
+ <h2 id="maincontent">{{ pagetitle }}</h2>
+ {{ content|safe }}
+ </div>
+ {% for type in filetypes %}
+ <h2 class="headerstyle">{{ filetypenames|hash:type }}</h2>
+ <ol>
+ {% for file in files|hash:type %}
+ {{ file }}
+ {% endfor %}
+ </ol>
+ {% endfor %}
+{% endblock %}
diff --git a/templates/main/file_poly.html b/templates/main/file_poly.html
new file mode 100644
index 0000000..eaf8de7
--- /dev/null
+++ b/templates/main/file_poly.html
@@ -0,0 +1 @@
+<li> <a href="/get/poly/{{ file.mainfilename }}">{{ file.name }}</a></li>
diff --git a/templates/main/file_td.html b/templates/main/file_td.html
new file mode 100644
index 0000000..bfeeb1b
--- /dev/null
+++ b/templates/main/file_td.html
@@ -0,0 +1,6 @@
+{% load utils %}
+
+<li> {{ file.name }}<br />
+[<a href="/get/td/{{ file.mainfile|basename }}">Énoncé</a>
+| <a href="/get/td/{{ file.solution|basename }}">Corrigé</a>]
+</li>
diff --git a/templates/main/file_tp.html b/templates/main/file_tp.html
new file mode 100644
index 0000000..6718e46
--- /dev/null
+++ b/templates/main/file_tp.html
@@ -0,0 +1,3 @@
+<li> {{ file.name }}<br />
+[<a href="/get/tp/{{ file.mainfilename }}">Énoncé</a>]
+</li>
diff --git a/templates/main/loggedout.html b/templates/main/loggedout.html
new file mode 100644
index 0000000..2157b4c
--- /dev/null
+++ b/templates/main/loggedout.html
@@ -0,0 +1,16 @@
+{% extends "main/base.html" %}
+
+{% block content %}Pour vous connecter, veuillez remplir le formulaire de droite avec les identifiants qui vous ont été communiqués en classe.
+{% endblock %}
+
+{% block menucontent %}
+ <h3>Connexion</h3>
+ <form method="post" action="/login/" id="login">
+ <ul>
+ {{ login_form.as_ul }}
+ </ul>
+ <div style="text-align: center; width: 100%;">
+ <input type="submit" value="Connexion" id="login-submit" />
+ </div>
+ </form>
+{% endblock %}
diff --git a/templates/main/raw_page.html b/templates/main/raw_page.html
new file mode 100644
index 0000000..50e42b6
--- /dev/null
+++ b/templates/main/raw_page.html
@@ -0,0 +1,3 @@
+{% extends "main/simple_page.html" %}
+
+{% block content %}{{ content|safe }}{% endblock %}
diff --git a/templates/main/simple_page.html b/templates/main/simple_page.html
new file mode 100644
index 0000000..ffd3191
--- /dev/null
+++ b/templates/main/simple_page.html
@@ -0,0 +1,3 @@
+{% extends "main/base.html" %}
+
+{% block title %}{{ block.super }} ~ {{ pagetitle }}{% endblock %}