diff options
author | Vanja Cosic <1070957+vanjacosic@users.noreply.github.com> | 2023-10-28 18:23:13 +0200 |
---|---|---|
committer | Vanja Cosic <1070957+vanjacosic@users.noreply.github.com> | 2023-10-28 18:23:13 +0200 |
commit | 788c1bb279d9ce706ba6811c0dc2484c1a732106 (patch) | |
tree | 6c567d810d379d16bc56cf78f9cb3c930c7a6a10 | |
parent | e028ac38509a954a7d8808962dd57d400142ef64 (diff) | |
download | cph-rust-website-788c1bb279d9ce706ba6811c0dc2484c1a732106.zip |
Major redesign of the site
Affects structure, navigation, styles (light and dark mode), event data
-rw-r--r-- | config.toml | 11 | ||||
-rw-r--r-- | content/_index.md | 4 | ||||
-rw-r--r-- | content/coc.md | 4 | ||||
-rw-r--r-- | static/styles.css | 267 | ||||
-rw-r--r-- | templates/base.html | 43 | ||||
-rw-r--r-- | templates/event-page.html | 20 | ||||
-rw-r--r-- | templates/events.html | 26 | ||||
-rw-r--r-- | templates/index.html | 85 | ||||
-rw-r--r-- | templates/macros.html | 40 | ||||
-rw-r--r-- | templates/page.html | 46 |
10 files changed, 220 insertions, 326 deletions
diff --git a/config.toml b/config.toml index 4cadc50..581010a 100644 --- a/config.toml +++ b/config.toml @@ -6,8 +6,11 @@ title = "Copenhagen Rust Community" highlight_code = true [extra] -menu = [ - { title = 'Meetup.com ', url = 'https://www.meetup.com/copenhagen-rust-community/' }, - { title = 'Event archive', url = './events' }, - { title = 'Discord chat', url = 'https://discord.gg/NjtzmZ2APD' }, +nav = [ + { title = 'Home', url = '/' }, + { title = 'Events', url = '/events' }, + { title = 'CoC', url = '/coc' }, + { title = 'Meetup', url = 'https://www.meetup.com/copenhagen-rust-community/', icon = '<svg fill="#F64060" width="64px" height="64px" viewBox="0 -2.5 29 29" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="m28.595 23.062c-.38.374-.86.649-1.395.781l-.021.004c-.408.08-.878.126-1.358.126-1.172 0-2.281-.274-3.264-.762l.043.019c-4.365-1.92-3.401-6.785-1.486-10.139.575-1.007 1.142-2.022 1.713-3.04.449-.8 1.421-2.155 1.04-3.136-.4-1.029-1.467-1.035-2.168-.168-.634.868-1.206 1.855-1.669 2.901l-.04.102c-.507 1.058-3.04 6.618-3.04 6.618-.553 1.133-1.26 2.101-2.107 2.925l-.002.002c-.375.302-.857.484-1.381.484-.441 0-.851-.129-1.196-.351l.009.005c-.388-.278-.638-.727-.638-1.234 0-.144.02-.284.058-.416l-.003.011c.527-3.022 5.111-10.054 1.95-10.55-1.212-.19-1.541 1.158-1.914 2.019-.618 1.422-1.089 2.902-1.749 4.307-.695 1.434-1.293 3.111-1.706 4.858l-.034.169c-.32 1.386-.731 3.151-2.308 3.573-4.32 1.154-5.63-1.696-5.63-1.697-.705-2.24-.037-4.26.64-6.417.525-1.666.838-3.385 1.502-5.006 1.185-2.89 2.366-8.922 6.64-8.536 1.224.188 2.321.61 3.287 1.221l-.035-.021c.856.499 1.508.766 2.505.228.97-.522 1.414-1.495 2.57-1.829 1.238-.358 2.053.171 2.979.917 1.298 1.04 1.44.572 2.511.298.553-.155 1.189-.244 1.846-.244.37 0 .733.028 1.087.083l-.04-.005c5.01.858 1.819 7.254.624 9.824-.778 1.672-4.49 8.396-1.2 9.299.992.272 2.271.148 3.098.86.838.722.755 1.404.282 1.915z"></path></g></svg>' }, + { title = 'Discord', url = 'https://discord.gg/NjtzmZ2APD', icon = '<svg width="64px" height="64px" viewBox="0 -28.5 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid" fill="#000000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <g> <path d="M216.856339,16.5966031 C200.285002,8.84328665 182.566144,3.2084988 164.041564,0 C161.766523,4.11318106 159.108624,9.64549908 157.276099,14.0464379 C137.583995,11.0849896 118.072967,11.0849896 98.7430163,14.0464379 C96.9108417,9.64549908 94.1925838,4.11318106 91.8971895,0 C73.3526068,3.2084988 55.6133949,8.86399117 39.0420583,16.6376612 C5.61752293,67.146514 -3.4433191,116.400813 1.08711069,164.955721 C23.2560196,181.510915 44.7403634,191.567697 65.8621325,198.148576 C71.0772151,190.971126 75.7283628,183.341335 79.7352139,175.300261 C72.104019,172.400575 64.7949724,168.822202 57.8887866,164.667963 C59.7209612,163.310589 61.5131304,161.891452 63.2445898,160.431257 C105.36741,180.133187 151.134928,180.133187 192.754523,160.431257 C194.506336,161.891452 196.298154,163.310589 198.110326,164.667963 C191.183787,168.842556 183.854737,172.420929 176.223542,175.320965 C180.230393,183.341335 184.861538,190.991831 190.096624,198.16893 C211.238746,191.588051 232.743023,181.531619 254.911949,164.955721 C260.227747,108.668201 245.831087,59.8662432 216.856339,16.5966031 Z M85.4738752,135.09489 C72.8290281,135.09489 62.4592217,123.290155 62.4592217,108.914901 C62.4592217,94.5396472 72.607595,82.7145587 85.4738752,82.7145587 C98.3405064,82.7145587 108.709962,94.5189427 108.488529,108.914901 C108.508531,123.290155 98.3405064,135.09489 85.4738752,135.09489 Z M170.525237,135.09489 C157.88039,135.09489 147.510584,123.290155 147.510584,108.914901 C147.510584,94.5396472 157.658606,82.7145587 170.525237,82.7145587 C183.391518,82.7145587 193.761324,94.5189427 193.539891,108.914901 C193.539891,123.290155 183.391518,135.09489 170.525237,135.09489 Z" fill="#5865F2" fill-rule="nonzero"> </path> </g> </g></svg>' }, + { title = 'YouTube', url = 'https://www.youtube.com/@copenhagenrustcommunity', icon = '<svg fill="#FF0000" width="64px" height="64px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M10 2.3C.172 2.3 0 3.174 0 10s.172 7.7 10 7.7 10-.874 10-7.7-.172-7.7-10-7.7zm3.205 8.034l-4.49 2.096c-.393.182-.715-.022-.715-.456V8.026c0-.433.322-.638.715-.456l4.49 2.096c.393.184.393.484 0 .668z"></path></g></svg>' }, ] diff --git a/content/_index.md b/content/_index.md index 801cb0c..ee9a8f7 100644 --- a/content/_index.md +++ b/content/_index.md @@ -4,9 +4,9 @@ title = "index" ## About -A place for aspiring and experienced Rust enthusiasts to come together to discover and discuss the latest Rust developments, showcase Rust projects and crates, network and meet each other in a supportive community. ๐ฆ๐งก +A place for everyone interested in the [Rust language](https://rust-lang.org) to come together to discover and discuss the latest developments, showcase projects and crates, network and meet each other in a supportive community. ๐ฆ๐งก -We meet on a monthly basis somewhere in Copenhagen and are open to everyone interested in learning more about Rust, even if you have no prior experience with the language. +We meet on a monthly basis somewhere in Copenhagen and are open to everyone interested in learning more about Rust, even if you have no prior experience with the language. We have members from all over the world, so we always speak English at our events. ## Organizers diff --git a/content/coc.md b/content/coc.md index dfa1b0a..0e875b2 100644 --- a/content/coc.md +++ b/content/coc.md @@ -83,4 +83,6 @@ The [Citizen Code of Conduct](https://github.com/stumpsyn/policies/blob/master/c Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy). -*This document is based on the Citizen Code of Conduct, originally retrieved on October 26, 2023. Last updated on October 26, 2023.* +*This document is based on the Citizen Code of Conduct, retrieved on October 26, 2023.* + +*Last updated on October 26, 2023.* diff --git a/static/styles.css b/static/styles.css index a307453..f78cceb 100644 --- a/static/styles.css +++ b/static/styles.css @@ -3,49 +3,48 @@ } :root { - --primary-link-color: #d04000; - --primary-bg-color: #FFE7D6; - --primary-text-color: #323232; - --primary-text-color-over: #000; --background-color: #fff; + --brand-bg-color: #FFE7D6; + --brand-link-color: #d04000; + --brand-text-color: #323232; --secondary-text-color: #5e5e5e; - --box-background-color: #fcfbf9; - --code-color: #ffccb5; + --box-background-color: #fbf8f2; + --code-color: #e1e1e1; --code-background-color: #4a4a4a; } @media (prefers-color-scheme: dark) { :root { - --primary-link-color: #fd814c; - --primary-bg-color: #3c3c3c; - --primary-text-color: #e1e1e1; - --primary-text-color-over: #FFF; - --background-color: #282828; - --secondary-text-color: #f2f2f2; - --box-background-color: #3a3a3a; + --background-color: #1d1412; + --brand-bg-color: #261a17; + --brand-link-color: #ff7b41; + --brand-text-color: #e1e1e1; + --secondary-text-color: #d4d4d4; + --box-background-color: #271f1d; + } + + nav svg path { + fill: var(--brand-link-color); } } body { + box-sizing: border-box; padding: 0; margin: 0; - box-sizing: border-box; - font-size: 16px; - line-height: 1.6; + font-size: 18px; + line-height: 1.5; font-family: "Fira Sans", sans-serif; - color: var(--primary-text-color); + color: var(--brand-text-color); background-color: var(--background-color); - display: flex; - flex-direction: column; - min-height: 100vh; } a { - color: var(--primary-link-color); + color: var(--brand-link-color); } a:hover { - opacity: .6; + opacity: .75; text-decoration: none; } @@ -64,55 +63,72 @@ p>img { } header { - background-color: var(--primary-bg-color); - color: var(--primary-text-color); - margin-bottom: 1.5rem; + background-color: var(--brand-bg-color); +} + +header > a { + display: flex; + flex-direction: column; + font-weight: bold; + align-items: center; + justify-content: center; + padding: 1rem; + gap: .5rem 1.5rem; + text-decoration: none; + color: var(--brand-text-color); } header h1 { - color: var(--primary-link-color); + font-size: 1.3rem; + margin: 0; } -nav, main, footer { +header span { + color: var(--brand-link-color); +} + +header svg { + max-height: 6rem; +} + +nav ul, main, footer { width: 100%; - max-width: 960px; + max-width: 50rem; margin: 0 auto; - padding: 1rem 1.5rem; } nav { + background-color: var(--box-background-color); +} + +nav ul { display: flex; - flex-direction: column; - align-items: center; - padding: 1.5rem; - gap: 0 2.5rem; - text-align: center; + justify-content: space-evenly; + flex-wrap: wrap; + gap: 0rem 2rem; + list-style-type: none; + padding: .75rem 0; + font-weight: bold; } -nav a { - font-size: 2rem; - font-weight: 600; - line-height: 1.2; - margin: 0; - padding: 0; - color: var(--primary-text-color); - text-decoration: none; +nav li { + flex-basis: 33%; } -.logo { - width: 100%; - max-width: 25rem; +nav svg { + height: 1.3rem; + width: 1.3rem; + vertical-align: middle; + margin-right: .5rem; } main { - display: flex; - flex-direction: column; - gap: 2.5rem; - word-wrap: break-word; + padding: 1rem 1.5rem 3rem; } -main h1:first-of-type { - margin-top: 0; +footer { + text-align: center; + padding-bottom: 1.5rem; } h1 { @@ -134,80 +150,15 @@ h3 { } aside { - min-width: 15rem; - border-top: 5px solid var(--primary-link-color); - background-color: var(--box-background-color); - padding: 1rem 0; -} - -.menu { - padding: 1.5rem; + flex: 0 1 100%; } -.menu .title, -.menu time { +aside a { display: block; -} -.menu .title { - font-size: 1.5rem; -} - -.menu h2 { - margin: 2rem 0 .5rem; -} - -.menu h2:first-of-type { - margin-top: 0; -} - -.toc { - display: none; -} - -.toc-item { - padding: 0.5rem 1.5rem; font-size: 1.2rem; - font-weight: bold; -} - -.toc-item-child { - padding: 0 2rem 0.3rem; - font-size: 1rem; } -.toc-item a, -.toc-item-child a { - color: var(--secondary-text-color); - text-decoration: none; -} - -.toc-item a:hover, -.toc-item-child a:hover { - cursor: pointer; - text-decoration: underline; -} - -.toc-item a.active, -.toc-item-child a.active { - color: var(--primary-link-color); -} - -.toc-sticky { - position: sticky; - position: -webkit-sticky; - position: -moz-sticky; - position: -ms-sticky; - position: -o-sticky; - top: 2rem; - max-height: 100vh; - overflow: auto; -} - -.content { - flex-grow: 1; -} - -.content pre { +pre { overflow-x: auto; padding: 1.25em 1.5em; white-space: pre; @@ -217,7 +168,7 @@ aside { font-family: monospace; } -.content code { +code { background-color: var(--code-background-color); color: var(--code-color); font-weight: normal; @@ -226,7 +177,7 @@ aside { border-radius: 5px; } -.content pre code { +pre code { padding: 0; } @@ -234,38 +185,27 @@ blockquote { margin: 0; padding: .5rem 1.5rem; border-left: var(--code-background-color) .25rem solid; +} + +.box { + border-top: 5px solid var(--brand-link-color); background-color: var(--box-background-color); + padding: 1rem 1.5rem; } .button { display: inline-block; margin: .5rem .5rem .5rem 0; - padding: .3rem .7rem; - min-width: 8rem; - font-size: 1rem; + padding: .5rem 1rem; + font-size: 1.2rem; font-weight: bold; text-align: center; text-decoration: none; vertical-align: middle; user-select: none; - border-radius: 0.5rem; - background-color: var(--primary-link-color); - color: var(--primary-bg-color); -} - -.button:hover { - opacity: 0.8; -} - -.section-events h3 { - margin-top: .5rem; - margin-bottom: .5rem; - padding-left: .3rem; - -} - -.event-page-link { - padding-left: 1rem; + border-radius: 0.3rem; + background-color: var(--brand-link-color); + color: var(--brand-bg-color); } .event-page-link { @@ -273,10 +213,18 @@ blockquote { padding-left: 2rem; } +.event-page-link h3, +details summary h3 { + margin-top: .75rem; + margin-bottom: .75rem; + padding-left: .3rem; +} + details summary { cursor: pointer; width: 100%; padding-left: 1rem; + color: var(--brand-link-color); } details summary:hover { @@ -290,11 +238,20 @@ details summary > * { } details[open] { + margin-bottom: 2rem; +} + +details[open] summary, +details > div { background: var(--box-background-color); } details > div { - padding: 0 2.5rem 1rem; + padding: 1rem 1.5rem; +} + +dl { + margin: 0; } dt { @@ -307,6 +264,7 @@ dd { dd > blockquote { margin: 1rem 0 0 0; + background-color: rgba(0, 0, 0, .1); } .youtube-container { @@ -326,23 +284,22 @@ dd > blockquote { } @media screen and (min-width: 768px) { - nav { - flex-direction: row; - } - - .logo { - max-width: 15rem; + header svg { + max-height: 8rem; } - nav a { - font-size: 2.5rem; + header h1 { + font-size: 1.8rem; } - main { - flex-direction: row; + nav li { + flex-basis: auto; + font-size: 1.2rem; } - .toc { - display: block; + main.page-index { + display: flex; + flex-direction: row-reverse; + gap: 2.5rem; } } diff --git a/templates/base.html b/templates/base.html index 1e1f2d6..fa0ebb0 100644 --- a/templates/base.html +++ b/templates/base.html @@ -11,32 +11,31 @@ </head> <body> - {% block header %} <header> - <nav> - <img class="logo" src="/cph-rs-ferris.png"> - <a href="./"> - <h1>Copenhagen Rust Community</h1> - </a> - </nav> + <a href="/"> + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 411 208"><g filter="url(#a)"><path fill="#A52B00" d="m325.003 145.462-3.526-7.303c.019-.277.033-.555.033-.834 0-8.278-8.61-15.908-23.095-22.018v5.08a101.807 101.807 0 0 0-4.416-1.633v-2.368c-20.701-7.465-51.519-12.202-85.944-12.202-30.077 0-57.403 3.616-77.634 9.508v8.249-9.985c-20.727 6.586-33.577 15.736-33.577 25.852 0 1.595.322 3.165.94 4.706l-2.111 3.758s-1.692 2.194 1.287 6.823c2.627 4.082 15.786 20.06 22.732 28.427 2.983 4.29 5.007 6.932 5.183 6.676.279-.404-1.855-8.458-7.78-17.647-2.764-4.934-6.066-11.472-8.048-16.302 5.533 3.502 38.039 19.868 104.343 19.802 67.762-.068 97.883-21.277 101.189-24.164-1.156 4.64-5.103 14.028-8.25 20.63-5.172 9.443-7.046 17.663-6.805 18.07.153.256 1.918-2.465 4.52-6.876 6.056-8.628 17.531-25.099 19.823-29.295 2.599-4.756 1.136-6.954 1.136-6.954Z"/><path fill="#F74C00" d="m345.476 145.416-23.175-17.07c-.217-.759-.435-1.519-.66-2.272l7.613-11.027a4.134 4.134 0 0 0 .429-3.858c-.506-1.273-1.611-2.185-2.918-2.409l-12.871-2.184a112.232 112.232 0 0 0-1.547-3.014l5.408-12.38a4.111 4.111 0 0 0-.298-3.87c-.735-1.15-1.982-1.822-3.312-1.77l-13.063.475c-.676-.881-1.363-1.754-2.064-2.61l3.002-13.27a4.1 4.1 0 0 0-1.019-3.736 3.72 3.72 0 0 0-3.579-1.063l-12.723 3.128a110.708 110.708 0 0 0-2.509-2.151l.458-13.622c.049-1.379-.594-2.69-1.698-3.455a3.686 3.686 0 0 0-3.71-.313l-11.869 5.643a131.937 131.937 0 0 0-2.89-1.618l-2.097-13.423c-.213-1.36-1.088-2.515-2.313-3.042a3.683 3.683 0 0 0-3.695.448l-10.582 7.94a113.29 113.29 0 0 0-3.149-.995l-4.561-12.73c-.464-1.297-1.534-2.25-2.838-2.518a3.737 3.737 0 0 0-3.539 1.191l-8.908 9.965a117.294 117.294 0 0 0-3.235-.33l-6.878-11.588c-.697-1.174-1.927-1.888-3.254-1.888-1.323 0-2.556.714-3.247 1.888l-6.881 11.588c-1.081.093-2.163.206-3.238.33l-8.909-9.965a3.741 3.741 0 0 0-3.54-1.191c-1.303.271-2.374 1.22-2.836 2.518l-4.565 12.73c-1.057.317-2.104.65-3.148.995l-10.58-7.94a3.68 3.68 0 0 0-3.7-.449c-1.221.528-2.099 1.683-2.311 3.043l-2.099 13.423c-.97.526-1.932 1.066-2.89 1.618l-11.869-5.643a3.68 3.68 0 0 0-3.71.313c-1.103.766-1.747 2.076-1.698 3.455l.457 13.622a122.92 122.92 0 0 0-2.51 2.151l-12.721-3.128a3.733 3.733 0 0 0-3.583 1.063c-.94.979-1.322 2.39-1.019 3.737l2.996 13.269c-.695.86-1.383 1.729-2.057 2.61l-13.063-.475a3.802 3.802 0 0 0-3.314 1.77 4.13 4.13 0 0 0-.3 3.87l5.412 12.38a121.85 121.85 0 0 0-1.551 3.014l-12.87 2.184c-1.308.22-2.41 1.132-2.92 2.409a4.148 4.148 0 0 0 .431 3.858l7.614 11.027c-.06.194-.113.391-.172.586l-21.525 22.864s-3.3 2.585 1.503 8.66c4.235 5.36 25.981 26.606 37.466 37.736 4.851 5.651 8.174 9.15 8.521 8.847.548-.48-2.329-10.761-11.883-22.824-7.365-10.822-16.924-27.468-14.682-29.386 0 0 2.55-3.236 7.665-5.566-.193-.148.187.15 0 0 0 0 107.954 49.793 208.091.842 11.439-2.051 18.364 4.076 18.364 4.076 2.388 1.384-3.796 18.5-8.881 29.83-6.917 12.865-7.931 22.904-7.344 23.252.37.221 2.886-3.608 6.476-9.701 8.857-12.341 25.6-35.866 28.664-41.58 3.475-6.479 0-8.294 0-8.294Z"/><path fill="#F74C00" d="M298.277 139.029s15.533-.72 35.936-21.455l2.891-6.419s-31.667-31.498 17.56-53.24c0 0-4.31 7.042-3.045 34.25 0 0 14.842-5.154 19.194-29.188 0 0 21.649 28.541-23.514 55.309 0 0-21.188 33.964-51.058 30.71l2.036-9.967Z"/><path fill="#000" d="M227.914 119.466s10.788-11.812 21.577 0c0 0 8.476 15.75 0 23.624 0 0-13.871 11.024-21.577 0 0 0-9.247-8.662 0-23.624Z"/><path fill="#fff" d="M240.402 123.85c0 4.599-2.711 8.328-6.056 8.328-3.344 0-6.055-3.729-6.055-8.328 0-4.6 2.711-8.329 6.055-8.329 3.345 0 6.056 3.729 6.056 8.329Z"/><path fill="#000" d="M179.763 116.239s18.506-8.193 23.557 10.094c0 0 5.29 21.314-15.198 22.517 0 0-26.125-5.031-8.359-32.611Z"/><path fill="#fff" d="M189.058 124.154c0 4.743-2.796 8.589-6.245 8.589-3.448 0-6.245-3.846-6.245-8.589 0-4.744 2.797-8.59 6.245-8.59 3.449 0 6.245 3.846 6.245 8.59Z"/><path fill="#000" d="m203.47 156.304 23.599-1.894s-.799 3.799-3.878 6.65c0 0-8.117 8.899-17.43-.74 0 0-1.524-1.644-2.291-4.016Z"/><path fill="#F74C00" d="M108.975 134.459c-.195 0-.386.014-.577.029-7.662-1.744-29.2-7.355-34.894-16.461 0 0 28.983-32.965-16.316-54.037l5.275 36.472s-13.965-9.33-16.978-29.599c0 0-34.006 24.677 15.008 48.328 0 0 4.446 16.702 47.128 30.028l.032-.127c.429.08.869.127 1.322.127 4.033 0 7.303-3.304 7.303-7.38 0-4.076-3.27-7.38-7.303-7.38Z"/><path stroke="gray" stroke-width="3" d="m305.061 35.52 71.161 71.161"/><path fill="#C8102E" d="M305.825 34.756 339.581 1l25.544 25.545-33.755 33.756-25.545-25.545Z"/><path fill="#fff" d="m316.773 45.704 10.947-10.948-10.947-10.948 3.649-3.65 10.948 10.949 19.158-19.159 3.65 3.65-19.159 19.158 10.948 10.948-3.65 3.65-10.947-10.949-10.948 10.948-3.649-3.65ZM71.16 1l33.757 33.756L79.372 60.3 45.616 26.545 71.161 1Z"/><path stroke="gray" stroke-width="3" d="m105.605 35.444-71.161 71.161"/><path fill="#000" d="M84.38 22.429c-4.538-4.539-11.928-4.537-16.465 0-4.537 4.537-4.537 11.928 0 16.465 4.537 4.537 11.928 4.537 16.465 0 4.537-4.537 4.537-11.928 0-16.465Zm-.743.72a.762.762 0 0 1-.016 1.067.766.766 0 1 1 .016-1.068Zm.348 2.13a9.427 9.427 0 0 1 1.313 7.814l-2.081.803a.704.704 0 0 0-.402.904l.684 1.774a9.429 9.429 0 0 1-1.142 1.17l-.685-.684c-.068-.068-.141-.05-.207.016l-.314.313c-.738.739-1.316.485-1.722.159-.389-.308-.587-.88-.423-1.14.949-1.361.853-1.948.74-2.915 1.095.246 2.42.314 3.26-.526.908-.907.857-2.1.714-2.804-.204-.987-.784-1.724-.961-1.901l-7.071-7.072a9.426 9.426 0 0 1 5.832 1.625l-.04 1.709a.694.694 0 0 0 .681.712l1.824.044Zm-11.707-3.688a.766.766 0 1 1-1.115 1.052.766.766 0 0 1 1.115-1.052Zm12.89 12.939a.766.766 0 1 1-1.115 1.051.766.766 0 0 1 1.115-1.051ZM73.187 22.723l.944.944-4.257 4.257-1.905-1.906a9.426 9.426 0 0 1 2.328-2.76l1.686.648c.36.137.765-.04.902-.4l.302-.783Zm3.894 3.985 2.249 2.248c.116.117.686.955.158 1.483-.437.437-1.134.054-1.578-.39l-2.086-2.087 1.257-1.254Zm-3.058 3.058 1.722 1.723c.157.157.796.886.14 1.978-.2.337-.924 1.362-1.101 1.745-.21.417-.422 1.46.022 1.904l2.812 2.811c-.441.064-.886.097-1.331.098l-.899-1.39a.7.7 0 0 0-.966-.207l-1.54.996a9.426 9.426 0 0 1-5.532-5.584l.997-1.54a.697.697 0 0 0-.206-.964l-1.36-.88c.007-.422.041-.843.104-1.26l5.447 5.445c.06.061.113.093.17.035l1.927-1.926c.055-.056.026-.11-.035-.17L72.8 30.984l1.223-1.219Zm-6.925 1.899a.766.766 0 1 1-1.113 1.05.766.766 0 0 1 1.113-1.05Zm7.996 8.044a.766.766 0 1 1-1.115 1.052.766.766 0 0 1 1.115-1.052Z"/><path fill="#000" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width=".739" d="M83.92 38.434A10.992 10.992 0 1 1 68.376 22.89 10.992 10.992 0 0 1 83.92 38.434Zm.605-.896.461 1.962-1.962-.461.067 2.015-1.833-.834-.326 1.99-1.639-1.179-.707 1.892-1.376-1.477-1.062 1.717-1.063-1.717-1.376 1.477-.707-1.892-1.639 1.18-.325-1.991-1.834.834.068-2.015-1.963.461.461-1.962-2.015.067.835-1.833-1.991-.326 1.179-1.64-1.892-.706 1.477-1.376-1.717-1.063 1.717-1.062-1.477-1.376 1.892-.707-1.18-1.639 1.992-.325-.835-1.834 2.015.067-.461-1.962 1.963.461-.068-2.015 1.834.834.325-1.99 1.64 1.179.706-1.892 1.376 1.477 1.063-1.717 1.062 1.717 1.376-1.477.707 1.892 1.639-1.18.326 1.991 1.834-.834-.068 2.015 1.962-.461-.461 1.962 2.015-.067-.834 1.834 1.99.325-1.179 1.64 1.892.706-1.477 1.376 1.717 1.063-1.717 1.062 1.477 1.376-1.892.707 1.18 1.639-1.991.326.834 1.833-2.015-.067Z" clip-rule="evenodd"/><path fill="#F74C00" d="M62.463 100.462s-13.965-9.33-16.978-29.599c0 0-34.006 24.677 15.008 48.328C67.5 114.5 65.5 111 62.463 100.462ZM337.103 111.155l6.395 2.345 3.8 4.786c45.163-26.767 23.513-55.309 23.513-55.309-4.352 24.034-19.194 29.189-19.194 29.189-2.619 7.834-7.619 8.834-7.619 8.834-3 1-6.895 10.155-6.895 10.155Z"/></g><defs><filter id="a" width="347.899" height="208" x="29.384" y="0" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dx="-2" dy="1"/><feGaussianBlur stdDeviation="1"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_12_180"/><feBlend in="SourceGraphic" in2="effect1_dropShadow_12_180" result="shape"/></filter></defs></svg> + <h1>Copenhagen <span>Rust</span> Community</h1> + </a> </header> - {% endblock header %} + <nav> + <ul> + {% for item in config.extra.nav %} + <li> + <a href="{{ item.url | safe }}"> + {% if item.icon %}{{ item.icon | safe }}{% endif %}{{ item.title }} + </a> + </li> + {%- endfor %} + </ul> + </nav> - <main {% if page %}class="page-{{page.slug}}"{% endif %} {% if section %}class="section-{{section.title | lower}}"{% endif %}> - {% block sidebar %} - {% endblock sidebar %} - <div class="content"> - {% block content %} - {% endblock content %} - </div> + <main {% if page %}class="page-{{page.slug}}"{% endif %} {% if section %}class="page-{{section.title | lower}}"{% endif %}> + {% block content %} + {% endblock content %} </main> - - <footer> - <small>Last updated: {{ now()| date(format="%e %B at %H:%M", timezone="Europe/Berlin") }}</small> - </footer> - - {% block script %} - {% endblock script %} + + {% block footer %} + {% endblock footer %} </body> </html> diff --git a/templates/event-page.html b/templates/event-page.html index 44911f7..51a7cf4 100644 --- a/templates/event-page.html +++ b/templates/event-page.html @@ -3,9 +3,7 @@ {% block content %} <article> - <h1 class="title"> - {{ page.title }} - </h1> + <h1>{{ page.title }}</h1> {% set meetups = load_data(path="events.toml") %} {% set upcoming = meetups['upcoming'] %} @@ -14,14 +12,14 @@ {% set event = all_events | filter(attribute="title", value=page.title) | first %} {% if event %} - <details> - <summary> - <h3>Details about this event</h3> - </summary> - <div> - {{ macros::event_attributes(event=event) }} - </div> - </details> + <details> + <summary> + <h3>Details about this event</h3> + </summary> + <div> + {{ macros::event_attributes(event=event) }} + </div> + </details> {% else %} No data found for this event. {% endif %} diff --git a/templates/events.html b/templates/events.html index 6a34d22..3fefc7a 100644 --- a/templates/events.html +++ b/templates/events.html @@ -1,27 +1,8 @@ {% extends "base.html" %} {% import "macros.html" as macros %} -{% block sidebar %} -{% set toc = ['upcoming', 'recent', 'past'] %} -<aside class="toc"> - {% if section.toc %}{% set toc = section.toc %}{% elif page.toc %}{% set toc = page.toc %}{% endif %} - {% if toc %} - <div class="toc-sticky"> - <div class="toc-item"> - <a href="#events">Events</a> - </div> - {% for h in toc %} - <div class="toc-item-child"> - <a href="#{{h}}">{{ h | capitalize }}</a> - </div> - {% endfor %} - </div> - {% endif %} -</aside> -{% endblock sidebar %} - {% block content %} -<h1 class="title"> +<h1> {{ section.title }} </h1> @@ -64,5 +45,8 @@ {% endif %} {% endfor %} +{% endblock content %} -{% endblock content %}
\ No newline at end of file +{% block footer %} + {{ macros::last_update() }} +{% endblock footer %}
\ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 5822323..4e66f89 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,50 +1,43 @@ {% extends "base.html" %} +{% import "macros.html" as macros %} -{% block sidebar %} - <aside class="menu"> - {% set events = load_data(path="events.toml") %} - - {%- set nextEvent = events.upcoming | last %} - {%- if nextEvent -%} - <h2>Next event</h2> - - {% if nextEvent.url %} - <a class="title" href="{{ nextEvent.url }}">{{ nextEvent.title }}</a> - {% else %} - <span class="title">{{ nextEvent.title }}</span> - {% endif -%} - {% if nextEvent.date %} - <time datetime="{{ nextEvent.date }}">{{ nextEvent.date | date(format="%A, %e %B at %H:%M", timezone="Europe/Berlin") }}</time> - {% else %} - <div>(No date announced)</div> - {% endif -%} - {%- if not nextEvent.url -%}<div>(Link coming soon)</div>{%- endif -%} - {% endif %} +{% block content %} +<aside> + <h2>Updates</h2> + {% set events = load_data(path="events.toml") %} + + {%- set nextEvent = events.upcoming | last %} + {%- if nextEvent -%} + <p> + Next event: + <a href="/events">{{ nextEvent.title }}</a> - {%- set recentEvent = events.recent | first %} - {%- if recentEvent -%} - <h2>Recent event</h2> - - {% if recentEvent.url %} - <a class="title" href="{{ recentEvent.url }}">{{ recentEvent.title }}</a> - {% else %} - <span class="title">{{ recentEvent.title }}</span> - {% endif -%} - {% if recentEvent.date %} - <time datetime="{{ recentEvent.date }}">{{ recentEvent.date | date(format="%A, %e %B", timezone="Europe/Berlin") }}</time> - {% else %} - <div>(No date found)</div> - {% endif -%} - {%- if not recentEvent.url -%}<div>(No link found)</div>{%- endif -%} - {% endif %} - - <h2>Links</h2> - {% for menu in config.extra.menu %} - <a class="button" {% if menu.url %}href="{{ menu.url | safe }}"{% endif %}>{{ menu.title }}</a> - {%- endfor %} - </aside> -{% endblock sidebar %} + {% if nextEvent.date %} + <time datetime="{{ nextEvent.date }}">{{ nextEvent.date | date(format="%A, %e %B", timezone="Europe/Berlin") }}</time> + {% else %} + <i>To be announced</i> + {% endif -%} + </p> + {% endif %} -{% block content %} -{{ section.content | safe }} -{% endblock content %}
\ No newline at end of file + {%- set recentEvent = events.recent | first %} + {%- if recentEvent -%} + <p> + Recent event: + <a href="/events">{{ recentEvent.title }}</a> + + {% if recentEvent.date %} + <time datetime="{{ recentEvent.date }}">{{ recentEvent.date | date(format="%A, %e %B", timezone="Europe/Berlin") }}</time> + {% endif -%} + </p> + {% endif %} +</aside> + +<article> + {{ section.content | safe }} +</article> +{% endblock content %} + +{% block footer %} + {{ macros::last_update() }} +{% endblock footer %}
\ No newline at end of file diff --git a/templates/macros.html b/templates/macros.html index 7e5acb1..0ccadc1 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -1,37 +1,33 @@ {% macro event_attributes(event) %} <dl> - {% if event.url %} - <dt> - Signup - </dt> - <dd> - <a href="{{ event.url }}">{{ event.title}} on Meetup.com</a> - </dd> - {% endif %} - - <dt> - Date - </dt> + <dt>Date</dt> <dd> {% if event.date %} - <time datetime="{{ event.date }}">{{ event.date | date(format="%A, %e %B %Y", timezone="Europe/Berlin") }}</time> + <time datetime="{{ event.date }}">{{ event.date | date(format="%A, %e %B %Y at %R", timezone="Europe/Berlin") }}</time> {% else %} - (No date found) + <i>To be announced</i> {% endif %} </dd> - <dt> - Venue - </dt> + <dt>Venue</dt> <dd> {% if event.venue %} {{ event.venue }} โ {% endif %} {% if event.address %}{{ event.address }} {% else %} - (No venue) + <i>To be announced</i> {% endif %} </dd> + <dt>Signup</dt> + <dd> + {% if event.url %} + <a href="{{ event.url }}">{{ event.title}} on Meetup.com</a> + {% else %} + <i>To be announced</i> + {% endif %} + </dd> + {% if event.content -%} <dt>Description</dt> <dd> @@ -39,4 +35,10 @@ </dd> {% endif %} </dl> -{% endmacro event_attributes %}
\ No newline at end of file +{% endmacro event_attributes %} + +{% macro last_update() %} +<footer> + <small>Last updated: {{ now()| date(format="%e %B at %H:%M", timezone="Europe/Berlin") }}</small> +</footer> +{% endmacro last_update %}
\ No newline at end of file diff --git a/templates/page.html b/templates/page.html index 6e097b8..a5e3d6f 100644 --- a/templates/page.html +++ b/templates/page.html @@ -2,51 +2,7 @@ {% block title %}{{ page.title }} | {{ super() }} {% endblock title %} -{% block sidebar %} -<aside class="toc"> - {% if section.toc %}{% set toc = section.toc %}{% elif page.toc %}{% set toc = page.toc %}{% endif %} - {% if toc %} - <div class="toc-sticky"> - {% for h in toc %} - <div class="toc-item"> - <a href="{{h.permalink | safe}}">{{ h.title }}</a> - </div> - {% if h.children %} - {% for h2 in h.children %} - <div class="toc-item-child"> - <a href="{{h2.permalink | safe}}">{{ h2.title }}</a> - </div> - {% endfor %} - {% endif %} - {% endfor %} - </div> - {% endif %} -</aside> -{% endblock sidebar %} - {% block content %} <h1>{{ page.title }}</h1> {{ page.content | safe }} -{% endblock content %} - -{% block script %} -<script> - const scrollHandler = entries => { - let entry = entries.find(entry => { return entry.isIntersecting && entry.intersectionRatio > 0.9; }); - if (!entry) return; - - document.querySelectorAll(".toc a").forEach((item) => { - item.classList.remove("active"); - }); - - let link = document.querySelector(`.toc a[href$="${decodeURIComponent(`#${entry.target.id}`)}"]`) - if (link) { - link.classList.add("active"); - link.scrollIntoView({ behavior: "auto", block: "nearest" }); - } - }; - const observer = new IntersectionObserver(scrollHandler, { threshold: 1 }); - let items = document.querySelectorAll('h1,h2,h3,h4,h5,h6'); - items.forEach(item => observer.observe(item)); -</script> -{% endblock script %}
\ No newline at end of file +{% endblock content %}
\ No newline at end of file |