File tree Expand file tree Collapse file tree 5 files changed +59
-37
lines changed
lib/ex_doc/formatter/html/templates Expand file tree Collapse file tree 5 files changed +59
-37
lines changed Original file line number Diff line number Diff line change 16
16
}
17
17
18
18
.content-inner .detail-header {
19
- margin : 2 0 1 em ;
20
- padding : 0.5em 1em ;
19
+ margin : 1 em 0 ;
20
+ padding : 0.5em 0.85 em 0.5 em 1em ;
21
21
background-color : var (--textDetailBackground );
22
22
border-left : 3px solid var (--textDetailAccent );
23
23
font-size : 1em ;
Original file line number Diff line number Diff line change
1
+ .content-inner .heading-with-actions {
2
+ display : flex;
3
+ justify-content : space-between;
4
+ align-items : start;
5
+ gap : 6px ;
6
+ }
7
+ .content-inner .top-heading {
8
+ padding-top : 1rem ;
9
+ }
10
+ .content-inner .heading-with-actions h1 {
11
+ flex-grow : 1 ;
12
+ margin : 0 ;
13
+ }
14
+ .content-inner .heading-with-actions .icon-action {
15
+ flex-grow : 0 ;
16
+ width : 20px ;
17
+ height : 20px ;
18
+ display : flex;
19
+ justify-content : center;
20
+ align-items : center;
21
+ font-weight : normal;
22
+ }
23
+ .content-inner .heading-with-actions .top-heading .icon-action {
24
+ padding-top : 1.5rem ;
25
+ font-size : 1.2rem ;
26
+ }
27
+
1
28
.content-inner {
2
29
font-family : var (--defaultFontFamily );
3
30
font-size : 1em ;
32
59
font-weight : 300 ;
33
60
}
34
61
35
- .content-inner h1 .icon-action {
36
- font-size : 1.2rem ;
37
- font-weight : normal;
38
- }
39
-
40
62
.content-inner h2 {
41
63
font-size : 1.6em ;
42
64
padding-top : 1em ;
65
87
}
66
88
67
89
.content-inner .icon-action {
68
- float : right;
69
90
color : var (--iconAction );
70
91
text-decoration : none;
71
92
border : none;
72
93
transition : color 0.3s ease-in-out;
73
94
background-color : transparent;
74
95
cursor : pointer;
75
96
}
76
- .content-inner button .icon-action {
77
- margin-top : 12px ;
78
- }
79
97
.content-inner .icon-action : hover {
80
98
color : var (--iconActionHover );
81
99
}
Original file line number Diff line number Diff line change 6
6
<a href="#<%=enc node.id %>" class="detail-link" data-no-tooltip aria-label="Link to this <%= pretty_type(node) %>">
7
7
<i class="ri-link-m" aria-hidden="true"></i>
8
8
</a>
9
- <h1 class="signature" translate="no"><%=h node.signature %></h1>
10
- <%= if node.source_url do %>
11
- <a href="<%= node.source_url %>" class="icon-action" rel="help" aria-label="View Source">
12
- <i class="ri-code-s-slash-line" aria-hidden="true"></i>
13
- </a>
14
- <% end %>
15
- <%= for annotation <- node.annotations do %>
16
- <span class="note">(<%= annotation %>)</span>
17
- <% end %>
9
+ <div class="heading-with-actions">
10
+ <h1 class="signature" translate="no"><%=h node.signature %></h1>
11
+ <%= if node.source_url do %>
12
+ <a href="<%= node.source_url %>" class="icon-action" rel="help" aria-label="View Source">
13
+ <i class="ri-code-s-slash-line" aria-hidden="true"></i>
14
+ </a>
15
+ <% end %>
16
+ <%= for annotation <- node.annotations do %>
17
+ <span class="note">(<%= annotation %>)</span>
18
+ <% end %>
19
+ </div>
18
20
</div>
19
21
<%= if deprecated = node.deprecated do %>
20
22
<div class="deprecated">
Original file line number Diff line number Diff line change 2
2
<%= sidebar_template(config, type, nodes_map) %>
3
3
4
4
<div id="top-content">
5
- <h1>
5
+ <div class="heading-with-actions top-heading">
6
+ <h1><%= node.title_content %></h1>
7
+ <%= if type == :cheatmd do %>
8
+ <button onclick="window.print()" title="Print Cheatsheet" class="icon-action" rel="print">
9
+ <i class="ri-printer-line" aria-hidden="true"></i>
10
+ <span class="sr-only">Print Cheatsheet</span>
11
+ </button>
12
+ <% end %>
6
13
<%= if node.source_url do %>
7
14
<a href="<%= node.source_url %>" title="View Source" class="icon-action" rel="help">
8
15
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
9
16
<span class="sr-only">View Source</span>
10
17
</a>
11
18
<% end %>
12
- <%= if type == :cheatmd do %>
13
- <button onclick="window.print()" title="Print Cheatsheet" class="icon-action" rel="print">
14
- <i class="ri-printer-line" aria-hidden="true"></i>
15
- <span class="sr-only">Print cheatsheet</span>
16
- </button>
17
- <% end %>
18
-
19
- <span><%= node.title_content %></span>
20
- </h1>
19
+ </div>
21
20
22
21
<%= if type == :livemd do %>
23
22
<div class="livebook-badge-container">
Original file line number Diff line number Diff line change 2
2
<%= sidebar_template(config, module.type, nodes_map) %>
3
3
4
4
<div id="top-content">
5
- <h1>
5
+ <div class="heading-with-actions top-heading">
6
+ <h1>
7
+ <span translate="no"><%= module.title %></span> <%= module_type(module) %>
8
+ <small class="app-vsn" translate="no">(<%= config.project %> v<%= config.version %>)</small>
9
+ <%= for annotation <- module.annotations do %>
10
+ <span class="note">(<%= annotation %>)</span>
11
+ <% end %>
12
+ </h1>
6
13
<%= if module.source_url do %>
7
14
<a href="<%= module.source_url %>" title="View Source" class="icon-action" rel="help">
8
15
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
9
16
<span class="sr-only">View Source</span>
10
17
</a>
11
18
<% end %>
12
- <span translate="no"><%= module.title %></span> <%= module_type(module) %>
13
- <small class="app-vsn" translate="no">(<%= config.project %> v<%= config.version %>)</small>
14
- <%= for annotation <- module.annotations do %>
15
- <span class="note">(<%= annotation %>)</span>
16
- <% end %>
17
- </h1>
19
+ </div>
18
20
19
21
<%= if deprecated = module.deprecated do %>
20
22
<div class="deprecated">
54
56
</div>
55
57
</section>
56
58
<% end %>
59
+
57
60
<%= footer_template(config, module) %>
You can’t perform that action at this time.
0 commit comments