iwannadriveintoapoleat200kilometersperhourpleasesendhelp

This commit is contained in:
Gvidas Juknevičius 2025-09-03 21:20:40 +03:00
parent 5c0fd633db
commit cd99fea483
Signed by: MCorange
GPG Key ID: 5BE6B533CB76FE86
10 changed files with 49 additions and 24 deletions

View File

@ -8,6 +8,7 @@
} }
body { body {
margin: 0;
background: var(--bg-color); background: var(--bg-color);
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
} }
@ -52,12 +53,12 @@ body {
height: 3rem; height: 3rem;
} }
#topnav_profile span { #topnav_profile span {
font-size: 21px; font-size: 21px;
} }
#topnav_profile img { #topnav_profile img {
cursor: pointer;
/*position: absolute;*/ /*position: absolute;*/
width: 3rem; width: 3rem;
height: 100%; height: 100%;
@ -69,16 +70,25 @@ body {
position: relative; position: relative;
} }
#topnav_profile_dropdown:hover {
}
#topnav_profile_dropdown { #topnav_profile_dropdown {
display: none;
padding: 5px;
background: var(--bg-color-l);
border: 2px solid var(--bg-color-d);
border-radius: 5px;
position: absolute; position: absolute;
margin-top: 0.5rem; margin-top: 0.5rem;
display: flex;
right: 0px; right: 0px;
flex-direction: column; flex-direction: column;
} }
.topnav_profile_button { .topnav_profile_button {
width: 6rem; width: 8rem;
height: 2.5rem;
background: var(--bg-color-ll); background: var(--bg-color-ll);
border: 2px solid var(--bg-color); border: 2px solid var(--bg-color);
border-radius: 10px; border-radius: 10px;

15
res/js/global.js Normal file
View File

@ -0,0 +1,15 @@
document.addEventListener("keydown", (event) => {
if (event.key === "Escape") on_pfp_click(true);
});
function on_pfp_click(close = false) {
const el = document.getElementById("topnav_profile_dropdown");
if (!close && (el.style.display === "none" || el.style.display === "")) {
el.style.display = "flex";
} else {
el.style.display = "none";
}
}

View File

@ -2,7 +2,7 @@ use askama::Template;
use axum::{http::StatusCode, response::Html}; use axum::{http::StatusCode, response::Html};
#[derive(Debug, Template, Clone)] #[derive(Debug, Template, Clone)]
#[template(path = "index.html")] #[template(path = "documents.html")]
pub struct PageTemplate {} pub struct PageTemplate {}
pub async fn page() -> (StatusCode, Html<String>) { pub async fn page() -> (StatusCode, Html<String>) {

View File

@ -2,7 +2,7 @@ use askama::Template;
use axum::{http::StatusCode, response::Html}; use axum::{http::StatusCode, response::Html};
#[derive(Debug, Template, Clone)] #[derive(Debug, Template, Clone)]
#[template(path = "index.html")] #[template(path = "events.html")]
pub struct PageTemplate {} pub struct PageTemplate {}
pub async fn page() -> (StatusCode, Html<String>) { pub async fn page() -> (StatusCode, Html<String>) {

View File

@ -2,7 +2,7 @@ use askama::Template;
use axum::{http::StatusCode, response::Html}; use axum::{http::StatusCode, response::Html};
#[derive(Debug, Template, Clone)] #[derive(Debug, Template, Clone)]
#[template(path = "index.html")] #[template(path = "roster.html")]
pub struct PageTemplate {} pub struct PageTemplate {}
pub async fn page() -> (StatusCode, Html<String>) { pub async fn page() -> (StatusCode, Html<String>) {

View File

@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% endblock %}</title> <title>{% block title %}{% endblock %}</title>
<link href="css/global.css" rel="stylesheet"> <link href="css/global.css" rel="stylesheet">
<script src="/js/global.js"></script>
{% block headers %}{% endblock %} {% block headers %}{% endblock %}
</head> </head>
<body> <body>
@ -26,7 +27,7 @@
<div> <div>
<div id="topnav_profile"> <div id="topnav_profile">
<span>MCorange</span> <span>MCorange</span>
<img src="/img/default_pfp.png" alt="Profile Picture"> <img src="/img/default_pfp.png" alt="Profile Picture" onclick="on_pfp_click()">
</div> </div>
<div id="topnav_profile_wrapper"> <div id="topnav_profile_wrapper">
<div id="topnav_profile_dropdown"> <div id="topnav_profile_dropdown">
@ -42,7 +43,6 @@
<button class="topnav_profile_button"> <button class="topnav_profile_button">
Log out Log out
</button> </button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -7,5 +7,5 @@
{% block content %} {% block content %}
<h1>Hello!!!!!!!</h1> <h1>Hello documents!!!!!!!</h1>
{% endblock %} {% endblock %}

View File

@ -7,5 +7,5 @@
{% block content %} {% block content %}
<h1>Hello!!!!!!!</h1> <h1>Hello events!!!!!!!</h1>
{% endblock %} {% endblock %}

View File

@ -7,5 +7,5 @@
{% block content %} {% block content %}
<h1>Hello!!!!!!!</h1> <h1>Hello Dashboard!!!!!!!!</h1>
{% endblock %} {% endblock %}

View File

@ -7,5 +7,5 @@
{% block content %} {% block content %}
<h1>Hello!!!!!!!</h1> <h1>Hello roster!!!!!!!</h1>
{% endblock %} {% endblock %}