');
36 | if (typeof (IcarusThemeSettings) !== 'undefined' &&
37 | typeof (IcarusThemeSettings.article) !== 'undefined' &&
38 | typeof (IcarusThemeSettings.article.highlight) !== 'undefined') {
39 | if (typeof (ClipboardJS) !== 'undefined' && IcarusThemeSettings.article.highlight.clipboard) {
40 | $('figure.highlight').each(function () {
41 | var id = 'code-' + Date.now() + (Math.random() * 1000 | 0);
42 | var button = '
';
43 | $(this).attr('id', id);
44 | if ($(this).find('figcaption').length) {
45 | $(this).find('figcaption').prepend(button);
46 | } else {
47 | $(this).prepend('
' + button + '');
48 | }
49 | });
50 | new ClipboardJS('.highlight .copy');
51 | }
52 | var fold = IcarusThemeSettings.article.highlight.fold;
53 | if (fold.trim()) {
54 | var button = '
' + (fold === 'unfolded' ? '' : '') + '';
55 | $('figure.highlight').each(function () {
56 | if ($(this).find('figcaption').length) {
57 | $(this).find('figcaption').prepend(button);
58 | } else {
59 | $(this).prepend('
' + button + '');
60 | }
61 | });
62 |
63 | function toggleFold(codeBlock, isFolded) {
64 | var $toggle = $(codeBlock).find('.fold i');
65 | !isFolded ? $(codeBlock).removeClass('folded') : $(codeBlock).addClass('folded');
66 | !isFolded ? $toggle.removeClass('fa-angle-right') : $toggle.removeClass('fa-angle-down');
67 | !isFolded ? $toggle.addClass('fa-angle-down') : $toggle.addClass('fa-angle-right');
68 | }
69 |
70 | $('figure.highlight').each(function () {
71 | toggleFold(this, fold === 'folded');
72 | });
73 | $('figure.highlight figcaption .fold').click(function () {
74 | var $code = $(this).closest('figure.highlight');
75 | toggleFold($code.eq(0), !$code.hasClass('folded'));
76 | });
77 | }
78 | }
79 |
80 | var $toc = $('#toc');
81 | if ($toc.length > 0) {
82 | var $mask = $('
');
83 | $mask.attr('id', 'toc-mask');
84 |
85 | $('body').append($mask);
86 |
87 | function toggleToc() {
88 | $toc.toggleClass('is-active');
89 | $mask.toggleClass('is-active');
90 | }
91 |
92 | $toc.on('click', toggleToc);
93 | $mask.on('click', toggleToc);
94 | $('.navbar-main .catalogue').on('click', toggleToc);
95 | }
96 | })(jQuery);
97 |
--------------------------------------------------------------------------------
/themes/landscape/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | tmp
--------------------------------------------------------------------------------
/themes/landscape/Gruntfile.js:
--------------------------------------------------------------------------------
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 | };
--------------------------------------------------------------------------------
/themes/landscape/LICENSE:
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
/themes/landscape/README.md:
--------------------------------------------------------------------------------
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.** If you would like to enable the RSS, the [hexo-generate-feed] plugin is also required.
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 | 
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]: https://hexo.io/
109 | [Fancybox]: http://fancyapps.com/fancybox/
110 | [Font Awesome]: http://fontawesome.io/
111 | [Grunt]: http://gruntjs.com/
112 | [hexo-generate-feed]: https://github.com/hexojs/hexo-generator-feed
113 |
--------------------------------------------------------------------------------
/themes/landscape/_config.yml:
--------------------------------------------------------------------------------
1 | # Header
2 | menu:
3 | Home: /
4 | Archives: /archives
5 | rss: /atom.xml
6 |
7 | # Content
8 | excerpt_link: Read More
9 | fancybox: true
10 |
11 | # Sidebar
12 | sidebar: right
13 | widgets:
14 | - category
15 | - tag
16 | - tagcloud
17 | - archive
18 | - recent_posts
19 |
20 | # display widgets at the bottom of index pages (pagination == 2)
21 | index_widgets:
22 | # - category
23 | # - tagcloud
24 | # - archive
25 |
26 | # widget behavior
27 | archive_type: 'monthly'
28 | show_count: false
29 |
30 | # Miscellaneous
31 | google_analytics:
32 | gauges_analytics:
33 | favicon: /favicon.png
34 | twitter:
35 | google_plus:
36 | fb_admins:
37 | fb_app_id:
38 |
--------------------------------------------------------------------------------
/themes/landscape/languages/de.yml:
--------------------------------------------------------------------------------
1 | categories: Kategorien
2 | search: Suche
3 | tags: Tags
4 | tagcloud: Tag Cloud
5 | tweets: Tweets
6 | prev: zurück
7 | next: weiter
8 | comment: Kommentare
9 | archive_a: Archiv
10 | archive_b: "Archive: %s"
11 | page: Seite %d
12 | recent_posts: letzter Beitrag
13 | newer: Neuer
14 | older: Älter
15 | share: Teilen
16 | powered_by: Powered by
17 | rss_feed: RSS Feed
18 | category: Kategorie
19 | tag: Tag
20 |
--------------------------------------------------------------------------------
/themes/landscape/languages/default.yml:
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
/themes/landscape/languages/es.yml:
--------------------------------------------------------------------------------
1 | categories: Categorías
2 | search: Buscar
3 | tags: Tags
4 | tagcloud: Nube de Tags
5 | tweets: Tweets
6 | prev: Previo
7 | next: Siguiente
8 | comment: Comentarios
9 | archive_a: Archivos
10 | archive_b: "Archivos: %s"
11 | page: Página %d
12 | recent_posts: Posts recientes
13 | newer: Nuevo
14 | older: Viejo
15 | share: Compartir
16 | powered_by: Construido por
17 | rss_feed: RSS
18 | category: Categoría
19 | tag: Tag
--------------------------------------------------------------------------------
/themes/landscape/languages/fr.yml:
--------------------------------------------------------------------------------
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é par
17 | rss_feed: Flux RSS
18 | category: Catégorie
19 | tag: Mot-clé
20 |
--------------------------------------------------------------------------------
/themes/landscape/languages/ja.yml:
--------------------------------------------------------------------------------
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: Powered by
17 | rss_feed: RSSフィード
18 | category: カテゴリ
19 | tag: タグ
20 |
--------------------------------------------------------------------------------
/themes/landscape/languages/ko.yml:
--------------------------------------------------------------------------------
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: Powered by
17 | rss_feed: RSS Feed
18 | category: 카테고리
19 | tag: 태그
20 |
--------------------------------------------------------------------------------
/themes/landscape/languages/nl.yml:
--------------------------------------------------------------------------------
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
21 |
--------------------------------------------------------------------------------
/themes/landscape/languages/no.yml:
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
/themes/landscape/languages/pt.yml:
--------------------------------------------------------------------------------
1 | categories: Categorias
2 | search: Buscar
3 | tags: Tags
4 | tagcloud: Nuvem de Tags
5 | tweets: Tweets
6 | prev: Anterior
7 | next: Próximo
8 | comment: Comentários
9 | archive_a: Arquivos
10 | archive_b: "Arquivos: %s"
11 | page: Página %d
12 | recent_posts: Postagens Recentes
13 | newer: Mais Recente
14 | older: Mais Antigo
15 | share: Compartilhar
16 | powered_by: Desenvolvido por
17 | rss_feed: Feed RSS
18 | category: Categoria
19 | tag: Tag
20 |
--------------------------------------------------------------------------------
/themes/landscape/languages/ru.yml:
--------------------------------------------------------------------------------
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: Метка
--------------------------------------------------------------------------------
/themes/landscape/languages/zh-CN.yml:
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
/themes/landscape/languages/zh-TW.yml:
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/after-footer.ejs:
--------------------------------------------------------------------------------
1 | <% if (config.disqus_shortname){ %>
2 |
15 | <% } %>
16 |
17 |
18 |
19 | <% if (theme.fancybox){ %>
20 | <%- css('fancybox/jquery.fancybox') %>
21 | <%- js('fancybox/jquery.fancybox.pack') %>
22 | <% } %>
23 |
24 | <%- js('js/script') %>
25 | <%- partial('gauges-analytics') %>
26 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/archive-post.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%- partial('post/date', {class_name: 'archive-article-date', date_format: 'MMM D'}) %>
5 | <%- partial('post/title', {class_name: 'archive-article-title'}) %>
6 |
7 |
8 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/archive.ejs:
--------------------------------------------------------------------------------
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 |
12 | <% } %>
13 | <% last = year; %>
14 |
15 |
18 |
19 | <% } %>
20 | <%- partial('archive-post', {post: post, even: i % 2 == 0}) %>
21 | <% }) %>
22 | <% if (page.posts.length){ %>
23 |
24 | <% } %>
25 | <% } %>
26 | <% if (page.total > 1){ %>
27 |
34 | <% } %>
35 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/article.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
4 | <%- partial('post/category') %>
5 |
6 |
7 | <%- partial('post/gallery') %>
8 | <% if (post.link || post.title){ %>
9 |
10 | <%- partial('post/title', {class_name: 'article-title'}) %>
11 |
12 | <% } %>
13 |
14 | <% if (post.excerpt && index){ %>
15 | <%- post.excerpt %>
16 | <% if (theme.excerpt_link){ %>
17 |
18 | <%= theme.excerpt_link %>
19 |
20 | <% } %>
21 | <% } else { %>
22 | <%- post.content %>
23 | <% } %>
24 |
25 |
32 |
33 | <% if (!index){ %>
34 | <%- partial('post/nav') %>
35 | <% } %>
36 |
37 |
38 | <% if (!index && post.comments && config.disqus_shortname){ %>
39 |
44 | <% } %>
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/footer.ejs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/gauges-analytics.ejs:
--------------------------------------------------------------------------------
1 | <% if (theme.gauges_analytics){ %>
2 |
3 |
17 |
18 | <% } %>
19 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/google-analytics.ejs:
--------------------------------------------------------------------------------
1 | <% if (theme.google_analytics){ %>
2 |
3 |
13 |
14 | <% } %>
15 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/head.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <%- partial('google-analytics') %>
6 | <%
7 | var title = page.title;
8 |
9 | if (is_archive()){
10 | title = __('archive_a');
11 |
12 | if (is_month()){
13 | title += ': ' + page.year + '/' + page.month;
14 | } else if (is_year()){
15 | title += ': ' + page.year;
16 | }
17 | } else if (is_category()){
18 | title = __('category') + ': ' + page.category;
19 | } else if (is_tag()){
20 | title = __('tag') + ': ' + page.tag;
21 | }
22 | %>
23 |
<% if (title){ %><%= title %> | <% } %><%= config.title %>
24 |
25 | <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %>
26 | <% if (theme.rss){ %>
27 |
28 | <% } %>
29 | <% if (theme.favicon){ %>
30 |
31 | <% } %>
32 | <% if (config.highlight.enable){ %>
33 |
34 | <% } %>
35 | <%- css('css/style') %>
36 |
37 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/header.ejs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/mobile-nav.ejs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/post/category.ejs:
--------------------------------------------------------------------------------
1 | <% if (post.categories && post.categories.length){ %>
2 |
3 | <%- list_categories(post.categories, {
4 | show_count: false,
5 | class: 'article-category',
6 | style: 'none',
7 | separator: '►'
8 | }) %>
9 |
10 | <% } %>
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/post/date.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/post/gallery.ejs:
--------------------------------------------------------------------------------
1 | <% if (post.photos && post.photos.length){ %>
2 |
3 |
4 | <% post.photos.forEach(function(photo, i){ %>
5 |
6 |
7 |
8 | <% }) %>
9 |
10 |
11 | <% } %>
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/post/nav.ejs:
--------------------------------------------------------------------------------
1 | <% if (post.prev || post.next){ %>
2 |
22 | <% } %>
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/post/tag.ejs:
--------------------------------------------------------------------------------
1 | <% if (post.tags && post.tags.length){ %>
2 | <%- list_tags(post.tags, {
3 | show_count: false,
4 | class: 'article-tag'
5 | }) %>
6 | <% } %>
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/post/title.ejs:
--------------------------------------------------------------------------------
1 | <% if (post.link){ %>
2 |
5 | <% } else if (post.title){ %>
6 | <% if (index){ %>
7 |
10 | <% } else { %>
11 |
12 | <%= post.title %>
13 |
14 | <% } %>
15 | <% } %>
--------------------------------------------------------------------------------
/themes/landscape/layout/_partial/sidebar.ejs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_widget/archive.ejs:
--------------------------------------------------------------------------------
1 | <% if (site.posts.length){ %>
2 |
8 | <% } %>
9 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_widget/category.ejs:
--------------------------------------------------------------------------------
1 | <% if (site.categories.length){ %>
2 |
8 | <% } %>
9 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_widget/recent_posts.ejs:
--------------------------------------------------------------------------------
1 | <% if (site.posts.length){ %>
2 |
14 | <% } %>
--------------------------------------------------------------------------------
/themes/landscape/layout/_widget/tag.ejs:
--------------------------------------------------------------------------------
1 | <% if (site.tags.length){ %>
2 |
8 | <% } %>
9 |
--------------------------------------------------------------------------------
/themes/landscape/layout/_widget/tagcloud.ejs:
--------------------------------------------------------------------------------
1 | <% if (site.tags.length){ %>
2 |
8 | <% } %>
--------------------------------------------------------------------------------
/themes/landscape/layout/archive.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/archive', {pagination: config.archive, index: true}) %>
--------------------------------------------------------------------------------
/themes/landscape/layout/category.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/archive', {pagination: config.category, index: true}) %>
--------------------------------------------------------------------------------
/themes/landscape/layout/index.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/archive', {pagination: 2, index: true}) %>
--------------------------------------------------------------------------------
/themes/landscape/layout/layout.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/head') %>
2 |
3 |
4 |
5 | <%- partial('_partial/header', null, {cache: !config.relative_link}) %>
6 |
7 |
8 | <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %>
9 | <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %>
10 | <% } %>
11 |
12 | <%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
13 |
14 | <%- partial('_partial/mobile-nav', null, {cache: !config.relative_link}) %>
15 | <%- partial('_partial/after-footer') %>
16 |
17 |
18 |
--------------------------------------------------------------------------------
/themes/landscape/layout/page.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/article', {post: page, index: false}) %>
--------------------------------------------------------------------------------
/themes/landscape/layout/post.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/article', {post: page, index: false}) %>
--------------------------------------------------------------------------------
/themes/landscape/layout/tag.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('_partial/archive', {pagination: config.tag, index: true}) %>
--------------------------------------------------------------------------------
/themes/landscape/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hexo-theme-landscape",
3 | "version": "0.0.2",
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 | }
13 |
--------------------------------------------------------------------------------
/themes/landscape/scripts/fancybox.js:
--------------------------------------------------------------------------------
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 '
' +
21 | '
'
22 | '' +
23 | (title ? '
' + title + '' : '');
24 | });
--------------------------------------------------------------------------------
/themes/landscape/source/css/_extend.styl:
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
/themes/landscape/source/css/_partial/archive.styl:
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
/themes/landscape/source/css/_partial/comment.styl:
--------------------------------------------------------------------------------
1 | #comments
2 | background: #fff
3 | box-shadow: 1px 2px 3px #ddd
4 | padding: article-padding
5 | border: 1px solid color-border
6 | border-radius: 3px
7 | margin: block-margin 0
8 | a
9 | color: color-link
--------------------------------------------------------------------------------
/themes/landscape/source/css/_partial/footer.styl:
--------------------------------------------------------------------------------
1 | #footer
2 | background: color-footer-background
3 | padding: 50px 0
4 | border-top: 1px solid color-border
5 | color: color-grey
6 | a
7 | color: color-link
8 | text-decoration: none
9 | &:hover
10 | text-decoration: underline
11 |
12 | #footer-info
13 | line-height: line-height
14 | font-size: 0.85em
--------------------------------------------------------------------------------
/themes/landscape/source/css/_partial/header.styl:
--------------------------------------------------------------------------------
1 | #header
2 | height: banner-height
3 | position: relative
4 | border-bottom: 1px solid color-border
5 | &:before, &:after
6 | content: ""
7 | position: absolute
8 | left: 0
9 | right: 0
10 | height: 40px
11 | &:before
12 | top: 0
13 | background: linear-gradient(rgba(0, 0, 0, 0.2), transparent)
14 | &:after
15 | bottom: 0
16 | background: linear-gradient(transparent, rgba(0, 0, 0, 0.2))
17 |
18 | #header-outer
19 | height: 100%
20 | position: relative
21 |
22 | #header-inner
23 | position: relative
24 | overflow: hidden
25 |
26 | #banner
27 | position: absolute
28 | top: 0
29 | left: 0
30 | width: 100%
31 | height: 100%
32 | background: url(banner-url) center #000
33 | background-size: cover
34 | z-index: -1
35 |
36 | #header-title
37 | text-align: center
38 | height: logo-size
39 | position: absolute
40 | top: 50%
41 | left: 0
42 | margin-top: logo-size * -0.5
43 |
44 | $logo-text
45 | text-decoration: none
46 | color: #fff
47 | font-weight: 300
48 | text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3)
49 |
50 | #logo
51 | @extend $logo-text
52 | font-size: logo-size
53 | line-height: logo-size
54 | letter-spacing: 2px
55 |
56 | #subtitle
57 | @extend $logo-text
58 | font-size: subtitle-size
59 | line-height: subtitle-size
60 | letter-spacing: 1px
61 |
62 | #subtitle-wrap
63 | margin-top: subtitle-size
64 |
65 | #main-nav
66 | float: left
67 | margin-left: -15px
68 |
69 | $nav-link
70 | float: left
71 | color: #fff
72 | opacity: 0.6
73 | text-decoration: none
74 | text-shadow: 0 1px rgba(0, 0, 0, 0.2)
75 | transition: opacity 0.2s
76 | display: block
77 | padding: 20px 15px
78 | &:hover
79 | opacity: 1
80 |
81 | .nav-icon
82 | @extend $nav-link
83 | font-family: font-icon
84 | text-align: center
85 | font-size: font-size
86 | width: font-size
87 | height: font-size
88 | padding: 20px 15px
89 | position: relative
90 | cursor: pointer
91 |
92 | .main-nav-link
93 | @extend $nav-link
94 | font-weight: 300
95 | letter-spacing: 1px
96 | @media mq-mobile
97 | display: none
98 |
99 | #main-nav-toggle
100 | display: none
101 | &:before
102 | content: "\f0c9"
103 | @media mq-mobile
104 | display: block
105 |
106 | #sub-nav
107 | float: right
108 | margin-right: -15px
109 |
110 | #nav-rss-link
111 | &:before
112 | content: "\f09e"
113 |
114 | #nav-search-btn
115 | &:before
116 | content: "\f002"
117 |
118 | #search-form-wrap
119 | position: absolute
120 | top: 15px
121 | width: 150px
122 | height: 30px
123 | right: -150px
124 | opacity: 0
125 | transition: 0.2s ease-out
126 | &.on
127 | opacity: 1
128 | right: 0
129 | @media mq-mobile
130 | width: 100%
131 | right: -100%
132 |
133 | .search-form
134 | position: absolute
135 | top: 0
136 | left: 0
137 | right: 0
138 | background: #fff
139 | padding: 5px 15px
140 | border-radius: 15px
141 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.3)
142 |
143 | .search-form-input
144 | border: none
145 | background: none
146 | color: color-default
147 | width: 100%
148 | font: 13px font-sans
149 | outline: none
150 | &::-webkit-search-results-decoration
151 | &::-webkit-search-cancel-button
152 | -webkit-appearance: none
153 |
154 | .search-form-submit
155 | position: absolute
156 | top: 50%
157 | right: 10px
158 | margin-top: -7px
159 | font: 13px font-icon
160 | border: none
161 | background: none
162 | color: #bbb
163 | cursor: pointer
164 | &:hover, &:focus
165 | color: #777
--------------------------------------------------------------------------------
/themes/landscape/source/css/_partial/highlight.styl:
--------------------------------------------------------------------------------
1 | // https://github.com/chriskempson/tomorrow-theme
2 | highlight-background = #2d2d2d
3 | highlight-current-line = #393939
4 | highlight-selection = #515151
5 | highlight-foreground = #cccccc
6 | highlight-comment = #999999
7 | highlight-red = #f2777a
8 | highlight-orange = #f99157
9 | highlight-yellow = #ffcc66
10 | highlight-green = #99cc99
11 | highlight-aqua = #66cccc
12 | highlight-blue = #6699cc
13 | highlight-purple = #cc99cc
14 |
15 | $code-block
16 | background: highlight-background
17 | margin: 0 article-padding * -1
18 | padding: 15px article-padding
19 | border-style: solid
20 | border-color: color-border
21 | border-width: 1px 0
22 | overflow: auto
23 | color: highlight-foreground
24 | line-height: font-size * line-height
25 |
26 | $line-numbers
27 | color: #666
28 | font-size: 0.85em
29 |
30 | .article-entry
31 | pre, code
32 | font-family: font-mono
33 | code
34 | background: color-background
35 | text-shadow: 0 1px #fff
36 | padding: 0 0.3em
37 | pre
38 | @extend $code-block
39 | code
40 | background: none
41 | text-shadow: none
42 | padding: 0
43 | .highlight
44 | @extend $code-block
45 | pre
46 | border: none
47 | margin: 0
48 | padding: 0
49 | table
50 | margin: 0
51 | width: auto
52 | td
53 | border: none
54 | padding: 0
55 | figcaption
56 | clearfix()
57 | font-size: 0.85em
58 | color: highlight-comment
59 | line-height: 1em
60 | margin-bottom: 1em
61 | a
62 | float: right
63 | .gutter pre
64 | @extend $line-numbers
65 | text-align: right
66 | padding-right: 20px
67 | .line
68 | height: font-size * line-height
69 | .line.marked
70 | background: highlight-selection
71 | .gist
72 | margin: 0 article-padding * -1
73 | border-style: solid
74 | border-color: color-border
75 | border-width: 1px 0
76 | background: highlight-background
77 | padding: 15px article-padding 15px 0
78 | .gist-file
79 | border: none
80 | font-family: font-mono
81 | margin: 0
82 | .gist-data
83 | background: none
84 | border: none
85 | .line-numbers
86 | @extend $line-numbers
87 | background: none
88 | border: none
89 | padding: 0 20px 0 0
90 | .line-data
91 | padding: 0 !important
92 | .highlight
93 | margin: 0
94 | padding: 0
95 | border: none
96 | .gist-meta
97 | background: highlight-background
98 | color: highlight-comment
99 | font: 0.85em font-sans
100 | text-shadow: 0 0
101 | padding: 0
102 | margin-top: 1em
103 | margin-left: article-padding
104 | a
105 | color: color-link
106 | font-weight: normal
107 | &:hover
108 | text-decoration: underline
109 |
110 | pre
111 | .comment
112 | .title
113 | color: highlight-comment
114 | .variable
115 | .attribute
116 | .tag
117 | .regexp
118 | .ruby .constant
119 | .xml .tag .title
120 | .xml .pi
121 | .xml .doctype
122 | .html .doctype
123 | .css .id
124 | .css .class
125 | .css .pseudo
126 | color: highlight-red
127 | .number
128 | .preprocessor
129 | .built_in
130 | .literal
131 | .params
132 | .constant
133 | color: highlight-orange
134 | .class
135 | .ruby .class .title
136 | .css .rules .attribute
137 | color: highlight-green
138 | .string
139 | .value
140 | .inheritance
141 | .header
142 | .ruby .symbol
143 | .xml .cdata
144 | color: highlight-green
145 | .css .hexcolor
146 | color: highlight-aqua
147 | .function
148 | .python .decorator
149 | .python .title
150 | .ruby .function .title
151 | .ruby .title .keyword
152 | .perl .sub
153 | .javascript .title
154 | .coffeescript .title
155 | color: highlight-blue
156 | .keyword
157 | .javascript .function
158 | color: highlight-purple
159 |
--------------------------------------------------------------------------------
/themes/landscape/source/css/_partial/mobile.styl:
--------------------------------------------------------------------------------
1 | @media mq-mobile
2 | #mobile-nav
3 | position: absolute
4 | top: 0
5 | left: 0
6 | width: mobile-nav-width
7 | height: 100%
8 | background: color-mobile-nav-background
9 | border-right: 1px solid #fff
10 |
11 | @media mq-mobile
12 | .mobile-nav-link
13 | display: block
14 | color: color-grey
15 | text-decoration: none
16 | padding: 15px 20px
17 | font-weight: bold
18 | &:hover
19 | color: #fff
20 |
--------------------------------------------------------------------------------
/themes/landscape/source/css/_partial/sidebar-aside.styl:
--------------------------------------------------------------------------------
1 | #sidebar
2 | @media mq-normal
3 | column(sidebar-column)
4 |
5 | .widget-wrap
6 | margin: block-margin 0
7 |
8 | .widget-title
9 | @extend $block-caption
10 |
11 | .widget
12 | color: color-sidebar-text
13 | text-shadow: 0 1px #fff
14 | background: color-widget-background
15 | box-shadow: 0 -1px 4px color-widget-border inset
16 | border: 1px solid color-widget-border
17 | padding: 15px
18 | border-radius: 3px
19 | a
20 | color: color-link
21 | text-decoration: none
22 | &:hover
23 | text-decoration: underline
24 | ul, ol, dl
25 | ul, ol, dl
26 | margin-left: 15px
27 | list-style: disc
--------------------------------------------------------------------------------
/themes/landscape/source/css/_partial/sidebar-bottom.styl:
--------------------------------------------------------------------------------
1 | .widget-wrap
2 | margin-bottom: block-margin !important
3 | @media mq-normal
4 | column(main-column)
5 |
6 | .widget-title
7 | color: #ccc
8 | text-transform: uppercase
9 | letter-spacing: 2px
10 | margin-bottom: .5em
11 | line-height: 1em
12 | font-weight: bold
13 |
14 | .widget
15 | color: color-grey
16 | ul, ol
17 | li
18 | display: inline-block
19 | zoom:1
20 | *display:inline
21 | padding-right: .75em
22 | /* Having problems getting balanced white space between items
23 | li:before
24 | content: " | "
25 | li:first-child:before
26 | content: none
27 | */
28 |
--------------------------------------------------------------------------------
/themes/landscape/source/css/_partial/sidebar.styl:
--------------------------------------------------------------------------------
1 | if sidebar is bottom
2 | @import "sidebar-bottom"
3 | else
4 | @import "sidebar-aside"
5 |
6 | .widget
7 | @extend $base-style
8 | line-height: line-height
9 | word-wrap: break-word
10 | font-size: 0.9em
11 | ul, ol
12 | list-style: none
13 | margin: 0
14 | ul, ol
15 | margin: 0 20px
16 | ul
17 | list-style: disc
18 | ol
19 | list-style: decimal
20 |
21 | .category-list-count
22 | .tag-list-count
23 | .archive-list-count
24 | padding-left: 5px
25 | color: color-grey
26 | font-size: 0.85em
27 | &:before
28 | content: "("
29 | &:after
30 | content: ")"
31 |
32 | .tagcloud
33 | a
34 | margin-right: 5px
35 | display: inline-block
36 |
--------------------------------------------------------------------------------
/themes/landscape/source/css/_util/grid.styl:
--------------------------------------------------------------------------------
1 | /////////////////
2 | // Semantic.gs // for Stylus: http://learnboost.github.com/stylus/
3 | /////////////////
4 |
5 | // Utility function — you should never need to modify this
6 | // _gridsystem-width = (column-width + gutter-width) * columns
7 | gridsystem-width(_columns = columns)
8 | (column-width + gutter-width) * _columns
9 |
10 | // Set @total-width to 100% for a fluid layout
11 | // total-width = gridsystem-width(columns)
12 | total-width = 100%
13 |
14 | //////////
15 | // GRID //
16 | //////////
17 |
18 | body
19 | clearfix()
20 | width: 100%
21 |
22 | row(_columns = columns)
23 | clearfix()
24 | display: block
25 | width: total-width * ((gutter-width + gridsystem-width(_columns)) / gridsystem-width(_columns))
26 | margin: 0 total-width * (((gutter-width * .5) / gridsystem-width(_columns)) * -1)
27 |
28 | column(x, _columns = columns)
29 | display: inline
30 | float: left
31 | width: total-width * ((((gutter-width + column-width) * x) - gutter-width) / gridsystem-width(_columns))
32 | margin: 0 total-width * ((gutter-width * .5) / gridsystem-width(_columns))
33 |
34 | push(offset = 1)
35 | margin-left: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns))
36 |
37 | pull(offset = 1)
38 | margin-right: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns))
--------------------------------------------------------------------------------
/themes/landscape/source/css/_util/mixin.styl:
--------------------------------------------------------------------------------
1 | // http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/
2 | hide-text()
3 | text-indent: 100%
4 | white-space: nowrap
5 | overflow: hidden
6 |
7 | // http://codepen.io/shshaw/full/gEiDt
8 | absolute-center(width, height = width)
9 | // margin: auto
10 | // position: absolute
11 | // top: 50%
12 | // top: 0
13 | // left: 0
14 | // bottom: 0
15 | // right: 0
16 | // width: width
17 | // height: height
18 | // overflow: auto
19 | width: width
20 | height: height
21 | position: absolute
22 | top: 50%
23 | left: 50%
24 | margin-top: width * -0.5
25 | margin-left: height * -0.5
26 |
27 | avoid-column-break()
28 | vendor("column-break-inside", avoid, only: webkit)
29 | page-break-inside: avoid // for firefox
30 | overflow: hidden // fix for firefox
31 | break-inside: avoid-column
32 |
--------------------------------------------------------------------------------
/themes/landscape/source/css/_variables.styl:
--------------------------------------------------------------------------------
1 | // Config
2 | support-for-ie = false
3 | vendor-prefixes = webkit moz ms official
4 |
5 | // Colors
6 | color-default = #555
7 | color-grey = #999
8 | color-border = #ddd
9 | color-link = #258fb8
10 | color-background = #eee
11 | color-sidebar-text = #777
12 | color-widget-background = #ddd
13 | color-widget-border = #ccc
14 | color-footer-background = #262a30
15 | color-mobile-nav-background = #191919
16 | color-twitter = #00aced
17 | color-facebook = #3b5998
18 | color-pinterest = #cb2027
19 | color-google = #dd4b39
20 |
21 | // Fonts
22 | font-sans = -apple-system, BlinkMacSystemFont,
23 | "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
24 | "Fira Sans", "Droid Sans", "Helvetica Neue",
25 | sans-serif
26 | font-serif = Georgia, "Times New Roman", serif
27 | font-mono = "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace
28 | font-icon = FontAwesome
29 | font-icon-path = "fonts/fontawesome-webfont"
30 | font-icon-version = "4.0.3"
31 | font-size = 14px
32 | line-height = 1.6em
33 | line-height-title = 1.1em
34 |
35 | // Header
36 | logo-size = 40px
37 | subtitle-size = 16px
38 | banner-height = 300px
39 | banner-url = "images/banner.jpg"
40 |
41 | sidebar = hexo-config("sidebar")
42 |
43 | // Layout
44 | block-margin = 50px
45 | article-padding = 20px
46 | mobile-nav-width = 280px
47 | main-column = 9
48 | sidebar-column = 3
49 |
50 | if sidebar and sidebar isnt bottom
51 | _sidebar-column = sidebar-column
52 | else
53 | _sidebar-column = 0
54 |
55 | // Grids
56 | column-width = 80px
57 | gutter-width = 20px
58 | columns = main-column + _sidebar-column
59 |
60 | // Media queries
61 | mq-mobile = "screen and (max-width: 479px)"
62 | mq-tablet = "screen and (min-width: 480px) and (max-width: 767px)"
63 | mq-normal = "screen and (min-width: 768px)"
--------------------------------------------------------------------------------
/themes/landscape/source/css/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/css/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/themes/landscape/source/css/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/css/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/themes/landscape/source/css/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/css/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/themes/landscape/source/css/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/css/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/themes/landscape/source/css/images/banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/css/images/banner.jpg
--------------------------------------------------------------------------------
/themes/landscape/source/css/style.styl:
--------------------------------------------------------------------------------
1 | @import "nib"
2 | @import "_variables"
3 | @import "_util/mixin"
4 | @import "_util/grid"
5 |
6 | global-reset()
7 |
8 | input, button
9 | margin: 0
10 | padding: 0
11 | &::-moz-focus-inner
12 | border: 0
13 | padding: 0
14 |
15 | @font-face
16 | font-family: FontAwesome
17 | font-style: normal
18 | font-weight: normal
19 | src: url(font-icon-path + ".eot?v=#" + font-icon-version)
20 | src: url(font-icon-path + ".eot?#iefix&v=#" + font-icon-version) format("embedded-opentype"),
21 | url(font-icon-path + ".woff?v=#" + font-icon-version) format("woff"),
22 | url(font-icon-path + ".ttf?v=#" + font-icon-version) format("truetype"),
23 | url(font-icon-path + ".svg#fontawesomeregular?v=#" + font-icon-version) format("svg")
24 |
25 | html, body, #container
26 | height: 100%
27 |
28 | body
29 | background: color-background
30 | font: font-size font-sans
31 | -webkit-text-size-adjust: 100%
32 |
33 | .outer
34 | clearfix()
35 | max-width: (column-width + gutter-width) * columns + gutter-width
36 | margin: 0 auto
37 | padding: 0 gutter-width
38 |
39 | .inner
40 | column(columns)
41 |
42 | .left, .alignleft
43 | float: left
44 |
45 | .right, .alignright
46 | float: right
47 |
48 | .clear
49 | clear: both
50 |
51 | #container
52 | position: relative
53 |
54 | .mobile-nav-on
55 | overflow: hidden
56 |
57 | #wrap
58 | height: 100%
59 | width: 100%
60 | position: absolute
61 | top: 0
62 | left: 0
63 | transition: 0.2s ease-out
64 | z-index: 1
65 | background: color-background
66 | .mobile-nav-on &
67 | left: mobile-nav-width
68 |
69 | if sidebar and sidebar isnt bottom
70 | #main
71 | @media mq-normal
72 | column(main-column)
73 |
74 | if sidebar is left
75 | @media mq-normal
76 | #main
77 | float: right
78 |
79 | @import "_extend"
80 | @import "_partial/header"
81 | @import "_partial/article"
82 | @import "_partial/comment"
83 | @import "_partial/archive"
84 | @import "_partial/footer"
85 | @import "_partial/highlight"
86 | @import "_partial/mobile"
87 |
88 | if sidebar
89 | @import "_partial/sidebar"
--------------------------------------------------------------------------------
/themes/landscape/source/fancybox/blank.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/fancybox/blank.gif
--------------------------------------------------------------------------------
/themes/landscape/source/fancybox/fancybox_loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/fancybox/fancybox_loading.gif
--------------------------------------------------------------------------------
/themes/landscape/source/fancybox/fancybox_loading@2x.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/fancybox/fancybox_loading@2x.gif
--------------------------------------------------------------------------------
/themes/landscape/source/fancybox/fancybox_overlay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/fancybox/fancybox_overlay.png
--------------------------------------------------------------------------------
/themes/landscape/source/fancybox/fancybox_sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/fancybox/fancybox_sprite.png
--------------------------------------------------------------------------------
/themes/landscape/source/fancybox/fancybox_sprite@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/fancybox/fancybox_sprite@2x.png
--------------------------------------------------------------------------------
/themes/landscape/source/fancybox/helpers/fancybox_buttons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wecteam/blog/c8f73cf6e3b5decd8f811144bcc6ffe3d7728b8d/themes/landscape/source/fancybox/helpers/fancybox_buttons.png
--------------------------------------------------------------------------------
/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.css:
--------------------------------------------------------------------------------
1 | #fancybox-buttons {
2 | position: fixed;
3 | left: 0;
4 | width: 100%;
5 | z-index: 8050;
6 | }
7 |
8 | #fancybox-buttons.top {
9 | top: 10px;
10 | }
11 |
12 | #fancybox-buttons.bottom {
13 | bottom: 10px;
14 | }
15 |
16 | #fancybox-buttons ul {
17 | display: block;
18 | width: 166px;
19 | height: 30px;
20 | margin: 0 auto;
21 | padding: 0;
22 | list-style: none;
23 | border: 1px solid #111;
24 | border-radius: 3px;
25 | -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
26 | -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
27 | box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
28 | background: rgb(50,50,50);
29 | background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%);
30 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51)));
31 | background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
32 | background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
33 | background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
34 | background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
35 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 );
36 | }
37 |
38 | #fancybox-buttons ul li {
39 | float: left;
40 | margin: 0;
41 | padding: 0;
42 | }
43 |
44 | #fancybox-buttons a {
45 | display: block;
46 | width: 30px;
47 | height: 30px;
48 | text-indent: -9999px;
49 | background-color: transparent;
50 | background-image: url('fancybox_buttons.png');
51 | background-repeat: no-repeat;
52 | outline: none;
53 | opacity: 0.8;
54 | }
55 |
56 | #fancybox-buttons a:hover {
57 | opacity: 1;
58 | }
59 |
60 | #fancybox-buttons a.btnPrev {
61 | background-position: 5px 0;
62 | }
63 |
64 | #fancybox-buttons a.btnNext {
65 | background-position: -33px 0;
66 | border-right: 1px solid #3e3e3e;
67 | }
68 |
69 | #fancybox-buttons a.btnPlay {
70 | background-position: 0 -30px;
71 | }
72 |
73 | #fancybox-buttons a.btnPlayOn {
74 | background-position: -30px -30px;
75 | }
76 |
77 | #fancybox-buttons a.btnToggle {
78 | background-position: 3px -60px;
79 | border-left: 1px solid #111;
80 | border-right: 1px solid #3e3e3e;
81 | width: 35px
82 | }
83 |
84 | #fancybox-buttons a.btnToggleOn {
85 | background-position: -27px -60px;
86 | }
87 |
88 | #fancybox-buttons a.btnClose {
89 | border-left: 1px solid #111;
90 | width: 35px;
91 | background-position: -56px 0px;
92 | }
93 |
94 | #fancybox-buttons a.btnDisabled {
95 | opacity : 0.4;
96 | cursor: default;
97 | }
--------------------------------------------------------------------------------
/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Buttons helper for fancyBox
3 | * version: 1.0.5 (Mon, 15 Oct 2012)
4 | * @requires fancyBox v2.0 or later
5 | *
6 | * Usage:
7 | * $(".fancybox").fancybox({
8 | * helpers : {
9 | * buttons: {
10 | * position : 'top'
11 | * }
12 | * }
13 | * });
14 | *
15 | */
16 | ;(function ($) {
17 | //Shortcut for fancyBox object
18 | var F = $.fancybox;
19 |
20 | //Add helper object
21 | F.helpers.buttons = {
22 | defaults : {
23 | skipSingle : false, // disables if gallery contains single image
24 | position : 'top', // 'top' or 'bottom'
25 | tpl : '
'
26 | },
27 |
28 | list : null,
29 | buttons: null,
30 |
31 | beforeLoad: function (opts, obj) {
32 | //Remove self if gallery do not have at least two items
33 |
34 | if (opts.skipSingle && obj.group.length < 2) {
35 | obj.helpers.buttons = false;
36 | obj.closeBtn = true;
37 |
38 | return;
39 | }
40 |
41 | //Increase top margin to give space for buttons
42 | obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
43 | },
44 |
45 | onPlayStart: function () {
46 | if (this.buttons) {
47 | this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
48 | }
49 | },
50 |
51 | onPlayEnd: function () {
52 | if (this.buttons) {
53 | this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
54 | }
55 | },
56 |
57 | afterShow: function (opts, obj) {
58 | var buttons = this.buttons;
59 |
60 | if (!buttons) {
61 | this.list = $(opts.tpl).addClass(opts.position).appendTo('body');
62 |
63 | buttons = {
64 | prev : this.list.find('.btnPrev').click( F.prev ),
65 | next : this.list.find('.btnNext').click( F.next ),
66 | play : this.list.find('.btnPlay').click( F.play ),
67 | toggle : this.list.find('.btnToggle').click( F.toggle ),
68 | close : this.list.find('.btnClose').click( F.close )
69 | }
70 | }
71 |
72 | //Prev
73 | if (obj.index > 0 || obj.loop) {
74 | buttons.prev.removeClass('btnDisabled');
75 | } else {
76 | buttons.prev.addClass('btnDisabled');
77 | }
78 |
79 | //Next / Play
80 | if (obj.loop || obj.index < obj.group.length - 1) {
81 | buttons.next.removeClass('btnDisabled');
82 | buttons.play.removeClass('btnDisabled');
83 |
84 | } else {
85 | buttons.next.addClass('btnDisabled');
86 | buttons.play.addClass('btnDisabled');
87 | }
88 |
89 | this.buttons = buttons;
90 |
91 | this.onUpdate(opts, obj);
92 | },
93 |
94 | onUpdate: function (opts, obj) {
95 | var toggle;
96 |
97 | if (!this.buttons) {
98 | return;
99 | }
100 |
101 | toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
102 |
103 | //Size toggle button
104 | if (obj.canShrink) {
105 | toggle.addClass('btnToggleOn');
106 |
107 | } else if (!obj.canExpand) {
108 | toggle.addClass('btnDisabled');
109 | }
110 | },
111 |
112 | beforeClose: function () {
113 | if (this.list) {
114 | this.list.remove();
115 | }
116 |
117 | this.list = null;
118 | this.buttons = null;
119 | }
120 | };
121 |
122 | }(jQuery));
123 |
--------------------------------------------------------------------------------
/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.css:
--------------------------------------------------------------------------------
1 | #fancybox-thumbs {
2 | position: fixed;
3 | left: 0;
4 | width: 100%;
5 | overflow: hidden;
6 | z-index: 8050;
7 | }
8 |
9 | #fancybox-thumbs.bottom {
10 | bottom: 2px;
11 | }
12 |
13 | #fancybox-thumbs.top {
14 | top: 2px;
15 | }
16 |
17 | #fancybox-thumbs ul {
18 | position: relative;
19 | list-style: none;
20 | margin: 0;
21 | padding: 0;
22 | }
23 |
24 | #fancybox-thumbs ul li {
25 | float: left;
26 | padding: 1px;
27 | opacity: 0.5;
28 | }
29 |
30 | #fancybox-thumbs ul li.active {
31 | opacity: 0.75;
32 | padding: 0;
33 | border: 1px solid #fff;
34 | }
35 |
36 | #fancybox-thumbs ul li:hover {
37 | opacity: 1;
38 | }
39 |
40 | #fancybox-thumbs ul li a {
41 | display: block;
42 | position: relative;
43 | overflow: hidden;
44 | border: 1px solid #222;
45 | background: #111;
46 | outline: none;
47 | }
48 |
49 | #fancybox-thumbs ul li img {
50 | display: block;
51 | position: relative;
52 | border: 0;
53 | padding: 0;
54 | max-width: none;
55 | }
--------------------------------------------------------------------------------
/themes/landscape/source/js/script.js:
--------------------------------------------------------------------------------
1 | (function($){
2 | // Search
3 | var $searchWrap = $('#search-form-wrap'),
4 | isSearchAnim = false,
5 | searchAnimDuration = 200;
6 |
7 | var startSearchAnim = function(){
8 | isSearchAnim = true;
9 | };
10 |
11 | var stopSearchAnim = function(callback){
12 | setTimeout(function(){
13 | isSearchAnim = false;
14 | callback && callback();
15 | }, searchAnimDuration);
16 | };
17 |
18 | $('#nav-search-btn').on('click', function(){
19 | if (isSearchAnim) return;
20 |
21 | startSearchAnim();
22 | $searchWrap.addClass('on');
23 | stopSearchAnim(function(){
24 | $('.search-form-input').focus();
25 | });
26 | });
27 |
28 | $('.search-form-input').on('blur', function(){
29 | startSearchAnim();
30 | $searchWrap.removeClass('on');
31 | stopSearchAnim();
32 | });
33 |
34 | // Share
35 | $('body').on('click', function(){
36 | $('.article-share-box.on').removeClass('on');
37 | }).on('click', '.article-share-link', function(e){
38 | e.stopPropagation();
39 |
40 | var $this = $(this),
41 | url = $this.attr('data-url'),
42 | encodedUrl = encodeURIComponent(url),
43 | id = 'article-share-box-' + $this.attr('data-id'),
44 | offset = $this.offset();
45 |
46 | if ($('#' + id).length){
47 | var box = $('#' + id);
48 |
49 | if (box.hasClass('on')){
50 | box.removeClass('on');
51 | return;
52 | }
53 | } else {
54 | var html = [
55 | '
',
56 | '
',
57 | '
',
58 | '
',
59 | '
',
60 | '
',
61 | '
',
62 | '
',
63 | '
'
64 | ].join('');
65 |
66 | var box = $(html);
67 |
68 | $('body').append(box);
69 | }
70 |
71 | $('.article-share-box.on').hide();
72 |
73 | box.css({
74 | top: offset.top + 25,
75 | left: offset.left
76 | }).addClass('on');
77 | }).on('click', '.article-share-box', function(e){
78 | e.stopPropagation();
79 | }).on('click', '.article-share-box-input', function(){
80 | $(this).select();
81 | }).on('click', '.article-share-box-link', function(e){
82 | e.preventDefault();
83 | e.stopPropagation();
84 |
85 | window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
86 | });
87 |
88 | // Caption
89 | $('.article-entry').each(function(i){
90 | $(this).find('img').each(function(){
91 | if ($(this).parent().hasClass('fancybox')) return;
92 |
93 | var alt = this.alt;
94 |
95 | if (alt) $(this).after('
' + alt + '');
96 |
97 | $(this).wrap('
');
98 | });
99 |
100 | $(this).find('.fancybox').each(function(){
101 | $(this).attr('rel', 'article' + i);
102 | });
103 | });
104 |
105 | if ($.fancybox){
106 | $('.fancybox').fancybox();
107 | }
108 |
109 | // Mobile nav
110 | var $container = $('#container'),
111 | isMobileNavAnim = false,
112 | mobileNavAnimDuration = 200;
113 |
114 | var startMobileNavAnim = function(){
115 | isMobileNavAnim = true;
116 | };
117 |
118 | var stopMobileNavAnim = function(){
119 | setTimeout(function(){
120 | isMobileNavAnim = false;
121 | }, mobileNavAnimDuration);
122 | }
123 |
124 | $('#main-nav-toggle').on('click', function(){
125 | if (isMobileNavAnim) return;
126 |
127 | startMobileNavAnim();
128 | $container.toggleClass('mobile-nav-on');
129 | stopMobileNavAnim();
130 | });
131 |
132 | $('#wrap').on('click', function(){
133 | if (isMobileNavAnim || !$container.hasClass('mobile-nav-on')) return;
134 |
135 | $container.removeClass('mobile-nav-on');
136 | });
137 | })(jQuery);
--------------------------------------------------------------------------------
shortname
for Disqus. Please set it in_config.yml
. 19 |