mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
introducing a specific docs layout for all docs pages
This commit is contained in:
parent
3317c3fc5d
commit
fd4a2f2d8f
3 changed files with 63 additions and 62 deletions
|
@ -13,7 +13,7 @@ page '/*.json', layout: false
|
|||
page '/*.txt', layout: false
|
||||
|
||||
# With alternative layout: we send the sidebar request to the default layout
|
||||
page 'docs/*', layout: :layout, locals: { sidebar_layout: 'docs' }
|
||||
page 'docs/*', layout: :docs, locals: { sidebar_layout: 'docs' }
|
||||
|
||||
# Proxy pages (http://middlemanapp.com/basics/dynamic-pages/)
|
||||
# proxy '/this-page-has-no-template.html', '/template-file.html', locals: {
|
||||
|
|
|
@ -1,68 +1,28 @@
|
|||
h2.margin-under-xs InSpec Documentation
|
||||
|
||||
p Welcome to the InSpec documentation! This is a reference guide for all available features and options.
|
||||
|
||||
/! animated banner
|
||||
header.child-h.blue-gradient.margin-top-offset
|
||||
#particles-second
|
||||
canvas.particles-js-canvas-el /
|
||||
.purp-shade
|
||||
.row.relative-top.searchbar
|
||||
p In the navigation, you will see 2 sections. The first provides a few links to get started and context around InSpec. The second section contains references to all elements of InSpec: The DSL, CLI, profiles, resources, and matchers.
|
||||
|
||||
.column.columns
|
||||
h3.margin-top-xs Are you new to InSpec?
|
||||
|
||||
hr.strict-left
|
||||
br
|
||||
|
||||
form.main-sidebar--search action="/docs/search/" method="get"
|
||||
input type="text" placeholder="Search Documentation" name="q"
|
||||
p If you're just getting started and want a quick introduction, then we recommend you start with the following items in the order listed.
|
||||
|
||||
.row
|
||||
.columns.medium-6
|
||||
.box-white-brdr.strict-center.
|
||||
p Complete a short interactive demo
|
||||
a.btn.try-demo href="#" Try the Demo
|
||||
.columns.medium-6
|
||||
.box-white-brdr.strict-center
|
||||
p Get your first hands-on experience
|
||||
a.btn href="tutorials" Tutorials
|
||||
|
||||
button.search.shadow action="/docs/search/" method="get"
|
||||
img src="/images/community/search.svg"
|
||||
|
||||
|
||||
.row.margin-both
|
||||
|
||||
column.columns.large-3.medium-3#sidebar.mobile-hide
|
||||
- if locals[:sidebar_layout] == 'docs'
|
||||
ul.main-sidebar--links
|
||||
- sidebar_data(sidebar_layout).each do |item|
|
||||
li.main-sidebar--link
|
||||
small = item.title
|
||||
ul.main-sidebar--list.no-bullet
|
||||
- item.links.each do |item_link|
|
||||
li.main-sidebar--list--item class=link_classes(current_resource.url, item_link)
|
||||
= link_to item_link.title, item_link.link
|
||||
- if print_sub_links?(current_resource.url, item_link)
|
||||
ul.main-sidebar--list--item--dropdown.no-bullet
|
||||
- item_link.sub_links.each do |sub_link|
|
||||
li.main-sidebar--list--item class=link_classes(current_resource.url, sub_link)
|
||||
= link_to sub_link.title, sub_link.link
|
||||
|
||||
column.columns.large-9.medium-9
|
||||
|
||||
h2.margin-under-xs InSpec Documentation
|
||||
|
||||
p Welcome to the InSpec documentation! This is a reference guide for all available features and options.
|
||||
|
||||
p In the navigation, you will see 2 sections. The first provides a few links to get started and context around InSpec. The second section contains references to all elements of InSpec: The DSL, CLI, profiles, resources, and matchers.
|
||||
|
||||
h3.margin-top-xs Are you new to InSpec?
|
||||
|
||||
hr.strict-left
|
||||
br
|
||||
|
||||
p If you're just getting started and want a quick introduction, then we recommend you start with the following items in the order listed.
|
||||
|
||||
.row
|
||||
.columns.medium-6
|
||||
.box-white-brdr.strict-center.
|
||||
p Complete a short interactive demo
|
||||
a.btn.try-demo href="#" Try the Demo
|
||||
.columns.medium-6
|
||||
.box-white-brdr.strict-center
|
||||
p Get your first hands-on experience
|
||||
a.btn href="tutorials" Tutorials
|
||||
|
||||
h3.margin-top-xs Contributing
|
||||
hr.strict-left
|
||||
br
|
||||
p.clear This documentation is automatically generated from the InSpec repository and source code.
|
||||
p To contribute, please have a look at the <a href="https://github.com/chef/inspec/tree/master/docs">docs</a> folder of the project.
|
||||
h3.margin-top-xs Contributing
|
||||
hr.strict-left
|
||||
br
|
||||
p.clear This documentation is automatically generated from the InSpec repository and source code.
|
||||
p To contribute, please have a look at the <a href="https://github.com/chef/inspec/tree/master/docs">docs</a> folder of the project.
|
||||
|
|
41
www/source/layouts/docs.slim
Normal file
41
www/source/layouts/docs.slim
Normal file
|
@ -0,0 +1,41 @@
|
|||
= wrap_layout :layout do
|
||||
|
||||
/! animated banner
|
||||
header.child-h.blue-gradient.margin-top-offset
|
||||
#particles-second
|
||||
canvas.particles-js-canvas-el /
|
||||
.purp-shade
|
||||
.row.relative-top.searchbar
|
||||
|
||||
.column.columns
|
||||
|
||||
|
||||
form.main-sidebar--search action="/docs/search/" method="get"
|
||||
input type="text" placeholder="Search Documentation" name="q"
|
||||
|
||||
|
||||
button.search.shadow action="/docs/search/" method="get"
|
||||
img src="/images/community/search.svg"
|
||||
|
||||
|
||||
.row.margin-both
|
||||
|
||||
column.columns.large-3.medium-3#sidebar.mobile-hide
|
||||
- if locals[:sidebar_layout] == 'docs'
|
||||
ul.main-sidebar--links
|
||||
- sidebar_data(sidebar_layout).each do |item|
|
||||
li.main-sidebar--link
|
||||
small = item.title
|
||||
ul.main-sidebar--list.no-bullet
|
||||
- item.links.each do |item_link|
|
||||
li.main-sidebar--list--item class=link_classes(current_resource.url, item_link)
|
||||
= link_to item_link.title, item_link.link
|
||||
- if print_sub_links?(current_resource.url, item_link)
|
||||
ul.main-sidebar--list--item--dropdown.no-bullet
|
||||
- item_link.sub_links.each do |sub_link|
|
||||
li.main-sidebar--list--item class=link_classes(current_resource.url, sub_link)
|
||||
= link_to sub_link.title, sub_link.link
|
||||
|
||||
column.columns.large-9.medium-9
|
||||
|
||||
== yield
|
Loading…
Reference in a new issue