Commit 065aa5e5 authored by Simone Wood's avatar Simone Wood Committed by Simone Wood
Browse files

Issue #3179537 by sim_1, Suresh Prabhu Parkala, kclarkson: Reorganize and...

Issue #3179537 by sim_1, Suresh Prabhu Parkala, kclarkson: Reorganize and clean up old settings and configuration
parent 0f945d61
Loading
Loading
Loading
Loading
+16 −19
Original line number Diff line number Diff line
@@ -2,23 +2,20 @@ features:
   comment_user_picture: true
   favicon: true
   node_user_picture: true
settings:
  zurb_foundation_status_in_reveal: false
  zurb_foundation_use_respondjs: false
  zurb_foundation_disable_base_css: false
  zurb_foundation_disable_base_js: false
  zurb_foundation_meta_header_grid: true
  zurb_foundation_top_bar_enable: false
  zurb_foundation_top_bar_grid: false
  zurb_foundation_top_bar_sticky: false
zurb_foundation_status_in_reveal: 0
zurb_foundation_disable_base_css: 0
zurb_foundation_disable_base_js: 0
zurb_foundation_meta_header_grid: 1
zurb_foundation_top_bar_enable: 0
zurb_foundation_top_bar_grid: 0
zurb_foundation_top_bar_sticky: 0
zurb_foundation_top_bar_menu_text: 'Menu'
  zurb_foundation_top_bar_custom_back_text: true
zurb_foundation_top_bar_custom_back_text: 1
zurb_foundation_top_bar_back_text: 'Back'
  zurb_foundation_top_bar_is_hover: true
  zurb_foundation_top_bar_search: false
  zurb_foundation_top_bar_languageswitcher: false
  zurb_foundation_page_account_info: true
  zurb_foundation_block_copyright_show: true
  zurb_foundation_block_copyright_custom_text: false
zurb_foundation_top_bar_is_hover: 1
zurb_foundation_top_bar_search: 0
zurb_foundation_top_bar_languageswitcher: 0
zurb_foundation_block_copyright_show: 1
zurb_foundation_block_copyright_custom_text: 0
zurb_foundation_block_copyright_text: ''
langcode: en
+54 −0
Original line number Diff line number Diff line
# Schema for the configuration files of the Olivero theme.

zurb_foundation.settings:
  type: theme_settings
  label: 'Zurb Foundation settings'
  mapping:
    zurb_foundation_status_in_reveal:
      type: boolean
      label: "Display status messages in Reveal"
    zurb_foundation_disable_base_css:
      type: boolean
      label: "Disable Base Theme CSS"
    zurb_foundation_disable_base_js:
      type: boolean
      label: "Disable Base Theme JavaScript"
    zurb_foundation_meta_header_grid:
      type: boolean
      label: "Contain Meta Header Region to Grid"
    zurb_foundation_top_bar_enable:
      type: integer
      label: "Enable the top bar element"
    zurb_foundation_top_bar_grid:
      type: boolean
      label: "Contain the top bar to grid"
    zurb_foundation_top_bar_sticky:
      type: boolean
      label: "Make the top bar sticky"
    zurb_foundation_top_bar_menu_text:
      type: string
      label: "Menu text"
    zurb_foundation_top_bar_custom_back_text:
      type: boolean
      label: "Enable custom back text in dropdown"
    zurb_foundation_top_bar_back_text:
      type: string
      label: "Custom back text"
    zurb_foundation_top_bar_is_hover:
      type: boolean
      label: "Hover to expand menu"
    zurb_foundation_top_bar_search:
      type: boolean
      label: "Add search to top bar"
    zurb_foundation_top_bar_languageswitcher:
      type: boolean
      label: "Add language switcher to top bar"
    zurb_foundation_block_copyright_show:
      type: boolean
      label: "Display custom copyright block"
    zurb_foundation_block_copyright_custom_text:
      type: boolean
      label: "Set custom copyright block text"
    zurb_foundation_block_copyright_text:
      type: string
      label: "Text for custom copyright block"
