Skip to content

Commit 4a25f3f

Browse files
committed
a simple and clean theme
1 parent d4c468d commit 4a25f3f

10 files changed

Lines changed: 311 additions & 49 deletions

File tree

build.gradle

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ apply plugin: 'java'
22
apply plugin: 'idea'
33
apply plugin: 'eclipse'
44
apply plugin: 'spring-boot'
5-
//apply plugin: 'org.akhikhl.gretty'
6-
//apply plugin: 'war'
75

8-
//
9-
// JDK 8
106
sourceCompatibility = 1.8
117
targetCompatibility = 1.8
128

@@ -18,7 +14,7 @@ repositories {
1814
mavenCentral()
1915

2016
maven { url 'http://repo.spring.io/libs-release' }
21-
maven { url "http://repo.springsource.org/repo" } // for springloaded
17+
maven { url "http://repo.springsource.org/repo" }
2218
}
2319

2420
bootRun {
@@ -29,11 +25,6 @@ configurations {
2925
compile.exclude module: "spring-boot-starter-tomcat"
3026
}
3127

32-
//task warProduction(type: War){
33-
// destinationDir = file("$buildDir/dist")
34-
// baseName = "$rootProject.name-production"
35-
//}
36-
3728
dependencies {
3829
// spring boot
3930
compile "org.springframework.boot:spring-boot-starter-web:1.3.0.M5"
@@ -118,7 +109,7 @@ dependencies {
118109

119110
}
120111

121-
//Gretty Embedded Jetty
112+
122113
buildscript {
123114
ext {
124115
springBootVersion = '1.2.6.RELEASE'
@@ -130,22 +121,10 @@ buildscript {
130121

131122
maven { url "http://repo.spring.io/release" }
132123
maven { url "http://repo.spring.io/milestone" }
133-
maven { url "http://repo.spring.io/snapshot" }
124+
// maven { url "http://repo.spring.io/snapshot" }
134125
}
135126

136127
dependencies {
137-
classpath 'org.akhikhl.gretty:gretty:+'
138-
classpath 'org.springframework:springloaded:1.2.4.RELEASE'
139128
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
140129
}
141130
}
142-
143-
// Don't use Jetty8, even it's a servlet 3.0+ container,
144-
// but not support non-jar WebApplicationInitializer scanning.
145-
// It will cause "No Spring WebApplicationInitializer types detected on classpath"
146-
// gretty {
147-
// port = 8080
148-
// contextPath = ''
149-
// servletContainer = 'jetty9' //tomcat7 or tomcat8
150-
// }
151-
//
Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
html{
2+
font-size: 100%;
3+
}
4+
5+
body {
6+
background: #fff;
7+
font: 300 1em/1.8 "Helvetica Neue",Helvetica, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans;
8+
-webkit-font-smoothing: antialiased;
9+
color: #515862;
10+
}
11+
12+
a{
13+
-webkit-transition-property: opacity;
14+
-moz-transition-property: opacity;
15+
-o-transition-property: opacity;
16+
transition-property: opacity;
17+
-webkit-transition: all 0.3s ease;
18+
-moz-transition: all 0.3s ease;
19+
-o-transition: all 0.3s ease;
20+
transition: all 0.3s ease;
21+
}
22+
23+
/* override typo css */
24+
h1, h2, h3, h4, h5, h6{
25+
color: #75889E;
26+
}
27+
.typo a{
28+
color: #337ab7;
29+
}
30+
.typo a:hover{
31+
color: #666;
32+
}
33+
34+
hr{
35+
border-color: #eee;
36+
}
37+
38+
/* end */
39+
40+
pre{
41+
background: #F9F9F9;
42+
border-radius: 3px;
43+
border-color: #eee;
44+
font-size: 0.8em;
45+
line-height: 1.55;
46+
overflow: auto;
47+
word-break: keep-all;
48+
word-wrap: normal;
49+
}
50+
51+
a.btn-default{
52+
color: #888;
53+
}
54+
55+
a.btn-default:hover{
56+
background: #fff;
57+
color: #333;
58+
border-color: #333;
59+
}
60+
61+
.navbar{
62+
z-index: 100;
63+
}
64+
65+
.navbar a.navbar-brand{
66+
color: #9caab0;
67+
font-weight: bold;
68+
}
69+
70+
.navbar .container{
71+
border-bottom: 1px #eee solid;
72+
padding-top: 10px;
73+
}
74+
75+
.navbar li a{
76+
color: #9caab0;
77+
text-transform: uppercase;
78+
font-weight: bold;
79+
font-size: 0.9em;
80+
}
81+
82+
.nav>li>a:focus, .nav>li>a:hover{
83+
background: none;
84+
color: #888;
85+
}
86+
87+
@media screen and (max-width: 480px) {
88+
#navbar{
89+
text-align: center;
90+
}
91+
.nav>li{
92+
display: inline-block;
93+
}
94+
}
95+
96+
.container{
97+
padding-top: 20px;
98+
max-width: 840px;
99+
}
100+
101+
.main-container{
102+
padding-top: 0;
103+
}
104+
105+
form input, form button{
106+
margin-top: 10px;
107+
}
108+
109+
110+
.header-title{
111+
padding: 0 100px;
112+
width: 100%;
113+
position: relative;
114+
}
115+
116+
.header-title h1 {
117+
margin-top: 20px;
118+
}
119+
120+
.header-title p{
121+
font-size: 0.9em;
122+
123+
}
124+
.header-title p.meta{
125+
color: #999;
126+
font-size: 0.9em;
127+
}
128+
129+
.header-title .avatar img{
130+
margin-top: 20px;
131+
border-radius: 50%;
132+
box-shadow: 0 0 0 3px #fff, 0 0 0 4px #ccc;
133+
width: 80px;
134+
height: 80px;
135+
}
136+
137+
.header-title-wrapper{
138+
display: table-cell;
139+
vertical-align: middle;
140+
margin: 0 auto;
141+
text-align: center;
142+
width: 100%;
143+
display: block;
144+
}
145+
146+
147+
.post{
148+
padding: 50px 80px;
149+
margin-bottom: 30px;
150+
}
151+
152+
@media screen and (max-width: 480px) {
153+
.post{
154+
padding: 30px 10px;
155+
}
156+
.post h2.title, .post .meta{
157+
text-align: center;
158+
}
159+
}
160+
161+
162+
.post .meta, .typo .post .meta{
163+
color: rgba(187,187,187,0.8);
164+
font-size: 0.9em;
165+
}
166+
167+
.post h1 > a, .post h2 > a, .post h3 > a, .post h4 > a{
168+
color: #75889E;
169+
text-decoration: none;
170+
}
171+
172+
.post h2.title{
173+
margin-bottom: 20px;
174+
margin-top: 15px;
175+
}
176+
177+
178+
.post h2.title a:hover, .post h2.title a:focus{
179+
color: #888;
180+
}
181+
182+
.post .info{
183+
margin-top: 30px;
184+
text-align: center;
185+
color: #888;
186+
font-size: 0.9em;
187+
}
188+
189+
.post .comments{
190+
margin-top: 30px;
191+
padding-top: 30px;
192+
border-top: 1px #eee solid;
193+
}
194+
195+
.post ul.tags{
196+
margin-left: 0;
197+
padding-left: 0;
198+
}
199+
200+
.post ul.tags li{
201+
display: inline-block;
202+
list-style: none;
203+
margin-left: 10px;
204+
}
205+
206+
.latest-posts{
207+
width: 80%;
208+
margin: 0 auto;
209+
margin-top: 30px;
210+
margin-bottom: 50px;
211+
}
212+
213+
.loadmore{
214+
text-align: center;
215+
margin-top: 40px;
216+
}
217+
218+
.post-item{
219+
text-align: center;
220+
width: 80%;
221+
margin: 10px auto;
222+
padding: 10px 20px;
223+
}
224+
225+
.post-item:hover{
226+
background: #F2F8FB;
227+
}
228+
229+
.post-item a > h2{
230+
font-size: 1.4em;
231+
margin-top: 0;
232+
color: #515862;
233+
}
234+
235+
.post-item .meta{
236+
text-align: center;
237+
color: #888;
238+
font-size: 0.9em;
239+
}
240+
241+
ul.archive-list li span.month{
242+
width: 60px;
243+
display: inline-block;
244+
}
245+
246+
ul.tags li{
247+
margin: 5px 10px;
248+
}
249+
250+
.footer{
251+
text-align: center;
252+
margin-bottom: 50px;
253+
font-size: 0.9em;
254+
color: #888;
255+
}
256+
257+
.footer a{
258+
color: #888;
259+
}
260+
261+
.footer p, .typo .footer p {
262+
margin-bottom: 0.4em;
263+
}
264+
265+
.footer-wrapper{
266+
display: block;
267+
max-width: 500px;
268+
margin: 0 auto;
269+
}
270+
271+
.footer-wrapper hr{
272+
border-color: #ddd;
273+
}
8.32 KB
Loading
Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11
extends ../layout/app
22

33
block page_title
4+
.avatar
5+
img(src="/images/user.jpg")
46
h1 #{App.getSiteName()}
5-
p #{App.getSiteSlogan()}
7+
p.meta #{App.getSiteSlogan()}
8+
9+
p Hi, there. I'm Raysmond, a postgraduate of Computer Science in Fudan University from Shanghai, China. I love developing software and web applications and I blog about them.
610

711
block title
812
= App.getSiteName()
913

1014
block content
11-
include ../posts/index
15+
// include ../posts/index
16+
17+
.latest-posts
18+
hr
19+
h2.text-center Latest Posts
20+
for post in posts
21+
.post-item
22+
a(href="/posts/#{post.getPermalink()}")
23+
h2 #{post.getTitle()}
24+
.meta
25+
span #{viewHelper.getFormattedDate(post.getCreatedAt())}
26+
27+
.loadmore
28+
a.btn.btn-default(href="/posts/archive") More

src/main/resources/templates/layout/footer.jade

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
.footer-wrapper
44
hr
55
p
6-
| © · Written by
6+
| © · 2011-2015  
77
a(href="http://raysmond.com") Raysmond
8-
| · All Right Reserved.
9-
if viewHelper != null
10-
p Page: #{viewHelper.getResponseTime()}ms
8+
| ·
9+
10+
if viewHelper != null
11+
span #{viewHelper.getResponseTime()}ms
1112

src/main/resources/templates/layout/head.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ title
1313
link(rel='stylesheet', type='text/css', href='/webjars/bootstrap/3.3.5/css/bootstrap.min.css')
1414
link(rel="stylesheet", type='text/css', href="/vendors/pygments/github.css")
1515
link(rel="stylesheet", type='text/css', href="/vendors/typo.css-2.1.2/typo.min.css")
16-
link(rel="stylesheet", type='text/css', href="/css/theme.css")
16+
link(rel="stylesheet", type='text/css', href="/css/theme-light.css")
1717

1818

1919
script(src="/webjars/jquery/2.1.4/jquery.min.js")

0 commit comments

Comments
 (0)