Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Commit 178e603

Browse files
committed
Improves the sidebar display and adds fake content
1 parent b8c6395 commit 178e603

9 files changed

Lines changed: 65 additions & 32 deletions

File tree

content/texts/en/index.yml

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
index:
2-
header:
3-
title: Project skeleton
4-
subtitle: This is a project example
5-
content: >
6-
Check out the [skeleton readme](https://github.com/ginetta/Skeleton/blob/master/README.md) for more infos
2+
sidebar:
3+
subtitle:
4+
navigation:
5+
- title: Base Components
6+
list:
7+
- title: Colors
8+
link: #
9+
- title: Grid
10+
link: #
11+
- title: Icons
12+
link: #
13+
- title: Typography
14+
link: #
15+
- title: UI Components
16+
list:
17+
- title: Buttons
18+
link: #
19+
- title: Dropdown
20+
link: #
21+
- title: Form element
22+
link: #
23+
- title: Link
24+
link: #
25+
- title: Partials
26+
list:
27+
- title: Header
28+
link: #
29+
- title: Navigation
30+
link: #
31+
- title: Footer
32+
link: #
33+
- title: Pages
34+
list:
35+
- title: Home with a veryyyyy long title
36+
link: #

src/modules/header/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
}
44
.styleguide-title {
55
@include t-paragraph();
6+
color: $c-cloud;
67
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
data:
22
title: list title
33
list:
4-
item: Item 1
4+
title: Item 1
55
link: #
6-
item: Item 2
6+
title: Item 2
77
link: #
8-
item: Item 3
8+
title: Item 3
99
link: #
1010
options: {}

src/modules/nav-group/style.scss

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
$nav-space-left: 24px !default;
2-
$nav-space-left-half: 0.5 * $nav-space-left;
3-
$nav-space-bottom: 24px !default;
1+
$nav-padding: 24px !default;
2+
$nav-space-bottom: $nav-padding !default;
3+
$nav-active-carret-width: 10px !default;
44

55
.nav-group {
6+
padding: $nav-padding;
7+
68
&-title {
79
@include t-label();
810
color: $c-darkcloud;
9-
padding-left: $nav-space-left;
1011
margin-bottom: $nav-space-bottom;
1112
}
13+
1214
&-list {
1315
padding: 0;
1416
margin: 0;
@@ -18,7 +20,6 @@ $nav-space-bottom: 24px !default;
1820

1921
.nav-item {
2022
position: relative;
21-
padding-left: $nav-space-left;
2223
&:hover {
2324
cursor: pointer;
2425
.nav-link {
@@ -36,11 +37,11 @@ $nav-space-bottom: 24px !default;
3637
&:before {
3738
content: '';
3839
background-color: $c-steelblue;
39-
width: $nav-space-left-half;
40+
width: $nav-active-carret-width;
4041
height: 100%;
4142
display: block;
4243
position: absolute;
43-
left: 0;
44+
left: -$nav-padding;
4445
top: 0;
4546
}
4647
}

src/pages/index.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ block meta
55
//- TODO: add you page meta tags
66
77
block body
8-
+sidebar
8+
+sidebar(data.index.sidebar)
99
.content

src/partials/sidebar/markup.jade

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ mixin sidebar(data, options)
77

88
hr
99

10-
+nav-group({
11-
title: 'ui components',
12-
list: [
13-
{ title: 'Item 1', link: '#', isActive: true },
14-
{ title: 'Item 2', link: '#' },
15-
{ title: 'Item 3', link: '#' },
16-
{ title: 'Item 4', link: '#' }
17-
]
18-
}).sidebar-content
10+
each navgroup in data.navigation
11+
+nav-group(navgroup)
12+

src/partials/sidebar/spec.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
h2 sidebar
22

3-
+sidebar
3+
+sidebar(data.index.sidebar)

src/partials/sidebar/style.scss

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
.sidebar {
2-
width: 200px;
2+
max-width: 200px;
33
height: 100%;
44
background-color: $c-eigengrau;
55
color: $c-white;
66
display: inline-block;
77
float: left;
8+
overflow-x: hidden;
9+
overflow-y: scroll;
10+
11+
hr {
12+
display: block;
13+
border: 0;
14+
border-top: 1px solid $c-cloud;
15+
}
816
}
917

1018
.sidebar-content {
11-
padding: 2rem;
19+
padding: $sidebar-padding;
1220
}

src/styles/_0.settings.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ $breakpoints: (
1616

1717
// general
1818
$s: 12px;
19-
$s-half: 0.5 * $s;
19+
$s-half: .5 * $s;
2020
$s-double: 2 * $s;
2121

22-
// nav-group
23-
$nav-space-left: $s-double;
24-
$nav-space-bottom: $s-double;
22+
$sidebar-padding: $s-double;
23+
$nav-padding: $sidebar-padding;
2524

0 commit comments

Comments
 (0)