diff --git a/app/assets/javascripts/darkswarm/controllers/home_controller.js.coffee b/app/assets/javascripts/darkswarm/controllers/home_controller.js.coffee deleted file mode 100644 index ddc73075c2..0000000000 --- a/app/assets/javascripts/darkswarm/controllers/home_controller.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -angular.module('Darkswarm').controller "HomeCtrl", ($scope) -> - $scope.brandStoryExpanded = false - - $scope.toggleBrandStory = -> - $scope.brandStoryExpanded = !$scope.brandStoryExpanded diff --git a/app/views/home/_brandstory.html.haml b/app/views/home/_brandstory.html.haml index 25b8687742..182aa9b5d6 100644 --- a/app/views/home/_brandstory.html.haml +++ b/app/views/home/_brandstory.html.haml @@ -6,21 +6,21 @@ %p = t :brandstory_intro - #brand-story-text.hide-show.slideable - %p - = t :brandstory_part1 - %p - = t :brandstory_part2 - %p - = t :brandstory_part3 - %p - = t :brandstory_part4 - %p - %strong - = t :brandstory_part5_strong - %p - = t :brandstory_part6 - - %a.text-vbig{"slide-toggle" => "#brand-story-text", "ng-click" => "toggleBrandStory()"} - %i.ofn-i_005-caret-down{"ng-hide" => "brandStoryExpanded"} - %i.ofn-i_006-caret-up{ "ng-show" => "brandStoryExpanded"} + %details#brand-story-text + %summary + %i.ofn-i_005-caret-down + %i.ofn-i_006-caret-up + .brand-story-content + %p + = t :brandstory_part1 + %p + = t :brandstory_part2 + %p + = t :brandstory_part3 + %p + = t :brandstory_part4 + %p + %strong + = t :brandstory_part5_strong + %p + = t :brandstory_part6 diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 899e19ca72..7804de4056 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -5,7 +5,7 @@ - content_for :page_alert do = render "shared/menu/alert" -%div{"ng-controller" => "HomeCtrl"} +%div = render "home/tagline" #panes diff --git a/app/webpacker/css/darkswarm/home_panes.scss b/app/webpacker/css/darkswarm/home_panes.scss index d96e931466..93c36d7147 100644 --- a/app/webpacker/css/darkswarm/home_panes.scss +++ b/app/webpacker/css/darkswarm/home_panes.scss @@ -71,8 +71,50 @@ } } - a.text-vbig i { - font-size: 75px; + #brand-story-text { + text-align: center; + margin-top: 1rem; + + summary { + list-style: none; + cursor: pointer; + display: inline-block; + + &::-webkit-details-marker { + display: none; + } + + &::marker { + display: none; + } + + i { + font-size: 75px; + } + + .ofn-i_005-caret-down { + display: inline-block; + } + + .ofn-i_006-caret-up { + display: none; + } + } + + &[open] summary { + .ofn-i_005-caret-down { + display: none; + } + + .ofn-i_006-caret-up { + display: inline-block; + } + } + + .brand-story-content { + margin-top: 1rem; + text-align: left; + } } } diff --git a/spec/javascripts/unit/darkswarm/controllers/home_controller_spec.js.coffee b/spec/javascripts/unit/darkswarm/controllers/home_controller_spec.js.coffee deleted file mode 100644 index 8ba07e2f77..0000000000 --- a/spec/javascripts/unit/darkswarm/controllers/home_controller_spec.js.coffee +++ /dev/null @@ -1,19 +0,0 @@ -describe "HomeCtrl", -> - ctrl = null - scope = null - - beforeEach -> - module 'Darkswarm' - scope = {} - - inject ($controller) -> - ctrl = $controller 'HomeCtrl', {$scope: scope} - - it "starts with the brand story contracted", -> - expect(scope.brandStoryExpanded).toBe false - - it "toggles the brand story", -> - scope.toggleBrandStory() - expect(scope.brandStoryExpanded).toBe true - scope.toggleBrandStory() - expect(scope.brandStoryExpanded).toBe false