Skip to content

Commit 451752e

Browse files
committed
Update index.html
1 parent e56f381 commit 451752e

1 file changed

Lines changed: 91 additions & 15 deletions

File tree

index.html

Lines changed: 91 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,35 @@
3636
max-width: 42rem;
3737
margin-left: auto;
3838
margin-right: auto;
39-
padding-left: 2rem; /* Consistent horizontal padding */
40-
padding-right: 2rem; /* Consistent horizontal padding */
4139
background-color: transparent; /* Ensure main/header bg is transparent */
4240
}
4341
header {
44-
padding-top: 2rem; /* Vertical padding only */
45-
padding-bottom: 2rem; /* Vertical padding only */
42+
padding: 2rem; /* Vertical padding only */
4643
/* max-width, horizontal margins/padding moved to combined rule */
4744
}
4845
main {
4946
padding-top: 0.1rem; /* Prevent margin collapse with h2 */
50-
padding-bottom: 2rem;
47+
padding-bottom: 2rem;
5148
/* max-width, horizontal margins/padding moved to combined rule */
5249
}
5350

5451
main h2 {
5552
/* Remove horizontal margin */
56-
margin: 2.5rem 0 1rem 0;
53+
text-align: left;
54+
padding: 2.5rem 0 1rem 0;
5755
/* Keep top/bottom margin and border */
5856
}
5957

6058
#tag-filters {
6159
/* Remove horizontal margin */
62-
margin: 0 0 1.5rem 0;
60+
padding: 0 0 1.5rem 0;
6361
/* Keep bottom margin and border */
6462
}
6563

6664
footer {
6765
/* Full width background */
6866
background-color: #f4f4f4;
69-
padding-top: 2rem; /* Vertical padding on outer container */
70-
padding-bottom: 2rem; /* Vertical padding on outer container */
67+
padding: 2rem; /* Vertical padding on outer container */
7168
/* Remove max-width, horizontal margins/padding */
7269
border-top: 1px solid #eee; /* Keep top border */
7370
color: #555;
@@ -173,6 +170,11 @@
173170
text-decoration: none; /* Or underline if preferred */
174171
}
175172
/* --- Tag Filter & Other Button Styling (Ensure they don't get link hover) --- */
173+
#tag-filters {
174+
padding-left: 2rem;
175+
padding-right: 2rem;
176+
}
177+
176178
#tag-filters button:hover,
177179
#tag-filters button.clear-button:hover {
178180
/* These already have specific hover styles, ensure they are kept */
@@ -221,10 +223,12 @@
221223
grid-template-columns: 1fr; /* Single column for a cleaner list */
222224
gap: 1rem; /* 24px */
223225
margin-top: 0;
226+
padding-left: 1rem;
227+
padding-right: 1rem;
224228
}
225229
.repo-card {
226230
border: none;
227-
margin: 0 0 2rem 0; /* Add bottom margin for spacing */
231+
margin: 0 1rem 2rem 1rem; /* Add bottom margin for spacing */
228232
background-color: transparent;
229233
transition: background-color 0.3s ease; /* Keep hover transition */
230234
overflow: visible;
@@ -315,6 +319,14 @@
315319
/* color: #0056b3; */
316320
/* Hover state now only triggers JS text swap */
317321
}
322+
323+
/* Mobile-specific styling for vibe-coding-trigger */
324+
@media (max-width: 42rem) {
325+
#vibe-coding-trigger {
326+
cursor: pointer;
327+
position: relative;
328+
}
329+
}
318330
/* -------------------------- */
319331

