Compare commits

...

2 Commits

Author SHA1 Message Date
furo f40eb6cf6e Add screenshot script 2023-08-09 17:59:18 +02:00
furo 23bfd45d52 "woof" > "map" :) 2023-08-09 17:58:55 +02:00
3 changed files with 22 additions and 8 deletions

13
scripts/screenshot.sh Executable file
View File

@ -0,0 +1,13 @@
cd ~/Development/ddguesser
mkdir screenshots
ID=$(uuidgen)
MAP=$(dmenu < /dev/null)
if [ -z "$MAP" ]; then
exit 1
fi
ENTITIES=$(echo -e "false\ntrue" | dmenu)
mkdir screenshots
flameshot screen -p "./screenshots/$ID.png"
echo "INSERT INTO locations (id, map, has_entities) VALUES (\'$ID\', \'$MAP\', $ENTITIES);" >> inserts.psql

View File

@ -68,16 +68,16 @@ span.incorrect {
color: #E04F53;
}
.woof {
.map {
position: relative;
width: 100%;
}
.woof > img {
.map > img {
width: 100%;
}
.woof > p {
.map > p {
position: absolute;
bottom: 1rem;
user-select: none;

View File

@ -4,14 +4,15 @@
<header>
<h1>Which map is this image from?</h1>
</header>
{% if guess %}
<div class="woof">
<div class="map">
{% if guess %}
<img src="/static/location-data/{{ location.id }}.png" class="map" loading="lazy">
<p class="guess">Your guess {{ guess.map }} is <span class="{{ guess.result }}">{{ guess.result }}</span>!</p>
{% else %}
<img src="/static/location-data/{{ location.id }}.png" class="map" loading="lazy">
{% endif %}
</div>
{% else %}
<img src="/static/location-data/{{ location.id }}.png" class="map" loading="lazy">
{% endif %}
<form action="/location/{{ location.id }}" method="get">
<label for="guess">Enter map to guess for:</label>
<input type="text" name="guess" id="guess" list="map-names" autofocus>