minor tweaks
This commit is contained in:
@@ -123,6 +123,7 @@ STATIC_URL = "static/"
|
||||
STATICFILES_DIRS = [
|
||||
PROJ_DIR / "static/",
|
||||
]
|
||||
STATIC_ROOT = PROJ_DIR/ "staticfiles"
|
||||
|
||||
MEDIA_URL = "media/"
|
||||
MEDIA_ROOT = PROJ_DIR / "media/"
|
||||
|
||||
@@ -15,10 +15,10 @@ function submitSearch(event){
|
||||
event.preventDefault();
|
||||
search();
|
||||
}
|
||||
function search(searchStr = searchInput.value){
|
||||
function search(searchStr = searchInput.value.toLowerCase()){
|
||||
function showMatch(tr){
|
||||
// match search with list
|
||||
let searchSuccess = Array.from(tr.getElementsByClassName('table-data')).map(e => e.textContent)
|
||||
let searchSuccess = Array.from(tr.getElementsByClassName('table-data')).map(e => e.textContent.toLowerCase())
|
||||
.join(' ')
|
||||
.indexOf(searchStr) > -1;
|
||||
if (searchSuccess) tr.style.display = "";
|
||||
|
||||
@@ -1,23 +1,27 @@
|
||||
/* this is part of the http://bettermotherfuckingwebsite.com/ */
|
||||
:root{
|
||||
--bg:#faf0e673;
|
||||
--bg-acc:#EEEEEE;
|
||||
--bg-hover: #DDDDDD;
|
||||
--fg:#444;
|
||||
--fg-deemph: #777;
|
||||
}
|
||||
body{
|
||||
margin:40px auto;
|
||||
max-width:650px;
|
||||
line-height:1.6;
|
||||
line-height:1.4;
|
||||
font-size:18px;
|
||||
color:#444;
|
||||
color:var(--fg);
|
||||
padding:0 10px;
|
||||
}
|
||||
|
||||
h1,h2,h3{
|
||||
line-height:1.2
|
||||
line-height:1.2;
|
||||
letter-spacing: -2%;
|
||||
}
|
||||
|
||||
/* custom styles here */
|
||||
:root{
|
||||
--white:#faf0e673;
|
||||
}
|
||||
body{
|
||||
background-color: var(--white);
|
||||
background-color: var(--bg);
|
||||
font-family: serif;
|
||||
}
|
||||
header{
|
||||
@@ -25,16 +29,16 @@ header{
|
||||
justify-content: center;
|
||||
}
|
||||
small{
|
||||
color: #777;
|
||||
color: var(--fg-deemph);
|
||||
}
|
||||
.searchbar{
|
||||
width: fit-content;
|
||||
}
|
||||
tr:nth-child(even){
|
||||
background-color: #EEEEEE;
|
||||
background-color: var(--bg-acc);
|
||||
}
|
||||
tr:hover{
|
||||
background-color: #DDDDDD;
|
||||
background-color: var(--bg-hover);
|
||||
transition: all 2ms;
|
||||
}
|
||||
.inline-icon, .header-icon{
|
||||
@@ -43,6 +47,7 @@ tr:hover{
|
||||
}
|
||||
.header-icon{
|
||||
padding: .5em;
|
||||
fill: var(--fg-deemph);
|
||||
}
|
||||
a:hover, a:any-link{
|
||||
text-decoration: none;
|
||||
|
||||
@@ -10,19 +10,21 @@
|
||||
<body>
|
||||
<header>
|
||||
<div>
|
||||
<h1>{{ title }}</h1>
|
||||
<a href="javascript:void(window.open('http://{{ http_host }}/?t=' + encodeURIComponent(window.location.toString())))" title="Als Lesezeichen speichern"><!--TODO fix domain part as variable-->
|
||||
<img src="{% static 'bookmark.svg' %}" alt="Bookmarklet" class="header-icon">
|
||||
</a>
|
||||
<a href="https://github.com/eneller/epub2go-web">
|
||||
<img src="{% static 'github.svg' %}" alt="GitHub" class="header-icon">
|
||||
</a></div>
|
||||
<h1>{{ title }}</h1>
|
||||
<h2>1 Click Download für Literatur</h2>
|
||||
</div>
|
||||
<search>
|
||||
<form onsubmit="submitSearch(event)" class="searchbar">
|
||||
<input type="search" id="searchInput" placeholder="Suche nach Titel" minlength="3">
|
||||
</form>
|
||||
</search>
|
||||
<small>Im Moment finden sich hier {{ book_count }} Bücher. </small>
|
||||
<a href="javascript:void(window.open('http://{{ http_host }}/?t=' + encodeURIComponent(window.location.toString())))" title="Als Lesezeichen speichern"><!--TODO fix domain part as variable-->
|
||||
<img src="{% static 'bookmark.svg' %}" alt="Bookmarklet" class="header-icon">
|
||||
</a>
|
||||
<a href="https://github.com/eneller/epub2go-web">
|
||||
<img src="{% static 'github.svg' %}" alt="GitHub" class="header-icon">
|
||||
</a>
|
||||
</header>
|
||||
<main>
|
||||
<!-- NOTE use dl here?-->
|
||||
|
||||
Reference in New Issue
Block a user