Skip to content

Commit 23f6ecb

Browse files
authored
Merge pull request #128 from caleblloyd/f_sticky_sidebar
docs: footer, sticky header and sidebar
2 parents 06c88f2 + d013812 commit 23f6ecb

File tree

4 files changed

+77
-10
lines changed

4 files changed

+77
-10
lines changed

docs/layouts/partials/footer.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
</div>
3636
<!-- container -->
3737

38+
<footer class="footer">
39+
<div class="container-fluid">
40+
<div class="row">
41+
<div id="footerContent" class="col-sm-12">
42+
Free and open source under the
43+
<a href="https://github.com/mysql-net/MySqlConnector/blob/master/LICENSE">MIT License</a>
44+
</div>
45+
</div>
46+
</div>
47+
</footer>
48+
3849
<!-- js -->
3950
<script type="text/javascript" src="vendor/jquery/js/jquery-2.1.4.min.js"></script>
4051
<script type="text/javascript" src="vendor/bootstrap/js/bootstrap.min.js"></script>

docs/layouts/partials/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
<body>
4141

42-
<nav class="navbar navbar-default">
42+
<nav class="navbar navbar-default navbar-fixed-top">
4343
<div class="container">
4444
<div class="col-xs-8 navbar-mysqlc-logo">
4545
<a href="">

docs/layouts/partials/menu.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ $cur := . }}
22
<div class="col-md-3">
3-
<div class="list-group" id="navigation">
3+
<div class="list-group" id="navigation" data-spy="affix" data-offset-top="0">
44

55
{{ range $i, $el := .Site.Menus.main }}
66
<a class="list-group-item{{ if or ($cur.IsMenuCurrent "main" .) ($cur.HasMenuCurrent "main" .) (and (eq $i 0) ($cur.IsHome)) }} active{{ end }}" href="{{ if .HasChildren }}#nav-{{ $i }}{{ else }}{{ .URL }}{{ end }}" data-parent="#navigation"{{ if .HasChildren }} data-toggle="collapse"{{end}}>

docs/static/css/style.css

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
html {
2+
position: relative;
3+
min-height: 100%;
4+
}
5+
6+
body {
7+
padding-top: 70px;
8+
margin-bottom: 40px;
9+
}
10+
111
#navigation {
212
margin-top: 20px;
313
}
@@ -7,17 +17,17 @@
717
margin-right: 5px;
818
}
919

10-
.navbar-mysqlc-logo{
20+
.navbar-mysqlc-logo {
1121
padding: 10px 0 0 15px;
1222
}
1323

14-
.navbar-mysqlc-logo a{
24+
.navbar-mysqlc-logo a {
1525
color: #777;
1626
font-size: 18px;
1727
padding: 0 12px 0 0;
1828
}
1929

20-
.navbar-mysqlc-logo a:hover{
30+
.navbar-mysqlc-logo a:hover {
2131
text-decoration: none;
2232
}
2333

@@ -35,6 +45,31 @@
3545
border-radius: 0;
3646
}
3747

48+
@media (max-width: 991px) {
49+
.affix {
50+
position: static;
51+
}
52+
}
53+
54+
@media (min-width: 992px) {
55+
.affix {
56+
top: 70px;
57+
position: fixed;
58+
}
59+
}
60+
61+
@media only screen and (min-width : 992px) {
62+
#navigation{
63+
width: 212px;
64+
}
65+
}
66+
67+
@media only screen and (min-width : 1200px) {
68+
#navigation{
69+
width: 262px;
70+
}
71+
}
72+
3873
.submenu a:hover, .submenu a:active,
3974
.submenu a.active, .submenu a.active:hover, .submenu a.active:active {
4075
background: #44b5f6;
@@ -48,17 +83,38 @@
4883
}
4984

5085
#prevNext {
51-
margin-top: 20px;
86+
margin: 20px 0;
5287
}
5388

54-
pre{
89+
pre {
5590
padding: 0;
5691
}
5792

58-
h1{
93+
h1 {
5994
margin-bottom: 20px;
6095
}
6196

62-
h2{
97+
h2 {
6398
margin-bottom: 20px;
64-
}
99+
}
100+
101+
.footer {
102+
position: absolute;
103+
bottom: 0;
104+
left: 0;
105+
width: 100%;
106+
height: 40px;
107+
background-color: #f5f5f5;
108+
border: 1px solid #e7e7e7;
109+
border-width: 1px 0 0 0;
110+
}
111+
112+
#footerContent {
113+
color: #777;
114+
padding: 10px;
115+
text-align: center;
116+
}
117+
118+
#footerContent a {
119+
color: #777;
120+
}

0 commit comments

Comments
 (0)