website: frontend

This commit is contained in:
Elysia 2025-11-02 14:07:40 +00:00
parent 9cb792240b
commit 67096dc68d
17 changed files with 165 additions and 44 deletions

View file

@ -116,6 +116,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/5.2/howto/static-files/
STATIC_URL = 'static/'
STATICFILES_DIRS = [BASE_DIR / "static"]
# Default primary key field type
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field

View file

@ -0,0 +1,73 @@
@font-face {
font-family: 'CynthoBold';
src:
url('/static/font/CynthoNextBold.otf') format('opentype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'CynthoRegular';
src:
url('/static/font/CynthoNextRegular.otf') format('opentype');
font-weight: normal;
font-style: normal;
}
/* This sets the font color for all text */
body {
background-color:rgba(250, 184, 0);
color: #006cab;
font-size: 20px;
font-family: "CynthoRegular", sans-serif;;
margin: 0;
padding: 0;
text-align: center;
}
button {
background-color: rgba(0, 108, 171);
color: rgba(250, 184, 0);
font-size: 20px;
font-family: "CynthoRegular", sans-serif;
font-weight: bold;
padding: 25px 25px;
border: none; /* removes default border */
border-radius: 5px; /* rounded corners */
cursor: pointer; /* pointer on hover */
align-items: center; /* aligns vertically */
margin-top: 20px;
}
#map {
height: 550px;
width: 100%;
}
textarea {
width: 80%;
height: 300px;
padding: 12px;
box-sizing: border-box;
border: 4px solid rgba(0, 108, 171);
border-radius: 5px;
background-color: rgb(255, 199, 44);
font-size: 18px;
color: #006cab;
resize: none;
margin-top: 20px;
}
.btn-group {
display: flex; /* places buttons side-by-side */
justify-content: center; /* centers them horizontally */ /* aligns vertically */
gap: 15px;
margin-top: 10px;
}
img {
align-items: center;
width: 80%;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

View file

@ -1,35 +1,12 @@
{% load static %}
<!DOCTYPE html>
<html>
<head>
<style>
/* This sets the font color for all text */
body {
background-color:rgb(255, 255, 255);
color: #006cab;
font-family: 'Raleway', sans-serif;
margin: 0;
padding: 0;
text-align: center;
}
<!-- Link your custom CSS -->
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
button {
background-color: rgba(0, 108, 171);
color: rgba(250, 184, 0);
font-size: 20px;
font-weight: bold;
padding: 10px 20px; /* makes button bigger */
border: none; /* removes default border */
border-radius: 5px; /* rounded corners */
cursor: pointer; /* pointer on hover */
}
#map {
height: 550px;
width: 100%;
}
</style>
<title>GREGGORDINATES</title>
<!-- Global CSS -->
@ -38,7 +15,13 @@
</head>
<body>
<h1>GREGGORDINATES</h1>
<br>
<br>
<h1 style="color:#ffffff ; margin-top: 20px; margin-bottom: 10px;
letter-spacing: 1.5px;" >
GREGGordinates
</h1>
<p> "Everything is relative to greggs, and only that is absolute." </p>
{% block content %}
{% endblock %}

View file

@ -2,6 +2,28 @@
{% block content %}
<p> Landing Page </p>
<br><br>
<h3>What's your cool GREGGordinates :3</h3>
<textarea id="greggordinates" name="greggordinates" rows="4" cols="50">
</textarea>
<br><br>
<div class="btn-group">
<a href="{% url 'landing_page' %}">
<button>
</button>
</a>
<a href="{% url 'encode_result' %}">
<button onclick="saveAndGo()">
Get lame location :/
</button>
</a>
</div>
{% endblock %}

View file

@ -2,13 +2,12 @@
{% block content %}
<p> Landing Page </p>
<p id="result"></p>
<h2>Click on the map to choose your lame location</h2>
<br>
<div id="map" data-mode=""></div>
<input
type="hidden"
data-map-markers=""
@ -18,7 +17,7 @@
/>
<p id="coords">Coordinates: none</p>
<p id="coords">Click on the map to choose your lame location</p>
<script>
@ -59,10 +58,23 @@
</script>
<button onclick="saveAndGo()">
GREGG IT!
</button>
<div class="btn-group">
<a href="{% url 'landing_page' %}">
<button>
</button>
</a>
<a href="{% url 'encode_result' %}">
<button onclick="saveAndGo()">
GREGG IT!
</button>
</a>
</div>
// pass coordinates to django and directs to result page
<style>
</style>
<!-- pass coordinates to django and directs to result page -->
{% endblock %}

View file

@ -2,6 +2,6 @@
{% block content %}
<p> Landing Page </p>
<p> encode result </p>
{% endblock %}

View file

@ -1,7 +1,37 @@
{% extends 'websiteapp/base.html' %}
{% load static %}
{% block content %}
<p> Landing Page </p>
<img src="{% static 'img/drawing.png' %}" alt="Cute map drawing">
<div class="btn-group">
<a href="{% url 'encode' %}">
<button>Encode</button>
</a>
<a href="{% url 'decode' %}">
<button>Decode</button>
</a>
</div>
<style>
.btn-group {
display: flex; /* places buttons side-by-side */
justify-content: center; /* centers them horizontally */
align-items: center; /* aligns vertically */
gap: 30px;
margin-top: 0px;
}
.btn-group {
padding: 120px 120px;
}
.btn-group button {
padding: 40px 40px;
font-size:25px;
margin-top: 0px;
}
</style>
{% endblock %}

View file

@ -2,9 +2,9 @@ from django.urls import path
from . import views
urlpatterns = [
path('', views.landing_page),
path('encode', views.encode),
path('encode/result', views.encode_result),
path('decode', views.decode),
path('decode/result', views.decode_result),
path('', views.landing_page, name='landing_page'),
path('encode', views.encode, name='encode'),
path('encode/result', views.encode_result, name='encode_result'),
path('decode', views.decode, name='decode'),
path('decode/result', views.decode_result, name='decode_result'),
]