Get page title and colors from database

See #18
This commit is contained in:
Dessa Simpson 2021-02-21 20:13:47 -07:00
parent 2e5762c029
commit 1c34b3f013
5 changed files with 67 additions and 6 deletions

41
views/colors.eta Normal file
View file

@ -0,0 +1,41 @@
body {
background-color: <%= it.bg.primary %>;
color: <%= it.fg.primary %>;
}
a {
color: <%= it.fg.primary %>;
}
a:hover {
color: <%= it.fg.ahover %>;
}
.error {
background-color: <%= it.bg.error %>;
}
#navbar {
background-color: <%= it.bg.navbar %>;
}
#nav-title, #nav-title a {
color: <%= it.fg.title %>;
}
#main {
background-color: <%= it.bg.table %>;
}
#modalBackground {
background-color: <%= it.bg.primary %>;
background-color: <%= it.bg.primary %>aa;
}
.modal {
background-color: <%= it.bg.primary %>;
}
#deleteRequestLink {
color: <%= it.bg.error %>;
}

View file

@ -1,8 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<link rel=stylesheet href=style.css />
<title><%= it.streamerName %>'s Learn Request Queue</title>
<link rel=stylesheet href=/style.css />
<link rel=stylesheet href=/colors.css />
<title><%= it.pageTitle.replace('{username}',it.streamerName) %></title>
<script>
window.loggedIn = <%= it.loggedIn %>;
window.validStates = <%~ it.validStates %>;
@ -13,7 +14,7 @@
<body>
<div id="navbar">
<div id="nav-streamerpic"><a href="https://twitch.tv/<%= it.streamerName %>"><img src="<%= it.streamerProfilePicture %>" /></a></div>
<div id="nav-title"><a href="https://twitch.tv/<%= it.streamerName %>"><%= it.streamerName %></a>'s Learn Request Queue</div>
<div id="nav-title"><%~ it.pageTitle.replace('{username}',`<a href="https://twitch.tv/${it.streamerName}">${it.streamerName}</a>`) %></div>
<div id="nav-requests"><a href="/">Requests</a></div>
<%- if (it.loggedIn) { -%>
<div id="nav-addrequest"><a href="#" onclick="openAddRequestModal()">Add Request</a></div>