Change frontend

This commit is contained in:
Ambulance Clerc
2022-10-15 04:01:17 +02:00
parent 0f2802e5a9
commit 4dd63bb7b5
4 changed files with 59 additions and 71 deletions

View File

@@ -83,6 +83,9 @@ class cls_caldav():
if "$" in item.key:
item.team_transfert = True
item.key = item.key.replace("$","")
if "Manif" in item.key:
item.team_manif = True
item.key = item.key.replace("Manif", "")
item.name = arr[1]
if "&" in item.name:
arr = item.name.split("&")
@@ -303,6 +306,7 @@ class _caldav_item():
team_1_chef = False
team_2_chef = False
team_transfert = False
team_manif = False
def format_str_date(self):
self.str_start_date = datetime.strptime(self.dtstart,"%d.%m.%Y %H:%M").strftime("%d.%m")

View File

@@ -14,3 +14,9 @@ table{
width: 100%;
}
.team_svg_icon{
width: 24px;
height: 24px;
fill: white;
}

View File

@@ -65,12 +65,12 @@
<span>Ambulance Clerc SA</span>
</div>
<div>
<iframe src="https://www.zeitverschiebung.net/clock-widget-iframe-v2?language=fr&size=medium&timezone=Europe%2FZurich" width="100%" height="115" frameborder="0" scrolling="no" seamless ></iframe>
<iframe src="https://www.zeitverschiebung.net/clock-widget-iframe-v2?language=fr&size=medium&timezone=Europe%2FZurich" width="100%" height="115" frameborder="0" scrolling="no" seamless style="pointer-events: none;"></iframe>
</div>
</div>
<div style="width: 500px; height: 115px; "><a class="weatherwidget-io" href="https://forecast7.com/fr/46d256d95/monthey/" data-label_1="MONTHEY" data-label_2="METEO" data-days="3" data-theme="dark" >MONTHEY METEO</a>
<div style="width: 500px; height: 115px; "><a class="weatherwidget-io" href="https://forecast7.com/fr/46d256d95/monthey/" data-label_1="MONTHEY" data-label_2="METEO" data-days="3" data-theme="dark" style="pointer-events: none;" >MONTHEY METEO</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src='https://weatherwidget.io/js/widget.min.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','weatherwidget-io-js');
</script>

View File

