-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnews.py
executable file
·47 lines (42 loc) · 1.24 KB
/
news.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/python3
from pyhtml.html import *
from common import Navigate, Post
from http.cookies import SimpleCookie
import os
if __name__ == "__main__":
cookies = SimpleCookie(os.environ.get('HTTP_COOKIE', ''))
print(Document() << [
Doctype(Html=True),
Html() << [
Head() << [
Script(Src="https://www.googletagmanager.com/gtag/js?id=G-FT6E284Y58", Async=True),
Script() << [
"""window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-FT6E284Y58');""",
],
Title("News | Broccoli"),
Link(Rel="stylesheet", Type="text/css", Href="index.css"),
Script(Src="js/imports.js"),
Script(Src="js/pubcss.js"),
Script(Src="js/code.js"),
Script(Src="index.js"),
],
Body() << [
Navigate("whitepaper" in cookies),
Div(Class="main") << [
Post("blog/2024-09-14-update.html"),
Post("blog/2024-05-27-months-of-progress.html"),
Post("blog/2023-08-31-intro-self-timed-circuits.html"),
Post("blog/2022-06-21-dsp.html"),
Post("blog/2022-04-10-technology-trends.html"),
],
Script() << """startWindow();
includeHTML(document)
.then(waitFor(loadCode))
.then(waitFor(formatAnchors))
.then(waitFor(formatLinks));"""
]
]
])