Skip to content

Commit 90a40d6

Browse files
committed
Extract common styles
1 parent 64b6cb3 commit 90a40d6

File tree

5 files changed

+17
-45
lines changed

5 files changed

+17
-45
lines changed

moooodotfarm-backend/src/ports/http/templates/base.html

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,24 +86,24 @@
8686
margin-bottom: 1.5rem;
8787
}
8888

89-
.back-link {
89+
.button {
9090
display: inline-block;
9191
background: var(--grass);
9292
color: white;
93-
padding: 0.5rem 1.2rem;
93+
padding: 0.6rem 1.5rem;
94+
margin: 0.3rem;
9495
border-radius: 30px;
9596
text-decoration: none;
96-
font-size: 1rem;
97+
font-size: 1.2rem;
9798
font-weight: 700;
9899
transition: all 0.2s ease;
99100
box-shadow: 0 4px 0 var(--grass-dark);
100101
}
101102

102-
.back-link:hover {
103+
.button:hover {
103104
transform: translateY(2px);
104105
box-shadow: 0 2px 0 var(--grass-dark);
105106
background: var(--grass-dark);
106-
color: white;
107107
}
108108

109109
.subpage-header {
@@ -166,6 +166,12 @@
166166
color: var(--grass-dark);
167167
}
168168

169+
strong {
170+
color: var(--grass-dark);
171+
font-weight: 700;
172+
letter-spacing: 0.1em;
173+
}
174+
169175
{% block extra_styles %}{% endblock %}
170176
</style>
171177
</head>

moooodotfarm-backend/src/ports/http/templates/common.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% macro common_header(title, subtitle_text) %}
22
<header class="subpage-header">
33
<div class="back-link-container">
4-
<a href="/" class="back-link">← go back to admiring all cows</a>
4+
<a href="/" class="button">← go back to admiring all cows</a>
55
</div>
66
<div class="cow">
77
<img src="/cow.png" alt="a very round cow">

moooodotfarm-backend/src/ports/http/templates/index.html

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,6 @@
3939
margin-bottom: 1.5rem;
4040
}
4141

42-
.links {
43-
a {
44-
display: inline-block;
45-
background: var(--grass);
46-
color: white;
47-
padding: 0.6rem 1.5rem;
48-
margin: 0.3rem;
49-
border-radius: 30px;
50-
text-decoration: none;
51-
font-size: 1.2rem;
52-
font-weight: 700;
53-
transition: all 0.2s ease;
54-
box-shadow: 0 4px 0 var(--grass-dark);
55-
}
56-
57-
a:hover {
58-
transform: translateY(2px);
59-
box-shadow: 0 2px 0 var(--grass-dark);
60-
background: var(--grass-dark);
61-
}
62-
}
63-
6442
.herd-subtitle {
6543
font-size: 1.5rem;
6644
font-weight: 700;
@@ -218,8 +196,8 @@
218196
<img src="/cow.png" alt="a very round cow" class="cow-hero">
219197
<p class="site-subtitle">moooooonitoring the cow.txt herd</p>
220198
<ul class="links">
221-
<a href="/rfc">read the RFC</a>
222-
<a href="/new">add a new cow</a>
199+
<a href="/rfc" class="button">read the RFC</a>
200+
<a href="/new" class="button">add a new cow</a>
223201
</ul>
224202
</header>
225203

moooodotfarm-backend/src/ports/http/templates/new.html

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44

55
{% block title %}report a new cow{% endblock %}
66

7-
{% block extra_styles %}
8-
.keyword {
9-
color: var(--grass-dark);
10-
font-weight: 700;
11-
letter-spacing: 0.03em;
12-
}
13-
{% endblock %}
14-
157
{% block content %}
168
<main class="content">
179
{{ common::common_header("bring a new cow to the herd", "how to get your cow.txt listed") }}
@@ -23,8 +15,8 @@
2315

2416
<p>
2517
As some cows can be shy and other cows can be brave please clearly state whether the cow URL should be
26-
<span class="keyword">VISIBLE</span> or <span class="keyword">CENSORED</span>,
27-
and make sure the URL you send is <span class="keyword">NOT</span> censored.
18+
<strong>VISIBLE</strong> or <strong>CENSORED</strong>,
19+
and make sure the URL you send is <strong>NOT</strong> censored.
2820
</p>
2921

3022
<section>

moooodotfarm-backend/src/ports/http/templates/rfc.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,12 @@
7676
color: var(--warm-brown);
7777
text-align: center;
7878
}
79-
80-
strong {
81-
color: var(--grass-dark);
82-
}
8379
{% endblock %}
8480

8581
{% block content %}
8682
<main class="content">
8783
<div class="back-link-container">
88-
<a href="/" class="back-link">← go back to admiring all cows</a>
84+
<a href="/" class="button">← go back to admiring all cows</a>
8985
</div>
9086
<div class="rfc-top">
9187
<div class="left">

0 commit comments

Comments
 (0)