[add] split wanted files vs wanted metadata for ko apis, [add] documentation

This commit is contained in:
2023-09-19 19:29:55 -04:00
parent 1a1fb31a3c
commit d02f8c324f
22 changed files with 422 additions and 385 deletions

View File

@@ -1,8 +1,13 @@
<svg viewBox="0 0 {{ $data.Width }} {{ $data.Height }}" class="chart">
{{ $data := (GetSVGGraphData .Data.GraphData 800 150 )}}
<svg viewBox="0 0 {{ $data.Width }} {{ $data.Height }}">
<!-- Box Graph -->
{{ range $idx, $item := $data.BarPoints }}
<g class="bar" transform="translate({{ $item.X }}, 0)" fill="gray">
<rect y="{{ $item.Y }}" height="{{ $item.Size }}" width="33"></rect>
<rect
y="{{ $item.Y }}"
height="{{ $item.Size }}"
width="{{ $data.Offset }}"
></rect>
</g>
{{ end }}
@@ -12,13 +17,13 @@
stroke="black"
stroke-width="2"
points="
{{ range $item := $data.LinePoints }}
{{ $item.X }},{{ $item.Y }}
{{ end }}
"
{{ range $item := $data.LinePoints }}
{{ $item.X }},{{ $item.Y }}
{{ end }}
"
/>
<!-- Bezier Curve Line Graph -->
<!-- Bezier Line Graph -->
<path
fill="#316BBE"
fill-opacity="0.5"
@@ -26,10 +31,44 @@
d="{{ $data.BezierPath }} {{ $data.BezierFill }}"
/>
<path
fill="none"
fill-opacity="0.1"
stroke="none"
d="{{ $data.BezierPath }}"
/>
<path fill="none" stroke="#316BBE" d="{{ $data.BezierPath }}" />
{{ range $index, $item := $data.LinePoints }}
<line
class="hover-trigger"
stroke="black"
stroke-opacity="0.0"
stroke-width="{{ $data.Offset }}"
x1="{{ $item.X }}"
x2="{{ $item.X }}"
y1="0"
y2="{{ $data.Height }}"
></line>
<g class="hover-item">
<line
class="text-black dark:text-white"
stroke-opacity="0.2"
x1="{{ $item.X }}"
x2="{{ $item.X }}"
y1="30"
y2="{{ $data.Height }}"
></line>
<text
class="text-black dark:text-white"
alignment-baseline="middle"
transform="translate({{ $item.X }}, 5) translate(-30, 8)"
font-size="10"
>
{{ (index $.Data.GraphData $index).Date }}
</text>
<text
class="text-black dark:text-white"
alignment-baseline="middle"
transform="translate({{ $item.X }}, 25) translate(-30, -2)"
font-size="10"
>
{{ (index $.Data.GraphData $index).MinutesRead }} minutes
</text>
</g>
{{ end }}
</svg>

Before

Width:  |  Height:  |  Size: 789 B

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -7,9 +7,10 @@
>
Daily Read Totals
</p>
{{ $data := (GetSVGGraphData .Data.GraphData 800)}}
{{ $data := (GetSVGGraphData .Data.GraphData 800 70 )}}
<svg viewBox="0 0 {{ $data.Width }} {{ $data.Height }}">
<!-- Bezier Line Graph -->
<path
fill="#316BBE"
fill-opacity="0.5"

View File

@@ -41,7 +41,7 @@
type="text"
id="username"
name="username"
class="flex-1 appearance-none border border-gray-300 w-full py-2 px-4 bg-white text-gray-700 placeholder-gray-400 shadow-sm text-base focus:outline-none focus:ring-2 focus:ring-purple-600 focus:border-transparent"
class="flex-1 appearance-none rounded-none border border-gray-300 w-full py-2 px-4 bg-white text-gray-700 placeholder-gray-400 shadow-sm text-base focus:outline-none focus:ring-2 focus:ring-purple-600 focus:border-transparent"
placeholder="Username"
/>
</div>
@@ -67,7 +67,7 @@
type="password"
id="password"
name="password"
class="flex-1 appearance-none border border-gray-300 w-full py-2 px-4 bg-white text-gray-700 placeholder-gray-400 shadow-sm text-base focus:outline-none focus:ring-2 focus:ring-purple-600 focus:border-transparent"
class="flex-1 appearance-none rounded-none border border-gray-300 w-full py-2 px-4 bg-white text-gray-700 placeholder-gray-400 shadow-sm text-base focus:outline-none focus:ring-2 focus:ring-purple-600 focus:border-transparent"
placeholder="Password"
/>
<span class="absolute -bottom-5 text-red-400 text-xs"
@@ -86,6 +86,7 @@
{{end}}
</button>
</form>
{{ if .RegistrationEnabled }}
<div class="pt-12 pb-12 text-center">
{{ if .Register }}
<p>
@@ -103,6 +104,7 @@
</p>
{{end}}
</div>
{{ end }}
</div>
</div>
<div