forked from Huxpro/huxpro.github.io
-
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.
[v1.8] thanks to Huxpro#74, extract duplicated partials
- Loading branch information
Showing
18 changed files
with
322 additions
and
413 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,26 @@ | ||
{% comment %} | ||
@param {boolean} bottom - bottom will render <hr> | ||
{% endcomment %} | ||
|
||
{% if site.featured-tags %} | ||
<section> | ||
{% if include.bottom %} | ||
<hr class="hidden-sm hidden-xs"> | ||
{% endif %} | ||
<h5><a href="{{'/tags/' | prepend: site.baseurl }}">FEATURED TAGS</a></h5> | ||
<div class="tags"> | ||
{% capture tags %} | ||
{% for tag in site.tags %} | ||
{% if tag[1].size > site.featured-condition-size %} | ||
<a data-sort="{{ site.posts.size | minus: tag[1].size | prepend: '0000' | slice: -4, 4 }}" | ||
href="{{ site.baseurl }}/tags/#{{ tag[0] }}" | ||
title="{{ tag[0] }}" | ||
rel="{{ tag[1].size }}">{{ tag[0] }} | ||
</a> | ||
{% endif %} | ||
{% endfor %} | ||
{% endcapture %} | ||
{{ tags | split:'</a>' | sort | join:'</a>' }} | ||
</div> | ||
</section> | ||
{% 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
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,9 @@ | ||
{% if site.friends %} | ||
<hr> | ||
<h5>FRIENDS</h5> | ||
<ul class="list-inline"> | ||
{% for friend in site.friends %} | ||
<li><a href="{{friend.href}}">{{friend.title}}</a></li> | ||
{% endfor %} | ||
</ul> | ||
{% 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,108 @@ | ||
{% comment %} | ||
@param {string} type - 'page' | 'post' | 'keynote' | ||
@param {boolean} short | ||
{% endcomment %} | ||
|
||
{% if include.type == 'post' %} | ||
<style type="text/css"> | ||
header.intro-header{ | ||
position: relative; | ||
background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}') | ||
} | ||
|
||
{% if page.header-mask %} | ||
header.intro-header .header-mask{ | ||
width: 100%; | ||
height: 100%; | ||
position: absolute; | ||
background: rgba(0,0,0, {{ page.header-mask }}); | ||
} | ||
{% endif %} | ||
</style> | ||
<header class="intro-header" > | ||
<div class="header-mask"></div> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
<div class="post-heading"> | ||
<div class="tags"> | ||
{% for tag in page.tags %} | ||
<a class="tag" href="{{ site.baseurl }}/tags/#{{ tag }}" title="{{ tag }}">{{ tag }}</a> | ||
{% endfor %} | ||
</div> | ||
<h1>{{ page.title }}</h1> | ||
{% comment %} always create a h2 for keeping the margin {% endcomment %} | ||
<h2 class="subheading">{{ page.subtitle }}</h2> | ||
<span class="meta">Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %} on {{ page.date | date: "%B %-d, %Y" }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
{% endif %} | ||
|
||
{% if include.type == 'keynote' %} | ||
<style type="text/css"> | ||
header.intro-header{ | ||
height: 500px; | ||
overflow: hidden; | ||
} | ||
header.intro-header .container{ | ||
visibility: hidden; | ||
} | ||
header iframe{ | ||
width: 100%; | ||
height: 100%; | ||
border: 0; | ||
} | ||
/* Override Nav Style */ | ||
{% if page.navcolor == "invert" %} | ||
.navbar-custom .nav li a, | ||
.navbar-custom .nav li a:hover, | ||
.navbar-custom .navbar-brand, | ||
.navbar-custom .navbar-brand:hover {color:#777;} | ||
.navbar-default .navbar-toggle .icon-bar {background-color:#777;} | ||
{% endif %} | ||
</style> | ||
<header class="intro-header" > | ||
<iframe src="{{page.iframe}}"></iframe> | ||
<!-- keep for SEO --> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
<div class="post-heading"> | ||
<div class="tags"> | ||
{% for tag in page.tags %} | ||
<a class="tag" href="{{ site.baseurl }}/tags/#{{ tag }}" title="{{ tag }}">{{ tag }}</a> | ||
{% endfor %} | ||
</div> | ||
<h1>{{ page.title }}</h1> | ||
{% comment %} always create a h2 for keeping the margin {% endcomment %} | ||
<h2 class="subheading">{{ page.subtitle }}</h2> | ||
<span class="meta">Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %} | ||
on {{ page.date | date: "%B %-d, %Y" }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
{% endif %} | ||
|
||
{% if include.type == 'page' %} | ||
<header class="intro-header" style="background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
{% if include.short %} | ||
<div class="site-heading" id="tag-heading"> | ||
{% else %} | ||
<div class="site-heading"> | ||
{% endif %} | ||
<h1>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1> | ||
<span class="subheading">{{ page.description }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
{% 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
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,14 @@ | ||
<section class="visible-md visible-lg"> | ||
<hr> | ||
<h5><a href="{{'/about/' | prepend: site.baseurl }}">ABOUT ME</a></h5> | ||
<div class="short-about"> | ||
{% if site.sidebar-avatar %} | ||
<img src="{{site.sidebar-avatar}}" /> | ||
{% endif %} | ||
{% if site.sidebar-about-description %} | ||
<p>{{site.sidebar-about-description}}</p> | ||
{% endif %} | ||
<!-- SNS Link --> | ||
{% include sns-links.html %} | ||
</div> | ||
</section> |
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,81 @@ | ||
{% comment %} | ||
@param {Boolean} center | ||
{% endcomment %} | ||
|
||
{% if include.center %} | ||
<ul class="list-inline text-center"> | ||
{% else %} | ||
<ul class="list-inline"> | ||
{% endif %} | ||
|
||
{% if site.RSS %} | ||
<li> | ||
<a href="{{ "/feed.xml" | prepend: site.baseurl }}"> | ||
<span class="fa-stack fa-lg"> | ||
<i class="fa fa-circle fa-stack-2x"></i> | ||
<i class="fa fa-rss fa-stack-1x fa-inverse"></i> | ||
</span> | ||
</a> | ||
</li> | ||
{% endif %} | ||
{% if site.twitter_username %} | ||
<li> | ||
<a href="https://twitter.com/{{ site.twitter_username }}"> | ||
<span class="fa-stack fa-lg"> | ||
<i class="fa fa-circle fa-stack-2x"></i> | ||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i> | ||
</span> | ||
</a> | ||
</li> | ||
{% endif %} | ||
{% if site.zhihu_username %} | ||
<li> | ||
<a target="_blank" href="https://www.zhihu.com/people/{{ site.zhihu_username }}"> | ||
<span class="fa-stack fa-lg"> | ||
<i class="fa fa-circle fa-stack-2x"></i> | ||
<i class="fa fa-stack-1x fa-inverse">知</i> | ||
</span> | ||
</a> | ||
</li> | ||
{% endif %} | ||
{% if site.weibo_username %} | ||
<li> | ||
<a target="_blank" href="http://weibo.com/{{ site.weibo_username }}"> | ||
<span class="fa-stack fa-lg"> | ||
<i class="fa fa-circle fa-stack-2x"></i> | ||
<i class="fa fa-weibo fa-stack-1x fa-inverse"></i> | ||
</span> | ||
</a> | ||
</li> | ||
{% endif %} | ||
{% if site.facebook_username %} | ||
<li> | ||
<a target="_blank" href="https://www.facebook.com/{{ site.facebook_username }}"> | ||
<span class="fa-stack fa-lg"> | ||
<i class="fa fa-circle fa-stack-2x"></i> | ||
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i> | ||
</span> | ||
</a> | ||
</li> | ||
{% endif %} | ||
{% if site.github_username %} | ||
<li> | ||
<a target="_blank" href="https://github.com/{{ site.github_username }}"> | ||
<span class="fa-stack fa-lg"> | ||
<i class="fa fa-circle fa-stack-2x"></i> | ||
<i class="fa fa-github fa-stack-1x fa-inverse"></i> | ||
</span> | ||
</a> | ||
</li> | ||
{% endif %} | ||
{% if site.linkedin_username %} | ||
<li> | ||
<a target="_blank" href="https://www.linkedin.com/in/{{ site.linkedin_username }}"> | ||
<span class="fa-stack fa-lg"> | ||
<i class="fa fa-circle fa-stack-2x"></i> | ||
<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i> | ||
</span> | ||
</a> | ||
</li> | ||
{% endif %} | ||
</ul> |
Oops, something went wrong.