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:
@@ -1,2 +1,5 @@
|
|||||||
logs/*.log
|
logs/*.log
|
||||||
*__pycache__*
|
*__pycache__*
|
||||||
|
data/shortcodes.db
|
||||||
|
data/seq.db
|
||||||
|
data/sermons.db
|
||||||
|
|||||||
@@ -134,6 +134,10 @@ def serve_shortcode_js():
|
|||||||
def serve_collapsible_js():
|
def serve_collapsible_js():
|
||||||
return Response(cached.get("js_collapsible"), mimetype='application/javascript')
|
return Response(cached.get("js_collapsible"), mimetype='application/javascript')
|
||||||
|
|
||||||
|
@app.get("/styles/page.css")
|
||||||
|
def serve_page_css():
|
||||||
|
return send_file("styles/page.css", mimetype='text/css')
|
||||||
|
|
||||||
def generate_short_id():
|
def generate_short_id():
|
||||||
remain = random.randrange(614_656, 17_210_367) # resolves to length of 5
|
remain = random.randrange(614_656, 17_210_367) # resolves to length of 5
|
||||||
chars = "0123456789ACEFHJKLMNPRTUVWXY"
|
chars = "0123456789ACEFHJKLMNPRTUVWXY"
|
||||||
@@ -604,7 +608,7 @@ def show(kw=None, get_start_verse_id=False, human_readable=False):
|
|||||||
if arg_view == "plain":
|
if arg_view == "plain":
|
||||||
response = "<br>".join(response_list)
|
response = "<br>".join(response_list)
|
||||||
elif arg_view == "rich" or human_readable:
|
elif arg_view == "rich" or human_readable:
|
||||||
response = "<br>".join(response_list)
|
response = "".join(response_list)
|
||||||
else:
|
else:
|
||||||
response = jsonify(response_list)
|
response = jsonify(response_list)
|
||||||
return response
|
return response
|
||||||
@@ -670,8 +674,8 @@ def scripture_response(scriptures, human_readable=False):
|
|||||||
)
|
)
|
||||||
|
|
||||||
response.append(cached["css_navbar"])
|
response.append(cached["css_navbar"])
|
||||||
response.append("<div class='responses'")
|
response.append("<div class='responses'>")
|
||||||
response.append(f"{len(scriptures)} Results")
|
response.append(f"<div class='results-count'>{len(scriptures)} Results</div>")
|
||||||
for scripture in scriptures:
|
for scripture in scriptures:
|
||||||
response.append(response_rich(scripture))
|
response.append(response_rich(scripture))
|
||||||
response.append("</div>")
|
response.append("</div>")
|
||||||
@@ -720,7 +724,7 @@ def random_verse():
|
|||||||
if arg_view == "plain":
|
if arg_view == "plain":
|
||||||
response = "<br>".join(response_list)
|
response = "<br>".join(response_list)
|
||||||
elif arg_view == "rich":
|
elif arg_view == "rich":
|
||||||
response = "<br>".join(response_list)
|
response = "".join(response_list)
|
||||||
else:
|
else:
|
||||||
response = jsonify(response_list)
|
response = jsonify(response_list)
|
||||||
#logging.debug(f"Search Response: {response}")
|
#logging.debug(f"Search Response: {response}")
|
||||||
@@ -741,7 +745,7 @@ def verse_of_the_day():
|
|||||||
if arg_view == "plain":
|
if arg_view == "plain":
|
||||||
response = "<br>".join(response_list)
|
response = "<br>".join(response_list)
|
||||||
elif arg_view == "rich":
|
elif arg_view == "rich":
|
||||||
response = "<br>".join(response_list)
|
response = "".join(response_list)
|
||||||
else:
|
else:
|
||||||
response = jsonify(response_list)
|
response = jsonify(response_list)
|
||||||
#logging.debug(f"Search Response: {response}")
|
#logging.debug(f"Search Response: {response}")
|
||||||
@@ -781,7 +785,7 @@ def search():
|
|||||||
if arg_view == "plain":
|
if arg_view == "plain":
|
||||||
response = "<br>".join(response_list)
|
response = "<br>".join(response_list)
|
||||||
elif arg_view == "rich":
|
elif arg_view == "rich":
|
||||||
response = "<br>".join(response_list)
|
response = "".join(response_list)
|
||||||
else:
|
else:
|
||||||
response = jsonify(response_list)
|
response = jsonify(response_list)
|
||||||
#logging.debug(f"Search Response: {response}")
|
#logging.debug(f"Search Response: {response}")
|
||||||
@@ -935,8 +939,10 @@ def sequential_read(start=0, num=1, uid=None, getuid=False):
|
|||||||
# only look at a small set of the oldest unused entries.
|
# only look at a small set of the oldest unused entries.
|
||||||
seq_conn.commit()
|
seq_conn.commit()
|
||||||
arg_view = request.args.get("view", None)
|
arg_view = request.args.get("view", None)
|
||||||
if arg_view == "plain" or arg_view == "rich":
|
if arg_view == "plain":
|
||||||
response = "<br>".join(response_list)
|
response = "<br>".join(response_list)
|
||||||
|
elif arg_view == "rich":
|
||||||
|
response = "".join(response_list)
|
||||||
else:
|
else:
|
||||||
response = jsonify(response_list)
|
response = jsonify(response_list)
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
+24
-21
@@ -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>
|
<h2>Bible Dictionary</h2>
|
||||||
<form action="/define">
|
<form action="/define">
|
||||||
<label for='kw'>Word lookup</label><br>
|
<label for='kw'>Word lookup</label>
|
||||||
<input type="text" name="kw"><br><br>
|
<input type="text" name="kw" placeholder="Enter a word to define...">
|
||||||
|
<label for='view'>View</label>
|
||||||
<label for='view'>View<label><br>
|
<input type="radio" name="view" value="rich" checked="checked"> Rich
|
||||||
<input type="radio" name="view" value="rich" checked="checked">Rich<br>
|
<input type="radio" name="view" value="plain"> Plain
|
||||||
<input type="radio" name="view" value="plain">Plain<br>
|
<input type="radio" name="view" value="json"> JSON
|
||||||
<input type="radio" name="view" value="json">JSON<br>
|
<input type="submit" value="Define">
|
||||||
|
</form>
|
||||||
<input type="submit">
|
|
||||||
<form>
|
|
||||||
<p>This tool uses an abridged 1828 Noah Webster dictionary.</p>
|
<p>This tool uses an abridged 1828 Noah Webster dictionary.</p>
|
||||||
|
</body>
|
||||||
<style>
|
</html>
|
||||||
html{
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 14pt;
|
|
||||||
width: 768px;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: #547720
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
+19
-19
@@ -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>
|
<header>
|
||||||
<a href="/">Home</a> | <a href="/find">Quick Search</a> |
|
<a href="/">Home</a> | <a href="/find">Quick Search</a> |
|
||||||
<a href="/random?view=rich">Random Verse</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>
|
<h2>Quick Search</h2>
|
||||||
<form action="/find">
|
<form action="/find">
|
||||||
<label for='kw'>Query</label><br>
|
<label for='kw'>Query</label>
|
||||||
<input type="text" name="kw"><br><br>
|
<input type="text" name="kw" placeholder="Enter verse reference or keywords...">
|
||||||
|
<input type="hidden" name="view" value="rich">
|
||||||
<input type="hidden" name="view" value="rich"><br>
|
<input type="submit" value="Search">
|
||||||
|
</form>
|
||||||
<input type="submit">
|
</body>
|
||||||
<form>
|
</html>
|
||||||
|
|
||||||
<style>
|
|
||||||
html{
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 14pt;
|
|
||||||
width: 768px;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: #547720
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
+154
-49
@@ -1,77 +1,182 @@
|
|||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<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>
|
<style>
|
||||||
/* Dark Theme */
|
/* Modern KJV API Styling - Index Page */
|
||||||
body {
|
|
||||||
background-color: #222;
|
:root {
|
||||||
color: #fff;
|
--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 {
|
html {
|
||||||
font-family: sans-serif;
|
font-family: var(--font-ui);
|
||||||
font-size: 14.5pt;
|
font-size: 16px;
|
||||||
width: 768px;
|
}
|
||||||
padding: 1px;
|
|
||||||
margin-top: 15px;
|
.container {
|
||||||
color: #fff; /* Text color */
|
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 {
|
a {
|
||||||
color: #007bff; /* Link color */
|
color: var(--color-link);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color var(--transition-fast);
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
a:hover {
|
||||||
font-family: sans-serif;
|
color: var(--color-link-hover);
|
||||||
padding: 10px 16px;
|
text-decoration: underline;
|
||||||
background: #333; /* Dark background */
|
|
||||||
color: #fff; /* Text color */
|
|
||||||
position: fixed;
|
|
||||||
top: 5px;
|
|
||||||
width: 768px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=text] {
|
input[type=text] {
|
||||||
width: 75%;
|
width: 100%;
|
||||||
padding: 12px 20px;
|
padding: var(--space-sm) var(--space-md);
|
||||||
margin: 8px 0;
|
margin: var(--space-sm) 0;
|
||||||
box-sizing: border-box;
|
font-size: 1rem;
|
||||||
text-align: left;
|
font-family: var(--font-ui);
|
||||||
font-size: 14.5pt;
|
background-color: var(--color-bg-tertiary);
|
||||||
background-color: #333; /* Dark background */
|
color: var(--color-text-primary);
|
||||||
color: #fff; /* Text color */
|
border: 2px solid var(--color-border);
|
||||||
border: 1px solid #555; /* Border color */
|
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] {
|
input[type=text]:focus {
|
||||||
font-family: sans-serif;
|
outline: none;
|
||||||
background-color: #555; /* Dark button background */
|
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;
|
border: none;
|
||||||
color: #fff; /* Button text color */
|
color: var(--color-bg-primary);
|
||||||
padding: 16px 32px;
|
padding: var(--space-sm) var(--space-lg);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin: 4px 2px;
|
margin: var(--space-sm) 0;
|
||||||
cursor: pointer;
|
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 {
|
code {
|
||||||
background-color: #222;
|
background-color: var(--color-bg-tertiary);
|
||||||
color: #fff;
|
color: var(--color-text-primary);
|
||||||
padding: 4px 8px;
|
padding: 2px 6px;
|
||||||
border-radius: 4px;
|
border-radius: var(--border-radius-sm);
|
||||||
font-family: monospace;
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.definition {
|
pre {
|
||||||
padding: 8px;
|
background-color: var(--color-bg-secondary);
|
||||||
font-family: sans-serif;
|
border: 1px solid var(--color-border);
|
||||||
font-size: 14.5pt;
|
border-radius: var(--border-radius);
|
||||||
width: 768px;
|
padding: var(--space-lg);
|
||||||
padding: 1px;
|
overflow-x: auto;
|
||||||
color: #fff; /* Text color */
|
line-height: 1.6;
|
||||||
background-color: #222; /* Dark background */
|
}
|
||||||
|
|
||||||
|
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>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
+4
-1
@@ -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
@@ -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>
|
<h2>Bible Search</h2>
|
||||||
<form action="/search">
|
<form action="/search">
|
||||||
<label for='kw'>Key Words</label><br>
|
<label for='kw'>Key Words</label>
|
||||||
<input type="text" name="kw"><br><br>
|
<input type="text" name="kw" placeholder="Enter search keywords...">
|
||||||
|
<label for='view'>View</label>
|
||||||
<label for='view'>View<label><br>
|
<input type="radio" name="view" value="rich" checked="checked"> Rich
|
||||||
<input type="radio" name="view" value="rich" checked="checked">Rich<br>
|
<input type="radio" name="view" value="plain"> Plain
|
||||||
<input type="radio" name="view" value="plain">Plain<br>
|
<input type="radio" name="view" value="json"> JSON
|
||||||
<input type="radio" name="view" value="json">JSON<br>
|
<input type="submit" value="Search">
|
||||||
|
</form>
|
||||||
<input type="submit">
|
|
||||||
<form>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<p>You can use standard search operators such as <b>AND</b>, <b>OR</b>, and <b>NOT</b>.</p>
|
<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>Such as: "reprobate <b>NOT</b> silver".</p>
|
||||||
<p>Multiple word queries without operators will be assumed to be AND.<p>
|
<p>Multiple word queries without operators will be assumed to be AND.</p>
|
||||||
|
</body>
|
||||||
<style>
|
</html>
|
||||||
html{
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 14pt;
|
|
||||||
width: 768px;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: #547720
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
+20
-32
@@ -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>
|
<header>
|
||||||
<a href="/">Home</a> | <a href="/find">Quick Search</a> |
|
<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="/random?view=rich">Random Verse</a> | <a href="/votd?view=rich">Verse of the Day</a>
|
||||||
<a href="/votd?view=rich">Verse of the Day</a></header>
|
</header>
|
||||||
|
|
||||||
<h2>Sequential Bible Viewer</h2>
|
<h2>Sequential Bible Viewer</h2>
|
||||||
<p>In order to use this, you first need a UID, which you
|
<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>
|
||||||
can get by querying /seq?getuid=true and optionally include
|
<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>
|
||||||
&start=BIBLEREF (where BIBLEREF is like 1Cor2:1) to set
|
<p>The <code>&view=</code> argument works with this.</p>
|
||||||
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>
|
|
||||||
|
|
||||||
<h4>Example Pleroma Bot shell script</h4>
|
<h4>Example Pleroma Bot shell script</h4>
|
||||||
<pre>
|
<pre><code>#!/bin/sh
|
||||||
<code>
|
|
||||||
#!/bin/sh
|
|
||||||
verse=$(curl -XGET https://api.1611.social/seq?uid=MYUID?view=plain);
|
verse=$(curl -XGET https://api.1611.social/seq?uid=MYUID?view=plain);
|
||||||
curl -XPOST -u biblebot:MYPASSWORD \
|
curl -XPOST -u biblebot:MYPASSWORD \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"status": "'"${verse}"'"}' \
|
-d '{"status": "'"${verse}"'"}' \
|
||||||
https://my.fediverse.tld/api/v1/statuses;
|
https://my.fediverse.tld/api/v1/statuses;
|
||||||
</code>
|
</code></pre>
|
||||||
</pre>
|
</body>
|
||||||
|
</html>
|
||||||
<style>
|
|
||||||
html{
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 14pt;
|
|
||||||
width: 768px;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: #547720
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
+27
-14
@@ -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>
|
<h2>Show Verse</h2>
|
||||||
<form action="/show">
|
<form action="/show">
|
||||||
<label for='kw'>Verse References</label><br>
|
<label for='kw'>Verse References</label>
|
||||||
<input type="text" name="kw"><br><br>
|
<input type="text" name="kw" placeholder="e.g., 1 John 5:7 or John3:16,2Peter2:1">
|
||||||
|
<label for='view'>View</label>
|
||||||
<label for='view'>View<label><br>
|
<input type="radio" name="view" value="rich" checked="checked"> Rich
|
||||||
<input type="radio" name="view" value="rich" checked="checked">Rich<br>
|
<input type="radio" name="view" value="plain"> Plain
|
||||||
<input type="radio" name="view" value="plain">Plain<br>
|
<input type="radio" name="view" value="json"> JSON
|
||||||
<input type="radio" name="view" value="json">JSON<br>
|
<input type="submit" value="Show">
|
||||||
|
</form>
|
||||||
<input type="submit">
|
|
||||||
<form>
|
|
||||||
|
|
||||||
<hr>
|
<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>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>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, eg. "John3:16,2Peter2:1"</p>
|
<p>You may return multiple verse groups by using a comma, e.g., "John3:16,2Peter2:1"</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
+41
-12
@@ -1,25 +1,54 @@
|
|||||||
/* Style the button that is used to open and close the collapsible content */
|
/* Modern Collapsible Styling */
|
||||||
|
|
||||||
.collapsible {
|
.collapsible {
|
||||||
background-color: #eee;
|
background-color: #2f2f2f;
|
||||||
color: #444;
|
color: #e8e8e8;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 18px;
|
padding: 1rem 1.25rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: none;
|
max-width: 820px;
|
||||||
|
border: 2px solid #3a3a3a;
|
||||||
|
border-radius: 4px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
outline: none;
|
outline: none;
|
||||||
font-size: 15px;
|
font-size: 1rem;
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||||
|
transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
|
||||||
|
margin: 0.5rem auto;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
|
.collapsible:hover {
|
||||||
.active, .collapsible:hover {
|
background-color: #3a3a3a;
|
||||||
background-color: #ccc;
|
border-color: #6b9bd1;
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Style the collapsible content. Note: hidden by default */
|
.collapsible.active {
|
||||||
|
background-color: #6b9bd1;
|
||||||
|
color: #1a1a1a;
|
||||||
|
border-color: #6b9bd1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collapsible.active:hover {
|
||||||
|
background-color: #85aede;
|
||||||
|
border-color: #85aede;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Collapsible content styling */
|
||||||
.content {
|
.content {
|
||||||
padding: 0 18px;
|
padding: 0 1.25rem;
|
||||||
display: none;
|
display: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #f1f1f1;
|
background-color: #252525;
|
||||||
|
max-width: 820px;
|
||||||
|
margin: 0 auto 0.5rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #3a3a3a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content.show {
|
||||||
|
display: block;
|
||||||
|
padding: 1rem 1.25rem;
|
||||||
}
|
}
|
||||||
|
|||||||
+254
-49
@@ -1,70 +1,275 @@
|
|||||||
<style>
|
<style>
|
||||||
/* Dark Theme */
|
/* Modern KJV API Styling - Header & Layout */
|
||||||
|
|
||||||
|
:root {
|
||||||
|
/* Color Palette */
|
||||||
|
--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);
|
||||||
|
|
||||||
|
/* Typography */
|
||||||
|
--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;
|
||||||
|
|
||||||
|
/* Spacing */
|
||||||
|
--space-xs: 0.25rem;
|
||||||
|
--space-sm: 0.5rem;
|
||||||
|
--space-md: 1rem;
|
||||||
|
--space-lg: 1.5rem;
|
||||||
|
--space-xl: 2rem;
|
||||||
|
--space-2xl: 3rem;
|
||||||
|
|
||||||
|
/* Layout */
|
||||||
|
--content-max-width: 820px;
|
||||||
|
--header-height: 160px;
|
||||||
|
--border-radius: 8px;
|
||||||
|
--border-radius-sm: 4px;
|
||||||
|
|
||||||
|
/* Transitions */
|
||||||
|
--transition-fast: 150ms ease;
|
||||||
|
--transition-normal: 250ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #222;
|
background-color: var(--color-bg-primary);
|
||||||
color: #fff;
|
color: var(--color-text-primary);
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: var(--font-ui);
|
||||||
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Style the header */
|
/* Header Styling */
|
||||||
|
.header {
|
||||||
|
font-family: var(--font-ui);
|
||||||
|
padding: var(--space-lg);
|
||||||
|
background: linear-gradient(to bottom, var(--color-bg-secondary), var(--color-bg-tertiary));
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 1000;
|
||||||
|
box-shadow: 0 4px 12px var(--color-shadow);
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header a {
|
||||||
|
color: var(--color-link);
|
||||||
|
text-decoration: none;
|
||||||
|
padding: var(--space-xs) var(--space-sm);
|
||||||
|
transition: color var(--transition-fast);
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header a:hover {
|
||||||
|
color: var(--color-link-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Response Container */
|
||||||
.responses {
|
.responses {
|
||||||
font-family: sans-serif;
|
font-family: var(--font-scripture);
|
||||||
font-size: 14.5pt;
|
font-size: 1.125rem;
|
||||||
width: 768px;
|
line-height: 1.8;
|
||||||
padding: 1px;
|
max-width: var(--content-max-width);
|
||||||
margin-top: 100px;
|
margin: 0 auto;
|
||||||
color: #fff; /* Text color */
|
padding: var(--space-md);
|
||||||
width: auto;
|
margin-top: var(--header-height);
|
||||||
max-width: 100%; /* Ensure it doesn't exceed the container width */
|
color: var(--color-text-primary);
|
||||||
white-space: pre-wrap; /* Allow word wrapping */
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Results Count */
|
||||||
|
.results-count {
|
||||||
|
font-family: var(--font-ui);
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
margin-bottom: var(--space-md);
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Links */
|
||||||
a {
|
a {
|
||||||
color: #007bff; /* Link color */
|
color: var(--color-link);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color var(--transition-fast);
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: var(--color-link-hover);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Form Inputs */
|
||||||
|
input[type=text] {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 500px;
|
||||||
|
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=text]:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--color-accent-primary);
|
||||||
|
box-shadow: 0 0 0 3px rgba(107, 155, 209, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=text]::placeholder {
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
input[type=button],
|
||||||
|
input[type=submit],
|
||||||
|
input[type=reset],
|
||||||
|
button {
|
||||||
|
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-xs) var(--space-sm);
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: var(--border-radius-sm);
|
||||||
|
transition: background-color var(--transition-fast), transform var(--transition-fast);
|
||||||
|
font-size: 0.95rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=button]:hover,
|
||||||
|
input[type=submit]:hover,
|
||||||
|
input[type=reset]:hover,
|
||||||
|
button:hover {
|
||||||
|
background-color: var(--color-accent-hover);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=button]:active,
|
||||||
|
input[type=submit]:active,
|
||||||
|
input[type=reset]:active,
|
||||||
|
button:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Definition Styling */
|
||||||
|
.definition {
|
||||||
|
padding: var(--space-lg);
|
||||||
|
font-family: var(--font-scripture);
|
||||||
|
font-size: 1.05rem;
|
||||||
|
line-height: 1.7;
|
||||||
|
max-width: var(--content-max-width);
|
||||||
|
margin: var(--space-md) auto;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
background-color: var(--color-bg-secondary);
|
||||||
|
border-left: 4px solid var(--color-accent-primary);
|
||||||
|
border-radius: var(--border-radius-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Verse Container Styling */
|
||||||
|
.verse-container {
|
||||||
|
background-color: var(--color-bg-secondary);
|
||||||
|
border-left: 3px solid var(--color-accent-primary);
|
||||||
|
border-radius: var(--border-radius-sm);
|
||||||
|
padding: 0.75rem 1.25rem;
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
transition: background-color var(--transition-fast), border-color var(--transition-fast);
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.verse-container:hover {
|
||||||
|
background-color: var(--color-bg-tertiary);
|
||||||
|
border-left-color: var(--color-accent-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.verse-reference {
|
||||||
|
font-family: var(--font-ui);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
line-height: 1.2;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.verse-reference a {
|
||||||
|
color: var(--color-accent-primary);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color var(--transition-fast);
|
||||||
|
}
|
||||||
|
|
||||||
|
.verse-reference a:hover {
|
||||||
|
color: var(--color-accent-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.verse-text {
|
||||||
|
font-family: var(--font-scripture);
|
||||||
|
font-size: 1.15rem;
|
||||||
|
line-height: 1.8;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
text-indent: 0;
|
||||||
|
margin: 0.35rem 0 0 0;
|
||||||
|
padding: 0;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive Design */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
:root {
|
||||||
|
--header-height: 180px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
font-family: sans-serif;
|
padding: var(--space-md);
|
||||||
padding: 10px 16px;
|
}
|
||||||
background: #333; /* Dark background */
|
|
||||||
color: #fff; /* Text color */
|
.responses {
|
||||||
position: fixed;
|
font-size: 1rem;
|
||||||
top: 5px;
|
padding: var(--space-md);
|
||||||
width: 98vw;
|
|
||||||
max-width: 100%; /* Ensure it doesn't exceed the container width */
|
|
||||||
min-height: 50px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=text] {
|
input[type=text] {
|
||||||
width: 75%;
|
max-width: 100%;
|
||||||
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 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=button], input[type=submit], input[type=reset] {
|
@media (max-width: 480px) {
|
||||||
font-family: sans-serif;
|
.header a {
|
||||||
background-color: #555; /* Dark button background */
|
font-size: 0.9rem;
|
||||||
border: none;
|
padding: var(--space-xs);
|
||||||
color: #fff; /* Button text color */
|
|
||||||
padding: 16px 32px;
|
|
||||||
text-decoration: none;
|
|
||||||
margin: 4px 2px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.definition {
|
input[type=button],
|
||||||
padding: 8px;
|
input[type=submit],
|
||||||
font-family: sans-serif;
|
input[type=reset],
|
||||||
font-size: 14.5pt;
|
button {
|
||||||
width: 768px;
|
padding: var(--space-sm) var(--space-md);
|
||||||
padding: 1px;
|
font-size: 0.9rem;
|
||||||
color: #fff; /* Text color */
|
}
|
||||||
background-color: #222; /* Dark background */
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,10 +1,66 @@
|
|||||||
<style>
|
<style>
|
||||||
.testhtml{
|
/* Modern KJV API Styling - Human Readable */
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 14.5pt;
|
:root {
|
||||||
width: 768px;
|
/* Color Palette */
|
||||||
|
--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);
|
||||||
|
|
||||||
|
/* Typography */
|
||||||
|
--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;
|
||||||
|
|
||||||
|
/* Spacing */
|
||||||
|
--space-xs: 0.25rem;
|
||||||
|
--space-sm: 0.5rem;
|
||||||
|
--space-md: 1rem;
|
||||||
|
--space-lg: 1.5rem;
|
||||||
|
--space-xl: 2rem;
|
||||||
|
--space-2xl: 3rem;
|
||||||
|
|
||||||
|
/* Layout */
|
||||||
|
--content-max-width: 820px;
|
||||||
|
--border-radius: 8px;
|
||||||
|
--border-radius-sm: 4px;
|
||||||
|
|
||||||
|
/* Transitions */
|
||||||
|
--transition-fast: 150ms ease;
|
||||||
|
--transition-normal: 250ms ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.testhtml {
|
||||||
|
font-family: var(--font-scripture);
|
||||||
|
font-size: 1.125rem;
|
||||||
|
line-height: 1.75;
|
||||||
|
max-width: var(--content-max-width);
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: var(--space-md);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #547720
|
color: var(--color-link);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color var(--transition-fast);
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: var(--color-link-hover);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: var(--color-accent-primary);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+133
@@ -0,0 +1,133 @@
|
|||||||
|
/* Shared Page Styling for Simple Pages */
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--color-bg-primary: #1a1a1a;
|
||||||
|
--color-bg-secondary: #252525;
|
||||||
|
--color-text-primary: #e8e8e8;
|
||||||
|
--color-text-secondary: #b8b8b8;
|
||||||
|
--color-accent-primary: #6b9bd1;
|
||||||
|
--color-accent-hover: #85aede;
|
||||||
|
--color-link: #6b9bd1;
|
||||||
|
--color-link-hover: #85aede;
|
||||||
|
--color-border: #3a3a3a;
|
||||||
|
--font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||||
|
--border-radius-sm: 4px;
|
||||||
|
--border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
background-color: var(--color-bg-primary);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
margin: 0;
|
||||||
|
padding: 1.5rem;
|
||||||
|
font-family: var(--font-ui);
|
||||||
|
line-height: 1.6;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
max-width: 820px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4 {
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 2rem;
|
||||||
|
border-bottom: 2px solid var(--color-border);
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--color-link);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 150ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: var(--color-link-hover);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
padding-bottom: 1rem;
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
background-color: var(--color-bg-secondary);
|
||||||
|
padding: 1.5rem;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
margin: 1.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=text] {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0.75rem;
|
||||||
|
margin: 0.5rem 0 1rem 0;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-family: var(--font-ui);
|
||||||
|
background-color: var(--color-bg-primary);
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
border: 2px solid var(--color-border);
|
||||||
|
border-radius: var(--border-radius-sm);
|
||||||
|
transition: border-color 150ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=text]:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--color-accent-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=radio] {
|
||||||
|
margin-right: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=submit], button {
|
||||||
|
background-color: var(--color-accent-primary);
|
||||||
|
color: var(--color-bg-primary);
|
||||||
|
border: none;
|
||||||
|
padding: 0.75rem 1.5rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 600;
|
||||||
|
border-radius: var(--border-radius-sm);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 150ms ease, transform 150ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=submit]:hover, button:hover {
|
||||||
|
background-color: var(--color-accent-hover);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border: none;
|
||||||
|
border-top: 1px solid var(--color-border);
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 1rem 0;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
b, strong {
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
@@ -10,9 +10,13 @@ def check_sanity():
|
|||||||
|
|
||||||
|
|
||||||
def check_database_permissions():
|
def check_database_permissions():
|
||||||
|
from os.path import exists
|
||||||
dependancies = ['data/seq.db', "data/shortcodes.db"]
|
dependancies = ['data/seq.db', "data/shortcodes.db"]
|
||||||
current_uid = getuid()
|
current_uid = getuid()
|
||||||
for dependancy in dependancies:
|
for dependancy in dependancies:
|
||||||
|
# Skip check if file doesn't exist yet - SQLite will create it on first use
|
||||||
|
if not exists(dependancy):
|
||||||
|
continue
|
||||||
if stat(dependancy).st_uid != current_uid:
|
if stat(dependancy).st_uid != current_uid:
|
||||||
raise PermissionError(dependancy)
|
raise PermissionError(dependancy)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user