Skip to content

Commit

Permalink
Add header text feature image option
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanchandra committed Mar 24, 2015
1 parent 96b383a commit 5ec0cda
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ theme:
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<p>Remove all header text in <code>_config.yml</code> to disable this feature.</p>
header_text_feature_image: img/sample_feature_img_3.png
footer_text: >
Powered by <a href="http://jekyllrb.com">Jekyll</a> with <a href="https://rohanchandra.github.io/project/type/">Type Theme</a>
Expand Down
3 changes: 2 additions & 1 deletion _sass/layouts/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
@extend %padding-regular;
display: inline-block;
width: 100%;
background: none repeat scroll 0% 0% $header-desc-background-color;
background-color:$header-desc-background-color;
background-size: cover;
font-size: 1.2em;
text-align: center;
color: $header-desc-text-color;
Expand Down
Binary file added img/sample_feature_img_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

<div class="home">
{% if site.theme.header_text %}
<div class="call-out">{{ site.theme.header_text }}</div>
<div class="call-out"
style="background-image: url('{{ site.baseurl }}/{{ site.theme.header_text_feature_image }}')">
{{ site.theme.header_text }}
</div>
{% endif %}

<div class="posts">
Expand Down

0 comments on commit 5ec0cda

Please sign in to comment.