Skip to content
Permalink
Browse files

Merge branch 'master' into test/cypress-start

  • Loading branch information
stp-ip committed Dec 4, 2019
2 parents 8ca0c0f + 4b4271b commit af8a0e9914770da9e9ee8a17a13f9d17d9c9af9d
Showing with 525 additions and 335 deletions.
  1. +31 −26 assets/js/modal.js
  2. +24 −0 assets/js/templates/modal.js
  3. +13 −1 assets/scripts/syna-main.js
  4. +1 −1 assets/styles/bootstrap/_badge.scss
  5. +2 −1 assets/styles/bootstrap/_breadcrumb.scss
  6. +1 −1 assets/styles/bootstrap/_button-group.scss
  7. +4 −2 assets/styles/bootstrap/_buttons.scss
  8. +17 −28 assets/styles/bootstrap/_card.scss
  9. +6 −6 assets/styles/bootstrap/_carousel.scss
  10. +2 −2 assets/styles/bootstrap/_close.scss
  11. +1 −1 assets/styles/bootstrap/_code.scss
  12. +22 −8 assets/styles/bootstrap/_custom-forms.scss
  13. +3 −3 assets/styles/bootstrap/_dropdown.scss
  14. +17 −9 assets/styles/bootstrap/_forms.scss
  15. +49 −1 assets/styles/bootstrap/_functions.scss
  16. +25 −8 assets/styles/bootstrap/_grid.scss
  17. +2 −2 assets/styles/bootstrap/_images.scss
  18. +2 −4 assets/styles/bootstrap/_input-group.scss
  19. +31 −22 assets/styles/bootstrap/_list-group.scss
  20. +3 −3 assets/styles/bootstrap/_mixins.scss
  21. +26 −16 assets/styles/bootstrap/_modal.scss
  22. +3 −3 assets/styles/bootstrap/_nav.scss
  23. +45 −15 assets/styles/bootstrap/_navbar.scss
  24. +2 −2 assets/styles/bootstrap/_pagination.scss
  25. +8 −9 assets/styles/bootstrap/_popover.scss
  26. +2 −2 assets/styles/bootstrap/_print.scss
  27. +5 −2 assets/styles/bootstrap/_progress.scss
  28. +14 −15 assets/styles/bootstrap/_reboot.scss
  29. +1 −0 assets/styles/bootstrap/_root.scss
  30. +3 −3 assets/styles/bootstrap/_tables.scss
  31. +2 −2 assets/styles/bootstrap/_type.scss
  32. +42 −22 assets/styles/bootstrap/_variables.scss
  33. +1 −1 assets/styles/bootstrap/bootstrap-grid.scss
  34. +1 −1 assets/styles/bootstrap/bootstrap-reboot.scss
  35. +1 −1 assets/styles/bootstrap/bootstrap.scss
  36. +3 −2 assets/styles/bootstrap/mixins/_background-variant.scss
  37. +1 −1 assets/styles/bootstrap/mixins/_badge.scss
  38. +5 −2 assets/styles/bootstrap/mixins/_buttons.scss
  39. +8 −8 assets/styles/bootstrap/mixins/_caret.scss
  40. +3 −3 assets/styles/bootstrap/mixins/_float.scss
  41. +32 −47 assets/styles/bootstrap/mixins/_forms.scss
  42. +8 −3 assets/styles/bootstrap/mixins/_grid-framework.scss
  43. +18 −0 assets/styles/bootstrap/mixins/_grid.scss
  44. +4 −4 assets/styles/bootstrap/mixins/_hover.scss
  45. +1 −1 assets/styles/bootstrap/mixins/_image.scss
  46. +1 −1 assets/styles/bootstrap/mixins/_list-group.scss
  47. +1 −1 assets/styles/bootstrap/mixins/_lists.scss
  48. +2 −1 assets/styles/bootstrap/mixins/_nav-divider.scss
  49. +1 −1 assets/styles/bootstrap/mixins/_reset-text.scss
  50. +3 −2 assets/styles/bootstrap/mixins/_screen-reader.scss
  51. +1 −1 assets/styles/bootstrap/mixins/_table-row.scss
  52. +3 −2 assets/styles/bootstrap/mixins/_text-emphasis.scss
  53. +1 −1 assets/styles/bootstrap/utilities/_background.scss
  54. +2 −2 assets/styles/bootstrap/utilities/_text.scss
  55. +5 −0 exampleSite/config-dev.toml
  56. +4 −4 exampleSite/resources/_gen/assets/scss/styles/index.scss_a4e369375f17bb89f2019364cbe7a830.content
  57. +1 −1 exampleSite/resources/_gen/assets/scss/styles/index.scss_a4e369375f17bb89f2019364cbe7a830.json
  58. +0 −20 layouts/_default/baseof.html
  59. +1 −1 package.json
  60. +4 −3 yarn.lock
