Skip to content

Commit

Permalink
feat(ui): style search suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmckendry committed Aug 25, 2024
1 parent 8b7071a commit 30c49ed
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
19 changes: 18 additions & 1 deletion public/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ a {
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
margin-top: 30vh;
}

#clock {
Expand Down Expand Up @@ -132,6 +132,23 @@ a {
transition: all 0.2s ease-in-out;
}

#suggestions {
display: flex;
justify-content: center;
flex-wrap: wrap;
width: 50vw;
}

#suggestions a {
padding: 10px 15px;
margin: 10px;
color: #fff;
text-decoration: none;
background-color: #333;
transition: all 0.2s ease-in-out;
border-radius: 0.25rem;
}

#search:focus {
opacity: 1;
}
Expand Down
13 changes: 9 additions & 4 deletions views/settings.templ
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ templ Settings(user goth.User, settings *data.UserSettings) {
</div>
<div class="setting">
<label for="suggestions" class="tooltip-container">
Show Google-Powered Suggestions <icon class="bx bx-help-circle"></icon>
<p class="tooltip-text">This feature will send your search queries to Google to provide suggestions - regardless of your search engine choice.</p>
Show Google-Powered Suggestions (experimental) <icon class="bx bx-help-circle"></icon>
<p class="tooltip-text">
This feature will send your search queries to Google to provide suggestions - regardless of your search engine choice.
<br/>
<br/>
Google has a tendency to localise suggestions. Becuase the requests are made from the mnemstart server, the suggestions may not be relevant to your local area.
</p>
</label>
<select name="suggestions" data-include-edit="">
<option value="true" selected?={ settings.ShowSuggestions }>Yes</option>
<option value="false" selected?={ !settings.ShowSuggestions }>No</option>
<option value="on" selected?={ settings.ShowSuggestions }>Yes</option>
<option value="off" selected?={ !settings.ShowSuggestions }>No</option>
</select>
</div>
<div class="action-buttons">
Expand Down
4 changes: 2 additions & 2 deletions views/settings_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 30c49ed

Please sign in to comment.