Commit caa7dae5 authored by Chris Shantz's avatar Chris Shantz
Browse files

Merge branch '3.0.x' into prod/3.0.x

parents 9abed11a cad6ff48
......@@ -6,3 +6,5 @@ gesso/
css/pattern-lab.css
css/pattern-lab.scss
css/styles.scss
css/styles.css
css/uw-dashboards.css
......@@ -1341,7 +1341,6 @@ figure {
img {
border: 0;
font-style: italic;
height: auto;
max-width: 100%;
vertical-align: middle; }
@media print {
......@@ -1592,6 +1591,7 @@ svg:not(:root) {
.uw-footer {
background-color: #000;
margin-top: 0;
min-height: 3rem;
padding: 0;
width: 100%; }
.uw-footer__wrapper {
......@@ -1923,6 +1923,7 @@ svg:not(:root) {
display: flex;
font-family: "BureauGrotCond Book", impact, "avenir next condensed heavy", "Droid Sans", sans-serif;
margin-bottom: 0;
min-height: 3.5rem;
padding: 8px;
position: relative;
transition: margin 300ms; }
......@@ -1935,6 +1936,7 @@ svg:not(:root) {
margin-right: auto;
max-width: 75rem;
padding: 0 16px;
min-height: inherit;
padding: 16px; } }
@media (min-width: 48.06rem) and (min-width: 75rem) {
.uw-header__masthead {
......@@ -3565,6 +3567,9 @@ button {
width: 100%; }
.views-row .card {
height: 100%; }
.card .uw-label {
display: block;
margin-top: 1rem; }
.card--show-hover {
border-bottom: 3px solid #000;
......@@ -4162,16 +4167,30 @@ button {
.view-uw-view-contacts .view-content .views-row {
width: 100%; }
.uw-copy-text__wrapper.uw-contained-width {
margin-left: auto;
margin-right: auto;
max-width: 75rem;
padding: 0 16px;
padding: 1rem 0; }
@media (min-width: 75rem) {
.uw-copy-text__wrapper.uw-contained-width {
padding-left: 0;
padding-right: 0; } }
.uw-copy-text {
overflow: auto; }
.uw-copy-text ul {
overflow: hidden; }
.uw-copy-text .media.align-left {
padding-right: 1rem; }
.uw-copy-text .media.align-center {
padding: 1rem 0;
text-align: center; }
.uw-copy-text .media.align-center img {
display: block;
margin: 0 auto; }
.uw-copy-text .media.align-right {
padding-left: 1rem; }
.uw-copy-text__wrapper.uw-contained-width {
margin-left: auto;
margin-right: auto;
max-width: 75rem;
padding: 0 16px;
padding: 1rem 0; }
@media (min-width: 75rem) {
.uw-copy-text__wrapper.uw-contained-width {
padding-left: 0;
padding-right: 0; } }
.uw-date {
width: 100%; }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -86,7 +86,7 @@ const lintStyles = () => {
};
const compileStyles = () => {
return src('*.scss', { cwd: './source' })
return src('styles.scss', { cwd: './source' })
.pipe(sassGlob())
.pipe(sourcemaps.init())
.pipe(
......@@ -103,9 +103,25 @@ const compileStyles = () => {
}),
])
)
.pipe(dest(cssSrc));
.pipe(dest(cssSrc))
};
const cleanCSS = require('gulp-clean-css');
const minifyCSS = () => {
return src('styles.css', { cwd: cssSrc })
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(rename('styles.min.css'))
.pipe(dest(cssSrc));
}
const minifyLayoutsCSS = () => {
return src('uw-dashboards.css', { cwd: cssSrc })
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(rename('uw-dashboards.min.css'))
.pipe(dest(cssSrc));
}
const layoutsSrc = [
path.join(__dirname, '/source/uw-dashboards.scss')
];
......@@ -193,7 +209,7 @@ const watchFiles = () => {
const buildComponentScripts = (exports.buildScripts = series(compileComponentScripts));
const buildStyles = (exports.buildStyles = series(lintStyles, compileStyles, compileLayoutStyles));
const buildStyles = (exports.buildStyles = series(lintStyles, compileStyles, minifyCSS, compileLayoutStyles, minifyLayoutsCSS));
const build = (isProduction = true ) => {
const scriptTask = isProduction ? bundleScripts : bundleScriptsDev;
......
/**
* @file
* Ckeditor Modal.
*/
(function ($, Drupal) {
if ($.ui && $.ui.dialog) {
orig_allowInteraction = $.ui.dialog.prototype._allowInteraction;
$.ui.dialog.prototype._allowInteraction = function (event) {
if ($(event.target).closest('.cke_dialog').length) {
return true;
}
return orig_allowInteraction.apply(this, arguments);
};
}
})(jQuery, Drupal);
/**
* @file
*/
......@@ -329,23 +346,6 @@ else {
};
})(jQuery);
/**
* @file
* Ckeditor Modal.
*/
(function ($, Drupal) {
if ($.ui && $.ui.dialog) {
orig_allowInteraction = $.ui.dialog.prototype._allowInteraction;
$.ui.dialog.prototype._allowInteraction = function (event) {
if ($(event.target).closest('.cke_dialog').length) {
return true;
}
return orig_allowInteraction.apply(this, arguments);
};
}
})(jQuery, Drupal);
/**
* @file
*/
......
......@@ -511,4 +511,4 @@ $gesso: (
xxl: 96px,
),
gutter-width: 40px,
);
);
\ No newline at end of file
......@@ -4,7 +4,6 @@
img {
border: 0;
font-style: italic; // Makes alt text stand out from surrounding text.
height: auto;
max-width: 100%;
vertical-align: middle;
......
......@@ -4,6 +4,7 @@
.uw-footer {
background-color: #000;
margin-top: 0;
min-height: 3rem;
padding: 0;
width: 100%;
&__wrapper {
......
<footer class="uw-footer" role="contentinfo">
<footer class="uw-footer"{% if branding_level == 'full' %} role="contentinfo"{% endif %}>
{% if branding_level == 'full' %}
<div class="uw-site-footer__block">
{% block content %}
{% include "@layouts/site-footer/site-footer.twig" with {
......@@ -36,4 +37,5 @@
} %}
</div>
</div>
{% endif %}
</footer>
......@@ -11,6 +11,7 @@ $site-name-bg: gesso-grayscale(gray-2);
display: flex;
font-family:gesso-font-family(condensedbook);
margin-bottom:0;
min-height: 3.5rem;
padding: gesso-spacing(xs);
position: relative;
transition: margin 300ms;
......@@ -20,6 +21,7 @@ $site-name-bg: gesso-grayscale(gray-2);
}
@include medium{
@include uw-contained-width;
min-height:inherit;
padding: gesso-spacing(sm);
}
......@@ -27,7 +29,6 @@ $site-name-bg: gesso-grayscale(gray-2);
align-self: flex-start;
flex: 1;
}
.uw-header-menu {
align-self: flex-end;
margin-right:2.75rem;
......@@ -37,7 +38,6 @@ $site-name-bg: gesso-grayscale(gray-2);
}
.uw-header-search {
align-self: flex-end;
}
.uw-header-searchbar{
@include uw-contained-width;
......
......@@ -70,11 +70,11 @@
{% endif %}
<div class="uw-header__masthead">
{% include '@components/site-logo/site-logo.twig' %}
{% include "@components/menu/menu--header/menu--header.twig" with {
'modifier_classes': 'header',
} %}
{% if branding_level == 'full' %}
{% include "@components/menu/menu--header/menu--header.twig" with {
'modifier_classes': 'header',
} %}
{% endif %}
{% include "@components/search/search--wcms-header/search--wcms-header.twig" with {
'form_action': 'https://uwaterloo.ca/search',
......@@ -99,9 +99,11 @@
}%}
</div>
<!-- Branding colour bar. -->
{% include '@components/color-bar/color-bar.twig' with {
'faculty': faculty
}%}
{% if branding_level == 'full' %}
{% include '@components/color-bar/color-bar.twig' with {
'faculty': faculty
}%}
{% endif %}
<!-- Main header horizontal navigation -->
<nav class="uw-header__nav">
<div class="uw-header__center">
......
{% if is_demo_site_container %}
{% set faculty = faculty ? faculty : 'org-art' %}
{% set branding_level = branding_level ? branding_level : 'full' %}
{% endif %}
<div class="uw-site-container">
......
......@@ -15,6 +15,14 @@ $card-padding: rem(gesso-spacing(sm)) !default;
.views-row &{
height:100%;
}
.uw-label{
display:block;
margin-top:1rem;
}
&__catalog-tags {
padding-bottom: rem(gesso-spacing(sm));
}
}
// if card--show-hover class is present then show "
......
......@@ -6,6 +6,7 @@
<div class="uw-node__{{ node_image_class }}">
{% include '@components/card/card.twig' with {
'type': type,
'title': node.title,
'sub_title': node.sub_title,
'date': node.date,
......@@ -29,5 +30,13 @@
'groups': node.groups,
'featured_image': featured_image,
'card_type': 'node',
'hero': node.hero,
'host': node.host,
'event_website': node.event_website,
'cost': node.cost,
'map': node.map,
'address': node.address,
'map_link': node.map_link,
'catalog_tags': node.catalog_tags,
} %}
</div>
......@@ -9,8 +9,8 @@
<article class="card {{ modifier_classes }} {% if show_hover %} card--show-hover {% endif %} {{ card_type }}" >
{% if featured_image == 'yes' and img_element %}
<div class="card__featured-image" style="background-image: url({{ img_element }});" role="img" aria-label="{{ alt }}">
{% if featured_image == 'yes' and hero.img_element %}
<div class="card__featured-image" style="background-image: url({{ hero.img_element }});" role="img" aria-label="{{ hero.alt }}">
</div>
{% endif %}
......@@ -125,7 +125,7 @@
{% endif %}
{% if location %}
<div class="card__location">
Location: {{ location }}
<span class="uw-label">Location:</span> {{ location }}
</div>
{% endif %}
{% endblock %}
......@@ -142,14 +142,13 @@
{% block details_content %}
{% if link_profile %}
<div class="uw-contact__link-profile">
<strong>Link to Profile:</strong><br />
<div class="card__link-profile">Link to Profile:<br />
<a href="{{ link_profile.uri }}">{{ link_profile.title }}</a>
</div>
{% endif %}
{% if personal_webpage %}
<div class="uw-contact__personal-webpage">
<strong>Link to personal webpage:</strong><br />
<div class="card__personal-webpage">
<span class="uw-label">Link to personal webpage:</span>
<a href="{{ personal_webpage.uri }}">{{ personal_webpage.title }}</a>
</div>
{% endif %}
......@@ -158,6 +157,95 @@
</div>
{% endif %}
{% if host or event_website or cost %}
<div class="card__additional-info">
{% embed '@components/details/details.twig' with {
is_open: TRUE,
} %}
{% block details_summary %}
Additional Information
{% endblock %}
{% block details_content %}
{% if host %}
<div class="card__host">
<span class="uw-label"> Host:</span>
<a href="{{ host.uri }}">
{% if host.title %}
{{ host.title }}
{% else %}
{{ host.uri }}
{% endif %}
</a>
</div>
{% endif %}
{% if event_website %}
<div class="card__event-website">
<span class="uw-label"> Event website:</span>
<a href="{{ event_website.uri }}">
{% if event_website.title %}
{{ event_website.title }}
{% else %}
{{ event_website.uri }}
{% endif %}
</a>
</div>
{% endif %}
{% if cost %}
<div class="card__cost">
<span class="uw-label">Cost:</span>
${{ cost }}
</div>
{% endif %}
{% endblock %}
{% endembed %}
</div>
{% endif %}
{% if address or map or map_link %}
<div class="card__location">
{% embed '@components/details/details.twig' with {
is_open: TRUE,
} %}
{% block details_summary %}
Location Information
{% endblock %}
{% block details_content %}
{% if address %}
<div class="card__address">
<span class="uw-label">Location Address:</span>
{% if address.organization %}
{{ address.organization }}<br />
{% endif %}
{% if address.address_line1 %}
{{ address.address_line1 }}<br />
{% endif %}
{% if address.address_line2 %}
{{ address.address_line2 }}<br />
{% endif %}
{% if address.locality or address.administrative_area or address.country_code or address.postal_code %}
{% if address.locality %}{{ address.locality }}{% if address.administrative_area %}, {% endif %}{% endif %}{% if address.administrative_area %}{{ address.administrative_area }}{% endif %}{% if address.country_code and (address.locality or address.administrative_area) %}, {% endif %}{% if address.country_code %}{{ address.country_code }}{% endif %}{% if address.postal_code and (address.locality or address.administrative_area or address.country_code) %}&nbsp; {% endif %}{% if address.postal_code %}{{ address.postal_code }}{% endif %}
{% endif %}
</div>
{% endif %}
{% if map %}
<div class="card__map">
<span class="uw-label">Location coordinates:</span>
{{ map }}
</div>
{% endif %}
{% if map_link %}
<div class="card__map-link">
<span class="uw-label"> Link to map:</span>
<a href="{{ map_link.uri }}">{{ map_link.uri }}</a>
</div>
{% endif %}
{% endblock %}
{% endembed %}
</div>
{% endif %}
{% if contact_for %}
<div class="card__contact-for">
{% embed '@components/details/details.twig' %}
......@@ -196,6 +284,28 @@
</div>
{% endif %}
{% if catalog_tags %}
<div class="card__catalog-tags">
{% embed '@components/details/details.twig' with {
'is_open': TRUE,
} %}
{% block details_summary %}
Additional Information
{% endblock %}
{% block details_content %}
{% for key, tag in catalog_tags %}
<div class="card__catalog-tags card__tags-{{ key }}">
<strong>{{ key }}:</strong><br />
{% include "@components/tag-list/tag-list.twig" with {
items: tag
} %}
</div>
{% endfor %}
{% endblock %}
{% endembed %}
{% endif %}
{% if tags %}
<div class="card__tags">
{% for tag in tags %}
......
......@@ -73,3 +73,6 @@ social_media:
- text: 'LinkedIn'
url: 'https://www.linkedin.com/edu/school?id=10875'
social_media_placement: 'card-footer'
hero:
img_element: '../../../../source/images/president/president_xlarge.jpg'
alt: 'Alternative hero text'
.uw-copy-text {
&__wrapper {
//padding: 1rem;
overflow: auto;
ul {
overflow: hidden;
}
.media {
&.align-left {
padding-right: 1rem;
}
&.align-center {
padding: 1rem 0;
text-align: center;
img{
display: block;
margin: 0 auto;
}
}
&.align-right {
padding-left: 1rem;
}
}
&__wrapper.uw-contained-width {
@include uw-contained-width;
padding: 1rem 0;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment