Skip to content

Commit

Permalink
Deploy to GitHub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
hesolar committed Oct 31, 2024
0 parents commit 1167f5d
Show file tree
Hide file tree
Showing 394 changed files with 548,493 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
12,069 changes: 12,069 additions & 0 deletions CV.styles.css

Large diffs are not rendered by default.

4,200 changes: 4,200 additions & 0 deletions _content/Blazorise.Bootstrap/blazorise.bootstrap.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions _content/Blazorise.Bootstrap/blazorise.bootstrap.min.css

Large diffs are not rendered by default.

119 changes: 119 additions & 0 deletions _content/Blazorise.Bootstrap/modal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
import { addClassToBody, removeClassFromBody } from "../Blazorise/utilities.js?v=1.4.2.0";

export function open(element, scrollToTop) {
adjustDialogDimensionsBeforeShow(element);

var modals = Number(document.body.getAttribute("data-modals") || "0");

if (modals === 0) {
addClassToBody("modal-open");
}

modals += 1;

document.body.setAttribute("data-modals", modals.toString());

if (scrollToTop) {
const modalBody = element.querySelector('.modal-body');

if (modalBody) {
modalBody.scrollTop = 0;
}
}
}

export function close(element) {
var modals = Number(document.body.getAttribute("data-modals") || "0");

modals -= 1;

if (modals < 0) {
modals = 0;
}

if (modals === 0) {
removeClassFromBody("modal-open");
}

document.body.setAttribute("data-modals", modals.toString());

resetAdjustments(element);
}

export function adjustDialogDimensionsBeforeShow(element) {
if (element) {
const rect = document.body.getBoundingClientRect();
const isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
const scrollbarWidth = getScrollBarWidth();

if (isBodyOverflowing) {
const fixedContent = [].slice.call(document.querySelectorAll('.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'));
const stickyContent = [].slice.call(document.querySelectorAll('.sticky-top'));

// Adjust fixed content padding
if (fixedContent) {
fixedContent.forEach((fixedContentElement) => {
const calculatedPadding = fixedContentElement.style.paddingRight;

fixedContentElement.style.paddingRight = `${parseFloat(calculatedPadding) + scrollbarWidth}px`;
});
}

// Adjust sticky content margin
if (stickyContent) {
stickyContent.forEach((stickyContentElement) => {
const calculatedMargin = stickyContentElement.style.marginRight;

stickyContentElement.style.marginRight = `${parseFloat(calculatedMargin) - scrollbarWidth}px`;
});
}

// Adjust body padding
const calculatedPadding = document.body.style.paddingRight;

document.body.style.paddingRight = `${calculatedPadding + scrollbarWidth}px`;
}

const isModalOverflowing = element.scrollHeight > document.documentElement.clientHeight;

if (!isBodyOverflowing && isModalOverflowing) {
element.style.paddingLeft = `${scrollbarWidth}px`;
}

if (isBodyOverflowing && !isModalOverflowing) {
element.style.paddingRight = `${scrollbarWidth}px`;
}
}
}
export function resetAdjustments(element) {
// Restore element padding
if (element && element.style) {
element.style.paddingLeft = ''
element.style.paddingRight = '';
}

const fixedContent = [].slice.call(document.querySelectorAll('.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'));
const stickyContent = [].slice.call(document.querySelectorAll('.sticky-top'));

// Restore fixed content padding
if (fixedContent) {
fixedContent.forEach((fixedContentElement) => {
fixedContentElement.style.paddingRight = '';
});
}

// Restore sticky content
if (stickyContent) {
stickyContent.forEach((stickyContentElement) => {
stickyContentElement.style.marginRight = '';
});
}

// Restore body padding
document.body.style.paddingRight = '';
}

export function getScrollBarWidth() {
const documentWidth = document.documentElement.clientWidth;
return Math.abs(window.innerWidth - documentWidth);
}
11 changes: 11 additions & 0 deletions _content/Blazorise.Bootstrap/tooltip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { initialize as baseInitialize, destroy, updateContent } from "../Blazorise/tooltip.js?v=1.4.2.0";

export function initialize(element, elementId, options) {
baseInitialize(element, elementId, options);

if (options.autodetectInline && element && element.querySelector(".custom-control-input,.btn")) {
element.classList.add("b-tooltip-inline");
}
}

export { destroy, updateContent };
Loading

0 comments on commit 1167f5d

Please sign in to comment.