Skip to content

Commit

Permalink
支持任意主题
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby committed Sep 22, 2018
1 parent 10cca35 commit c427bc3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
28 changes: 14 additions & 14 deletions _includes/footer.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@
</div>
</footer>
<!-- jQuery -->
<script src="/hux/source/js/jquery.min.js"></script>
<script src="/${themeName}/source/js/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="/hux/source/js/bootstrap.min.js"></script>
<script src="/${themeName}/source/js/bootstrap.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="/hux/source/js/hux-blog.min.js"></script>
<script src="/${themeName}/source/js/hux-blog.min.js"></script>
<!-- Service Worker -->
<script src="/hux/source/js/snackbar.js"></script>
<script src="/hux/source/js/sw-registration.js"></script>
<script src="/${themeName}/source/js/snackbar.js"></script>
<script src="/${themeName}/source/js/sw-registration.js"></script>
<!-- async load function -->
<script>
function async(u, c) {
Expand All @@ -100,14 +100,14 @@
s.parentNode.insertBefore(o, s);
}
</script>
<!--
Because of the native support for backtick-style fenced code blocks
right within the Markdown is landed in Github Pages,
From V1.6, There is no need for Highlight.js,
<!--
Because of the native support for backtick-style fenced code blocks
right within the Markdown is landed in Github Pages,
From V1.6, There is no need for Highlight.js,
so Huxblog drops it officially.
- https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
- https://help.github.com/articles/creating-and-highlighting-code-blocks/
- https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
- https://help.github.com/articles/creating-and-highlighting-code-blocks/
-->
<!--
<script>
Expand All @@ -121,7 +121,7 @@
<script>
// only load tagcloud.js in tag.html
if ($('#tag_cloud').length !== 0) {
async("/hux/source/js/jquery.tagcloud.js", function () {
async("/${themeName}/source/js/jquery.tagcloud.js", function () {
$.fn.tagcloud.defaults = {
//size: {start: 1, end: 1, unit: 'em'},
color: {start: '#bbbbee', end: '#0085a1'},
Expand Down Expand Up @@ -180,7 +180,7 @@ ${options.statistics_code?if_exists}
* Doc: https://github.com/davist11/jQuery-One-Page-Nav
* Fork by Hux to support padding
*/
async("/hux/source/js/jquery.nav.js", function () {
async("/${themeName}/source/js/jquery.nav.js", function () {
$('.catalog-body').onePageNav({
currentClass: "active",
changeHash: !1,
Expand All @@ -196,4 +196,4 @@ ${options.statistics_code?if_exists}
});
});
</script>
</#if>
</#if>
8 changes: 4 additions & 4 deletions _includes/head.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<title>${title}</title>

<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="/hux/source/css/bootstrap.min.css">
<link rel="stylesheet" href="/${themeName}/source/css/bootstrap.min.css">

<!-- Custom CSS -->
<link rel="stylesheet" href="/hux/source/css/hux-blog.min.css">
<link rel="stylesheet" href="/${themeName}/source/css/hux-blog.min.css">

<!-- Pygments Github CSS -->
<link rel="stylesheet" href="/hux/source/css/syntax.css">
<link rel="stylesheet" href="/${themeName}/source/css/syntax.css">

<!-- Custom Fonts -->
<!-- <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
Expand All @@ -42,4 +42,4 @@
<!-- ga & ba script hoook -->
<script></script>
</head>
</#macro>
</#macro>
4 changes: 2 additions & 2 deletions index.ftl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<#include "module/page.ftl">
<@page title="${options.blog_title}" keywords="${options.seo_keywords?if_exists}" description="${options.seo_desc?if_exists}" slogn="${options.hux_general_index_slogn?if_exists}" cover="${options.hux_general_index_cover?default('/hux/source/img/home-bg.jpg')}">
<@page title="${options.blog_title}" keywords="${options.seo_keywords?if_exists}" description="${options.seo_desc?if_exists}" slogn="${options.hux_general_index_slogn?if_exists}" cover="${options.hux_general_index_cover?default('/${themeName}/source/img/home-bg.jpg')}">
<#list posts.content as post>
<div class="post-preview">
<a href="/archives/${post.postUrl}">
Expand Down Expand Up @@ -39,4 +39,4 @@
</#if>
</ul>
</#if>
</@page>
</@page>
2 changes: 1 addition & 1 deletion module/default.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<#include "../_includes/footer.ftl">

<!-- Image to hack wechat -->
<img src="/hux/source/img/icon_wechat.png" width="0" height="0"/>
<img src="/${themeName}/source/img/icon_wechat.png" width="0" height="0"/>
<!-- Migrate from head to bottom, no longer block render and still work -->

</body>
Expand Down
2 changes: 1 addition & 1 deletion tags.ftl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<#include "module/default.ftl">
<@default title="标签 - ${options.blog_title}" keywords="${options.seo_keywords?if_exists}" description="${options.seo_desc?if_exists}">
<!-- Page Header -->
<header class="intro-header" style="background-image: url('${options.hux_general_tags_cover?default("/hux/source/img/tag-bg.jpg")}"')">
<header class="intro-header" style="background-image: url('${options.hux_general_tags_cover?default("/${themeName}/source/img/tag-bg.jpg")}"')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
Expand Down

0 comments on commit c427bc3

Please sign in to comment.