Skip to content

Commit d130971

Browse files
committed
Adapt Clean Blog theme.
1 parent f0aedde commit d130971

36 files changed

+11448
-48
lines changed

Gemfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
source 'https://rubygems.org'
22

3+
#gem 'github-pages'
4+
35
gem 'jekyll'
46
gem 'sass'
57
gem 'octopress', '~> 3.0.0.rc.12'
6-
gem 'jekyll-sitemap'
8+
gem 'jekyll-sitemap'

Gruntfile.js

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
'use strict';
2+
module.exports = function(grunt) {
3+
4+
grunt.initConfig({
5+
jshint: {
6+
options: {
7+
jshintrc: '.jshintrc'
8+
},
9+
all: [
10+
'Gruntfile.js',
11+
'assets/js/*.js',
12+
'assets/js/plugins/*.js',
13+
'!assets/js/scripts.min.js'
14+
]
15+
},
16+
uglify: {
17+
dist: {
18+
files: {
19+
'assets/js/scripts.min.js': [
20+
'assets/js/plugins/*.js',
21+
'assets/js/_*.js'
22+
]
23+
}
24+
}
25+
},
26+
imagemin: {
27+
dist: {
28+
options: {
29+
optimizationLevel: 7,
30+
progressive: true
31+
},
32+
files: [{
33+
expand: true,
34+
cwd: 'images/',
35+
src: '{,*/}*.{png,jpg,jpeg}',
36+
dest: 'images/'
37+
}]
38+
}
39+
},
40+
svgmin: {
41+
dist: {
42+
files: [{
43+
expand: true,
44+
cwd: 'images/',
45+
src: '{,*/}*.svg',
46+
dest: 'images/'
47+
}]
48+
}
49+
},
50+
watch: {
51+
js: {
52+
files: [
53+
'<%= jshint.all %>'
54+
],
55+
tasks: ['jshint','uglify']
56+
}
57+
},
58+
clean: {
59+
dist: [
60+
'assets/js/scripts.min.js'
61+
]
62+
}
63+
});
64+
65+
// Load tasks
66+
grunt.loadNpmTasks('grunt-contrib-clean');
67+
grunt.loadNpmTasks('grunt-contrib-jshint');
68+
grunt.loadNpmTasks('grunt-contrib-uglify');
69+
grunt.loadNpmTasks('grunt-contrib-watch');
70+
grunt.loadNpmTasks('grunt-contrib-imagemin');
71+
grunt.loadNpmTasks('grunt-svgmin');
72+
73+
// Register tasks
74+
grunt.registerTask('default', [
75+
'clean',
76+
'uglify',
77+
'imagemin',
78+
'svgmin'
79+
]);
80+
grunt.registerTask('dev', [
81+
'watch'
82+
]);
83+
84+
};

_config.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
title: Dr. Yi-Xin Liu at Fudan University
2-
description: "This is the academic homepage of Dr. Yi-Xin Liu, who is a lecturer and researcher working in the field of polymer physics at Fudan University."
1+
title: Yi-Xin LIU
2+
description: "Dr. Yi-Xin Liu is a lecturer and researcher working in the field of polymer physics at Fudan University. He currently is working at MRL@UCSB as a visiting researcher."
33
disqus_shortname: ngpy.org
44
reading_time: true
55
words_per_minute: 200
66
url: # blank for local preview
77
#url: http://ngpy.org # for production
8+
header-img: images/about-bg.jpg
89

910
# Owner/author information
1011
owner:
1112
name: Yi-Xin Liu
1213
avatar: avatar.jpg
13-
bio: "Your bio goes here. It shouldn't be super long but a good two sentences or two should suffice."
14+
bio: "Dr. Yi-Xin Liu is a lecturer and researcher working in the field of polymer physics at Fudan University. He currently is also working at MRL@UC Santa Barbara as a visiting researcher."
1415
email: lyx@fudan.edu.cn
1516
# Social networking links used in footer. Update and remove as you like.
1617
twitter: lyxfudan
@@ -28,7 +29,7 @@ owner:
2829
background:
2930

3031
# Analytics and webmaster tools stuff goes here
31-
google_analytics:
32+
google_analytics: liuyxpp
3233
google_verify:
3334
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
3435
bing_verify:

_includes/head.html

+18-2
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,24 @@
3333
<meta name="viewport" content="width=device-width, initial-scale=1.0">
3434

