sean@4: sean@4: sean@3: <% sean@3: sean@5: import math sean@5: from datetime import date sean@5: sean@5: ################# sean@7: # settings # sean@7: ################# sean@7: sean@7: sean@7: show_top_bar = settings["show_top_bar"] sean@7: sean@7: sean@7: ################# sean@5: # date and time # sean@5: ################# sean@5: sean@5: sean@5: today = date.today() sean@5: weekday = ("Montag", "Dienstag", "Mittwoch", "Donnerstag", sean@5: "Freitag", "Samstag", "Sonntag")[today.weekday()] sean@5: month_name = ("Januar", "Februar", "März", "Aprill", "Mai", sean@5: "Juni", "Juli", "August", "September", "Oktober", sean@5: "November", "Dezember")[today.month-1] sean@5: sean@6: number_of_rows = 2 sean@5: sean@5: ################# sean@5: # viewport size # sean@5: ################# sean@7: vp_size = "17px" sean@5: #if len(tiles) <= 2: sean@5: # vp_size = "6vw" sean@5: #elif len(tiles) >2 and len(tiles) <=4 : sean@5: # vp_size = "5vw" sean@5: #elif len(tiles) >4 and len(tiles) <=6 : sean@5: # vp_size = "4vw" sean@5: #elif len(tiles) >6 and len(tiles) <=8 : sean@5: # vp_size = "3vw" sean@5: #end sean@3: %> sean@2: sean@5: sean@5: sean@2: sean@2: sean@2:
sean@7: % if show_top_bar == "True" : sean@5:
sean@5: {{weekday}} {{today.day}}. {{month_name}} sean@5:
sean@7: % end sean@2: sean@5:
sean@5: sean@5: <% sean@5: for tile in tiles : sean@5: type = "" sean@5: text = "" sean@5: status = "" sean@5: if tile["type"] == "mon" : sean@5: type = "statusmon" sean@5: text = tile["source"] sean@5: if tile["status"] == "up" : sean@5: status = "active" sean@5: elif tile["status"] == "down" : sean@5: status = "dead" sean@5: end sean@5: elif tile["type"] == "d3.js" : sean@5: type = "chart" sean@5: text = "place for a chart!" sean@5: end sean@5: %> sean@3:
sean@3: {{text}} sean@3:
sean@3: sean@3: % end sean@3: sean@5:
sean@6: