Skip to content
This repository was archived by the owner on May 12, 2020. It is now read-only.

Commit f64ebd0

Browse files
committed
fix mobile view
1 parent 835e8e8 commit f64ebd0

File tree

4 files changed

+47
-10
lines changed

4 files changed

+47
-10
lines changed

scss/base.scss

+24
Original file line numberDiff line numberDiff line change
@@ -523,3 +523,27 @@ td, th {
523523
padding: 10px;
524524
border: 1px solid black;
525525
}
526+
527+
/** mobile nav **/
528+
.slicknav_menu {
529+
display:none;
530+
background-color: white;
531+
}
532+
533+
.slicknav_btn {
534+
background-color: #293648;
535+
}
536+
537+
@media screen and (max-width: 40em) {
538+
/* #menu is the original menu */
539+
#menu {
540+
display:none;
541+
}
542+
543+
.slicknav_menu {
544+
display:block;
545+
}
546+
.header-logo {
547+
font-size: 24px;
548+
}
549+
}

scss/includes/headers.scss

-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@
6868
background-position: 0 11px;
6969
margin-top: 2px;
7070
color: $header-link;
71-
overflow: hidden;
72-
max-width: 48px;
7371
&:hover, &:focus {
7472
color: $color-neutral--80;
7573
text-decoration: none;

templates/index.html

+12-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
88
<link rel="icon" href="/static/favicon.ico">
99
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/styles/default.min.css">
10+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/SlickNav/1.0.10/slicknav.min.css" media="screen">
1011
<link rel="stylesheet" href="/static/css/base.css" media="screen">
1112
</head>
1213
<body>
1314
<div class="header">
1415
<div class="header-nav container">
1516
<div class="header-nav-links">
16-
<ul class="header-nav-list">
17+
<ul class="header-nav-list" id="menu">
1718
<li><a href="/" class="header-nav-link">Home</a></li>
1819
<li><a href="/about" class="header-nav-link">About</a></li>
1920
<li><a href="/team" class="header-nav-link">Team</a></li>
@@ -51,6 +52,10 @@
5152
</div>
5253

5354
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/highlight.min.js"></script>
55+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
56+
<script src="https://cdnjs.cloudflare.com/ajax/libs/SlickNav/1.0.10/jquery.slicknav.min.js"></script>
57+
58+
5459
<script>
5560
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
5661
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -60,6 +65,12 @@
6065
ga('create', 'UA-84719120-1', 'auto');
6166
ga('send', 'pageview');
6267

68+
$(function(){
69+
$('#menu').slicknav({
70+
label: ''
71+
});
72+
});
73+
6374
</script>
6475
</body>
6576
</html>

templates/splash.html

+11-7
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,21 @@ <h1 class="jumbotron-title">Technology &amp; Data For Good</h1>
5252
<div class="content-sub-container margin-bottom-xl">
5353
<div class="col-md-6">
5454
<div class="content-box">
55-
<img src="static/img/dat-data-v3.png">
56-
<h3 class="content-card-title"><a href="http://dat-data.com/blog/">Dat Data</a></h3>
57-
<div class="content-card-subtitle">Data sharing tools that make it easy to share datasets on the web.</div>
55+
<a href="http://dat-data.com/">
56+
<img src="static/img/dat-data-v3.png">
57+
<h3 class="content-card-title">Dat Data</h3>
58+
<div class="content-card-subtitle">Data sharing tools that make it easy to share datasets on the web.</div>
59+
</a>
5860
</div>
5961
</div>
6062
<div class="col-md-6">
6163
<div class="content-box">
62-
<img src="static/img/codeforscience.png">
63-
64-
<h3 class="content-card-title"><a href="https://gitter.im/codeforscience/community">Code for Science Community</a></h3>
65-
<div class="content-card-subtitle">Online community intersecting Science and Technology.</div>
64+
<a href="https://gitter.im/codeforscience/community">
65+
<img src="static/img/codeforscience.png">
66+
67+
<h3 class="content-card-title">Code for Science Community</h3>
68+
<div class="content-card-subtitle">Online community intersecting Science and Technology.</div>
69+
</a>
6670
</div>
6771
</div>
6872
</div>

0 commit comments

Comments
 (0)