Skip to content
Snippets Groups Projects
Unverified Commit e1b6b4e4 authored by weaver299's avatar weaver299 Committed by GitHub
Browse files

Merge pull request #23 from ASCWebServices/canini

asc_bootstrap - adding function to .theme for creating var of content…
parents 44e4b946 b8a03ebf
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 $
$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 @@
}
}
.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) {
#main-nav .container {
padding-left: 0;
......@@ -213,7 +267,8 @@
.sf-accordion-button {
padding: 5px 15px 0;
background: transparent !important;
border-left: solid 1px #979797 !important;
background: $menu-gray !important;
svg, i {
font-size: 18px;
......@@ -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 @@
background-color: $brand-gray;
color: $white;
p {
color: $white;
}
a {
color: $white;
}
......@@ -152,6 +156,10 @@
background-color: #830000;
color: $white;
p {
color: $white;
}
a {
color: $white;
}
......@@ -169,6 +177,10 @@
background-color: #5d1542;
color: $white;
p {
color: $white;
}
a {
color: $white;
}
......@@ -186,6 +198,10 @@
background-color: #1b494c;
color: $white;
p {
color: $white;
}
a {
color: $white;
}
......@@ -203,6 +219,10 @@
background-color: #442369;
color: $white;
p {
color: $white;
}
a {
color: $white;
}
......@@ -220,6 +240,10 @@
background-color: #565b22;
color: $white;
p {
color: $white;
}
a {
color: $white;
}
......@@ -237,6 +261,10 @@
background-color: #953d1c;
color: $white;
p {
color: $white;
}
a {
color: $white;
}
......
......@@ -177,7 +177,7 @@ p {
font-family: $font-family-sans-serif;
font-weight: 400;
font-size: 16px;
color: $gray-6 !important;
color: $gray-6;
}
......
......@@ -104,7 +104,6 @@
a {
color: $black-base;
font-size: 20px;
line-height: 2;
padding-top: 5px;
font-weight: 600;
......
This diff is collapsed.
......@@ -17,20 +17,20 @@ jQuery(document).ready(function(){
//check if menu in mobile view
if (jQuery('#superfish-main-accordion')[0]){
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
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' );
} 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') ) {
jQuery(this).find("i").removeClass('fa-angle-up').addClass( 'fa-angle-right' );
if ( jQuery(this).find("i").hasClass('fa-angle-down') ) {
jQuery(this).find("i").removeClass('fa-angle-down').addClass( 'fa-angle-right' );
} 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 @@
{% for item in content|without('field_background_color') %}
{% set thecont = thecont|merge(item) %}
{% endfor %}
{% if is_front %}<div class="container">{% endif %}
<div class="container">
<div class="col-xs-12 col-md-4 call-out-container">
{{ thecont[0] }}
{# {{ thecont[0]['#paragraph'].field_image_text.value }} #}
......@@ -62,7 +62,7 @@
{{ thecont[2] }}
</div>
{% if is_front %}</div>{% endif %}
</div>
</div>
</div>
......@@ -49,7 +49,7 @@
{% for item in content|without('field_background_color') %}
{% set thecont = thecont|merge(item) %}
{% endfor %}
{% if is_front %}<div class="container">{% endif %}
<div class="container">
<div class="col-xs-12 col-md-6 call-out-container">
{{ thecont[0] }}
</div>
......@@ -57,6 +57,6 @@
<div class="col-xs-12 col-md-6 call-out-container">
{{ thecont[1] }}
</div>
{% if is_front %}</div>{% endif %}
</div>
</div>
</div>
......@@ -44,8 +44,14 @@
{# Prints div with classes, and content without Width and Background. #}
<div{{ attributes.addClass(classes) }}>
<div class="paragraph__column {{ bgcolor }} para_1_col">
{% if page_content_type == 'landing_page' %}
<div class="container">
{% endif %}
<div class="col-xs-12">
{{ content.field_column_content_1 }}
</div>
{% if page_content_type == 'landing_page' %}
</div>
{% endif %}
</div>
</div>
......@@ -80,6 +80,10 @@
<div{{ attributes.addClass(classes) }}>
<div class="paragraph__column {{ bgcolor }}">
{% if page_content_type == 'landing_page' %}
<div class="container">
{% endif %}
{% set thecont = [] %}
{% for item in content|without('field_column_style_3')|without('field_background_color') %}
{% set thecont = thecont|merge(item) %}
......@@ -97,5 +101,9 @@
{{ thecont[2] }}
</div>
{% if page_content_type == 'landing_page' %}
</div>
{% endif %}
</div>
</div>
......@@ -72,6 +72,9 @@
<div{{ attributes.addClass(classes) }}>
<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 #}
{# for key in content.field_column_content_2|keys %}
{{ key }}
......@@ -90,5 +93,9 @@
{{ thecont[1] }}
</div>
{% if page_content_type == 'landing_page' %}
</div>
{% endif %}
</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