Skip to content

Commit

Permalink
fix: fix html error & format code
Browse files Browse the repository at this point in the history
  • Loading branch information
littlecxm committed Dec 23, 2024
1 parent 7067eb4 commit d4c9754
Show file tree
Hide file tree
Showing 27 changed files with 5,239 additions and 2,167 deletions.
22 changes: 13 additions & 9 deletions views/alerts.tpl.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{{ if .Error }}
<div class="flex justify-center w-full">
<div class="p-4 font-semibold text-white text-sm bg-red-500 rounded mt-16 shadow grow max-w-lg">
Error: {{ .Messages.Error | capitalize }}
</div>
<div
class="p-4 font-semibold text-white text-sm bg-red-500 rounded mt-16 shadow grow max-w-lg"
>
Error: {{ .Messages.Error | capitalize }}
</div>
</div>
{{ else if .Success }}
<div class="flex justify-center w-full">
<div class="p-4 font-semibold text-white text-sm bg-green-500 rounded mt-16 shadow grow max-w-lg">
{{ .Messages.Success | capitalize }}
</div>
</div>
{{ end }}
<div class="flex justify-center w-full">
<div
class="p-4 font-semibold text-white text-sm bg-green-500 rounded mt-16 shadow grow max-w-lg"
>
{{ .Messages.Success | capitalize }}
</div>
</div>
{{ end }}
25 changes: 17 additions & 8 deletions views/entity-filter.tpl.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<template id="entity-filter-template">
<div :id="type + '-filter-form'" class="entity-filter-control">
<label :for="'select-' + type + '-filter'"><span class="iconify inline mr-1" data-icon="mdi:filter"></span> ${type}</label>
<select name="project" :id="'select-' + type + '-filter'" class="select-default" v-model="selection" @input="onSelectionUpdated">
<option :value="null">Filter by ${type} ...</option>
<option v-for="o in options" :value="o">{{ "{{" }}o{{ "}}" }}</option>
</select>
</div>
</template>
<div :id="type + '-filter-form'" class="entity-filter-control">
<label :for="'select-' + type + '-filter'"
><span class="iconify inline mr-1" data-icon="mdi:filter"></span>
${type}</label
>
<select
name="project"
:id="'select-' + type + '-filter'"
class="select-default"
v-model="selection"
@input="onSelectionUpdated"
>
<option :value="null">Filter by ${type} ...</option>
<option v-for="o in options" :value="o">{{ "{{" }}o{{ "}}" }}</option>
</select>
</div>
</template>
39 changes: 26 additions & 13 deletions views/footer.tpl.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
<footer class="flex justify-between w-full text-gray-500 mt-20 items-center gap-x-4">
<div class="text-xs font-mono font-semibold">
{{ getVersion }} @ {{ getDbType }}
</div>
<div class="font-semibold text-sm">
Made with &nbsp; <span class="iconify inline" data-icon="bi:heart-fill"></span>&nbsp; by
<a href="https://muetsch.io" class="text-gray-400 hover:text-gray-300">Ferdinand Mütsch</a> as
<a href="https://github.com/muety/wakapi" class="text-gray-400 hover:text-gray-300">open-source</a> software
</div>
<div class="text-sm">
<a href="imprint" class="font-semibold hover:text-gray-400">Imprint, Cookies & Data Privacy</a>
</div>
</footer>
<footer
class="flex justify-between w-full text-gray-500 mt-20 items-center gap-x-4"
>
<div class="text-xs font-mono font-semibold">
{{ getVersion }} @ {{ getDbType }}
</div>
<div class="font-semibold text-sm">
Made with &nbsp;
<span class="iconify inline" data-icon="bi:heart-fill"></span>&nbsp; by
<a href="https://muetsch.io" class="text-gray-400 hover:text-gray-300"
>Ferdinand Mütsch</a
>
as
<a
href="https://github.com/muety/wakapi"
class="text-gray-400 hover:text-gray-300"
>open-source</a
>
software
</div>
<div class="text-sm">
<a href="imprint" class="font-semibold hover:text-gray-400"
>Imprint, Cookies & Data Privacy</a
>
</div>
</footer>
50 changes: 35 additions & 15 deletions views/head.tpl.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
<head>
<title>Wakapi – Coding Statistics</title>
<base href="{{ getBasePath }}/">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta property="og:title" content="Wakapi - Coding Statistics" />
<meta property="og:type" content="website" />
<meta property="og:description" content="Wakapi is an open-source tool that helps you keep track of the time you have spent coding on different projects in different programming languages and more. Ideal for statistics freaks and anyone else.">
<meta property="og:image" content="assets/images/screenshot.webp" />
<link rel="apple-touch-icon" sizes="180x180" href="assets/images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon-16x16.png">
<link rel="manifest" href="assets/site.webmanifest">
<link href="assets/vendor/source-sans-3.css" rel="stylesheet">
<link href="assets/css/app.dist.css" rel="stylesheet">
<script src="assets/vendor/petite-vue.min.js" defer></script>
</head>
<title>Wakapi – Coding Statistics</title>
<base href="{{ getBasePath }}/" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1"
/>
<meta property="og:title" content="Wakapi - Coding Statistics" />
<meta property="og:type" content="website" />
<meta
property="og:description"
content="Wakapi is an open-source tool that helps you keep track of the time you have spent coding on different projects in different programming languages and more. Ideal for statistics freaks and anyone else."
/>
<meta property="og:image" content="assets/images/screenshot.webp" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="assets/images/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="assets/images/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="assets/images/favicon-16x16.png"
/>
<link rel="manifest" href="assets/site.webmanifest" />
<link href="assets/vendor/source-sans-3.css" rel="stylesheet" />
<link href="assets/css/app.dist.css" rel="stylesheet" />
<script src="assets/vendor/petite-vue.min.js" defer></script>
</head>
4 changes: 2 additions & 2 deletions views/header.tpl.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<header class="flex justify-between mb-10">
{{ template "logo.tpl.html" . }}
</header>
{{ template "logo.tpl.html" . }}
</header>
33 changes: 14 additions & 19 deletions views/imprint.tpl.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
{{ template "head.tpl.html" . }}

{{ template "head.tpl.html" . }}
<body
class="bg-gray-900 text-gray-700 p-4 pt-10 flex flex-col min-h-screen max-w-screen-lg mx-auto justify-center"
>
{{ template "header.tpl.html" . }}

<body class="bg-gray-900 text-gray-700 p-4 pt-10 flex flex-col min-h-screen max-w-screen-lg mx-auto justify-center">

{{ template "header.tpl.html" . }}

<main class="mt-10 grow flex w-full">
<div class="grow max-w-4xl flex flex-col">
<main class="mt-10 grow flex w-full">
<div class="grow max-w-4xl flex flex-col">
<h1 class="h1">Imprint & Data Privacy</h1>
<p>
{{ htmlSafe .HtmlText }}
</p>
</div>
</main>

{{ template "footer.tpl.html" . }}

{{ template "foot.tpl.html" . }}
</body>
<p>{{ htmlSafe .HtmlText }}</p>
</div>
</main>

</html>
{{ template "footer.tpl.html" . }} {{ template "foot.tpl.html" . }}
</body>
</html>
Loading

0 comments on commit d4c9754

Please sign in to comment.