first commit

This commit is contained in:
2024-10-17 16:11:58 +08:00
commit b0e800da06
74 changed files with 5251 additions and 0 deletions

2
assets/built/screen.css Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
assets/built/source.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

63
assets/css/contact.css Normal file
View File

@@ -0,0 +1,63 @@
.contact-form {
background: linear-gradient(to bottom right, #F9B208, #E72E77); /* Gradient background */
padding: 30px;
border-radius: 16px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
max-width: 500px;
width: 100%;
text-align: left;
}
.form-row {
display: flex;
gap: 15px;
margin-bottom: 20px;
}
.form-field {
flex: 1;
}
.form-field label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: black;
}
.form-field input,
.form-field textarea {
width: 100%;
padding: 12px;
border: 2px solid #ddd;
border-radius: 8px;
font-size: 15px;
background-color: white; /* Field background */
color: black; /* Text color */
transition: border-color 0.3s;
}
.form-field input:focus,
.form-field textarea:focus {
outline: none;
border-color: #E72E77; /* Pink focus */
}
.form-field textarea {
height: 120px;
}
.submit-button {
display: block;
width: 100%;
padding: 12px;
background-color: #28a745; /* Green button color */
color: white;
border: none;
border-radius: 8px; /* Rounded corners */
font-size: 16px;
font-weight: bold; /* Bold text */
text-transform: uppercase; /* Full caps */
cursor: pointer;
transition: background-color 0.3s;
}
.submit-button:disabled {
background-color: #ddd;
cursor: not-allowed;
}
.submit-button:hover:not(:disabled) {
background-color: #218838; /* Darker green on hover */
}

74
assets/css/hero.css Normal file
View File

