Skip to content

Commit

Permalink
Enh/show version on webpage (TUM-Dev#1239)
Browse files Browse the repository at this point in the history
* Added version tag to website footer

* Changed layout

* Created footer template and and changed it to look better

* Fixed font awesome bug
  • Loading branch information
SebiWrn authored Nov 19, 2023
1 parent a499861 commit a9b9cc3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
21 changes: 2 additions & 19 deletions web/template/home.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,7 @@
</button>
</template>
</article>
<footer class="tum-live-footer w-full md:hidden">
<div class="grid divide-y dark:divide-gray-800">
<a href="/about">About</a>
<a href="/privacy">Data Privacy</a>
<a href="/imprint">Imprint</a>
</div>
<a href="https://github.com/TUM-Dev/gocast" class="block mt-2 text-center">
<i class="fa-brands fa-github"></i> GitHub
</a>
</footer>
{{template "mobile_footer" .VersionTag}}
</section>

<!-- views -->
Expand Down Expand Up @@ -783,15 +774,7 @@
</template>
</article>
</main>
<footer id="desktop-footer"
class="tum-live-footer justify-between space-x-3 items-center hidden md:flex">
<div class="flex space-x-3">
<a href="/about">About</a>
<a href="/privacy">Data Privacy</a>
<a href="/imprint">Imprint</a>
</div>
<a href="https://github.com/TUM-Dev/gocast"><i class="fa-brands fa-github"></i> gocast@{{.VersionTag}}</a>
</footer>
{{template "footer" .VersionTag}}
</body>
</html>

Expand Down
12 changes: 3 additions & 9 deletions web/template/login.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<script src="static/assets/init.js"></script>
<script src="/static/assets/ts-dist/global.bundle.js?v={{if .}}{{.}}{{else}}development{{end}}"></script>

<link href="/static/node_modules/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
<link href="/static/assets/css-dist/home.css?v={{if .VersionTag}}{{.VersionTag}}{{else}}development{{end}}"
rel="stylesheet">
<style>[x-cloak] {
Expand Down Expand Up @@ -102,14 +103,7 @@
</template>
</section>
</main>
<footer id="desktop-footer"
class="tum-live-footer justify-between space-x-3 items-center hidden md:flex">
<div class="flex space-x-3">
<a href="/about">About</a>
<a href="/privacy">Data Privacy</a>
<a href="/imprint">Imprint</a>
</div>
<a href="/public/licenses.txt">We <i class="fas fa-heart text-blue-500 dark:text-indigo-600"></i> OpenSource</a>
</footer>
{{template "footer" .VersionTag}}
{{template "mobile_footer" .VersionTag}}
</body>
</html>
24 changes: 24 additions & 0 deletions web/template/partial/footer.gohtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{define "footer"}}
<footer id="desktop-footer"
class="tum-live-footer justify-between space-x-3 items-center hidden md:flex">
<div class="flex space-x-3">
<a href="/about">About</a>
<a href="/privacy">Data Privacy</a>
<a href="/imprint">Imprint</a>
</div>
<a href="https://github.com/TUM-Dev/gocast" class="">gocast@{{.}} <i class="fa-brands fa-github"></i></a>
</footer>
{{end}}

{{define "mobile_footer"}}
<footer class="tum-live-footer w-full md:hidden">
<div class="grid divide-y dark:divide-gray-800">
<a href="/about">About</a>
<a href="/privacy">Data Privacy</a>
<a href="/imprint">Imprint</a>
</div>
<a href="https://github.com/TUM-Dev/gocast" class="block mt-1 text-center">
gocast@{{.}} <i class="fa-brands fa-github"></i>
</a>
</footer>
{{end}}

0 comments on commit a9b9cc3

Please sign in to comment.