Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • project/openy_rose
  • issue/openy_rose-3268258
  • issue/openy_rose-3275417
  • issue/openy_rose-3275685
  • issue/openy_rose-3275764
  • issue/openy_rose-3275770
  • issue/openy_rose-3312750
  • issue/openy_rose-3315183
  • issue/openy_rose-3316531
  • issue/openy_rose-3318473
  • issue/openy_rose-3346635
  • issue/openy_rose-3358149
  • issue/openy_rose-3369489
  • issue/openy_rose-3376689
  • issue/openy_rose-3397170
  • issue/openy_rose-3397773
  • issue/openy_rose-3449573
17 results
Show changes
Commits on Source (32)
Showing
with 244 additions and 2327 deletions
Gemfile.lock Gemfile.lock
.sass-cache
.bundle
...@@ -3,15 +3,15 @@ GEM ...@@ -3,15 +3,15 @@ GEM
specs: specs:
addressable (2.8.0) addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (9.7.4) autoprefixer-rails (10.3.3.0)
execjs execjs (~> 2)
bootstrap-sass (3.4.1) bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1) autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0) sassc (>= 2.0.0)
breakpoint (2.5.0) breakpoint (2.5.0)
sass (~> 3.3) sass (~> 3.3)
sassy-maps (< 1.0.0) sassy-maps (< 1.0.0)
chunky_png (1.3.11) chunky_png (1.4.0)
color-schemer (0.2.8) color-schemer (0.2.8)
compass-blend-modes (~> 0.0.2) compass-blend-modes (~> 0.0.2)
compass (1.0.3) compass (1.0.3)
...@@ -32,15 +32,15 @@ GEM ...@@ -32,15 +32,15 @@ GEM
compass (>= 0.12.0) compass (>= 0.12.0)
css_parser (1.3.7) css_parser (1.3.7)
addressable addressable
execjs (2.7.0) execjs (2.8.1)
ffi (1.12.1) ffi (1.15.4)
multi_json (1.14.1) multi_json (1.15.0)
public_suffix (4.0.6) public_suffix (4.0.6)
rb-fsevent (0.10.3) rb-fsevent (0.11.0)
rb-inotify (0.10.1) rb-inotify (0.10.1)
ffi (~> 1.0) ffi (~> 1.0)
sass (3.4.25) sass (3.4.25)
sassc (2.2.1) sassc (2.4.0)
ffi (~> 1.9) ffi (~> 1.9)
sassy-maps (0.4.0) sassy-maps (0.4.0)
sass (~> 3.3) sass (~> 3.3)
...@@ -68,4 +68,4 @@ DEPENDENCIES ...@@ -68,4 +68,4 @@ DEPENDENCIES
toolkit (~> 1.0.0) toolkit (~> 1.0.0)
BUNDLED WITH BUNDLED WITH
2.1.4 2.2.22
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
* Lists available colors and color schemes for the OpenY Rose theme. * Lists available colors and color schemes for the OpenY Rose theme.
*/ */
$info = array( $info = [
// Available colors and color labels used in theme. // Available colors and color labels used in theme.
'fields' => array( 'fields' => [
'mainlight' => t('Main light color'), 'mainlight' => t('Main light color'),
'mainmedium' => t('Main medium color'), 'mainmedium' => t('Main medium color'),
'maindark' => t('Main dark color'), 'maindark' => t('Main dark color'),
...@@ -41,14 +41,14 @@ $info = array( ...@@ -41,14 +41,14 @@ $info = array(
'camplink' => t('Camp link color'), 'camplink' => t('Camp link color'),
'campbutton' => t('Camp button color'), 'campbutton' => t('Camp button color'),
'campbuttonlink' => t('Camp button link color'), 'campbuttonlink' => t('Camp button link color'),
), ],
// Pre-defined color schemes. // Pre-defined color schemes.
'schemes' => array( 'schemes' => [
// If changed colors for default scheme please // If changed colors for default scheme please
// add same changes to openy_rose/css/colors.css file. // add same changes to openy_rose/css/colors.css file.
'default' => array( 'default' => [
'title' => t('Blue sky (default)'), 'title' => t('Blue sky (default)'),
'colors' => array( 'colors' => [
'mainlight' => '#00aeef', 'mainlight' => '#00aeef',
'mainmedium' => '#0089d0', 'mainmedium' => '#0089d0',
'maindark' => '#0060af', 'maindark' => '#0060af',
...@@ -81,11 +81,11 @@ $info = array( ...@@ -81,11 +81,11 @@ $info = array(
'camplink' => '#006b6c', 'camplink' => '#006b6c',
'campbutton' => '#006b6d', 'campbutton' => '#006b6d',
'campbuttonlink' => '#fffff9', 'campbuttonlink' => '#fffff9',
), ],
), ],
'seattle' => array( 'seattle' => [
'title' => t('Seattle'), 'title' => t('Seattle'),
'colors' => array( 'colors' => [
'mainlight' => '#20bdbe', 'mainlight' => '#20bdbe',
'mainmedium' => '#01a490', 'mainmedium' => '#01a490',
...@@ -120,11 +120,11 @@ $info = array( ...@@ -120,11 +120,11 @@ $info = array(
'camplink' => '#01a491', 'camplink' => '#01a491',
'campbutton' => '#2fb998', 'campbutton' => '#2fb998',
'campbuttonlink' => '#fffff9', 'campbuttonlink' => '#fffff9',
), ],
), ],
'endeavour' => array( 'endeavour' => [
'title' => t('Endeavour Blue'), 'title' => t('Endeavour Blue'),
'colors' => array( 'colors' => [
'mainlight' => '#00aeef', 'mainlight' => '#00aeef',
'mainmedium' => '#0089d0', 'mainmedium' => '#0089d0',
'maindark' => '#0060af', 'maindark' => '#0060af',
...@@ -157,11 +157,11 @@ $info = array( ...@@ -157,11 +157,11 @@ $info = array(
'camplink' => '#01a491', 'camplink' => '#01a491',
'campbutton' => '#2fb998', 'campbutton' => '#2fb998',
'campbuttonlink' => '#fffff9', 'campbuttonlink' => '#fffff9',
), ],
), ],
'vividviolet' => array( 'vividviolet' => [
'title' => t('Vivid Violet'), 'title' => t('Vivid Violet'),
'colors' => array( 'colors' => [
'mainlight' => '#c6168d', 'mainlight' => '#c6168d',
'mainmedium' => '#92278f', 'mainmedium' => '#92278f',
'maindark' => '#5c2e91', 'maindark' => '#5c2e91',
...@@ -194,11 +194,11 @@ $info = array( ...@@ -194,11 +194,11 @@ $info = array(
'camplink' => '#01a491', 'camplink' => '#01a491',
'campbutton' => '#2fb998', 'campbutton' => '#2fb998',
'campbuttonlink' => '#fffff9', 'campbuttonlink' => '#fffff9',
), ],
), ],
'baysunset' => array( 'baysunset' => [
'title' => t('Bay Sunset'), 'title' => t('Bay Sunset'),
'colors' => array( 'colors' => [
'mainlight' => '#fcaf17', 'mainlight' => '#fcaf17',
'mainmedium' => '#f47920', 'mainmedium' => '#f47920',
'maindark' => '#dd5828', 'maindark' => '#dd5828',
...@@ -230,11 +230,11 @@ $info = array( ...@@ -230,11 +230,11 @@ $info = array(
'camplink' => '#01a491', 'camplink' => '#01a491',
'campbutton' => '#2fb998', 'campbutton' => '#2fb998',
'campbuttonlink' => '#fffff9', 'campbuttonlink' => '#fffff9',
), ],
), ],
'purpleorchid' => array( 'purpleorchid' => [
'title' => t('Purple Orchid'), 'title' => t('Purple Orchid'),
'colors' => array( 'colors' => [
'mainlight' => '#c6168d', 'mainlight' => '#c6168d',
'mainmedium' => '#92278f', 'mainmedium' => '#92278f',
'maindark' => '#5c2e91', 'maindark' => '#5c2e91',
...@@ -266,19 +266,19 @@ $info = array( ...@@ -266,19 +266,19 @@ $info = array(
'camplink' => '#01a44f', 'camplink' => '#01a44f',
'campbutton' => '#02b860', 'campbutton' => '#02b860',
'campbuttonlink' => '#fffff9', 'campbuttonlink' => '#fffff9',
), ],
), ],
), ],
// CSS files (excluding @import) to rewrite with new color scheme. // CSS files (excluding @import) to rewrite with new color scheme.
'css' => array( 'css' => [
'css/colors.css', 'css/colors.css',
), ],
// Copy the logo file from the theme. Color module forces this behavior. // Copy the logo file from the theme. Color module forces this behavior.
'copy' => array( 'copy' => [
'logo.svg', 'logo.svg',
), ],
// Preview files. // Preview files.
'preview_library' => 'openy_rose/color.preview', 'preview_library' => 'openy_rose/color.preview',
...@@ -293,4 +293,4 @@ $info = array( ...@@ -293,4 +293,4 @@ $info = array(
], ],
], ],
], ],
); ];
{
"name": "drupal/openy_rose",
"description": "Rose offers sprawling site menu options and high accessibility for blind or low vision users.",
"type": "drupal-theme",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/openy_rose",
"support": {
"docs": "https://docs.openy.org",
"issues": "https://www.drupal.org/project/issues/openy_rose",
"source": "https://git.drupalcode.org/project/openy_rose"
},
"require": {
"drupal/core": ">=8",
"twig/twig": "^2.7 || ^3.0"
},
"suggest": {
"ymcatwincities/openy-project": "It is recommended that this theme be used with the Open Y base project, otherwise you may run into missing dependency errors. See https://github.com/ymcatwincities/openy-project#installation for instructions on how to get started with Open Y."
}
}
...@@ -42,5 +42,5 @@ output_style = (environment == :development) ? :expanded : :compressed ...@@ -42,5 +42,5 @@ output_style = (environment == :development) ? :expanded : :compressed
sass_options = (environment == :development && debug == true) ? {:debug_info => true} : {} sass_options = (environment == :development && debug == true) ? {:debug_info => true} : {}
# Generate sourcemaps # Generate sourcemaps
sourcemap = false sourcemap = true
Encoding.default_external = "utf-8" Encoding.default_external = "utf-8"
...@@ -553,8 +553,6 @@ body { ...@@ -553,8 +553,6 @@ body {
position: absolute; position: absolute;
font-size: 22px; font-size: 22px;
color: #0089d0; color: #0089d0;
margin-top: 12px;
margin-left: 8px;
} }
.top-navs { .top-navs {
...@@ -897,8 +895,9 @@ body { ...@@ -897,8 +895,9 @@ body {
.header-search-wrapper .search-input-decoration { .header-search-wrapper .search-input-decoration {
background: none; background: none;
border: none; border: none;
top: 0; top: 9px;
right: 14px; right: 7px;
font-size: 14px;
} }
.header-search-wrapper input[type="submit"] { .header-search-wrapper input[type="submit"] {
display: none; display: none;
...@@ -2518,7 +2517,6 @@ body { ...@@ -2518,7 +2517,6 @@ body {
left: 25px; left: 25px;
} }
.site-alert--header .site-alert__icon:before, .site-alert--footer .site-alert__icon:before { .site-alert--header .site-alert__icon:before, .site-alert--footer .site-alert__icon:before {
content: " ";
background-color: #fff; background-color: #fff;
border-radius: 10px; border-radius: 10px;
height: 20px; height: 20px;
...@@ -2569,6 +2567,10 @@ body { ...@@ -2569,6 +2567,10 @@ body {
.footer-alerts-list .slick-track .slick-slide .site-alert { .footer-alerts-list .slick-track .slick-slide .site-alert {
height: 100% !important; height: 100% !important;
} }
.header-alerts-list .slick-track .slick-slide .site-alert > div,
.footer-alerts-list .slick-track .slick-slide .site-alert > div {
height: 100%;
}
.header-alerts-list .slick__arrow, .header-alerts-list .slick__arrow,
.footer-alerts-list .slick__arrow { .footer-alerts-list .slick__arrow {
display: block; display: block;
...@@ -2609,7 +2611,7 @@ body { ...@@ -2609,7 +2611,7 @@ body {
.header-alerts-list .slick-arrow:before, .header-alerts-list .slick-arrow:before,
.footer-alerts-list .slick-arrow:before { .footer-alerts-list .slick-arrow:before {
color: #fff; color: #fff;
font-family: "FontAwesome"; font-family: "Font Awesome 5 Free";
font-size: 30px; font-size: 30px;
font-weight: bold; font-weight: bold;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
...@@ -6119,7 +6121,7 @@ iframe#ga_iframe { ...@@ -6119,7 +6121,7 @@ iframe#ga_iframe {
.atc-style-blue .atcb-link:hover, .atc-style-blue .atcb-link:hover,
.atc-style-blue .atcb-link:active, .atc-style-blue .atcb-link:active,
.atc-style-blue .atcb-link:focus { .atc-style-blue .atcb-link:focus {
font-family: FontAwesome; font-family: "Font Awesome 5 Free";
speak: none; speak: none;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
...@@ -6373,6 +6375,9 @@ a[href="#step2"] { ...@@ -6373,6 +6375,9 @@ a[href="#step2"] {
pointer-events: none; pointer-events: none;
} }
#membership-calc-wrapper .field-mbrshp-image {
width: 300px;
}
#membership-calc-wrapper img { #membership-calc-wrapper img {
height: auto; height: auto;
max-width: 100%; max-width: 100%;
...@@ -6745,7 +6750,7 @@ a[href="#step2"] { ...@@ -6745,7 +6750,7 @@ a[href="#step2"] {
top: 1.2rem; top: 1.2rem;
color: #0089d0; color: #0089d0;
content: "\f002"; content: "\f002";
font: normal normal normal 14px/1 FontAwesome; font-family: "Font Awesome 5 Free";
position: absolute; position: absolute;
} }
.global-search-results .views-exposed-form .js-form-item-query input { .global-search-results .views-exposed-form .js-form-item-query input {
...@@ -7039,6 +7044,10 @@ html.js .flag-waiting .flag-throbber { ...@@ -7039,6 +7044,10 @@ html.js .flag-waiting .flag-throbber {
font-weight: bold; font-weight: bold;
} }
.webform-submission-form textarea {
width: 100%;
}
.programs-search-block-form { .programs-search-block-form {
margin-bottom: 20px; margin-bottom: 20px;
} }
...@@ -7729,7 +7738,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl ...@@ -7729,7 +7738,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl
.node--type-event .date-start:before, .node--type-event .date-start:before,
.node--type-event .event-time:before { .node--type-event .event-time:before {
content: "\f017"; content: "\f017";
font-family: 'FontAwesome'; font-family: "Font Awesome 5 Free";
font-size: 30px; font-size: 30px;
padding-right: 10px; padding-right: 10px;
} }
...@@ -7738,7 +7747,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl ...@@ -7738,7 +7747,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl
} }
.node--type-event .location-link:before { .node--type-event .location-link:before {
content: "\f041"; content: "\f041";
font-family: 'FontAwesome'; font-family: "Font Awesome 5 Free";
font-size: 30px; font-size: 30px;
padding-right: 10px; padding-right: 10px;
color: #5c2e91; color: #5c2e91;
...@@ -8076,8 +8085,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl ...@@ -8076,8 +8085,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl
.ui-dialog.geysir-dialog .ui-dialog-titlebar-close:before { .ui-dialog.geysir-dialog .ui-dialog-titlebar-close:before {
content: "\f2d3"; content: "\f2d3";
font-family: "Font Awesome"; font-family: "Font Awesome 5 Free";
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit; font-size: inherit;
text-rendering: auto; text-rendering: auto;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
...@@ -8232,14 +8240,9 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl ...@@ -8232,14 +8240,9 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl
font-size: 40px; font-size: 40px;
} }
} }
.paragraph-1c-wrapper .field-prgf-1c-description {
color: #5c2e91;
font-family: "Cachet W01 Book", Verdana, sans-serif;
font-size: 20px;
line-height: 1.45em;
}
.paragraph-1c-wrapper .field-prgf-1c-description p { .paragraph-1c-wrapper .field-prgf-1c-description p {
margin: 0 0 5px; margin-bottom: 1rem;
font-size: 1rem;
} }
@media (min-width: 768px) { @media (min-width: 768px) {
...@@ -8432,7 +8435,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl ...@@ -8432,7 +8435,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl
font-size: 15px; font-size: 15px;
} }
.paragraph--type--branch-amenities .list-branch-amenities-wrapper .term-name:before { .paragraph--type--branch-amenities .list-branch-amenities-wrapper .term-name:before {
font-family: "FontAwesome"; font-family: "Font Awesome 5 Free";
font-weight: 900; font-weight: 900;
content: "\f00c"; content: "\f00c";
color: #008485; color: #008485;
...@@ -8446,7 +8449,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl ...@@ -8446,7 +8449,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl
padding-left: 8px; padding-left: 8px;
} }
.paragraph--type--branch-amenities .list-branch-amenities-wrapper .amenities-closed .term-name:before { .paragraph--type--branch-amenities .list-branch-amenities-wrapper .amenities-closed .term-name:before {
font-family: "FontAwesome"; font-family: "Font Awesome 5 Free";
font-weight: 900; font-weight: 900;
content: "\f00d"; content: "\f00d";
color: #ed1c24; color: #ed1c24;
...@@ -8523,12 +8526,25 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl ...@@ -8523,12 +8526,25 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl
.paragraph--type--location-filter-by-amenities .views-element-container form .form-item { .paragraph--type--location-filter-by-amenities .views-element-container form .form-item {
margin: 0 0 5px; margin: 0 0 5px;
} }
@media (max-width: 991px) {
.paragraph--type--location-filter-by-amenities .views-element-container form .form-item .js-form-type-checkbox {
background-color: #ebebeb;
display: inline-block;
margin: 5px 5px 5px 0;
padding: 5px 5px 0;
}
}
.paragraph--type--location-filter-by-amenities .views-element-container form .form-item .field-amenities-icon { .paragraph--type--location-filter-by-amenities .views-element-container form .form-item .field-amenities-icon {
padding: 2px; padding: 2px;
width: 30px; width: 30px;
height: 30px; height: 30px;
margin: 0 4px; margin: 0 4px;
} }
@media (max-width: 991px) {
.paragraph--type--location-filter-by-amenities .views-element-container form .form-item label {
margin-bottom: 0;
}
}
.paragraph--type--location-filter-by-amenities .views-element-container form .form-item label .field-amenities-icon-wrapper { .paragraph--type--location-filter-by-amenities .views-element-container form .form-item label .field-amenities-icon-wrapper {
vertical-align: middle; vertical-align: middle;
} }
...@@ -8565,6 +8581,15 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl ...@@ -8565,6 +8581,15 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl
display: none; display: none;
} }
@media (max-width: 992px) {
.sidebar-region.col-sm-4:has(.paragraph--type--location-filter-by-amenities) {
width: 100%;
}
.main-region.col-sm-8:has(+ .sidebar-region.col-sm-4 .paragraph--type--location-filter-by-amenities) {
width: 100%;
}
}
.paragraph--type--lto { .paragraph--type--lto {
background-color: #0060af; background-color: #0060af;
padding: 20px 0; padding: 20px 0;
...@@ -8664,7 +8689,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl ...@@ -8664,7 +8689,7 @@ article .node--view-mode-flexible-content h2 a span, article .node--view-mode-fl
} }
.paragraph--type--upcoming-events header a:after { .paragraph--type--upcoming-events header a:after {
content: '\f105'; content: '\f105';
font-family: 'FontAwesome'; font-family: "Font Awesome 5 Free";
font-weight: bold; font-weight: bold;
padding-left: 5px; padding-left: 5px;
} }
...@@ -8813,3 +8838,5 @@ input[type="checkbox"]:focus { ...@@ -8813,3 +8838,5 @@ input[type="checkbox"]:focus {
.footer-alerts-list .slick__arrow { .footer-alerts-list .slick__arrow {
margin-top: -25px; margin-top: -25px;
} }
/*# sourceMappingURL=styles.css.map */
This diff is collapsed.
...@@ -7318,3 +7318,5 @@ button.close { ...@@ -7318,3 +7318,5 @@ button.close {
display: none !important; display: none !important;
} }
} }
/*# sourceMappingURL=bootstrap.css.map */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -2,8 +2,7 @@ name: Open Y Rose ...@@ -2,8 +2,7 @@ name: Open Y Rose
type: theme type: theme
description: 'YMCA brand compliant and customizable theme.' description: 'YMCA brand compliant and customizable theme.'
package: Open Y package: Open Y
version: 8.x-1.0 core_version_requirement: ^8 || ^9 || ^10
core_version_requirement: ^8 || ^9
base theme: false base theme: false
libraries: libraries:
- openy_rose/global-styling - openy_rose/global-styling
......
<?php
/**
* @file
* Contains install and update functions for OpenY Rose theme.
*/
/**
* Remove Webform block configuration.
*/
function openy_rose_update_9001() {
\Drupal::configFactory()->getEditable('block.block.openy_rose_webform')->delete();
}
...@@ -4,11 +4,12 @@ global-styling: ...@@ -4,11 +4,12 @@ global-styling:
base: base:
css/vendor/bootstrap/bootstrap.css: {} css/vendor/bootstrap/bootstrap.css: {}
css/vendor/bootstrap/bootstrap-theme.min.css: {} css/vendor/bootstrap/bootstrap-theme.min.css: {}
//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.1.0/css/all.css: {type: external, attributes: { defer: true, async: true} }
theme: theme:
css/styles.css: {} css/styles.css: {}
css/colors.css: {} css/colors.css: {}
js: js:
https://use.fontawesome.com/95fd5fcc01.js: {type: external, attributes: { defer: true, async: true} } //cdnjs.cloudflare.com/ajax/libs/font-awesome/5.1.0/js/all.js: {type: external, attributes: { defer: true, async: true} }
https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js: {type: external, minified: true} https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js: {type: external, minified: true}
scripts/vendor/iscroll/iscroll.js: {} scripts/vendor/iscroll/iscroll.js: {}
scripts/jquery.matchHeight.js: {} scripts/jquery.matchHeight.js: {}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Theme file. * Theme file.
*/ */
use Drupal\Component\Utility\Html; use Drupal\Core\Link;
use Drupal\Core\Render\Element; use Drupal\Core\Render\Element;
use Drupal\Core\Render\Element\RenderElement; use Drupal\Core\Render\Element\RenderElement;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
...@@ -21,6 +21,42 @@ use Drupal\block\BlockInterface; ...@@ -21,6 +21,42 @@ use Drupal\block\BlockInterface;
* Implements hook_preprocess_node(). * Implements hook_preprocess_node().
*/ */
function openy_rose_preprocess_node(array &$variables) { function openy_rose_preprocess_node(array &$variables) {
$node = $variables['node'];
// Add default direction link only if the field is empty.
if (
in_array($node->getType(), ['branch', 'camp', 'facility', 'location']) &&
$variables['view_mode'] == 'teaser' &&
$node->hasField('field_location_directions')
) {
$directions_title = t("Directions");
if (!$node->get('field_location_directions')->isEmpty()) {
$directions_field_url = $node->get('field_location_directions')->first();
if ($directions_field_url && $directions_field_url->getUrl()->toString() !== "") {
return;
}
if ($directions_field_url->title) {
$directions_title = $directions_field_url->title;
}
}
$address = $node->get('field_location_address')->first();
if ($address) {
$address_array = $address->toArray();
$location_address = "{$address_array['address_line1']} {$address_array['locality']}, {$address_array['administrative_area']} {$address_array['postal_code']}";
$directions_url = Url::fromUri('https://www.google.com/maps/dir/', [
'query' => [
'api' => 1,
'destination' => $location_address,
],
]);
$link = Link::fromTextAndUrl($directions_title, $directions_url);
$link = $link->toRenderable();
$link['#attributes'] = ['target' => ['_blank']];
$variables['content']['field_location_directions'][0] = $link;
}
}
if (function_exists(__FUNCTION__ . '_' . $variables['node']->bundle())) { if (function_exists(__FUNCTION__ . '_' . $variables['node']->bundle())) {
$function = __FUNCTION__ . '_' . $variables['node']->bundle(); $function = __FUNCTION__ . '_' . $variables['node']->bundle();
$function($variables); $function($variables);
...@@ -69,8 +105,8 @@ function openy_rose_theme_suggestions_page_alter(array &$suggestions, array $var ...@@ -69,8 +105,8 @@ function openy_rose_theme_suggestions_page_alter(array &$suggestions, array $var
} }
// Adds template suggestions for 40x pages. // Adds template suggestions for 40x pages.
$http_error_suggestions = [ $http_error_suggestions = [
'system.403' => 'page__403', 'system.403' => 'page__403',
'system.404' => 'page__404', 'system.404' => 'page__404',
]; ];
$route_name = \Drupal::routeMatch()->getRouteName(); $route_name = \Drupal::routeMatch()->getRouteName();
if (isset($http_error_suggestions[$route_name])) { if (isset($http_error_suggestions[$route_name])) {
...@@ -108,8 +144,8 @@ function openy_rose_theme_suggestions_block_alter(array &$suggestions, array $va ...@@ -108,8 +144,8 @@ function openy_rose_theme_suggestions_block_alter(array &$suggestions, array $va
*/ */
function openy_rose_preprocess_select(array &$variables) { function openy_rose_preprocess_select(array &$variables) {
$element = $variables['element']; $element = $variables['element'];
Element::setAttributes($element, array('id', 'name', 'size')); Element::setAttributes($element, ['id', 'name', 'size']);
RenderElement::setAttributes($element, array('form-select')); RenderElement::setAttributes($element, ['form-select']);
$variables['attributes'] = $element['#attributes']; $variables['attributes'] = $element['#attributes'];
$variables['options'] = form_select_options($element); $variables['options'] = form_select_options($element);
...@@ -132,27 +168,27 @@ function openy_rose_preprocess_input(array &$variables) { ...@@ -132,27 +168,27 @@ function openy_rose_preprocess_input(array &$variables) {
$element = $variables['element']; $element = $variables['element'];
$variables['children'] = $element['#children']; $variables['children'] = $element['#children'];
$types = array('url', 'textfield', 'tel', 'password', 'date'); $types = ['url', 'textfield', 'tel', 'password', 'date'];
if (in_array($element['#type'], $types)) { if (in_array($element['#type'], $types)) {
$classes = array( $classes = [
'form-control', 'form-control',
'text', 'text',
); ];
} }
elseif ($element['#type'] == 'submit' && $element['#ajax_processed'] != TRUE) { elseif ($element['#type'] == 'submit' && $element['#ajax_processed'] != TRUE) {
$classes = array( $classes = [
'form_submit', 'form_submit',
'btn', 'btn',
'btn-lg', 'btn-lg',
'btn-primary', 'btn-primary',
); ];
} }
elseif ($element['#type'] == 'email') { elseif ($element['#type'] == 'email') {
$classes = array( $classes = [
'form-control', 'form-control',
'text', 'text',
'email', 'email',
); ];
} }
if (isset($classes)) { if (isset($classes)) {
...@@ -170,6 +206,7 @@ function openy_rose_preprocess_field(array &$variables) { ...@@ -170,6 +206,7 @@ function openy_rose_preprocess_field(array &$variables) {
// Check if exist sidebar field. // Check if exist sidebar field.
$variables['wrapper_tag'] = $variables['field_name'] == 'field_sidebar_content' ? 'aside' : 'section'; $variables['wrapper_tag'] = $variables['field_name'] == 'field_sidebar_content' ? 'aside' : 'section';
break; break;
default: default:
$variables['wrapper_tag'] = 'div'; $variables['wrapper_tag'] = 'div';
break; break;
...@@ -198,52 +235,52 @@ function openy_rose_form_system_theme_settings_alter(array &$form, FormStateInte ...@@ -198,52 +235,52 @@ function openy_rose_form_system_theme_settings_alter(array &$form, FormStateInte
'#description' => t('Show search form in the header'), '#description' => t('Show search form in the header'),
]; ];
$form['logo']['openy_rose_footer_logo'] = array( $form['logo']['openy_rose_footer_logo'] = [
'#type' => 'managed_file', '#type' => 'managed_file',
'#title' => t('Footer Logo'), '#title' => t('Footer Logo'),
'#description' => t('To display a logo in the footer area, upload it here.</br>Image size suggested 99 x 75 pixels.'), '#description' => t('To display a logo in the footer area, upload it here.</br>Image size suggested 99 x 75 pixels.'),
'#upload_validators' => array( '#upload_validators' => [
'file_validate_extensions' => array('png jpg jpeg gif svg'), 'file_validate_extensions' => ['png jpg jpeg gif svg'],
), ],
'#upload_location' => 'public://', '#upload_location' => 'public://',
'#default_value' => theme_get_setting('openy_rose_footer_logo'), '#default_value' => theme_get_setting('openy_rose_footer_logo'),
); ];
$form['camp_section'] = array( $form['camp_section'] = [
'#type' => 'details', '#type' => 'details',
'#title' => t('Camp section'), '#title' => t('Camp section'),
'#description' => t('Contains theme configuration for camp and camp related content.'), '#description' => t('Contains theme configuration for camp and camp related content.'),
'#open' => TRUE, '#open' => TRUE,
); ];
$form['camp_section']['openy_rose_camp_section_logo'] = array( $form['camp_section']['openy_rose_camp_section_logo'] = [
'#type' => 'managed_file', '#type' => 'managed_file',
'#title' => t('Camp section logo'), '#title' => t('Camp section logo'),
'#description' => t('To display a logo in the header area on camp pages, and camp related landing pages, upload it here.</br>Image size suggested 92 x 70 pixels.'), '#description' => t('To display a logo in the header area on camp pages, and camp related landing pages, upload it here.</br>Image size suggested 92 x 70 pixels.'),
'#upload_validators' => array( '#upload_validators' => [
'file_validate_extensions' => array('png jpg jpeg gif svg'), 'file_validate_extensions' => ['png jpg jpeg gif svg'],
), ],
'#upload_location' => 'public://', '#upload_location' => 'public://',
'#default_value' => theme_get_setting('openy_rose_camp_section_logo'), '#default_value' => theme_get_setting('openy_rose_camp_section_logo'),
); ];
$form['camp_section']['openy_rose_camp_footer_logo'] = array( $form['camp_section']['openy_rose_camp_footer_logo'] = [
'#type' => 'managed_file', '#type' => 'managed_file',
'#title' => t('Camp section footer logo'), '#title' => t('Camp section footer logo'),
'#description' => t('To display a logo in the footer area on camp pages, and camp related landing pages, upload it here.</br>Image size suggested 99 x 75 pixels.'), '#description' => t('To display a logo in the footer area on camp pages, and camp related landing pages, upload it here.</br>Image size suggested 99 x 75 pixels.'),
'#upload_validators' => array( '#upload_validators' => [
'file_validate_extensions' => array('png jpg jpeg gif svg'), 'file_validate_extensions' => ['png jpg jpeg gif svg'],
), ],
'#upload_location' => 'public://', '#upload_location' => 'public://',
'#default_value' => theme_get_setting('openy_rose_camp_footer_logo'), '#default_value' => theme_get_setting('openy_rose_camp_footer_logo'),
); ];
$form['camp_section']['openy_rose_camp_favicon'] = array( $form['camp_section']['openy_rose_camp_favicon'] = [
'#type' => 'managed_file', '#type' => 'managed_file',
'#title' => t('Camp favicon'), '#title' => t('Camp favicon'),
'#description' => t('To display a favicon on camp pages, and camp related landing pages, upload it here.</br>Image sizes must be 16×16, 32×32, 48×48, or 64×64 pixels.</br>Accepted file types ico, png, gif.'), '#description' => t('To display a favicon on camp pages, and camp related landing pages, upload it here.</br>Image sizes must be 16×16, 32×32, 48×48, or 64×64 pixels.</br>Accepted file types ico, png, gif.'),
'#upload_validators' => array( '#upload_validators' => [
'file_validate_extensions' => array('ico png gif'), 'file_validate_extensions' => ['ico png gif'],
), ],
'#upload_location' => 'public://', '#upload_location' => 'public://',
'#default_value' => theme_get_setting('openy_rose_camp_favicon'), '#default_value' => theme_get_setting('openy_rose_camp_favicon'),
); ];
// Submission handler is not working on theme form // Submission handler is not working on theme form
// See https://www.drupal.org/node/1862892 & https://www.drupal.org/node/2779947 // See https://www.drupal.org/node/1862892 & https://www.drupal.org/node/2779947
...@@ -267,9 +304,8 @@ function openy_rose_form_system_theme_settings_alter(array &$form, FormStateInte ...@@ -267,9 +304,8 @@ function openy_rose_form_system_theme_settings_alter(array &$form, FormStateInte
function openy_rose_page_attachments_alter(array &$page) { function openy_rose_page_attachments_alter(array &$page) {
// Remove and replace the favicon if this page is a camp node or landing page // Remove and replace the favicon if this page is a camp node or landing page
// related to a camp, and the custom camp favicon has been set for the theme. // related to a camp, and the custom camp favicon has been set for the theme.
// Exit if not a node page, or if the 'openy_loc_camp.camp_service' is not available. // Exit if not a node page, or if the 'openy_loc_camp.camp_service' is not available.
if ( !\Drupal::hasService('openy_loc_camp.camp_service')) { if (!\Drupal::hasService('openy_loc_camp.camp_service')) {
return; return;
} }
$camp_service = \Drupal::service('openy_loc_camp.camp_service'); $camp_service = \Drupal::service('openy_loc_camp.camp_service');
...@@ -317,11 +353,11 @@ function openy_rose_page_attachments_alter(array &$page) { ...@@ -317,11 +353,11 @@ function openy_rose_page_attachments_alter(array &$page) {
$type = $file->getMimeType(); $type = $file->getMimeType();
// Attach favicon. // Attach favicon.
$page['#attached']['html_head_link'][][] = array( $page['#attached']['html_head_link'][][] = [
'rel' => 'shortcut icon', 'rel' => 'shortcut icon',
'href' => UrlHelper::stripDangerousProtocols($favicon), 'href' => UrlHelper::stripDangerousProtocols($favicon),
'type' => $type, 'type' => $type,
); ];
} }
/** /**
...@@ -351,15 +387,16 @@ function openy_rose_preprocess_page(array &$variables) { ...@@ -351,15 +387,16 @@ function openy_rose_preprocess_page(array &$variables) {
'#search_key' => $variables['search_key'], '#search_key' => $variables['search_key'],
'#search_results_path' => $variables['search_results_path'], '#search_results_path' => $variables['search_results_path'],
]; ];
} else if (get_class($variables['page']['secondary_menu']) == "Drupal\Core\Render\Markup"){ }
$variables['page']['secondary_menu'] = [ elseif (get_class($variables['page']['secondary_menu']) == "Drupal\Core\Render\Markup") {
'secondary_menu' => ['#markup' => $variables['secondary_menu']] $variables['page']['secondary_menu'] = [
]; 'secondary_menu' => ['#markup' => $variables['secondary_menu']],
$variables['page']['secondary_menu']['search'] = [ ];
'#theme' => 'top_menu_search', $variables['page']['secondary_menu']['search'] = [
'#display_search' => $variables['display_search'], '#theme' => 'top_menu_search',
'#search_key' => $variables['search_key'], '#display_search' => $variables['display_search'],
'#search_results_path' => $variables['search_results_path'], '#search_key' => $variables['search_key'],
'#search_results_path' => $variables['search_results_path'],
]; ];
} }
} }
...@@ -494,5 +531,5 @@ function openy_rose_preprocess_paragraph_social_list(&$variables) { ...@@ -494,5 +531,5 @@ function openy_rose_preprocess_paragraph_social_list(&$variables) {
*/ */
function openy_rose_preprocess(array &$variables) { function openy_rose_preprocess(array &$variables) {
$variables['base_path'] = base_path(); $variables['base_path'] = base_path();
$variables['directory'] = drupal_get_path('theme', 'openy_rose'); $variables['directory'] = \Drupal::service('extension.list.theme')->getPath('openy_rose');
} }
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
font-family: "Cachet W01 Bold", Verdana, sans-serif; font-family: "Cachet W01 Bold", Verdana, sans-serif;
} }
@mixin font-awesome() {
font-family: "Font Awesome 5 Free";
}
@mixin read-more-link() { @mixin read-more-link() {
a { a {
font-size: 15px; font-size: 15px;
......
...@@ -87,7 +87,6 @@ $module: 'site-alert'; ...@@ -87,7 +87,6 @@ $module: 'site-alert';
left: 25px; left: 25px;
&:before { &:before {
content: " ";
background-color: $white; background-color: $white;
border-radius: 10px; border-radius: 10px;
height: 20px; height: 20px;
...@@ -143,6 +142,10 @@ $module: 'site-alert'; ...@@ -143,6 +142,10 @@ $module: 'site-alert';
height: auto; height: auto;
.site-alert { .site-alert {
height: 100% !important; height: 100% !important;
& > div {
height: 100%;
}
} }
} }
} }
...@@ -186,7 +189,7 @@ $module: 'site-alert'; ...@@ -186,7 +189,7 @@ $module: 'site-alert';
} }
&:before { &:before {
color: $white; color: $white;
font-family: "FontAwesome"; @include font-awesome();
font-size: 30px; font-size: 30px;
font-weight: bold; font-weight: bold;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
color: $purple; color: $purple;
&:before { &:before {
content: "\f017"; content: "\f017";
font-family: 'FontAwesome'; @include font-awesome();
font-size: 30px; font-size: 30px;
padding-right: 10px; padding-right: 10px;
} }
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
} }
&:before { &:before {
content: "\f041"; content: "\f041";
font-family: 'FontAwesome'; @include font-awesome();
font-size: 30px; font-size: 30px;
padding-right: 10px; padding-right: 10px;
color: $purple; color: $purple;
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
.ui-dialog-titlebar-close { .ui-dialog-titlebar-close {
&:before { &:before {
content: "\f2d3"; content: "\f2d3";
font-family: "Font Awesome"; @include font-awesome();
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit; font-size: inherit;
text-rendering: auto; text-rendering: auto;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
@include rem(top, 12px); @include rem(top, 12px);
color: $blue; color: $blue;
content: "\f002"; content: "\f002";
font: normal normal normal 14px/1 FontAwesome; @include font-awesome();
position: absolute; position: absolute;
} }
......