Skip to content

Commit 0d0af03

Browse files
authored
Merge pull request go-gitea#199 from ethantkoenig/ufw/template
UI tweaks to 'View on Door43' button
2 parents 7950fa0 + b01bb7b commit 0d0af03

File tree

5 files changed

+92
-43
lines changed

5 files changed

+92
-43
lines changed

options/locale/locale_en-US.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,3 +1444,8 @@ error.failed_retrieval_gpg_keys = "Failed to retrieve any key attached to the co
14441444
[units]
14451445
error.no_unit_allowed_repo = Cannot find any unit on this repository which you are allowed to access
14461446
error.unit_not_allowed = You are not allowed to visit this repository unit
1447+
1448+
; unfoldingWord-specific locales
1449+
1450+
[repo]
1451+
see_on_door43 = See on Door43

public/css/index.css

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
}
77
@font-face {
88
font-family: "SBL Hebrew";
9-
src: url(themes/default/assets/fonts/SBL_Hbrw.ttf) format("truetype"),
10-
url(themes/default/assets/fonts/SBL_Hbrw.woff) format("woff");
11-
unicode-range: U+0590-05FF; /* only applies to Hebrew characters */
9+
src: url(themes/default/assets/fonts/SBL_Hbrw.ttf) format("truetype"), url(themes/default/assets/fonts/SBL_Hbrw.woff) format("woff");
10+
unicode-range: U+0590-05FF;
11+
12+
/* only applies to Hebrew characters */
1213
}
1314
body {
1415
font-family: "SBL Hebrew", "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
@@ -436,28 +437,28 @@ footer .ui.language .menu {
436437
}
437438
@media only screen and (max-width: 1200px) {
438439
.ui.menu.new-menu {
439-
overflow-x: auto !important;
440-
justify-content: left !important;
441-
padding-bottom: 5px;
440+
overflow-x: auto !important;
441+
justify-content: left !important;
442+
padding-bottom: 5px;
442443
}
443444
.ui.menu.new-menu::-webkit-scrollbar {
444-
height: 8px;
445-
display: none;
445+
height: 8px;
446+
display: none;
446447
}
447448
.ui.menu.new-menu:hover::-webkit-scrollbar {
448449
display: block;
449450
}
450451
.ui.menu.new-menu::-webkit-scrollbar-track {
451-
background: rgba(0,0,0,0.01);
452+
background: rgba(0, 0, 0, 0.01);
452453
}
453454
.ui.menu.new-menu::-webkit-scrollbar-thumb {
454-
background:rgba(0,0,0,0.2);
455+
background: rgba(0, 0, 0, 0.2);
455456
}
456457
.ui.menu.new-menu:after {
457458
position: absolute;
458459
margin-top: -15px;
459460
display: block;
460-
background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 100%);
461+
background-image: linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff 100%);
461462
content: ' ';
462463
right: 0;
463464
height: 53px;
@@ -862,7 +863,7 @@ footer .ui.language .menu {
862863
border: solid 1px #ccc;
863864
border-bottom-color: #bbb;
864865
border-radius: 3px;
865-
box-shadow: inset 0 -1px 0 #bbb;
866+
box-shadow: inset 0 -1px 0 #bbbbbb;
866867
}
867868
.markdown:not(code) input[type="checkbox"] {
868869
vertical-align: middle !important;
@@ -938,7 +939,7 @@ footer .ui.language .menu {
938939
}
939940
.install form label {
940941
text-align: right;
941-
width: 320px !important;
942+
width: 320px;
942943
}
943944
.install form input {
944945
width: 35% !important;
@@ -947,7 +948,7 @@ footer .ui.language .menu {
947948
text-align: left;
948949
}
949950
.install form .field .help {
950-
margin-left: 335px !important;
951+
margin-left: 335px;
951952
}
952953
.install form .field.optional .title {
953954
margin-left: 38%;
@@ -982,18 +983,18 @@ footer .ui.language .menu {
982983
text-align: center;
983984
}
984985
#create-page-form form .header {
985-
padding-left: 280px !important;
986+
padding-left: 280px;
986987
}
987988
#create-page-form form .inline.field > label {
988989
text-align: right;
989-
width: 250px !important;
990+
width: 250px;
990991
word-wrap: break-word;
991992
}
992993
#create-page-form form .help {
993-
margin-left: 265px !important;
994+
margin-left: 265px;
994995
}
995996
#create-page-form form .optional .title {
996-
margin-left: 250px !important;
997+
margin-left: 250px;
997998
}
998999
#create-page-form form input,
9991000
#create-page-form form textarea {
@@ -1039,30 +1040,30 @@ footer .ui.language .menu {
10391040
.user.reset.password form .header,
10401041
.user.signin form .header,
10411042
.user.signup form .header {
1042-
padding-left: 280px !important;
1043+
padding-left: 280px;
10431044
}
10441045
.user.activate form .inline.field > label,
10451046
.user.forgot.password form .inline.field > label,
10461047
.user.reset.password form .inline.field > label,
10471048
.user.signin form .inline.field > label,
10481049
.user.signup form .inline.field > label {
10491050
text-align: right;
1050-
width: 250px !important;
1051+
width: 250px;
10511052
word-wrap: break-word;
10521053
}
10531054
.user.activate form .help,
10541055
.user.forgot.password form .help,
10551056
.user.reset.password form .help,
10561057
.user.signin form .help,
10571058
.user.signup form .help {
1058-
margin-left: 265px !important;
1059+
margin-left: 265px;
10591060
}
10601061
.user.activate form .optional .title,
10611062
.user.forgot.password form .optional .title,
10621063
.user.reset.password form .optional .title,
10631064
.user.signin form .optional .title,
10641065
.user.signup form .optional .title {
1065-
margin-left: 250px !important;
1066+
margin-left: 250px;
10661067
}
10671068
.user.activate form input,
10681069
.user.forgot.password form input,
@@ -1096,7 +1097,7 @@ footer .ui.language .menu {
10961097
.user.reset.password form .inline.field > label,
10971098
.user.signin form .inline.field > label,
10981099
.user.signup form .inline.field > label {
1099-
width: 200px !important;
1100+
width: 200px;
11001101
}
11011102
.repository.new.repo form,
11021103
.repository.new.migrate form,
@@ -1112,24 +1113,24 @@ footer .ui.language .menu {
11121113
.repository.new.repo form .header,
11131114
.repository.new.migrate form .header,
11141115
.repository.new.fork form .header {
1115-
padding-left: 280px !important;
1116+
padding-left: 280px;
11161117
}
11171118
.repository.new.repo form .inline.field > label,
11181119
.repository.new.migrate form .inline.field > label,
11191120
.repository.new.fork form .inline.field > label {
11201121
text-align: right;
1121-
width: 250px !important;
1122+
width: 250px;
11221123
word-wrap: break-word;
11231124
}
11241125
.repository.new.repo form .help,
11251126
.repository.new.migrate form .help,
11261127
.repository.new.fork form .help {
1127-
margin-left: 265px !important;
1128+
margin-left: 265px;
11281129
}
11291130
.repository.new.repo form .optional .title,
11301131
.repository.new.migrate form .optional .title,
11311132
.repository.new.fork form .optional .title {
1132-
margin-left: 250px !important;
1133+
margin-left: 250px;
11331134
}
11341135
.repository.new.repo form input,
11351136
.repository.new.migrate form input,
@@ -1164,7 +1165,7 @@ footer .ui.language .menu {
11641165
width: 50%!important;
11651166
}
11661167
.repository.new.repo .ui.form #auto-init {
1167-
margin-left: 265px !important;
1168+
margin-left: 265px;
11681169
}
11691170
.new.webhook form .help {
11701171
margin-left: 25px;
@@ -2680,18 +2681,18 @@ table[data-table-type="yaml-metadata"] {
26802681
text-align: center;
26812682
}
26822683
.organization.new.org form .header {
2683-
padding-left: 280px !important;
2684+
padding-left: 280px;
26842685
}
26852686
.organization.new.org form .inline.field > label {
26862687
text-align: right;
2687-
width: 250px !important;
2688+
width: 250px;
26882689
word-wrap: break-word;
26892690
}
26902691
.organization.new.org form .help {
2691-
margin-left: 265px !important;
2692+
margin-left: 265px;
26922693
}
26932694
.organization.new.org form .optional .title {
2694-
margin-left: 250px !important;
2695+
margin-left: 250px;
26952696
}
26962697
.organization.new.org form input,
26972698
.organization.new.org form textarea {
@@ -3110,3 +3111,22 @@ table[data-table-type="yaml-metadata"] {
31103111
.ui.user.list .item .description a:hover {
31113112
text-decoration: underline;
31123113
}
3114+
.no-padding-button {
3115+
display: inline-flex;
3116+
padding: 0px !important;
3117+
}
3118+
.door43-logo {
3119+
height: 20px;
3120+
width: 20px;
3121+
margin-top: -12px;
3122+
margin-bottom: -8px;
3123+
vertical-align: middle;
3124+
display: inline-block;
3125+
}
3126+
.empty-icon {
3127+
width: 0px !important;
3128+
margin: 0 0 0 0 !important;
3129+
}
3130+
.empty-icon:before {
3131+
content: "\200b";
3132+
}

public/less/_unfoldingWord.less

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@door43-logo-size: 20px;
2+
3+
.no-padding-button {
4+
display: inline-flex;
5+
padding: 0px !important;
6+
}
7+
8+
.door43-logo {
9+
height: @door43-logo-size;
10+
width: @door43-logo-size;
11+
margin-top: -0.6 * @door43-logo-size;
12+
margin-bottom: -0.4 * @door43-logo-size;
13+
vertical-align: middle;
14+
display: inline-block;
15+
}
16+
17+
.empty-icon {
18+
width: 0px !important;
19+
margin: 0 0 0 0 !important;
20+
&:before {
21+
content: "\200b"; // zero-width space
22+
}
23+
}

public/less/index.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
@import "_dashboard";
1212
@import "_admin";
1313
@import "_explore";
14+
@import "_unfoldingWord";

templates/repo/header.tmpl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="ui vertically padded grid head"><!-- start grid -->
55
<div class="column"><!-- start column -->
66
<div class="ui header">
7-
<div class="ui left huge breadcrumb">
7+
<div class="ui huge breadcrumb">
88
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
99
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
1010
<div class="divider"> / </div>
@@ -13,10 +13,18 @@
1313
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
1414
</div>
1515

16-
<div class="ui right" style="margin-top:5px">
16+
<div class="ui right">
17+
<div class="no-padding-button" tabindex="0">
18+
<a class="ui button" target="_blank" href="https://live.door43.org/u/{{.Owner.Name}}/{{.Name}}/">
19+
<!-- empty icon ensures that this button is same size as Watch/Star/Fork buttons -->
20+
<i class="icon empty-icon"></i>
21+
<img class="door43-logo" src="/img/door43.png"/>
22+
<span>{{$.i18n.Tr "repo.see_on_door43"}}</span>
23+
</a>
24+
</div>
1725
<div class="ui labeled button" tabindex="0">
1826
<a class="ui button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
19-
<i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
27+
<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>
2028
</a>
2129
<a class="ui basic label" href="{{.Link}}/watchers">
2230
{{.NumWatches}}
@@ -41,14 +49,6 @@
4149
</div>
4250
{{end}}
4351
</div>
44-
45-
<div class="ui middle" style="margin: 0 auto; text-align:center;">
46-
<div class="ui button" tabindex="0" style="padding: 0; box-shadow: 5px 5px 5px #888888; margin-top: 1px;">
47-
<a href="https://live.door43.org/u/{{.Owner.Name}}/{{.Name}}/" style="padding: 7px;" class="ui button" target="_blank">
48-
View this on <img src="/img/door43.png" width="20px" valign="middle"/>
49-
</a>
50-
</div>
51-
</div>
5252
</div>
5353
</div><!-- end column -->
5454
</div><!-- end grid -->

0 commit comments

Comments
 (0)