From 93e5b95455cb4521ac5c50da6e0b16600564ee01 Mon Sep 17 00:00:00 2001 From: Gerben Date: Tue, 20 Mar 2018 18:00:15 +0100 Subject: [PATCH] Move repo description to repo header --- public/custom-style.css | 29 +++++++++++++++++++++++++++++ templates/repo/header.tmpl | 16 ++++++++++------ templates/repo/home.tmpl | 6 +----- 3 files changed, 40 insertions(+), 11 deletions(-) diff --git a/public/custom-style.css b/public/custom-style.css index 6a3ce6f..60ed609 100644 --- a/public/custom-style.css +++ b/public/custom-style.css @@ -2,3 +2,32 @@ /* Since we have no footer bar, reduce padding */ padding-bottom: 15px; } + +.repository .repo-header { + padding: 0.5rem 0; +} +.repository .header-grid > * { + padding-top: 1rem; + padding-bottom: 0.5rem; +} +.repository .header-grid { + align-items: flex-end; + align-items: last baseline; +} + +.repository .mega-octicon { + margin-right: 0.5rem; +} +.repository .header-grid .fork-flag { + margin-left: 0; +} + +/* These rules are copied here to pull them out of their nesting. */ +.repo-description { + display: flex; + justify-content: space-between; + align-items: center; +} +#repo-desc { + font-size: 1.2em; +} \ No newline at end of file diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 8a037a1..6f872b5 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -1,17 +1,21 @@
{{with .Repository}} -
+
-
+ -
+
+
+ {{if .DescriptionHTML}}{{.DescriptionHTML}}{{end}} + {{.Website}} +
+
{{end}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 91db56c..f13b365 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -3,11 +3,7 @@ {{template "repo/header" .}}
{{template "base/alert" .}} -
-
- {{if .Repository.DescriptionHTML}}{{.Repository.DescriptionHTML}}{{else if .IsRepositoryAdmin}}{{.i18n.Tr "repo.no_desc"}}{{end}} - {{.Repository.Website}} -
+
{{if .RepoSearchEnabled}}