3535
<!-- For all browsers -->
36+
<!-- Bootstrap Core CSS -->
37+
<link rel="stylesheet" href="{{ site.url }}/assets/css/bootstrap.min.css">
38+
<!-- Clean Blog CSS -->
39+
<link rel="stylesheet" href="{{ site.url }}/assets/css/clean-blog.css">
40+
<!-- HPSTR main CSS -->
3641
<link rel="stylesheet" href="{{ site.url }}/assets/css/main.css">
37-
<!-- Webfonts -->
38-
<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic" rel="stylesheet" type="text/css">
3942

4043
<meta http-equiv="cleartype" content="on">
4144

4245
<!-- Load Modernizr -->
4346
<script src="{{ site.url }}/assets/js/vendor/modernizr-2.6.2.custom.min.js"></script>
4447

48+
<!-- Custom Fonts -->
49+
<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic" rel="stylesheet" type="text/css">
50+
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
51+
<link href='//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
52+
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
53+
4554
<!-- Icons -->
4655
<!-- 16x16 -->
4756
<link rel="shortcut icon" href="{{ site.url }}/favicon.ico">
@@ -61,3 +70,10 @@
6170
{% unless background contains 'http://' or background contains 'https://' %}{% capture background %}{{ site.url }}/images/{{ background }}{% endcapture %}{% endunless %}
6271
<style type="text/css">body {background-image:url({{ background }});}</style>
6372
{% endif %}
73+
74+
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
75+
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
76+
<!--[if lt IE 9]>
77+
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
78+
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
79+
<![endif]-->

_includes/nav_cleanblog.html

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!-- Navigation -->
2+
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
3+
<div class="container-fluid">
4+
<!-- Brand and toggle get grouped for better mobile display -->
5+
<div class="navbar-header page-scroll">
6+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
7+
<span class="sr-only">Toggle navigation</span>
8+
<span class="icon-bar"></span>
9+
<span class="icon-bar"></span>
10+
<span class="icon-bar"></span>
11+
</button>
12+
<a class="navbar-brand" href="{{ site.baseurl }}/">{{ site.title }}</a>
13+
</div>
14+
15+
<!-- Collect the nav links, forms, and other content for toggling -->
16+
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
17+
<ul class="nav navbar-nav navbar-right">
18+
<li>
19+
<a href="{{ site.url }}/">Home</a>
20+
</li>
21+
<!-- {% for page in site.pages %}{% if page.title %}
22+
<li>
23+
<a href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
24+
</li>
25+
{% endif %}{% endfor %} -->
26+
<li>
27+
<a href="{{ site.url }}/posts/">Blog</a>
28+
</li>
29+
<li>
30+
<a href="{{ site.url }}/about/">About</a>
31+
</li>
32+
</ul>
33+
</div>
34+
<!-- /.navbar-collapse -->
35+
</div>
36+
<!-- /.container -->
37+
</nav>

