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 %> -
- -
- -

<%= @guide_group.name %>

-
- -
-
- -
    - <% @guide_group.questions.each do |question| %> -
  • - <%= link_to question[:name], anchor: question[:anchor] %> -
  • - <% end %> -
- -
- - <%= @guide_group.body.html_safe %> - -
- -
- -
- -
-
-<%# end %> - -<%= render 'shared/footer' %> +<% title @article.name, @title %> +<% provide(:description, @description) %> +<% provide(:body_class, "bg-white") %> + +<%= render "shared/navbar" %> + +
+
+

More <%= @title %>

+ +
+ +
+ +

<%= @title %>: <%= @article.name %>

+ + <% if @show_toc == true %> +
In this guide:
+ + <% end %> + + <%= @article.body.html_safe %> + +
+
+ +<%= render "shared/footer" %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index bb3683c8d..247f52198 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -34,7 +34,7 @@ - + <%= yield %> <% hydrate_stores %> diff --git a/config/routes.rb b/config/routes.rb index 85f9ff4ea..b7d971a51 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -198,16 +198,14 @@ post 'unfollow' end - # Help - get '/help/:group', :to => 'questions#index', :as => :help - get '/help' => redirect('/help/basics'), :as => :faq + # Guides & Help + get "/help/:group" => "questions#index", as: :help + get "/help" => redirect("/help/basics"), as: :faq + get "/guides/:group" => "guides#index", as: :guides + get "/guides" => "guides#index" get '/metrics' => 'metrics#overview' - # Guides - get '/guides/:group', :to => 'guides#index', :as => :guides - get '/guides', :to => 'guides#index' - # redirect support-foo to helpful get '/support-foo', to: redirect('/helpful') get '/support-foo/*extra', to: redirect {|p, req| "/helpful/#{p[:extra]}" }