@@ -0,0 +1,74 @@
.hero {
position: relative;
width: 100%;
margin: 0 auto; /* Centering the hero section */
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 80px;
padding-bottom: 80px;
padding-left: 40px;
padding-right: 40px;
background: linear-gradient(to bottom right, #F9B208, #E72E77);
}
.hero-inner {
display: flex;
justify-content: space-between;
width: 100%;
}
.hero-content {
max-width: 50%;
text-align: center;
}
.hero-logo {
width: 150px;
margin: 0 auto 20px;
}
.hero-title {
font-size: 2.5rem;
color: white;
margin-bottom: 20px;
}
.hero-button {
background-color: white;
color: #E72E77;
padding: 15px 30px;
border: none;
border-radius: 5px;
font-size: 1.4rem;
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s;
text-transform: uppercase;
}
.hero-button:hover {
background-color: #F9B208;
}
.hero-screenshots {
display: flex;
gap: 20px;
}
.screenshot {
width: 150px;
height: 300px;
background-color: white;
border: 2px solid white;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
border-radius: 15px;
overflow: hidden;
}
.screenshot img {
width: 100%;
height: 100%;
object-fit: cover;
}

3335
assets/css/screen.css Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://drive.usercontent.google.com/download?id=1ZnC3HIninR6-smY1OryZrDWobuMoP2bo&export=download&authuser=0&confirm=t&uuid=fcc30c47-4e3c-44fa-b599-b2f0f36e606a&at=AN_67v3g121eQ3UuST_8Rf4eieJM:1728460853316

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://drive.usercontent.google.com/download?id=1me856DELB6JerhC5BnctMM6xKFgRGMpU&export=download&authuser=0&confirm=t&uuid=b8cd3847-558d-42ea-962f-8d1d49891ee1&at=AN_67v2B4Q15WVcuCijrjHCQNQj2:1728460828982

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

View File

@@ -0,0 +1 @@
<svg width="264" height="88" viewBox="0 0 264 88" xmlns="http://www.w3.org/2000/svg"><title>default-skin 2</title><g fill="none" fill-rule="evenodd"><g><path d="M67.002 59.5v3.768c-6.307.84-9.184 5.75-10.002 9.732 2.22-2.83 5.564-5.098 10.002-5.098V71.5L73 65.585 67.002 59.5z" id="Shape" fill="#fff"/><g fill="#fff"><path d="M13 29v-5h2v3h3v2h-5zM13 15h5v2h-3v3h-2v-5zM31 15v5h-2v-3h-3v-2h5zM31 29h-5v-2h3v-3h2v5z" id="Shape"/></g><g fill="#fff"><path d="M62 24v5h-2v-3h-3v-2h5zM62 20h-5v-2h3v-3h2v5zM70 20v-5h2v3h3v2h-5zM70 24h5v2h-3v3h-2v-5z"/></g><path d="M20.586 66l-5.656-5.656 1.414-1.414L22 64.586l5.656-5.656 1.414 1.414L23.414 66l5.656 5.656-1.414 1.414L22 67.414l-5.656 5.656-1.414-1.414L20.586 66z" fill="#fff"/><path d="M111.785 65.03L110 63.5l3-3.5h-10v-2h10l-3-3.5 1.785-1.468L117 59l-5.215 6.03z" fill="#fff"/><path d="M152.215 65.03L154 63.5l-3-3.5h10v-2h-10l3-3.5-1.785-1.468L147 59l5.215 6.03z" fill="#fff"/><g><path id="Rectangle-11" fill="#fff" d="M160.957 28.543l-3.25-3.25-1.413 1.414 3.25 3.25z"/><path d="M152.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" id="Oval-1" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M150 21h5v1h-5z"/></g><g><path d="M116.957 28.543l-1.414 1.414-3.25-3.25 1.414-1.414 3.25 3.25z" fill="#fff"/><path d="M108.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M106 21h5v1h-5z"/><path fill="#fff" d="M109.043 19.008l-.085 5-1-.017.085-5z"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/images/preloader.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

93
assets/js/dropdown.js Normal file
View File

@@ -0,0 +1,93 @@
function dropdown() {
const mediaQuery = window.matchMedia('(max-width: 767px)');
const head = document.querySelector('.gh-navigation');
const menu = head.querySelector('.gh-navigation-menu');
const nav = menu?.querySelector('.nav');
if (!nav) return;
const logo = document.querySelector('.gh-navigation-logo');
const navHTML = nav.innerHTML;
if (mediaQuery.matches) {
const items = nav.querySelectorAll('li');
items.forEach(function (item, index) {
item.style.transitionDelay = `${0.03 * (index + 1)}s`;
});
}
const makeDropdown = function () {
if (mediaQuery.matches) return;
const submenuItems = [];
while ((nav.offsetWidth + 64) > menu.offsetWidth) {
if (nav.lastElementChild) {
submenuItems.unshift(nav.lastElementChild);
nav.lastElementChild.remove();
} else {
break;
}
}
if (!submenuItems.length) {
head.classList.add('is-dropdown-loaded');
return;
}
const toggle = document.createElement('button');
toggle.setAttribute('class', 'gh-more-toggle gh-icon-button');
toggle.setAttribute('aria-label', 'More');
toggle.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor"><path d="M21.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM13.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM5.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0z"></path></svg>';
const wrapper = document.createElement('div');
wrapper.setAttribute('class', 'gh-dropdown');
if (submenuItems.length >= 10) {
head.classList.add('is-dropdown-mega');
wrapper.style.gridTemplateRows = `repeat(${Math.ceil(submenuItems.length / 2)}, 1fr)`;
} else {
head.classList.remove('is-dropdown-mega');
}
submenuItems.forEach(function (child) {
wrapper.appendChild(child);
});
toggle.appendChild(wrapper);
nav.appendChild(toggle);
const toggleRect = toggle.getBoundingClientRect();
const documentCenter = window.innerWidth / 2;
if (toggleRect.left < documentCenter) {
wrapper.classList.add('is-left');
}
head.classList.add('is-dropdown-loaded');
window.addEventListener('click', function (e) {
if (head.classList.contains('is-dropdown-open')) {
head.classList.remove('is-dropdown-open');
} else if (toggle.contains(e.target)) {
head.classList.add('is-dropdown-open');
}
});
}
imagesLoaded(logo, function () {
makeDropdown();
});
window.addEventListener('load', function () {
if (!logo) {
makeDropdown();
}
});
window.addEventListener('resize', function () {
setTimeout(() => {
nav.innerHTML = navHTML;
makeDropdown();
}, 1);
});
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
assets/js/lib/photoswipe.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
assets/js/lib/reframe.min.js vendored Normal file
View File

@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).reframe=t()}(this,function(){"use strict";function t(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var i=Array(e),o=0,t=0;t<n;t++)for(var r=arguments[t],f=0,d=r.length;f<d;f++,o++)i[o]=r[f];return i}return function(e,s){return void 0===s&&(s="js-reframe"),("string"==typeof e?t(document.querySelectorAll(e)):"length"in e?t(e):[e]).forEach(function(e){var t,n,i,o,r,f,d,l;-1!==e.className.split(" ").indexOf(s)||-1<e.style.width.indexOf("%")||(i=e.getAttribute("height")||e.offsetHeight,o=e.getAttribute("width")||e.offsetWidth,r=("string"==typeof i?parseInt(i):i)/("string"==typeof o?parseInt(o):o)*100,(f=document.createElement("div")).className=s,(d=f.style).position="relative",d.width="100%",d.paddingTop=r+"%",(l=e.style).position="absolute",l.width="100%",l.height="100%",l.left="0",l.top="0",null!==(t=e.parentNode)&&void 0!==t&&t.insertBefore(f,e),null!==(n=e.parentNode)&&void 0!==n&&n.removeChild(e),f.appendChild(e))})}});

