From 14fbd7b2052a69a45382f2d640213b5008a2fc23 Mon Sep 17 00:00:00 2001 From: Pablo Cuadrado Date: Tue, 1 Jul 2014 05:56:49 -0300 Subject: [PATCH 1/2] help page ported to bootstrap --- app/assets/stylesheets/help.css.scss | 18 ++- app/assets/stylesheets/new-templates.css.scss | 3 + app/assets/stylesheets/new_styles/_base.scss | 5 + app/assets/templates/help_tpl.jst.hbs | 138 +++++++++--------- app/controllers/help_controller.rb | 2 + 5 files changed, 99 insertions(+), 67 deletions(-) diff --git a/app/assets/stylesheets/help.css.scss b/app/assets/stylesheets/help.css.scss index b0e03aceb..ca4edf9ed 100644 --- a/app/assets/stylesheets/help.css.scss +++ b/app/assets/stylesheets/help.css.scss @@ -1,3 +1,9 @@ +h2.help_header { + border-bottom: 1px solid black; + padding-bottom: 5px; + margin-bottom: 15px; +} + ul#help_nav { display: inline; padding: 0; @@ -23,13 +29,18 @@ ul#help_nav { font-weight: 700; } ul { + list-style: none; padding: 0; + margin: 0; li { font-weight: 700; margin-bottom: 10px; a { font-weight: normal; } + .section-selected { + font-weight: bold; + } } } } @@ -55,7 +66,10 @@ ul#help_nav { background-color: rgb(242, 242, 242); margin-bottom: 10px; @include border-radius(4px); - a.toggle { text-decoration: none; } + a.toggle { + text-decoration: none; + color: black; + } h4 { text-align: left; font-weight: 700; @@ -74,7 +88,7 @@ ul#help_nav { } } .answer { - @include border-bottom-radius(4px); + @include border-radius(0px, 0px, 4px, 4px); background-color: white; padding: 10px 20px; } diff --git a/app/assets/stylesheets/new-templates.css.scss b/app/assets/stylesheets/new-templates.css.scss index cfc3795e4..1fb110ba3 100644 --- a/app/assets/stylesheets/new-templates.css.scss +++ b/app/assets/stylesheets/new-templates.css.scss @@ -42,3 +42,6 @@ /* notifications */ @import 'notifications'; + +/* help */ +@import 'help'; diff --git a/app/assets/stylesheets/new_styles/_base.scss b/app/assets/stylesheets/new_styles/_base.scss index cdf719030..93ae671ba 100644 --- a/app/assets/stylesheets/new_styles/_base.scss +++ b/app/assets/stylesheets/new_styles/_base.scss @@ -146,6 +146,11 @@ $bring-dark-accent-forward-color: #DDD; } } +/* padder helper to push content below the header, to be removed when porting to bootstrap is complete */ +.bootstrap_header_padding { + padding-top: 40px; +} + /* responsive */ @media (max-width: 767px) { body { diff --git a/app/assets/templates/help_tpl.jst.hbs b/app/assets/templates/help_tpl.jst.hbs index 42864cea2..23b878310 100644 --- a/app/assets/templates/help_tpl.jst.hbs +++ b/app/assets/templates/help_tpl.jst.hbs @@ -1,69 +1,77 @@ -
-

Help

-
-
-
- +
+ +
+ +
+

Help

-
-
+
+
+
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index 4799488ae..0e3e05f6e 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -1,2 +1,4 @@ class HelpController < ApplicationController + before_filter -> { @css_framework = :bootstrap } + layout ->(c) { request.format == :mobile ? "application" : "with_header_with_footer" } end From 45d04a44eaf2069e09621f123cb18efdb11c7707 Mon Sep 17 00:00:00 2001 From: Pablo Cuadrado Date: Tue, 1 Jul 2014 06:19:29 -0300 Subject: [PATCH 2/2] added title_header key for the Help header, only for EN lang so far --- app/assets/javascripts/app/views/help_view.js | 1 + app/assets/templates/help_tpl.jst.hbs | 2 +- config/locales/diaspora/en.yml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/views/help_view.js b/app/assets/javascripts/app/views/help_view.js index 646e4dc58..b46d2209f 100644 --- a/app/assets/javascripts/app/views/help_view.js +++ b/app/assets/javascripts/app/views/help_view.js @@ -26,6 +26,7 @@ app.views.Help = app.views.StaticContentView.extend({ }; this.data = { + title_header: Diaspora.I18n.t( 'title_header' ), title_getting_help: Diaspora.I18n.t( 'getting_help.title' ), title_account_and_data_management: Diaspora.I18n.t( 'account_and_data_management.title' ), title_aspects: Diaspora.I18n.t( 'aspects.title' ), diff --git a/app/assets/templates/help_tpl.jst.hbs b/app/assets/templates/help_tpl.jst.hbs index 23b878310..5048b0d43 100644 --- a/app/assets/templates/help_tpl.jst.hbs +++ b/app/assets/templates/help_tpl.jst.hbs @@ -4,7 +4,7 @@
-

Help

+

{{ title_header }}

diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 44ac3630e..2ec315cfa 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -374,6 +374,7 @@ en: birthday_with_year: "%B %d %Y" help: + title_header: "Help" tutorials: "tutorials" tutorial: "tutorial" irc: "IRC"