Skip to content

Commit

Permalink
Several fixes
Browse files Browse the repository at this point in the history
* Ensure h1 has a minimal height
* Ensure the whole background is either black or white
* Remove additional padding under keyboard shortcuts
* Remove duplication on search template
  • Loading branch information
josevalim committed Jan 11, 2022
1 parent 13664d9 commit 454e1ae
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 32 deletions.
25 changes: 10 additions & 15 deletions assets/js/handlebars/templates/search-results.handlebars
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
{{#if value}}
<h1>
<h1>
{{#if value}}
Search results for <em>{{value}}</em>
<button class="settings display-settings">
<i class="ri-settings-3-line"></i>
<span class="sr-only">Settings</span>
</button>
</h1>
{{else}}
<h1 id="content">
{{else}}
Invalid Search
<button class="settings display-settings">
<i class="ri-settings-3-line"></i>
<span class="sr-only">Settings</span>
</button>
</h1>
{{/if}}
{{/if}}

<button class="settings display-settings">
<i class="ri-settings-3-line"></i>
<span class="sr-only">Settings</span>
</button>
</h1>

{{#isNonEmptyArray results}}
{{#each results}}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const modalTabs = [
id: 'modal-settings-tab'
},
{
title: 'Keyboard Shortcuts',
title: 'Keyboard shortcuts',
id: 'modal-keyboard-shortcuts-tab'
}
]
Expand Down
1 change: 1 addition & 0 deletions assets/less/content/general.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ h6 {
h1 {
font-size: 2em;
margin: 1em 0 .5em;
min-height: 30px;

&.signature {
margin: 0;
Expand Down
4 changes: 4 additions & 0 deletions assets/less/keyboard-shortcuts.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
padding: 6px 0;
}

dl.shortcut-row:first-child {
padding-top: 0;
}

.shortcut-keys {
display: inline-block;
}
Expand Down
3 changes: 1 addition & 2 deletions assets/less/layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body {
}

body {
background-color: @offWhite;
background-color: @white;
color: @black;
font-size: 16px;
font-family: @sansFontFamily;
Expand Down Expand Up @@ -172,7 +172,6 @@ body.sidebar-closed .sidebar {
}

.content-outer {
background-color: @white;
min-height: 100%;
}

Expand Down
2 changes: 1 addition & 1 deletion assets/less/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
.modal-title {
display: inline-block;
flex-grow: 1;
font-size: 1.3rem;
font-size: 1.2rem;
font-weight: bold;
margin-bottom: 20px;

Expand Down
4 changes: 0 additions & 4 deletions assets/less/night/night.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
body.night-mode {
background: @nightBackground;

.content-outer {
background: @nightBackground;
}

.night-mode-toggle .icon-theme::before {
content: "\e901";
}
Expand Down
1 change: 0 additions & 1 deletion assets/less/variables/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
@yellow: #ffffdd;
@deprecated: #ffff9d;
@darkDeprecated: #dcc100;
@offWhite: #E5E5E5;

// Light mode
@darkGrayTextHeaders: #0D1829; // gray 800
Expand Down

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions formatters/html/dist/elixir-80d4603576b77cca433d.css

This file was deleted.

2 changes: 2 additions & 0 deletions formatters/html/dist/elixir-925acc81db1bc46f1558.css

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions formatters/html/dist/erlang-0a9ce46b606f84f0a0ba.css

This file was deleted.

2 changes: 2 additions & 0 deletions formatters/html/dist/erlang-d0a1de5e2f9743ebbcf5.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/ex_doc/formatter/html/templates/search_template.eex
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<%= head_template(config, %{title: "Search", type: :search}) %>
<%= sidebar_template(config, nodes_map) %>

<div id="search">
<h1 id="content">
Page not found
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<button class="settings display-settings">
<i class="ri-settings-3-line"></i>
<span class="sr-only">Settings</span>
<i class="ri-settings-3-line"></i>
<span class="sr-only">Settings</span>
</button>

0 comments on commit 454e1ae

Please sign in to comment.