All checks were successful
Go / build (push) Successful in 14s
feat: user templates
145 lines
4.3 KiB
HTML
145 lines
4.3 KiB
HTML
<!doctype html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Rechnung vom {{ .Date | date }}</title>
|
|
<!-- <link href="css/style.css" rel="stylesheet" /> -->
|
|
<script>
|
|
{{ .Tailwind }}
|
|
</script>
|
|
<style>
|
|
@page {
|
|
size: A4;
|
|
padding: 2cm;
|
|
}
|
|
@page:first {
|
|
padding: 0;
|
|
}
|
|
@media print {
|
|
.page,
|
|
.page-break {
|
|
break-after: page;
|
|
}
|
|
}
|
|
</style>
|
|
<style>
|
|
{{ .Style }}
|
|
</style>
|
|
</head>
|
|
<body class="font-sans text-gray-800 text-[12pt]">
|
|
<!-- Header -->
|
|
<header class="mx-[2cm] flex justify-between mb-10 mt-8">
|
|
<div class="company">
|
|
<h2 class="text-2xl font-semibold">{{ .Company.Name }}</h2>
|
|
<p class="mt-2">
|
|
{{ .Company.Address.Street }} {{ .Company.Address.Number }} <br />
|
|
{{ .Company.Address.ZIPCode }} {{ .Company.Address.Place }} <br />
|
|
{{ .Company.Contact }}
|
|
</p>
|
|
</div>
|
|
<div class="invoice-info text-right">
|
|
<p>
|
|
<span class="font-semibold">Rechnung:</span> {{ .Invoice.Reference }}
|
|
<br />
|
|
<span class="font-semibold">Datum:</span> {{ .Date | date }} <br />
|
|
</p>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Client Info -->
|
|
<section class="client mx-[2cm] mb-12">
|
|
<h2 class="text-xl font-semibold mb-2">Rechnung an:</h2>
|
|
<p>
|
|
{{ .Client.Name }} <br />
|
|
{{ .Client.Address.Street }} {{ .Client.Address.Number }} <br />
|
|
{{ .Client.Address.ZIPCode }} {{ .Client.Address.Place }} <br />
|
|
{{ .Client.Contact }}
|
|
</p>
|
|
</section>
|
|
|
|
<!-- Invoice Table -->
|
|
<section class="page mb-12">
|
|
<article class="mx-[2cm] overflow-x-auto">
|
|
<table class="w-full border border-gray-300 border-collapse mb-5">
|
|
<thead class="bg-gray-200">
|
|
<tr>
|
|
<th
|
|
class="border border-gray-300 px-2 py-0.5 min-w-[3.5em] text-left"
|
|
>
|
|
FID
|
|
</th>
|
|
<th class="border border-gray-300 px-2 py-0.5 text-left">Name</th>
|
|
<th class="border border-gray-300 px-2 py-0.5 text-left">
|
|
Aufwand
|
|
</th>
|
|
<th
|
|
class="border border-gray-300 px-2 py-0.5 min-w-[5.5em] text-left"
|
|
>
|
|
Preis
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ range .Issues }}
|
|
<tr>
|
|
<td class="border border-gray-300 px-2 py-0.5 font-mono">
|
|
{{ .Shorthand }}
|
|
</td>
|
|
<td class="border border-gray-300 px-2 py-0.5">{{ .Title }}</td>
|
|
<td class="border border-gray-300 px-2 py-0.5">
|
|
{{ .Duration | duration }}
|
|
</td>
|
|
<td class="border border-gray-300 px-2 py-0.5">
|
|
{{ .Duration | price }} CHF
|
|
</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th
|
|
colspan="2"
|
|
class="border border-gray-300 px-2 py-0.5 text-right"
|
|
>
|
|
Summe:
|
|
</th>
|
|
<td class="border border-gray-300 px-2 py-0.5">
|
|
{{ .Total | duration }}
|
|
</td>
|
|
<td class="border border-gray-300 px-2 py-0.5">
|
|
{{ .Total | price }}
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</article>
|
|
|
|
{{ .Invoice.HTML }}
|
|
</section>
|
|
|
|
<!-- Issue Details -->
|
|
<section>
|
|
<h2 class="font-semibold mb-4 text-2xl">Details zu den Features</h2>
|
|
{{ range .Issues }}
|
|
<article class="mb-6">
|
|
<div class="flex justify-between items-end mb-2">
|
|
<h3 class="font-semibold text-xl pt-5">
|
|
<a
|
|
href="{{ .HTMLURL }}"
|
|
class="font-mono text-blue-600 hover:underline"
|
|
>{{ .Shorthand }}</a
|
|
>: {{ .Title }}
|
|
</h3>
|
|
<p class="text-sm text-gray-600">
|
|
{{ if .Closed }} Fertiggestellt: {{ .Closed | time }} {{ else }} not
|
|
closed {{ end }}
|
|
</p>
|
|
</div>
|
|
<div class="text-sm markdown">{{ .CleanBody | md | oh 3 }}</div>
|
|
</article>
|
|
{{ end }}
|
|
</section>
|
|
</body>
|
|
</html>
|