aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/home.html10
-rw-r--r--templates/images.html8
-rw-r--r--templates/results.html8
-rw-r--r--templates/settings.html67
4 files changed, 88 insertions, 5 deletions
diff --git a/templates/home.html b/templates/home.html
index 90fc904..ae00824 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -8,7 +8,9 @@
OmniSearch
</title>
<link rel="stylesheet" href="static/main.css">
- <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
+ {{if theme == "light"}}<link rel="stylesheet" href="static/theme-light.css">{{endif}}
+ {{if theme == "dark"}}<link rel="stylesheet" href="static/theme-dark.css">{{endif}}
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<link rel="search"
type="application/opensearchdescription+xml"
title="OmniSearch" href="/opensearch.xml">
@@ -30,11 +32,13 @@
Search
</button>
<button type="submit" name="btnI" value="1" class="btn-secondary">
- Surprise me
- </div>
+ Surprise me
+ </button>
+ </div>
</form>
</div>
</div>
+ <a href="/settings" class="home-settings-btn" title="Settings"></a>
</body>
</html>
diff --git a/templates/images.html b/templates/images.html
index f04867b..92ab7b5 100644
--- a/templates/images.html
+++ b/templates/images.html
@@ -7,8 +7,10 @@
<title>
OmniSearch Images - {{query}}
</title>
- <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<link rel="stylesheet" href="static/main.css">
+ {{if theme == "light"}}<link rel="stylesheet" href="static/theme-light.css">{{endif}}
+ {{if theme == "dark"}}<link rel="stylesheet" href="static/theme-dark.css">{{endif}}
</head>
<body class="images-view">
@@ -20,6 +22,7 @@
<input name="q" autocomplete="off"="text" class="search-box" placeholder="Search for images..."
value="{{query}}">
</form>
+ <a href="/settings?q={{query}}" class="nav-settings-icon" title="Settings"></a>
</header>
<nav class="nav-tabs">
<div class="nav-container">
@@ -29,6 +32,9 @@
<a href="/images?q={{query}}" class="active">
Images
</a>
+ <a href="/settings?q={{query}}" class="nav-settings-link">
+ Settings
+ </a>
</div>
</nav>
<main class="image-results-container">
diff --git a/templates/results.html b/templates/results.html
index 57c2265..4128245 100644
--- a/templates/results.html
+++ b/templates/results.html
@@ -8,7 +8,9 @@
OmniSearch - {{query}}
</title>
<link rel="stylesheet" href="static/main.css">
- <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
+ {{if theme == "light"}}<link rel="stylesheet" href="static/theme-light.css">{{endif}}
+ {{if theme == "dark"}}<link rel="stylesheet" href="static/theme-dark.css">{{endif}}
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<link rel="search"
type="application/opensearchdescription+xml"
title="OmniSearch" href="/opensearch.xml">
@@ -24,6 +26,7 @@
<input name="q" type="text" class="search-box" autocomplete="off" placeholder="Search the web..."
value="{{query}}">
</form>
+ <a href="/settings?q={{query}}" class="nav-settings-icon" title="Settings"></a>
</header>
<nav class="nav-tabs">
<div class="nav-container">
@@ -33,6 +36,9 @@
<a href="/images?q={{query}}">
Images
</a>
+ <a href="/settings?q={{query}}" class="nav-settings-link">
+ Settings
+ </a>
</div>
</nav>
<div class="content-layout">
diff --git a/templates/settings.html b/templates/settings.html
new file mode 100644
index 0000000..780e438
--- /dev/null
+++ b/templates/settings.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html lang="en">
+
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0">
+ <title>
+ OmniSearch - Settings
+ </title>
+ <link rel="stylesheet" href="static/main.css">
+ {{if theme == "light"}}<link rel="stylesheet" href="static/theme-light.css">{{endif}}
+ {{if theme == "dark"}}<link rel="stylesheet" href="static/theme-dark.css">{{endif}}
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
+ <link rel="search"
+ type="application/opensearchdescription+xml"
+ title="OmniSearch" href="/opensearch.xml">
+ </head>
+
+ <body class="settings-view">
+ <header>
+ <h1>
+ Omni<span>Search</span>
+ </h1>
+ <form action="/search" method="GET" class="search-form">
+ <input name="q" type="text" class="search-box" autocomplete="off" placeholder="Search the web..."
+ value="{{query}}">
+ </form>
+ <a href="/settings?q={{query}}" class="nav-settings-icon active" title="Settings"></a>
+ </header>
+ <nav class="nav-tabs">
+ <div class="nav-container">
+ <a href="/search?q={{query}}">
+ All
+ </a>
+ <a href="/images?q={{query}}">
+ Images
+ </a>
+ <a href="/settings" class="active nav-settings-link">
+ Settings
+ </a>
+ </div>
+ </nav>
+ <div class="settings-layout">
+ <main class="settings-container">
+ <form action="/save_settings" method="GET">
+ <input type="hidden" name="q" value="{{query}}">
+ <section class="settings-section">
+ <h3 class="settings-section-title">Theme</h3>
+ <p class="settings-section-desc">Choose your preferred colour scheme.</p>
+ <div class="settings-field">
+ <label class="settings-label" for="theme">Appearance</label>
+ <select id="theme" name="theme" class="settings-select">
+ <option value="system" {{if theme == "system"}}selected{{endif}}>System</option>
+ <option value="light" {{if theme == "light"}}selected{{endif}}>Light</option>
+ <option value="dark" {{if theme == "dark"}}selected{{endif}}>Dark</option>
+ </select>
+ </div>
+ </section>
+ <div class="settings-actions">
+ <button type="submit" class="btn-primary">Save Settings</button>
+ </div>
+ </form>
+ </main>
+ </div>
+ </body>
+
+</html>