feat(ui): Add basic index site

This commit is contained in:
moanos [he/him] 2024-03-18 15:29:41 +01:00
parent 93de1e2dfb
commit 968123dda4
6 changed files with 356 additions and 0 deletions

View File

@ -0,0 +1,284 @@
.content-box {
margin-top: 25px;
}
.sidebar-nav {
margin-top: 20px;
}
.col-sm-2 {
padding-left: 0px;
}
table {
border: none;
border-collapse: collapse;
}
td {
border: 2px solid black;
border-collapse: collapse;
padding: 5px;
}
th {
border: 3px solid black;
border-collapse: collapse;
padding: 8px;
background-color: #ECECEC;
}
h1 {
padding-top: 10px;
}
* {
box-sizing: border-box;
}
.header {
overflow: hidden;
background-color: #addade;
}
.header a, .sidebar-nav a {
color: black;
text-align: center;
text-decoration: none;
border-radius: 4px;
}
.header a {
float: left;
padding: 12px;
font-size: 20px;
line-height: 25px;
}
.header a:hover {
background-color: #4090b6;
color: black;
}
.header a.active {
background-color: dodgerblue;
color: white;
}
.header-right select {
width: 75%;
padding: 8px 10px;
border: none;
border-radius: 4px;
opacity: 1;
background-color: #4ba3cd;
}
.header-right select.option {
color: #000;
background-color: #4ba3cd;
padding: 0 10px;
border: 1px;
}
.header-right {
float: right;
}
@media screen and (max-width: 500px) {
.header a {
float: none;
display: block;
text-align: left;
}
.header-right {
float: none;
}
}
.logo img {
height: 40px;
}
.sidebar-nav {
z-index: 1;
top: 20px;
left: 10px;
background-color: #4ba3cd;
overflow-x: hidden;
padding: 8px 0;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
.sidebar-nav-top {
padding-left: 0px;
float: left;
}
.sidebar-nav a {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 25px;
color: black;
display: block;
}
.sidebar-nav a:hover {
background-color: #4090b6;
}
.main {
margin-left: 160px; /* Same as the width of the sidenav */
font-size: 28px; /* Increased text to enable scrolling */
padding: 0px 10px;
}
@media screen and (max-height: 450px) {
.sidebar-nav {
padding-top: 15px;
}
.sidebar-nav a {
font-size: 18px;
}
}
.sidebar-nav li {
list-style-type: none;
margin: 0;
padding: 0;
}
.btn {
border: 2px solid #4090b6;
background-color: #4ba3cd;
}
.form-button, .link-button a:link, .link-button a:visited {
background-color: #4ba3cd;
color: white;
padding: 14px 25px;
text-align: center;
text-decoration: none;
display: block;
margin: 10px;
border-radius: 4px;
border: none;
}
.form-button:hover, .link-button a:hover, .link-button a:active {
background-color: #4090b6;
}
.delete-button, .delete-button a:link, .delete-button a:visited {
border: none;
margin: 10px;
background-color: #a3380a;
border-radius: 4px;
}
.delete-button:hover, .delete-button a:hover, .delete-button a:active {
background-color: #8f2f06;
}
.delete-button {
display: block;
}
.search_result {
margin-top: 10px;
margin-bottom: 10px;
}
.action-menu a {
text-decoration: none;
color: inherit;
}
.action-menu ul {
display: flex;
width: 100%;
height: 80vh;
margin: auto;
max-width: 1000px;
justify-content: space-between;
text-align: center;
}
.action-menu li {
padding: 1rem 2rem 1.15rem;
text-transform: uppercase;
cursor: pointer;
color: #ebebeb;
min-width: 80px;
margin: 10px;
font-weight: bold;
list-style-type: none;
background-color: #4ba3cd;
border-radius: 5px;
}
.action-menu li:hover {
background-color: #4090b6;
animation: spring 300ms ease-out;
}
.action-menu li:active {
transform: translateY(4px);
}
.action-button ul {
display: flex;
width: 100%;
height: 80vh;
margin: auto;
max-width: 1000px;
justify-content: space-between;
text-align: center;
}
.action-button li {
text-decoration: none;
padding: 1rem 2rem 1.15rem;
text-transform: uppercase;
cursor: pointer;
color: #ebebeb;
min-width: 80px;
margin: 10px;
font-weight: bold;
list-style-type: none;
background-color: #4ba3cd;
border-radius: 5px;
}
.action-button li:hover {
background-color: #4090b6;
animation: spring 300ms ease-out;
}
.action-button li:active {
transform: translateY(4px);
}
@keyframes spring {
15% {
-webkit-transform-origin: center center;
-webkit-transform: scale(1.1, 1.05);
}
40% {
-webkit-transform-origin: center center;
-webkit-transform: scale(0.95, 0.95);
}
75% {
-webkit-transform-origin: center center;
-webkit-transform: scale(1.025, 1);
}
100% {
-webkit-transform-origin: center center;
-webkit-transform: scale(1, 1);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% block title %}<title>Notfellchen</title>{% endblock %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Add additional CSS in static file -->
{% load static %}
<link rel="stylesheet" href="{% static 'fellchensammlung/css/styles.css' %}">
</head>
<body>
{% block header %}
{% include "fellchensammlung/header.html" %}
{% endblock %}
<div class="container-fluid">
<div class="row">
<div class="col-sm-10 content-box">{% block content %}{% endblock %}{% block pagination %}
{% if is_paginated %}
<div class="pagination">
<span class="page-links">
{% if page_obj.has_previous %}
<a href="{{ request.path }}?page={{ page_obj.previous_page_number }}">previous</a>
{% endif %}
<span class="page-current">
Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.
</span>
{% if page_obj.has_next %}
<a href="{{ request.path }}?page={{ page_obj.next_page_number }}">next</a>
{% endif %}
</span>
</div>
{% endif %}
{% endblock %}</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,20 @@
{% load static %}
{% load i18n %}
</div>
<div class="header">
<a href="" class="logo"><img src={% static 'fellchensammlung/img/logo_transparent.png' %}></a>
<nav id="nav" class="nav justify-content-center">
<a class="nav-link nav-link-active" href="/"><i data-feather="home"></i> Home</a>
<a class="nav-link " href="/feed/"><i class="fas fa-search"></i> Suchen</a>
<a class="nav-link " href="/info/"><i class="fas fa-"></i> Vermitteln</a>
<a class="nav-link " href="/download/"><i class="fas fa-info"></i> Über uns</a>
<a class="nav-link " href="https://chaos.social/@guta.rss"><i class="fas fa-feather"></i> RSS</a>
</nav>
<div class="header-right">
<a href="https://github.com/moan0s/ILMO2">{% translate "About the software" %}</a>
</div>
</div>

View File

@ -0,0 +1,14 @@
{% extends "fellchensammlung/base_generic.html" %}
{% load i18n %}
{% block content %}
<h1>{% translate "Notfellchen - Vermittlungen finden" %}</h1>
<p>{% translate "Alle Tiere brauchen ein liebendes Zuhause. Damit keins vergessen wird gibt es diese Seite. Entwickelt und betreut von " %}<em><a href="https://hyteck.de">moanos</a></em>!</p>
<h2>{% translate "Aktuelle Vermittlungen" %}</h2>
<ul>
{% for adoption_notice in latest_adoptions %}
<li>{{ adoption_notice.name }}: {{ adoption_notice.animals }} </li>
{% endfor %}
</ul>
{% endblock %}