Compare commits

...

5 commits

5 changed files with 66 additions and 48 deletions

View file

@ -1,3 +1,4 @@
copyright_start: 2021
guilds: guilds:
# Tegaki Tuesday # Tegaki Tuesday
- id: 814700630958276649 - id: 814700630958276649

View file

@ -6,6 +6,7 @@ use std::fs;
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
pub struct Settings { pub struct Settings {
pub guilds: Vec<Guild>, pub guilds: Vec<Guild>,
pub copyright_start: u32,
} }
impl Settings { impl Settings {

View file

@ -43,11 +43,19 @@ input[type=number] {
#content { #content {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex;
flex-direction: column; display: grid;
grid-template-areas:
"nav nav"
"challenge submissions";
grid-template-columns: 30em auto;
grid-template-rows: min-content auto;
overflow: hidden; overflow: hidden;
nav { nav {
grid-area: nav;
--bg: #{$fg}; --bg: #{$fg};
--fg: #{$bg}; --fg: #{$bg};
background: var(--bg); background: var(--bg);
@ -98,17 +106,21 @@ input[type=number] {
} }
} }
& > div:first-of-type { & > div {
display: flex;
height: 100%;
& > :first-child {
min-width: 40em;
padding: 1em;
}
& > * {
overflow: scroll; overflow: scroll;
display: flex;
flex-direction: column;
gap: 1em;
footer {
margin-top: auto;
text-align: center;
} }
} }
#challenge {
padding: 1em;
}
} }
* { * {
@ -116,17 +128,17 @@ input[type=number] {
} }
#submissions { #submissions {
display: flex; grid-area: submissions;
flex-direction: column;
height: calc(100% - 2em);
background: rgba(0, 0, 0, 0.125); background: rgba(0, 0, 0, 0.125);
$gap: 0.5em; padding: 1em;
padding: $gap;
& > div { & > div {
width: 100%; width: 100%;
column-count: 3; column-count: 3;
margin: 0; margin: 0;
$gap: 0.5em;
gap: $gap; gap: $gap;
& > figure { & > figure {

View file

@ -0,0 +1 @@
© {% set year = now() | date(format="%Y") | int %}{{ settings.copyright_start }}{% if year != settings.copyright_start %}{{ year }}{% endif %}

View file

@ -64,7 +64,7 @@
</nav> </nav>
</a> </a>
</nav> </nav>
<div> <div id="challenge">
<div> <div>
<h1>Welcome to Tegaki Tuesday #{{ challenge }}!</h1> <h1>Welcome to Tegaki Tuesday #{{ challenge }}!</h1>
{% if content.japanese %} {% if content.japanese %}
@ -118,6 +118,10 @@
<p><em>This challenge was suggested by <strong>{{ content.suggester }}</strong> using the <code>-h suggest</code> command.</code></em></p> <p><em>This challenge was suggested by <strong>{{ content.suggester }}</strong> using the <code>-h suggest</code> command.</code></em></p>
{%- endif -%} {%- endif -%}
</div> </div>
<footer>
Copyright {% include "copyright-years" %} Tegaki Tuesday. All rights reserved. 字ちゃん mascot art by <a href="https://twitter.com/bellumela" target="_blank">@bellumela</a>.
</footer>
</div>
<div id="submissions"> <div id="submissions">
<script> <script>
const submissionModal = image => { const submissionModal = image => {
@ -146,10 +150,9 @@
</figure> </figure>
{% endfor %} {% endfor %}
</div> </div>
<div> <footer>
some random shit goes here Submissions are copyright {% include "copyright-years" %} their respective submitters, and are licensed under the <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</a> license.
</div> </footer>
</div>
</div> </div>
</div> </div>
</body> </body>