+3 −37
Original line number Diff line number Diff line
@@ -3,6 +3,9 @@
 * @file
 * Zurb Foundations's theme implementation to display a single page.
 *
 * The doctype, html, head and body tags are not in this template. Instead they
 * can be found in the html.html.twig template in this directory.
 *
 * Available variables:
 *
 * General utility variables:
@@ -73,43 +76,6 @@
        {% endif %}
      </header>

      {# Depricated and to be removed. See issue 3179537 #}
      <div class="row">
        {% if show_account_info %}
          <div class="{{ site_slogan ? 'large-6' : 'large-4 columns large-offset-8' }} columns hide-for-small">
            <p>
              {% if logged_in %}
                <a href="{{ path('user.page') }}">{{ 'My Account'|t }}</a>
                <a href="{{ path('user.logout') }}">{{ 'Logout'|t }}</a>
              {% else %}
                <a href="{{ path('user.login') }}">{{ 'Login'|t }}</a>
                <a href="{{ path('user.register') }}">{{ 'Sign Up'|t }}</a>
              {% endif %}
            </p>
          </div>
        {% endif %}
        {% if site_slogan %}
          <div class="large-6 columns hide-for-small">
            {{ site_slogan }}
          </div>
        {% endif %}
        {% if show_account_info %}
          <div class="show-for-small">
            <div class="six mobile-two columns">
              <p>
                <a href="{{ path('user.login') }}" class="radius button">{{ 'Login'|t }}</a>
              </p>
            </div>
            <div class="six mobile-two columns">
              <p>
                <a href="{{ path('user.register') }}" class="radius success button">{{ 'Sign Up'|t }}</a>
              </p>
            </div>
          </div>
        {% endif %}
      </div>
      {# End of section to be removed #}

      {% if messages and not zurb_foundation_messages_modal %}
        <div class="l-messages grid-container">
          {{ messages }}
+0 −19
Original line number Diff line number Diff line
@@ -23,18 +23,6 @@ function zurb_foundation_form_system_theme_settings_alter(&$form, FormStateInter
    '#default_value' => theme_get_setting('zurb_foundation_status_in_reveal'),
  ];

  $form['theme_javascript'] = [
    '#type' => 'details',
    '#title' => t('Javascript Files'),
  ];

  $form['theme_javascript']['zurb_foundation_use_respondjs'] = [
    '#type' => 'checkbox',
    '#title' => t('Implement Respond.js'),
    '#description' => t('Foundation 4.x does not support IE8, but you can include Respond.js to add additional support for Internet Explorer.'),
    '#default_value' => theme_get_setting('zurb_foundation_use_respondjs'),
  ];

  $form['region_settings'] = [
    '#type' => 'details',
    '#title' => t('Region Settings'),
@@ -153,13 +141,6 @@ function zurb_foundation_form_system_theme_settings_alter(&$form, FormStateInter
    '#description' => t('Contains settings to toggle hard-coded elements in the page template.'),
  ];

  $form['page_elements']['zurb_foundation_page_account_info'] = [
    '#type' => 'checkbox',
    '#title' => t('Show Login/Signup information'),
    '#description' => t('Determines if the hard-coded login block should be displayed.'),
    '#default_value' => theme_get_setting('zurb_foundation_page_account_info'),
  ];

  /*
   * Copyright Block.
   */
+0 −3
Original line number Diff line number Diff line
@@ -290,9 +290,6 @@ function zurb_foundation_preprocess_page(&$variables) {
  // Check to see if the Meta Header should be in the Grid.
  $variables['meta_header_grid'] = theme_get_setting('zurb_foundation_meta_header_grid');

  // Variable to disable hard-coded login elements.
  $variables['show_account_info'] = theme_get_setting('zurb_foundation_page_account_info');

  // Copyright block settings.
  // boolean if any of the region should render.
  $variables['block_copyright_show'] = theme_get_setting('zurb_foundation_block_copyright_show');