2024-12-16
This commit is contained in:
14
server/app/templates/base.html
Normal file
14
server/app/templates/base.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{% block head %}
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
<!-- <link rel="stylesheet" href="style.css"> -->
|
||||
<style>{% include "style.css"%}</style>
|
||||
<meta name="viewport" content="width=600, height=800" />
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,12 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Dashboard ({{today.strftime('%-m/%-d, %-H:%M')}})</title>
|
||||
<!-- <link rel="stylesheet" href="style.css"> -->
|
||||
<style>{% include "style.css"%}</style>
|
||||
<meta name="viewport" content="width=600, height=800" />
|
||||
</head>
|
||||
<body>
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Dashboard ({{today.strftime('%-m/%-d, %-H:%M')}}){% endblock %}
|
||||
{% block content %}
|
||||
<div class="dashboard">
|
||||
<div style="height:1em"></div>
|
||||
<div class="panel top">
|
||||
@@ -22,41 +16,16 @@
|
||||
</div>
|
||||
<div class="panel bottom week">
|
||||
<div class="row">
|
||||
{% for day, events in days [:4] %}
|
||||
<div class="day">
|
||||
<div id="dotw-1" class="day-title{% if day == today.date()%} current-day{% endif %}">
|
||||
{{ day.strftime('%a %-d') }}
|
||||
</div>
|
||||
{% for event in events %}
|
||||
<div class="event">
|
||||
{{ event.summary }}<br>
|
||||
{% if not event.is_all_day %}
|
||||
<span class="daterange">{{ event.range_str }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% for day, events in days [:4] %}
|
||||
{% include "includes/day.html" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="row">
|
||||
{% for day, events in days [4:] %}
|
||||
<div class="day">
|
||||
<div id="dotw-1" class="day-title{% if day == today.date()%} current-day{% endif %}">
|
||||
{{ day.strftime('%a %-d') }}
|
||||
</div>
|
||||
{% for event in events %}
|
||||
<div class="event">
|
||||
{{ event.summary }}<br>
|
||||
{% if not event.is_all_day %}
|
||||
<span class="daterange">{{ event.range_str }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% include "includes/day.html" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1em;text-align: center;"><code>{{extra_debug}} </code><code>{{ today.strftime('%c') }}</code></div>
|
||||
<div><code>{{extra_debug}} </code><code>{{ today.strftime('%c') }}</code></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{%endblock%}
|
||||
|
||||
15
server/app/templates/includes/day.html
Normal file
15
server/app/templates/includes/day.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="day">
|
||||
<div class="day-title{% if day == today.date()%} current-day{% endif %}">
|
||||
{{ day.strftime('%a %-d') }}
|
||||
</div>
|
||||
<div class="events">
|
||||
{% for event in events %}
|
||||
<div class="event">
|
||||
{{ event.summary }}<br>
|
||||
{% if not event.is_all_day %}
|
||||
<span class="daterange">{{ event.range_str }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -3,13 +3,19 @@
|
||||
box-sizing: border-box; /* Include padding and borders in size calculations */
|
||||
}
|
||||
html, body {
|
||||
width: 600px;
|
||||
height: 800px;
|
||||
margin: 0; /* Prevent any default margins */
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 600px;
|
||||
height: 800px;
|
||||
border: 2px solid red; /* Visual aid */
|
||||
}
|
||||
|
||||
.dashboard {
|
||||
border: 2px solid green; /* Visual aid */
|
||||
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
@@ -49,7 +55,7 @@ html, body {
|
||||
font-size: 60px;
|
||||
font-weight: bold;
|
||||
vertical-align: top;
|
||||
text-align: right !important;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.splitpanel .weather-icon {
|
||||
@@ -71,6 +77,7 @@ html, body {
|
||||
}
|
||||
|
||||
.panel.bottom.week .row {
|
||||
border: 2px solid yellow; /* Visual aid */
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
@@ -78,6 +85,8 @@ html, body {
|
||||
-webkit-flex: 1;
|
||||
flex: 1;
|
||||
height: 50%;
|
||||
align-items: stretch; /* Stretch children to fill the width (optional) */
|
||||
|
||||
}
|
||||
|
||||
.panel.bottom.week .row .day {
|
||||
@@ -85,13 +94,11 @@ html, body {
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical; /* Old WebKit property for column layout */
|
||||
-webkit-box-direction: normal; /* Old WebKit property for forward direction */
|
||||
-webkit-box-direction: column; /* Old WebKit property for forward direction */
|
||||
-webkit-flex-direction: column; /* Flexbox column direction for modern WebKit */
|
||||
flex-direction: column; /* Standard Flexbox column layout */
|
||||
border-style: solid;
|
||||
width: 135px; /* Fixed width for each day */
|
||||
margin: 1px;
|
||||
align-items: stretch; /* Stretch children to fill the width (optional) */
|
||||
justify-content: flex-start; /* Align children at the top */
|
||||
text-align: left;
|
||||
flex: 1;
|
||||
@@ -119,6 +126,11 @@ html, body {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: .8em;
|
||||
}
|
||||
Reference in New Issue
Block a user