Skip to content

Commit bf05346

Browse files
committed
blogifierdotnet#267 - Main Layout
1 parent 2064021 commit bf05346

File tree

8 files changed

+149
-234
lines changed

8 files changed

+149
-234
lines changed

src/Blogifier.Admin/Shared/MainLayout.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<AuthorizeView>
88
<Authorized>
99
<NavMenu />
10-
<div class="container content">
10+
<div class="content">
1111
@Body
1212
</div>
1313
</Authorized>

src/Blogifier.Admin/Shared/NavMenu.razor

Lines changed: 104 additions & 94 deletions
Large diffs are not rendered by default.

src/Blogifier.Admin/wwwroot/admin/css/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Blogifier.Admin/wwwroot/admin/css/app.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Blogifier.Admin/wwwroot/admin/scss/helpers/_variables.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $default: #fff;
44
$warning: #ff8d00;
55

66
// body
7-
$body-bg: #f8f9fa;
7+
$body-bg: #fff;
88
$font-size-base: .875rem;
99
$body-color: #111;
1010
$link-color: $blogifier;
@@ -80,5 +80,6 @@ $hljs-sky: #2f6f9f;
8080
$container-max-widths: (
8181
sm: 540px,
8282
md: 720px,
83-
lg: 960px
83+
lg: 960px,
84+
xl: 1200px
8485
);
Lines changed: 31 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,142 +1,44 @@
1-
.header {
2-
background-color: #fff;
3-
padding-top: 1.5rem;
4-
border-bottom: 1px solid $gray-200;
5-
margin-bottom: 3rem;
6-
}
7-
.header-nav {
8-
display: flex;
9-
list-style: none;
10-
padding: 0;
11-
margin: 0 -1rem;
12-
13-
&-link {
14-
display: block;
15-
width: 3rem;
16-
height: 3.25rem;
17-
line-height: 2.75rem;
18-
text-align: center;
19-
position: relative;
20-
color: $gray-600;
21-
outline: none !important;
22-
23-
&::after {
24-
content: "";
25-
display: block;
26-
width: 1.25rem;
27-
height: 0.125rem;
28-
background-color: transparent;
29-
position: absolute;
30-
bottom: -0.0625rem;
31-
left: 50%;
32-
transform: translateX(-50%);
33-
border-radius: 1rem;
34-
}
35-
&:focus,
36-
&:hover {
37-
color: $gray-900;
38-
}
39-
40-
&:focus {
41-
&::after {
42-
background-color: rgba(#000, 0.1);
43-
}
44-
}
45-
46-
&.active {
47-
color: $blogifier;
48-
&::after {
49-
background-color: $blogifier;
50-
}
51-
}
52-
}
53-
&-icon {
54-
line-height: 2rem;
55-
}
56-
&-img {
57-
border-radius: 100%;
58-
}
59-
}
60-
61-
.user-nav {
62-
width: 15rem;
63-
box-shadow: -1rem 1rem 5rem rgba(#000, 0.2);
64-
margin-top: 0.875rem !important;
65-
border: 0;
66-
padding: 2rem 2rem 1rem;
67-
border-radius: 0.75rem;
68-
69-
&-info {
70-
text-align: center;
71-
margin-bottom: 1.5rem;
72-
}
73-
&-img {
74-
display: block;
75-
border-radius: 100%;
76-
margin: 0 auto 0.75rem;
77-
width: 4rem;
78-
}
79-
&-name {
80-
display: block;
81-
font-weight: 500;
82-
font-size: 1rem;
83-
text-transform: capitalize;
84-
}
85-
&-email {
86-
display: block;
87-
font-size: 0.75rem;
88-
color: $gray-600;
89-
}
90-
1+
.sidebar {
2+
&::before {
3+
content: "";
4+
position: fixed;
5+
top: 0;
6+
width: 100vw;
7+
height: 100vh;
8+
background: #f8f9fa;
9+
z-index: -1;
10+
margin-left: 10rem;
11+
}
12+
13+
// one
9114
&-list {
92-
display: flex;
93-
flex-direction: column;
94-
list-style: none;
15+
@include list-unstyled;
9516
margin: 0;
96-
padding: 0;
9717
}
98-
9918
&-item {
100-
border-top: 1px solid $gray-100;
10119
}
10220
&-link {
103-
display: block;
104-
line-height: 2.5rem;
105-
padding: 0;
106-
color: $gray-600;
107-
font-weight: 500;
108-
font-size: 0.75rem;
109-
display: flex;
110-
align-items: center;
111-
&:focus,
112-
&:hover {
113-
color: $blogifier;
114-
}
115-
&.-logout {
116-
&:focus,
117-
&:hover {
118-
color: $danger;
119-
}
120-
}
21+
padding-left: 2rem;
22+
line-height: 2rem;
23+
height: 2rem;
24+
position: relative;
12125
}
122-
26+
&-img,
12327
&-icon {
124-
margin-right: 1rem;
125-
width: 1rem;
28+
position: absolute;
29+
top: 50%;
30+
left: 0;
31+
transform: translateY(-50%);
12632
}
12733

128-
&-blogifier {
129-
border-top: 1px solid $gray-200;
130-
display: block;
131-
text-align: center;
132-
color: $gray-500;
133-
line-height: 3rem;
34+
// two
35+
&-sublist {
36+
@include list-unstyled;
37+
margin: 0;
38+
padding-left: 2rem;
13439
}
135-
}
136-
137-
@media screen and (max-width: 960px) {
138-
// remove the negative margin on .header-nav when it's alsmost near the contianer width.
139-
.header-nav {
140-
margin: 0 -.5rem;
40+
&-subitem {
41+
}
42+
&-sublink {
14143
}
14244
}

src/Blogifier.Admin/wwwroot/admin/scss/layout/_main.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,18 @@ body {
1010
}
1111

1212
.blogifier {
13+
height: 100%;
1314
// app
1415
}
1516

1617
.content {
1718
margin-bottom: 3rem;
19+
flex-grow: 1;
20+
padding-left: 1.5rem;
21+
padding-top: 1.5rem;
22+
}
23+
.sidebar {
24+
min-width: 10rem;
1825
}
1926

2027
.footer {

src/Blogifier.Admin/wwwroot/index.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<body>
2525

26-
<div id="app" class="blogifier">
26+
<div id="app" class="blogifier d-flex container">
2727
<div class="blogifier-loading d-flex">
2828
<div class="spinner-border text-blogifier m-auto" role="status"></div>
2929
</div>
@@ -51,11 +51,6 @@
5151
<input type="submit" value="Upload" />
5252
</form>
5353

54-
<div class="footer">
55-
<div class="container">
56-
&copy; <a href="https://blogifier.net" target="_blank" ref="nofollow">Blogifier v3.0</a>
57-
</div>
58-
</div>
5954

6055
<script src="admin/js/frameworks/jquery.min.js"></script>
6156
<script src="admin/js/frameworks/bootstrap.bundle.min.js"></script>

0 commit comments

Comments
 (0)