103
assets/js/lightbox.js Normal file
View File

@@ -0,0 +1,103 @@
function lightbox(trigger) {
var onThumbnailsClick = function (e) {
e.preventDefault();
var items = [];
var index = 0;
var prevSibling = e.target.closest('.kg-card').previousElementSibling;
while (prevSibling && (prevSibling.classList.contains('kg-image-card') || prevSibling.classList.contains('kg-gallery-card'))) {
var prevItems = [];
prevSibling.querySelectorAll('img').forEach(function (item) {
prevItems.push({
src: item.getAttribute('src'),
msrc: item.getAttribute('src'),
w: item.getAttribute('width'),
h: item.getAttribute('height'),
el: item,
})
index += 1;
});
prevSibling = prevSibling.previousElementSibling;
items = prevItems.concat(items);
}
if (e.target.classList.contains('kg-image')) {
items.push({
src: e.target.getAttribute('src'),
msrc: e.target.getAttribute('src'),
w: e.target.getAttribute('width'),
h: e.target.getAttribute('height'),
el: e.target,
});
} else {
var reachedCurrentItem = false;
e.target.closest('.kg-gallery-card').querySelectorAll('img').forEach(function (item) {
items.push({
src: item.getAttribute('src'),
msrc: item.getAttribute('src'),
w: item.getAttribute('width'),
h: item.getAttribute('height'),
el: item,
});
if (!reachedCurrentItem && item !== e.target) {
index += 1;
} else {
reachedCurrentItem = true;
}
});
}
var nextSibling = e.target.closest('.kg-card').nextElementSibling;
while (nextSibling && (nextSibling.classList.contains('kg-image-card') || nextSibling.classList.contains('kg-gallery-card'))) {
nextSibling.querySelectorAll('img').forEach(function (item) {
items.push({
src: item.getAttribute('src'),
msrc: item.getAttribute('src'),
w: item.getAttribute('width'),
h: item.getAttribute('height'),
el: item,
})
});
nextSibling = nextSibling.nextElementSibling;
}
var pswpElement = document.querySelectorAll('.pswp')[0];
var options = {
bgOpacity: 0.9,
closeOnScroll: true,
fullscreenEl: false,
history: false,
index: index,
shareEl: false,
zoomEl: false,
getThumbBoundsFn: function(index) {
var thumbnail = items[index].el,
pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
rect = thumbnail.getBoundingClientRect();
return {x:rect.left, y:rect.top + pageYScroll, w:rect.width};
}
}
var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);
gallery.init();
return false;
};
var triggers = document.querySelectorAll(trigger);
triggers.forEach(function (trig) {
trig.addEventListener('click', function (e) {
onThumbnailsClick(e);
});
});
}

60
assets/js/main.js Normal file
View File

