Skip to content
Snippets Groups Projects
Commit 67dea0c6 authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman :boom:
Browse files

Made the title and description in the header dynamic.

parent 083f7186
No related branches found
No related tags found
No related merge requests found
...@@ -100,10 +100,18 @@ helpers do ...@@ -100,10 +100,18 @@ helpers do
end end
def page_title def page_title
if current_page.data.title.present? if current_page.data.header_title.present?
current_page.data.header_title
elsif current_page.data.title.present?
current_page.data.title current_page.data.title
end end
end end
def page_description
if current_page.data.description.present?
current_page.data.description
end
end
end end
# Add bower's directory to sprockets asset path # Add bower's directory to sprockets asset path
......
--- ---
title: Overview title: Overview
header_title: Aparapi
description: Open-source framework for executing native Java code on the GPU.
--- ---
- content_for :additional_header do - content_for :additional_header do
.row.center .row.center
......
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
.container .container
%h1.header.center-on-small-only #{page_title} %h1.header.center-on-small-only #{page_title}
.row.center .row.center
%h4.header.col.s12.light.center Open-source framework for executing native Java code on the GPU. - if page_description
%h4.header.col.s12.light.center #{page_description}
= yield_content(:additional_header) if content_for?(:additional_header) = yield_content(:additional_header) if content_for?(:additional_header)
= yield_content(:banner) if content_for?(:banner) = yield_content(:banner) if content_for?(:banner)
.container .container
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment