Skip to content

Commit

Permalink
improve module style
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinem committed Aug 31, 2024
1 parent cdc4875 commit 81f0262
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
1 change: 1 addition & 0 deletions lib/rdoc/generator/template/darkfish/css/rdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -741,3 +741,4 @@ main .attribute-access-type {
}
}
/* @end */

11 changes: 6 additions & 5 deletions lib/rdoc/generator/template/rorvswild/class.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
<h1 id="<%=h klass.aref %>" class="<%= klass.type %>">
<%= klass.type %> <%= klass.full_name %>
</h1>

<%= klass.description %>


<%- klass.each_section do |section, constants, attributes| -%>
<section id="<%= section.aref %>" class="documentation-section">
<%- if section.title then -%>
<header class="documentation-section-title">
<h2>
<h3>
<%= section.title %>
</h2>
</h3>
<span class="section-click-top">
<a href="#top">&uarr; top</a>
</span>
Expand Down Expand Up @@ -58,7 +59,7 @@
<%- unless attributes.empty? then -%>
<section class="attribute-method-details" class="method-section">
<header>
<h3>Attributes</h3>
<h2>Attributes</h2>
</header>

<%- attributes.each do |attrib| -%>
Expand Down Expand Up @@ -86,7 +87,7 @@
next if methods.empty? %>
<section id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details" class="method-section">
<header>
<h3><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h3>
<h2><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h2>
</header>

<%- methods.each do |method| -%>
Expand Down
20 changes: 10 additions & 10 deletions lib/rdoc/generator/template/rorvswild/css/rdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -605,9 +605,6 @@ main dd p {

main header h2 {
margin-top: 2em;
border-width: 0;
border-top: 4px solid #bbb;
font-size: 130%;
}

main header h3 {
Expand Down Expand Up @@ -691,7 +688,7 @@ main .method-source-code {
}

main .method-source-code.active-menu {
max-height: 100vh;
max-height: none;
}

main .method-description .method-calls-super {
Expand All @@ -700,16 +697,16 @@ main .method-description .method-calls-super {
}

main .method-detail {
margin-bottom: 2.5em;
margin: 2em 0 0;
cursor: pointer;
}

main .method-heading {
position: relative;
font-family: var(--font-code);
font-size: 1rem;
font-size: 1.2rem;
font-weight: bold;
color: var(--text-color);
color: var(--primary-color);
}

main .method-heading span {
Expand All @@ -735,11 +732,9 @@ main .method-header:hover .method-click-advice {
visibility: visible;
}



main .method-description,
main .aliases {
margin-top: 0.75em;
margin-top: 0.5em;
color: oklch(50% 0.03 269);
}

Expand All @@ -748,6 +743,11 @@ main .aliases {
font-style: italic;
cursor: default;
}

main .method-description p {
margin: 0;
}

main .method-description ul {
margin-left: 1.5em;
}
Expand Down

0 comments on commit 81f0262

Please sign in to comment.