@@ -10,84 +10,62 @@
<td style="vertical-align: top;font-weight: bold;" width="100" >
{{task.key}}
{% if task.team_transfert %}
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 469.333 469.333" style="enable-background:new 0 0 469.333 469.333;width:24px;fill:white;" xml:space="preserve">
<svg class="team_svg_icon" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<g>
<g>
<path d="M330.667,192h-64h-64h-64c-5.899,0-10.667,4.779-10.667,10.667v74.667c0,5.888,4.768,10.667,10.667,10.667h64h64h64
c5.899,0,10.667-4.779,10.667-10.667v-74.667C341.333,196.779,336.565,192,330.667,192z M192,266.667h-42.667v-53.333H192V266.667
z M256,266.667h-42.667v-53.333H256V266.667z M320,266.667h-42.667v-53.333H320V266.667z"/>
<g>
<rect x="276.488" y="406.352" width="43.052" height="97.89"/>
<path d="M491.512,185.528h-42.911V28.241c0-11.315-9.173-20.488-20.488-20.488H83.886c-11.315,0-20.488,9.173-20.488,20.488
v157.287H20.488C9.173,185.528,0,194.701,0,206.016v277.744c0,11.315,9.173,20.488,20.488,20.488h131.004V385.862
c0-11.315,9.173-20.488,20.488-20.488h168.042c11.315,0,20.488,9.173,20.488,20.488v118.385h131.004
c11.315,0,20.488-9.173,20.488-20.488V206.016C512,194.701,502.828,185.528,491.512,185.528z M290.703,137.617h-14.214v14.216
c0,11.315-9.173,20.488-20.488,20.488s-20.488-9.173-20.488-20.488v-14.216h-14.216c-11.315,0-20.488-9.173-20.488-20.488
c0-11.315,9.172-20.488,20.486-20.488h14.216V82.425c0-11.315,9.173-20.488,20.488-20.488c11.315,0,20.488,9.173,20.488,20.488
v14.216h14.216c11.315,0,20.488,9.173,20.488,20.488C311.19,128.444,302.017,137.617,290.703,137.617z"/>
<rect x="192.461" y="406.352" width="43.041" height="97.89"/>
</g>
</g>
</g>
</svg>
<svg class="team_svg_icon" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 490 490" style="enable-background:new 0 0 490 490;" xml:space="preserve">
<g>
<g>
<g>
<circle cx="53.333" cy="181.333" r="10.667"/>
<g>
<path d="M353.4,490H136.6C61.5,490,0,428.5,0,353.4V136.6C0,61.5,61.5,0,136.6,0h216.9C428.5,0,490,61.5,490,136.6v216.9
C490,428.5,428.5,490,353.4,490z M136.6,40.7c-53.2,0-95.9,42.7-95.9,95.9v216.9c0,53.2,42.7,95.9,95.9,95.9h216.9
c53.2,0,95.9-42.7,95.9-95.9V136.6c0-53.2-42.7-95.9-95.9-95.9L136.6,40.7z"/>
</g>
<g>
<g>
<path d="M142.8,367V123h41.7v106.3h122V123h41.7v245h-41.7V267.9h-122V368h-41.7V367z"/>
</g>
</g>
</g>
</g>
</g>
</svg>
{% endif %}
{% if task.team_manif %}
<svg class="team_svg_icon" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 56.001 56.001" style="enable-background:new 0 0 56.001 56.001;" xml:space="preserve">
<g>
<g>
<circle cx="53.333" cy="224" r="10.667"/>
</g>
</g>
<g>
<g>
<circle cx="53.333" cy="266.667" r="10.667"/>
</g>
</g>
<g>
<g>
<circle cx="53.333" cy="309.333" r="10.667"/>
</g>
</g>
<g>
<g>
<circle cx="53.333" cy="352" r="10.667"/>
</g>
</g>
<g>
<g>
<path d="M437.333,128H384V96c0-17.643-14.357-32-32-32h-34.805c-9.515-36.747-42.859-64-82.528-64s-73.013,27.253-82.528,64
h-34.805c-17.643,0-32,14.357-32,32v32H32c-17.643,0-32,14.357-32,32v234.667v64c0,5.888,4.768,10.667,10.667,10.667h448
c5.899,0,10.667-4.779,10.667-10.667v-64V160C469.333,142.357,454.976,128,437.333,128z M85.333,448h-64v-42.667h64V448z
M85.333,384h-64V160c0-5.877,4.779-10.667,10.667-10.667h53.333V384z M234.667,21.333c35.296,0,64,28.704,64,64
c0,35.296-28.704,64-64,64s-64-28.704-64-64C170.667,50.037,199.371,21.333,234.667,21.333z M224,448h-64V330.667h64V448z
M309.333,448h-64V330.667h64V448z M362.667,138.667v256V448h-32V320c0-5.888-4.768-10.667-10.667-10.667H149.333
c-5.899,0-10.667,4.779-10.667,10.667v128h-32v-53.333v-256V96c0-5.877,4.779-10.667,10.667-10.667h32
c0,47.051,38.283,85.333,85.333,85.333S320,132.384,320,85.333h32c5.888,0,10.667,4.789,10.667,10.667V138.667z M448,448h-64
v-42.667h64V448z M448,384h-64V149.333h53.333c5.888,0,10.667,4.789,10.667,10.667V384z"/>
</g>
</g>
<g>
<g>
<circle cx="416" cy="181.333" r="10.667"/>
</g>
</g>
<g>
<g>
<circle cx="416" cy="224" r="10.667"/>
</g>
</g>
<g>
<g>
<circle cx="416" cy="266.667" r="10.667"/>
</g>
</g>
<g>
<g>
<circle cx="416" cy="309.333" r="10.667"/>
</g>
</g>
<g>
<g>
<circle cx="416" cy="352" r="10.667"/>
</g>
</g>
<g>
<g>
<path d="M256,53.333c-5.899,0-10.667,4.779-10.667,10.667v10.667H224V64c0-5.888-4.768-10.667-10.667-10.667
c-5.899,0-10.667,4.779-10.667,10.667v42.667c0,5.888,4.768,10.667,10.667,10.667c5.899,0,10.667-4.779,10.667-10.667V96h21.333
v10.667c0,5.888,4.768,10.667,10.667,10.667c5.899,0,10.667-4.779,10.667-10.667V64C266.667,58.112,261.899,53.333,256,53.333z"/>
</g>
<path d="M55.085,0.19c-0.261-0.188-0.597-0.241-0.901-0.137l-17.73,5.91L19.73,2.028c-0.076-0.018-0.152-0.026-0.228-0.026
c-0.048,0-0.094,0.017-0.142,0.024c-0.026,0.004-0.051-0.006-0.076,0l-18,4C0.826,6.127,0.501,6.532,0.501,7.001v43
c0,0.304,0.138,0.59,0.375,0.78c0.179,0.144,0.4,0.22,0.625,0.22c0.072,0,0.145-0.008,0.217-0.023l17.807-3.957l14.156,2.498
c0.393-2.405,1.445-4.65,3.081-6.517c-2.11-2.408-3.262-5.441-3.262-8.64v-7.36h2h2h18v-26C55.501,0.68,55.346,0.378,55.085,0.19z
M35.501,25.001h-2h-2v2v7.36c0,3.098,0.958,6.11,2.725,8.64c-0.903,1.294-1.596,2.716-2.057,4.22l-11.668-2.059V4.264l15,3.529
V25.001z"/>
<path d="M52.501,34.361v-2.36h1c0.553,0,1-0.447,1-1s-0.447-1-1-1h-1h-1h-14h-1h-1c-0.553,0-1,0.447-1,1s0.447,1,1,1h1v2.36
c0,3.534,1.845,6.748,4.827,8.64c-2.981,1.892-4.827,5.105-4.827,8.64v2.36h-1c-0.553,0-1,0.447-1,1s0.447,1,1,1h1h14h2h1
c0.553,0,1-0.447,1-1s-0.447-1-1-1h-1v-2.36c0-3.534-1.845-6.748-4.827-8.64C50.655,41.109,52.501,37.896,52.501,34.361z
M50.501,51.641v2.36h-12v-2.36c0-3.319,2.033-6.298,5.197-7.64h1.605C48.467,45.343,50.501,48.321,50.501,51.641z M45.303,42.001
h-1.605c-3.164-1.342-5.197-4.32-5.197-7.64v-2.36h12v2.36C50.501,37.681,48.467,40.659,45.303,42.001z"/>
</g>
</svg>