a597e2be07
- 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.
273 lines
6.5 KiB
HTML
273 lines
6.5 KiB
HTML
|
|
<!DOCTYPE html>
|
|
<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>
|
|
/* 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;
|
|
}
|
|
|
|
html {
|
|
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: var(--color-link);
|
|
text-decoration: none;
|
|
transition: color var(--transition-fast);
|
|
}
|
|
|
|
a:hover {
|
|
color: var(--color-link-hover);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
input[type=text] {
|
|
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=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: 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;
|
|
}
|
|
|
|
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>
|
|
|
|
<h1>KJV API (Legacy edition)</h1>
|
|
|
|
<form action="/find">
|
|
<label for='kw'>Keyword Search</label><br>
|
|
<input type="text" name="kw"><br><br>
|
|
<input type="hidden" name="view" value="rich"">
|
|
<input type="submit">
|
|
<form>
|
|
|
|
|
|
<pre>
|
|
<code>
|
|
API ENDPOINT SPECIFICATION v 0.3
|
|
================================
|
|
|
|
<a href="/find">
|
|
/find</a> - Tries to show a verse, if it's not a verse
|
|
it will try to search your query. If it's a
|
|
single query it will try to find a definition
|
|
for the word as well. Only avaliable in "Rich"
|
|
and meant for interactive use/browsing
|
|
<a href="/random">/random</a> - outputs a random verse
|
|
<a href="/votd">/votd</a> - returns verse of the day
|
|
<a href="/search">/search</a> - returns a keyword search result set
|
|
<a href="/show">/show</a> - returns a verse or set of verses by name/location
|
|
<a href="/define">/define</a> - 1828 Noah Webster dictionary search
|
|
<a href="/seq">/seq</a> - Incremental sequence of Bible verses (per request)
|
|
|
|
URL PARAMETERS
|
|
==============
|
|
view=
|
|
- json - json-encoded response
|
|
- plain - plaintext response
|
|
- rich - pretty response with css
|
|
default: json
|
|
|
|
kw=
|
|
- Used with /search /show/ /define /find
|
|
- The keyword(s) of your query, separated by commas
|
|
-- ex ?kw=1cor5:1-5,2Peter2:5
|
|
|
|
getuid=
|
|
- Used only with /seq
|
|
- Set this to "true" to recieve a new UID for use with /seq?uid=
|
|
|
|
start=
|
|
- Used only with /seq
|
|
- You can use a ref like "1Cor5:1" to start there
|
|
instead of Genesis 1:1 as is the default
|
|
- Only used when creating a new UID
|
|
- If you want to "start in a new place" - just create a new UID
|
|
|
|
uid=
|
|
- Used only with /seq
|
|
- Required parameter for normal use of /seq
|
|
|
|
num=
|
|
- Used only with /seq
|
|
- You can get the "next # verses" in your sequence
|
|
|
|
FEATURES
|
|
========
|
|
- King James Only. (No heretical commentaries or false Bibles)
|
|
- High quality source documents
|
|
- Free
|
|
- Developer hates the sodomites
|
|
|
|
INTERACTIVE ENDPOINTS
|
|
=====================
|
|
The following endpoints will present you with a query box and
|
|
radio selector for choosing your output format.
|
|
- / (same function as /find)
|
|
- /search
|
|
- /define
|
|
- /show
|
|
|
|
|
|
EXAMPLES
|
|
========
|
|
api.tld/random
|
|
api.tld/votd?view=rich
|
|
api.tld/show?kw=john3:16,1john5:7&view=plain
|
|
|
|
BUGS
|
|
====
|
|
Suggestions, bug reports or improvements can be reported to <a href="https://1611.social/@tyler">@tyler@1611.social</a>
|
|
</code>
|
|
</pre>
|
|
</html>
|