_includes/scripts.html

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1+
<!-- JQuery JavaScript -->
12
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
23
<script>window.jQuery || document.write('<script src="{{ site.url }}/assets/js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
4+
5+
<!-- Bootstrap Core JavaScript -->
6+
<script src="{{ site.url }}/assets/js/vendor/bootstrap.min.js"></script>
7+
8+
<!-- Clean Blog JavaScript -->
9+
<script src="{{ site.url }}/assets/js/clean-blog.min.js"></script>
10+
311
<script src="{{ site.url }}/assets/js/scripts.min.js"></script>
412

513
{% if site.google_analytics %}
@@ -10,10 +18,10 @@
1018
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
1119
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
1220

13-
ga('create', '{{ site.google_analytics }}', 'auto');
21+
ga('create', '{{ site.google_analytics }}', 'auto');
1422
ga('require', 'linkid', 'linkid.js');
1523
ga('send', 'pageview');
1624
</script>
1725
{% endif %}
1826

19-
{% if page.comments != false %}{% include disqus_comments.html %}{% endif %}
27+
{% if page.comments != false %}{% include disqus_comments.html %}{% endif %}

_layouts/post-index.html

+18-18
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@
77
{% include head.html %}
88
</head>
99

10-
<body id="post-index" {% if page.image.feature %}class="feature"{% endif %}>
10+
<body id="post-index">
1111

1212
{% include browser-upgrade.html %}
13-
{% include navigation.html %}
1413

15-
<div class="entry-header">
16-
{% if page.image.credit %}<div class="image-credit">Image source: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></div><!-- /.image-credit -->{% endif %}
17-
{% if page.image.feature %}
18-
<div class="entry-image">
19-
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
20-
</div><!-- /.entry-image -->
21-
{% endif %}
22-
<div class="header-title">
23-
<div class="header-title-wrap">
24-
<h1>{{ site.title }}</h1>
25-
<h2>{{ page.title }}</h2>
26-
</div><!-- /.header-title-wrap -->
27-
</div><!-- /.header-title -->
28-
</div><!-- /.entry-header -->
14+
{% include nav_cleanblog.html %}
15+
<!-- Page Header -->
16+
<header class="intro-header" style="background-image: url('{{ site.url }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')">
17+
<div class="container">
18+
<div class="row">
19+
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
20+
<div class="site-heading">
21+
<h1>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
22+
<hr class="small">
23+
<span class="subheading">{{ page.description }}</span>
24+
</div>
25+
</div>
26+
</div>
27+
</div>
28+
</header>
2929

3030
<div id="main" role="main">
3131
{{ content }}
@@ -37,7 +37,7 @@ <h2>{{ page.title }}</h2>
3737
</footer>
3838
</div><!-- /.footer-wrapper -->
3939

40-
{% include scripts.html %}
40+
{% include scripts.html %}
4141

4242
</body>
43-
</html>
43+
</html>

_sass/_dl-menu.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
background: $white;
4848
top: 10px;
4949
left: 16%;
50-
box-shadow:
51-
0 10px 0 $white,
50+
box-shadow:
51+
0 10px 0 $white,
5252
0 20px 0 $white;
5353
}
5454
button.dl-active {
@@ -165,10 +165,10 @@
165165
display: none;
166166
}
167167
}
168-
/*
168+
/*
169169
When a submenu is openend, we will hide all li siblings.
170170
For that we give a class to the parent menu called "dl-subview".
171-
We also hide the submenu link.
171+
We also hide the submenu link.
172172
The opened submenu will get the class "dl-subviewopen".
173173
All this is done for any sub-level being entered.
174174
*/

_sass/_intro-header_cleanblog.scss

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// Header from Clean Blog
2+
@mixin background-cover() {
3+
-webkit-background-size: cover;
4+
-moz-background-size: cover;
5+
background-size: cover;
6+
-o-background-size: cover;
7+
}
8+
9+
.intro-header {
10+
background: no-repeat center center;
11+
background-color: $gray;
12+
background-attachment: scroll;
13+
@include background-cover;
14+
// NOTE: Background images are set within the HTML using inline CSS!
15+
margin-bottom: 50px;
16+
.site-heading,
17+
.post-heading,
18+
.page-heading {
19+
padding: 100px 0 50px;
20+
color: white;
21+
@media only screen and (min-width: 768px) {
22+
padding: 150px 0;
23+
}
24+
}
25+
.site-heading,
26+
.page-heading {
27+
text-align: center;
28+
h1 {
29+
margin-top: 0;
30+
font-size: 50px;
31+
}
32+
.subheading {
33+
font-size: 24px;
34+
line-height: 1.1;
35+
display: block;
36+
font-family: $heading-font;
37+
font-weight: 300;
38+
margin: 10px 0 0;
39+
}
40+
@media only screen and (min-width: 768px) {
41+
h1 {
42+
font-size: 80px;
43+
}
44+
}
45+
}
46+
.post-heading {
47+
h1 {
48+
font-size: 35px;
49+
}
50+
.subheading,
51+
.meta {
52+
line-height: 1.1;
53+
display: block;
54+
}
55+
.subheading {
56+
font-family: $heading-font;
57+
font-size: 24px;
58+
margin: 10px 0 30px;
59+
font-weight: 600;
60+
}
61+
.meta {
62+
font-family: $base-font;
63+
font-style: italic;
64+
font-weight: 300;
65+
font-size: 20px;
66+
a {
67+
color: white;
68+
}
69+
}
70+
@media only screen and (min-width: 768px) {
71+
h1 {
72+
font-size: 55px;
73+
}
74+
.subheading {
75+
font-size: 30px;
76+
}
77+
}
78+
}
79+
}

0 commit comments

Comments
 (0)