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 {
margin: 0;
background: var(--bg-color);
font-family: Arial, Helvetica, sans-serif;
}
@ -52,12 +53,12 @@ body {
height: 3rem;
}
#topnav_profile span {
font-size: 21px;
}
#topnav_profile img {
cursor: pointer;
/*position: absolute;*/
width: 3rem;
height: 100%;
@ -69,16 +70,25 @@ body {
position: relative;
}
#topnav_profile_dropdown:hover {
}
#topnav_profile_dropdown {
display: none;
padding: 5px;
background: var(--bg-color-l);
border: 2px solid var(--bg-color-d);
border-radius: 5px;
position: absolute;
margin-top: 0.5rem;
display: flex;
right: 0px;
flex-direction: column;
}
.topnav_profile_button {
width: 6rem;
width: 8rem;
height: 2.5rem;
background: var(--bg-color-ll);
border: 2px solid var(--bg-color);
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};
#[derive(Debug, Template, Clone)]
#[template(path = "index.html")]
#[template(path = "documents.html")]
pub struct PageTemplate {}
pub async fn page() -> (StatusCode, Html<String>) {

View File

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

View File

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

View File

@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% endblock %}</title>
<link href="css/global.css" rel="stylesheet">
<script src="/js/global.js"></script>
{% block headers %}{% endblock %}
</head>
<body>
@ -26,23 +27,22 @@
<div>
<div id="topnav_profile">
<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 id="topnav_profile_wrapper">
<div id="topnav_profile_dropdown">
<button class="topnav_profile_button">
Profile
</button>
<button class="topnav_profile_button">
Administration
</button>
<button class="topnav_profile_button">
Preferences
</button>
<button class="topnav_profile_button">
Log out
</button>
<button class="topnav_profile_button">
Profile
</button>
<button class="topnav_profile_button">
Administration
</button>
<button class="topnav_profile_button">
Preferences
</button>
<button class="topnav_profile_button">
Log out
</button>
</div>
</div>
</div>

View File

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

View File

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

View File

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

View File

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