From 586753015b2fe309cc03fbdcdd53f9248c7a4fa1 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 18 Dec 2014 10:25:01 +1100 Subject: [PATCH] Reducing the groups page to a oneline list of groups --- .../stylesheets/darkswarm/groups.css.sass | 40 +++++-------------- app/views/groups/index.html.haml | 38 ++++-------------- 2 files changed, 16 insertions(+), 62 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/groups.css.sass b/app/assets/stylesheets/darkswarm/groups.css.sass index b859273ab7..4686c452a2 100644 --- a/app/assets/stylesheets/darkswarm/groups.css.sass +++ b/app/assets/stylesheets/darkswarm/groups.css.sass @@ -9,34 +9,12 @@ padding-bottom: 20px .group - padding-bottom: 40px - hr - border-bottom: 10px solid white - outline: 0 - border-top: 0 - margin: 0 - -.group-hero - position: relative - padding: 0 - border: 10px solid white - background: white - -h3.group-name - margin-top: 0.5em - margin-bottom: 0.15em - -img.group-logo - max-width: 220px - max-height: 86px - float: right - padding-top: 10px - - -img.group-hero-img - background-color: black - width: 100% - height: inherit - max-height: 260px - min-height: 120px - overflow: hidden \ No newline at end of file + padding-bottom: 0.5em + .row div + font-size: 110% + .row a + font-weight: 500 + vertical-align: middle + .ofn-i_035-groups + font-size: 120% + vertical-align: middle diff --git a/app/views/groups/index.html.haml b/app/views/groups/index.html.haml index 1aa5b02629..b085bb446e 100644 --- a/app/views/groups/index.html.haml +++ b/app/views/groups/index.html.haml @@ -5,50 +5,26 @@ #groups{"ng-controller" => "GroupsCtrl"} #active-table-search.row.pad-top - .small-12.columns.text-center - %h1 Groups / Regions - %div - Check out our - %ofn-modal{title: "food groups"} - = render partial: "modals/groups" - below + .small-12.columns + %h1 Groups / regions %p %input.animate-show{type: :text, "ng-model" => "query", - placeholder: "Search group name", + placeholder: "Search name or keyword", "ng-debounce" => "150", "ofn-disable-enter" => true} .group{"ng-repeat" => "group in groups = (Groups.groups | groups:query | orderBy:order)", name: "group{{group.id}}", id: "group{{group.id}}"} - .row.pad-top{bindonce: true} - .small-12.columns - .group-hero - %img.group-hero-img{"bo-src" => "group.promo_image"} - %img.group-logo{"bo-src" => "group.logo", "bo-if" => "group.logo"} - %h3.group-name - %i.ofn-i_035-groups - {{ group.name }} - %h5.group-description {{ group.description }} - .row.pad-top{bindonce: true} .small-6.columns - %p {{ group.long_description }} + %a{"ng-href" => "group/{{group.id}}"} + %i.ofn-i_035-groups + {{ group.name }} .small-6.columns - %h5 Our hubs & producers - %ul.small-block-grid-2 - %li{"ng-repeat" => "enterprise in group.enterprises", "scroll-after-load" => true} - %enterprise-modal{"ng-if" => "enterprise.is_distributor"} - {{ enterprise.name }} - %enterprise-modal{"ng-if" => "!enterprise.is_distributor", "show-hub-actions" => 'true'} - {{ enterprise.name }} - - - .row.group_footer - .small-12.columns - %hr + {{ group.description }} .group{"ng-show" => "groups.length == 0"} .row.pad-top