Browse code

initial import

devnewton authored on 06/11/2016 16:14:40
Showing 96 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,7 @@
1
+.DS_Store
2
+Thumbs.db
3
+db.json
4
+*.log
5
+node_modules/
6
+public/
7
+.deploy*/
0 8
\ No newline at end of file
1 9
new file mode 100644
... ...
@@ -0,0 +1,21 @@
1
+MIT License
2
+
3
+Copyright (c) 2016 devnewton
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.
0 22
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+# devnewton.bci.im
2
+
3
+Devnewton's blog
0 4
\ No newline at end of file
1 5
new file mode 100644
... ...
@@ -0,0 +1,89 @@
1
+# Hexo Configuration
2
+## Docs: https://hexo.io/docs/configuration.html
3
+## Source: https://github.com/hexojs/hexo/
4
+
5
+# Site
6
+title: devnewton.bci.im
7
+subtitle: Disruptive innovations since 1742
8
+description:
9
+author: Dave Newton
10
+language:
11
+timezone: Europe/Paris
12
+
13
+# URL
14
+## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
15
+url: https://devnewton.bci.im
16
+root: /
17
+permalink: :year/:month/:day/:title/
18
+permalink_defaults:
19
+
20
+# Directory
21
+source_dir: source
22
+public_dir: public
23
+tag_dir: tags
24
+archive_dir: archives
25
+category_dir: categories
26
+code_dir: downloads/code
27
+i18n_dir: :lang
28
+skip_render:
29
+
30
+# Writing
31
+new_post_name: :title.md # File name of new posts
32
+default_layout: post
33
+titlecase: false # Transform title into titlecase
34
+external_link: true # Open external links in new tab
35
+filename_case: 0
36
+render_drafts: false
37
+post_asset_folder: true
38
+relative_link: false
39
+future: true
40
+highlight:
41
+  enable: true
42
+  line_number: true
43
+  auto_detect: false
44
+  tab_replace:
45
+
46
+# Category & Tag
47
+default_category: uncategorized
48
+category_map:
49
+tag_map:
50
+
51
+# Date / Time format
52
+## Hexo uses Moment.js to parse and display date
53
+## You can customize the date format as defined in
54
+## http://momentjs.com/docs/#/displaying/format/
55
+date_format: YYYY-MM-DD
56
+time_format: HH:mm:ss
57
+
58
+# Pagination
59
+## Set per_page to 0 to disable pagination
60
+per_page: 10
61
+pagination_dir: page
62
+
63
+# Feed
64
+feed:
65
+  type: atom
66
+  path: atom.xml
67
+  limit: 20
68
+  hub:
69
+
70
+# Markdown config
71
+marked:
72
+  gfm: false
73
+
74
+# Extensions
75
+## Plugins: https://hexo.io/plugins/
76
+## Themes: https://hexo.io/themes/
77
+theme: landscape
78
+
79
+# Deployment
80
+## Docs: https://hexo.io/docs/deployment.html
81
+deploy:
82
+  type: rsync
83
+  host: bci.im
84
+  user: devnewton
85
+  root: /srv/devnewton
86
+  port: 3615
87
+  delete: true
88
+  verbose: true
89
+  ignore_errors: false
0 90
\ No newline at end of file
1 91
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+file.reference.dev-devnewton.bci.im=.
2
+files.encoding=UTF-8
3
+site.root.folder=${file.reference.dev-devnewton.bci.im}
0 4
new file mode 100644
... ...
@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://www.netbeans.org/ns/project/1">
3
+    <type>org.netbeans.modules.web.clientproject</type>
4
+    <configuration>
5
+        <data xmlns="http://www.netbeans.org/ns/clientside-project/1">
6
+            <name>devnewton.bci.im</name>
7
+        </data>
8
+    </configuration>
9
+</project>
0 10
new file mode 100644
... ...
@@ -0,0 +1,21 @@
1
+{
2
+  "name": "hexo-site",
3
+  "version": "0.0.0",
4
+  "private": true,
5
+  "hexo": {
6
+    "version": "3.2.2"
7
+  },
8
+  "dependencies": {
9
+    "hexo": "^3.2.0",
10
+    "hexo-deployer-rsync": "^0.1.2",
11
+    "hexo-generator-archive": "^0.1.4",
12
+    "hexo-generator-category": "^0.1.3",
13
+    "hexo-generator-feed": "^1.2.0",
14
+    "hexo-generator-index": "^0.2.0",
15
+    "hexo-generator-tag": "^0.2.0",
16
+    "hexo-renderer-ejs": "^0.2.0",
17
+    "hexo-renderer-marked": "^0.2.10",
18
+    "hexo-renderer-stylus": "^0.3.1",
19
+    "hexo-server": "^0.2.0"
20
+  }
21
+}
0 22
new file mode 100644
... ...
@@ -0,0 +1,4 @@
1
+---
2
+title: {{ title }}
3
+tags:
4
+---
0 5
new file mode 100644
... ...
@@ -0,0 +1,4 @@
1
+---
2
+title: {{ title }}
3
+date: {{ date }}
4
+---
0 5
new file mode 100644
... ...
@@ -0,0 +1,5 @@
1
+---
2
+title: {{ title }}
3
+date: {{ date }}
4
+tags:
5
+---
0 6
new file mode 100644
... ...
@@ -0,0 +1,8 @@
1
+---
2
+title: Launching play.bci.im
3
+date: 2016-11-03 21:40:04
4
+tags:
5
+---
6
+
7
+I made a website [play.bci.im](http://play.bci.im) where you can play all my
8
+games in a web browser (no installation, no account...).
0 9
\ No newline at end of file
1 10
new file mode 100644
... ...
@@ -0,0 +1,7 @@
1
+---
2
+title: Migrating blog from Drupal to Hexo
3
+date: 2016-11-03 18:59:33
4
+tags:
5
+---
6
+
7
+My old blog is still accessible [here](http://oldblog.bci.im).
0 8
new file mode 100644
... ...
@@ -0,0 +1,16 @@
1
+---
2
+title: 'My new game project: shmuprpg'
3
+date: 2016-11-03 21:44:04
4
+tags:
5
+---
6
+
7
+I'm starting a new opensource game project: [shmuprpg](https://git.bci.im/shmuprpg/).
8
+
9
+It mix *shoot them up* and *action rpg* gameplay.
10
+
11
+Like all my games, it is playable [online](http://play.bci.im), but this time
12
+it is a native web game. I wrote it to practice some technologies:
13
+[Typescript](https://www.typescriptlang.org/),
14
+[brunch](http://brunch.io) and Phaser (http://phaser.io).
15
+
16
+{% asset_img shmuprpg-screenshot.jpg Shmuprpg screenshot %}
0 17
\ No newline at end of file
1 18
new file mode 100644
2 19
Binary files /dev/null and b/source/_posts/My-new-game-project-shmuprpg/shmuprpg-screenshot.jpg differ
3 20
new file mode 100644
... ...
@@ -0,0 +1,14 @@
1
+---
2
+title: About me
3
+date: 2016-11-04 11:57:32
4
+layout: about
5
+---
6
+
7
+I'm Dave Newton, free software developper.
8
+
9
+You can contact me by mail at devnewton §at§ bci.im.
10
+
11
+## Asocial networking
12
+
13
+[![linuxfr](/about/index/linuxfr.png)](https://linuxfr.org/users/devnewton)
14
+[![opengameart](/about/index/opengameart.png)](http://opengameart.org/users/devnewton)
0 15
\ No newline at end of file
1 16
new file mode 100644
2 17
Binary files /dev/null and b/source/about/index/linuxfr.png differ
3 18
new file mode 100644
4 19
Binary files /dev/null and b/source/about/index/opengameart.png differ
5 20
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+.DS_Store
2
+node_modules
3
+tmp
0 4
\ No newline at end of file
1 5
new file mode 100644
... ...
@@ -0,0 +1,46 @@
1
+module.exports = function(grunt){
2
+  grunt.initConfig({
3
+    gitclone: {
4
+      fontawesome: {
5
+        options: {
6
+          repository: 'https://github.com/FortAwesome/Font-Awesome.git',
7
+          directory: 'tmp/fontawesome'
8
+        },
9
+      },
10
+      fancybox: {
11
+        options: {
12
+          repository: 'https://github.com/fancyapps/fancyBox.git',
13
+          directory: 'tmp/fancybox'
14
+        }
15
+      }
16
+    },
17
+    copy: {
18
+      fontawesome: {
19
+        expand: true,
20
+        cwd: 'tmp/fontawesome/fonts/',
21
+        src: ['**'],
22
+        dest: 'source/css/fonts/'
23
+      },
24
+      fancybox: {
25
+        expand: true,
26
+        cwd: 'tmp/fancybox/source/',
27
+        src: ['**'],
28
+        dest: 'source/fancybox/'
29
+      }
30
+    },
31
+    _clean: {
32
+      tmp: ['tmp'],
33
+      fontawesome: ['source/css/fonts'],
34
+      fancybox: ['source/fancybox']
35
+    }
36
+  });
37
+
38
+  require('load-grunt-tasks')(grunt);
39
+
40
+  grunt.renameTask('clean', '_clean');
41
+
42
+  grunt.registerTask('fontawesome', ['gitclone:fontawesome', 'copy:fontawesome', '_clean:tmp']);
43
+  grunt.registerTask('fancybox', ['gitclone:fancybox', 'copy:fancybox', '_clean:tmp']);
44
+  grunt.registerTask('default', ['gitclone', 'copy', '_clean:tmp']);
45
+  grunt.registerTask('clean', ['_clean']);
46
+};
0 47
\ No newline at end of file
1 48
new file mode 100644
... ...
@@ -0,0 +1,7 @@
1
+Copyright (c) 2013 Tommy Chen
2
+
3
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0 8
\ No newline at end of file
1 9
new file mode 100644
... ...
@@ -0,0 +1,111 @@
1
+# Landscape
2
+
3
+A brand new default theme for [Hexo].
4
+
5
+- [Preview](http://hexo.io/hexo-theme-landscape/)
6
+
7
+## Installation
8
+
9
+### Install
10
+
11
+``` bash
12
+$ git clone https://github.com/hexojs/hexo-theme-landscape.git themes/landscape
13
+```
14
+
15
+**Landscape requires Hexo 2.4 and above.**
16
+
17
+### Enable
18
+
19
+Modify `theme` setting in `_config.yml` to `landscape`.
20
+
21
+### Update
22
+
23
+``` bash
24
+cd themes/landscape
25
+git pull
26
+```
27
+
28
+## Configuration
29
+
30
+``` yml
31
+# Header
32
+menu:
33
+  Home: /
34
+  Archives: /archives
35
+rss: /atom.xml
36
+
37
+# Content
38
+excerpt_link: Read More
39
+fancybox: true
40
+
41
+# Sidebar
42
+sidebar: right
43
+widgets:
44
+- category
45
+- tag
46
+- tagcloud
47
+- archives
48
+- recent_posts
49
+
50
+# Miscellaneous
51
+google_analytics:
52
+favicon: /favicon.png
53
+twitter:
54
+google_plus:
55
+```
56
+
57
+- **menu** - Navigation menu
58
+- **rss** - RSS link
59
+- **excerpt_link** - "Read More" link at the bottom of excerpted articles. `false` to hide the link.
60
+- **fancybox** - Enable [Fancybox]
61
+- **sidebar** - Sidebar style. You can choose `left`, `right`, `bottom` or `false`.
62
+- **widgets** - Widgets displaying in sidebar
63
+- **google_analytics** - Google Analytics ID
64
+- **favicon** - Favicon path
65
+- **twitter** - Twiiter ID
66
+- **google_plus** - Google+ ID
67
+
68
+## Features
69
+
70
+### Fancybox
71
+
72
+Landscape uses [Fancybox] to showcase your photos. You can use Markdown syntax or fancybox tag plugin to add your photos.
73
+
74
+```
75
+![img caption](img url)
76
+
77
+{% fancybox img_url [img_thumbnail] [img_caption] %}
78
+```
79
+
80
+### Sidebar
81
+
82
+You can put your sidebar in left side, right side or bottom of your site by editing `sidebar` setting.
83
+
84
+Landscape provides 5 built-in widgets:
85
+
86
+- category
87
+- tag
88
+- tagcloud
89
+- archives
90
+- recent_posts
91
+
92
+All of them are enabled by default. You can edit them in `widget` setting.
93
+
94
+## Development
95
+
96
+### Requirements
97
+
98
+- [Grunt] 0.4+
99
+- Hexo 2.4+
100
+
101
+### Grunt tasks
102
+
103
+- **default** - Download [Fancybox] and [Font Awesome].
104
+- **fontawesome** - Only download [Font Awesome].
105
+- **fancybox** - Only download [Fancybox].
106
+- **clean** - Clean temporarily files and downloaded files.
107
+
108
+[Hexo]: http://zespia.tw/hexo/
109
+[Fancybox]: http://fancyapps.com/fancybox/
110
+[Font Awesome]: http://fontawesome.io/
111
+[Grunt]: http://gruntjs.com/
0 112
new file mode 100644
... ...
@@ -0,0 +1,39 @@
1
+# Header
2
+menu:
3
+  Home: /
4
+  About: /about
5
+  Games: http://play.bci.im
6
+  Softwares: https://git.bci.im
7
+  Archives: /archives
8
+rss: /atom.xml
9
+
10
+# Content
11
+excerpt_link: Read More
12
+fancybox: true
13
+
14
+# Sidebar
15
+sidebar: right
16
+widgets:
17
+- category
18
+- tag
19
+- tagcloud
20
+- archive
21
+- recent_posts
22
+
23
+# display widgets at the bottom of index pages (pagination == 2)
24
+index_widgets:
25
+# - category
26
+# - tagcloud
27
+# - archive
28
+
29
+# widget behavior
30
+archive_type: 'monthly'
31
+show_count: false
32
+
33
+# Miscellaneous
34
+google_analytics:
35
+favicon: /favicon.png
36
+twitter:
37
+google_plus:
38
+fb_admins:
39
+fb_app_id:
0 40
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+categories: Categories
2
+search: Search
3
+tags: Tags
4
+tagcloud: Tag Cloud
5
+tweets: Tweets
6
+prev: Prev
7
+next: Next
8
+comment: Comments
9
+archive_a: Archives
10
+archive_b: "Archives: %s"
11
+page: Page %d
12
+recent_posts: Recent Posts
13
+newer: Newer
14
+older: Older
15
+share: Share
16
+powered_by: Powered by
17
+rss_feed: RSS Feed
18
+category: Category
19
+tag: Tag
0 20
\ No newline at end of file
1 21
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+categories: Catégories
2
+search: Rechercher
3
+tags: Mot-clés
4
+tagcloud: Nuage de mot-clés
5
+tweets: Tweets
6
+prev: Précédent
7
+next: Suivant
8
+comment: Commentaires
9
+archive_a: Archives
10
+archive_b: "Archives: %s"
11
+page: Page %d
12
+recent_posts: Articles récents
13
+newer: Récent
14
+older: Ancien
15
+share: Partager
16
+powered_by: Propulsé by
17
+rss_feed: Flux RSS
18
+category: Catégorie
19
+tag: Mot-clé
0 20
new file mode 100644
... ...
@@ -0,0 +1,20 @@
1
+
2
+categories: Categorieën
3
+search: Zoeken
4
+tags: Labels
5
+tagcloud: Tag Cloud
6
+tweets: Tweets
7
+prev: Vorige
8
+next: Volgende
9
+comment: Commentaren
10
+archive_a: Archieven
11
+archive_b: "Archieven: %s"
12
+page: Pagina %d
13
+recent_posts: Recente berichten
14
+newer: Nieuwer
15
+older: Ouder
16
+share: Delen
17
+powered_by: Powered by
18
+rss_feed: RSS Feed
19
+category: Categorie
20
+tag: Label
0 21
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+categories: Kategorier
2
+search: Søk
3
+tags: Tags
4
+tagcloud: Tag Cloud
5
+tweets: Tweets
6
+prev: Forrige
7
+next: Neste
8
+comment: Kommentarer
9
+archive_a: Arkiv
10
+archive_b: "Arkiv: %s"
11
+page: Side %d
12
+recent_posts: Siste innlegg
13
+newer: Newer
14
+older: Older
15
+share: Share
16
+powered_by: Powered by
17
+rss_feed: RSS Feed
18
+category: Category
19
+tag: Tag
0 20
\ No newline at end of file
1 21
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+categories: Категории
2
+search: Поиск
3
+tags: Метки
4
+tagcloud: Облако меток
5
+tweets: Твиты
6
+prev: Назад
7
+next: Вперед
8
+comment: Комментарии
9
+archive_a: Архив
10
+archive_b: "Архив: %s"
11
+page: Страница %d
12
+recent_posts: Недавние записи
13
+newer: Следующий
14
+older: Предыдущий
15
+share: Поделиться
16
+powered_by: Создано с помощью
17
+rss_feed: RSS-каналы
18
+category: Категория
19
+tag: Метка
0 20
\ No newline at end of file
1 21
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+categories: 分类
2
+search: 搜索
3
+tags: 标签
4
+tagcloud: 标签云
5
+tweets: 推文
6
+prev: 上一页
7
+next: 下一页
8
+comment: 留言
9
+archive_a: 归档
10
+archive_b: 归档:%s
11
+page: 第 %d 页
12
+recent_posts: 最新文章
13
+newer: Newer
14
+older: Older
15
+share: Share
16
+powered_by: Powered by
17
+rss_feed: RSS Feed
18
+category: Category
19
+tag: Tag
0 20
\ No newline at end of file
1 21
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+categories: 分類
2
+search: 搜尋
3
+tags: 標籤
4
+tagcloud: 標籤雲
5
+tweets: 推文
6
+prev: 上一頁
7
+next: 下一頁
8
+comment: 留言
9
+archive_a: 彙整
10
+archive_b: 彙整:%s
11
+page: 第 %d 頁
12
+recent_posts: 最新文章
13
+newer: Newer
14
+older: Older
15
+share: Share
16
+powered_by: Powered by
17
+rss_feed: RSS Feed
18
+category: Category
19
+tag: Tag
0 20
\ No newline at end of file
1 21
new file mode 100644
... ...
@@ -0,0 +1,24 @@
1
+<% if (config.disqus_shortname){ %>
2
+<script>
3
+  var disqus_shortname = '<%= config.disqus_shortname %>';
4
+  <% if (page.permalink){ %>
5
+  var disqus_url = '<%= page.permalink %>';
6
+  <% } %>
7
+  (function(){
8
+    var dsq = document.createElement('script');
9
+    dsq.type = 'text/javascript';
10
+    dsq.async = true;
11
+    dsq.src = '//' + disqus_shortname + '.disqus.com/<% if (page.comments) { %>embed.js<% } else { %>count.js<% } %>';
12
+    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
13
+  })();
14
+</script>
15
+<% } %>
16
+
17
+<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
18
+
19
+<% if (theme.fancybox){ %>
20
+  <%- css('fancybox/jquery.fancybox') %>
21
+  <%- js('fancybox/jquery.fancybox.pack') %>
22
+<% } %>
23
+
24
+<%- js('js/script') %>
0 25
new file mode 100644
... ...
@@ -0,0 +1,8 @@
1
+<article class="archive-article archive-type-<%= post.layout %>">
2
+  <div class="archive-article-inner">
3
+    <header class="archive-article-header">
4
+      <%- partial('post/date', {class_name: 'archive-article-date', date_format: 'MMM D'}) %>
5
+      <%- partial('post/title', {class_name: 'archive-article-title'}) %>
6
+    </header>
7
+  </div>
8
+</article>
0 9
\ No newline at end of file
1 10
new file mode 100644
... ...
@@ -0,0 +1,33 @@
1
+<% if (pagination == 2){ %>
2
+  <% page.posts.each(function(post){ %>
3
+    <%- partial('article', {post: post, index: true}) %>
4
+  <% }) %>
5
+<% } else { %>
6
+  <% var last; %>
7
+  <% page.posts.each(function(post, i){ %>
8
+    <% var year = post.date.year(); %>
9
+    <% if (last != year){ %>
10
+      <% if (last != null){ %>
11
+        </div></section>
12
+      <% } %>
13
+      <% last = year; %>
14
+      <section class="archives-wrap">
15
+        <div class="archive-year-wrap">
16
+          <a href="<%- url_for(config.archive_dir + '/' + year) %>" class="archive-year"><%= year %></a>
17
+        </div>
18
+        <div class="archives">
19
+    <% } %>
20
+    <%- partial('archive-post', {post: post, even: i % 2 == 0}) %>
21
+  <% }) %>
22
+  <% if (page.posts.length){ %>
23
+    </div></section>
24
+  <% } %>
25
+<% } %>
26
+<% if (page.total > 1){ %>
27
+  <nav id="page-nav">
28
+    <%- paginator({
29
+      prev_text: "&laquo; __('prev')",
30
+      next_text: "__('next') &raquo;"
31
+    }) %>
32
+  </nav>
33
+<% } %>
0 34
\ No newline at end of file
1 35
new file mode 100644
... ...
@@ -0,0 +1,44 @@
1
+<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
2
+  <div class="article-meta">
3
+    <%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
4
+    <%- partial('post/category') %>
5
+  </div>
6
+  <div class="article-inner">
7
+    <%- partial('post/gallery') %>
8
+    <% if (post.link || post.title){ %>
9
+      <header class="article-header">
10
+        <%- partial('post/title', {class_name: 'article-title'}) %>
11
+      </header>
12
+    <% } %>
13
+    <div class="article-entry" itemprop="articleBody">
14
+      <% if (post.excerpt && index){ %>
15
+        <%- post.excerpt %>
16
+        <% if (theme.excerpt_link){ %>
17
+          <p class="article-more-link">
18
+            <a href="<%- url_for(post.path) %>#more"><%= theme.excerpt_link %></a>
19
+          </p>
20
+        <% } %>
21
+      <% } else { %>
22
+        <%- post.content %>
23
+      <% } %>
24
+    </div>
25
+    <footer class="article-footer">
26
+      <a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link"><%= __('share') %></a>
27
+      <% if (post.comments && config.disqus_shortname){ %>
28
+        <a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><%= __('comment') %></a>
29
+      <% } %>
30
+      <%- partial('post/tag') %>
31
+    </footer>
32
+  </div>
33
+  <% if (!index){ %>
34
+    <%- partial('post/nav') %>
35
+  <% } %>
36
+</article>
37
+
38
+<% if (!index && post.comments && config.disqus_shortname){ %>
39
+<section id="comments">
40
+  <div id="disqus_thread">
41
+    <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
42
+  </div>
43
+</section>
44
+<% } %>
0 45
\ No newline at end of file
1 46
new file mode 100644
... ...
@@ -0,0 +1,11 @@
1
+<footer id="footer">
2
+  <% if (theme.sidebar === 'bottom'){ %>
3
+    <%- partial('_partial/sidebar') %>
4
+  <% } %>
5
+  <div class="outer">
6
+    <div id="footer-info" class="inner">
7
+      &copy; <%= date(new Date(), 'YYYY') %> <%= config.author || config.title %><br>
8
+      <%= __('powered_by') %> <a href="http://hexo.io/" target="_blank">Hexo</a>
9
+    </div>
10
+  </div>
11
+</footer>
0 12
\ No newline at end of file
1 13
new file mode 100644
... ...
@@ -0,0 +1,14 @@
1
+<% if (theme.google_analytics){ %>
2
+<!-- Google Analytics -->
3
+<script type="text/javascript">
4
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
5
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
6
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
7
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
8
+
9
+ga('create', '<%= theme.google_analytics %>', 'auto');
10
+ga('send', 'pageview');
11
+
12
+</script>
13
+<!-- End Google Analytics -->
14
+<% } %>
0 15
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+  <meta charset="utf-8">
5
+  <%
6
+  var title = page.title;
7
+
8
+  if (is_archive()){
9
+    title = __('archive_a');
10
+
11
+    if (is_month()){
12
+      title += ': ' + page.year + '/' + page.month;
13
+    } else if (is_year()){
14
+      title += ': ' + page.year;
15
+    }
16
+  } else if (is_category()){
17
+    title = __('category') + ': ' + page.category;
18
+  } else if (is_tag()){
19
+    title = __('tag') + ': ' + page.tag;
20
+  }
21
+  %>
22
+  <title><% if (title){ %><%= title %> | <% } %><%= config.title %></title>
23
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
24
+  <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %>
25
+  <% if (theme.rss){ %>
26
+    <link rel="alternate" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml">
27
+  <% } %>
28
+  <% if (theme.favicon){ %>
29
+    <link rel="icon" href="<%- theme.favicon %>">
30
+  <% } %>
31
+  <% if (config.highlight.enable){ %>
32
+    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
33
+  <% } %>
34
+  <%- css('css/style') %>
35
+  <%- partial('google-analytics') %>
36
+</head>
0 37
new file mode 100644
... ...
@@ -0,0 +1,32 @@
1
+<header id="header">
2
+  <div id="banner"></div>
3
+  <div id="header-outer" class="outer">
4
+    <div id="header-title" class="inner">
5
+      <h1 id="logo-wrap">
6
+        <a href="<%- url_for() %>" id="logo"><%= config.title %></a>
7
+      </h1>
8
+      <% if (theme.subtitle){ %>
9
+        <h2 id="subtitle-wrap">
10
+          <a href="<%- url_for() %>" id="subtitle"><%= theme.subtitle %></a>
11
+        </h2>
12
+      <% } %>
13
+    </div>
14
+    <div id="header-inner" class="inner">
15
+      <nav id="main-nav">
16
+        <a id="main-nav-toggle" class="nav-icon"></a>
17
+        <% for (var i in theme.menu){ %>
18
+          <a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a>
19
+        <% } %>
20
+      </nav>
21
+      <nav id="sub-nav">
22
+        <% if (theme.rss){ %>
23
+          <a id="nav-rss-link" class="nav-icon" href="<%- theme.rss %>" title="<%= __('rss_feed') %>"></a>
24
+        <% } %>
25
+        <a id="nav-search-btn" class="nav-icon" title="<%= __('search') %>"></a>
26
+      </nav>
27
+      <div id="search-form-wrap">
28
+        <%- search_form({button: '&#xF002;'}) %>
29
+      </div>
30
+    </div>
31
+  </div>
32
+</header>
0 33
\ No newline at end of file
1 34
new file mode 100644
... ...
@@ -0,0 +1,5 @@
1
+<nav id="mobile-nav">
2
+  <% for (var i in theme.menu){ %>
3
+    <a href="<%- url_for(theme.menu[i]) %>" class="mobile-nav-link"><%= i %></a>
4
+  <% } %>
5
+</nav>
0 6
\ No newline at end of file
1 7
new file mode 100644
... ...
@@ -0,0 +1,10 @@
1
+<% if (post.categories && post.categories.length){ %>
2
+  <div class="article-category">
3
+    <%- list_categories(post.categories, {
4
+      show_count: false,
5
+      class: 'article-category',
6
+      style: 'none',
7
+      separator: '►'
8
+    }) %>
9
+  </div>
10
+<% } %>
0 11
\ No newline at end of file
1 12
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+<a href="<%- url_for(post.path) %>" class="<%= class_name %>">
2
+  <time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date, date_format) %></time>
3
+</a>
0 4
\ No newline at end of file
1 5
new file mode 100644
... ...
@@ -0,0 +1,11 @@
1
+<% if (post.photos && post.photos.length){ %>
2
+<div class="article-gallery">
3
+  <div class="article-gallery-photos">
4
+    <% post.photos.forEach(function(photo, i){ %>
5
+      <a class="article-gallery-img fancybox" href="<%- url_for(photo) %>" rel="gallery_<%= post._id %>">
6
+        <img src="<%- url_for(photo) %>" itemprop="image">
7
+      </a>
8
+    <% }) %>
9
+  </div>
10
+</div>
11
+<% } %>
0 12
\ No newline at end of file
1 13
new file mode 100644
... ...
@@ -0,0 +1,22 @@
1
+<% if (post.prev || post.next){ %>
2
+<nav id="article-nav">
3
+  <% if (post.prev){ %>
4
+    <a href="<%- url_for(post.prev.path) %>" id="article-nav-newer" class="article-nav-link-wrap">
5
+      <strong class="article-nav-caption"><%= __('newer') %></strong>
6
+      <div class="article-nav-title">
7
+        <% if (post.prev.title){ %>
8
+          <%= post.prev.title %>
9
+        <% } else { %>
10
+          (no title)
11
+        <% } %>
12
+      </div>
13
+    </a>
14
+  <% } %>
15
+  <% if (post.next){ %>
16
+    <a href="<%- url_for(post.next.path) %>" id="article-nav-older" class="article-nav-link-wrap">
17
+      <strong class="article-nav-caption"><%= __('older') %></strong>
18
+      <div class="article-nav-title"><%= post.next.title %></div>
19
+    </a>
20
+  <% } %>
21
+</nav>
22
+<% } %>
0 23
\ No newline at end of file
1 24
new file mode 100644
... ...
@@ -0,0 +1,6 @@
1
+<% if (post.tags && post.tags.length){ %>
2
+  <%- list_tags(post.tags, {
3
+    show_count: false,
4
+    class: 'article-tag'
5
+  }) %>
6
+<% } %>
0 7
\ No newline at end of file
1 8
new file mode 100644
... ...
@@ -0,0 +1,15 @@
1
+<% if (post.link){ %>
2
+  <h1 itemprop="name">
3
+    <a class="<%= class_name %>" href="<%- url_for(post.link) %>" target="_blank" itemprop="url"><%= post.title %></a>
4
+  </h1>
5
+<% } else if (post.title){ %>
6
+  <% if (index){ %>
7
+    <h1 itemprop="name">
8
+      <a class="<%= class_name %>" href="<%- url_for(post.path) %>"><%= post.title %></a>
9
+    </h1>
10
+  <% } else { %>
11
+    <h1 class="<%= class_name %>" itemprop="name">
12
+      <%= post.title %>
13
+    </h1>
14
+  <% } %>
15
+<% } %>
0 16
\ No newline at end of file
1 17
new file mode 100644
... ...
@@ -0,0 +1,5 @@
1
+<aside id="sidebar"<% if (theme.sidebar === 'bottom'){ %> class="outer"<% } %>>
2
+  <% theme.widgets.forEach(function(widget){ %>
3
+    <%- partial('_widget/' + widget) %>
4
+  <% }) %>
5
+</aside>
0 6
\ No newline at end of file
1 7
new file mode 100644
... ...
@@ -0,0 +1,8 @@
1
+<% if (site.posts.length){ %>
2
+  <div class="widget-wrap">
3
+    <h3 class="widget-title"><%= __('archive_a') %></h3>
4
+    <div class="widget">
5
+      <%- list_archives({show_count: theme.show_count, type: theme.archive_type}) %>
6
+    </div>
7
+  </div>
8
+<% } %>
0 9
new file mode 100644
... ...
@@ -0,0 +1,8 @@
1
+<% if (site.categories.length){ %>
2
+  <div class="widget-wrap">
3
+    <h3 class="widget-title"><%= __('categories') %></h3>
4
+    <div class="widget">
5
+      <%- list_categories({show_count: theme.show_count}) %>
6
+    </div>
7
+  </div>
8
+<% } %>
0 9
new file mode 100644
... ...
@@ -0,0 +1,14 @@
1
+<% if (site.posts.length){ %>
2
+  <div class="widget-wrap">
3
+    <h3 class="widget-title"><%= __('recent_posts') %></h3>
4
+    <div class="widget">
5
+      <ul>
6
+        <% site.posts.sort('date', -1).limit(5).each(function(post){ %>
7
+          <li>
8
+            <a href="<%- url_for(post.path) %>"><%= post.title || '(no title)' %></a>
9
+          </li>
10
+        <% }) %>
11
+      </ul>
12
+    </div>
13
+  </div>
14
+<% } %>
0 15
\ No newline at end of file
1 16
new file mode 100644
... ...
@@ -0,0 +1,8 @@
1
+<% if (site.tags.length){ %>
2
+  <div class="widget-wrap">
3
+    <h3 class="widget-title"><%= __('tags') %></h3>
4
+    <div class="widget">
5
+      <%- list_tags({show_count: theme.show_count}) %>
6
+    </div>
7
+  </div>
8
+<% } %>
0 9
new file mode 100644
... ...
@@ -0,0 +1,8 @@
1
+<% if (site.tags.length){ %>
2
+  <div class="widget-wrap">
3
+    <h3 class="widget-title"><%= __('tagcloud') %></h3>
4
+    <div class="widget tagcloud">
5
+      <%- tagcloud() %>
6
+    </div>
7
+  </div>
8
+<% } %>
0 9
\ No newline at end of file
1 10
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+<%- partial('_partial/archive', {pagination: config.archive, index: true}) %>
0 2
\ No newline at end of file
1 3
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+<%- partial('_partial/archive', {pagination: config.category, index: true}) %>
0 2
\ No newline at end of file
1 3
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+<%- partial('_partial/archive', {pagination: 2, index: true}) %>
0 2
\ No newline at end of file
1 3
new file mode 100644
... ...
@@ -0,0 +1,18 @@
1
+<%- partial('_partial/head') %>
2
+<body>
3
+  <div id="container">
4
+    <div id="wrap">
5
+      <%- partial('_partial/header', null, {cache: !config.relative_link}) %>
6
+      <div class="outer">
7
+        <section id="main"><%- body %></section>
8
+        <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %>
9
+          <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %>
10
+        <% } %>
11
+      </div>
12
+      <%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
13
+    </div>
14
+    <%- partial('_partial/mobile-nav', null, {cache: !config.relative_link}) %>
15
+    <%- partial('_partial/after-footer') %>
16
+  </div>
17
+</body>
18
+</html>
0 19
\ No newline at end of file
1 20
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+<%- partial('_partial/article', {post: page, index: false}) %>
0 2
\ No newline at end of file
1 3
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+<%- partial('_partial/article', {post: page, index: false}) %>
0 2
\ No newline at end of file
1 3
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+<%- partial('_partial/archive', {pagination: config.tag, index: true}) %>
0 2
\ No newline at end of file
1 3
new file mode 100644
... ...
@@ -0,0 +1,12 @@
1
+{
2
+  "name": "hexo-theme-landscape",
3
+  "version": "0.0.1",
4
+  "private": true,
5
+  "devDependencies": {
6
+    "grunt": "~0.4.2",
7
+    "load-grunt-tasks": "~0.2.0",
8
+    "grunt-git": "~0.2.2",
9
+    "grunt-contrib-clean": "~0.5.0",
10
+    "grunt-contrib-copy": "~0.4.1"
11
+  }
12
+}
0 13
new file mode 100644
... ...
@@ -0,0 +1,24 @@
1
+var rUrl = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/;
2
+
3
+/**
4
+* Fancybox tag
5
+*
6
+* Syntax:
7
+*   {% fancybox /path/to/image [/path/to/thumbnail] [title] %}
8
+*/
9
+
10
+hexo.extend.tag.register('fancybox', function(args){
11
+  var original = args.shift(),
12
+    thumbnail = '';
13
+
14
+  if (args.length && rUrl.test(args[0])){
15
+    thumbnail = args.shift();
16
+  }
17
+
18
+  var title = args.join(' ');
19
+
20
+  return '<a class="fancybox" href="' + original + '" title="' + title + '">' +
21
+    '<img src="' + (thumbnail || original) + '" alt="' + title + '">'
22
+    '</a>' +
23
+    (title ? '<span class="caption">' + title + '</span>' : '');
24
+});
0 25
\ No newline at end of file
1 26
new file mode 100644
... ...
@@ -0,0 +1,63 @@
1
+$block-caption
2
+  text-decoration: none
3
+  text-transform: uppercase
4
+  letter-spacing: 2px
5
+  color: color-grey
6
+  margin-bottom: 1em
7
+  margin-left: 5px
8
+  line-height: 1em
9
+  text-shadow: 0 1px #fff
10
+  font-weight: bold
11
+
12
+$block
13
+  background: #fff
14
+  box-shadow: 1px 2px 3px #ddd
15
+  border: 1px solid color-border
16
+  border-radius: 3px
17
+
18
+$base-style
19
+  h1
20
+    font-size: 2em
21
+  h2
22
+    font-size: 1.5em
23
+  h3
24
+    font-size: 1.3em
25
+  h4
26
+    font-size: 1.2em
27
+  h5
28
+    font-size: 1em
29
+  h6
30
+    font-size: 1em
31
+    color: color-grey
32
+  hr
33
+    border: 1px dashed color-border
34
+  strong
35
+    font-weight: bold
36
+  em, cite
37
+    font-style: italic
38
+  sup, sub
39
+    font-size: 0.75em
40
+    line-height: 0
41
+    position: relative
42
+    vertical-align: baseline
43
+  sup
44
+    top: -0.5em
45
+  sub
46
+    bottom: -0.2em
47
+  small
48
+    font-size: 0.85em
49
+  acronym, abbr
50
+    border-bottom: 1px dotted
51
+  ul, ol, dl
52
+    margin: 0 20px
53
+    line-height: line-height
54
+  ul, ol
55
+    ul, ol
56
+      margin-top: 0
57
+      margin-bottom: 0
58
+  ul
59
+    list-style: disc
60
+  ol
61
+    list-style: decimal
62
+  dt
63
+    font-weight: bold
0 64
\ No newline at end of file
1 65
new file mode 100644
... ...
@@ -0,0 +1,80 @@
1
+.archives-wrap
2
+  margin: block-margin 0
3
+
4
+.archives
5
+  clearfix()
6
+
7
+.archive-year-wrap
8
+  margin-bottom: 1em
9
+
10
+.archive-year
11
+  @extend $block-caption
12
+
13
+.archives
14
+  column-gap: 10px
15
+  @media mq-tablet
16
+    column-count: 2
17
+  @media mq-normal
18
+    column-count: 3
19
+
20
+.archive-article
21
+  avoid-column-break()
22
+
23
+.archive-article-inner
24
+  @extend $block
25
+  padding: 10px
26
+  margin-bottom: 15px
27
+
28
+.archive-article-title
29
+  text-decoration: none
30
+  font-weight: bold
31
+  color: color-default
32
+  transition: color 0.2s
33
+  line-height: line-height
34
+  &:hover
35
+    color: color-link
36
+
37
+.archive-article-footer
38
+  margin-top: 1em
39
+
40
+.archive-article-date
41
+  color: color-grey
42
+  text-decoration: none
43
+  font-size: 0.85em
44
+  line-height: 1em
45
+  margin-bottom: 0.5em
46
+  display: block
47
+
48
+#page-nav
49
+  clearfix()
50
+  margin: block-margin auto
51
+  background: #fff
52
+  box-shadow: 1px 2px 3px #ddd
53
+  border: 1px solid color-border
54
+  border-radius: 3px
55
+  text-align: center
56
+  color: color-grey
57
+  overflow: hidden
58
+  a, span
59
+    padding: 10px 20px
60
+    line-height: 1
61
+    height: 2ex
62
+  a
63
+    color: color-grey
64
+    text-decoration: none
65
+    &:hover
66
+      background: color-grey
67
+      color: #fff
68
+  .prev
69
+    float: left
70
+  .next
71
+    float: right
72
+  .page-number
73
+    display: inline-block
74
+    @media mq-mobile
75
+      display: none
76
+  .current
77
+    color: color-default
78
+    font-weight: bold
79
+  .space
80
+    color: color-border
0 81
\ No newline at end of file
1 82
new file mode 100644
... ...
@@ -0,0 +1,357 @@
1
+.article
2
+  margin: block-margin 0
3
+
4
+.article-inner
5
+  @extend $block
6
+  overflow: hidden
7
+
8
+.article-meta
9
+  clearfix()
10
+
11
+.article-date
12
+  @extend $block-caption
13
+  float: left
14
+
15
+.article-category
16
+  float: left
17
+  line-height: 1em
18
+  color: #ccc
19
+  text-shadow: 0 1px #fff
20
+  margin-left: 8px
21
+  &:before
22
+    content: "\2022"
23
+
24
+.article-category-link
25
+  @extend $block-caption
26
+  margin: 0 12px 1em
27
+
28
+.article-header
29
+  padding: article-padding article-padding 0
30
+
31
+.article-title
32
+  text-decoration: none
33
+  font-size: 2em
34
+  font-weight: bold
35
+  color: color-default
36
+  line-height: line-height-title
37
+  transition: color 0.2s
38
+  a&:hover
39
+    color: color-link
40
+
41
+.article-entry
42
+  @extend $base-style
43
+  clearfix()
44
+  color: color-default
45
+  padding: 0 article-padding
46
+  p, table
47
+    line-height: line-height
48
+    margin: line-height 0
49
+  h1, h2, h3, h4, h5, h6
50
+    font-weight: bold
51
+  h1, h2, h3, h4, h5, h6
52
+    line-height: line-height-title
53
+    margin: line-height-title 0
54
+  a
55
+    color: color-link
56
+    text-decoration: none
57
+    &:hover
58
+      text-decoration: underline
59
+  ul, ol, dl
60
+    margin-top: line-height
61
+    margin-bottom: line-height
62
+  img, video
63
+    max-width: 100%
64
+    height: auto
65
+    display: block
66
+    margin: auto
67
+  iframe
68
+    border: none
69
+  table
70
+    width: 100%
71
+    border-collapse: collapse
72
+    border-spacing: 0
73
+  th
74
+    font-weight: bold
75
+    border-bottom: 3px solid color-border
76
+    padding-bottom: 0.5em
77
+  td
78
+    border-bottom: 1px solid color-border
79
+    padding: 10px 0
80
+  blockquote
81
+    font-family: font-serif
82
+    font-size: 1.4em
83
+    margin: line-height 20px
84
+    text-align: center
85
+    footer
86
+      font-size: font-size
87
+      margin: line-height 0
88
+      font-family: font-sans
89
+      cite
90
+        &:before
91
+          content: "—"
92
+          padding: 0 0.5em
93
+  .pullquote
94
+    text-align: left
95
+    width: 45%
96
+    margin: 0
97
+    &.left
98
+      margin-left: 0.5em
99
+      margin-right: 1em
100
+    &.right
101
+      margin-right: 0.5em
102
+      margin-left: 1em
103
+  .caption
104
+    color: color-grey
105
+    display: block
106
+    font-size: 0.9em
107
+    margin-top: 0.5em
108
+    position: relative
109
+    text-align: center
110
+  // http://webdesignerwall.com/tutorials/css-elastic-videos
111
+  .video-container
112
+    position: relative
113
+    padding-top: (9 / 16 * 100)% // 16:9 ratio
114
+    height: 0
115
+    overflow: hidden
116
+    iframe, object, embed
117
+      position: absolute
118
+      top: 0
119
+      left: 0
120
+      width: 100%
121
+      height: 100%
122
+      margin-top: 0
123
+
124
+.article-more-link a
125
+  display: inline-block
126
+  line-height: 1em
127
+  padding: 6px 15px
128
+  border-radius: 15px
129
+  background: color-background
130
+  color: color-grey
131
+  text-shadow: 0 1px #fff