Skip to content

Commit 79291a2

Browse files
committed
added responsive conditional
1 parent b5306e0 commit 79291a2

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

_layouts/default.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
<body>
106106
<div class="container">
107107
<div class="col-sm-3">
108+
<div class="fixed-condition">
108109
<a href="/"><img id="about" src="/static/img/avatar.jpg" height="75px" width="75px" /></a>
109110
<h1 class="author-name">{{ site.author }}</h1>
110111
{% if site.about %}
@@ -132,6 +133,7 @@ <h1 class="author-name">{{ site.author }}</h1>
132133
{% for i in site.urls %}
133134
&nbsp;&raquo; <a class="about" href="{{ i.url }}">{{ i.text }}</a><br />
134135
{% endfor %}
136+
</div><!-- end /.fixed-condition -->
135137
</div>
136138

137139
<div class="col-sm-8 col-offset-1">

static/css/main.css

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/**
2-
* //////////////
32
* Master styling
4-
* //////////////
53
*/
64
body {
75
font-family: "Roboto Condensed", Arial, sans-serif;
@@ -18,18 +16,9 @@ hr {
1816
border-top: 1px solid #F7F1F1;
1917
border-bottom: 1px solid #fff;
2018
}
21-
/*
22-
@media (min-width: 768px) {
23-
.container {
24-
max-width: 780px;
25-
}
26-
}
27-
*/
2819

2920
/**
30-
* //////////////////////////
3121
* Font and link declarations
32-
* //////////////////////////
3322
*/
3423
span.time, span.categories {
3524
color: #ADADAD;
@@ -145,9 +134,7 @@ div.right .post ul {
145134
}
146135

147136
/**
148-
* ///////////////////////////////////
149137
* Left column aka nav bar formatting
150-
* ///////////////////////////////////
151138
*/
152139
div.col-sm-3 {
153140
margin-top: 100px;
@@ -216,4 +203,17 @@ div.col-sm-3 img#about {
216203
border-top: 1px solid #f0f0f0;
217204
border-bottom: 1px solid #f0f0f0;
218205
}
219-
.post-content img, .content img {max-width: 100%}
206+
.post-content img, .content img {max-width: 100%}
207+
208+
/* Responsive Conditional */
209+
@media (min-width: 1024px) {
210+
.fixed-condition {
211+
position: fixed;
212+
max-width: 255px;
213+
}
214+
}
215+
@media (max-width: 768px) {
216+
div.col-sm-3 {
217+
margin-top: 30px;
218+
}
219+
}

0 commit comments

Comments
 (0)