File tree 5 files changed +27
-13
lines changed 5 files changed +27
-13
lines changed Original file line number Diff line number Diff line change 33
33
{{if not .ReadmeInList}}
34
34
<div class="file-header-right file-actions df ac">
35
35
{{if .HasSourceRenderedToggle}}
36
- <div class="ui compact icon buttons">
37
- <a href="{{$.Link}}?display=source" class="ui tiny basic button poping up {{if .IsDisplayingSource}}active{{end}}" data-content="{{.i18n.Tr "repo.file_view_source"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-code"}}</a>
38
- <a href="{{$.Link}}" class="ui tiny basic button poping up {{if .IsDisplayingRendered}}active{{end}}" data-content="{{.i18n.Tr "repo.file_view_rendered"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-file"}}</a>
36
+ <div class="ui compact icon buttons two-toggle-buttons ">
37
+ <a href="{{$.Link}}?display=source" class="ui mini basic button poping up {{if .IsDisplayingSource}}active{{end}}" data-content="{{.i18n.Tr "repo.file_view_source"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-code" 15 }}</a>
38
+ <a href="{{$.Link}}" class="ui mini basic button poping up {{if .IsDisplayingRendered}}active{{end}}" data-content="{{.i18n.Tr "repo.file_view_rendered"}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-file" 15 }}</a>
39
39
</div>
40
40
{{end}}
41
41
<div class="ui buttons mr-2">
50
50
</div>
51
51
{{if .Repository.CanEnableEditor}}
52
52
{{if .CanEditFile}}
53
- <a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span></a>
53
+ <a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span></a>
54
54
{{else}}
55
55
<span class="btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span>
56
56
{{end}}
Original file line number Diff line number Diff line change @@ -1594,6 +1594,14 @@ a.ui.label:hover {
1594
1594
border-left : none ;
1595
1595
}
1596
1596
1597
+ .two-toggle-buttons .button :not (.active ):first-of-type {
1598
+ border-right : none ;
1599
+ }
1600
+
1601
+ .two-toggle-buttons .button.active :last-of-type {
1602
+ border-left : 1px solid var (--color-light-border );
1603
+ }
1604
+
1597
1605
.ui.labeled.button.disabled > .button ,
1598
1606
.ui.basic.buttons .button ,
1599
1607
.ui.basic.button {
Original file line number Diff line number Diff line change 396
396
397
397
.file-actions {
398
398
.btn-octicon {
399
- display : inline-block ;
400
- padding : 5px ;
401
- margin-left : 5px ;
402
399
line-height : 1 ;
403
- color : var ( --color-text ) ;
400
+ padding : 10 px 8 px ;
404
401
vertical-align : middle ;
405
- background : transparent ;
406
- border : 0 ;
407
- outline : none ;
402
+ color : var (--color-text );
408
403
}
409
404
410
405
.btn-octicon :hover {
411
406
color : var (--color-primary );
412
407
}
413
408
414
409
.btn-octicon-danger :hover {
415
- color : #bd2c00 ;
410
+ color : var ( --color-red ) ;
416
411
}
417
412
418
413
.btn-octicon.disabled {
430
425
.view-raw {
431
426
padding : 5px ;
432
427
433
- * {
428
+ > * {
434
429
max-width : 100% ;
430
+ border : 1px solid var (--color-secondary );
435
431
}
436
432
437
433
img {
434
+ margin : 1rem 0 ;
438
435
border-radius : 0 ;
436
+ object-fit : contain ;
439
437
}
438
+
439
+ /* also see misc.css for one more related rule */
440
440
}
441
441
442
442
.plain-text {
Original file line number Diff line number Diff line change
1
+ /* can not have this selector in less because of https://github.com/less/less.js/issues/3027 */
2
+ .view-raw img [src $= '.svg' i] {
3
+ max-height : 600px !important ;
4
+ max-width : 600px !important ;
5
+ }
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ export default {
48
48
resolve ( __dirname , 'web_src/fomantic/build/semantic.js' ) ,
49
49
resolve ( __dirname , 'web_src/js/index.js' ) ,
50
50
resolve ( __dirname , 'web_src/fomantic/build/semantic.css' ) ,
51
+ resolve ( __dirname , 'web_src/less/misc.css' ) ,
51
52
resolve ( __dirname , 'web_src/less/index.less' ) ,
52
53
] ,
53
54
swagger : [
You can’t perform that action at this time.
0 commit comments