Skip to content

Commit

Permalink
add sponsors section on basho page and add button to hide admin tool
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldickison committed Nov 12, 2023
1 parent 20aa19d commit 189f925
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
Binary file added public/img/tegatastore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 32 additions & 1 deletion public/scss/basho.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
text-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

#entries, #leaderboard, #admin {
#entries, #leaderboard, #admin, #sponsors {
background: var(--color-light-yellow-bg);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
-webkit-backdrop-filter: blur(3px);
Expand All @@ -18,6 +18,12 @@
@media (hover: none) {
background: var(--color-light-yellow-bg-opaque);
}

> h2 {
border-bottom: solid 1px var(--color-border);
padding-bottom: var(--section-padding);
margin: 0 0 var(--section-padding) 0;
}
}

#admin > menu {
Expand All @@ -29,6 +35,31 @@
gap: 2rem;
}

#sponsors {
.sponsor-grid {
display: grid;
grid-auto-flow: row;
grid-template-columns: 100px 1fr;
gap: 1em;

> .logo > * {
width: 100%;
}

p {
margin: 0;
& + p {
margin-top: 1ex;
}
}

.fine-print {
color: var(--color-fg-sub);
font-size: smaller;
}
}
}

#entries > ul {
list-style: none;
display: flex;
Expand Down
5 changes: 5 additions & 0 deletions public/ts/basho-admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,9 @@ async function finalizeBasho (): Promise<void> {
location.reload()
}

document.querySelector('.hide-admin')?.addEventListener('click', event => {
event.preventDefault()
document.getElementById('admin')?.remove()
})

export default {}
21 changes: 21 additions & 0 deletions templates/basho.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,30 @@ <h3>Admin Controls</h3>
<!-- <li><form method="post" action="{{basho.id.url_path()}}/backfill_player_ranks">
<button>backfill player ranks</button>
</form></li> -->
<li><button class="hide-admin">hide</button></li>
</menu>
</section>
{% endif %}

{# TODO: put sponsorship data in the db #}
{% if basho.id.id()[..] >= "202311" %}
<section id="sponsors">
<h2>Rewards</h2>
<div class="sponsor-grid">
<a class="logo" href="https://tegatastore.com" target="_blank">
<img src="/static/img/tegatastore.png" alt="Tegata Store logo">
</a>
<div>
<p>
<a href="https://tegatastore.com" target="_blank"><strong>The Tegata Store</strong></a> will ship any one <a href="https://tegatastore.com/collections/authentic-torikumi-sheets" target="_blank">authentic torikumi sheet</a> to the winner of this basho!
</p>

<p class="fine-print">
In the case of a tie, the player with the highest rank at the start of the basho will win the reward.
</p>
</div>
</section>
{% endif %}

<section id="banzuke"
class="
Expand Down

0 comments on commit 189f925

Please sign in to comment.