Skip to content

Commit

Permalink
2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bwskyA committed Dec 29, 2020
1 parent cf74e9a commit 360fc5c
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MDB5
Version: FREE 2.0.0
Version: FREE 2.1.0

Documentation:
https://mdbootstrap.com/docs/standard/
Expand Down
2 changes: 1 addition & 1 deletion css/mdb.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/mdb.min.css.map

Large diffs are not rendered by default.

21 changes: 19 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
height="150px"
width="150px"
/>
<h5 class="mb-3">Release suprise! 50% OFF MDB 5 PRO</h5>
<h5 class="mb-3">Release surprise! 50% OFF MDB 5 PRO</h5>

<p>
Use this coupon code before the next release to claim the reward.<br />Hurry up & don't
loose your chance.
</p>

<p>
<code class="text-uppercase h1 px-2 rounded bg-dark text-white">MB8XW23V</code>
</p>
Expand All @@ -44,15 +45,21 @@ <h5 class="mb-3">Release suprise! 50% OFF MDB 5 PRO</h5>
onclick="copy('MB8XW23V');toastr.info('Coupon code copied! Use it on the checkout.');"
target="_blank"
role="button"
id="code-button"
>CLAIM DISCOUNT</a
>

<a
class="btn btn-outline-primary btn-lg"
href="https://mdbootstrap.com/docs/standard/getting-started/"
target="_blank"
role="button"
>START TUTORIAL</a
>
<div class="my-2 alert alert-success" id="code-success" style="display: none;">
Copied
</div>
<p>See <a href="https://mdbootstrap.com/docs/standard/pro/">prices</a></p>
<h5 class="h1-responsive text-uppercase mt-3">
the code <span class="font-weight-bold"></span> expires in:<br />
<span class="font-weight-bold" id="time-counter"></span>
Expand All @@ -67,6 +74,16 @@ <h5 class="h1-responsive text-uppercase mt-3">
<script type="text/javascript" src="js/mdb.min.js"></script>
<!-- Custom scripts -->
<script type="text/javascript">
var button = document.getElementById('code-button');
button.onclick = function () {
var div = document.getElementById('code-success');
if (div.style.display !== 'none') {
div.style.display = 'none';
} else {
div.style.display = 'block';
}
};

function copy(text) {
var textarea = document.createElement('textarea');
textarea.value = text;
Expand All @@ -78,7 +95,7 @@ <h5 class="h1-responsive text-uppercase mt-3">

// Ad counter
// Set the date we're counting down to
var countDownDate = new Date(Date.UTC(2020, 09, 30, 10, 00, 00));
var countDownDate = new Date(Date.UTC(2020, 10, 17, 10, 00, 00));
var counterElement = document.getElementById('time-counter');

// Update the count down every 1 second
Expand Down
4 changes: 2 additions & 2 deletions js/mdb.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/mdb.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mdb-ui-kit",
"version": "2.0.0",
"version": "2.1.0",
"main": "js/mdb.min.js",
"repository": "https://github.com/mdbootstrap/mdb-ui-kit.git",
"author": "MDBootstrap",
Expand Down
5 changes: 2 additions & 3 deletions src/js/bootstrap/src/dom/manipulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ const Manipulator = {

offset(element) {
const rect = element.getBoundingClientRect();

return {
top: rect.top + document.body.scrollTop,
left: rect.left + document.body.scrollLeft,
top: rect.top + (document.body.scrollTop || document.documentElement.scrollTop),
left: rect.left + (document.body.scrollLeft || document.documentElement.scrollLeft),
};
},

Expand Down
12 changes: 10 additions & 2 deletions src/js/mdb/util/focusTrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import SelectorEngine from '../dom/selector-engine';
import { isVisible } from './index';

class FocusTrap {
constructor(element, options = {}) {
constructor(element, options = {}, toggler) {
this._element = element;
this._toggler = toggler;
this._event = options.event || 'blur';
this._condition = options.condition || (() => true);
this._selector =
Expand Down Expand Up @@ -31,6 +32,10 @@ class FocusTrap {
this._focusableElements.forEach((element) => {
element.removeEventListener(this._event, this.handler);
});

if (this._toggler) {
this._toggler.focus();
}
}

update() {
Expand All @@ -40,7 +45,10 @@ class FocusTrap {

_init() {
const handler = (e) => {
if (!this._firstElement || e.key !== 'Tab') return;
if (!this._firstElement || e.key !== 'Tab' || this._focusableElements.includes(e.target)) {
return;
}

e.preventDefault();
this._firstElement.focus();

Expand Down
2 changes: 2 additions & 0 deletions src/js/mdb/util/keycodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export const ENTER = 13;
export const SPACE = 32;
export const ESCAPE = 27;
export const TAB = 9;
export const BACKSPACE = 8;
export const DELETE = 46;
export const A = 65;
export const B = 66;
export const C = 67;
Expand Down
2 changes: 2 additions & 0 deletions src/scss/free/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ $box-shadow-3-strong: 0px 6px 11px 0px rgba(0, 0, 0, 0.25), 0px 7px 20px 3px rgb
$box-shadow-4-strong: 0px 6px 14px 0px rgba(0, 0, 0, 0.25), 0px 10px 30px 4px rgba(0, 0, 0, 0.2);
$box-shadow-5-strong: 0px 6px 20px 0px rgba(0, 0, 0, 0.25), 0px 12px 40px 5px rgba(0, 0, 0, 0.2);

$box-shadow-3-top: 0 -10px 20px 0 rgba(0, 0, 0, 0.05);

// scss-docs-start light-shadows-values
$shadows-light: (
'0': $box-shadow-0,
Expand Down

0 comments on commit 360fc5c

Please sign in to comment.