Skip to content

Commit 92c804a

Browse files
authored
Merge pull request #425 from jsmitka/address-footer-update
Update footer: show only single address
2 parents 50add01 + b4a4ef8 commit 92c804a

File tree

3 files changed

+61
-40
lines changed

3 files changed

+61
-40
lines changed

pyvecorg/data/meta.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,28 @@ claim:
1010
Service non-profit organization of&nbsp;the&nbsp;Czech<br>
1111
[Python](https://python.cz/en/)&nbsp;programming&nbsp;language user&nbsp;group
1212
13+
# Billing address is not used in the template, but it was part of the JSON API response.
14+
# Keeping it does not hurt us, therefore we should keep it for compatibility.
1315
billing_address:
1416
heading:
1517
cs: Fakturační adresa
1618
en: Billing address
17-
directions:
19+
directions: &address
1820
cs: >-
1921
Pyvec, z.s.<br>
2022
Korunní&nbsp;2569/108<br>
21-
101&nbsp;00 Praha&nbsp;10 &ndash; Vinohrady
23+
101&nbsp;00 Praha&nbsp;10
2224
en: >-
2325
Pyvec, z.s.<br>
2426
Korunní&nbsp;2569/108<br>
25-
101&nbsp;00 Prague&nbsp;10 &ndash; Vinohrady<br>
27+
101&nbsp;00 Prague&nbsp;10<br>
2628
Czech Republic, EU
2729
2830
address:
2931
heading:
3032
cs: Adresa
3133
en: Address
32-
directions:
33-
cs: >-
34-
Pyvec, z.s.<br>
35-
Ječná 507/6<br>
36-
12000 Praha 2
37-
en: >-
38-
Pyvec, z.s.<br>
39-
Ječná 507/6<br>
40-
12000 Prague<br>
41-
Czech Republic, EU
34+
directions: *address
4235

4336
reg_no:
4437
label:

pyvecorg/static/main.css

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,16 @@ h4 {
155155
}
156156

157157
a.icon, a.icon:hover, a.icon:focus,
158-
.icon a, .icon:hover a, .icon:focus a {
158+
.icon a, .icon:hover a, .icon:focus a,
159+
a i.link-icon, a:hover i.link-icon, a:focus i.link-icon {
159160
text-decoration: none;
160161
box-shadow: none;
161162
}
162163

164+
a i.link-icon {
165+
margin-right: 1ex;
166+
}
167+
163168
.icon span {
164169
display: none;
165170
}
@@ -260,6 +265,20 @@ a.icon, a.icon:hover, a.icon:focus,
260265
padding: 2rem 1rem 2rem 0.5rem;
261266
}
262267

268+
/*
269+
Decrease vertical paddings on mobile to give more condensed look.
270+
max-width breakpoint taken from Bootstrap Docs:
271+
272+
https://getbootstrap.com/docs/4.6/layout/overview/#responsive-breakpoints
273+
(see We occasionally use media queries that go in the other direction (the given screen size or smaller):)
274+
*/
275+
@media (max-width: 767.98px) {
276+
.address {
277+
padding-top: 1rem;
278+
padding-bottom: 0rem;
279+
}
280+
}
281+
263282
.address h3 {
264283
font-weight: normal;
265284
}

pyvecorg/templates/index.html

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<meta property="twitter:creator" content="@pyvec">
1313

1414
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
15-
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}">
15+
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}?v=2024-08-05">
1616
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
1717

1818
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -281,16 +281,44 @@ <h3>{{ members.note.heading }}</h3>
281281
<h3>{{ meta.address.heading }}</h3>
282282
{{ meta.address.directions|markdown }}
283283
<p>
284-
E-mail: <a href="mailto:[email protected]">[email protected]</a>
284+
{{ meta.reg_no.label }}: <a href="{{ meta.reg_no.link }}">{{ meta.reg_no.value }}</a><br>
285+
{{ meta.databox_no.label }}: {{ meta.databox_no.value }}
285286
</p>
287+
<p>E-mail: <a href="mailto:[email protected]">[email protected]</a></p>
286288
</div>
287289
<div class="w-100 d-block d-md-none"></div>
288290
<div class="col address">
289-
<h3>{{ meta.billing_address.heading }}</h3>
290-
{{ meta.billing_address.directions|markdown }}
291-
<p>
292-
{{ meta.reg_no.label }}: <a href="{{ meta.reg_no.link }}">{{ meta.reg_no.value }}</a><br>
293-
{{ meta.databox_no.label }}: {{ meta.databox_no.value }}<br>
291+
<h3>{{ meta.downloads.heading }}</h3>
292+
<p class="downloads">
293+
<a href="{{ url_for('static', filename='bylaws-2024-01-23.pdf') }}">
294+
<i class="link-icon fa fa-file-pdf-o" aria-hidden="true"></i>
295+
{{- meta.downloads.bylaws }}.pdf
296+
{# {{- removes the whitespace between icon and the text, otherwise the white space would be underlined #}
297+
</a>
298+
<br>
299+
300+
<a href="https://docs.pyvec.org/operations/bylaws.html">
301+
<i class="link-icon fa fa-file-o" aria-hidden="true"></i>
302+
{{- meta.downloads.bylaws }}
303+
</a>
304+
<br>
305+
306+
<a href="https://or.justice.cz/ias/ui/vypis-sl-firma?subjektId=760829">
307+
<i class="link-icon fa fa-archive" aria-hidden="true"></i>
308+
{{- meta.downloads.filing }}
309+
</a>
310+
<br>
311+
312+
<a href="https://github.com/pyvec/resources">
313+
<i class="link-icon fa fa-file-image-o" aria-hidden="true"></i>
314+
{{- meta.downloads.resources }}
315+
</a>
316+
<br>
317+
318+
<a href="{{ url_for('api', lang=lang) }}">
319+
<i class="link-icon fa fa-file-code-o" aria-hidden="true"></i>
320+
{{- meta.downloads.json_data }}
321+
</a>
294322
</p>
295323
</div>
296324
<div class="w-100 d-block d-md-none"></div>
@@ -307,25 +335,6 @@ <h3>{{ meta.bank_account.heading }}</h3>
307335
<a href="https://ib.fio.cz/ib/transparent?a={{ meta.bank_account.number }}&amp;l=ENGLISH">Transaction history</a>
308336
{% endif %}
309337
</p>
310-
<h3>{{ meta.downloads.heading }}</h3>
311-
<p class="downloads">
312-
<i class="fa fa-file-pdf-o" aria-hidden="true"></i>
313-
<a href="{{ url_for('static', filename='bylaws-2024-01-23.pdf') }}">{{ meta.downloads.bylaws }}.pdf</a>
314-
315-
<i class="fa fa-file-o" aria-hidden="true"></i>
316-
<a href="https://docs.pyvec.org/operations/bylaws.html">{{ meta.downloads.bylaws }}</a>
317-
318-
<i class="fa fa-archive" aria-hidden="true"></i>
319-
<a href="https://or.justice.cz/ias/ui/vypis-sl-firma?subjektId=760829">{{ meta.downloads.filing }}</a>
320-
321-
<br>
322-
323-
<i class="fa fa-file-image-o" aria-hidden="true"></i>
324-
<a href="https://github.com/pyvec/resources">{{ meta.downloads.resources }}</a>
325-
326-
<i class="fa fa-file-code-o" aria-hidden="true"></i>
327-
<a href="{{ url_for('api', lang=lang) }}">{{ meta.downloads.json_data }}</a>
328-
</p>
329338
</div>
330339
<div class="w-100 d-block d-md-none"></div>
331340
<div class="col">

0 commit comments

Comments
 (0)