@@ -1,33 +1,38 @@
import $ from './helpers/jq-helpers';
import ModalTemplate from './templates/modal';

const modal = $('.modal');
const dialog = $('.modal .modal-dialog');
$('body').append(ModalTemplate);

function closeDialog() {
$('body').removeClass('modal-open');
modal.removeClass('show');
}
setTimeout(() => {
const modal = $('.modal');
const dialog = $('.modal .modal-dialog');

$('[data-dismiss="modal"]').on('click', closeDialog);

modal.on('click', e => {
if (!dialog[0].contains(e.target)) {
closeDialog()
function closeDialog() {
$('body').removeClass('modal-open');
modal.removeClass('show');
}
});

(window.syna || (window.syna = {})).showModal = function({ title, subtitle, image, content, labels, size = '' }) {
$('body').addClass('modal-open');
modal.addClass('show');
dialog.$('.title').html(title || '');
dialog.$('.subtitle').html(subtitle || '');
dialog.$('.badge-container').html(labels || '');
dialog.$('img')[0].src = image;
if (content) {
dialog.$('.modal-body .content').html(content);
dialog.$('.modal-body .content').removeClass('hidden');
} else {
dialog.$('.modal-body .content').addClass('hidden');
$('[data-dismiss="modal"]').on('click', closeDialog);

modal.on('click', e => {
if (!dialog[0].contains(e.target)) {
closeDialog()
}
});

(window.syna || (window.syna = {})).showModal = function({ title, subtitle, image, content, labels, size = '' }) {
$('body').addClass('modal-open');
modal.addClass('show');
dialog.$('.title').html(title || '');
dialog.$('.subtitle').html(subtitle || '');
dialog.$('.badge-container').html(labels || '');
dialog.$('img')[0].src = image;
if (content) {
dialog.$('.modal-body .content').html(content);
dialog.$('.modal-body .content').removeClass('hidden');
} else {
dialog.$('.modal-body .content').addClass('hidden');
}
dialog.removeClass('md').removeClass('lg').addClass(size);
}
dialog.removeClass('md').removeClass('lg').addClass(size);
}
}, 0);
@@ -0,0 +1,24 @@
const ModalTemplate = `
<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header row mx-0">
<div class="modal-title col px-0">
<h5 class="title text-dark"></h5>
<h6 class="subtitle text-secondary"></h6>
</div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<img src="" alt="" class="img-fluid">
<div class="modal-body p-3">
<div class="badge-container"></div>
<div class="content"></div>
</div>
</div>
</div>
</div>
`;

export default ModalTemplate;

Some generated files are not rendered by default. Learn more.

@@ -16,7 +16,7 @@
@include transition($badge-transition);

@at-root a#{&} {
@include hover-focus {
@include hover-focus() {
text-decoration: none;
}
}
@@ -3,6 +3,7 @@
flex-wrap: wrap;
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
margin-bottom: $breadcrumb-margin-bottom;
@include font-size($breadcrumb-font-size);
list-style: none;
background-color: $breadcrumb-bg;
@include border-radius($breadcrumb-border-radius);
@@ -17,7 +18,7 @@
display: inline-block; // Suppress underlining of the separator in modern browsers
padding-right: $breadcrumb-item-padding;
color: $breadcrumb-divider-color;
content: $breadcrumb-divider;
content: escape-svg($breadcrumb-divider);
}
}

@@ -13,7 +13,7 @@

