grid.html 1.76 KB
Newer Older
fred's avatar
fred committed
1
{% extends "base.html" %}
fred's avatar
fred committed
2
{% load paniktags %}
fred's avatar
fred committed
3
4
5

{% block content %}

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<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;
    }
fred's avatar
fred committed
32

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    #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>
fred's avatar
fred committed
63
{% for time_header, time_cells in times|zip:grid %}
fred's avatar
fred committed
64
<tr>
65
  <td class="heure">{{ time_header }}</td>
fred's avatar
fred committed
66
67
68
69
  {% 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 %}
70
  <td class="heure">{{ time_header }}</td>
fred's avatar
fred committed
71
72
</tr>
{% endfor %}
73
</tbody>
fred's avatar
fred committed
74
</table>
75
</div>
fred's avatar
fred committed
76
77
78


{% endblock %}
fred's avatar
fred committed
79
80
81

{% block news %}
{% endblock %}