Skip to content

Commit 8bcb876

Browse files
committed
UI improvement, now the width of container (left & right panel) is 960px, and the container will stay in center if the window is wider than 960px.
1 parent c68b6fb commit 8bcb876

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

css/ZeroBlog.css

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* Design based on medium */
22

33
body { background-color: white; color: #333332; margin: 10px; padding: 0px; font-family: 'Roboto Light', sans-serif; height: 15000px; overflow: hidden; backface-visibility: hidden }
4-
body.loaded { height: auto; overflow: auto }
4+
body.loaded { height: auto; overflow: auto; max-width: 960px; margin-left: auto; margin-right: auto; }
55
h1, h2, h3, h4 { font-family: 'Roboto Light', sans-serif; font-weight: normal; margin: 0px; padding: 0px }
66
h1 { font-size: 32px; line-height: 1.2em; font-weight: bold; letter-spacing: -0.5px; margin-bottom: 5px }
7-
h2 { margin-top: 2em }
8-
h3 { font-size: 24px; margin-top: 2em }
7+
h2 { font-size: 24px; margin-top: 2em }
8+
h3 { font-size: 18px; margin-top: 2em }
99
h1 + h2, h2 + h3 { margin-top: inherit }
1010

1111
p { margin-top: 0.9em; margin-bottom: 0.9em }
@@ -79,9 +79,10 @@ a:hover { color: #3498db }
7979

8080
/* -- Left -- */
8181

82-
.left { float: left; position: absolute; width: 220px; padding-left: 20px; padding-right: 20px; margin-top: 60px; text-align: right }
83-
.right { float: left; padding-left: 60px; margin-left: 240px; max-width: 700px; padding-right: 60px; padding-top: 60px }
84-
82+
.left { float: left; display: inline-block; width: 25%; margin-top: 60px; text-align: right }
83+
.right { display: inline-block; width: 75%; padding-top: 60px }
84+
.left .trigger { padding-left: 20px; }
85+
.right .posts, .right .post-full, .right .pager, .right .footer { padding-left: 60px; }
8586
.left .avatar {
8687
background-color: #F0F0F0; width: 60px; height: 60px; border-radius: 100%; margin-bottom: 10px;
8788
background-position: center center; background-size: 70%; display: inline-block; image-rendering: pixelated;
@@ -131,7 +132,7 @@ a:hover { color: #3498db }
131132
.post .details .like .num { margin-left: 21px; color: #CCC; transition: all 0.3s }
132133
.post .details .like:hover .num { color: #FA6C8D }
133134
.post .details .like.loading { pointer-events: none; animation: bounce .3s infinite alternate ease-out; animation-delay: 1s; }
134-
.post .body { font-size: 21.5px; line-height: 1.6; font-family: Tinos; margin-top: 20px }
135+
.post .body { font-size: 15px; line-height: 1.6; font-family: Tinos; margin-top: 20px }
135136

136137
.post .body h1 { text-align: center; margin-top: 50px }
137138
.post .body h1:before { content: " "; border-top: 1px solid #EEE; width: 120px; display: block; margin-left: auto; margin-right: auto; margin-bottom: 50px; }

css/mobile.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@ height: 100%;
4141
z-index: 1;
4242
margin-left: -20px;
4343
margin-top: 0px;
44+
width: 240px;
45+
}
46+
.left .trigger {
47+
padding-left: 0;
4448
}
4549
.left label[for="nav-trigger"] {
4650
display: block;
4751
cursor: pointer;
4852
position: absolute;
4953
z-index: 24;
5054
margin-top: 10px;
51-
margin-left: 310px;
55+
margin-left: 340px;
5256
}
5357
.left .menu-icon {
5458
background-color: #333;

0 commit comments

Comments
 (0)