Skip to content

Commit

Permalink
Release v1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Feb 28, 2022
1 parent 7d71c93 commit 11bac0b
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 37 deletions.
2 changes: 1 addition & 1 deletion dist/blogger-tweaks.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 dist/layouts/block-duo.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License */
/*! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License */

/*
Block Duo layout -- Two big columns followed by a single footer
Expand Down
2 changes: 1 addition & 1 deletion dist/layouts/color-blocks.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License */
/*! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License */

/*
Color Blocks layout -- Two columns of colorful blocks
Expand Down
2 changes: 1 addition & 1 deletion dist/layouts/color-slide.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License */
/*! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License */

/*
Color Slide layout -- Top to botttom color transition
Expand Down
2 changes: 1 addition & 1 deletion dist/layouts/letterbox.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License */
/*! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License */

/*
Letterbox layout -- Edge-to-edge semi-opaque bar over cover background image
Expand Down
2 changes: 1 addition & 1 deletion dist/layouts/modern.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License */
/*! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License */

/*
Modern layout -- Clean blog post page
Expand Down
2 changes: 1 addition & 1 deletion dist/layouts/neon.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License */
/*! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License */

/*
Neon layout -- For hackers and space junkies
Expand Down
2 changes: 1 addition & 1 deletion dist/layouts/neon.min.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
//! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License
//! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License
var numNeonImages=8;$("body").addClass("neon-image-"+(Date.now()%8+1));
2 changes: 1 addition & 1 deletion dist/layouts/vertical-bars.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License */
/*! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License */

/*
Vertical Bars layout -- traditional boring old-school webpage
Expand Down
2 changes: 1 addition & 1 deletion dist/layouts/zebra-sections.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License */
/*! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License */

