-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_layout.scss
More file actions
161 lines (131 loc) · 2.64 KB
/
_layout.scss
File metadata and controls
161 lines (131 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// Overall layout styling
// Main page div wrapper sets up our virtual screen
#microwave_screen {
// Double-div required to prevent width creep, paired with #microwave_container
width: $width;
max-width: $width;
margin: 0 auto; // Center container
overflow: hidden;
}
#microwave_container {
// Prevents width creep by contained elements
display: block;
width: $width;
height: $height;
margin: 0 auto;
}
// On the screen we can have a number of different layout structures
// 1. An uneven three column layout
// 2. A menu/tab layout
// 3. A fullscreen layout
%layout_parent {
position: relative; // Allow absolute positioning of children
width: $width;
height: $height;
}
%layout_child {
display: block;
height: 100%;
vertical-align: top;
position: absolute;
}
#three_column_layout {
/* Small left column
* Small right column
* Bulk of content in center
* Footer - across all three
*/
@extend %layout_parent;
%three_column_child {
@extend %layout_child;
height: $height - $footer_height;
// Allow easier layout of children
display: flex;
flex-direction: column;
}
.left_col {
@extend %three_column_child;
left: 0;
width: $col_width;
}
.right_col {
@extend %three_column_child;
right: 0;
width: $col_width;
}
.center_col {
@extend %three_column_child;
left: $col_width;
width: $width - $col_width - $col_width;
}
.footer {
@extend %layout_child;
left: 0;
bottom: 0;
width: 100%;
height: $footer_height;
}
}
#menu_layout {
/* A two column layout
* The left column is a menu with a list of category links as tabs
* The main column is the body, different pages selected by the category links
*
* This layout uses bootstrap classes for styling and structure
*/
@extend %layout_parent;
.left_col {
@extend %layout_child;
left: 0;
width: $col_width;
height: $height;
.nav {
margin-top: 60px;
li {
margin: 0;
}
}
}
.center_col {
@extend %layout_child;
left: $col_width;
width: $width - $col_width;
height: $height;
}
}
#full_screen_layout {
@extend %layout_parent;
.center_col {
@extend %layout_child;
overflow-y: scroll;
max-height: $height;
}
}
#full_screen_with_footer_layout {
@extend #full_screen_layout;
.center_col {
max-height: $height - $footer_height;
}
.footer {
@extend %layout_child;
left: 0;
bottom: 0;
width: 100%;
height: $footer_height;
}
#stop.footer {
// TODO: Doesnt' belong here
// TODO: Zero margin looks bad :(
margin: 0 20px;
}
}
// Some inner element layout options
.btn-container {
display: table;
table-layout: fixed;
border-spacing: 5px;
margin: 0 auto;
& > a {
display: table-cell;
}
}