Skip to content

Commit

Permalink
light - dark mode support web
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfran committed Jan 26, 2024
1 parent d9926d4 commit 7f29302
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions server/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<title>search-rs</title>
</head>

<body class="bg-neutral-900 text-white">
<body class=" dark bg-neutral-100 dark:bg-neutral-900 text-neutral-700 dark:text-white">

<!-- Main Content -->
<div class="container mx-auto mt-16 max-w-3xl">
Expand All @@ -66,7 +66,8 @@
<!-- Search Heading -->
<div class="mb-6">
<h1 class="text-3xl font-medium mb-10">Index on {{index_path}}</h1>
<input type="text" class="outline-neutral-900 w-full p-4 rounded-md bg-neutral-800 text-white"
<input type="text"
class="outline-neutral-300 dark:outline-neutral-900 w-full p-4 rounded-md dark:bg-neutral-200 dark:bg-neutral-800"
placeholder="Enter your search query..." autofocus name="query" hx-post="/query" hx-ext='json-enc'
hx-target=".search-results" hx-trigger="keyup[keyCode==13]">
</div>
Expand Down
10 changes: 5 additions & 5 deletions server/templates/query.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ <h1 class=" font-light text-md mb-6">
{% for doc in documents %}


<div id="{{doc.path}}" class="toggle-container">
<div id="{{doc.path}}_closed" class="bg-neutral-800 p-6 rounded-md shadow-md mb-6">
<div id="{{doc.path}}" class="toggle-container bg-white dark:bg-neutral-800 p-6 rounded-md mb-6">
<div id="{{doc.path}}_closed">
<h2 class="text-xl font-semibold mb-4">
{{ doc.path }}
</h2>
<p class="text-neutral-300">
<p>
{{ doc.content|truncate(150) }}
</p>
</div>
<div id="{{doc.path}}_open" class="bg-neutral-800 p-6 rounded-md shadow-md mb-6" style="display:none;">
<div id="{{doc.path}}_open" style="display:none;">
<h2 class="text-xl font-semibold mb-4">
{{ doc.path }}
</h2>
<p class="text-neutral-300">
<p>
{{ doc.content }}
</p>
</div>
Expand Down

0 comments on commit 7f29302

Please sign in to comment.