Skip to content

Commit 577d644

Browse files
Add Edge side panel support
1 parent 0d32eba commit 577d644

File tree

15 files changed

+295
-85
lines changed

15 files changed

+295
-85
lines changed

slow-calendar/public/app.css

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ button:active {
5050
background-color: var(--background-color);
5151
}
5252

53+
#app.in-side-panel {
54+
grid-template-rows: 1fr;
55+
}
56+
57+
#app[data-mode="day"] {
58+
grid-template-columns: 1fr;
59+
}
60+
5361
@media (max-width: 400px) {
5462
#app {
5563
grid-template-columns: 1fr;
@@ -71,6 +79,10 @@ button:active {
7179
grid-column: span 2;
7280
}
7381

82+
#app[data-mode="day"] #toolbar {
83+
grid-column: span 1;
84+
}
85+
7486
#toolbar #month-year {
7587
margin: 0 auto;
7688
font-weight: bold;
@@ -86,9 +98,12 @@ button:active {
8698
border-radius: .5rem;
8799
overflow: hidden;
88100
}
101+
#app:not([data-mode="month"]) #month-grid {
102+
display: none;
103+
}
89104

90105
#week-grid {
91-
display: none;
106+
display: grid;
92107
grid-template-columns: repeat(7, 1fr);
93108
grid-template-rows: 1fr;
94109
gap: 1px;
@@ -97,6 +112,23 @@ button:active {
97112
border-radius: .5rem;
98113
overflow: hidden;
99114
}
115+
#app:not([data-mode="week"]) #week-grid {
116+
display: none;
117+
}
118+
119+
#day-grid {
120+
display: grid;
121+
grid-template-columns: 1fr;
122+
grid-template-rows: 1fr;
123+
gap: 1px;
124+
border: 1px solid var(--border-color);
125+
background: var(--border-color);
126+
border-radius: .5rem;
127+
overflow: hidden;
128+
}
129+
#app:not([data-mode="day"]) #day-grid {
130+
display: none;
131+
}
100132

101133
#sidebar {
102134
padding: 1rem;
@@ -105,6 +137,9 @@ button:active {
105137
border-radius: .5rem;
106138
overflow-y: auto;
107139
}
140+
#app[data-mode="day"] #sidebar {
141+
display: none;
142+
}
108143

109144
#sidebar h2 {
110145
margin: 0;

slow-calendar/public/bundle.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

slow-calendar/public/data.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"title": "Stand-up meeting",
1111
"color": "#a2e1ef",
1212
"startDate": "2023-01-01",
13-
"endDate": "2024-01-01",
13+
"endDate": "2025-01-01",
1414
"startTime": "09:00",
1515
"duration": 30,
1616
"repeat": "daily",
@@ -55,7 +55,7 @@
5555
},
5656
{
5757
"id": "qmcv98y34vssde",
58-
"title": "1:1",
58+
"title": "1:1 with my manager",
5959
"color": "#ace3ac",
6060
"startDate": "2023-01-02",
6161
"startTime": "11:30",
@@ -65,6 +65,30 @@
6565
"description": "Weekly one to one with my manager",
6666
"rsvp": true
6767
},
68+
{
69+
"id": "q3mc1v98y34vssdfae42e",
70+
"title": "1:1 with Danas",
71+
"color": "#ace3ac",
72+
"startDate": "2024-02-06",
73+
"startTime": "15:00",
74+
"duration": 25,
75+
"repeat": "weekly",
76+
"location": "Danas' office",
77+
"description": "Weekly one to one with Danas",
78+
"rsvp": true
79+
},
80+
{
81+
"id": "q3mc1vgjse723sdfh82fae",
82+
"title": "1:1 with Ahmad",
83+
"color": "#ace3ac",
84+
"startDate": "2024-02-06",
85+
"startTime": "15:30",
86+
"duration": 25,
87+
"repeat": "weekly",
88+
"location": "My office",
89+
"description": "Weekly one to one with Ahmad",
90+
"rsvp": true
91+
},
6892
{
6993
"id": "dfgj79354unjbhvhsd",
7094
"title": "Christmas time off",

slow-calendar/public/icon-128.png

1.46 KB
Loading

slow-calendar/public/icon-256.png

2.93 KB
Loading

slow-calendar/public/icon-48.png

876 Bytes
Loading

slow-calendar/public/icon-64.png

936 Bytes
Loading

slow-calendar/public/icon.png

7.19 KB
Loading

slow-calendar/public/index.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
34
<head>
4-
<meta charset="UTF-8">
5-
<title>Slow Calendar</title>
6-
<link rel="icon" type="image/png" href="https://edgestatic.azureedge.net/welcome/static/favicon.png">
7-
<link rel="stylesheet" href="app.css">
5+
<meta charset="UTF-8">
6+
<title>Slow Calendar</title>
7+
<link rel="icon" type="image/png" href="icon-48.png">
8+
<link rel="stylesheet" href="app.css">
9+
<link rel="manifest" href="manifest.json" />
810
</head>
11+
912
<body>
1013
<div id="app"></div>
1114
<script type="module" src="bundle.js"></script>
1215
</body>
16+
1317
</html>

slow-calendar/public/manifest.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "Slow Calendar",
3+
"short_name": "slow-calendar",
4+
"description": "A calendar app with a focus on simplicity and the ability to pin today's events to the browser's side panel",
5+
"lang": "en-US",
6+
"start_url": "./",
7+
"scope": "./",
8+
"theme_color": "white",
9+
"background_color": "white",
10+
"display": "standalone",
11+
"edge_side_panel": {},
12+
"icons": [
13+
{
14+
"src": "./icon.png",
15+
"sizes": "512x512"
16+
},
17+
{
18+
"src": "./icon-256.png",
19+
"sizes": "256x256"
20+
},
21+
{
22+
"src": "./icon-128.png",
23+
"sizes": "128x128"
24+
},
25+
{
26+
"src": "./icon-64.png",
27+
"sizes": "64x64"
28+
},
29+
{
30+
"src": "./icon-48.png",
31+
"sizes": "48x48"
32+
}
33+
]
34+
}

0 commit comments

Comments
 (0)