Redesign UI with modern dark theme and improved styling

- Unified color scheme using CSS variables across all pages
- Fixed spacing issues in verse display (removed <br> joins for rich view)
- Updated all HTML pages with proper HTML5 structure
- Added responsive design with mobile breakpoints
- Created shared stylesheet (styles/page.css) for form pages
- Fixed unclosed div tag in scripture_response
- Improved typography with serif fonts for scripture text
- Added verse container cards with hover effects
- Inline dark background to prevent white flash on navigation

All endpoints remain backward compatible with existing functionality.
This commit is contained in:
2025-10-19 22:24:02 -07:00
parent dd474492bb
commit a597e2be07
17 changed files with 792 additions and 242 deletions
+24 -21
View File
@@ -1,24 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bible Dictionary - KJV API</title>
<link rel="stylesheet" href="/styles/page.css">
<style>body{background-color:#1a1a1a}</style>
</head>
<body>
<header>
<a href="/">Home</a> | <a href="/define">Dictionary</a> |
<a href="/random?view=rich">Random Verse</a> | <a href="/votd?view=rich">Verse of the Day</a>
</header>
<h2>Bible Dictionary</h2>
<form action="/define">
<label for='kw'>Word lookup</label><br>
<input type="text" name="kw"><br><br>
<label for='view'>View<label><br>
<input type="radio" name="view" value="rich" checked="checked">Rich<br>
<input type="radio" name="view" value="plain">Plain<br>
<input type="radio" name="view" value="json">JSON<br>
<input type="submit">
<form>
<label for='kw'>Word lookup</label>
<input type="text" name="kw" placeholder="Enter a word to define...">
<label for='view'>View</label>
<input type="radio" name="view" value="rich" checked="checked"> Rich
<input type="radio" name="view" value="plain"> Plain
<input type="radio" name="view" value="json"> JSON
<input type="submit" value="Define">
</form>
<p>This tool uses an abridged 1828 Noah Webster dictionary.</p>
<style>
html{
font-family: sans-serif;
font-size: 14pt;
width: 768px;
}
a {
color: #547720
}
</style>
</body>
</html>
+19 -19
View File
@@ -1,24 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quick Search - KJV API</title>
<link rel="stylesheet" href="/styles/page.css">
<style>body{background-color:#1a1a1a}</style>
</head>
<body>
<header>
<a href="/">Home</a> | <a href="/find">Quick Search</a> |
<a href="/random?view=rich">Random Verse</a> |
<a href="/votd?view=rich">Verse of the Day</a></header>
<a href="/votd?view=rich">Verse of the Day</a>
</header>
<h2>Quick Search</h2>
<form action="/find">
<label for='kw'>Query</label><br>
<input type="text" name="kw"><br><br>
<input type="hidden" name="view" value="rich"><br>
<input type="submit">
<form>
<style>
html{
font-family: sans-serif;
font-size: 14pt;
width: 768px;
}
a {
color: #547720
}
</style>
<label for='kw'>Query</label>
<input type="text" name="kw" placeholder="Enter verse reference or keywords...">
<input type="hidden" name="view" value="rich">
<input type="submit" value="Search">
</form>
</body>
</html>
+158 -53
View File
@@ -1,77 +1,182 @@
<!DOCTYPE html>
<html>
<head>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>KJV API - Legacy Edition</title>
<style>html,body{background-color:#1a1a1a}</style>
<style>
/* Dark Theme */
body {
background-color: #222;
color: #fff;
/* Modern KJV API Styling - Index Page */
:root {
--color-bg-primary: #1a1a1a;
--color-bg-secondary: #252525;
--color-bg-tertiary: #2f2f2f;
--color-text-primary: #e8e8e8;
--color-text-secondary: #b8b8b8;
--color-text-muted: #888888;
--color-accent-primary: #6b9bd1;
--color-accent-hover: #85aede;
--color-link: #6b9bd1;
--color-link-hover: #85aede;
--color-border: #3a3a3a;
--color-shadow: rgba(0, 0, 0, 0.3);
--font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--font-scripture: Georgia, "Crimson Text", "Times New Roman", serif;
--font-mono: "SF Mono", Monaco, "Cascadia Code", "Courier New", monospace;
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 1.5rem;
--space-xl: 2rem;
--content-max-width: 820px;
--border-radius: 8px;
--border-radius-sm: 4px;
--transition-fast: 150ms ease;
}
* {
box-sizing: border-box;
}
body {
background-color: var(--color-bg-primary);
color: var(--color-text-primary);
margin: 0;
padding: var(--space-xl);
font-family: var(--font-ui);
line-height: 1.6;
}
/* Style the header */
html {
font-family: sans-serif;
font-size: 14.5pt;
width: 768px;
padding: 1px;
margin-top: 15px;
color: #fff; /* Text color */
font-family: var(--font-ui);
font-size: 16px;
}
.container {
max-width: var(--content-max-width);
margin: 0 auto;
padding: var(--space-lg);
}
h1 {
color: var(--color-text-primary);
font-size: 2.5rem;
margin-bottom: var(--space-lg);
font-weight: 700;
text-align: center;
}
form {
background-color: var(--color-bg-secondary);
padding: var(--space-xl);
border-radius: var(--border-radius);
border: 1px solid var(--color-border);
margin-bottom: var(--space-xl);
box-shadow: 0 2px 8px var(--color-shadow);
}
label {
display: block;
margin-bottom: var(--space-sm);
font-weight: 600;
color: var(--color-text-primary);
}
a {
color: #007bff; /* Link color */
color: var(--color-link);
text-decoration: none;
transition: color var(--transition-fast);
}
.header {
font-family: sans-serif;
padding: 10px 16px;
background: #333; /* Dark background */
color: #fff; /* Text color */
position: fixed;
top: 5px;
width: 768px;
a:hover {
color: var(--color-link-hover);
text-decoration: underline;
}
input[type=text] {
width: 75%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
text-align: left;
font-size: 14.5pt;
background-color: #333; /* Dark background */
color: #fff; /* Text color */
border: 1px solid #555; /* Border color */
width: 100%;
padding: var(--space-sm) var(--space-md);
margin: var(--space-sm) 0;
font-size: 1rem;
font-family: var(--font-ui);
background-color: var(--color-bg-tertiary);
color: var(--color-text-primary);
border: 2px solid var(--color-border);
border-radius: var(--border-radius-sm);
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
input[type=button], input[type=submit], input[type=reset] {
font-family: sans-serif;
background-color: #555; /* Dark button background */
border: none;
color: #fff; /* Button text color */
padding: 16px 32px;
text-decoration: none;
margin: 4px 2px;
cursor: pointer;
input[type=text]:focus {
outline: none;
border-color: var(--color-accent-primary);
box-shadow: 0 0 0 3px rgba(107, 155, 209, 0.1);
}
input[type=button],
input[type=submit],
input[type=reset] {
font-family: var(--font-ui);
font-weight: 600;
background-color: var(--color-accent-primary);
border: none;
color: var(--color-bg-primary);
padding: var(--space-sm) var(--space-lg);
text-decoration: none;
margin: var(--space-sm) 0;
cursor: pointer;
border-radius: var(--border-radius-sm);
transition: background-color var(--transition-fast), transform var(--transition-fast);
font-size: 1rem;
}
input[type=button]:hover,
input[type=submit]:hover,
input[type=reset]:hover {
background-color: var(--color-accent-hover);
transform: translateY(-1px);
}
code {
background-color: #222;
color: #fff;
padding: 4px 8px;
border-radius: 4px;
font-family: monospace;
background-color: var(--color-bg-tertiary);
color: var(--color-text-primary);
padding: 2px 6px;
border-radius: var(--border-radius-sm);
font-family: var(--font-mono);
font-size: 0.9em;
}
.definition {
padding: 8px;
font-family: sans-serif;
font-size: 14.5pt;
width: 768px;
padding: 1px;
color: #fff; /* Text color */
background-color: #222; /* Dark background */
pre {
background-color: var(--color-bg-secondary);
border: 1px solid var(--color-border);
border-radius: var(--border-radius);
padding: var(--space-lg);
overflow-x: auto;
line-height: 1.6;
}
pre code {
background-color: transparent;
padding: 0;
font-size: 0.95rem;
}
@media (max-width: 768px) {
body {
padding: var(--space-md);
}
h1 {
font-size: 2rem;
}
form {
padding: var(--space-lg);
}
}
</style>
</head>
+4 -1
View File
@@ -1 +1,4 @@
<b><a href="/find?kw={chapter}&view=rich">{passage}</a></b><br>{text}<br>
<div class="verse-container">
<div class="verse-reference"><a href="/find?kw={chapter}&view=rich">{passage}</a></div>
<div class="verse-text">{text}</div>
</div>
+25 -23
View File
@@ -1,28 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bible Search - KJV API</title>
<link rel="stylesheet" href="/styles/page.css">
<style>body{background-color:#1a1a1a}</style>
</head>
<body>
<header>
<a href="/">Home</a> | <a href="/find">Quick Search</a> | <a href="/search">Bible Search</a> |
<a href="/random?view=rich">Random Verse</a> | <a href="/votd?view=rich">Verse of the Day</a>
</header>
<h2>Bible Search</h2>
<form action="/search">
<label for='kw'>Key Words</label><br>
<input type="text" name="kw"><br><br>
<label for='view'>View<label><br>
<input type="radio" name="view" value="rich" checked="checked">Rich<br>
<input type="radio" name="view" value="plain">Plain<br>
<input type="radio" name="view" value="json">JSON<br>
<input type="submit">
<form>
<label for='kw'>Key Words</label>
<input type="text" name="kw" placeholder="Enter search keywords...">
<label for='view'>View</label>
<input type="radio" name="view" value="rich" checked="checked"> Rich
<input type="radio" name="view" value="plain"> Plain
<input type="radio" name="view" value="json"> JSON
<input type="submit" value="Search">
</form>
<hr>
<p>You can use standard search operators such as <b>AND</b>, <b>OR</b>, and <b>NOT</b>.</p>
<p>Such as: "reprobate <b>NOT</b> silver".</p>
<p>Multiple word queries without operators will be assumed to be AND.<p>
<style>
html{
font-family: sans-serif;
font-size: 14pt;
width: 768px;
}
a {
color: #547720
}
</style>
<p>Multiple word queries without operators will be assumed to be AND.</p>
</body>
</html>
+20 -32
View File
@@ -1,40 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sequential Bible Viewer - KJV API</title>
<link rel="stylesheet" href="/styles/page.css">
<style>body{background-color:#1a1a1a}</style>
</head>
<body>
<header>
<a href="/">Home</a> | <a href="/find">Quick Search</a> |
<a href="/random?view=rich">Random Verse</a> |
<a href="/votd?view=rich">Verse of the Day</a></header>
<a href="/">Home</a> | <a href="/find">Quick Search</a> | <a href="/seq">Sequential Viewer</a> |
<a href="/random?view=rich">Random Verse</a> | <a href="/votd?view=rich">Verse of the Day</a>
</header>
<h2>Sequential Bible Viewer</h2>
<p>In order to use this, you first need a UID, which you
can get by querying /seq?getuid=true and optionally include
&start=BIBLEREF (where BIBLEREF is like 1Cor2:1) to set
a start position other than Genesis 1:1.</p>
<p>After you have your UID, this will keep track of where you
are at. Query /seq?uid=YOURUID and optionally include
&num=# (where # is an integer of how many verses you want to
include from your current position at a time)</p>
<p>The &view= argument works with this.<p>
<p>In order to use this, you first need a UID, which you can get by querying <code>/seq?getuid=true</code> and optionally include <code>&start=BIBLEREF</code> (where BIBLEREF is like 1Cor2:1) to set a start position other than Genesis 1:1.</p>
<p>After you have your UID, this will keep track of where you are at. Query <code>/seq?uid=YOURUID</code> and optionally include <code>&num=#</code> (where # is an integer of how many verses you want to include from your current position at a time)</p>
<p>The <code>&view=</code> argument works with this.</p>
<h4>Example Pleroma Bot shell script</h4>
<pre>
<code>
#!/bin/sh
<pre><code>#!/bin/sh
verse=$(curl -XGET https://api.1611.social/seq?uid=MYUID?view=plain);
curl -XPOST -u biblebot:MYPASSWORD \
-H "Content-Type: application/json" \
-d '{"status": "'"${verse}"'"}' \
https://my.fediverse.tld/api/v1/statuses;
</code>
</pre>
<style>
html{
font-family: sans-serif;
font-size: 14pt;
width: 768px;
}
a {
color: #547720
}
</style>
</code></pre>
</body>
</html>
+27 -14
View File
@@ -1,18 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Show Verse - KJV API</title>
<link rel="stylesheet" href="/styles/page.css">
<style>body{background-color:#1a1a1a}</style>
</head>
<body>
<header>
<a href="/">Home</a> | <a href="/find">Quick Search</a> | <a href="/show">Show Verse</a> |
<a href="/random?view=rich">Random Verse</a> | <a href="/votd?view=rich">Verse of the Day</a>
</header>
<h2>Show Verse</h2>
<form action="/show">
<label for='kw'>Verse References</label><br>
<input type="text" name="kw"><br><br>
<label for='view'>View<label><br>
<input type="radio" name="view" value="rich" checked="checked">Rich<br>
<input type="radio" name="view" value="plain">Plain<br>
<input type="radio" name="view" value="json">JSON<br>
<input type="submit">
<form>
<label for='kw'>Verse References</label>
<input type="text" name="kw" placeholder="e.g., 1 John 5:7 or John3:16,2Peter2:1">
<label for='view'>View</label>
<input type="radio" name="view" value="rich" checked="checked"> Rich
<input type="radio" name="view" value="plain"> Plain
<input type="radio" name="view" value="json"> JSON
<input type="submit" value="Show">
</form>
<hr>
<p>You can try to search a Bible reference in this box, such as "1 John 5:7".</p>
<p>You can search a Bible reference in this box, such as "1 John 5:7".</p>
<p>You can use abbreviations, but you may not get the result you are looking for.</p>
<p>Use a dash for the verse to get the entire chapter, eg. "John 3:-"<p>
<p>You may return multiple verse groups by using a comma, eg. "John3:16,2Peter2:1"</p>
<p>Use a dash for the verse to get the entire chapter, e.g., "John 3:-"</p>
<p>You may return multiple verse groups by using a comma, e.g., "John3:16,2Peter2:1"</p>
</body>
</html>