Skip to content
Snippets Groups Projects
Commit b8a03ebf authored by Brian Canini's avatar Brian Canini
Browse files

asc_bootstrap - adding function to .theme for creating var of content type...

asc_bootstrap - adding function to .theme for creating var of content type that can be used by paragraph temps, updating mobile menu styles, updating paragraph temps that are used for landing pages so they're positioned appropriately on both land and basic pages
parent 1dea56be
No related branches found
No related tags found
No related merge requests found
Showing
with 332 additions and 238 deletions
...@@ -36,3 +36,28 @@ function asc_bootstrap_theme_suggestions_page_alter(array &$suggestions, array $ ...@@ -36,3 +36,28 @@ function asc_bootstrap_theme_suggestions_page_alter(array &$suggestions, array $
$suggestions[] = 'page__'.$content_type; $suggestions[] = 'page__'.$content_type;
} }
} }
/*function asc_bootstrap_preprocess_node(&$variables) {
switch ($variables['node']->getType()) {
case "landing_page":
$variables['is_landing_page'] = TRUE;
break;
}
if (isset($variables['node']) && $variables['node'] instanceof NodeInterface) {
$node = $variables['node'];
$title = $node->getTitle();
$type = $node->getType();
// more code...
}
dump($variables);
}*/
/*
* adds content type to variable to be used in paragraph twig files
*/
function asc_bootstrap_preprocess_paragraph(&$variables) {
$node = \Drupal::request()->attributes->get('node');
$variables['page_content_type'] = $node->getType();
}
...@@ -129,6 +129,60 @@ ...@@ -129,6 +129,60 @@
} }
} }
.search-box{
background: #E8E8E4;
position: absolute;
top: 54px;
right: 28.7%;
width: 350px;
height: 60px;
line-height: 60px;
box-shadow: 0 0 10px rgba(0,0,0,0.5);
border-top:4px solid #D80B15;
display: none;
&:before{
content: "";
position: absolute;
top: -32px;
right: 13px;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
border-top: 14px solid transparent;
border-bottom: 14px solid #D80B15;
}
input[type="text"]{
width: 200px;
padding: 5px 10px;
margin-left: 23px;
border: 1px solid #D80B15;
outline: none;
}
input[type="button"]{
width: 80px;
padding: 5px 0;
background: #D80B15;
color: #fff;
margin-left: -6px;
border: 1px solid #D80B15;
outline: none;
cursor: $point;
}
}
#superfish-main {
width: 100%;
}
// --------------------------------------------------
//## Mobile styles.
@media (max-width: 768px) { @media (max-width: 768px) {
#main-nav .container { #main-nav .container {
padding-left: 0; padding-left: 0;
...@@ -213,7 +267,8 @@ ...@@ -213,7 +267,8 @@
.sf-accordion-button { .sf-accordion-button {
padding: 5px 15px 0; padding: 5px 15px 0;
background: transparent !important; border-left: solid 1px #979797 !important;
background: $menu-gray !important;
svg, i { svg, i {
font-size: 18px; font-size: 18px;
...@@ -227,57 +282,3 @@ ...@@ -227,57 +282,3 @@
} }
} }
.search-box{
background: #E8E8E4;
position: absolute;
top: 54px;
right: 28.7%;
width: 350px;
height: 60px;
line-height: 60px;
box-shadow: 0 0 10px rgba(0,0,0,0.5);
border-top:4px solid #D80B15;
display: none;
}
.search-box:before{
content: "";
position: absolute;
top: -32px;
right: 13px;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
border-top: 14px solid transparent;
border-bottom: 14px solid #D80B15;
}
.search-box input[type="text"]{
width: 200px;
padding: 5px 10px;
margin-left: 23px;
border: 1px solid #D80B15;
outline: none;
}
.search-box input[type="button"]{
width: 80px;
padding: 5px 0;
background: #D80B15;
color: #fff;
margin-left: -6px;
border: 1px solid #D80B15;
outline: none;
cursor: $point;
}
#superfish-main {
width: 100%;
}
#superfish-main {
width: 100%;
}
...@@ -135,6 +135,10 @@ ...@@ -135,6 +135,10 @@
background-color: $brand-gray; background-color: $brand-gray;
color: $white; color: $white;
p {
color: $white;
}
a { a {
color: $white; color: $white;
} }
...@@ -152,6 +156,10 @@ ...@@ -152,6 +156,10 @@
background-color: #830000; background-color: #830000;
color: $white; color: $white;
p {
color: $white;
}
a { a {
color: $white; color: $white;
} }
...@@ -169,6 +177,10 @@ ...@@ -169,6 +177,10 @@
background-color: #5d1542; background-color: #5d1542;
color: $white; color: $white;
p {
color: $white;
}
a { a {
color: $white; color: $white;
} }
...@@ -186,6 +198,10 @@ ...@@ -186,6 +198,10 @@
background-color: #1b494c; background-color: #1b494c;
color: $white; color: $white;
p {
color: $white;
}
a { a {
color: $white; color: $white;
} }
...@@ -203,6 +219,10 @@ ...@@ -203,6 +219,10 @@
background-color: #442369; background-color: #442369;
color: $white; color: $white;
p {
color: $white;
}
a { a {
color: $white; color: $white;
} }
...@@ -220,6 +240,10 @@ ...@@ -220,6 +240,10 @@
background-color: #565b22; background-color: #565b22;
color: $white; color: $white;
p {
color: $white;
}
a { a {
color: $white; color: $white;
} }
...@@ -237,6 +261,10 @@ ...@@ -237,6 +261,10 @@
background-color: #953d1c; background-color: #953d1c;
color: $white; color: $white;
p {
color: $white;
}
a { a {
color: $white; color: $white;
} }
......
...@@ -177,7 +177,7 @@ p { ...@@ -177,7 +177,7 @@ p {
font-family: $font-family-sans-serif; font-family: $font-family-sans-serif;
font-weight: 400; font-weight: 400;
font-size: 16px; font-size: 16px;
color: $gray-6 !important; color: $gray-6;
} }
......
...@@ -104,7 +104,6 @@ ...@@ -104,7 +104,6 @@
a { a {
color: $black-base; color: $black-base;
font-size: 20px; font-size: 20px;
line-height: 2;
padding-top: 5px; padding-top: 5px;
font-weight: 600; font-weight: 600;
......
This diff is collapsed.
...@@ -17,20 +17,20 @@ jQuery(document).ready(function(){ ...@@ -17,20 +17,20 @@ jQuery(document).ready(function(){
//check if menu in mobile view //check if menu in mobile view
if (jQuery('#superfish-main-accordion')[0]){ if (jQuery('#superfish-main-accordion')[0]){
jQuery('.sf-accordion-button .svg-inline--fa').empty().replaceWith(function(){ jQuery('.sf-accordion-button .svg-inline--fa').empty().replaceWith(function(){
return jQuery("<i class='fa fa-angle-up' aria-hidden='true' />").append(jQuery(this).contents()); return jQuery("<i class='fa fa-angle-down' aria-hidden='true' />").append(jQuery(this).contents());
}); });
//change arrow direction on click //change arrow direction on click
jQuery('.sf-accordion-button').click(function(){ jQuery('.sf-accordion-button').click(function(){
if ( jQuery(this).find("svg").hasClass('fa-angle-up') ) { if ( jQuery(this).find("svg").hasClass('fa-angle-down') ) {
jQuery(this).find("svg").addClass( 'fa-angle-right' ); jQuery(this).find("svg").addClass( 'fa-angle-right' );
} else { } else {
jQuery(this).find("svg").removeClass( 'fa-angle-right' ).addClass( 'fa-angle-up' ); jQuery(this).find("svg").removeClass( 'fa-angle-right' ).addClass( 'fa-angle-down' );
} }
if ( jQuery(this).find("i").hasClass('fa-angle-up') ) { if ( jQuery(this).find("i").hasClass('fa-angle-down') ) {
jQuery(this).find("i").removeClass('fa-angle-up').addClass( 'fa-angle-right' ); jQuery(this).find("i").removeClass('fa-angle-down').addClass( 'fa-angle-right' );
} else { } else {
jQuery(this).find("i").removeClass( 'fa-angle-right' ).addClass( 'fa-angle-up' ); jQuery(this).find("i").removeClass( 'fa-angle-right' ).addClass( 'fa-angle-down' );
} }
}); });
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
{% for item in content|without('field_background_color') %} {% for item in content|without('field_background_color') %}
{% set thecont = thecont|merge(item) %} {% set thecont = thecont|merge(item) %}
{% endfor %} {% endfor %}
{% if is_front %}<div class="container">{% endif %} <div class="container">
<div class="col-xs-12 col-md-4 call-out-container"> <div class="col-xs-12 col-md-4 call-out-container">
{{ thecont[0] }} {{ thecont[0] }}
{# {{ thecont[0]['#paragraph'].field_image_text.value }} #} {# {{ thecont[0]['#paragraph'].field_image_text.value }} #}
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
{{ thecont[2] }} {{ thecont[2] }}
</div> </div>
{% if is_front %}</div>{% endif %} </div>
</div> </div>
</div> </div>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
{% for item in content|without('field_background_color') %} {% for item in content|without('field_background_color') %}
{% set thecont = thecont|merge(item) %} {% set thecont = thecont|merge(item) %}
{% endfor %} {% endfor %}
{% if is_front %}<div class="container">{% endif %} <div class="container">
<div class="col-xs-12 col-md-6 call-out-container"> <div class="col-xs-12 col-md-6 call-out-container">
{{ thecont[0] }} {{ thecont[0] }}
</div> </div>
...@@ -57,6 +57,6 @@ ...@@ -57,6 +57,6 @@
<div class="col-xs-12 col-md-6 call-out-container"> <div class="col-xs-12 col-md-6 call-out-container">
{{ thecont[1] }} {{ thecont[1] }}
</div> </div>
{% if is_front %}</div>{% endif %} </div>
</div> </div>
</div> </div>
...@@ -44,8 +44,14 @@ ...@@ -44,8 +44,14 @@
{# Prints div with classes, and content without Width and Background. #} {# Prints div with classes, and content without Width and Background. #}
<div{{ attributes.addClass(classes) }}> <div{{ attributes.addClass(classes) }}>
<div class="paragraph__column {{ bgcolor }} para_1_col"> <div class="paragraph__column {{ bgcolor }} para_1_col">
{% if page_content_type == 'landing_page' %}
<div class="container">
{% endif %}
<div class="col-xs-12"> <div class="col-xs-12">
{{ content.field_column_content_1 }} {{ content.field_column_content_1 }}
</div> </div>
{% if page_content_type == 'landing_page' %}
</div>
{% endif %}
</div> </div>
</div> </div>
...@@ -80,6 +80,10 @@ ...@@ -80,6 +80,10 @@
<div{{ attributes.addClass(classes) }}> <div{{ attributes.addClass(classes) }}>
<div class="paragraph__column {{ bgcolor }}"> <div class="paragraph__column {{ bgcolor }}">
{% if page_content_type == 'landing_page' %}
<div class="container">
{% endif %}
{% set thecont = [] %} {% set thecont = [] %}
{% for item in content|without('field_column_style_3')|without('field_background_color') %} {% for item in content|without('field_column_style_3')|without('field_background_color') %}
{% set thecont = thecont|merge(item) %} {% set thecont = thecont|merge(item) %}
...@@ -97,5 +101,9 @@ ...@@ -97,5 +101,9 @@
{{ thecont[2] }} {{ thecont[2] }}
</div> </div>
{% if page_content_type == 'landing_page' %}
</div>
{% endif %}
</div> </div>
</div> </div>
...@@ -72,6 +72,9 @@ ...@@ -72,6 +72,9 @@
<div{{ attributes.addClass(classes) }}> <div{{ attributes.addClass(classes) }}>
<div class="paragraph__column {{ bgcolor }}"> <div class="paragraph__column {{ bgcolor }}">
{% if page_content_type == 'landing_page' %}
<div class="container">
{% endif %}
{# content.field_column_content_2[0]['#paragraph'].field_text.value #} {# content.field_column_content_2[0]['#paragraph'].field_text.value #}
{# for key in content.field_column_content_2|keys %} {# for key in content.field_column_content_2|keys %}
{{ key }} {{ key }}
...@@ -90,5 +93,9 @@ ...@@ -90,5 +93,9 @@
{{ thecont[1] }} {{ thecont[1] }}
</div> </div>
{% if page_content_type == 'landing_page' %}
</div>
{% endif %}
</div> </div>
</div> </div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment