forked from daattali/beautiful-jekyll
-
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.
support big images; fixes daattali#37
- Loading branch information
Showing
8 changed files
with
329 additions
and
113 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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<!-- TODO this file has become a mess, refactor it --> | ||
|
||
{% if page.bigimg or page.title %} | ||
|
||
{% if page.bigimg %} | ||
<div id="header-big-imgs" data-num-img={% if page.bigimg.first %}{{ page.bigimg.size }}{% else %}1{% endif %} | ||
{% for bigimg in page.bigimg %} | ||
{% assign imgnum = forloop.index %} | ||
{% for imginfo in bigimg %} | ||
{% if imginfo[0] %} | ||
data-img-src-{{ imgnum }}="{{ imginfo[0] | prepend: site.baseurl | replace: '//', '/' }}" | ||
data-img-desc-{{ imgnum }}="{{ imginfo[1] }}" | ||
{% else %} | ||
data-img-src-{{ imgnum }}="{{ imginfo | prepend: site.baseurl | replace: '//', '/' }}" | ||
{% endif %} | ||
{% endfor %} | ||
{% endfor %} | ||
></div> | ||
{% endif %} | ||
|
||
<header class="header-section {% if page.bigimg %}has-img{% endif %}"> | ||
{% if page.bigimg %} | ||
<div class="big-img intro-header"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
<div class="{{ include.type }}-heading"> | ||
<h1>{% if page.title %}{{ page.title }}{% else %}<br/>{% endif %}</h1> | ||
{% if page.subtitle %} | ||
{% if include.type == "page" %} | ||
<hr class="small"> | ||
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span> | ||
{% else %} | ||
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2> | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% if include.type == "post" %} | ||
<span class="post-meta">Posted on {{ page.date | date: "%B %-d, %Y" }}</span> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<span class='img-desc'></span> | ||
</div> | ||
{% endif %} | ||
<div class="intro-header no-img"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | ||
<div class="{{ include.type }}-heading"> | ||
<h1>{% if page.title %}{{ page.title }}{% else %}<br/>{% endif %}</h1> | ||
{% if page.subtitle %} | ||
{% if include.type == "page" %} | ||
<hr class="small"> | ||
<span class="{{ include.type }}-subheading">{{ page.subtitle }}</span> | ||
{% else %} | ||
<h2 class="{{ include.type }}-subheading">{{ page.subtitle }}</h2> | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% if include.type == "post" %} | ||
<span class="post-meta">Posted on {{ page.date | date: "%B %-d, %Y" }}</span> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
|
||
|
||
{% else %} | ||
<div class="intro-header"></div> | ||
{% 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.