Skip to content

Commit

Permalink
Make improvements to the YARD layout
Browse files Browse the repository at this point in the history
* Adjust padding/margin around and inside of blockquotes
* Use ems for p margin
* Since we will be adding a custom file whose title is camel-case,
  make two changes to the header:
  * Drop "File:" in the header for files
  * Change styles for header and search to use standard case instead
    of all caps, and drop letter spacing
* Make footer smaller and more human readable
  • Loading branch information
mcmire committed Oct 9, 2015
1 parent ada9bd3 commit 6f8b7e1
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
17 changes: 17 additions & 0 deletions doc_config/yard/templates/default/fulldoc/html/css/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,20 @@ ul, ol {
margin-left: 1em;
padding-left: 1em;
}

p, blockquote {
margin-bottom: 1.25em;
}

blockquote {
font-style: italic;
padding-top: 0;
padding-bottom: 0;
padding-left: 1em;
}

blockquote p {
font-size: inherit;
font-weight: inherit;
line-height: inherit;
}
7 changes: 3 additions & 4 deletions doc_config/yard/templates/default/fulldoc/html/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,17 @@ h4 + h5 {
#menu, #search {
height: 6rem;
line-height: 6rem;
text-transform: uppercase;
font-size: 1.1em;
}
#main {
top: 6rem;
}

#menu {
float: left;
letter-spacing: 1px;
padding-left: 2em;
position: relative;
width: 30em;
width: 45em;
}

#menu .noframes {
Expand All @@ -111,7 +110,6 @@ h4 + h5 {

#search {
float: right;
font-size: 0.9em;
}

#search ul {
Expand Down Expand Up @@ -201,6 +199,7 @@ h4 + h5 {
padding: 10px;
text-align: center;
text-shadow: 0 1px 1px rgba(0,0,0,0.4);
font-size: 0.9em;
}

#footer a {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</span> &raquo;
<% end %>
<% if @contents || @file %>
<span class="title"><%= @breadcrumb_title %></span>
<span class="title"><%= @breadcrumb_title.sub(/\AFile: /, "") %></span>
<% elsif object.is_a?(CodeObjects::Base) %>
<%= @breadcrumb.map {|obj| "<span class='title'>" + linkify(obj, obj.name) + "</span>" }.join(" &raquo; ") %>
<%= @breadcrumb.size > 0 ? " &raquo; " : "" %>
Expand Down
6 changes: 6 additions & 0 deletions doc_config/yard/templates/default/layout/html/footer.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div id="footer">
Generated on
<%= Time.now.strftime("%B %-d, %Y") %>
by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">YARD</a>.
</div>

0 comments on commit 6f8b7e1

Please sign in to comment.