Skip to content

Commit

Permalink
now with multi doc refs
Browse files Browse the repository at this point in the history
  • Loading branch information
digarok committed Sep 13, 2024
1 parent 2afb5b7 commit 9660b52
Show file tree
Hide file tree
Showing 2 changed files with 215 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
<html>
<head>
<link rel="stylesheet" href="{{ "css/gstoolbox.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/hint.base.min.css" | relURL }}">
</head>
<script> function changeBg(color) { document.body.style.background = color; } </script>
<body>


{{ $toolcalls := $tooldata.toolcalls }}
{{ $errors := $tooldata.errors }}
{{ $references := $tooldata.references }}


<!-- I MADE A SUPER COMPLICATED TOC RENDERER BECAUSE I DON'T KNOW WHAT I'M DOING -->
<!-- Create an empty map to store unique values -->
Expand Down Expand Up @@ -269,9 +272,29 @@ <h5>C</h5>
{{ end }}
</div>
{{ end }}

{{ if .docs }}
<div class="section">
<h5>Docs</h5>
<p>
{{ range .docs }}
{{ $reference := index $references .ref }}

{{ $pagestr := "" }}
{{ if .page }}
{{ $pagestr = printf ", page %s" .page }}
{{ end }}
<a href="{{ $reference.url }}" target="_blank" class="hint--top-right" aria-label="{{ $reference.title }}{{ $pagestr }}">
{{ $reference.emoji }}
</a>
{{ end }}
</p>
</div>
{{ else }}
<br/><br/>
</div>
{{ end }}

</div>

{{ end }}

Expand Down
Loading

0 comments on commit 9660b52

Please sign in to comment.