Skip to content

Commit

Permalink
Rework centering
Browse files Browse the repository at this point in the history
  • Loading branch information
homeworkprod committed May 15, 2024
1 parent 57d227a commit 8ade0ff
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block body %}

<div class="block block--centered">
<div class="block is-centered-h">
<p class="text--centered">This database covers:</p>
<div class="row row--collapsible row--center">
<div class="column text--centered">
Expand All @@ -28,13 +28,16 @@
</div>
</div>

<div class="block" style="margin-top: 3rem;">
<div class="block is-centered-h" style="margin-top: 3rem;">
<p>A bunch of people were so kind to collect and submit data:</p>
<div class="block--centered">
<a href="https://github.com/orgatalk/lanpartydb-data/contributors" class="contributors">
<img src="https://contrib.rocks/image?repo=orgatalk/lanpartydb-data&columns=5">
</a>
</div>
</div>
<div class="block is-centered-h">
<a href="https://github.com/orgatalk/lanpartydb-data/contributors" class="contributors">
<img src="https://contrib.rocks/image?repo=orgatalk/lanpartydb-data&columns=5">
</a>
</div>

<div class="block is-centered-h" style="margin-top: 3rem;">
<p>Check out the <a href="https://github.com/orgatalk/lanpartydb-data/blob/main/CONTRIBUTING.md">Contribution Guide</a> to see how you can help improving this database.</p>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<h1>Series <small>{{ series_and_party_counts|length }}</small></h1>

<table class="table--index">
<table class="table--index is-centered-h">
<thead>
<tr>
<th>{{ _('Name') }}</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1>{{ series.name }}</h1>
{%- if parties %}
<h2>{{ _('Parties') }}</h2>
{% include 'party/_list.html' %}
<div class="block block--centered">{{ parties|length }} items</div>
<div class="block is-centered-h">{{ parties|length }} items</div>
{%- endif %}

{%- endblock %}
21 changes: 12 additions & 9 deletions src/lanpartydb_website/static/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,6 @@ a:not(:hover) {
}
}

.block--centered {
margin-inline: auto;
width: fit-content;
}

.text--centered {
text-align: center;
}


h1,
h2,
Expand All @@ -148,6 +139,14 @@ table,
margin-bottom: 1.5rem;
}

:is(
.block,
table,
).is-centered-h {
margin-inline: auto;
width: fit-content;
}


/* grid */

Expand Down Expand Up @@ -423,3 +422,7 @@ table.table--wide {
.contributors img {
display: block;
}

.text--centered {
text-align: center;
}

0 comments on commit 8ade0ff

Please sign in to comment.