Skip to content

Commit 5ec0cda

Browse files
committed
Add header text feature image option
1 parent 96b383a commit 5ec0cda

4 files changed

Lines changed: 7 additions & 2 deletions

File tree

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ theme:
1515
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
1616
1717
<p>Remove all header text in <code>_config.yml</code> to disable this feature.</p>
18+
header_text_feature_image: img/sample_feature_img_3.png
1819
footer_text: >
1920
Powered by <a href="http://jekyllrb.com">Jekyll</a> with <a href="https://rohanchandra.github.io/project/type/">Type Theme</a>
2021

_sass/layouts/_index.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
@extend %padding-regular;
44
display: inline-block;
55
width: 100%;
6-
background: none repeat scroll 0% 0% $header-desc-background-color;
6+
background-color:$header-desc-background-color;
7+
background-size: cover;
78
font-size: 1.2em;
89
text-align: center;
910
color: $header-desc-text-color;

img/sample_feature_img_3.png

94.5 KB
Loading

index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
<div class="home">
66
{% if site.theme.header_text %}
7-
<div class="call-out">{{ site.theme.header_text }}</div>
7+
<div class="call-out"
8+
style="background-image: url('{{ site.baseurl }}/{{ site.theme.header_text_feature_image }}')">
9+
{{ site.theme.header_text }}
10+
</div>
811
{% endif %}
912

1013
<div class="posts">

0 commit comments

Comments
 (0)