roundabout,
created on Tuesday, 7 May 2024, 08:55:53 (1715072153),
received on Wednesday, 10 July 2024, 16:59:59 (1720630799)
Author identity: vlad <vlad.muntoiu@gmail.com>
ab0475bb250a795d3a8b441d32f4162198f4102c
.idea/workspace.xml
@@ -4,8 +4,9 @@
<option name="autoReloadType" value="SELECTIVE" /> </component> <component name="ChangeListManager"> <list default="true" id="b2c629ea-d173-4caf-b306-cbeaee617270" name="Changes" comment="Index page"><change beforePath="$PROJECT_DIR$/projects/ampoule.md" beforeDir="false" afterPath="$PROJECT_DIR$/projects/ampoule.md" afterDir="false" /><list default="true" id="b2c629ea-d173-4caf-b306-cbeaee617270" name="Changes" comment="Responsive index page"> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/articles/Moved to a roundabout.md" beforeDir="false" afterPath="$PROJECT_DIR$/articles/Moved to a roundabout.md" afterDir="false" /></list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -29,7 +30,9 @@
"Python.main.executor": "Run", "RunOnceActivity.ShowReadmeOnStart": "true", "git-widget-placeholder": "master", "last_opened_file_path": "/home/vlad/blog/static/photos""last_opened_file_path": "/home/vlad/blog/static/photos", "nodejs_package_manager_path": "npm", "vue.rearranger.settings.migration": "true"} }</component> <component name="RecentsManager">
@@ -58,6 +61,7 @@
<option name="IS_MODULE_SDK" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_SOURCE_ROOTS" value="true" /> <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /><option name="SCRIPT_NAME" value="$PROJECT_DIR$/main.py" /> <option name="PARAMETERS" value="" /> <option name="SHOW_COMMAND_LINE" value="false" />
@@ -71,7 +75,7 @@
<component name="SharedIndexes"> <attachedChunks> <set> <option value="bundled-python-sdk-0509580d9d50-746f403e7f0c-com.jetbrains.pycharm.community.sharedIndexes.bundled-PC-241.14494.241" /><option value="bundled-python-sdk-babbdf50b680-746f403e7f0c-com.jetbrains.pycharm.community.sharedIndexes.bundled-PC-241.15989.155" /></set> </attachedChunks> </component>
@@ -83,6 +87,7 @@
<option name="number" value="Default" /> <option name="presentableId" value="Default" /> <updated>1713536817770</updated> <workItem from="1714414389204" duration="5000" /></task> <task id="LOCAL-00001" summary="Blog"> <option name="closed" value="true" />
@@ -228,7 +233,23 @@
<option name="project" value="LOCAL" /> <updated>1714393092467</updated> </task> <option name="localTasksCounter" value="19" /><task id="LOCAL-00019" summary="Update ampoule example"> <option name="closed" value="true" /> <created>1714399758220</created> <option name="number" value="00019" /> <option name="presentableId" value="LOCAL-00019" /> <option name="project" value="LOCAL" /> <updated>1714399758220</updated> </task> <task id="LOCAL-00020" summary="Responsive index page"> <option name="closed" value="true" /> <created>1714402578242</created> <option name="number" value="00020" /> <option name="presentableId" value="LOCAL-00020" /> <option name="project" value="LOCAL" /> <updated>1714402578242</updated> </task> <option name="localTasksCounter" value="21" /><servers /> </component> <component name="Vcs.Log.Tabs.Properties">
@@ -260,6 +281,8 @@
<MESSAGE value="Build in another worktree" /> <MESSAGE value="More" /> <MESSAGE value="Index page" /> <option name="LAST_COMMIT_MESSAGE" value="Index page" /><MESSAGE value="Update ampoule example" /> <MESSAGE value="Responsive index page" /> <option name="LAST_COMMIT_MESSAGE" value="Responsive index page" /></component> </project>
articles/Browsers are doing too much.md
main.py
@@ -18,7 +18,7 @@ def markdown_filter(text):
def article_url(url): url = url.lower().rpartition(".")[0]url = url.lower().rpartition(".")[0] if "." in url else url.lower()new_url = "" for i in url:
@@ -48,12 +48,12 @@ projects_page = ampoule.Page(site, "projects.html", projects=projects)
topics = collections.defaultdict(list) for article in articles: for topic in article["topics"]: topics[topic].append(article)topics[topic].append(("posts", article))for project in projects: for topic in project["topics"]: topics[topic].append(project)topics[topic].append(("projects", project))topics = sorted(topics.items(), key=lambda x: x[0]) index_page = ampoule.Page(site, "index.html", all_posts=list(articles)+list(projects), topics=topics)index_page = ampoule.Page(site, "index.html", topics=topics)# Add the pages to the site site.add_page("/", main_page)
static/photos/browsers-bad.png
static/style.css
@@ -60,9 +60,18 @@ body {
font-variation-settings: "opsz" 14; } a {:is(a:link, a:visited):not(nav a) {color: #009688; text-decoration-thickness: 0.125em;text-decoration-thickness: 0.0625em; text-underline-offset: 0.125em; font-weight: 550; } a:hover:not(nav a) { background: #B2DFDB; color: #00796B; border-radius: 0.25rem; text-decoration: none;} header {
@@ -128,6 +137,7 @@ nav > ul > li > a {
text-decoration: none; color: #000000; text-decoration-thickness: 0.125em; text-shadow: none !important;} nav > ul > li > a:hover {
@@ -209,12 +219,14 @@ h6 {
margin: 0; } .article-title {.article-title, .article-title a:link, .article-title a:visited {text-decoration: none; text-align: center; color: #009688;color: #00796B;display: block; width: 100%; background: transparent !important; font-family: "Romanian League Gothic", sans-serif;} #mail-link {
@@ -249,17 +261,17 @@ pre {
padding: 0.5rem; } .project-title > a {.project-title > a:link, .project-title > a:visited {text-decoration: none; background: #009688; color: #ffffff; padding: 0 1rem;padding: 0.5rem;border: 4px solid #00796B; box-sizing: border-box; line-height: 1.25em; font-size: 0.875em;font-family: "Romanian League Gothic Condensed", sans-serif;align-self: stretch;font-size: 0.625em; font-family: "Romanian League Gothic", sans-serif; text-transform: uppercase;display: flex; align-items: center; justify-content: center;
@@ -326,7 +338,7 @@ blockquote > p:last-child {
margin-bottom: 0; } img {img:not(.article-image) {max-width: 100%; height: auto; }
@@ -374,3 +386,12 @@ img {
grid-template-columns: 1fr; } } .article-image { width: calc(100% + 2rem) !important; aspect-ratio: 64/27; object-fit: cover; position: relative; top: -1rem; left: -1rem; }
templates/article.html
@@ -5,6 +5,12 @@
{% block content %} <h1>{{ document["title"] }}</h1> <div id="article-date">{{ document.date | strftime("%Y-%m-%d, %H:%M:%S") }}</div> {% if document["image"] %} <figure> <img src="{{ document['image'] }}" alt="{{ document['image-alt'] }}" id="article-image-header"> <figcaption>Pictured: {{ document['image-alt'] }}</figcaption> </figure> {% endif %}<article class="content-area"> {{ document.content | markdown }} </article>
templates/default.html
@@ -26,6 +26,7 @@
<footer> <p>Page generated on {{ timestamp.strftime("%A, %e %B %Y at %H:%M:%S") }}</p> <p xmlns:cc="http://creativecommons.org/ns#" >This work is marked with <a href="https://creativecommons.org/publicdomain/zero/1.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">CC0 1.0 Universal</a> (🄍). No rights reserved.</p> <a href="#">Back to top</a></footer> </body> </html>
templates/home.html
@@ -5,6 +5,9 @@
{% for article in articles %} <article class="content-area"> {% if article["image"] %} <img src="{{ article['image'] }}" alt="{{ article['image-alt'] }}" class="article-image"> {% endif %}<h2><a href="/articles/{{ article.file_name }}" class="article-title">{{ article["title"] }}</a></h2> <div class="home-article-date">{{ article.date | strftime("%Y-%m-%d") }}</div> <p>{{ article.content | first_paragraph | markdown }}</p>
templates/index.html
@@ -8,9 +8,9 @@
<details class="topic-expander"> <summary><h2>{{ topic }}</h2></summary> <div class="topic-posts"> {% for post in posts %}{% for type, post in posts %}<article class="content-area"> <h2><a href="/posts/{{ post.file_name }}" class="article-title">{{ post["title"] }}</a></h2><h2><a href="/{{ type }}/{{ post.file_name }}" class="article-title">{{ post["title"] }}</a></h2><div class="home-article-date">{{ post.date | strftime("%Y-%m-%d") }}</div> <p>{{ post.content | first_paragraph | markdown }}</p> </article>