Skip to content

Commit 643d856

Browse files
committed
Merge branch 'improvement/layout-optimizations' into develop
Made a number of improvements to the layout. These include: - Made navigation (cc02a42) and topic information (38c6e50) sticky - Introduced basic responsiveness for buttons (18be165), title (18be165), and navigation (89893ea) While I was at it, I also consolidated the `sidebar` related styles into `_layout.scss` (4d1e0a2, fda3b0c).
2 parents 2e0ddb4 + fe9678a commit 643d856

9 files changed

Lines changed: 26 additions & 32 deletions

File tree

OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Edit.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
</div>
6666

6767
@if (!Model.IsModal) {
68-
<div class="col-lg-3 callouts">
68+
<div class="col-lg-3 callouts d-none d-lg-block">
6969
<div class="callout topic-info">
7070

7171
<h3 class="h5">Topic Information</h3>

OnTopic.Editor.AspNetCore/Areas/Editor/Views/Shared/_Layout.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<div class="row">
3535

3636
<!-- Site Name -->
37-
<div class="col-md-2 col-sm-3 logotype lockup">
37+
<div class="col-md-2 col-sm-3 d-none d-lg-block logotype lockup">
3838
<a href="~/">OnTopic</a>
3939
</div>
4040
<!-- /Site Name -->
@@ -56,7 +56,7 @@
5656

5757
<!-- Primary (Treeview) Sidebar -->
5858
@if (!Model.IsModal) {
59-
<nav id="Sidebar" class="col-md-2 col-sm-3 sidebar" role="navigation">
59+
<nav id="Sidebar" class="col-md-2 col-sm-3 sidebar d-none d-sm-block" role="navigation">
6060
<div id="FixedSidebar">
6161
<div id="TreeView"></div>
6262
<text>

OnTopic.Editor.AspNetCore/Areas/Editor/Views/Shared/_Toolbar.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
@if (Model.Topic.VersionHistory.Count > 1) {
1313
<!-- Versions -->
14-
<div id="VersionsDropdown" class="dropdown" style="display:inline-block;">
14+
<div id="VersionsDropdown" class="dropdown d-none d-lg-inline-block" style="display:inline-block;">
1515
<button class="btn btn-sm btn-ancillary dropdown-toggle" type="button" id="VersionsButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
1616
<span class="fa fa-history"></span>
1717
Versions
@@ -36,7 +36,7 @@
3636

3737
<!-- Export -->
3838
@if (!Model.IsModal) {
39-
<a href="@Url.Action("Export", "Editor", new { path=Model.Topic.WebPath })" class="btn btn-ancillary btn-sm">
39+
<a href="@Url.Action("Export", "Editor", new { path=Model.Topic.WebPath })" class="btn btn-ancillary btn-sm d-none d-lg-inline-block">
4040
<span class="fa fa-arrow-down"></span>
4141
Export
4242
</a>

OnTopic.Editor.AspNetCore/Shared/Styles/Base/_buttons.scss

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,4 @@
6262
margin-left : 4px;
6363
}
6464
}
65-
}
66-
67-
//----------------------------------------------------------------------------------------------
68-
// SIDEBAR
69-
//----------------------------------------------------------------------------------------------
70-
.sidebar {
71-
.btn {
72-
margin-top : 20px;
73-
width : 100%;
74-
}
75-
7665
}

OnTopic.Editor.AspNetCore/Shared/Styles/Base/_callouts.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
//----------------------------------------------------------------------------------------------
2323
.callout {
2424
&.topic-info {
25-
position : fixed;
25+
@extend .sticky-top;
26+
top : 136px+15px;
2627
border : 1px solid $grey-lighter;
2728
padding : 15px;
28-
width : 15%;
29-
max-width : 200px;
29+
width : 100%;
3030
h3,
3131
dt,
3232
dd {

OnTopic.Editor.AspNetCore/Shared/Styles/Base/_forms.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ span.radio {
128128
padding : .1rem !important;
129129
}
130130

131-
//----------------------------------------------------------------------------------------------
132-
// BUTTONS
133-
//----------------------------------------------------------------------------------------------
134-
135131
//----------------------------------------------------------------------------------------------
136132
// VALIDATION
137133
//----------------------------------------------------------------------------------------------

OnTopic.Editor.AspNetCore/Shared/Styles/Base/_lists.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
padding-right: 10px;
3636
}
3737
}
38-
}
38+
}

OnTopic.Editor.AspNetCore/Shared/Styles/Components/TreeView/_treeView.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,14 @@
1313
// LAYOUT
1414
//----------------------------------------------------------------------------------------------
1515
.sidebar {
16-
padding-top : 50px;
17-
padding-left : 0px;
1816
.treeview {
1917
margin-left : -16px; //Compensates .x-tree-node-indent
20-
margin-bottom : 25px;
2118
input[type="checkbox"] {
2219
display : none;
2320
}
2421
}
2522
}
2623

27-
//----------------------------------------------------------------------------------------------
28-
// CORE
29-
//----------------------------------------------------------------------------------------------
30-
31-
3224
//----------------------------------------------------------------------------------------------
3325
// OVERRIDES
3426
//----------------------------------------------------------------------------------------------

OnTopic.Editor.AspNetCore/Shared/Styles/Layout/_layout.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,23 @@ body {
8383
}
8484
}
8585

86+
//----------------------------------------------------------------------------------------------
87+
// SIDEBAR
88+
//----------------------------------------------------------------------------------------------
89+
.sidebar {
90+
padding-left : 0px;
91+
padding-top : 50px;
92+
}
93+
94+
#FixedSidebar {
95+
@extend .sticky-top;
96+
top : 136px;
97+
.btn, select {
98+
margin-bottom : 20px;
99+
width : 100%;
100+
}
101+
}
102+
86103
//----------------------------------------------------------------------------------------------
87104
// PRIMARY CONTENT AREA
88105
//----------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)