Skip to content

Commit

Permalink
Merge pull request gogs#199 from ethantkoenig/ufw/template
Browse files Browse the repository at this point in the history
UI tweaks to 'View on Door43' button
  • Loading branch information
jag3773 authored Jun 22, 2017
2 parents 7950fa0 + b01bb7b commit 0d0af03
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 43 deletions.
5 changes: 5 additions & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1444,3 +1444,8 @@ error.failed_retrieval_gpg_keys = "Failed to retrieve any key attached to the co
[units]
error.no_unit_allowed_repo = Cannot find any unit on this repository which you are allowed to access
error.unit_not_allowed = You are not allowed to visit this repository unit

; unfoldingWord-specific locales

[repo]
see_on_door43 = See on Door43
84 changes: 52 additions & 32 deletions public/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
}
@font-face {
font-family: "SBL Hebrew";
src: url(themes/default/assets/fonts/SBL_Hbrw.ttf) format("truetype"),
url(themes/default/assets/fonts/SBL_Hbrw.woff) format("woff");
unicode-range: U+0590-05FF; /* only applies to Hebrew characters */
src: url(themes/default/assets/fonts/SBL_Hbrw.ttf) format("truetype"), url(themes/default/assets/fonts/SBL_Hbrw.woff) format("woff");
unicode-range: U+0590-05FF;

/* only applies to Hebrew characters */
}
body {
font-family: "SBL Hebrew", "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
Expand Down Expand Up @@ -436,28 +437,28 @@ footer .ui.language .menu {
}
@media only screen and (max-width: 1200px) {
.ui.menu.new-menu {
overflow-x: auto !important;
justify-content: left !important;
padding-bottom: 5px;
overflow-x: auto !important;
justify-content: left !important;
padding-bottom: 5px;
}
.ui.menu.new-menu::-webkit-scrollbar {
height: 8px;
display: none;
height: 8px;
display: none;
}
.ui.menu.new-menu:hover::-webkit-scrollbar {
display: block;
}
.ui.menu.new-menu::-webkit-scrollbar-track {
background: rgba(0,0,0,0.01);
background: rgba(0, 0, 0, 0.01);
}
.ui.menu.new-menu::-webkit-scrollbar-thumb {
background:rgba(0,0,0,0.2);
background: rgba(0, 0, 0, 0.2);
}
.ui.menu.new-menu:after {
position: absolute;
margin-top: -15px;
display: block;
background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 100%);
background-image: linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff 100%);
content: ' ';
right: 0;
height: 53px;
Expand Down Expand Up @@ -862,7 +863,7 @@ footer .ui.language .menu {
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
box-shadow: inset 0 -1px 0 #bbbbbb;
}
.markdown:not(code) input[type="checkbox"] {
vertical-align: middle !important;
Expand Down Expand Up @@ -938,7 +939,7 @@ footer .ui.language .menu {
}
.install form label {
text-align: right;
width: 320px !important;
width: 320px;
}
.install form input {
width: 35% !important;
Expand All @@ -947,7 +948,7 @@ footer .ui.language .menu {
text-align: left;
}
.install form .field .help {
margin-left: 335px !important;
margin-left: 335px;
}
.install form .field.optional .title {
margin-left: 38%;
Expand Down Expand Up @@ -982,18 +983,18 @@ footer .ui.language .menu {
text-align: center;
}
#create-page-form form .header {
padding-left: 280px !important;
padding-left: 280px;
}
#create-page-form form .inline.field > label {
text-align: right;
width: 250px !important;
width: 250px;
word-wrap: break-word;
}
#create-page-form form .help {
margin-left: 265px !important;
margin-left: 265px;
}
#create-page-form form .optional .title {
margin-left: 250px !important;
margin-left: 250px;
}
#create-page-form form input,
#create-page-form form textarea {
Expand Down Expand Up @@ -1039,30 +1040,30 @@ footer .ui.language .menu {
.user.reset.password form .header,
.user.signin form .header,
.user.signup form .header {
padding-left: 280px !important;
padding-left: 280px;
}
.user.activate form .inline.field > label,
.user.forgot.password form .inline.field > label,
.user.reset.password form .inline.field > label,
.user.signin form .inline.field > label,
.user.signup form .inline.field > label {
text-align: right;
width: 250px !important;
width: 250px;
word-wrap: break-word;
}
.user.activate form .help,
.user.forgot.password form .help,
.user.reset.password form .help,
.user.signin form .help,
.user.signup form .help {
margin-left: 265px !important;
margin-left: 265px;
}
.user.activate form .optional .title,
.user.forgot.password form .optional .title,
.user.reset.password form .optional .title,
.user.signin form .optional .title,
.user.signup form .optional .title {
margin-left: 250px !important;
margin-left: 250px;
}
.user.activate form input,
.user.forgot.password form input,
Expand Down Expand Up @@ -1096,7 +1097,7 @@ footer .ui.language .menu {
.user.reset.password form .inline.field > label,
.user.signin form .inline.field > label,
.user.signup form .inline.field > label {
width: 200px !important;
width: 200px;
}
.repository.new.repo form,
.repository.new.migrate form,
Expand All @@ -1112,24 +1113,24 @@ footer .ui.language .menu {
.repository.new.repo form .header,
.repository.new.migrate form .header,
.repository.new.fork form .header {
padding-left: 280px !important;
padding-left: 280px;
}
.repository.new.repo form .inline.field > label,
.repository.new.migrate form .inline.field > label,
.repository.new.fork form .inline.field > label {
text-align: right;
width: 250px !important;
width: 250px;
word-wrap: break-word;
}
.repository.new.repo form .help,
.repository.new.migrate form .help,
.repository.new.fork form .help {
margin-left: 265px !important;
margin-left: 265px;
}
.repository.new.repo form .optional .title,
.repository.new.migrate form .optional .title,
.repository.new.fork form .optional .title {
margin-left: 250px !important;
margin-left: 250px;
}
.repository.new.repo form input,
.repository.new.migrate form input,
Expand Down Expand Up @@ -1164,7 +1165,7 @@ footer .ui.language .menu {
width: 50%!important;
}
.repository.new.repo .ui.form #auto-init {
margin-left: 265px !important;
margin-left: 265px;
}
.new.webhook form .help {
margin-left: 25px;
Expand Down Expand Up @@ -2680,18 +2681,18 @@ table[data-table-type="yaml-metadata"] {
text-align: center;
}
.organization.new.org form .header {
padding-left: 280px !important;
padding-left: 280px;
}
.organization.new.org form .inline.field > label {
text-align: right;
width: 250px !important;
width: 250px;
word-wrap: break-word;
}
.organization.new.org form .help {
margin-left: 265px !important;
margin-left: 265px;
}
.organization.new.org form .optional .title {
margin-left: 250px !important;
margin-left: 250px;
}
.organization.new.org form input,
.organization.new.org form textarea {
Expand Down Expand Up @@ -3110,3 +3111,22 @@ table[data-table-type="yaml-metadata"] {
.ui.user.list .item .description a:hover {
text-decoration: underline;
}
.no-padding-button {
display: inline-flex;
padding: 0px !important;
}
.door43-logo {
height: 20px;
width: 20px;
margin-top: -12px;
margin-bottom: -8px;
vertical-align: middle;
display: inline-block;
}
.empty-icon {
width: 0px !important;
margin: 0 0 0 0 !important;
}
.empty-icon:before {
content: "\200b";
}
23 changes: 23 additions & 0 deletions public/less/_unfoldingWord.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@door43-logo-size: 20px;

.no-padding-button {
display: inline-flex;
padding: 0px !important;
}

.door43-logo {
height: @door43-logo-size;
width: @door43-logo-size;
margin-top: -0.6 * @door43-logo-size;
margin-bottom: -0.4 * @door43-logo-size;
vertical-align: middle;
display: inline-block;
}

.empty-icon {
width: 0px !important;
margin: 0 0 0 0 !important;
&:before {
content: "\200b"; // zero-width space
}
}
1 change: 1 addition & 0 deletions public/less/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
@import "_dashboard";
@import "_admin";
@import "_explore";
@import "_unfoldingWord";
22 changes: 11 additions & 11 deletions templates/repo/header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="ui vertically padded grid head"><!-- start grid -->
<div class="column"><!-- start column -->
<div class="ui header">
<div class="ui left huge breadcrumb">
<div class="ui huge breadcrumb">
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
<div class="divider"> / </div>
Expand All @@ -13,10 +13,18 @@
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
</div>

<div class="ui right" style="margin-top:5px">
<div class="ui right">
<div class="no-padding-button" tabindex="0">
<a class="ui button" target="_blank" href="https://live.door43.org/u/{{.Owner.Name}}/{{.Name}}/">
<!-- empty icon ensures that this button is same size as Watch/Star/Fork buttons -->
<i class="icon empty-icon"></i>
<img class="door43-logo" src="/img/door43.png"/>
<span>{{$.i18n.Tr "repo.see_on_door43"}}</span>
</a>
</div>
<div class="ui labeled button" tabindex="0">
<a class="ui button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
<i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
<i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i><span>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}</span>
</a>
<a class="ui basic label" href="{{.Link}}/watchers">
{{.NumWatches}}
Expand All @@ -41,14 +49,6 @@
</div>
{{end}}
</div>

<div class="ui middle" style="margin: 0 auto; text-align:center;">
<div class="ui button" tabindex="0" style="padding: 0; box-shadow: 5px 5px 5px #888888; margin-top: 1px;">
<a href="https://live.door43.org/u/{{.Owner.Name}}/{{.Name}}/" style="padding: 7px;" class="ui button" target="_blank">
View this on <img src="/img/door43.png" width="20px" valign="middle"/>
</a>
</div>
</div>
</div>
</div><!-- end column -->
</div><!-- end grid -->
Expand Down

0 comments on commit 0d0af03

Please sign in to comment.