gshr
git static host repo -- generates static html for repos
git clone https://git.vogt.world/gshr.git
Log | Files | README.md | LICENSE
← Commit log
commit
message
Tables need to be better, working on it.
author
Ben Vogt <[email protected]>
date
2023-04-06 17:11:56
stats
3 file(s) changed, 40 insertions(+), 28 deletions(-)
files
dev-config-gshr.toml
gshr.css
template.index.html
  1diff --git a/dev-config-gshr.toml b/dev-config-gshr.toml
  2index 032a9c4..f5ac421 100644
  3--- a/dev-config-gshr.toml
  4+++ b/dev-config-gshr.toml
  5@@ -7,14 +7,3 @@ description = "git static host repo -- generates static html for repos"
  6 url = "https://github.com/vogtb/gshr"
  7 published_git_url = "https://github.com/vogtb/gshr"
  8 host_git = true
  9-
 10-[[repos]]
 11-name = "f7"
 12-description = "f7 is a spreadsheet formula execution library"
 13-url = "https://github.com/vogtb/f7"
 14-published_git_url = "https://github.com/vogtb/f7"
 15-
 16-[[repos]]
 17-name = "spreadsheet"
 18-description = "typeScript/javascript spreadsheet parser, with formulas"
 19-url = "https://github.com/vogtb/spreadsheet"
 20diff --git a/gshr.css b/gshr.css
 21index c650bd9..db8595a 100644
 22--- a/gshr.css
 23+++ b/gshr.css
 24@@ -270,8 +270,28 @@ div.content div.files table {
 25   font-family: var(--mono-font);
 26 }
 27 
 28-div.content * td {
 29-  padding: 0 0.4em;
 30+div.content div.index table td.name {
 31+  width: 130px;
 32+  max-width: 130px;
 33+  min-width: 50px;
 34+}
 35+
 36+div.content div.index table td.description {
 37+  width: 300px;
 38+  max-width: 300px;
 39+  min-width: 220px;
 40+}
 41+
 42+div.content * table {
 43+  border-collapse: separate;
 44+  border-spacing: 2px 4px;
 45+}
 46+
 47+div.content * td>* {
 48+  padding: 2px;
 49+}
 50+
 51+div.content * td>* {
 52   max-width: 380px;
 53   vertical-align: top;
 54   overflow: hidden;
 55diff --git a/template.index.html b/template.index.html
 56index 02bb242..d7a1590 100644
 57--- a/template.index.html
 58+++ b/template.index.html
 59@@ -23,34 +23,36 @@
 60         <table>
 61           <thead>
 62             <tr>
 63-              <td><b>Name</b></td>
 64-              <td><b>Description</b></td>
 65+              <td class="name"><b>Name</b></td>
 66+              <td class="description"><b>Description</b></td>
 67               <td><b>Git</b></td>
 68             </tr>
 69           </thead>
 70           <tbody>
 71             {{ range .Repos }}
 72             <tr>
 73-              <td>
 74+              <td class="name">
 75                 <a href="{{ $.HeadData.BaseURL }}{{ .Name }}/log.html">
 76                   {{ .Name }}
 77                 </a>
 78               </td>
 79-              <td>
 80-                {{ .Description }}
 81+              <td class="description">
 82+                <div>{{ .Description }}</div>
 83               </td>
 84               <td>
 85-                {{ if .HostGit }}
 86-                <a href="{{ .BaseURL }}{{ .Name }}.git">
 87-                  {{ .BaseURL }}{{ .Name }}.git
 88-                </a>
 89-                {{ else if not (eq .PublishedGitURL "") }}
 90-                <a href="{{ .PublishedGitURL }}">
 91-                  {{ .PublishedGitURL }}
 92-                </a>
 93-                {{ else }}
 94-                <em>none</em>
 95-                {{ end }}
 96+                <div>
 97+                  {{ if .HostGit }}
 98+                  <a href="{{ .BaseURL }}{{ .Name }}.git">
 99+                    {{ .BaseURL }}{{ .Name }}.git
100+                  </a>
101+                  {{ else if not (eq .PublishedGitURL "") }}
102+                  <a href="{{ .PublishedGitURL }}">
103+                    {{ .PublishedGitURL }}
104+                  </a>
105+                  {{ else }}
106+                  <em>none</em>
107+                  {{ end }}
108+                </div>
109               </td>
110             </tr>
111             {{ end }}