Skip to content

Commit adeab42

Browse files
committed
add overwrite size for headline, optimize item layout
1 parent 31ce6a3 commit adeab42

File tree

5 files changed

+90
-20
lines changed

5 files changed

+90
-20
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55

66
(For Windows, see more detailed instructions below)
77

8-
- Install poetry (see: https://python-poetry.org/ )
8+
- Install uv
99
- clone this repository
10-
- run `poetry install` inside the repository's root folder
10+
- run `uv sync --all-extras --dev` inside the repository's root folder
11+
12+
Lektor comes with a built-in GUI to edit the site's contents. For this, the development server is needed.
1113

1214
To start the development server:
13-
- run it directly inside the poetry virtual env: `poetry run lektor server`
15+
- run it directly inside the `uv` virtual env: `uv run lektor server --browse`
1416
- Otherwise you can activate the virtuel env by running `poetry shell` and then run `lektor server`.
1517

1618

@@ -23,20 +25,22 @@ To start the development server:
2325
- get and install Visual Studio Code: https://code.visualstudio.com/
2426
- On first run, install the Microsoft Python extension via the Extensions menu (icon bar on the left side)
2527

26-
- install Poetry via this command in the Windows PowerShell (please check https://python-poetry.org to make sure this is still the recommended method):
28+
- install ub via the command in the Windows PowerShell described here: https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_2
2729

2830
```
29-
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
31+
https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_2
3032
```
3133

34+
The following steps might be necessary on Windows but have not been recently tested:
35+
3236
- Add the poetry installation directory to the PATH environment variable (German "Umgebungsvariablen"):
3337
- Add the following entry to %PATH%: `%APPDATA%\Python\Scripts`
34-
- Allow the execution of Powershell-Scripts (this is needed to activate the poetry virtualenv)
38+
- Allow the execution of Powershell-Scripts (this is needed to activate the virtualenv)
3539
``Set-ExecutionPolicy -ExecutionPolicy Unrestriced
3640
- Set the location where virtualenvs will be created to be `$project_dir/.venv`:
3741
- `poetry config virtualenvs.in-project true`
3842
- Use VS Code to clone the project to a local project directory
39-
- After cloning, open a new Terminal windows in VSCode and run `poetry install` in the VS Code terminal. That should create the venv.
43+
- After cloning, open a new Terminal windows in VSCode and run `uv sync --all-extras --dev` in the VS Code terminal. That should create the venv.
4044

4145
## Create `launch.json`:
4246

content/30/2025-09-06-c-hike/contents.lr

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ body:
1010
- hiking
1111
- and hiking, too.
1212
---
13-
title: c-hike anniversary ed.
13+
title: c-hike 30th anniv. edition
14+
---
15+
title_size: 4.5rem
16+
---
17+
pate: odras

models/event.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ type = date
1010
label = Title
1111
type = string
1212

13+
[fields.title_size]
14+
label = Overwrite title size (default: 10rem)
15+
type = string
16+
1317
[fields.body]
1418
label = Body
1519
type = markdown

templates/30jahre-cbase.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,16 @@
6565
display: flex;
6666
width: 100%;
6767
flex-flow: row wrap;
68-
justify-content: flex-start;
69-
gap: 10px 30px;
68+
justify-content: space-between;
69+
gap: 20px 15px;
7070
margin-bottom: 200px;
7171
}
7272
.event-item {
7373
padding: 5px 15px;
7474
flex-grow: 0;
75-
width: 200px;
75+
width: 164px;
7676
min-height: 250px;
77+
background: #000;
7778
border: #ff9900 solid 2px;
7879
transition-duration: 0.25s;
7980
transition-property: box-shadow;
@@ -110,7 +111,7 @@ <h2>Events</h2>
110111

111112
<a href="{{ child|url }}">
112113
<div class="event-item">
113-
<p class="event-date">{{ child.date|dateformat("EEEE, dd.MM.YYYY", locale="de_DE") }}</p>
114+
<p class="event-date">{{ child.date|dateformat("EE, dd.MM.YYYY", locale="de_DE") }}</p>
114115
<h3 class="event-title">{{ child.title }}</h3>
115116
</div>
116117
</a>

templates/event.html

Lines changed: 65 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,90 @@
1414
margin-top: 25px;
1515
margin-bottom: 100px;
1616
}
17-
.hero-title-sm {
17+
.hero-title {
18+
font-size: {% if this.title_size %}{{ this.title_size }}{% else %}10rem{% endif %};
1819
margin: 0px;
1920
color: rgb(255, 153, 0);
20-
font-size: 10rem;
21-
line-height: 0.75;
22-
21+
line-height: 0.8;
2322
font-family: "League Spartan", sans-serif;
2423
font-optical-sizing: auto;
2524
font-weight: 900;
2625
font-style: black;
2726
}
2827
.hero-subtitle {
28+
font-size: 3rem;
2929
margin: 0px 0px 0px 10px;
3030
color: rgb(255, 153, 0);
31-
font-size: 2rem;
32-
3331
font-family: "League Spartan", sans-serif;
3432
font-optical-sizing: auto;
3533
font-weight: 900;
3634
font-style: black;
3735
}
36+
@media screen and (max-width:992px) {
37+
/* Zusätzliche Regeln für kleinere Monitore */
38+
.hero-title {
39+
font-size: 10rem;
40+
}
41+
.hero-subtitle {
42+
font-size: 3rem;
43+
}
44+
}
45+
@media screen and (max-width:768px) {
46+
/* Zusätzliche Regeln für kleinere Monitore */
47+
.hero-title {
48+
font-size: 8rem;
49+
}
50+
.hero-subtitle {
51+
font-size: 2rem;
52+
}
53+
}
54+
@media screen and (max-width:450px) {
55+
/* Zusätzliche Regeln noch kleinere Monitore */
56+
.hero-title {
57+
font-size: 5rem;
58+
}
59+
.hero-subtitle {
60+
font-size: 1.5rem;
61+
}
62+
}
63+
64+
.event-list {
65+
display: flex;
66+
width: 100%;
67+
flex-flow: row wrap;
68+
justify-content: flex-start;
69+
gap: 10px 30px;
70+
margin-bottom: 200px;
71+
}
72+
.event-item {
73+
padding: 5px 15px;
74+
flex-grow: 0;
75+
width: 200px;
76+
min-height: 250px;
77+
border: #ff9900 solid 2px;
78+
transition-duration: 0.25s;
79+
transition-property: box-shadow;
80+
}
81+
.event-item:hover {
82+
-webkit-box-shadow:0px 0px 128px 10px rgba(255,153,0,0.9);
83+
-moz-box-shadow: 0px 0px 128px 10px rgba(255,153,0,0.9);
84+
box-shadow: 0px 0px 128px 10px rgba(255,153,0,0.9);
85+
}
86+
.event-date {
87+
font-size: smaller;
88+
}
89+
.event-title {
90+
font-family: "League Spartan", sans-serif;
91+
}
92+
3893
</style>
3994
{% endblock %}
4095

4196
{% block body %}
4297

4398
<div class="hero-wrapper">
44-
<h1 class="hero-title-sm">{{ this.title }}</h1>
45-
<h2 class="hero-subtitle">{{ this.date }}</h2>
99+
<h1 class="hero-title">{{ this.title }}</h1>
100+
<h2 class="hero-subtitle">{{ this.date|dateformat("EEEE, dd.MM.YYYY", locale="de_DE") }}</h2>
46101
</div>
47102
<div>
48103
<a href="/30/"><< go back</a>
@@ -54,7 +109,9 @@ <h2 class="hero-subtitle">{{ this.date }}</h2>
54109
Eventpat(e/in): {{ this.pate }}
55110
</div>
56111

112+
{% if this.calendar_link %}
57113
<div>
58114
Event <a href="{{ this.calendar_link }}">im Kalender anzeigen</a>.
59115
</div>
116+
{% endif %}
60117
{% endblock %}

0 commit comments

Comments
 (0)