Browse Source

templates: Start over

Use standard icon for favicon and avatar.
Use native font stack.
master
Thedro Neely 2 months ago
parent
commit
10f027de65
10 changed files with 5574 additions and 152 deletions
  1. +5493
    -0
      public/css/index.css
  2. +36
    -116
      public/css/override.css
  3. BIN
      public/img/favicon.ico
  4. BIN
      public/img/favicon.png
  5. +1
    -0
      public/img/gitea-sm.png
  6. +36
    -0
      templates/base/footer.tmpl
  7. +0
    -23
      templates/base/head.tmpl
  8. +4
    -9
      templates/base/head_navbar.tmpl
  9. +2
    -2
      templates/repo/header.tmpl
  10. +2
    -2
      templates/repo/home.tmpl

+ 5493
- 0
public/css/index.css
File diff suppressed because it is too large
View File


+ 36
- 116
public/css/override.css View File

@@ -1,133 +1,53 @@
/*
* Reset
*/
body { overflow-y: scroll; }
a, .ui.breadcrumb a { color: #0366d6; }
#repo-files-table .message a, .repository.file.list #repo-files-table .jumpable-path { color: #4e555e; }
a:hover { text-decoration: underline; }
a, .ui.breadcrumb a { color: #0055b5; }
a.active.item { border-bottom-color: transparent !important; }

@media (min-width: 768px) { .following.bar .item.brand { padding-left: 0; } }
@media only screen and (min-width: 1200px) { .dashboard-navbar, .ui.container { width: 1088px !important; margin-left: auto; margin-right: auto; } }
@media only screen and (min-width: 992px) and (max-width: 1199px) { .dashboard-navbar, .ui.container{ width: 933px !important; margin-left: auto; margin-right: auto; } }
@media only screen and (max-width: 991px) and (min-width: 768px) { .dashboard-navbar, .ui.container { width: 95% !important; margin-left: auto; margin-right: auto; } }

.item .description .has-emoji { display: none; }
.explore .navbar, .ui.menu.new-menu { padding-bottom: 15px; }

/*
* Hide specific octicons
*/
.octicon-tools,
.octicon-sign-in, .item .octicon-repo, .item .octicon-person,
.item .octicon-organization, .mega-octicon, .ui.basic.small.compact.button .octicon-git-branch { display: none !important; }
button#clipboard-btn { display: none; }

.dashboard .dashboard-navbar { display: none; }
.dashboard > .ui.divider { display: none; }

/*
* Button overrides
*/
.button, .ui.basic.button, .ui.basic.buttons .button, .ui .sha.label,
.ui.basic.blue.button, .ui.basic.blue.buttons {
background: linear-gradient(-180deg, #fafbfc, #eff3f6 90%) !important;
color: #444 !important;
border: 1px solid #ccc !important;
box-shadow: none !important;
}
.ui.labeled.button, .ui.basic.buttons { border: none !important; }
.item .ui.label { border-radius: 1rem; background-color: #e8e9eb !important; color: #444 !important; font-weight: 700; }

#git-graph-container #graph-canvas { display: none; }

/*
* Override font stack
*/
*:not(i):not(.octicon):not(.mono):not(pre):not(code):not(span):not(li) { font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,
Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol !important; }


/*
* Override repo header names font weight
*/
.ui.list .list>.item .header, .ui.list>.item .header { font-weight: 400 !important }
.ui .text.grey { color: #545454!important; }
.ui.container .six.wide.column { display: none; }
.ui.secondary.pointing.menu { border-bottom: none; }
.ui.basic.button, .ui.basic.buttons .button { color: #111; }
.ui.secondary.pointing.menu .dropdown.item:active, .ui.secondary.pointing.menu .link.item:active, .ui.secondary.pointing.menu a.item:active { border-color: transparent; }

.ui.tabular.menu .item { color: #111; }
.ui.borderless.pagination.menu { border: none; }
.ui.repository.list .item .ui.header .metas { display: none; }
.ui.list .list > .item .header, .ui.list > .item .header { font-weight: 400; }
.ui.top.secondary.stackable.main.menu.following.bar.light { position: sticky; top: 0; }

/*
* Override explore repos header names font weight
*/
.ui.secondary.pointing.menu .active.item { font-weight: 400 !important; background-color: #f2f2f2 !important; }
#user-heatmap { display: block; }


/*
* Repository page override
*/
.repo-topic, .repository .repo-header .fork-flag {
display: inline-block;
margin-left: 0.5rem;
background-color: #e8e9eb !important;
border-radius: 0.5rem !important;
padding: 0 0.5rem;
}
.repo-title a:nth-child(4) { font-weight: 700; }
.repo-header .repo-title, .repo-header .repo-buttons { margin-top: 0.5rem !important; }

.repository .header-wrapper { background-color: #fafbfc; }
.repository .navbar .ui.label { padding: 0.25rem 0.75rem; border-radius: 1rem; background-color: #e8e9eb; color: #555; font-weight: 700; }
.repository.file.list #repo-desc, .repo-description { font-size: 1rem !important; margin: 0.75rem 0; }

.repository .item { border-top: 3px solid transparent; }
.repository a.item { padding: 0.5rem 1.5rem !important; }
.repository .ui.tabs.divider { margin-top: -1px; }
.repository.commits .five.wide.column { display: flex; align-self: center; }
.repository.commits .eleven.wide.right.aligned.column form { display: flex; align-items: center; justify-content: flex-end; }

.ui.label { color: #145180; font-weight: 400; font-size: 0.9rem !important; }
.ui.breadcrumb .divider { font-weight: 700; color: #000; }
.ui.table td { padding: 0.57145rem; }
.ui.tabular.menu .item { color: #444; }
.ui.tabular.menu .active.item { font-weight: 400; }
.ui.attached.header { background: #f9fafb; }
.ui.attached.header .right { margin-top: 0; }
.ui.compact.button, .ui.compact.buttons .button { padding: 0.5rem 1rem; font-weight: 700; }
.ui.table > tbody > tr > td, .ui.table > tr > td { padding: 8px; }

.repo-title .divider { margin: 0; }
.repo-topics, .ui.repo-description { display: none !important; }
.repo-topics-custom, .ui.repo-description-custom { display: block !important; }

.ui.segment.sub-menu { display: none; }
.ui.secondary.pointing.menu { border-bottom: none; }
.ui.tabs.container { overflow-x: auto; overflow-y: hidden; }
.ui.tabular.menu .item:hover { color: #0366d6; }

.user.profile .ui.stackable.grid .eleven { width: 100% !important; }
.user.profile .ui.stackable.grid .five { display: none; }

.repository.file.list #repo-files-table a:hover { text-decoration: underline; }
.repository.file.list #repo-files-table tr:hover, .ui.basic.table tbody tr:hover,
.repository #commits-table.ui.basic.striped.table tbody tr:hover:nth-child(2n) { background-color: #ffffe3 !important; }
.repository #commits-table td.author a:hover { text-decoration: underline; color: #0366d6; }
#repo-files-table .message a:hover, #repo-files-table .name a:hover,
#repo-clone-https, #clone-panel #clipboard-btn { border-right-width: 0 !important; }


/*
* Explore Page
*/
.ui.menu.new-menu, .admin .new-menu, .explore .navbar { padding: 0.75rem 0 !important; }
.ui.secondary.pointing.menu .item { border: none !important; }
.ui.menu.new-menu { background-color: transparent !important; }
.explore .navbar { background-color: transparent !important; margin-bottom: 0 !important; }


/*
* Pagination
*/
.pagination { border: none !important; }


/*
* User Profile
*/
.user.profile .ui.stackable.grid .eleven { width: 100% !important; margin: 0 auto; }
.user.profile .ui.secondary.stackable.pointing.menu { justify-content: center; }
.user.profile .ui.secondary.stackable.pointing.menu i { display: none; }


/*
* Navigation Bar
*/
#navbar > .item:first-child { margin-left: -1.5rem !important; }
#navbar .right > .item:last-child { margin-right: -1.125rem !important; }
.repo-title i { display: none; }
.repo-description-topics-hide { display: none !important; }
.repository #commits-table td.sha .sha.label, .repository #repo-files-table .sha.label { border: 1px solid transparent; color: #004799; }
.repository .diff-box .header .file { color: #111; }
.repository .repo-header .fork-flag { margin: 1rem 0 0.5rem 0; background-color: #eee; padding: 0.5rem; border-radius: 0.5rem; white-space: initial; line-height: 1.5; }
.repository .ui.attached.header .right { margin-top: 0; }
.repository .ui.menu:not(.vertical) .right.menu { margin-left: initial !important; }
.repository .ui.segment.sub-menu { display: none; }
.repository .ui.table > tbody > tr > td, .ui.table > tr > td { padding: 8px; }
.repository .ui.tabs.container { overflow-x: auto; overflow-y: hidden; }
.repository .ui.tabs.divider { margin-bottom: 15px; }
.repository .ui.tabular.menu .active.item { font-weight: 400; }
.repository.commits .five.wide.column { display: flex; align-self: center; }
.repository.file.list #repo-desc, .repo-description { font-size: 1rem !important; }

BIN
public/img/favicon.ico View File

Before After

BIN
public/img/favicon.png View File

Before After
Width: 32  |  Height: 32  |  Size: 785B Width: 32  |  Height: 32  |  Size: 11KB

+ 1
- 0
public/img/gitea-sm.png View File

@@ -0,0 +1 @@
favicon.png

+ 36
- 0
templates/base/footer.tmpl View File

@@ -0,0 +1,36 @@
{{/*
<html>
<body>
<div>
*/}}

{{template "custom/body_inner_post" .}}

</div>

{{template "custom/body_outer_post" .}}

{{template "base/footer_content" .}}

<script src="{{StaticUrlPrefix}}/vendor/plugins/jquery/jquery.min.js?v=3.4.1"></script>
<script src="{{StaticUrlPrefix}}/vendor/plugins/jquery-migrate/jquery-migrate.min.js?v=3.0.1"></script>
<script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.areyousure/jquery.are-you-sure.js"></script>

<!-- Third-party libraries -->
<script src="{{StaticUrlPrefix}}/vendor/plugins/emojify/emojify.custom.js"></script>
<script src="{{StaticUrlPrefix}}/vendor/plugins/clipboard/clipboard.min.js"></script>
<script src="{{StaticUrlPrefix}}/vendor/plugins/vue/vue.min.js"></script>

<!-- JavaScript -->
<script src="{{StaticUrlPrefix}}/vendor/plugins/fomantic/semantic.min.js?v={{MD5 AppVer}}"></script>
<script src="{{StaticUrlPrefix}}/js/index.js?v={{MD5 AppVer}}"></script>
{{if .EnableHeatmap}}
<script src="{{StaticUrlPrefix}}/vendor/plugins/moment/moment.min.js" charset="utf-8"></script>
<script src="{{StaticUrlPrefix}}/vendor/plugins/vue-calendar-heatmap/vue-calendar-heatmap.browser.js" charset="utf-8"></script>
<script type="text/javascript">
window.initHeatmap('user-heatmap', '{{.HeatmapUser}}');
</script>
{{end}}
{{template "custom/footer" .}}
</body>
</html>

+ 0
- 23
templates/base/head.tmpl View File

@@ -95,14 +95,6 @@
<noscript><link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css"></noscript>
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/assets/octicons/octicons.min.css">

{{if .RequireSimpleMDE}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.css">
{{end}}

{{if .RequireTribute}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/tribute/tribute.css">
{{end}}

<!-- Stylesheet -->
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/fomantic/semantic.min.css?v={{MD5 AppVer}}">
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/index.css?v={{MD5 AppVer}}">
@@ -113,26 +105,11 @@
</style>
</noscript>

{{if .RequireHighlightJS}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/highlight/github.css">
{{end}}
{{if .RequireMinicolors}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/jquery.minicolors/jquery.minicolors.css">
{{end}}
{{if .RequireDatetimepicker}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.css">
{{end}}
{{if .RequireDropzone}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.css">
{{end}}
{{if .EnableHeatmap}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/vue-calendar-heatmap/vue-calendar-heatmap.css">
{{end}}
<style class="list-search-style"></style>

<script src="{{StaticUrlPrefix}}/vendor/plugins/promise-polyfill/polyfill.min.js"></script>
<script src="{{StaticUrlPrefix}}/vendor/plugins/cssrelpreload/loadCSS.min.js"></script>
<script src="{{StaticUrlPrefix}}/vendor/plugins/cssrelpreload/cssrelpreload.min.js"></script>
{{if .PageIsUserProfile}}
<meta property="og:title" content="{{.Owner.Name}}" />
<meta property="og:type" content="profile" />


+ 4
- 9
templates/base/head_navbar.tmpl View File

@@ -1,8 +1,7 @@
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<a title="Head back to https://www.thedroneely.com" href="/">
<img style="display: inline;" class="ui mini image" src="{{AppSubUrl}}/img/favicon.png">
<span style="margin-left: 0.65em;">www.thedroneely.com</span>
<a href="{{AppSubUrl}}/">
<img class="ui mini image" src="{{StaticUrlPrefix}}/img/gitea-sm.png">
</a>
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i>
@@ -75,7 +74,7 @@
<span class="text">
<img class="ui tiny avatar image" src="{{.SignedUser.RelAvatarLink}}">
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
<span class="mobile-only">{{.SignedUser.Name}}</span>
<span>{{.SignedUser.Name}}</span>
<i class="fitted octicon octicon-triangle-down not-mobile" tabindex="-1"></i>
</span>
<div class="menu user-menu" tabindex="-1">
@@ -96,10 +95,6 @@
<i class="octicon octicon-settings"></i>
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
</a>
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
<i class="octicon octicon-question"></i>
{{.i18n.Tr "help"}}<!-- Help -->
</a>
{{if .IsAdmin}}
<div class="divider"></div>

@@ -120,7 +115,7 @@

{{else}}

<!-- <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a> -->
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a>
<div class="right stackable menu">
{{if .ShowRegistrationButton}}
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">


+ 2
- 2
templates/repo/header.tmpl View File

@@ -11,13 +11,13 @@
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
<div class="divider"> / </div>
<a href="{{$.RepoLink}}">{{.Name}}</a>
<small>{{SizeFmt .Size}}</small>
{{if and .RelAvatarLink .IsPrivate}}<i class="mega-octicon octicon-lock"></i>{{end}}
{{if .IsTemplate}}<i class="icon fa-copy"></i>{{end}}
{{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
{{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}">{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}</a></div>{{end}}
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
{{if .IsGenerated}}<div class="fork-flag">{{$.i18n.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{SubStr .TemplateRepo.RelLink 1 -1}}</a></div>{{end}}
<small>{{SizeFmt .Size}}</small>
</div>
{{if not .IsBeingCreated}}
<div class="repo-buttons">
@@ -100,7 +100,7 @@
</a>

<a class="{{if .PageIsCommits}}active{{end}} item"
href="{{.RepoLink}}/commits{{if .IsViewBranch}}/branch{{else if .IsViewTag}}/tag{{else if .IsViewCommit}}/commit{{end}}/{{EscapePound .BranchName}}">
href="{{.RepoLink}}/commits{{if .IsViewBranch}}/branch{{else if .IsViewTag}}/tag{{else if .IsViewCommit}}/commit{{end}}/{{.Repository.DefaultBranch}}">
<i class="octicon octicon-clock"></i>
{{.i18n.Tr "repo.commits"}}
<span class="ui small label">{{or .CommitsCount "0"}}</span>


+ 2
- 2
templates/repo/home.tmpl View File

@@ -3,7 +3,7 @@
{{template "repo/header" .}}
<div class="ui container">
{{template "base/alert" .}}
<div class="ui repo-description">
<div class="ui repo-description repo-description-topics-hide">
<div id="repo-desc">
{{if .Repository.DescriptionHTML}}<span class="description has-emoji">{{.Repository.DescriptionHTML}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
@@ -23,7 +23,7 @@
</div>
{{end}}
</div>
<div class="ui repo-topics" id="repo-topics">
<div class="ui repo-description-topics-hide" id="repo-topics">
{{range .Topics}}<a class="ui repo-topic small label topic" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<a id="manage_topic">{{.i18n.Tr "repo.topic.manage_topics"}}</a>{{end}}
</div>


Loading…
Cancel
Save