From 7c642fb412b7edd8a973429e0275221697ea7ff3 Mon Sep 17 00:00:00 2001 From: MBSchneider Date: Fri, 4 Apr 2014 15:14:50 -0700 Subject: [PATCH 1/3] Adds button look to Organizations and Venues 'create' action, and Organization show page actions Fixes #62 --- app/assets/stylesheets/application.scss | 16 ++++++++++++++++ app/assets/stylesheets/organizations.scss | 16 ++++++++++++++++ app/views/organizations/_item.html.haml | 3 +-- app/views/site/_wiki_props_index.html.haml | 3 ++- 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index fc5204ed..980e082e 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -112,6 +112,22 @@ input[type=text], input[type=url], textarea { padding-top: 10px; font-size: 11px; } + .action-btn { + &:hover { + text-decoration: none; + } + -webkit-appearance: button; + color: #0088cc; + background-color: rgb(192, 192, 192); + border-color: rgb(192, 192, 192); + border-style: outset; + border-width: 2px; + display: inline-block; + font-family: 'Lucida Grande'; + font-size: 11px; + margin: 2px; + padding: 10px 15px; + } } diff --git a/app/assets/stylesheets/organizations.scss b/app/assets/stylesheets/organizations.scss index 3c71c222..ab693966 100644 --- a/app/assets/stylesheets/organizations.scss +++ b/app/assets/stylesheets/organizations.scss @@ -47,6 +47,22 @@ .show-sources, .add-source { display: inline; + + -webkit-appearance: button; + color: #0088cc; + background-color: rgb(192, 192, 192); + border-color: rgb(192, 192, 192); + border-style: outset; + border-width: 2px; + display: inline-block; + font-family: 'Lucida Grande'; + font-size: 11px; + margin: 10px 4px; + padding: 3px 5px; + & a:hover { + text-decoration: none; + } + } } diff --git a/app/views/organizations/_item.html.haml b/app/views/organizations/_item.html.haml index 75b0bfe4..7f14e5d9 100644 --- a/app/views/organizations/_item.html.haml +++ b/app/views/organizations/_item.html.haml @@ -9,9 +9,8 @@ .organization-title= organization.name .organization-source-actions - .show-sources>= link_to t('.sources.show'), '#' - , .add-source= link_to t('.sources.add'), new_organization_source_path(organization) + .show-sources= link_to t('.sources.show'), '#' - if organization.url? %h2.organization-url-title= t('.url.title') diff --git a/app/views/site/_wiki_props_index.html.haml b/app/views/site/_wiki_props_index.html.haml index d531141a..78ec094a 100644 --- a/app/views/site/_wiki_props_index.html.haml +++ b/app/views/site/_wiki_props_index.html.haml @@ -6,5 +6,6 @@ %h3.wiki-index-title= t('.title', :obj => collection_name) .wiki-actions - - add_link = link_to t('.add'), new_polymorphic_path(collection.klass) + - add_link = link_to t('.add'), new_polymorphic_path(collection.klass), :class => 'action-btn' + = t('.actions', :add => add_link, :obj => object_name, :collection => collection_name).html_safe From 95c918426d89d9a40860db8b7515d0b87ce33ad7 Mon Sep 17 00:00:00 2001 From: MBSchneider Date: Fri, 11 Apr 2014 13:13:35 -0700 Subject: [PATCH 2/3] Updates button CSS to reduce duplication --- app/assets/stylesheets/application.scss | 33 ++++++++++--------- app/assets/stylesheets/organizations.scss | 16 --------- app/views/organizations/_item.html.haml | 4 +-- config/locales/activate/en-x-activate-hub.yml | 4 +-- 4 files changed, 21 insertions(+), 36 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 980e082e..98c2d3e9 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -42,6 +42,23 @@ input[type=text], input[type=url], textarea { color: $text-color; } +.action-btn { + &:hover { + text-decoration: none; + } + -webkit-appearance: button; + color: #0088cc; + background-color: rgb(192, 192, 192); + border-color: rgb(192, 192, 192); + border-style: outset; + border-width: 2px; + display: inline-block; + font-family: 'Lucida Grande'; + font-size: 11px; + margin: 2px; + padding: 10px 15px; +} + /*---[ sidebar ]------------------------------------------------------------*/ @@ -112,22 +129,6 @@ input[type=text], input[type=url], textarea { padding-top: 10px; font-size: 11px; } - .action-btn { - &:hover { - text-decoration: none; - } - -webkit-appearance: button; - color: #0088cc; - background-color: rgb(192, 192, 192); - border-color: rgb(192, 192, 192); - border-style: outset; - border-width: 2px; - display: inline-block; - font-family: 'Lucida Grande'; - font-size: 11px; - margin: 2px; - padding: 10px 15px; - } } diff --git a/app/assets/stylesheets/organizations.scss b/app/assets/stylesheets/organizations.scss index ab693966..3c71c222 100644 --- a/app/assets/stylesheets/organizations.scss +++ b/app/assets/stylesheets/organizations.scss @@ -47,22 +47,6 @@ .show-sources, .add-source { display: inline; - - -webkit-appearance: button; - color: #0088cc; - background-color: rgb(192, 192, 192); - border-color: rgb(192, 192, 192); - border-style: outset; - border-width: 2px; - display: inline-block; - font-family: 'Lucida Grande'; - font-size: 11px; - margin: 10px 4px; - padding: 3px 5px; - & a:hover { - text-decoration: none; - } - } } diff --git a/app/views/organizations/_item.html.haml b/app/views/organizations/_item.html.haml index 7f14e5d9..d8861753 100644 --- a/app/views/organizations/_item.html.haml +++ b/app/views/organizations/_item.html.haml @@ -9,8 +9,8 @@ .organization-title= organization.name .organization-source-actions - .add-source= link_to t('.sources.add'), new_organization_source_path(organization) - .show-sources= link_to t('.sources.show'), '#' + .add-source= link_to t('.sources.add'), new_organization_source_path(organization), :class => 'action-btn', :style => 'padding: 3px 5px' + .show-sources= link_to t('.sources.show'), '#', :class => 'action-btn', :style => 'padding: 3px 5px' - if organization.url? %h2.organization-url-title= t('.url.title') diff --git a/config/locales/activate/en-x-activate-hub.yml b/config/locales/activate/en-x-activate-hub.yml index 97eb4805..de46b24e 100644 --- a/config/locales/activate/en-x-activate-hub.yml +++ b/config/locales/activate/en-x-activate-hub.yml @@ -5,10 +5,10 @@ en-x-activate-hub: text: > Search for events and organizations in your community. Get educated, get involved, and start making a difference! -
+ - +
events: index: From 196f6fc7e0a40294bfddae49eaac98becbedf7da Mon Sep 17 00:00:00 2001 From: MBSchneider Date: Fri, 11 Apr 2014 13:16:10 -0700 Subject: [PATCH 3/3] Removes font-family --- app/assets/stylesheets/application.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 98c2d3e9..cd8052a1 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -53,7 +53,6 @@ input[type=text], input[type=url], textarea { border-style: outset; border-width: 2px; display: inline-block; - font-family: 'Lucida Grande'; font-size: 11px; margin: 2px; padding: 10px 15px;