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.
- Loading branch information
Showing
12 changed files
with
266 additions
and
30 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
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,13 @@ | ||
(function() { | ||
var SOURCES = window.TEXT_VARIABLES.sources; | ||
window.Lazyload.js(SOURCES.jquery, function() { | ||
function scrollToAnchor(anchor, duration, callback) { | ||
var $root = this; | ||
$root.animate({ scrollTop: $(anchor).position().top }, duration, function() { | ||
window.history.replaceState(null, '', window.location.href.split('#')[0] + anchor); | ||
callback && callback(); | ||
}); | ||
} | ||
$.fn.scrollToAnchor = scrollToAnchor; | ||
}); | ||
})(); |
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,86 @@ | ||
<!DOCTYPE html> | ||
{%- include snippets/get-lang.html -%} | ||
<html lang="{{ __return }}"> | ||
<head> | ||
{%- include head.html -%} | ||
<script> | ||
{%- include scripts/utils.js -%} | ||
{%- include scripts/lib/throttle.js -%} | ||
{%- include scripts/lib/lazyload.js -%} | ||
{%- include scripts/common.js -%} | ||
</script> | ||
{%- include scripts/variables.html -%} | ||
</head> | ||
<body> | ||
{%- if page.sidebar -%} | ||
<div class="layout--page layout--page--sidebar clearfix js-page-root"> | ||
<div class="page__actions"> | ||
<div class="button button--secondary button--circle box-shadow-2 js-sidebar-button"> | ||
<i class="fas fa-bars icon--show"></i> | ||
<i class="fas fa-times icon--hide"></i> | ||
</div> | ||
</div> | ||
<div class="page__sidebar">{%- include sidebar.html -%}</div> | ||
<script> | ||
(function() { | ||
var SOURCES = window.TEXT_VARIABLES.sources; | ||
var TOC_SELECTOR = window.TEXT_VARIABLES.site.toc.selectors; | ||
window.Lazyload.js(SOURCES.jquery, function() { | ||
var $pageRoot = $('.js-page-root'); | ||
var $sidebarButton = $('.js-sidebar-button'); | ||
$sidebarButton.on('click', function() { | ||
$pageRoot.toggleClass('show-sidebar'); | ||
}); | ||
}); | ||
})(); | ||
</script> | ||
|
||
{%- else -%} | ||
<div class="layout--page clearfix js-layout-base-2-col"> | ||
{%- endif -%} | ||
<div class="page__main js-page-main"> | ||
<div class="page__main-inner"> | ||
<div class="page__header">{%- include header.html -%}</div> | ||
|
||
<div class="page__content"> | ||
<div class ="main"> | ||
<div class="col-2 js-col-2"> | ||
<aside class="js-article-aside"><div class="js-toc-root"></div></aside> | ||
</div> | ||
|
||
<div class="col-1"> | ||
<article> | ||
|
||
{%- include snippets/page-title.html -%} | ||
<div class="main__header"><h1>{{ __return }}</h1></div> | ||
|
||
<div class="article-content js-article-content" itemprop="articleBody">{{ content }}</div> | ||
|
||
{%- if jekyll.environment != "development" and page.comment != false -%} | ||
<section>{%- include comment.html -%}</section> | ||
{%- endif -%} | ||
|
||
</article> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="page__footer">{%- include footer.html -%}</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
<script> | ||
{%- include scripts/lib/scroll.js -%} | ||
{%- include scripts/page-post-common.js -%} | ||
{%- include scripts/page.js -%} | ||
{%- include scripts/lib/affix.js -%} | ||
{%- include scripts/lib/toc.js -%} | ||
{%- include scripts/post.js -%} | ||
</script> | ||
|
||
|
||
{%- include markdown-enhancements.html -%} | ||
{%- include pageview.html -%} | ||
{%- include analytics.html -%} | ||
</body> | ||
</html> |
Oops, something went wrong.