<%= @title %>: <%= @article.name %>
+ + <% if @show_toc == true %> +In this guide:
+-
+ <% @article.questions.each do |question| %>
+
- + + <%= link_to question[:name], anchor: question[:anchor] %> + + <% end %> +
diff --git a/app/assets/stylesheets/_bootstrap.scss b/app/assets/stylesheets/_bootstrap.scss index ab9693a2b..935a2cb33 100644 --- a/app/assets/stylesheets/_bootstrap.scss +++ b/app/assets/stylesheets/_bootstrap.scss @@ -22,7 +22,6 @@ @import "bootstrap/input-groups"; @import "bootstrap/navs"; @import "bootstrap/navbar"; -@import "bootstrap/breadcrumbs"; @import "bootstrap/pagination"; @import "bootstrap/pager"; @import "bootstrap/labels"; diff --git a/app/assets/stylesheets/app/components/breadcrumbs.scss b/app/assets/stylesheets/app/components/breadcrumbs.scss deleted file mode 100644 index 92530a819..000000000 --- a/app/assets/stylesheets/app/components/breadcrumbs.scss +++ /dev/null @@ -1,12 +0,0 @@ -.breadcrumb { - > li { - + li:before { - @extend .icon; - @extend .icon-chevron-right; - - color: $gray-2; - padding-left: 2px; - padding-right: 5px; - } - } -} diff --git a/app/assets/stylesheets/utilities/_type.scss b/app/assets/stylesheets/utilities/_type.scss index 18cbec78e..e1dcffc97 100644 --- a/app/assets/stylesheets/utilities/_type.scss +++ b/app/assets/stylesheets/utilities/_type.scss @@ -33,7 +33,7 @@ .caps { text-transform: uppercase; - letter-spacing: 0.2px; + letter-spacing: 0.1em; font-size: 1rem; } diff --git a/app/assets/stylesheets/vars/_base.scss b/app/assets/stylesheets/vars/_base.scss index ae978043e..b4a5177bd 100644 --- a/app/assets/stylesheets/vars/_base.scss +++ b/app/assets/stylesheets/vars/_base.scss @@ -512,15 +512,6 @@ $badge-line-height: 1; $badge-border-radius: $border-radius-base; -// Breadcrumbs - -$breadcrumb-padding-vertical: 0; -$breadcrumb-padding-horizontal: 0; -$breadcrumb-bg: transparent; -$breadcrumb-color: $brand-muted; -$breadcrumb-active-color: $brand-muted; - - // Carousel $carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6); diff --git a/app/controllers/guides_controller.rb b/app/controllers/guides_controller.rb index 45b29ad90..349d361cc 100644 --- a/app/controllers/guides_controller.rb +++ b/app/controllers/guides_controller.rb @@ -1,8 +1,19 @@ class GuidesController < ApplicationController - - def index - @guide_groups = GuidesGroup.all - @guide_group = GuidesGroup.find_by_slug!(params.fetch(:group, 'platform')) + def faq + @article_list = FaqGroup.all + @article = FaqGroup.find_by_slug!(params.fetch(:group)) + @title = "FAQs" + @description = "Frequently asked questions about #{@article.name.downcase} on Assembly." + @show_toc = false + render :index end + def guides + @article_list = GuidesGroup.all + @article = GuidesGroup.find_by_slug!(params.fetch(:group, "platform")) + @title = "Guides" + @description = "A guide about #{@article.name.downcase} on Assembly." + @show_toc = true + render :index + end end diff --git a/app/controllers/questions_controller.rb b/app/controllers/questions_controller.rb deleted file mode 100644 index b8a2d73a1..000000000 --- a/app/controllers/questions_controller.rb +++ /dev/null @@ -1,8 +0,0 @@ -class QuestionsController < ApplicationController - - def index - @faq_groups = FaqGroup.all - @faq_group = FaqGroup.find_by_slug!(params.fetch(:group)) - end - -end diff --git a/app/views/guides/index.html.erb b/app/views/guides/index.html.erb index 899043e72..ba62f392d 100644 --- a/app/views/guides/index.html.erb +++ b/app/views/guides/index.html.erb @@ -1,51 +1,43 @@ -<% title @guide_group.name, 'Guides' %> -<% provide(:description, "Frequently asked questions about #{@guide_group.name.downcase} on Assembly.") %> - - - - -<%= render 'shared/navbar' %> - -<%# cache FaqGroup.cache_key(@guide_group) do %> -