feat(frontend): add preferences page template and styles
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3dbde9fbfd
commit
b4053b7f98
3 changed files with 284 additions and 0 deletions
191
internal/views/templates/preferences.html
Normal file
191
internal/views/templates/preferences.html
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
{{define "title"}}Preferences{{end}}
|
||||
{{define "content"}}
|
||||
<div class="preferences-layout">
|
||||
<!-- Preferences Navigation -->
|
||||
<nav class="preferences-nav" id="preferences-nav">
|
||||
<div class="preferences-nav-title">Settings</div>
|
||||
<button class="preferences-nav-item active" data-section="search">🔍 Search</button>
|
||||
<button class="preferences-nav-item" data-section="privacy">🔒 Privacy</button>
|
||||
<button class="preferences-nav-item" data-section="tabs">📑 Tabs</button>
|
||||
<button class="preferences-nav-item" data-section="appearance">🎨 Appearance</button>
|
||||
<button class="preferences-nav-item" data-section="sidebar">📐 Sidebar</button>
|
||||
<button class="preferences-nav-item" data-section="content">📄 Content</button>
|
||||
<button class="preferences-nav-item" data-section="languages">🌍 Languages</button>
|
||||
<button class="preferences-nav-item" data-section="regional">📍 Regional</button>
|
||||
</nav>
|
||||
|
||||
<!-- Preferences Content -->
|
||||
<div class="preferences-content">
|
||||
<!-- Search Section -->
|
||||
<section class="pref-section" id="section-search">
|
||||
<h2 class="pref-section-title">Search</h2>
|
||||
<div class="pref-row">
|
||||
<label for="pref-default-engine">Default engine</label>
|
||||
<select id="pref-default-engine">
|
||||
<option value="">All engines</option>
|
||||
<option value="wikipedia">Wikipedia</option>
|
||||
<option value="arxiv">arXiv</option>
|
||||
<option value="braveapi">Brave API</option>
|
||||
<option value="duckduckgo">DuckDuckGo</option>
|
||||
<option value="github">GitHub</option>
|
||||
<option value="reddit">Reddit</option>
|
||||
<option value="bing">Bing</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="pref-row">
|
||||
<label for="pref-safesearch">Safe search</label>
|
||||
<select id="pref-safesearch">
|
||||
<option value="moderate">Moderate</option>
|
||||
<option value="strict">Strict</option>
|
||||
<option value="off">Off</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="pref-row">
|
||||
<label for="pref-search-lang">Search language</label>
|
||||
<select id="pref-search-lang">
|
||||
<option value="">All languages</option>
|
||||
<option value="en">English</option>
|
||||
<option value="de">Deutsch</option>
|
||||
<option value="fr">Français</option>
|
||||
<option value="es">Español</option>
|
||||
<option value="zh">中文</option>
|
||||
</select>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Privacy Section -->
|
||||
<section class="pref-section" id="section-privacy" style="display:none;">
|
||||
<h2 class="pref-section-title">Privacy</h2>
|
||||
<div class="pref-row">
|
||||
<div class="pref-row-info">
|
||||
<label>Tracking protection</label>
|
||||
<p class="pref-desc">Block trackers and scripts that follow you across the web.</p>
|
||||
</div>
|
||||
<input type="checkbox" id="pref-tracking" checked disabled>
|
||||
</div>
|
||||
<div class="pref-row">
|
||||
<div class="pref-row-info">
|
||||
<label>Send Do Not Track header</label>
|
||||
<p class="pref-desc">Ask websites not to track you.</p>
|
||||
</div>
|
||||
<input type="checkbox" id="pref-dnt">
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Tabs Section -->
|
||||
<section class="pref-section" id="section-tabs" style="display:none;">
|
||||
<h2 class="pref-section-title">Tabs</h2>
|
||||
<div class="pref-row">
|
||||
<div class="pref-row-info">
|
||||
<label>New tab behavior</label>
|
||||
<p class="pref-desc">Choose what happens when you open a new tab.</p>
|
||||
</div>
|
||||
<select id="pref-newtab">
|
||||
<option value="blank">Blank page</option>
|
||||
<option value="home">Homepage</option>
|
||||
</select>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Appearance Section -->
|
||||
<section class="pref-section" id="section-appearance" style="display:none;">
|
||||
<h2 class="pref-section-title">Appearance</h2>
|
||||
<div class="pref-row">
|
||||
<label for="pref-theme">Theme</label>
|
||||
<select id="pref-theme">
|
||||
<option value="system">System</option>
|
||||
<option value="light">Light</option>
|
||||
<option value="dark">Dark</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="pref-row">
|
||||
<label for="pref-fontsize">Results font size</label>
|
||||
<select id="pref-fontsize">
|
||||
<option value="small">Small</option>
|
||||
<option value="medium" selected>Medium</option>
|
||||
<option value="large">Large</option>
|
||||
</select>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Sidebar Section -->
|
||||
<section class="pref-section" id="section-sidebar" style="display:none;">
|
||||
<h2 class="pref-section-title">Sidebar</h2>
|
||||
<div class="pref-row">
|
||||
<div class="pref-row-info">
|
||||
<label>Show sidebar on results page</label>
|
||||
<p class="pref-desc">Display the left navigation sidebar on search results.</p>
|
||||
</div>
|
||||
<input type="checkbox" id="pref-show-sidebar" checked>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Content Section -->
|
||||
<section class="pref-section" id="section-content" style="display:none;">
|
||||
<h2 class="pref-section-title">Content</h2>
|
||||
<div class="pref-row">
|
||||
<div class="pref-row-info">
|
||||
<label>Filter explicit results</label>
|
||||
<p class="pref-desc">Hide explicit content from search results (SafeSearch).</p>
|
||||
</div>
|
||||
<input type="checkbox" id="pref-explicit-filter" checked>
|
||||
</div>
|
||||
<div class="pref-row">
|
||||
<div class="pref-row-info">
|
||||
<label>Auto-play media</label>
|
||||
<p class="pref-desc">Automatically play video content when visible.</p>
|
||||
</div>
|
||||
<input type="checkbox" id="pref-autoplay">
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Languages Section -->
|
||||
<section class="pref-section" id="section-languages" style="display:none;">
|
||||
<h2 class="pref-section-title">Languages</h2>
|
||||
<div class="pref-row">
|
||||
<label for="pref-ui-lang">Interface language</label>
|
||||
<select id="pref-ui-lang">
|
||||
<option value="en" selected>English</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="pref-row">
|
||||
<label for="pref-search-lang-full">Search language</label>
|
||||
<select id="pref-search-lang-full">
|
||||
<option value="">All languages</option>
|
||||
<option value="en">English</option>
|
||||
<option value="de">Deutsch</option>
|
||||
<option value="fr">Français</option>
|
||||
<option value="es">Español</option>
|
||||
<option value="zh">中文</option>
|
||||
</select>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Regional Section -->
|
||||
<section class="pref-section" id="section-regional" style="display:none;">
|
||||
<h2 class="pref-section-title">Regional</h2>
|
||||
<div class="pref-row">
|
||||
<label for="pref-region">Country/Region</label>
|
||||
<select id="pref-region">
|
||||
<option value="">All regions</option>
|
||||
<option value="us">United States</option>
|
||||
<option value="uk">United Kingdom</option>
|
||||
<option value="de">Germany</option>
|
||||
<option value="fr">France</option>
|
||||
<option value="cn">China</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="pref-row">
|
||||
<label for="pref-timezone">Timezone</label>
|
||||
<select id="pref-timezone">
|
||||
<option value="">Auto-detect</option>
|
||||
<option value="utc">UTC</option>
|
||||
<option value="us-eastern">US/Eastern</option>
|
||||
<option value="us-pacific">US/Pacific</option>
|
||||
<option value="europe">Europe</option>
|
||||
</select>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue