From b967d017027dfad7bc6dabd0379ea4585e30332a Mon Sep 17 00:00:00 2001 From: Marton Kiss Date: Fri, 21 Aug 2015 12:35:34 +0200 Subject: [PATCH] Add groups ambassador page The new page enlist the ambassadors and include a lead block for ambassador program faq. New assets defined by the patch: groups ambassador module: building blocks - profile teaser view mode for user entity - groups_ambassador_list view - ambassador roles block - ambassador selection process block - ambassador program faq block groups ambassador page module: landing pages - ambassador program main menu - ambassador program page Change-Id: I0e2d92b74c34baaff7aacb4055e9b6c2f1614e0a --- groups.install | 13 ++ groups.profile | 1 + .../groups_ambassador.ds.inc | 96 ++++++++ .../groups_ambassador.features.inc | 24 ++ .../groups_ambassador/groups_ambassador.info | 20 ++ .../groups_ambassador.module | 85 +++++++ .../groups_ambassador.strongarm.inc | 64 ++++++ .../groups_ambassador.views_default.inc | 80 +++++++ .../templates/groups_ambassador_faq.tpl.php | 24 ++ .../groups_ambassador_page_banner.tpl.php | 10 + .../groups_ambassador_roleof.tpl.php | 21 ++ .../groups_ambassador_selection.tpl.php | 21 ++ .../groups_ambassador_pages.features.inc | 14 ++ ...s_ambassador_pages.features.menu_links.inc | 42 ++++ .../groups_ambassador_pages.info | 16 ++ .../groups_ambassador_pages.module | 7 + .../groups_ambassador_pages.pages_default.inc | 213 ++++++++++++++++++ .../custom-sass/partials/_ambassadors.scss | 117 ++++++++++ .../custom-sass/style.scss | 1 + themes/openstack_bootstrap/template.php | 4 +- 20 files changed, 872 insertions(+), 1 deletion(-) create mode 100644 modules/groups/groups_ambassador/groups_ambassador.ds.inc create mode 100644 modules/groups/groups_ambassador/groups_ambassador.features.inc create mode 100644 modules/groups/groups_ambassador/groups_ambassador.info create mode 100644 modules/groups/groups_ambassador/groups_ambassador.module create mode 100644 modules/groups/groups_ambassador/groups_ambassador.strongarm.inc create mode 100644 modules/groups/groups_ambassador/groups_ambassador.views_default.inc create mode 100644 modules/groups/groups_ambassador/templates/groups_ambassador_faq.tpl.php create mode 100644 modules/groups/groups_ambassador/templates/groups_ambassador_page_banner.tpl.php create mode 100644 modules/groups/groups_ambassador/templates/groups_ambassador_roleof.tpl.php create mode 100644 modules/groups/groups_ambassador/templates/groups_ambassador_selection.tpl.php create mode 100644 modules/groups/groups_ambassador_pages/groups_ambassador_pages.features.inc create mode 100644 modules/groups/groups_ambassador_pages/groups_ambassador_pages.features.menu_links.inc create mode 100644 modules/groups/groups_ambassador_pages/groups_ambassador_pages.info create mode 100644 modules/groups/groups_ambassador_pages/groups_ambassador_pages.module create mode 100644 modules/groups/groups_ambassador_pages/groups_ambassador_pages.pages_default.inc create mode 100644 themes/openstack_bootstrap/custom-sass/partials/_ambassadors.scss diff --git a/groups.install b/groups.install index d92d4ae..ae11687 100644 --- a/groups.install +++ b/groups.install @@ -323,6 +323,19 @@ function groups_update_7116() { drupal_flush_all_caches(); } +/** + * Enable groups ambassador modules. + */ +function groups_update_7117() { + if (!module_exists('groups_ambassador')) { + module_enable(array('groups_ambassador')); + } + if (!module_exists('groups_ambassador_pages')) { + module_enable(array('groups_ambassador_pages')); + } + drupal_flush_all_caches(); +} + /** * Set language negotiation to URL based. */ diff --git a/groups.profile b/groups.profile index 30686fd..53f0e54 100644 --- a/groups.profile +++ b/groups.profile @@ -307,6 +307,7 @@ function groups_install_additional_modules() { 'groups_pages', 'groups_reports', 'groups_wikis', + 'groups_ambassador_pages', ); // Resolve the dependencies now, so that module_enable() doesn't need // to do it later for each individual module (which kills performance). diff --git a/modules/groups/groups_ambassador/groups_ambassador.ds.inc b/modules/groups/groups_ambassador/groups_ambassador.ds.inc new file mode 100644 index 0000000..a195671 --- /dev/null +++ b/modules/groups/groups_ambassador/groups_ambassador.ds.inc @@ -0,0 +1,96 @@ +api_version = 1; + $ds_fieldsetting->id = 'user|user|profile_teaser'; + $ds_fieldsetting->entity_type = 'user'; + $ds_fieldsetting->bundle = 'user'; + $ds_fieldsetting->view_mode = 'profile_teaser'; + $ds_fieldsetting->settings = array( + 'name' => array( + 'weight' => '1', + 'label' => 'hidden', + 'format' => 'default', + 'formatter_settings' => array( + 'link' => '1', + 'wrapper' => 'h2', + 'class' => '', + ), + ), + 'ds_user_picture' => array( + 'weight' => '0', + 'label' => 'hidden', + 'format' => 'ds_picture_large', + ), + ); + $export['user|user|profile_teaser'] = $ds_fieldsetting; + + return $export; +} + +/** + * Implements hook_ds_layout_settings_info(). + */ +function groups_ambassador_ds_layout_settings_info() { + $export = array(); + + $ds_layout = new stdClass(); + $ds_layout->api_version = 1; + $ds_layout->id = 'user|user|profile_teaser'; + $ds_layout->entity_type = 'user'; + $ds_layout->bundle = 'user'; + $ds_layout->view_mode = 'profile_teaser'; + $ds_layout->layout = 'ds_1col'; + $ds_layout->settings = array( + 'regions' => array( + 'ds_content' => array( + 0 => 'ds_user_picture', + 1 => 'name', + ), + ), + 'fields' => array( + 'ds_user_picture' => 'ds_content', + 'name' => 'ds_content', + ), + 'classes' => array(), + 'wrappers' => array( + 'ds_content' => 'div', + ), + 'layout_wrapper' => 'div', + 'layout_attributes' => '', + 'layout_attributes_merge' => 1, + 'layout_link_attribute' => '', + 'layout_link_custom' => '', + ); + $export['user|user|profile_teaser'] = $ds_layout; + + return $export; +} + +/** + * Implements hook_ds_view_modes_info(). + */ +function groups_ambassador_ds_view_modes_info() { + $export = array(); + + $ds_view_mode = new stdClass(); + $ds_view_mode->api_version = 1; + $ds_view_mode->view_mode = 'profile_teaser'; + $ds_view_mode->label = 'Profile teaser'; + $ds_view_mode->entities = array( + 'user' => 'user', + ); + $export['profile_teaser'] = $ds_view_mode; + + return $export; +} diff --git a/modules/groups/groups_ambassador/groups_ambassador.features.inc b/modules/groups/groups_ambassador/groups_ambassador.features.inc new file mode 100644 index 0000000..8071750 --- /dev/null +++ b/modules/groups/groups_ambassador/groups_ambassador.features.inc @@ -0,0 +1,24 @@ + "1"); + } + if ($module == "strongarm" && $api == "strongarm") { + return array("version" => "1"); + } +} + +/** + * Implements hook_views_api(). + */ +function groups_ambassador_views_api($module = NULL, $api = NULL) { + return array("api" => "3.0"); +} diff --git a/modules/groups/groups_ambassador/groups_ambassador.info b/modules/groups/groups_ambassador/groups_ambassador.info new file mode 100644 index 0000000..4c60113 --- /dev/null +++ b/modules/groups/groups_ambassador/groups_ambassador.info @@ -0,0 +1,20 @@ +name = Groups Ambassador +description = Ambassador related building blocks +core = 7.x +package = Groups - Building Blocks +version = 7.x-1.0 +project = groups_ambassador +dependencies[] = ds +dependencies[] = strongarm +dependencies[] = views +features[ctools][] = ds:ds:1 +features[ctools][] = strongarm:strongarm:1 +features[ctools][] = views:views_default:3.0 +features[ds_field_settings][] = user|user|profile_teaser +features[ds_layout_settings][] = user|user|profile_teaser +features[ds_view_modes][] = profile_teaser +features[features_api][] = api:2 +features[variable][] = field_bundle_settings_user__user +features[views_view][] = groups_ambassador_list +features_exclude[dependencies][ctools] = ctools +no autodetect = 1 diff --git a/modules/groups/groups_ambassador/groups_ambassador.module b/modules/groups/groups_ambassador/groups_ambassador.module new file mode 100644 index 0000000..d1bfecd --- /dev/null +++ b/modules/groups/groups_ambassador/groups_ambassador.module @@ -0,0 +1,85 @@ + t('Groups Ambassador Page Banner block'), + 'cache' => DRUPAL_CACHE_GLOBAL, + ); + $blocks['groups_ambassador_roleof'] = array( + 'info' => t('Groups Ambassador Role of Ambassadors block'), + 'cache' => DRUPAL_CACHE_GLOBAL, + ); + $blocks['groups_ambassador_selection'] = array( + 'info' => t('Groups Ambassador Selection Process block'), + 'cache' => DRUPAL_CACHE_GLOBAL, + ); + $blocks['groups_ambassador_faq'] = array( + 'info' => t('Groups Ambassador FAQ block'), + 'cache' => DRUPAL_CACHE_GLOBAL, + ); + return $blocks; +} + +/** + * Implements hook_block_view(). + */ +function groups_ambassador_block_view($delta='') { + $block = array(); + switch ($delta) { + case 'groups_ambassador_page_banner': + $block['content'] = theme('groups_ambassador_page_banner', array()); + $block['subject'] = 'Ambassador Program'; + break; + case 'groups_ambassador_roleof': + $block['content'] = theme('groups_ambassador_roleof', array()); + $block['subject'] = 'Role of Ambassadors'; + break; + case 'groups_ambassador_selection': + $block['content'] = theme('groups_ambassador_selection', array()); + $block['subject'] = 'Selection Process'; + break;; + case 'groups_ambassador_faq': + $block['content'] = theme('groups_ambassador_faq', array()); + $block['subject'] = 'Frequently Asked Questions'; + break; + } + return $block; +} + +/** + * Implements hook_theme() + */ +function groups_ambassador_theme() { + $module_path = drupal_get_path('module', 'groups_ambassador'); + $base = array( + 'path' => "$module_path/templates", + ); + return array( + 'groups_ambassador_page_banner' => $base + array( + 'template' => 'groups_ambassador_page_banner', + 'variables' => array(), + ), + 'groups_ambassador_roleof' => $base + array( + 'template' => 'groups_ambassador_roleof', + 'variables' => array(), + ), + 'groups_ambassador_selection' => $base + array( + 'template' => 'groups_ambassador_selection', + 'variables' => array(), + ), + 'groups_ambassador_faq' => $base + array( + 'template' => 'groups_ambassador_faq', + 'variables' => array(), + ), + ); +} diff --git a/modules/groups/groups_ambassador/groups_ambassador.strongarm.inc b/modules/groups/groups_ambassador/groups_ambassador.strongarm.inc new file mode 100644 index 0000000..d9e861e --- /dev/null +++ b/modules/groups/groups_ambassador/groups_ambassador.strongarm.inc @@ -0,0 +1,64 @@ +disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'field_bundle_settings_user__user'; + $strongarm->value = array( + 'view_modes' => array( + 'profile_teaser' => array( + 'custom_settings' => TRUE, + ), + 'full' => array( + 'custom_settings' => FALSE, + ), + 'ical' => array( + 'custom_settings' => FALSE, + ), + 'diff_standard' => array( + 'custom_settings' => FALSE, + ), + 'token' => array( + 'custom_settings' => FALSE, + ), + ), + 'extra_fields' => array( + 'form' => array(), + 'display' => array( + 'privatemsg_send_new_message' => array( + 'default' => array( + 'weight' => '5', + 'visible' => TRUE, + ), + 'profile_teaser' => array( + 'weight' => '5', + 'visible' => TRUE, + ), + ), + 'summary' => array( + 'default' => array( + 'weight' => '5', + 'visible' => TRUE, + ), + 'profile_teaser' => array( + 'weight' => '5', + 'visible' => TRUE, + ), + ), + ), + ), + ); + $export['field_bundle_settings_user__user'] = $strongarm; + + return $export; +} diff --git a/modules/groups/groups_ambassador/groups_ambassador.views_default.inc b/modules/groups/groups_ambassador/groups_ambassador.views_default.inc new file mode 100644 index 0000000..5644b99 --- /dev/null +++ b/modules/groups/groups_ambassador/groups_ambassador.views_default.inc @@ -0,0 +1,80 @@ +name = 'groups_ambassador_list'; + $view->description = ''; + $view->tag = 'default'; + $view->base_table = 'users'; + $view->human_name = 'Groups Ambassador List'; + $view->core = 7; + $view->api_version = '3.0'; + $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ + + /* Display: Master */ + $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['title'] = 'Ambassadors'; + $handler->display->display_options['use_more_always'] = FALSE; + $handler->display->display_options['access']['type'] = 'perm'; + $handler->display->display_options['access']['perm'] = 'access user profiles'; + $handler->display->display_options['cache']['type'] = 'none'; + $handler->display->display_options['query']['type'] = 'views_query'; + $handler->display->display_options['exposed_form']['type'] = 'basic'; + $handler->display->display_options['pager']['type'] = 'none'; + $handler->display->display_options['pager']['options']['offset'] = '0'; + $handler->display->display_options['style_plugin'] = 'default'; + $handler->display->display_options['row_plugin'] = 'ds'; + $handler->display->display_options['row_options']['view_mode'] = 'profile_teaser'; + $handler->display->display_options['row_options']['grouping'] = 0; + $handler->display->display_options['row_options']['advanced'] = 0; + $handler->display->display_options['row_options']['delta_fieldset']['delta_fields'] = array(); + $handler->display->display_options['row_options']['grouping_fieldset']['group_field'] = 'users|name'; + $handler->display->display_options['row_options']['default_fieldset']['view_mode'] = 'profile_teaser'; + /* Field: User: Name */ + $handler->display->display_options['fields']['name']['id'] = 'name'; + $handler->display->display_options['fields']['name']['table'] = 'users'; + $handler->display->display_options['fields']['name']['field'] = 'name'; + $handler->display->display_options['fields']['name']['label'] = ''; + $handler->display->display_options['fields']['name']['alter']['word_boundary'] = FALSE; + $handler->display->display_options['fields']['name']['alter']['ellipsis'] = FALSE; + /* Sort criterion: User: Name */ + $handler->display->display_options['sorts']['name']['id'] = 'name'; + $handler->display->display_options['sorts']['name']['table'] = 'users'; + $handler->display->display_options['sorts']['name']['field'] = 'name'; + /* Filter criterion: User: Active */ + $handler->display->display_options['filters']['status']['id'] = 'status'; + $handler->display->display_options['filters']['status']['table'] = 'users'; + $handler->display->display_options['filters']['status']['field'] = 'status'; + $handler->display->display_options['filters']['status']['value'] = '1'; + $handler->display->display_options['filters']['status']['group'] = 1; + $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE; + /* Filter criterion: User: Roles */ + $handler->display->display_options['filters']['rid']['id'] = 'rid'; + $handler->display->display_options['filters']['rid']['table'] = 'users_roles'; + $handler->display->display_options['filters']['rid']['field'] = 'rid'; + $handler->display->display_options['filters']['rid']['value'] = array( + 5 => '5', + ); + $translatables['groups_ambassador_list'] = array( + t('Master'), + t('Ambassadors'), + t('more'), + t('Apply'), + t('Reset'), + t('Sort by'), + t('Asc'), + t('Desc'), + ); + $export['groups_ambassador_list'] = $view; + + return $export; +} diff --git a/modules/groups/groups_ambassador/templates/groups_ambassador_faq.tpl.php b/modules/groups/groups_ambassador/templates/groups_ambassador_faq.tpl.php new file mode 100644 index 0000000..dd16c49 --- /dev/null +++ b/modules/groups/groups_ambassador/templates/groups_ambassador_faq.tpl.php @@ -0,0 +1,24 @@ +

When is all this going to happen?

+

We hope to have our first tranche of ambassadors entitled by September, so +we can get the program running before the summit. We want to get this done as +soon as manageable, since we expect it to go a long way to solving some +problems that exist right now.

+

How much do ambassadors get paid?

+

hey are paid in love – this is a volunteer position.

+

How big will the regions be?

+

Initially: big. We’re starting with a small number of ambassadors so we can +learn before scaling up. We also want to avoid situations where there are many +ambassadors in one region – hence the selection criteria related to geography. +

+

How does “Ambassador” relate to “User Group Leader”?

+ +

OpenStack Ambassador and OpenStack User Group leader are two distinct roles, which can of course be fulfilled by one person, but they have distinct responsibilities. The Ambassador may be involved in running their local meetup group, but they’ll be chatting to the User Group Leaders in their region about how to best help – not taking over! +

+

What will the term length be for ambassadors?

+ +

It’s a ‘job for life’. We believe that the kinds of people who would be eligible to be ambassadors will know when to step down gracefully. +

+

How will we manage misuse of the ambassador title?

+ +

This question comes up frequently, but we have faith in our community. We’ll be applying selection criteria to weed out any undesirables at the beginning, but then keeping in constant contact with the ambassadors to look for early signs things aren’t going the right way. Community members are also welcome to help us looking out for misuse of the title. +

\ No newline at end of file diff --git a/modules/groups/groups_ambassador/templates/groups_ambassador_page_banner.tpl.php b/modules/groups/groups_ambassador/templates/groups_ambassador_page_banner.tpl.php new file mode 100644 index 0000000..3335e8f --- /dev/null +++ b/modules/groups/groups_ambassador/templates/groups_ambassador_page_banner.tpl.php @@ -0,0 +1,10 @@ +
+
+
+
+

Ambassador Program

+
+
+
+
+
\ No newline at end of file diff --git a/modules/groups/groups_ambassador/templates/groups_ambassador_roleof.tpl.php b/modules/groups/groups_ambassador/templates/groups_ambassador_roleof.tpl.php new file mode 100644 index 0000000..c83c04b --- /dev/null +++ b/modules/groups/groups_ambassador/templates/groups_ambassador_roleof.tpl.php @@ -0,0 +1,21 @@ +

Ambassadors will be recognised on the OpenStack website for their +efforts, and provided with support from foundation staff to conduct their +duties. They will also get access to a funding program – allowing them to +request funds for activities of impact in their region. We’d also expect +ambassadors to attend the summits, and the Foundation would likely assist +if it wasn’t possible for them to be there using their own methods.

+ \ No newline at end of file diff --git a/modules/groups/groups_ambassador/templates/groups_ambassador_selection.tpl.php b/modules/groups/groups_ambassador/templates/groups_ambassador_selection.tpl.php new file mode 100644 index 0000000..6ca9641 --- /dev/null +++ b/modules/groups/groups_ambassador/templates/groups_ambassador_selection.tpl.php @@ -0,0 +1,21 @@ +