// Bring the hover, focused, and "active" buttons to the front to overlay
// the borders properly
@include hover {
@include hover() {
z-index: 1;
}
&:focus,
@@ -10,14 +10,16 @@
font-weight: $btn-font-weight;
color: $body-color;
text-align: center;
white-space: $btn-white-space;
vertical-align: middle;
cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
user-select: none;
background-color: transparent;
border: $btn-border-width solid transparent;
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
@include transition($btn-transition);

@include hover {
@include hover() {
color: $body-color;
text-decoration: none;
}
@@ -79,7 +81,7 @@ fieldset:disabled a.btn {
color: $link-color;
text-decoration: $link-decoration;

@include hover {
@include hover() {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
}
@@ -7,6 +7,7 @@
display: flex;
flex-direction: column;
min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
height: $card-height;
word-wrap: break-word;
background-color: $card-bg;
background-clip: border-box;
@@ -35,6 +36,9 @@
// Enable `flex-grow: 1` for decks and groups so that card blocks take up
// as much space as possible, ensuring footers are aligned to the bottom.
flex: 1 1 auto;
// Workaround for the image size bug in IE
// See: https://github.com/twbs/bootstrap/pull/28855
min-height: 1px;
padding: $card-spacer-x;
color: $card-color;
}
@@ -53,7 +57,7 @@
}

.card-link {
@include hover {
@include hover() {
text-decoration: none;
}

@@ -121,43 +125,40 @@
padding: $card-img-overlay-padding;
}

.card-img {
.card-img,
.card-img-top,
.card-img-bottom {
flex-shrink: 0; // For IE: https://github.com/twbs/bootstrap/issues/29396
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
@include border-radius($card-inner-border-radius);
}

// Card image caps
.card-img,
.card-img-top {
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
@include border-top-radius($card-inner-border-radius);
}

.card-img,
.card-img-bottom {
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
@include border-bottom-radius($card-inner-border-radius);
}


// Card deck

.card-deck {
display: flex;
flex-direction: column;

.card {
margin-bottom: $card-deck-margin;
}

@include media-breakpoint-up(sm) {
display: flex;
flex-flow: row wrap;
margin-right: -$card-deck-margin;
margin-left: -$card-deck-margin;

.card {
display: flex;
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
flex: 1 0 0%;
flex-direction: column;
margin-right: $card-deck-margin;
margin-bottom: 0; // Override the default
margin-left: $card-deck-margin;
@@ -171,16 +172,14 @@
//

.card-group {
display: flex;
flex-direction: column;

// The child selector allows nested `.card` within `.card-group`
// to display properly.
> .card {
margin-bottom: $card-group-margin;
}

@include media-breakpoint-up(sm) {
display: flex;
flex-flow: row wrap;
// The child selector allows nested `.card` within `.card-group`
// to display properly.
@@ -262,27 +261,17 @@
> .card {
overflow: hidden;

&:not(:first-of-type) {
.card-header:first-child {
@include border-radius(0);
}

&:not(:last-of-type) {
border-bottom: 0;
@include border-radius(0);
}
}

&:first-of-type {
&:not(:last-of-type) {
border-bottom: 0;
@include border-bottom-radius(0);
}

&:last-of-type {
&:not(:first-of-type) {
@include border-top-radius(0);
}

.card-header {
> .card-header {
@include border-radius(0);
margin-bottom: -$card-border-width;
}
}
@@ -75,7 +75,7 @@
.active.carousel-item-right {
z-index: 0;
opacity: 0;
@include transition(0s $carousel-transition-duration opacity);
@include transition(opacity 0s $carousel-transition-duration);
}
}

@@ -101,7 +101,7 @@
@include transition($carousel-control-transition);

// Hover/focus state
@include hover-focus {
@include hover-focus() {
color: $carousel-control-color;
text-decoration: none;
outline: 0;
@@ -111,13 +111,13 @@
.carousel-control-prev {
left: 0;
@if $enable-gradients {
background: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
}
}
.carousel-control-next {
right: 0;
@if $enable-gradients {
background: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
}
}

@@ -130,10 +130,10 @@
background: no-repeat 50% / 100% 100%;
}
.carousel-control-prev-icon {
background-image: $carousel-control-prev-icon-bg;
background-image: escape-svg($carousel-control-prev-icon-bg);
}
.carousel-control-next-icon {
background-image: $carousel-control-next-icon-bg;
background-image: escape-svg($carousel-control-next-icon-bg);
}


@@ -8,13 +8,13 @@
opacity: .5;

// Override <a>'s hover style
@include hover {
@include hover() {
color: $close-color;
text-decoration: none;
}

&:not(:disabled):not(.disabled) {
@include hover-focus {
@include hover-focus() {
opacity: .75;
}
}
@@ -2,7 +2,7 @@
code {
@include font-size($code-font-size);
color: $code-color;
word-break: break-word;
word-wrap: break-word;

// Streamline the style when inside anchors to avoid broken underline and more
a > & {

0 comments on commit af8a0e9

Please sign in to comment.
You can’t perform that action at this time.