From 288466272303fac3a6774ed33a1ef704f0462106 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 26 Feb 2015 13:30:13 +1030 Subject: [PATCH] Prepare welcome hero for demo --- ember/app/styles/flarum/layout.less | 13 +++++++------ .../app/templates/components/index/welcome-hero.hbs | 2 +- ember/app/views/index.js | 3 ++- src/Web/Actions/IndexAction.php | 4 +++- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ember/app/styles/flarum/layout.less b/ember/app/styles/flarum/layout.less index 793809912..617cbe0ea 100644 --- a/ember/app/styles/flarum/layout.less +++ b/ember/app/styles/flarum/layout.less @@ -127,11 +127,17 @@ body { // Hero .hero { background: @fl-body-hero-bg; - color: @fl-body-hero-color; margin-top: -1px; text-align: center; padding: 30px 0; font-size: 14px; + + &, & a { + color: @fl-body-hero-color; + } + & a { + opacity: 0.5; + } } .hero .close { float: right; @@ -143,11 +149,6 @@ body { margin: 0; font-size: 22px; font-weight: normal; - // color: @fl-body-heading-color; - - // & when (@fl-colored-hdr = true) { - // color: @fl-body-color; - // } } .hero p { margin: 10px 0 0; diff --git a/ember/app/templates/components/index/welcome-hero.hbs b/ember/app/templates/components/index/welcome-hero.hbs index 76953bfb8..459b5287c 100644 --- a/ember/app/templates/components/index/welcome-hero.hbs +++ b/ember/app/templates/components/index/welcome-hero.hbs @@ -2,6 +2,6 @@

Welcome to {{title}}

-

{{description}}

+

{{{description}}}

diff --git a/ember/app/views/index.js b/ember/app/views/index.js index 12ff7d158..39adc7841 100644 --- a/ember/app/views/index.js +++ b/ember/app/views/index.js @@ -5,6 +5,7 @@ import ActionButton from 'flarum/components/ui/action-button'; import NavItem from 'flarum/components/ui/nav-item'; import WelcomeHero from 'flarum/components/index/welcome-hero'; import HasItemLists from 'flarum/mixins/has-item-lists'; +import config from 'flarum/config/environment'; var precompileTemplate = Ember.Handlebars.compile; var $ = Ember.$; @@ -15,7 +16,7 @@ export default Ember.View.extend(HasItemLists, { didInsertElement: function() { this.set('hero', WelcomeHero.extend({ title: this.get('controller.controllers.application.forumTitle'), - description: 'Thanks for stopping by!' + description: config.welcomeDescription })); // Affix the sidebar so that when the user scrolls down it will stick diff --git a/src/Web/Actions/IndexAction.php b/src/Web/Actions/IndexAction.php index ab0e0b0d6..483390a8d 100644 --- a/src/Web/Actions/IndexAction.php +++ b/src/Web/Actions/IndexAction.php @@ -18,7 +18,9 @@ class IndexAction extends Action 'apiURL' => '/api', 'locationType' => 'hash', 'EmberENV' => [], - 'APP' => [] + 'APP' => [], + 'forumTitle' => Config::get('flarum::forum_title', 'Flarum Demo Forum'), + 'welcomeDescription' => 'Flarum is now at a point where you can have basic conversations, so here is a little demo for you to break. Learn more »' ]; $data = []; $session = [];