File tree 12 files changed +39
-23
lines changed
12 files changed +39
-23
lines changed Original file line number Diff line number Diff line change 2
2
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/devtest.css?v={{AssetVersion}}">
3
3
<div class="page-content devtest">
4
4
<div class="ui container">
5
- <h1 class="gt-border-secondary-bottom">Flex List (standalone)</h1>
5
+ <h1>Flex List (standalone)</h1>
6
+ <div class="divider"></div>
6
7
<div class="flex-list">
7
8
<div class="flex-item">
8
9
<div class="flex-item-leading">
85
86
</div>
86
87
</div>
87
88
88
- <div class="divider gt-my-0 "></div>
89
+ <div class="divider"></div>
89
90
90
91
<h1>Flex List (with "ui segment")</h1>
91
92
<div class="ui attached segment">
101
102
<div class="flex-item">item 2</div>
102
103
</div>
103
104
</div>
105
+
106
+ <h1>If parent provides the padding/margin space:</h1>
107
+ <div class="gt-border-secondary gt-py-4">
108
+ <div class="flex-list flex-space-fitted">
109
+ <div class="flex-item">item 1 (no padding top)</div>
110
+ <div class="flex-item">item 2 (no padding bottom)</div>
111
+ </div>
112
+ </div>
104
113
</div>
105
114
</div>
106
115
{{template "base/footer" .}}
Original file line number Diff line number Diff line change 12
12
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
13
13
</div>
14
14
</form>
15
- <div class="{{if .PackageDescriptors}}flex-list{{end}} gt-pt-4" >
15
+ <div>
16
16
{{range .PackageDescriptors}}
17
+ <div class="flex-list">
17
18
<div class="flex-item">
18
19
<div class="flex-item-main">
19
20
<div class="flex-item-title">
34
35
</div>
35
36
</div>
36
37
</div>
38
+ </div>
37
39
{{else}}
38
40
{{if not .HasPackages}}
39
41
<div class="empty center">
46
48
<p>{{.locale.Tr "packages.empty.documentation" "https://docs.gitea.com/usage/packages/overview/" | Safe}}</p>
47
49
</div>
48
50
{{else}}
49
- <p>{{.locale.Tr "packages.filter.no_result"}}</p>
51
+ <p class="gt-py-4" >{{.locale.Tr "packages.filter.no_result"}}</p>
50
52
{{end}}
51
53
{{end}}
52
54
{{template "base/paginate" .}}
Original file line number Diff line number Diff line change 18
18
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
19
19
</div>
20
20
</form>
21
- <div class="{{if .PackageDescriptors}}flex-list{{end}} gt-pt-4" >
21
+ <div>
22
22
{{range .PackageDescriptors}}
23
+ <div class="flex-list">
23
24
<div class="flex-item">
24
25
<div class="flex-item-main">
25
26
<a class="flex-item-title" href="{{.FullWebLink}}">{{.Version.LowerVersion}}</a>
28
29
</div>
29
30
</div>
30
31
</div>
32
+ </div>
31
33
{{else}}
32
- <p>{{.locale.Tr "packages.filter.no_result"}}</p>
34
+ <p class="gt-py-4" >{{.locale.Tr "packages.filter.no_result"}}</p>
33
35
{{end}}
34
36
{{template "base/paginate" .}}
35
37
</div>
Original file line number Diff line number Diff line change 1
- <div class="flex-list gt-m-0 ">
1
+ <div class="flex-list">
2
2
{{if eq (len .Runs) 0}}
3
3
<div class="empty center">
4
4
{{svg "octicon-no-entry" 48}}
Original file line number Diff line number Diff line change 11
11
</div>
12
12
</h4>
13
13
<div class="ui attached segment">
14
- <div class="{{if not .HasError}}gt-hidden{{end}} gt-mb-4 " id="add-deploy-key-panel">
14
+ <div class="{{if not .HasError}}gt-hidden{{end}}" id="add-deploy-key-panel">
15
15
<form class="ui form" action="{{.Link}}" method="post">
16
16
{{.CsrfTokenHtml}}
17
17
<div class="field">
Original file line number Diff line number Diff line change 1
- <div id="issue-list" class="flex-list gt-pt-4 ">
1
+ <div id="issue-list" class="flex-list">
2
2
{{$approvalCounts := .ApprovalCounts}}
3
3
{{range .Issues}}
4
4
<div class="flex-item flex-item-baseline">
Original file line number Diff line number Diff line change 116
116
<div class="flex-item-body">{{TimeSince .GetCreate $.locale}}</div>
117
117
</div>
118
118
<div class="flex-item-trailing">
119
- {{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32}}
119
+ {{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "text grey gt-mr-2" }}
120
120
</div>
121
121
</div>
122
122
{{end}}
Original file line number Diff line number Diff line change 17
17
</div>
18
18
{{end}}
19
19
{{template "user/heatmap" .}}
20
- <div class="feeds">
21
- {{template "user/dashboard/feeds" .}}
22
- </div>
20
+ {{template "user/dashboard/feeds" .}}
23
21
{{else if eq .TabName "stars"}}
24
22
<div class="stars">
25
23
{{template "explore/repo_search" .}}
Original file line number Diff line number Diff line change 5
5
</div>
6
6
</h4>
7
7
<div class="ui attached segment">
8
- <div class="{{if not .HasGPGError}}gt-hidden{{end}} gt-mb-4 " id="add-gpg-key-panel">
8
+ <div class="{{if not .HasGPGError}}gt-hidden{{end}}" id="add-gpg-key-panel">
9
9
<form class="ui form{{if .HasGPGError}} error{{end}}" action="{{.Link}}" method="post">
10
10
{{.CsrfTokenHtml}}
11
11
<input type="hidden" name="title" value="none">
Original file line number Diff line number Diff line change 7
7
</div>
8
8
</h4>
9
9
<div class="ui attached segment">
10
- <div class="{{if not .HasSSHError}}gt-hidden{{end}} gt-mb-4 " id="add-ssh-key-panel">
10
+ <div class="{{if not .HasSSHError}}gt-hidden{{end}}" id="add-ssh-key-panel">
11
11
<form class="ui form" action="{{.Link}}" method="post">
12
12
{{.CsrfTokenHtml}}
13
13
<div class="field {{if .Err_Title}}error{{end}}">
Original file line number Diff line number Diff line change 95
95
position : static;
96
96
}
97
97
}
98
-
99
- .feeds code {
100
- padding : 2px 4px ;
101
- border-radius : var (--border-radius );
102
- background-color : var (--color-markup-code-block );
103
- word-break : break-all;
104
- }
Original file line number Diff line number Diff line change 91
91
border-top : 1px solid var (--color-secondary );
92
92
}
93
93
94
- /* Fomantic UI segment has default "padding: 1em", so here it removes the padding-top and padding-bottom accordingly */
94
+ /* Fomantic UI segment has default "padding: 1em", so here it removes the padding-top and padding-bottom accordingly.
95
+ Developers could also use "flex-space-fitted" class to remove the first item's padding-top and the last item's padding-bottom */
96
+ .flex-list .flex-space-fitted > .flex-item : first-child ,
95
97
.ui .segment > .flex-list : first-child > .flex-item : first-child {
96
98
padding-top : 0 ;
97
99
}
98
100
101
+ .flex-list .flex-space-fitted > .flex-item : last-child ,
99
102
.ui .segment > .flex-list : last-child > .flex-item : last-child {
100
103
padding-bottom : 0 ;
101
104
}
105
+
106
+ /* If there is a divider besides the flex-list, some padding/margin are not needs */
107
+ .divider + .flex-list > .flex-item : first-child {
108
+ padding-top : 0 ;
109
+ }
110
+
111
+ .flex-list + .divider {
112
+ margin-top : 0 ;
113
+ }
You can’t perform that action at this time.
0 commit comments