Commit 6f489c1
Changed files (16)
assets/blob.css
@@ -1,53 +0,0 @@
-[id] {
- scroll-margin-top: var(--header-height);
-}
-
-pre {
- border: 1px solid var(--c-border);
- border-top: none;
- border-bottom-left-radius: var(--border-radius);
- border-bottom-right-radius: var(--border-radius);
-}
-
-pre {
- margin: 0;
- padding: 8px 16px;
- overflow-x: auto;
- white-space: pre;
- word-spacing: normal;
- word-break: normal;
- word-wrap: normal;
- tab-size: 4;
- font-family: var(--font-family-mono), monospace;
-}
-
-pre > code {
- display: block;
- padding: 0 16px;
- width: fit-content;
- min-width: 100%;
- line-height: var(--code-line-height);
- font-size: var(--code-font-size);
-}
-
-.border {
- border: 1px solid var(--c-border);
- border-top: none;
- border-bottom-left-radius: 6px;
- border-bottom-right-radius: 6px;
-}
-
-.binary-file {
- padding: 8px 16px;
- font-style: italic;
-}
-
-.image {
- padding: 8px 16px;
- text-align: center;
-}
-
-.image img {
- max-width: 100%;
- height: auto;
-}
assets/branches.css
@@ -1,42 +0,0 @@
-.branches {
- border: 1px solid var(--c-border);
- border-radius: var(--border-radius);
- overflow: hidden;
-}
-
-.branch-row {
- display: flex;
- align-items: center;
- gap: 12px;
- height: 44px;
- padding-inline: 16px;
- border-bottom: 1px solid var(--c-border);
- background-color: var(--c-bg-elv);
-}
-
-.branch-row:last-child {
- border-bottom: none;
-}
-
-.branch-row a {
- color: var(--c-text-1);
-}
-
-.branch-row a:hover {
- color: var(--c-brand-2);
- text-decoration: none;
-}
-
-.badge {
- font-size: 12px;
- color: var(--c-text-2);
- border: 1px solid var(--c-border);
- padding: 2px 6px;
- border-radius: 999px;
-}
-
-.to-commits {
- margin-left: auto;
- font-size: 13px;
- color: var(--c-text-2)
-}
assets/commit.css
@@ -1,214 +0,0 @@
-h1 code {
- border-radius: var(--border-radius);
- background: var(--c-bg-alt);
- padding: 4px 8px;
- font-family: var(--font-family-mono), monospace;
- font-weight: 500;
-}
-
-.commit {
- display: flex;
- flex-direction: column;
- gap: 16px;
- margin-bottom: 16px;
-}
-
-.commit-info {
- display: flex;
- flex-direction: row;
- gap: 8px;
- align-items: flex-end;
-}
-
-.commit-author {
- color: var(--c-text-1);
- font-weight: 600;
- min-width: 0;
- overflow-wrap: break-word;
-}
-
-.commit-date {
- color: var(--c-text-2);
- font-size: 12px;
- font-family: var(--font-family-mono), monospace;
-}
-
-.commit-message {
- border: 1px solid var(--c-border);
- border-radius: var(--border-radius);
- padding: 16px;
-}
-
-.ref-badges {
- display: inline-flex;
- gap: 6px;
- margin-left: 8px;
-}
-
-.badge {
- font-size: 12px;
- color: var(--c-text-2);
- border: 1px solid var(--c-border);
- padding: 2px 6px;
- border-radius: 999px;
- white-space: nowrap;
-}
-
-.commit-subject {
- font-size: 16px;
- font-weight: 600;
- line-height: 1.3;
- hyphens: auto;
-}
-
-.commit-body {
- margin-top: 16px;
- white-space: pre-wrap;
- line-height: 1.5;
- hyphens: auto;
-}
-
-.commit-subinfo {
- display: flex;
- flex-direction: row;
- gap: 16px;
- justify-content: space-between;
-}
-
-.commit-layout {
- display: grid;
- grid-template-columns: 1fr;
- gap: 16px;
-}
-
-@media (min-width: 960px) {
- .commit-layout {
- grid-template-columns: 300px 1fr;
- align-items: start;
- }
-
- .files-tree {
- position: sticky;
- top: 16px;
- }
-
- .files-tree-content {
- max-height: calc(100vh - var(--header-height) - 40px);
- overflow: auto;
- }
-}
-
-.files-tree {
- border: 1px solid var(--c-border);
- border-radius: var(--border-radius);
-}
-
-.files-tree-header {
- display: flex;
- flex-direction: row;
- align-items: center;
- padding-inline: 16px;
- height: var(--header-height);
- border-bottom: 1px solid var(--c-border);
- border-top-left-radius: var(--border-radius);
- border-top-right-radius: var(--border-radius);
- background: var(--c-bg-alt);
- font-size: 14px;
- font-weight: 600;
-}
-
-.files-tree-content {
- display: block;
- padding-block: 6px;
-}
-
-.tree .children {
- margin-left: 16px;
- border-left: 1px dashed var(--c-border);
-}
-
-.tree .node {
- display: flex;
- align-items: center;
- gap: 8px;
- padding: 10px 16px;
-}
-
-.tree .file-name {
- flex: 1;
- font-weight: 500;
- color: var(--c-text-1);
- cursor: pointer;
-}
-
-.tree .file-name:hover {
- color: var(--c-brand-2);
- text-decoration: underline;
-}
-
-.tree .dir {
- color: var(--c-dir);
-}
-
-.tree .file-added {
- color: var(--c-green);
-}
-
-.tree .file-deleted {
- color: var(--c-red);
-}
-
-.tree .file-renamed {
- color: var(--c-yellow);
-}
-
-/* Per-file sections */
-.files {
- min-width: 0;
-}
-
-.file-section + .file-section {
- margin-top: 16px;
-}
-
-pre {
- border: 1px solid var(--c-border);
- border-top: none;
- border-bottom-left-radius: var(--border-radius);
- border-bottom-right-radius: var(--border-radius);
-
- margin: 0;
- padding: 8px 16px;
- overflow-x: auto;
- white-space: pre;
- word-spacing: normal;
- word-break: normal;
- word-wrap: normal;
- tab-size: 4;
- font-family: var(--font-family-mono), monospace;
-}
-
-pre > code {
- display: block;
- padding: 0 16px;
- width: fit-content;
- min-width: 100%;
- line-height: var(--code-line-height);
- font-size: var(--code-font-size);
-}
-
-.binary-file {
- padding: 8px 16px;
- font-style: italic;
-}
-
-.border {
- border: 1px solid var(--c-border);
- border-top: none;
- border-bottom-left-radius: 6px;
- border-bottom-right-radius: 6px;
-}
-
-.no-files {
- color: var(--c-text-3)
-}
assets/commits_list.css
@@ -1,142 +0,0 @@
-.commits {
- border: 1px solid var(--c-border);
- border-top: none;
- border-bottom-left-radius: var(--border-radius);
- border-bottom-right-radius: var(--border-radius);
- overflow-x: auto;
-}
-
-.row {
- display: flex;
- height: 40px;
- border-bottom: 1px solid var(--c-border);
- padding-inline: 16px;
- gap: 16px;
-}
-
-.row:last-child {
- border-bottom: none;
-}
-
-.row:hover {
- background-color: var(--c-bg-alt);
-}
-
-.cell {
- display: flex;
- gap: 8px;
- align-items: center;
-}
-
-.hash a {
- font-family: var(--font-family-mono), monospace;
- color: var(--c-text-2);
-}
-
-.commit-title {
- flex: 1;
-}
-
-.commit-title a {
- color: var(--c-text-1);
- line-height: 1.5;
-}
-
-.commit-title a:hover {
- color: var(--c-brand-2);
-}
-
-.ref-badges {
- display: inline-flex;
- gap: 6px;
- margin-left: 8px;
-}
-
-.badge {
- font-size: 12px;
- color: var(--c-text-2);
- border: 1px solid var(--c-border);
- padding: 2px 6px;
- border-radius: 999px;
- white-space: nowrap;
-}
-
-.date {
- font-family: var(--font-family-mono), monospace;
- font-size: 12px;
- color: var(--c-text-2);
-}
-
-.pagination {
- display: flex;
- gap: 8px;
- align-items: center;
- justify-content: center;
- margin-top: 12px;
- padding: 8px 0;
- color: var(--c-text-2);
-}
-
-.pagination a,
-.pagination span.btn {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- padding: 6px 10px;
- border: 1px solid var(--c-border);
- border-radius: 6px;
- background: var(--c-bg-elv);
- color: var(--c-text-1);
- text-decoration: none;
- font-size: 13px;
-}
-
-.pagination a:hover {
- color: var(--c-brand-2);
- border-color: var(--c-brand-2);
-}
-
-.pagination .disabled {
- opacity: 0.5;
- pointer-events: none;
-}
-
-.pagination .page-indicator {
- margin: 0 4px;
- font-size: 13px;
- color: var(--c-text-2);
-}
-
-/* Mobile optimizations */
-@media (max-width: 767px) {
- .row {
- height: auto;
- padding: 10px 12px;
- gap: 12px;
- flex-wrap: wrap;
- align-items: flex-start;
- }
-
- .commit-title {
- flex-basis: 100%;
- order: 1;
- }
-
- .author, .date, .hash {
- font-size: 12px;
- }
-
- .author {
- color: var(--c-text-2);
- order: 2;
- }
-
- .date {
- order: 2;
- }
-
- .hash {
- margin-left: auto;
- order: 3;
- }
-}
assets/common.css
@@ -0,0 +1,515 @@
+/* common: badge */
+.badge {
+ font-size: 12px;
+ color: var(--c-text-2);
+ border: 1px solid var(--c-border);
+ padding: 2px 6px;
+ border-radius: 999px;
+ white-space: nowrap;
+}
+
+/* common: .binary-file */
+.binary-file {
+ padding: 8px 16px;
+ font-style: italic;
+}
+
+
+/* common: border */
+.border {
+ border: 1px solid var(--c-border);
+ border-top: none;
+ border-bottom-left-radius: 6px;
+ border-bottom-right-radius: 6px;
+}
+
+/* common: date */
+.date {
+ font-family: var(--font-family-mono), monospace;
+ font-size: 12px;
+ color: var(--c-text-2);
+}
+
+/* common: hash link */
+.hash a {
+ font-family: var(--font-family-mono), monospace;
+ color: var(--c-text-2);
+}
+
+/* common: pre etc */
+pre:not(.markdown-body pre) {
+ border: 1px solid var(--c-border);
+ border-top: none;
+ border-bottom-left-radius: var(--border-radius);
+ border-bottom-right-radius: var(--border-radius);
+
+ margin: 0;
+ padding: 8px 16px;
+ overflow-x: auto;
+ white-space: pre;
+ word-spacing: normal;
+ word-break: normal;
+ word-wrap: normal;
+ tab-size: 4;
+ font-family: var(--font-family-mono), monospace;
+}
+
+pre:not(.markdown-body pre) > code {
+ display: block;
+ padding: 0 16px;
+ width: fit-content;
+ min-width: 100%;
+ line-height: var(--code-line-height);
+ font-size: var(--code-font-size);
+}
+
+/* common: .ref-badges */
+.ref-badges {
+ display: inline-flex;
+ gap: 6px;
+ margin-left: 8px;
+}
+
+/* common: .row etc */
+.row {
+ display: flex;
+ height: 40px;
+ border-bottom: 1px solid var(--c-border);
+ padding-inline: 16px;
+ gap: 16px;
+}
+
+.row:last-child {
+ border-bottom: none;
+}
+
+.row:hover {
+ background-color: var(--c-bg-alt);
+}
+
+.cell {
+ display: flex;
+ gap: 8px;
+ align-items: center;
+}
+
+/* blob specific */
+
+/* ??? [id] -> markdown {
+ scroll-margin-top: var(--header-height);
+} */
+
+.image {
+ padding: 8px 16px;
+ text-align: center;
+}
+
+.image img {
+ max-width: 100%;
+ height: auto;
+}
+
+/* branches specific */
+.branches {
+ border: 1px solid var(--c-border);
+ border-radius: var(--border-radius);
+ overflow: hidden;
+}
+
+.branch-row {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ height: 44px;
+ padding-inline: 16px;
+ border-bottom: 1px solid var(--c-border);
+ background-color: var(--c-bg-elv);
+}
+
+.branch-row:last-child {
+ border-bottom: none;
+}
+
+.branch-row a {
+ color: var(--c-text-1);
+}
+
+.branch-row a:hover {
+ color: var(--c-brand-2);
+ text-decoration: none;
+}
+
+.to-commits {
+ margin-left: auto;
+ font-size: 13px;
+ color: var(--c-text-2)
+}
+
+/* commit specific */
+h1 code {
+ border-radius: var(--border-radius);
+ background: var(--c-bg-alt);
+ padding: 4px 8px;
+ font-family: var(--font-family-mono), monospace;
+ font-weight: 500;
+}
+
+.commit {
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+ margin-bottom: 16px;
+}
+
+.commit-info {
+ display: flex;
+ flex-direction: row;
+ gap: 8px;
+ align-items: flex-end;
+}
+
+.commit-author {
+ color: var(--c-text-1);
+ font-weight: 600;
+ min-width: 0;
+ overflow-wrap: break-word;
+}
+
+.commit-date {
+ color: var(--c-text-2);
+ font-size: 12px;
+ font-family: var(--font-family-mono), monospace;
+}
+
+.commit-message {
+ border: 1px solid var(--c-border);
+ border-radius: var(--border-radius);
+ padding: 16px;
+}
+
+.commit-subject {
+ font-size: 16px;
+ font-weight: 600;
+ line-height: 1.3;
+ hyphens: auto;
+}
+
+.commit-body {
+ margin-top: 16px;
+ white-space: pre-wrap;
+ line-height: 1.5;
+ hyphens: auto;
+}
+
+.commit-subinfo {
+ display: flex;
+ flex-direction: row;
+ gap: 16px;
+ justify-content: space-between;
+}
+
+.commit-layout {
+ display: grid;
+ grid-template-columns: 1fr;
+ gap: 16px;
+}
+
+@media (min-width: 960px) {
+ .commit-layout {
+ grid-template-columns: 300px 1fr;
+ align-items: start;
+ }
+
+ .files-tree {
+ position: sticky;
+ top: 16px;
+ }
+
+ .files-tree-content {
+ max-height: calc(100vh - var(--header-height) - 40px);
+ overflow: auto;
+ }
+}
+
+.files-tree {
+ border: 1px solid var(--c-border);
+ border-radius: var(--border-radius);
+}
+
+.files-tree-header {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ padding-inline: 16px;
+ height: var(--header-height);
+ border-bottom: 1px solid var(--c-border);
+ border-top-left-radius: var(--border-radius);
+ border-top-right-radius: var(--border-radius);
+ background: var(--c-bg-alt);
+ font-size: 14px;
+ font-weight: 600;
+}
+
+.files-tree-content {
+ display: block;
+ padding-block: 6px;
+}
+
+.tree .children {
+ margin-left: 16px;
+ border-left: 1px dashed var(--c-border);
+}
+
+.tree .node {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ padding: 10px 16px;
+}
+
+.tree .file-name {
+ flex: 1;
+ font-weight: 500;
+ color: var(--c-text-1);
+ cursor: pointer;
+}
+
+.tree .file-name:hover {
+ color: var(--c-brand-2);
+ text-decoration: underline;
+}
+
+.tree .dir {
+ color: var(--c-dir);
+}
+
+.tree .file-added {
+ color: var(--c-green);
+}
+
+.tree .file-deleted {
+ color: var(--c-red);
+}
+
+.tree .file-renamed {
+ color: var(--c-yellow);
+}
+
+/* Per-file sections */
+.files {
+ min-width: 0;
+}
+
+.file-section + .file-section {
+ margin-top: 16px;
+}
+
+
+.no-files {
+ color: var(--c-text-3)
+}
+
+/* commits-list specific */
+
+.commits {
+ border: 1px solid var(--c-border);
+ border-top: none;
+ border-bottom-left-radius: var(--border-radius);
+ border-bottom-right-radius: var(--border-radius);
+ overflow-x: auto;
+}
+
+.commit-title {
+ flex: 1;
+}
+
+.commit-title a {
+ color: var(--c-text-1);
+ line-height: 1.5;
+}
+
+.commit-title a:hover {
+ color: var(--c-brand-2);
+}
+
+.pagination {
+ display: flex;
+ gap: 8px;
+ align-items: center;
+ justify-content: center;
+ margin-top: 12px;
+ padding: 8px 0;
+ color: var(--c-text-2);
+}
+
+.pagination a,
+.pagination span.btn {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ padding: 6px 10px;
+ border: 1px solid var(--c-border);
+ border-radius: 6px;
+ background: var(--c-bg-elv);
+ color: var(--c-text-1);
+ text-decoration: none;
+ font-size: 13px;
+}
+
+.pagination a:hover {
+ color: var(--c-brand-2);
+ border-color: var(--c-brand-2);
+}
+
+.pagination .disabled {
+ opacity: 0.5;
+ pointer-events: none;
+}
+
+.pagination .page-indicator {
+ margin: 0 4px;
+ font-size: 13px;
+ color: var(--c-text-2);
+}
+
+/* Mobile optimizations */
+@media (max-width: 767px) {
+ .row {
+ height: auto;
+ padding: 10px 12px;
+ gap: 12px;
+ flex-wrap: wrap;
+ align-items: flex-start;
+ }
+
+ .commit-title {
+ flex-basis: 100%;
+ order: 1;
+ }
+
+ .author, .date, .hash {
+ font-size: 12px;
+ }
+
+ .author {
+ color: var(--c-text-2);
+ order: 2;
+ }
+
+ .date {
+ order: 2;
+ }
+
+ .hash {
+ margin-left: auto;
+ order: 3;
+ }
+}
+
+/* list-specific */
+.files-list {
+ border: 1px solid var(--c-border);
+ border-top: none;
+ width: 100%;
+ border-bottom-left-radius: var(--border-radius);
+ border-bottom-right-radius: var(--border-radius);
+ overflow-x: auto;
+}
+
+.files-list .dir {
+ color: var(--c-dir);
+}
+
+.files-list a {
+ color: var(--c-text-1);
+}
+
+.files-list a:hover {
+ color: var(--c-brand-2);
+}
+
+@media (max-width: 767px) {
+ .file-mode {
+ display: none;
+ }
+}
+
+.markdown-container.readme {
+ padding-inline: 16px;
+ border-radius: 8px;
+ margin-top: 16px;
+}
+
+.files-list .cell {
+ flex: 1;
+ white-space: nowrap;
+}
+
+.files-list .cell:not(:first-child) {
+ justify-content: flex-end;
+ max-width: 100px;
+}
+
+/* markdown common */
+[id] {
+ scroll-margin-top: var(--header-height);
+}
+
+.markdown-container {
+ border: 1px solid var(--c-divider);
+ border-top: none;
+ border-bottom-left-radius: 8px;
+ border-bottom-right-radius: 8px;
+ overflow-x: auto;
+}
+
+.markdown-body {
+ width: 100%;
+ min-width: 200px;
+ max-width: 980px;
+ margin: 0 auto;
+ padding: 32px;
+ word-wrap: break-word;
+ font-size: 16px;
+ line-height: 1.5;
+}
+
+@media (max-width: 767px) {
+ .markdown-body {
+ padding: 16px;
+ }
+}
+
+/* tags */
+.tags {
+ border: 1px solid var(--c-border);
+ border-radius: var(--border-radius);
+ overflow: hidden;
+}
+
+.tag-row {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ height: 44px;
+ padding-inline: 16px;
+ border-bottom: 1px solid var(--c-border);
+ background-color: var(--c-bg-elv);
+}
+
+.tag-row:last-child {
+ border-bottom: none;
+}
+
+.tag-title {
+ flex: 1;
+}
+
+.tag-row a {
+ color: var(--c-text-1);
+}
+
+.tag-row a:hover {
+ color: var(--c-brand-2);
+ text-decoration: none;
+}
assets/list.css
@@ -1,80 +0,0 @@
-.files {
- border: 1px solid var(--c-border);
- border-top: none;
- width: 100%;
- border-bottom-left-radius: var(--border-radius);
- border-bottom-right-radius: var(--border-radius);
- overflow-x: auto;
-}
-
-.files .dir {
- color: var(--c-dir);
-}
-
-.files a {
- color: var(--c-text-1);
-}
-
-.files a:hover {
- color: var(--c-brand-2);
-}
-
-.row {
- display: flex;
- height: 40px;
- border-bottom: 1px solid var(--c-border);
- padding-inline: 16px;
- gap: 16px;
-}
-
-.row:last-child {
- border-bottom: none;
-}
-
-.row:hover {
- background-color: var(--c-bg-alt);
-}
-
-.cell {
- flex: 1;
- display: flex;
- gap: 8px;
- align-items: center;
- white-space: nowrap;
-}
-
-.cell:not(:first-child) {
- justify-content: flex-end;
- max-width: 100px;
-}
-
-@media (max-width: 767px) {
- .file-mode {
- display: none;
- }
-}
-
-.markdown-container.readme {
- padding-inline: 16px;
- border: 1px solid var(--c-divider);
- border-radius: 8px;
- overflow-x: auto;
- margin-top: 16px;
-}
-
-.markdown-body.readme {
- width: 100%;
- min-width: 200px;
- max-width: 980px;
- margin: 0 auto;
- padding: 32px;
- word-wrap: break-word;
- font-size: 16px;
- line-height: 1.5;
-}
-
-@media (max-width: 767px) {
- .markdown-body.readme {
- padding: 16px;
- }
-}
assets/markdown.css
@@ -1,28 +0,0 @@
-[id] {
- scroll-margin-top: var(--header-height);
-}
-
-.markdown-container {
- border: 1px solid var(--c-divider);
- border-top: none;
- border-bottom-left-radius: 8px;
- border-bottom-right-radius: 8px;
- overflow-x: auto;
-}
-
-.markdown-body {
- width: 100%;
- min-width: 200px;
- max-width: 980px;
- margin: 0 auto;
- padding: 32px;
- word-wrap: break-word;
- font-size: 16px;
- line-height: 1.5;
-}
-
-@media (max-width: 767px) {
- .markdown-body {
- padding: 16px;
- }
-}
pkg/templates/blob.gohtml
@@ -1,7 +1,7 @@
{{- /*gotype: github.com/antonmedv/gitmal/pkg/templates.BlobParams */ -}}
{{ define "head" }}
<link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/markdownBody.css">
- <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/blob.css">
+ <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/common.css">
<link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/code.css">
{{ end }}
pkg/templates/branches.gohtml
@@ -1,6 +1,6 @@
{{- /*gotype: github.com/antonmedv/gitmal/pkg/templates.BranchesParams*/ -}}
{{ define "head" }}
- <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/branches.css">
+ <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/common.css">
{{ end }}
{{ define "body" }}
pkg/templates/commit.gohtml
@@ -1,6 +1,6 @@
{{- /*gotype: github.com/antonmedv/gitmal/pkg/templates.CommitParams*/ -}}
{{ define "head" }}
- <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/commit.css">
+ <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/common.css">
<link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/code.css">
{{ end }}
pkg/templates/commits_list.gohtml
@@ -1,6 +1,6 @@
{{- /*gotype: github.com/antonmedv/gitmal/pkg/templates.CommitsListParams*/ -}}
{{ define "head" }}
- <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/commits_list.css">
+ <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/common.css">
{{ end }}
{{ define "body" }}
pkg/templates/list.gohtml
@@ -1,6 +1,6 @@
{{- /*gotype: github.com/antonmedv/gitmal/pkg/templates.ListParams*/ -}}
{{ define "head" }}
- <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/list.css">
+ <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/common.css">
<link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/markdownBody.css">
<link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/code.css">
{{ end }}
@@ -8,7 +8,7 @@
{{ define "body" }}
{{ template "header" . }}
- <div class="files">
+ <div class="files-list">
{{ if .ParentHref }}
<div class="row">
<div class="cell">
pkg/templates/markdown.gohtml
@@ -1,6 +1,6 @@
{{- /*gotype: github.com/antonmedv/gitmal/pkg/templates.MarkdownParams*/ -}}
{{ define "head" }}
- <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/markdown.css">
+ <link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/common.css">
<link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/markdownBody.css">
<link rel="stylesheet" href="{{ .LayoutParams.RootHref }}assets/code.css">
{{ end }}
assets.go
@@ -12,41 +12,17 @@ var MarkdownBodyCSS []byte
//go:embed assets/code.css
var CodeCSS []byte
-//go:embed assets/blob.css
-var BlobCSS []byte
-
-//go:embed assets/branches.css
-var BranchesCSS []byte
-
-//go:embed assets/commit.css
-var CommitCSS []byte
-
-//go:embed assets/commits_list.css
-var CommitsListCss []byte
+//go:embed assets/common.css
+var CommonCSS []byte
//go:embed assets/layout.css
var LayoutCSS []byte
-//go:embed assets/list.css
-var ListCSS []byte
-
-//go:embed assets/markdown.css
-var MarkdownCSS []byte
-
-//go:embed assets/tags.css
-var TagsCSS []byte
-
var Assets = map[string][]byte{
"markdownBody.css": MarkdownBodyCSS,
"code.css": CodeCSS,
- "blob.css": BlobCSS,
- "branches.css": BranchesCSS,
- "commit.css": CommitCSS,
- "commits_list.css": CommitsListCss,
+ "common.css": CommonCSS,
"layout.css": LayoutCSS,
- "list.css": ListCSS,
- "markdown.css": MarkdownCSS,
- "tags.css": TagsCSS,
}
func copyAssets(params Params) error {