@@ -0,0 +1,60 @@
/* Mobile menu burger toggle */
(function () {
const navigation = document.querySelector('.gh-navigation');
const burger = navigation.querySelector('.gh-burger');
if (!burger) return;
burger.addEventListener('click', function () {
if (!navigation.classList.contains('is-open')) {
navigation.classList.add('is-open');
document.documentElement.style.overflowY = 'hidden';
} else {
navigation.classList.remove('is-open');
document.documentElement.style.overflowY = null;
}
});
})();
/* Add lightbox to gallery images */
(function () {
lightbox(
'.kg-image-card > .kg-image[width][height], .kg-gallery-image > img'
);
})();
/* Responsive video in post content */
(function () {
const sources = [
'.gh-content iframe[src*="youtube.com"]',
'.gh-content iframe[src*="youtube-nocookie.com"]',
'.gh-content iframe[src*="player.vimeo.com"]',
'.gh-content iframe[src*="kickstarter.com"][src*="video.html"]',
'.gh-content object',
'.gh-content embed',
];
reframe(document.querySelectorAll(sources.join(',')));
})();
/* Turn the main nav into dropdown menu when there are more than 5 menu items */
(function () {
dropdown();
})();
/* Infinite scroll pagination */
(function () {
if (!document.body.classList.contains('home-template') && !document.body.classList.contains('post-template')) {
pagination();
}
})();
/* Responsive HTML table */
(function () {
const tables = document.querySelectorAll('.gh-content > table:not(.gist table)');
tables.forEach(function (table) {
const wrapper = document.createElement('div');
wrapper.className = 'gh-table';
table.parentNode.insertBefore(wrapper, table);
wrapper.appendChild(table);
});
})();

95
assets/js/pagination.js Normal file
View File

@@ -0,0 +1,95 @@
function pagination(isInfinite = true, done, isMasonry = false) {
const feedElement = document.querySelector('.gh-feed');
if (!feedElement) return;
let loading = false;
const target = document.querySelector('.gh-footer');
const buttonElement = document.querySelector('.gh-loadmore');
if (!document.querySelector('link[rel=next]') && buttonElement) {
buttonElement.remove();
}
const loadNextPage = async function () {
const nextElement = document.querySelector('link[rel=next]');
if (!nextElement) return;
try {
const res = await fetch(nextElement.href);
const html = await res.text();
const parser = new DOMParser();
const doc = parser.parseFromString(html, 'text/html');
const postElements = doc.querySelectorAll('.gh-feed:not(.gh-featured):not(.gh-related) > *');
const fragment = document.createDocumentFragment();
const elems = [];
postElements.forEach(function (post) {
var clonedItem = document.importNode(post, true);
if (isMasonry) {
clonedItem.style.visibility = 'hidden';
}
fragment.appendChild(clonedItem);
elems.push(clonedItem);
});
feedElement.appendChild(fragment);
if (done) {
done(elems, loadNextWithCheck);
}
const resNextElement = doc.querySelector('link[rel=next]');
if (resNextElement && resNextElement.href) {
nextElement.href = resNextElement.href;
} else {
nextElement.remove();
if (buttonElement) {
buttonElement.remove();
}
}
} catch (e) {
nextElement.remove();
throw e;
}
};
const loadNextWithCheck = async function () {
if (target.getBoundingClientRect().top <= window.innerHeight && document.querySelector('link[rel=next]')) {
await loadNextPage();
}
}
const callback = async function (entries) {
if (loading) return;
loading = true;
if (entries[0].isIntersecting) {
// keep loading next page until target is out of the viewport or we've loaded the last page
if (!isMasonry) {
while (target.getBoundingClientRect().top <= window.innerHeight && document.querySelector('link[rel=next]')) {
await loadNextPage();
}
} else {
await loadNextPage();
}
}
loading = false;
if (!document.querySelector('link[rel=next]')) {
observer.disconnect();
}
};
const observer = new IntersectionObserver(callback);
if (isInfinite) {
observer.observe(target);
} else {
buttonElement.addEventListener('click', loadNextPage);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 KiB

View File

@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://drive.usercontent.google.com/download?id=1rETn5Be27W69BwP9dj8ML-3WFfvLBuw-&export=download&authuser=0&confirm=t&uuid=98972e54-7ea2-4e57-92b9-1c2d8bcc3a1e&at=AN_67v1ChZb7Wtpz3Hw4O_Rdo-km:1728461138796

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 KiB

View File

@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://drive.usercontent.google.com/download?id=1MtAc_I9TUymkXKMh41Nx208KBjKsqK21&export=download&authuser=0&confirm=t&uuid=cac5c1a0-7658-4532-afb2-b74efbfd45b4&at=AN_67v2qM12LBSDhg2T9tCA_ptoN:1728461140923

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://drive.usercontent.google.com/download?id=1mGoByZ4ZWw4QaclGCOdPTCHYHYsWxSYz&export=download&authuser=0&confirm=t&uuid=ff98dd99-0489-4e31-90c1-0d963e34095e&at=AN_67v2G42lRs8jP7qQB8gLgAJlm:1728461145677