annotate views/hello_template.tpl @ 7:c8cb2aa0b72c

fixed default condifuration
author sean
date Wed, 22 Jul 2015 13:31:25 +0200
parents 3acc5164369e
children 7a573ec679a6
rev   line source
4
3e66e2f92770 added LICENSE and license headers in the sourcecode. Added readme
sean
parents: 3
diff changeset
1 <!-- This tempalte is a part of bottledash
3e66e2f92770 added LICENSE and license headers in the sourcecode. Added readme
sean
parents: 3
diff changeset
2 author: sean engelhardt >sean.engelhardt@intevation.de
3e66e2f92770 added LICENSE and license headers in the sourcecode. Added readme
sean
parents: 3
diff changeset
3 License: GNU GPL >= v2. See LICENSE for details. -->
3e66e2f92770 added LICENSE and license headers in the sourcecode. Added readme
sean
parents: 3
diff changeset
4
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
5 <%
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
6
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
7 import math
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
8 from datetime import date
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
9
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
10 #################
7
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
11 # settings #
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
12 #################
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
13
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
14
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
15 show_top_bar = settings["show_top_bar"]
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
16
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
17
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
18 #################
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
19 # date and time #
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
20 #################
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
21
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
22
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
23 today = date.today()
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
24 weekday = ("Montag", "Dienstag", "Mittwoch", "Donnerstag",
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
25 "Freitag", "Samstag", "Sonntag")[today.weekday()]
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
26 month_name = ("Januar", "Februar", "März", "Aprill", "Mai",
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
27 "Juni", "Juli", "August", "September", "Oktober",
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
28 "November", "Dezember")[today.month-1]
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
29
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
30 number_of_rows = 2
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
31
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
32 #################
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
33 # viewport size #
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
34 #################
7
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
35 vp_size = "17px"
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
36 #if len(tiles) <= 2:
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
37 # vp_size = "6vw"
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
38 #elif len(tiles) >2 and len(tiles) <=4 :
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
39 # vp_size = "5vw"
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
40 #elif len(tiles) >4 and len(tiles) <=6 :
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
41 # vp_size = "4vw"
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
42 #elif len(tiles) >6 and len(tiles) <=8 :
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
43 # vp_size = "3vw"
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
44 #end
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
45 %>
2
3671857d1dfe added views
sean
parents:
diff changeset
46
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
47 <script type="text/javascript">
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
48
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
49 var global_width;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
50 var global_height;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
51 var tile_width;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
52 var tile_height;
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
53
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
54 var tiles = document.getElementsByClassName("tile");
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
55 var border_width = 1;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
56 var space_between_tiles = 8;
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
57
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
58 var space_lr_borders;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
59 var space_lr_margin;
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
60
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
61 function calc_tile_with(){
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
62 var tiles_per_row = Math.floor(tiles.length / {{number_of_rows}});
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
63 var distance = (space_between_tiles*2) + (border_width*2);
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
64 var tile_width = ((global_width / tiles_per_row ) - distance);
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
65 return tile_width;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
66 }
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
67
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
68 function calc_tile_height(){
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
69 var distance = (space_between_tiles*2) + (border_width*2);
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
70 var tile_height = ((global_height / {{number_of_rows}} ) - distance);
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
71 return tile_height;
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
72 }
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
73
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
74 function resize_content(){
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
75 global_width = document.getElementById("content").clientWidth;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
76 global_height = document.getElementById("content").clientHeight;
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
77
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
78
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
79 tile_width = calc_tile_with();
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
80 tile_height = calc_tile_height();
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
81
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
82 for(var tile = 0; tile < tiles.length; tile++){
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
83 tiles[tile].style.width= tile_width + 'px';
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
84 tiles[tile].style.height= tile_height + 'px';
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
85 }
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
86 }
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
87
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
88 window.onresize = function(){
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
89 resize_content();
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
90 }
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
91
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
92 document.addEventListener("DOMContentLoaded", function(event) {
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
93 resize_content();
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
94 });
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
95
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
96 </script>
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
97
2
3671857d1dfe added views
sean
parents:
diff changeset
98 <style>
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
99 *{
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
100 margin: 0 auto;
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
101 padding: 0 auto;
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
102 font-family: "Lucida Console", Monaco, monospace;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
103 }
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
104
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
105 body {
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
106 overflow: hidden;
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
107 }
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
108
2
3671857d1dfe added views
sean
parents:
diff changeset
109 #wrapper{
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
110 background-color: #F2F2F2;
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
111 color: black;
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
112 min-width: 100%;
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
113 min-height: 100%;
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
114 }
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
115
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
116 #topbar{
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
117 min-width: auto;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
118 padding-left: 8px;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
119 padding-top: 8px;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
120 padding-bottom: 8px;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
121 /*height: 5%;*/
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
122 font-family: Arial, Helvetica, sans-serif;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
123 }
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
124
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
125 #content{
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
126 min-width: 100%;
7
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
127 % if show_top_bar == "True":
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
128 height: 95%;
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
129 % else :
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
130 height: 100%;
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
131 %end
2
3671857d1dfe added views
sean
parents:
diff changeset
132 }
3671857d1dfe added views
sean
parents:
diff changeset
133
3671857d1dfe added views
sean
parents:
diff changeset
134 .tile{
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
135 float: left;
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
136 margin: 8px;
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
137 background-color: #FFFFFF;
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
138 border: 1px solid #999999;
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
139 border: none;
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
140 text-align:center;
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
141 vertical-align: middle;
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
142 }
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
143
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
144 .clear{
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
145 height: 0px;
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
146 clear: both;
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
147 }
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
148
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
149 /*tiles types*/
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
150
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
151 .statusmon{
2
3671857d1dfe added views
sean
parents:
diff changeset
152 color: white;
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
153 font-size: {{vp_size}};
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
154 }
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
155
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
156 .chart{
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
157 font-size: {{vp_size}};
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
158 }
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
159
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
160 .active{
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
161 border: 1px solid #00cc00;
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
162 background-color: #009900;
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
163 }
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
164
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
165 .dead{
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
166 border: 1px solid #cc0000;
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
167 background-color: #990000;
2
3671857d1dfe added views
sean
parents:
diff changeset
168 }
3671857d1dfe added views
sean
parents:
diff changeset
169
3671857d1dfe added views
sean
parents:
diff changeset
170 </style>
3671857d1dfe added views
sean
parents:
diff changeset
171
3671857d1dfe added views
sean
parents:
diff changeset
172 <div id = "wrapper">
7
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
173 % if show_top_bar == "True" :
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
174 <div id = "topbar">
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
175 <b>{{weekday}}</b> {{today.day}}. {{month_name}}
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
176 </div>
7
c8cb2aa0b72c fixed default condifuration
sean
parents: 6
diff changeset
177 % end
2
3671857d1dfe added views
sean
parents:
diff changeset
178
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
179 <div id = "content">
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
180
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
181 <%
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
182 for tile in tiles :
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
183 type = ""
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
184 text = ""
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
185 status = ""
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
186 if tile["type"] == "mon" :
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
187 type = "statusmon"
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
188 text = tile["source"]
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
189 if tile["status"] == "up" :
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
190 status = "active"
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
191 elif tile["status"] == "down" :
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
192 status = "dead"
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
193 end
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
194 elif tile["type"] == "d3.js" :
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
195 type = "chart"
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
196 text = "place for a chart!"
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
197 end
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
198 %>
3
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
199 <div class = "tile {{type}} {{status}}">
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
200 {{text}}
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
201 </div>
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
202
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
203 % end
3f5bcad45756 pars a .conf | dynamic adding of divs | dynamiv VP scaling
sean
parents: 2
diff changeset
204
5
c49f7fe82743 changed the grid layout to a more responsive and compatible self-calculating JS based version
sean
parents: 4
diff changeset
205 </div>
6
3acc5164369e resize content in height too
sean
parents: 5
diff changeset
206 </div>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)