Skip to content

Commit 755ec03

Browse files
committed
Added functionality for viewing highlighted
verses. Also add URL navigation and fixed some minor bugs.
1 parent 6f19518 commit 755ec03

33 files changed

Lines changed: 1776 additions & 271 deletions

404.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Redirecting...</title>
6+
<script>
7+
// Single Page App support for GitHub Pages
8+
const segmentCount = 0;
9+
const l = window.location;
10+
l.replace(
11+
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
12+
l.pathname.split('/').slice(0, 1 + segmentCount).join('/') + '/?p=/' +
13+
l.pathname.slice(1).split('/').slice(segmentCount).join('/').replace(/&/g, '~and~') +
14+
(l.search ? '&q=' + l.search.slice(1).replace(/&/g, '~and~') : '') +
15+
l.hash
16+
);
17+
</script>
18+
</head>
19+
<body>
20+
<p>Redirecting...</p>
21+
</body>
22+
</html>

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ Access the site here: [https://provinent.org](https://provinent.org)
99

1010
### Core Functionality
1111
- **Daily Scripture Passages**: Get a new passage daily with sequential or book-specific reading plans
12-
- **Multi-Translation Support**: NASB 1995, NASB 2020, ASV, KJV, ESV, GNV, BSB, NET, CSB, NIV, NKJV, and NLT
12+
- **Multi-Translation Support**: ASV, KJV, GNV, BSB, NET
1313
- **Verse Highlighting**: Right-click verses to highlight in 6 different colors for study emphasis
1414
- **Study Notes**: Full Markdown support with live preview and export capabilities
15-
- **Original Language Tools**: Click any verse for Strong's Concordance data and Greek/Hebrew interlinear analysis
16-
- **Reference Panel**: Side-by-side Bible comparison with multiple translation options
15+
- **Original Language Tools**: Click any verse for Strong's Concordance data (provided by [STEP Bible](https://www.stepbible.org))and Greek/Hebrew interlinear analysis (provided by [Bible Hub](https://biblehub.com/interlinear/))
16+
- **Reference Panel**: Side-by-side Bible comparison with multiple translation options (NASB 1995, NASB 2020, ASV, KJV, ESV, GNV, BSB, NET, CSB, NIV, NKJV, and NLT)
1717

1818
### Advanced Features
1919
- **Offline PDF Support**: Upload Berean Standard Bible PDFs for offline reading
2020
- **Reading Plans**: 90-day sequential and book-specific plans (Genesis, Psalms, Proverbs, etc.)
21-
- **Search Integration**: Built-in Bible Gateway search functionality
21+
- **Search Integration**: Built-in [Bible Gateway search](https://www.biblegateway.com/usage/) functionality
2222
- **Data Management**: Import/export highlights and notes, local storage persistence
23-
- **Responsive Design**: Works on desktops and tablets, mobile devices work but are not recommended
23+
- **Responsive Design**: Useable on desktops and tablets, mobile devices work but are not recommended
2424
- **Dark/Light Mode**: Toggle between color themes with multiple accent color options
2525

2626
### Study Resources Integration
27-
The sidebar provides organized access to extensive theological resources including:
27+
The sidebar provides organized access to extensive theological resources (Reformed Theology/Calvinism focused) including:
2828
- Online Bible platforms
2929
- Christian doctrine references
3030
- Theological resources
@@ -48,7 +48,7 @@ The sidebar provides organized access to extensive theological resources includi
4848
2. Serve the files through any web server (no server-side processing required)
4949
3. Open `index.html` in a web browser
5050

51-
### Optional PDF Setup
51+
### Optional PDF Import
5252
For an offline Bible:
5353
1. Download a Berean Standard Bible PDF from the provided links
5454
2. Upload via the settings panel
@@ -57,15 +57,15 @@ For an offline Bible:
5757
## Usage
5858

5959
### Basic Navigation
60-
- Use Prev/Next buttons to navigate reading plan passages
60+
- Use Prev/Next buttons to navigate passages
6161
- Select specific books/chapters from dropdown menus
6262
- Click "Resume Reading Plan" to continue where you left off
63-
- Use "Random Passage" for study from any canon passage of Holy Scripture
63+
- Use "Random Passage" to study from any canon passage of Holy Scripture
6464

6565
### Data Management
6666
- Export/import your highlights and notes via JSON files
6767
- Export notes as Markdown or plain text
68-
- Clear specific data types or perform complete reset in settings
68+
- Clear cache or perform complete reset in settings
6969

7070
## Browser Support
7171

@@ -76,18 +76,19 @@ For an offline Bible:
7676

7777
## Privacy & Data
7878

79-
All user data (highlights, notes, settings) is stored locally in your browser. No data is transmitted to external servers except for:
80-
- Bible passage requests to bible.helloao.org
81-
- Resource links opened in external sites
82-
- Optional Bible Gateway searches
79+
Highlights, notes, and settings are stored locally in your browser. Data transmitted to external servers:
80+
- Bible passage requests are handled by bible.helloao.org
81+
- Bible Hub (interlinear) and STEP Bible (both when using Verse Analysis popup)
82+
- Bible Gateway searches
83+
- Resource links opened in external sites via the sidebar
8384

8485
## Attribution
8586

8687
- Scripture text provided by [bible.helloao.org](https://bible.helloao.org) API
8788
- Berean Standard Bible translation by [Berean Bible](https://berean.bible)
8889
- Icons by Font Awesome
89-
- PDF rendering by PDF.js
90-
- Markdown processing by Marked.js
90+
- PDF rendering by [PDF.js](https://cdnjs.com/libraries/pdf.js)
91+
- Markdown processing by [Marked.js](https://cdn.jsdelivr.net/npm/marked/)
9192

9293
## License
9394

dev_tools/Build-CSS.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ $FileOrder = @(
1616
"header.css",
1717
"scripture.css",
1818
"color-picker.css",
19+
"highlights-popup.css",
1920
"strongs-popup.css",
2021
"notes.css",
2122
"settings.css",
@@ -26,7 +27,7 @@ $FileOrder = @(
2627
)
2728

2829
$SourceDir = "../src/css"
29-
$outputDir = "../public"
30+
$outputDir = "../www"
3031
$outputFile = "styles.css"
3132
$outputPath = Join-Path -Path $outputDir -ChildPath $outputFile
3233

dev_tools/Minify-HTML.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ param(
88

99
# Simplified file processing - single source file
1010
$SourceFile = "../src/index.html"
11-
$OutputBase = "../public"
11+
$OutputBase = "../www"
1212
$FilesToProcess = @("index.html")
1313

1414
# Check if source files exist

dev_tools/Minify-JS.ps1

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ param(
77

88
# Define file mappings
99
$fileMappings = @(
10-
@{ Source = "../src/main.js"; Destination = "../public/main.js" },
11-
@{ Source = "../src/modules/api.js"; Destination = "../public/modules/api.js" },
12-
@{ Source = "../src/modules/navigation.js"; Destination = "../public/modules/navigation.js" },
13-
@{ Source = "../src/modules/passage.js"; Destination = "../public/modules/passage.js" },
14-
@{ Source = "../src/modules/pdf.js"; Destination = "../public/modules/pdf.js" },
15-
@{ Source = "../src/modules/settings.js"; Destination = "../public/modules/settings.js" },
16-
@{ Source = "../src/modules/state.js"; Destination = "../public/modules/state.js" },
17-
@{ Source = "../src/modules/strongs.js"; Destination = "../public/modules/strongs.js" },
18-
@{ Source = "../src/modules/ui.js"; Destination = "../public/modules/ui.js" }
10+
@{ Source = "../src/main.js"; Destination = "../www/main.js" },
11+
@{ Source = "../src/modules/api.js"; Destination = "../www/modules/api.js" },
12+
@{ Source = "../src/modules/navigation.js"; Destination = "../www/modules/navigation.js" },
13+
@{ Source = "../src/modules/passage.js"; Destination = "../www/modules/passage.js" },
14+
@{ Source = "../src/modules/pdf.js"; Destination = "../www/modules/pdf.js" },
15+
@{ Source = "../src/modules/settings.js"; Destination = "../www/modules/settings.js" },
16+
@{ Source = "../src/modules/state.js"; Destination = "../www/modules/state.js" },
17+
@{ Source = "../src/modules/strongs.js"; Destination = "../www/modules/strongs.js" },
18+
@{ Source = "../src/modules/ui.js"; Destination = "../www/modules/ui.js" },
19+
@{ Source = "../src/sw.js"; Destination = "../www/sw.js" }
1920
)
2021

2122
# Check if JS files exist

dev_tools/https_server.py

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,7 @@ def __init__(self, *args, **kwargs):
8585
super().__init__(*args, directory=str(WEB_ROOT), **kwargs)
8686

8787
def do_GET(self):
88-
# Default to index.html if root path
89-
if self.path == '/':
90-
self.path = '/index.html'
91-
92-
# Security check - prevent path traversal
88+
# Security check - prevent path traversal first
9389
requested_path = Path(self.translate_path(self.path))
9490
web_root = Path(WEB_ROOT).resolve()
9591

@@ -100,43 +96,41 @@ def do_GET(self):
10096
except:
10197
self.send_error(403, "Forbidden")
10298
return
99+
100+
# Check if the requested file exists
101+
original_path = self.path
102+
file_path = WEB_ROOT / original_path[1:] # Remove leading slash
103+
104+
# If the file doesn't exist, serve index.html for SPA routing
105+
if not file_path.exists() or file_path.is_dir():
106+
# For SPA: serve index.html for any non-existent file path
107+
# but only if it looks like a SPA route (not a static file extension)
108+
path_parts = original_path.split('.')
109+
if len(path_parts) > 1:
110+
# This has a file extension, check if it's a static file type
111+
file_ext = path_parts[-1].lower()
112+
static_extensions = ['css', 'js', 'png', 'jpg', 'jpeg', 'gif', 'ico', 'svg',
113+
'ttf', 'woff', 'woff2', 'pdf', 'json', 'xml', 'txt']
114+
if file_ext in static_extensions:
115+
# This is a static file that should exist but doesn't - 404
116+
self.send_error(404, "File not found")
117+
return
103118

119+
# Serve index.html for SPA routes
120+
self.path = '/index.html'
121+
104122
return super().do_GET()
105123

106124
def log_message(self, format, *args):
107-
# Custom logging format
125+
# Custom logging format to show SPA routing
108126
print(f"{self.address_string()} - {self.log_date_time_string()} - {format % args}")
109127

128+
110129
def main():
111130
# Create web root directory if it doesn't exist
112131
WEB_ROOT.mkdir(exist_ok=True)
113132
print(f"Web root directory: {WEB_ROOT.resolve()}")
114133

115-
# Create default index.html if it doesn't exist
116-
index_file = WEB_ROOT / "index.html"
117-
if not index_file.exists():
118-
index_content = """<!DOCTYPE html>
119-
<html>
120-
<head>
121-
<title>Python HTTPS Server</title>
122-
<style>
123-
body { font-family: Arial, sans-serif; margin: 40px; }
124-
h1 { color: #333; }
125-
</style>
126-
</head>
127-
<body>
128-
<h1>Welcome to Python HTTPS Server</h1>
129-
<p>Server is running successfully!</p>
130-
<p>Current time: <span id="time"></span></p>
131-
<script>
132-
document.getElementById('time').textContent = new Date().toLocaleString();
133-
</script>
134-
</body>
135-
</html>"""
136-
with open(index_file, 'w', encoding='utf-8') as f:
137-
f.write(index_content)
138-
print(f"Created default index.html at: {index_file}")
139-
140134
# Generate SSL certificate if needed
141135
try:
142136
generate_self_signed_cert()

index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)