The title is designed to recognise those who are already good leaders +with a proven track record in the community. With the title, new users, +contributors and community members should easily be able to recognize their +Ambassador as a go-to resource. While the role provides inherent +credibility, it also comes with accountability, meaning decisions and +actions made by the Ambassador should benefit the whole community, not just +one person or company.

+

We believe that the Ambassadors will already be active participants in our community. Think about those people who are already working across multiple user groups, submitting OpenStack mini-events to related conferences, helping onboard new users and contributors, arranging hackfests or just generally going above and beyond in the name of making Openstack great. +

+

To that end, we intend to ask that potential ambassadors provide some information about themselves, namely: +

+ +

A small number of ambassadors will then be selected based on a set of criteria: +

+ \ No newline at end of file diff --git a/modules/groups/groups_ambassador_pages/groups_ambassador_pages.features.inc b/modules/groups/groups_ambassador_pages/groups_ambassador_pages.features.inc new file mode 100644 index 0000000..27f42f9 --- /dev/null +++ b/modules/groups/groups_ambassador_pages/groups_ambassador_pages.features.inc @@ -0,0 +1,14 @@ + "1"); + } +} diff --git a/modules/groups/groups_ambassador_pages/groups_ambassador_pages.features.menu_links.inc b/modules/groups/groups_ambassador_pages/groups_ambassador_pages.features.menu_links.inc new file mode 100644 index 0000000..68b5683 --- /dev/null +++ b/modules/groups/groups_ambassador_pages/groups_ambassador_pages.features.menu_links.inc @@ -0,0 +1,42 @@ + 'main-menu', + 'link_path' => 'ambassador-program', + 'router_path' => 'ambassador-program', + 'link_title' => 'Ambassador Program', + 'options' => array( + 'attributes' => array(), + 'item_attributes' => array( + 'id' => '', + 'class' => '', + 'style' => '', + ), + 'identifier' => 'main-menu_ambassador-program:ambassador-program', + ), + 'module' => 'menu', + 'hidden' => 0, + 'external' => 0, + 'has_children' => 0, + 'expanded' => 0, + 'weight' => 20, + 'customized' => 1, + ); + // Translatables + // Included for use with string extractors like potx. + t('Ambassador Program'); + + + return $menu_links; +} diff --git a/modules/groups/groups_ambassador_pages/groups_ambassador_pages.info b/modules/groups/groups_ambassador_pages/groups_ambassador_pages.info new file mode 100644 index 0000000..b4d93cb --- /dev/null +++ b/modules/groups/groups_ambassador_pages/groups_ambassador_pages.info @@ -0,0 +1,16 @@ +name = Groups Ambassador Pages +description = Provides the panelized Ambassador page feature. +core = 7.x +package = Groups - Landing Pages +version = 7.x-1.0 +project = groups_ambassador_pages +dependencies[] = ctools +dependencies[] = features +dependencies[] = groups_ambassador +dependencies[] = groups_homepage +dependencies[] = menu +dependencies[] = page_manager +features[ctools][] = page_manager:pages_default:1 +features[features_api][] = api:2 +features[menu_links][] = main-menu_ambassador-program:ambassador-program +features[page_manager_pages][] = ambassador_program_page diff --git a/modules/groups/groups_ambassador_pages/groups_ambassador_pages.module b/modules/groups/groups_ambassador_pages/groups_ambassador_pages.module new file mode 100644 index 0000000..e64a75b --- /dev/null +++ b/modules/groups/groups_ambassador_pages/groups_ambassador_pages.module @@ -0,0 +1,7 @@ +disabled = FALSE; /* Edit this to true to make a default page disabled initially */ + $page->api_version = 1; + $page->name = 'ambassador_program_page'; + $page->task = 'page'; + $page->admin_title = 'Ambassador Program Page'; + $page->admin_description = ''; + $page->path = 'ambassador-program'; + $page->access = array(); + $page->menu = array( + 'type' => 'normal', + 'title' => '', + 'weight' => '0', + 'name' => 'navigation', + 'parent' => array( + 'type' => 'none', + 'title' => '', + 'weight' => 0, + 'name' => 'navigation', + ), + ); + $page->arguments = array(); + $page->conf = array(); + $page->default_handlers = array(); + $handler = new stdClass(); + $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ + $handler->api_version = 1; + $handler->name = 'page_ambassador_program_page__panel_context_af92c1c7-c287-4b5b-9364-242c0abe81a3'; + $handler->task = 'page'; + $handler->subtask = 'ambassador_program_page'; + $handler->handler = 'panel_context'; + $handler->weight = 0; + $handler->conf = array( + 'title' => 'Landing page', + 'no_blocks' => FALSE, + 'pipeline' => 'ipe', + 'body_classes_to_remove' => '', + 'body_classes_to_add' => '', + 'css_id' => '', + 'css' => '', + 'contexts' => array(), + 'relationships' => array(), + ); + $display = new panels_display(); + $display->layout = 'openstack_front'; + $display->layout_settings = array(); + $display->panel_settings = array( + 'style_settings' => array( + 'default' => NULL, + 'middle' => NULL, + 'os_top' => NULL, + 'os_top_left' => NULL, + 'os_top_right' => NULL, + 'os_left' => NULL, + 'os_center' => NULL, + 'os_right' => NULL, + 'os_middle' => NULL, + 'os_bottom_left' => NULL, + 'os_bottom_right' => NULL, + 'os_bottom' => NULL, + ), + ); + $display->cache = array(); + $display->title = 'Ambassador Program'; + $display->uuid = '6ddb52e2-863d-4d7f-a7b5-5976ca341ccd'; + $display->content = array(); + $display->panels = array(); + $pane = new stdClass(); + $pane->pid = 'new-43902f5c-ea84-413e-9c25-8e025ad673f0'; + $pane->panel = 'os_bottom'; + $pane->type = 'block'; + $pane->subtype = 'groups_ambassador-groups_ambassador_faq'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'override_title' => 0, + 'override_title_text' => '', + 'override_title_heading' => 'h2', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 0; + $pane->locks = array(); + $pane->uuid = '43902f5c-ea84-413e-9c25-8e025ad673f0'; + $display->content['new-43902f5c-ea84-413e-9c25-8e025ad673f0'] = $pane; + $display->panels['os_bottom'][0] = 'new-43902f5c-ea84-413e-9c25-8e025ad673f0'; + $pane = new stdClass(); + $pane->pid = 'new-4c8a52b1-d3ec-45ee-8950-efd18888858f'; + $pane->panel = 'os_middle'; + $pane->type = 'views'; + $pane->subtype = 'groups_ambassador_list'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'override_pager_settings' => 0, + 'use_pager' => 0, + 'nodes_per_page' => '0', + 'pager_id' => '0', + 'offset' => '0', + 'more_link' => 0, + 'feed_icons' => 0, + 'panel_args' => 0, + 'link_to_view' => 0, + 'args' => '', + 'url' => '', + 'display' => 'default', + 'override_title' => 1, + 'override_title_text' => 'Ambassadors', + 'override_title_heading' => 'h2', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 0; + $pane->locks = array(); + $pane->uuid = '4c8a52b1-d3ec-45ee-8950-efd18888858f'; + $display->content['new-4c8a52b1-d3ec-45ee-8950-efd18888858f'] = $pane; + $display->panels['os_middle'][0] = 'new-4c8a52b1-d3ec-45ee-8950-efd18888858f'; + $pane = new stdClass(); + $pane->pid = 'new-b014ccc9-fa9c-488b-9a83-6238f145fc53'; + $pane->panel = 'os_top'; + $pane->type = 'block'; + $pane->subtype = 'groups_ambassador-groups_ambassador_page_banner'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'override_title' => 1, + 'override_title_text' => '', + 'override_title_heading' => 'h2', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 0; + $pane->locks = array(); + $pane->uuid = 'b014ccc9-fa9c-488b-9a83-6238f145fc53'; + $display->content['new-b014ccc9-fa9c-488b-9a83-6238f145fc53'] = $pane; + $display->panels['os_top'][0] = 'new-b014ccc9-fa9c-488b-9a83-6238f145fc53'; + $pane = new stdClass(); + $pane->pid = 'new-16f9cb5c-04fe-4619-a853-8edaa6a3af42'; + $pane->panel = 'os_top_left'; + $pane->type = 'block'; + $pane->subtype = 'groups_ambassador-groups_ambassador_roleof'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'override_title' => 0, + 'override_title_text' => '', + 'override_title_heading' => 'h2', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 0; + $pane->locks = array(); + $pane->uuid = '16f9cb5c-04fe-4619-a853-8edaa6a3af42'; + $display->content['new-16f9cb5c-04fe-4619-a853-8edaa6a3af42'] = $pane; + $display->panels['os_top_left'][0] = 'new-16f9cb5c-04fe-4619-a853-8edaa6a3af42'; + $pane = new stdClass(); + $pane->pid = 'new-429e267d-dffb-46aa-bfe4-26892f2b3943'; + $pane->panel = 'os_top_right'; + $pane->type = 'block'; + $pane->subtype = 'groups_ambassador-groups_ambassador_selection'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'override_title' => 0, + 'override_title_text' => '', + 'override_title_heading' => 'h2', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 0; + $pane->locks = array(); + $pane->uuid = '429e267d-dffb-46aa-bfe4-26892f2b3943'; + $display->content['new-429e267d-dffb-46aa-bfe4-26892f2b3943'] = $pane; + $display->panels['os_top_right'][0] = 'new-429e267d-dffb-46aa-bfe4-26892f2b3943'; + $display->hide_title = PANELS_TITLE_FIXED; + $display->title_pane = '0'; + $handler->conf['display'] = $display; + $page->default_handlers[$handler->name] = $handler; + $pages['ambassador_program_page'] = $page; + + return $pages; + +} diff --git a/themes/openstack_bootstrap/custom-sass/partials/_ambassadors.scss b/themes/openstack_bootstrap/custom-sass/partials/_ambassadors.scss new file mode 100644 index 0000000..077d791 --- /dev/null +++ b/themes/openstack_bootstrap/custom-sass/partials/_ambassadors.scss @@ -0,0 +1,117 @@ + +.pane-groups-ambassador-groups-ambassador-roleof, +.pane-groups-ambassador-groups-ambassador-selection { + p { + line-height: 20px; + margin-top: 5px; + font-size: 16px; + line-height: 1.4; + } + ul { + padding-left: 0px; + list-style: none; + padding-bottom: 1em; + color: #30739C; + li { + padding-bottom: 0.5em; + } + } + ul li:before { + content: "\0BB \020"; + } + ul ul li:before { + content: "- \020"; + } + ul ul { + padding-left: 20px; + } +} + +.view-groups-ambassador-list { + .view-content { + @extend .container; + } + .views-row { + @extend .col-md-4; + @extend .col-lg-3; + @extend .col-xs-6; + } +} + +.pane-groups-ambassador-list { + padding-top: 80px; + padding-bottom: 60px; + background: #EDF2F7; + h2.pane-title { + text-align: center; + margin-bottom: 60px; + font-size: 35px; + font-weight: 300; + font-family: "Open Sans",Helvetica,Arial,sans-serif; + color: #445059; + } + h3 { + margin-top: 10px; + margin-bottom: 20px; + a { + color: #2A4E68; + font-family: "Open Sans",Helvetica,Arial,sans-serif; + font-weight: 400; + font-size: 18.2px; + line-height: 20px; + } + } +} + +// override of page defaults +.page-ambassador-program { + + // reset background color for selection process block + .region-openstack-front-top-second { + background: inherit; + } + + // container / row / columns for faq region + .openstack-front-bottom { + @extend .container; + margin-bottom: 70px; + } + // remove original page header + h1.page-header { + display: none; + } + + +} + +// page banner design +.pane-groups-ambassador-groups-ambassador-page-banner { + .ambassador-page-banner { + background: #2A4E68; + } + .ambassador-page-title h1 { + text-align: left; + text-transform: uppercase; + color: #EDF2F7; + font-size: 1em; + padding: 15px; + margin: 0px; + font-family: "Open Sans",Helvetica,Arial,sans-serif; + font-weight: 400; + } + .ambassador-banner-image { + background: url(../images/community-banner.jpg) no-repeat scroll center center / cover transparent; + min-height: 350px; + } +} + +.pane-groups-ambassador-groups-ambassador-faq { + h3 { + color: #2A4E68; + font-family: "Open Sans",Helvetica,Arial,sans-serif; + font-weight: 400; + } + p { + margin-bottom: 2em; + } +} \ No newline at end of file diff --git a/themes/openstack_bootstrap/custom-sass/style.scss b/themes/openstack_bootstrap/custom-sass/style.scss index da32e7d..2aa29a3 100644 --- a/themes/openstack_bootstrap/custom-sass/style.scss +++ b/themes/openstack_bootstrap/custom-sass/style.scss @@ -22,6 +22,7 @@ @import 'partials/event'; @import 'partials/language'; @import 'partials/reports'; +@import 'partials/ambassadors'; /* Custom override */ diff --git a/themes/openstack_bootstrap/template.php b/themes/openstack_bootstrap/template.php index 3573cbc..cb7826e 100755 --- a/themes/openstack_bootstrap/template.php +++ b/themes/openstack_bootstrap/template.php @@ -29,13 +29,15 @@ function openstack_bootstrap_preprocess_page(&$variables) { * * Add bleed-margins class to * - front page + * - ambassador program * * and add no-bleed-margins to each other page. * * @see html.tpl.php */ function openstack_bootstrap_preprocess_html(&$variables) { - if ($variables['is_front']) { + $path_alias = drupal_get_path_alias(); + if (($variables['is_front']) || ($path_alias == 'ambassador-program')) { $variables['classes_array'][] = 'bleed-margins'; } else { $variables['classes_array'][] = 'no-bleed-margins';