sass-site/source/layouts/section_styleguide.haml

35 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-10-24 00:06:39 +02:00
= wrap_layout :has_navigation do
2018-10-22 23:13:05 +02:00
= yield
- if current_page.data.previous_page_url or current_page.data.next_page_url
%footer
%ul.pager
- if current_page.data.previous_page_url
%li.previous
- if current_page.data.previous_page_url == "index"
- previous = ""
- else
- previous = current_page.data.previous_page_url
= link_to "/styleguide/" + previous do
←
= current_page.data.previous_page_name
- if current_page.data.next_page_url
%li.next
= link_to "/styleguide/" + current_page.data.next_page_url do
= current_page.data.next_page_name
→
2018-10-24 00:06:39 +02:00
- content_for :navigation do
2018-10-22 23:13:05 +02:00
- root_url = config[:host]
2018-10-24 00:06:39 +02:00
2018-10-22 23:13:05 +02:00
%h3= link_to "Style Guide", "/styleguide"
2018-10-24 00:06:39 +02:00
%ul.sl-c-list.sl-c-list--navigation
2018-10-22 23:13:05 +02:00
- sitemap.resources.each do |page|
- if page.url =~ /styleguide/
- unless page.url =~ /assets/
- unless page.data.title == "Style Guide"
2018-10-27 08:06:47 +02:00
%li.sl-c-list--navigation__item
= link_to "#{root_url}#{page.url.gsub!(/(\/)+$/,'')}" do
= page.data.title