Skip to content

Commit

Permalink
a simple and clean theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Raysmond committed Oct 12, 2015
1 parent d4c468d commit 4a25f3f
Show file tree
Hide file tree
Showing 10 changed files with 311 additions and 49 deletions.
27 changes: 3 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
//apply plugin: 'org.akhikhl.gretty'
//apply plugin: 'war'

//
// JDK 8
sourceCompatibility = 1.8
targetCompatibility = 1.8

Expand All @@ -18,7 +14,7 @@ repositories {
mavenCentral()

maven { url 'http://repo.spring.io/libs-release' }
maven { url "http://repo.springsource.org/repo" } // for springloaded
maven { url "http://repo.springsource.org/repo" }
}

bootRun {
Expand All @@ -29,11 +25,6 @@ configurations {
compile.exclude module: "spring-boot-starter-tomcat"
}

//task warProduction(type: War){
// destinationDir = file("$buildDir/dist")
// baseName = "$rootProject.name-production"
//}

dependencies {
// spring boot
compile "org.springframework.boot:spring-boot-starter-web:1.3.0.M5"
Expand Down Expand Up @@ -118,7 +109,7 @@ dependencies {

}

//Gretty Embedded Jetty

buildscript {
ext {
springBootVersion = '1.2.6.RELEASE'
Expand All @@ -130,22 +121,10 @@ buildscript {

maven { url "http://repo.spring.io/release" }
maven { url "http://repo.spring.io/milestone" }
maven { url "http://repo.spring.io/snapshot" }
// maven { url "http://repo.spring.io/snapshot" }
}

dependencies {
classpath 'org.akhikhl.gretty:gretty:+'
classpath 'org.springframework:springloaded:1.2.4.RELEASE'
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
}
}

// Don't use Jetty8, even it's a servlet 3.0+ container,
// but not support non-jar WebApplicationInitializer scanning.
// It will cause "No Spring WebApplicationInitializer types detected on classpath"
// gretty {
// port = 8080
// contextPath = ''
// servletContainer = 'jetty9' //tomcat7 or tomcat8
// }
//
273 changes: 273 additions & 0 deletions src/main/resources/resources/css/theme-light.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,273 @@
html{
font-size: 100%;
}

body {
background: #fff;
font: 300 1em/1.8 "Helvetica Neue",Helvetica, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans;
-webkit-font-smoothing: antialiased;
color: #515862;
}

a{
-webkit-transition-property: opacity;
-moz-transition-property: opacity;
-o-transition-property: opacity;
transition-property: opacity;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}

/* override typo css */
h1, h2, h3, h4, h5, h6{
color: #75889E;
}
.typo a{
color: #337ab7;
}
.typo a:hover{
color: #666;
}

hr{
border-color: #eee;
}

/* end */

pre{
background: #F9F9F9;
border-radius: 3px;
border-color: #eee;
font-size: 0.8em;
line-height: 1.55;
overflow: auto;
word-break: keep-all;
word-wrap: normal;
}

a.btn-default{
color: #888;
}

a.btn-default:hover{
background: #fff;
color: #333;
border-color: #333;
}

.navbar{
z-index: 100;
}

.navbar a.navbar-brand{
color: #9caab0;
font-weight: bold;
}

.navbar .container{
border-bottom: 1px #eee solid;
padding-top: 10px;
}

.navbar li a{
color: #9caab0;
text-transform: uppercase;
font-weight: bold;
font-size: 0.9em;
}

.nav>li>a:focus, .nav>li>a:hover{
background: none;
color: #888;
}

@media screen and (max-width: 480px) {
#navbar{
text-align: center;
}
.nav>li{
display: inline-block;
}
}

.container{
padding-top: 20px;
max-width: 840px;
}

.main-container{
padding-top: 0;
}

form input, form button{
margin-top: 10px;
}


.header-title{
padding: 0 100px;
width: 100%;
position: relative;
}

.header-title h1 {
margin-top: 20px;
}

.header-title p{
font-size: 0.9em;

}
.header-title p.meta{
color: #999;
font-size: 0.9em;
}

.header-title .avatar img{
margin-top: 20px;
border-radius: 50%;
box-shadow: 0 0 0 3px #fff, 0 0 0 4px #ccc;
width: 80px;
height: 80px;
}

.header-title-wrapper{
display: table-cell;
vertical-align: middle;
margin: 0 auto;
text-align: center;
width: 100%;
display: block;
}


.post{
padding: 50px 80px;
margin-bottom: 30px;
}

@media screen and (max-width: 480px) {
.post{
padding: 30px 10px;
}
.post h2.title, .post .meta{
text-align: center;
}
}


.post .meta, .typo .post .meta{
color: rgba(187,187,187,0.8);
font-size: 0.9em;
}

.post h1 > a, .post h2 > a, .post h3 > a, .post h4 > a{
color: #75889E;
text-decoration: none;
}

.post h2.title{
margin-bottom: 20px;
margin-top: 15px;
}


.post h2.title a:hover, .post h2.title a:focus{
color: #888;
}

.post .info{
margin-top: 30px;
text-align: center;
color: #888;
font-size: 0.9em;
}

.post .comments{
margin-top: 30px;
padding-top: 30px;
border-top: 1px #eee solid;
}

.post ul.tags{
margin-left: 0;
padding-left: 0;
}

.post ul.tags li{
display: inline-block;
list-style: none;
margin-left: 10px;
}

.latest-posts{
width: 80%;
margin: 0 auto;
margin-top: 30px;
margin-bottom: 50px;
}

.loadmore{
text-align: center;
margin-top: 40px;
}

.post-item{
text-align: center;
width: 80%;
margin: 10px auto;
padding: 10px 20px;
}

.post-item:hover{
background: #F2F8FB;
}

.post-item a > h2{
font-size: 1.4em;
margin-top: 0;
color: #515862;
}

.post-item .meta{
text-align: center;
color: #888;
font-size: 0.9em;
}

ul.archive-list li span.month{
width: 60px;
display: inline-block;
}

ul.tags li{
margin: 5px 10px;
}

.footer{
text-align: center;
margin-bottom: 50px;
font-size: 0.9em;
color: #888;
}

.footer a{
color: #888;
}

.footer p, .typo .footer p {
margin-bottom: 0.4em;
}

.footer-wrapper{
display: block;
max-width: 500px;
margin: 0 auto;
}

.footer-wrapper hr{
border-color: #ddd;
}
Binary file modified src/main/resources/resources/images/user.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 19 additions & 2 deletions src/main/resources/templates/home/index.jade
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
extends ../layout/app

block page_title
.avatar
img(src="/images/user.jpg")
h1 #{App.getSiteName()}
p #{App.getSiteSlogan()}
p.meta #{App.getSiteSlogan()}

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.

block title
= App.getSiteName()

block content
include ../posts/index
// include ../posts/index
.latest-posts
hr
h2.text-center Latest Posts
for post in posts
.post-item
a(href="/posts/#{post.getPermalink()}")
h2 #{post.getTitle()}
.meta
span #{viewHelper.getFormattedDate(post.getCreatedAt())}

.loadmore
a.btn.btn-default(href="/posts/archive") More
9 changes: 5 additions & 4 deletions src/main/resources/templates/layout/footer.jade
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
.footer-wrapper
hr
p
| © · Written by
| © · 2011-2015  
a(href="http://raysmond.com") Raysmond
| · All Right Reserved.
if viewHelper != null
p Page: #{viewHelper.getResponseTime()}ms
| ·

if viewHelper != null
span #{viewHelper.getResponseTime()}ms

2 changes: 1 addition & 1 deletion src/main/resources/templates/layout/head.jade
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ title
link(rel='stylesheet', type='text/css', href='/webjars/bootstrap/3.3.5/css/bootstrap.min.css')
link(rel="stylesheet", type='text/css', href="/vendors/pygments/github.css")
link(rel="stylesheet", type='text/css', href="/vendors/typo.css-2.1.2/typo.min.css")
link(rel="stylesheet", type='text/css', href="/css/theme.css")
link(rel="stylesheet", type='text/css', href="/css/theme-light.css")


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

0 comments on commit 4a25f3f

Please sign in to comment.