Skip to content

Commit

Permalink
Added close button to settings - working with browser history (TUM-De…
Browse files Browse the repository at this point in the history
…v#1204)

Co-authored-by: Sebastian <sebwirn@web.de>
  • Loading branch information
SebiWrn and Sebastian committed Oct 25, 2023
1 parent bad8f2c commit e337d87
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
10 changes: 10 additions & 0 deletions web/template/partial/close-btn.gohtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{define "close-button"}}
<div class="h-fit w-fit">
<button type="button" class="transition-colors duration-200 hover:text-gray-600
dark:hover:text-white text-gray-400 text-xl w-4" tabindex="0" @click="history.back()">
<div class="flex items-center">
<i class="icon-cancel"></i>
</div>
</button>
</div>
{{end}}
9 changes: 8 additions & 1 deletion web/template/user-settings.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<script src="static/assets/init.js"></script>
<script src="/static/assets/ts-dist/global.bundle.js?v={{if .VersionTag}}{{.VersionTag}}{{else}}development{{end}}"></script>

<link href="/static/assets/css/icons.css?v={{if .VersionTag}}{{.VersionTag}}{{else}}development{{end}}"
rel="stylesheet">
<link href="/static/assets/css-dist/home.css?v={{if .VersionTag}}{{.VersionTag}}{{else}}development{{end}}"
rel="stylesheet">
<style>[x-cloak] {
Expand All @@ -35,7 +37,12 @@
<main id="content" class="flex justify-center grow h-full overflow-y-scroll">
<article class="tum-live-settings-grid" x-data=" { err: '' } ">
<header>
<h1 class="font-bold text-3">Settings</h1>
<div class="flex flex-row justify-between">
<h1 class="font-bold text-3">Settings</h1>
<div class="h-fit w-fit">
{{template "close-button"}}
</div>
</div>
</header>
<div x-cloak x-show="err!==''" class="bg-danger/25 text-sm rounded-lg px-2 py-1 space-x-3 py-2">
<i class="fa-solid fa-triangle-exclamation"></i>
Expand Down

0 comments on commit e337d87

Please sign in to comment.