/*
Zebra Sections layout -- Edge-to-edge blocks with alternating background colors
Expand Down
7 changes: 5 additions & 2 deletions dist/lib-x.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License
//! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License

declare global {
interface JQuery {
Expand All @@ -22,6 +22,9 @@ export declare type LibXUiPopupOptions = {
width?: number;
height?: number;
};
export declare type LibXUiKeepOnScreenOptions = {
padding?: number;
};
export declare type LibXCryptoHashOptions = {
algorithm?: string;
salt?: string;
Expand Down Expand Up @@ -54,7 +57,7 @@ declare const libX: {
popup(url: string, options?: LibXUiPopupOptions | undefined): Window | null;
popupClick(event: JQuery.EventBase): Window | null;
revealSection(event: JQuery.EventBase): JQuery;
keepOnScreen(elem: JQuery, padding?: number): JQuery;
keepOnScreen(elem: JQuery, options?: LibXUiKeepOnScreenOptions | undefined): JQuery;
autoDisableButtons(): void;
loadImageFadeIn(elem: JQuery, url: string, duration?: number | undefined): JQuery;
setupVideos(): JQuery;
Expand Down
31 changes: 21 additions & 10 deletions dist/lib-x.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License
//! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License

const libXUi = {
plugin: {
Expand Down Expand Up @@ -68,11 +68,21 @@ const libXUi = {
dna.ui.slideFadeOut(button);
return dna.ui.slideFadeIn(target);
},
keepOnScreen(elem, padding = 10) {
const gap = elem.offset().left;
const moveR = Math.max(-gap, -padding) + padding;
const moveL = Math.max(gap + elem.width() - $(window).width(), -padding) + padding;
return elem.css({ left: '+=' + (moveR - moveL) + 'px' });
keepOnScreen(elem, options) {
const defaults = { padding: 10 };
const settings = { ...defaults, ...options };
const pad = settings.padding;
const win = {
width: $(window).width(),
height: $(window).height(),
scroll: $(window).scrollTop(),
};
const offset = elem.offset();
const moveR = Math.max(-offset.left, -pad) + pad;
const moveL = Math.max(offset.left + elem.width() - win.width, -pad) + pad;
const moveU = Math.min(win.scroll + win.height - offset.top - elem.height() - pad, 0);
const moveD = Math.max(moveU, win.scroll - offset.top + pad);
return elem.css({ left: `+=${moveR - moveL}px`, top: `+=${moveD}px` });
},
autoDisableButtons() {
const disableButton = (event) => {
Expand All @@ -99,8 +109,9 @@ const libXUi = {
},
setupVideos() {
const makeVideoClickable = (elem) => {
const url = elem.find('iframe').attr('src');
elem.attr('data-href', url.replace('//www.youtube.com/embed', '//youtu.be'));
const src = elem.find('iframe').attr('src');
const url = src.replace('//www.youtube.com/embed', '//youtu.be');
elem.attr('data-href', url).addClass('external-site');
};
$('figure.video-container-link').forEach(makeVideoClickable);
return $('figure.video-container iframe').attr({ allow: 'fullscreen' }).parent();
Expand Down Expand Up @@ -224,7 +235,7 @@ const libXPopupImage = {
.append(libX.ui.makeIcons($('<i data-icon=times>')))
.append($('<img>').attr({ src: imageSrc }).css({ maxWidth: maxWidth }));
popup.insertAfter(thumbnail);
libX.ui.keepOnScreen(popup, 30).fadeTo('slow', 1);
libX.ui.keepOnScreen(popup, { padding: 30 }).fadeTo('slow', 1);
$(document).on({ [keyUpEventName]: escKeyClose });
},
};
Expand Down Expand Up @@ -324,7 +335,7 @@ const libXExtra = {
},
};
const libX = {
version: '1.5.0',
version: '1.5.1',
ui: libXUi,
util: libXUtil,
crypto: libXCrypto,
Expand Down
31 changes: 21 additions & 10 deletions dist/lib-x.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! web-ignition v1.5.0 ~~ https://github.com/center-key/web-ignition ~~ MIT License
//! web-ignition v1.5.1 ~~ https://github.com/center-key/web-ignition ~~ MIT License

import { dna } from 'dna.js';
const libXUi = {
Expand Down Expand Up @@ -69,11 +69,21 @@ const libXUi = {
dna.ui.slideFadeOut(button);
return dna.ui.slideFadeIn(target);
},
keepOnScreen(elem, padding = 10) {
const gap = elem.offset().left;
const moveR = Math.max(-gap, -padding) + padding;
const moveL = Math.max(gap + elem.width() - $(window).width(), -padding) + padding;
return elem.css({ left: '+=' + (moveR - moveL) + 'px' });
keepOnScreen(elem, options) {
const defaults = { padding: 10 };
const settings = { ...defaults, ...options };
const pad = settings.padding;
const win = {
width: $(window).width(),
height: $(window).height(),
scroll: $(window).scrollTop(),
};
const offset = elem.offset();
const moveR = Math.max(-offset.left, -pad) + pad;
const moveL = Math.max(offset.left + elem.width() - win.width, -pad) + pad;
const moveU = Math.min(win.scroll + win.height - offset.top - elem.height() - pad, 0);
const moveD = Math.max(moveU, win.scroll - offset.top + pad);
return elem.css({ left: `+=${moveR - moveL}px`, top: `+=${moveD}px` });
},
autoDisableButtons() {
const disableButton = (event) => {
Expand All @@ -100,8 +110,9 @@ const libXUi = {
},
setupVideos() {
const makeVideoClickable = (elem) => {
const url = elem.find('iframe').attr('src');
elem.attr('data-href', url.replace('//www.youtube.com/embed', '//youtu.be'));
const src = elem.find('iframe').attr('src');
const url = src.replace('//www.youtube.com/embed', '//youtu.be');
elem.attr('data-href', url).addClass('external-site');
};
$('figure.video-container-link').forEach(makeVideoClickable);
return $('figure.video-container iframe').attr({ allow: 'fullscreen' }).parent();
Expand Down Expand Up @@ -225,7 +236,7 @@ const libXPopupImage = {
.append(libX.ui.makeIcons($('<i data-icon=times>')))
.append($('<img>').attr({ src: imageSrc }).css({ maxWidth: maxWidth }));
popup.insertAfter(thumbnail);
libX.ui.keepOnScreen(popup, 30).fadeTo('slow', 1);
libX.ui.keepOnScreen(popup, { padding: 30 }).fadeTo('slow', 1);
$(document).on({ [keyUpEventName]: escKeyClose });
},
};
Expand Down Expand Up @@ -325,7 +336,7 @@ const libXExtra = {
},
};
const libX = {
version: '1.5.0',
version: '1.5.1',
ui: libXUi,
util: libXUtil,
crypto: libXCrypto,
Expand Down
Loading

0 comments on commit 11bac0b

Please sign in to comment.