Improved layout op public Knowledge Base:

- fix bug where search result title has to much spacing around (its a h3)
- remove border from h2
- size & spacing finetuning
- bigger spacing around hr
- add hr between categories and answers
This commit is contained in:
Felix Niklas 2019-06-06 08:26:15 +02:00 committed by Thorsten Eckel
parent b4dcfcc009
commit 986285c216
2 changed files with 47 additions and 43 deletions

View file

@ -99,10 +99,14 @@ body {
} }
h1 { h1 {
font-weight: 500; font-size: 2.5em;
font-size: 2.625em; line-height: 1.12;
line-height: 1; margin: .8em 0 .6em;
margin: 1em 0 .75em; font-weight: normal;
&:first-child {
margin-top: 0;
}
@include phone { @include phone {
font-size: 2em; font-size: 2em;
@ -110,17 +114,26 @@ h1 {
} }
h2 { h2 {
font-weight: bold; font-size: 2em;
font-size: 2.125em; font-weight: normal;
line-height: 1.2; line-height: 1.1;
margin: 1em 0 .5em; margin: 1em 0 .4em;
} }
h3 { h3 {
font-size: 1.375em; font-size: 1.5em;
font-weight: normal; font-weight: normal;
line-height: 1.3; line-height: 1.2;
margin: 0 0 .25em; margin: 1.33em 0 .55em;
letter-spacing: .015em;
}
h4 {
font-size: 1em;
font-weight: bold;
line-height: 1.25;
margin: 1.33em 0 .5em;
letter-spacing: .015em;
} }
p, p,
@ -350,6 +363,8 @@ ol {
&-title { &-title {
font-size: inherit; font-size: inherit;
font-weight: 500; font-weight: 500;
color: hsl(206,8%,38%);
margin: 0 0 .25em;
} }
&-category { &-category {
@ -364,6 +379,10 @@ ol {
&-preview { &-preview {
font-size: 14px; font-size: 14px;
} }
&-preview {
color: hsl(207,12%,50%);
}
} }
.container { .container {
@ -382,6 +401,11 @@ ol {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
margin: 30px 0 40px;
.header + & {
margin-top: 0;
}
.container { .container {
flex: 1; flex: 1;
@ -391,8 +415,6 @@ ol {
} }
.main--categories { .main--categories {
padding-bottom: 42px;
h1 { h1 {
color: $dark-color; color: $dark-color;
} }
@ -544,8 +566,10 @@ ol {
margin-top: 30px; margin-top: 30px;
} }
& + & { & + hr {
margin-top: 22px; border: none;
border-top: 1px solid hsl(219,13%,95%);
margin: 28px 0 13px;
} }
} }
@ -769,30 +793,6 @@ ol {
.article-content { .article-content {
display: block; display: block;
margin: 0 0 20px;
h1, h2, h3, h4, h5, h6 {
margin: 1.8rem 0 1.2rem;
line-height: 1.3;
font-weight: bold;
&:first-child {
margin-top: 0.5rem;
}
}
h1 {
font-size: 2em;
text-align: left;
}
h2 {
font-size: 1.5em;
}
h3 {
font-size: 1.25em;
}
p, p,
ol, ol,
@ -888,10 +888,10 @@ ol {
} }
hr { hr {
margin-top: 6px; margin-top: 13px;
margin-bottom: 6px; margin-bottom: 13px;
border: 0; border: none;
border-top: 1px solid #dfdfdf; border-top: 1px solid hsl(210,14%,91%);
} }
} }

View file

@ -26,6 +26,10 @@
</ul> </ul>
<% end %> <% end %>
<% if @categories&.present? && @answers&.present? %>
<hr>
<% end %>
<% if @answers&.present? %> <% if @answers&.present? %>
<ul class="sections sections--list" data-less-than-four="<%= @answers.length < 4 %>"> <ul class="sections sections--list" data-less-than-four="<%= @answers.length < 4 %>">
<% @answers.each do |translation| %> <% @answers.each do |translation| %>