diff --git a/.gitignore b/.gitignore index cdcdc5c..5998ff1 100644 --- a/.gitignore +++ b/.gitignore @@ -372,3 +372,4 @@ pyrightconfig.json # End of https://www.toptal.com/developers/gitignore/api/python,django,visualstudiocode,intellij+all +staticfiles/ diff --git a/pyproject.toml b/pyproject.toml index 4a9a1fe..52fb92d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,7 @@ dependencies = [ "celery>=5.4.0", "django>=5.1.6", "epub2go", + "python-dotenv>=1.0.1", "pywatchman>=2.0.0", ] diff --git a/src/epub2go_web/settings.py b/src/epub2go_web/settings.py index 51702a0..9f929d5 100644 --- a/src/epub2go_web/settings.py +++ b/src/epub2go_web/settings.py @@ -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/" diff --git a/src/epub2go_web/static/script.js b/src/epub2go_web/static/script.js index 480505f..b513639 100644 --- a/src/epub2go_web/static/script.js +++ b/src/epub2go_web/static/script.js @@ -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 = ""; diff --git a/src/epub2go_web/static/styles.css b/src/epub2go_web/static/styles.css index 4152491..a5a4eaf 100644 --- a/src/epub2go_web/static/styles.css +++ b/src/epub2go_web/static/styles.css @@ -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; diff --git a/src/epub2go_web/templates/index.html b/src/epub2go_web/templates/index.html index 7a6f225..c22ea34 100644 --- a/src/epub2go_web/templates/index.html +++ b/src/epub2go_web/templates/index.html @@ -10,19 +10,21 @@