]> git.0d.be Git - panikweb.git/commitdiff
grid: add classes and tags required by osp style
authorFrédéric Péters <fpeters@0d.be>
Thu, 15 Aug 2013 10:11:10 +0000 (12:11 +0200)
committerFrédéric Péters <fpeters@0d.be>
Thu, 15 Aug 2013 10:19:49 +0000 (12:19 +0200)
panikweb/views.py
panikweb_templates/templates/grid.html

index a5e9a5cca3001233c021da5ea3f58767d9c05375..0f491469f90c4873120e5c6decd549cc712788d6 100644 (file)
@@ -129,6 +129,8 @@ class Grid(TemplateView):
 
         context['grid'] = grid
         context['times'] = times
+        context['weekdays'] = ['Lundi', 'Mardi', 'Mercredi', 'Jeudi',
+                'Vendredi', 'Samedi', 'Dimanche']
 
         return context
 
index 478388d2de99d146ca030bec81de1f5aca0b5161..5eb4b52f3f26812049391f598f5114d7610d6c96 100644 (file)
@@ -3,20 +3,76 @@
 
 {% block content %}
 
-<h2>Grille</h2>
+<style>
+    #grille table, #grille tr, #grille td {
+        text-align: center;
+        vertical-align: middle;
+    }
+    #grille .symbol {
+        font-size:40px;
+        width:100%;
+    }
+    #grille table {
+        border-top: 5px solid #D0D0D0;
+        border-left: 5px solid #D0D0D0;
+    }
+    #grille td {
+        border-bottom: 5px solid #D0D0D0;
+        border-right: 5px solid #D0D0D0;
+    }
+    #grille .heure {
+        -webkit-transform: rotate(-90deg);
+        -moz-transform: rotate(-90deg);
+        -ms-transform: rotate(-90deg);
+        -o-transform: rotate(-90deg);
+        filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
+        padding:20px 10px;
+        font-size:15px;
+    }
 
-<table border=1>
+    #grille .jour {
+        margin-top:20px;
+        margin-bottom:30px;
+        width: 100%;
+    }
+     #grille .continu, #grille .communautaire, #grille .mix, #grille .info {
+        font-family:Reglo;
+        text-transform:uppercase;
+        font-size:15px;
+        margin-bottom:10px;
+        line-height: 100%;
+    }
+
+    #grille td:hover {
+        cursor: pointer;
+        background-color: #D0D0D0;
+    }
+</style>
+
+
+<div id="grille">
+<table>
+<tbody>
+<tr>
+  <td><br/></td>
+  {% for weekday in weekdays %}
+    <td width="13%"><h3 class="jour">{{ weekday }}</h3></td>
+  {% endfor %}
+  <td><br/></td>
+</tr>
 {% for time_header, time_cells in times|zip:grid %}
 <tr>
-  <td>{{ time_header }}</td>
+  <td class="heure">{{ time_header }}</td>
   {% for cell in time_cells %}
   <td {% if cell.w > 1 %}colspan="{{cell.w}}"{% endif %}
       {% if cell.h > 1 %}rowspan="{{cell.h}}"{% endif %}>{{ cell }}</td>
   {% endfor %}
-  <td>{{ time_header }}</td>
+  <td class="heure">{{ time_header }}</td>
 </tr>
 {% endfor %}
+</tbody>
 </table>
+</div>
 
 
 {% endblock %}