forked from kitian616/jekyll-TeXt-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: page layout configs & layout/all -> layout/archive & layout/hom…
…e -> layout/post-list & layout/error-404 -> layout/404
- Loading branch information
Showing
82 changed files
with
713 additions
and
785 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
layout: error-404 | ||
layout: 404 | ||
title: 404 | ||
show_title: false | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div class="toc-aside js-toc-root"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
{%- if page.layout == "home" -%} | ||
{%- if jekyll.environment != "development" -%} | ||
{%- assign __source = page.pageview -%} | ||
{%- assign __target = site.data.variables.default.pageview -%} | ||
{%- include snippets/assign.html -%} | ||
{%- assign _pageview = __return -%} | ||
|
||
|
||
{%- include pageview-providers/leancloud/home.html -%} | ||
{%- if page.layout == "post-list" -%} | ||
|
||
{%- if jekyll.environment != "development" -%} | ||
{%- include pageview-providers/leancloud/post-list.html -%} | ||
{%- endif -%} | ||
{%- elsif page.layout == "post" -%} | ||
{%- if jekyll.environment != "development" and | ||
jekyll.environment != "beta" -%} | ||
|
||
{%- include pageview-providers/leancloud/post.html -%} | ||
|
||
{%- elsif page.layout == "article" -%} | ||
{%- if _pageview -%} | ||
|
||
{%- if jekyll.environment != "development" and | ||
jekyll.environment != "beta" -%} | ||
{%- include pageview-providers/leancloud/post.html -%} | ||
{%- endif -%} | ||
|
||
{%- endif -%} | ||
{%- endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
(function() { | ||
var SOURCES = window.TEXT_VARIABLES.sources; | ||
window.Lazyload.js(SOURCES.jquery, function() { | ||
$(function() { | ||
var $this ,$scroll; | ||
var $articleContent = $('.js-article-content'); | ||
var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar'); | ||
var scroll = hasSidebar ? '.js-page-main' : 'html, body'; | ||
$scroll = $(scroll); | ||
|
||
$articleContent.children('.highlight').each(function() { | ||
$this = $(this); | ||
$this.attr('data-lang', $this.find('code').attr('data-lang')); | ||
}); | ||
$articleContent.children('h1, h2, h3, h4, h5, h6').each(function() { | ||
$this = $(this); | ||
$this.append($('<a class="anchor" aria-hidden="true"></a>').html('<i class="fas fa-anchor"></i>')); | ||
}); | ||
$articleContent.on('click', '.anchor', function() { | ||
$scroll.scrollToAnchor('#' + $(this).parent().attr('id'), 400); | ||
}); | ||
}); | ||
}); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(function() { | ||
var SOURCES = window.TEXT_VARIABLES.sources; | ||
window.Lazyload.js(SOURCES.jquery, function() { | ||
var $window = $(window), $pageFooter = $('.js-page-footer'); | ||
var $pageAside = $('.js-page-aside'); | ||
var affix; | ||
var tocDisabled = false; | ||
var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar'); | ||
|
||
setTimeout(function() { | ||
affix = $pageAside.affix({ | ||
offsetBottom: $pageFooter.outerHeight(), | ||
scrollTarget: hasSidebar ? '.js-page-main' : null, | ||
scroller: hasSidebar ? '.js-page-main' : null, | ||
scroll: hasSidebar ? $('.js-page-main').children() : null, | ||
disabled: tocDisabled | ||
}); | ||
}, 1000); | ||
|
||
$window.on('resize', window.throttle(function() { | ||
affix && affix.setOptions({ | ||
disabled: tocDisabled | ||
}); | ||
}, 100)); | ||
}); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.