Split out a lot of css and html templates into seperate files for ease of use later on in development
Some checks failed
Linter / Lint (3.11) (push) Failing after 41s

This commit is contained in:
Seaswimmer 2023-11-25 03:58:11 -05:00
parent 5bcd6727a5
commit e24737739f
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE
5 changed files with 59 additions and 57 deletions

View file

@ -0,0 +1,9 @@
body {
background-color: #2e3440;
color: #fff;
font-family: Arial, sans-serif;
}
.txt-danger, .txt-danger:hover, .txt-danger:visited, .txt-danger:active {
color: #ff0000 !important;
}

View file

@ -0,0 +1,20 @@
@import url('../core.css');
#menu {
position: fixed;
left: 0;
top: 0;
bottom: 0;
width: 200px;
background-color: #3b4252;
padding: 20px;
}
#menu ul {
list-style-type: none;
padding: 0;
}
#menu li {
margin-bottom: 10px;
}

View file

@ -1,32 +1,3 @@
body {
background-color: #333;
color: #fff;
font-family: Arial, sans-serif;
}
#menu {
position: fixed;
left: 0;
top: 0;
bottom: 0;
width: 200px;
background-color: #444;
padding: 20px;
}
#menu ul {
list-style-type: none;
padding: 0;
}
#menu li {
margin-bottom: 10px;
}
.txt-danger, .txt-danger:hover, txt-danger:visited, .txt-danger:active {
color: #ff0000 !important;
}
.dropdown-content { .dropdown-content {
display: none; display: none;
position: relative; position: relative;

View file

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<title>Audit Log</title> <title>Audit Log</title>
<link rel="stylesheet" href="{{url_for('static', filename='styles/index.css')}}"> <link rel="stylesheet" href="{{url_for('static', filename='styles/pages/index.css')}}">
</head> </head>
<body> <body>
<div id="menu"> <div id="menu">
@ -10,32 +10,6 @@
<li>Audit Log</li> <li>Audit Log</li>
</ul> </ul>
</div> </div>
{% if not user %} {% include 'utils/login-logout.html' %}
<div id="login">
<button id="discord-login" class="log-button" onclick="window.location.href='/login'">
<img src="{{url_for('static', filename='img/discord.svg')}}" alt="Log in with Discord" class="log-button-icon">
Log in with Discord
</button>
</div>
{% elif user %}
<div id = "logout">
<button id="discord-logout" class="log-button">
{% if user.avatar_url %}
<img src="{{user.avatar_url}}" alt="User Avatar" class="log-button-icon">
{% else %}
<img src="{{user.default_avatar_url}}" alt="User Avatar" class="log-button-icon">
{% endif %}
{% if user.discriminator != "0" %}
{{ user.username }}#{{ user.discriminator }}
{% else %}
{{ user.username }}
{% endif %}
<div class="dropdown-content">
<a href="/me">User Info</a>
<a href="/logout" class="txt-danger">Log Out</a>
</div>
</button>
</div>
{% endif %}
</body> </body>
</html> </html>

View file

@ -0,0 +1,28 @@
<link rel="stylesheet" href="{{url_for('static', filename='styles/utils/login-logout.css')}}">
{% if not user %}
<div id="login">
<button id="discord-login" class="log-button" onclick="window.location.href='/login'">
<img src="{{url_for('static', filename='img/discord.svg')}}" alt="Log in with Discord" class="log-button-icon">
Log in with Discord
</button>
</div>
{% elif user %}
<div id = "logout">
<button id="discord-logout" class="log-button">
{% if user.avatar_url %}
<img src="{{user.avatar_url}}" alt="User Avatar" class="log-button-icon">
{% else %}
<img src="{{user.default_avatar_url}}" alt="User Avatar" class="log-button-icon">
{% endif %}
{% if user.discriminator != "0" %}
{{ user.username }}#{{ user.discriminator }}
{% else %}
{{ user.username }}
{% endif %}
<div class="dropdown-content">
<a href="{{url_for('.index')}}">User Info</a>
<a href="{{url_for('.logout')}}" class="txt-danger">Log Out</a>
</div>
</button>
</div>
{% endif %}