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
Some checks failed
Linter / Lint (3.11) (push) Failing after 41s
This commit is contained in:
parent
5bcd6727a5
commit
e24737739f
5 changed files with 59 additions and 57 deletions
9
src/static/styles/core.css
Normal file
9
src/static/styles/core.css
Normal 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;
|
||||
}
|
20
src/static/styles/pages/index.css
Normal file
20
src/static/styles/pages/index.css
Normal 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;
|
||||
}
|
|
@ -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 {
|
||||
display: none;
|
||||
position: relative;
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<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>
|
||||
<body>
|
||||
<div id="menu">
|
||||
|
@ -10,32 +10,6 @@
|
|||
<li>Audit Log</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% 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="/me">User Info</a>
|
||||
<a href="/logout" class="txt-danger">Log Out</a>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'utils/login-logout.html' %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
28
src/templates/utils/login-logout.html
Normal file
28
src/templates/utils/login-logout.html
Normal 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 %}
|
Loading…
Reference in a new issue