Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit c38568a

Browse files
committed
cleaning up and new template
1 parent 8d8be3e commit c38568a

File tree

3 files changed

+28
-49
lines changed

3 files changed

+28
-49
lines changed

.github/workflows/updatePage.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ jobs:
7272
working-directory: main
7373
run: python generate_html.py
7474

75+
- name: cleanup json hourly
76+
run: rm -rf main/page/json_hourly
77+
78+
- name: cleanup keys hourly
79+
run: rm -rf main/page/keys_hourly
80+
81+
- name: cleanup users hourly
82+
run: rm -rf main/page/users_hourly
83+
7584
- name: install puppeteer
7685
uses: mujo-code/puppeteer-headful@master
7786
env:
@@ -82,10 +91,18 @@ jobs:
8291
with:
8392
url: "https://ctt.pfstr.de/"
8493

94+
- name: publish
95+
uses: netlify/actions/cli@master
96+
with:
97+
args: deploy --dir=main/page --prod
98+
env:
99+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
100+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
101+
85102
- name: copy screenshot
86103
run: cp screenshots/desktopPage1920x1080*.png main/page/Screenshot.png
87104

88-
- name: publish
105+
- name: update screenshot
89106
uses: netlify/actions/cli@master
90107
with:
91108
args: deploy --dir=main/page --prod

page/Screenshot.png

-173 KB
Binary file not shown.

page/template.html

Lines changed: 10 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -75,53 +75,15 @@ <h1>Corona Tracker Tracker</h1>
7575
}).catch(console.error);
7676
</script>
7777

78-
<div class="tabs">
78+
<table>
7979
{% for date in dates %}
80-
<div class="tab">
81-
<input type="radio" id="{{ date }}" name="date-group" checked>
82-
<label for="{{ date }}">{{ date }}</label>
83-
<div class="content">
84-
<div class="tabs">
85-
<div class="tab">
86-
<input type="radio" id="{{ date }}-txt" name="{{ date }}-group-nested" checked>
87-
<label for="{{ date }}-txt">plaintext</label>
88-
<div class="content">
89-
<a href="/plaintext/{{ date }}.txt" target="_blank">download</a>
90-
<button
91-
onClick="document.getElementById('plaintext{{ date }}').setAttribute('data', '/plaintext/{{ date }}.txt')">display</button>
92-
<object id="plaintext{{ date }}" type="text/plain" height="100%" width="100%"></object>
93-
</div>
94-
</div>
95-
<div class="tab">
96-
<input type="radio" id="{{ date }}-users" name="{{ date }}-group-nested">
97-
<label for="{{ date }}-users">approx. users</label>
98-
<div class="content">
99-
<a href="/users/{{ date }}.txt" target="_blank">download</a>
100-
<button
101-
onClick="document.getElementById('users{{ date }}').setAttribute('data', '/users/{{ date }}.txt')">display</button>
102-
<object id="users{{ date }}" type="text/plain" height="100%" width="100%"></object>
103-
</div>
104-
</div>
105-
<div class="tab">
106-
<input type="radio" id="{{ date }}-json" name="{{ date }}-group-nested">
107-
<label for="{{ date }}-json">json</label>
108-
<div class="content">
109-
<a href="/json/{{ date }}.json" target="_blank">download</a>
110-
<button
111-
onClick="document.getElementById('json{{ date }}').setAttribute('data', '/json/{{ date }}.json')">display</button>
112-
<object id="json{{ date }}" type="text/json" height="100%" width="100%"></object>
113-
</div>
114-
</div>
115-
<div class="tab">
116-
<input type="radio" id="{{ date }}-zip" name="{{ date }}-group-nested">
117-
<label for="{{ date }}-zip">raw binary</label>
118-
<div class="content">
119-
<a href="/keys/{{ date }}.zip" target="_blank">download</a>
120-
</div>
121-
</div>
122-
</div>
123-
</div>
124-
{% endfor %}
125-
</div>
126-
</div>
80+
<tr>
81+
<td>{{ date }}</td>
82+
<td><a href="/plaintext/{{ date }}.txt" target="_blank">plaintext</a></td>
83+
<td><a href="/users/{{ date }}.txt" target="_blank">approx. users</a></td>
84+
<td><a href="/json/{{ date }}.json" target="_blank">json</a></td>
85+
<td> <a href="/keys/{{ date }}.zip" target="_blank">raw binary</a></td>
86+
</tr>
87+
{% endfor %}
88+
</table>
12789
</body>

0 commit comments

Comments
 (0)