320332
/* --- Revealing Word Span Styling --- */
@@ -385,6 +397,38 @@
385397
margin-top: 1rem; /* Space above disclaimer */
386398
line-height: 1.4; /* Adjust line height for smaller font */
387399
}
400+
401+
/* Mobile Breakpoint */
402+
@media (max-width: 42rem) {
403+
header, main, footer > .footer-content {
404+
padding-left: 2rem;
405+
padding-right: 2rem;
406+
}
407+
408+
footer > .footer-content {
409+
padding-left: 0;
410+
padding-right: 0;
411+
}
412+
413+
main h2 {
414+
padding: 1.5rem 0 0.75rem 0;
415+
}
416+
417+
#tag-filters {
418+
padding-left: 2rem;
419+
padding-right: 2rem;
420+
}
421+
422+
.repo-card {
423+
margin: 0 0.5rem 1.5rem 0.5rem;
424+
}
425+
426+
.content-section {
427+
padding-left: 2rem;
428+
padding-right: 2rem;
429+
}
430+
431+
}
388432
</style>
389433
</head>
390434
<body>
@@ -467,6 +511,7 @@ <h4>Contact</h4>
467511
const addonRepos = [
468512
{ user: 'chanulee', repo: 'coreOllama' },
469513
{ user: 'chanulee', repo: 'VisionOSC' },
514+
{ user: 'chanulee', repo: 'simpleThesis-typst' },
470515
// Add more { user: 'username', repo: 'reponame' } objects here
471516
];
472517
// -----------------------------------------
@@ -676,11 +721,12 @@ <h3><a href="${repo.html_url}" target="_blank" rel="noopener noreferrer">${repo.
676721
});
677722
}
678723

679-
// --- Vibe Coding Text Hover Functionality ---
724+
// --- Vibe Coding Text Hover/Touch Functionality ---
680725
const vibeParagraph = document.getElementById('vibe-coding-paragraph');
681726
const vibeSpan = document.getElementById('vibe-coding-trigger'); // The container span
682727
let intervalId = null;
683728
const wordRevealSpeed = 100; // Milliseconds between STARTING each word reveal
729+
let isMobile = window.matchMedia('(max-width: 42rem)').matches;
684730

685731
if (vibeParagraph && vibeSpan) {
686732
const originalText = vibeSpan.dataset.originalText;
@@ -690,7 +736,7 @@ <h3><a href="${repo.html_url}" target="_blank" rel="noopener noreferrer">${repo.
690736
// Store the original content (might just be text) to reset easily
691737
vibeSpan.dataset.originalContent = vibeSpan.innerHTML;
692738

693-
vibeParagraph.addEventListener('mouseenter', () => {
739+
function startAnimation() {
694740
if (intervalId) {
695741
clearInterval(intervalId);
696742
intervalId = null;
@@ -716,7 +762,6 @@ <h3><a href="${repo.html_url}" target="_blank" rel="noopener noreferrer">${repo.
716762
vibeSpan.appendChild(wordSpan);
717763

718764
// Trigger the transition shortly after appending
719-
// Use requestAnimationFrame for better timing before paint
720765
requestAnimationFrame(() => {
721766
requestAnimationFrame(() => { // Double RAF for robustness
722767
wordSpan.classList.add('word-visible');
@@ -730,15 +775,46 @@ <h3><a href="${repo.html_url}" target="_blank" rel="noopener noreferrer">${repo.
730775
}
731776
}, wordRevealSpeed);
732777
}
733-
});
778+
}
734779

735-
vibeParagraph.addEventListener('mouseleave', () => {
780+
function resetAnimation() {
736781
if (intervalId) {
737782
clearInterval(intervalId);
738783
intervalId = null;
739784
}
740785
// Restore original content using the stored value
741786
vibeSpan.innerHTML = vibeSpan.dataset.originalContent;
787+
}
788+
789+
// Handle hover events for desktop
790+
if (!isMobile) {
791+
vibeParagraph.addEventListener('mouseenter', startAnimation);
792+
vibeParagraph.addEventListener('mouseleave', resetAnimation);
793+
}
794+
795+
// Handle touch/click events for mobile
796+
vibeParagraph.addEventListener('click', (e) => {
797+
if (isMobile) {
798+
e.preventDefault();
799+
if (intervalId) {
800+
resetAnimation();
801+
} else {
802+
startAnimation();
803+
}
804+
}
805+
});
806+
807+
// Update mobile state on resize
808+
window.addEventListener('resize', () => {
809+
isMobile = window.matchMedia('(max-width: 42rem)').matches;
810+
// Remove all event listeners
811+
vibeParagraph.removeEventListener('mouseenter', startAnimation);
812+
vibeParagraph.removeEventListener('mouseleave', resetAnimation);
813+
// Re-add appropriate event listeners based on new state
814+
if (!isMobile) {
815+
vibeParagraph.addEventListener('mouseenter', startAnimation);
816+
vibeParagraph.addEventListener('mouseleave', resetAnimation);
817+
}
742818
});
743819
}
744820
</script>

0 commit comments

Comments
 (0)