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
Misc styling
author
Ben Vogt <[email protected]>
date
2023-04-03 22:44:07
stats
3 file(s) changed, 21 insertions(+), 23 deletions(-)
files
log.template.html
main.go
styles.css
  1diff --git a/log.template.html b/log.template.html
  2index 0ddbcfa..6e75cfb 100644
  3--- a/log.template.html
  4+++ b/log.template.html
  5@@ -61,7 +61,7 @@
  6           {{ range .Commits }}
  7           <tr>
  8             <td>{{ .Date }}</td>
  9-            <td><a href="commit/{{ .Hash }}">{{ .Message }}</a></td>
 10+            <td class="commit"><a href="commit/{{ .Hash }}">{{ .Message }}</a></td>
 11             <td>{{ .Author }}</td>
 12             <td align="right">1</td>
 13             <td align="right">+2</td>
 14diff --git a/main.go b/main.go
 15index 5515dd4..b2dfe6d 100644
 16--- a/main.go
 17+++ b/main.go
 18@@ -202,7 +202,7 @@ func BuildLogPage(r *git.Repository) {
 19 
 20 	err = cIter.ForEach(func(c *object.Commit) error {
 21 		commits = append(commits, GshrCommit{
 22-			Author:  c.Author.Email,
 23+			Author:  c.Author.Name,
 24 			Message: c.Message,
 25 			Date:    c.Author.When.UTC().Format("2006-01-02 15:04:05"),
 26 			Hash:    c.Hash.String(),
 27diff --git a/styles.css b/styles.css
 28index c2a7bfd..e816014 100644
 29--- a/styles.css
 30+++ b/styles.css
 31@@ -219,7 +219,7 @@ nav:hover ul {
 32 }
 33 
 34 .main-header {
 35-  max-width: 880px;
 36+  max-width: 860px;
 37   min-width: 100px;
 38   padding-left: 20px;
 39   padding-right: 20px;
 40@@ -271,7 +271,7 @@ nav ul li a[href]:hover {
 41 @media screen and (max-width: 920px) {
 42   .main-header {
 43     margin: 0 auto;
 44-    max-width: 880px;
 45+    max-width: 860px;
 46     padding-left: 20px;
 47     padding-right: 20px;
 48     position: relative;
 49@@ -290,13 +290,7 @@ nav ul li a[href]:hover {
 50 div.content {
 51   margin: 0 auto;
 52   padding: 40px 20px;
 53-  max-width: 880px
 54-}
 55-
 56-div.content a[href] {
 57-  overflow-wrap: break-word;
 58-  word-break: break-word;
 59-  hyphens: auto
 60+  max-width: 860px
 61 }
 62 
 63 div.content:not(.sub) h1:first-child {
 64@@ -370,6 +364,12 @@ div.content div.metadata h1 {
 65 }
 66 
 67 
 68+div.content div.log .commit {
 69+  white-space: nowrap;
 70+  overflow: hidden;
 71+  text-overflow: ellipsis
 72+}
 73+
 74 div.content div.log {
 75   display: block;
 76 }
 77@@ -382,12 +382,13 @@ div.content div.files table {
 78   font-family: var(--mono-font);
 79 }
 80 
 81-div.content>*>tr:hover {
 82+div.content * tr:hover {
 83   background: #efefef;
 84 }
 85 
 86-div.content>*>td {
 87+div.content * td {
 88   padding: 0 0.4em;
 89+  max-width: 380px;
 90 }
 91 
 92 .chroma {
 93@@ -578,27 +579,27 @@ div.content>*>td {
 94 }
 95 
 96 .chroma .c {
 97-  color: #008800;
 98+  color: #006800;
 99   font-style: italic
100 }
101 
102 .chroma .ch {
103-  color: #008800;
104+  color: #006800;
105   font-style: italic
106 }
107 
108 .chroma .cm {
109-  color: #008800;
110+  color: #006800;
111   font-style: italic
112 }
113 
114 .chroma .c1 {
115-  color: #008800;
116+  color: #006800;
117   font-style: italic
118 }
119 
120 .chroma .cs {
121-  color: #008800;
122+  color: #006800;
123   font-weight: bold
124 }
125