make them expand into more info on click. the new info has a longer description, a…
- User
make them expand into more info on click. the new info has a longer description, a github link button, and a preview image scroller
code - Assistant
make them expand into more info on click. the new info has a longer description, a github link button, and a preview image scroller
<span class="material-symbols-rounded info-point-large-chevron">arrow_forward_ios</span>
</div>
<div class="info-point-group-large" onclick="openURL('https://github.com/Broco8Dev/VisionTab')" >
<div class="info-point-large">
<div class="hstack">
<img class="material-symbols-rounded info-point-large-icon" src="visiontab.png"></img>
<div class="vstack">
<h1>VisionTab</h1>
<h2 class="point-text">VisionOS NewTab for Chromium.</h2>
</div>
</div>
</div>
<span class="material-symbols-rounded info-point-large-chevron">arrow_forward_ios</span>
</div>
<div class="info-point-group-large" onclick="openURL('https://github.com/loyahdev/Flux-Archives')">
<div class="info-point-large">
<div class="hstack">
<img class="material-symbols-rounded info-point-large-icon" src="fluxicon.png"></img>
<div class="vstack">
<h1>Flux</h1>
<h2 class="point-text">(Deprecated) Precursor to Prism.</h2>
</div>
</div>
</div>
<span class="material-symbols-rounded info-point-large-chevron">arrow_forward_ios</span>
</div>
<div class="info-point-group-large" onclick="openURL('https://brocodev.itch.io/the-backrooms')">
<div class="info-point-large">
<div class="hstack">
<img class="material-symbols-rounded info-point-large-icon" src="backroomicon.png"></img>
<div class="vstack">
<h1>WTTB</h1>
<h2 class="point-text">Backrooms Horror Game Made In a Week.</h2>
</div>
</div>
</div>
<span class="material-symbols-rounded info-point-large-chevron">arrow_forward_ios</span>
</div>
<div class="info-point-group-large" onclick="openURL('https://brocodev.itch.io/wild-woods')">
<div class="info-point-large">
<div class="hstack">
<img class="material-symbols-rounded info-point-large-icon" src="wildwoodicon.png"></img>
<div class="vstack">
<h1>Wild Woods</h1>
<h2 class="point-text">Group Project for a Game Dev Class.</h2>
</div>
</div>
</div>
<span class="material-symbols-rounded info-point-large-chevron">arrow_forward_ios</span>
</div>
<div class="info-point-group-large" onclick="openURL('https://github.com/Broco8Dev/Unity3D-Multiplayer-Template')">
<div class="info-point-large">
<div class="hstack">
<span class="material-symbols-rounded info-point-icon">web</span>
<div class="vstack">
<h1>Unity Multiplayer</h1>
<h2 class="point-text">Super Unsecure Unity Multiplayer System.</h2>
</div>
</div>
</div>
<span class="material-symbols-rounded info-point-large-chevron">arrow_forward_ios</span>
</div>
</div>
<h2 style="margin-top: 15px; margin-bottom: 0;">Other Shitty Projects on Itch.io or GitHub</h2>
</div>
<h3 class="context-button" style="margin-top: 250px; font-size: 14px; z-index: 10001;" onclick="scrollToTop()">Back To Top</h3>
</div>
To achieve the desired functionality where each project expands to show more information on click, including a longer description, a GitHub link button, and a preview image scroller, we'll need to modify your HTML structure slightly and add some JavaScript and CSS for interactivity and styling.
Below is the updated code with explanations for each part:
<div class="info-points">
<h1>My Projects</h1>
<div class="gradient-border-bg"></div>
<div class="info-point-groups-large">
<!-- Project 1: Prism -->
<div class="info-point-group-large" onclick="toggleExpand(this)">
<div class="info-point-large">
<div class="hstack">
<img class="info-point-large-icon" src="prismicon.png" alt="Prism Icon">
<div class="vstack">
<h1>Prism</h1>
<h2 class="point-text">iOS 17+ Customization & Sideloading.</h2>
</div>
</div>
</div>
<span class="material-symbols-rounded info-point-large-chevron">arrow_forward_ios</span>
<!-- Expanded content -->
<div class="more-info">
<p>
<strong>Prism</strong> is a revolutionary tool for customizing and sideloading apps on iOS 17 and newer. It allows users to personalize their devices beyond the standard options provided by Apple.
</p>
<a href="https://github.com/Broco8Dev/Prism" class="github-link-button" target="_blank">View on GitHub</a>
<!-- Image scroller -->
<div class="image-scroller">
<img src="prism_screenshot1.png" alt="Prism Screenshot 1">
<img src="prism_screenshot2.png" alt="Prism Screenshot 2">
<!-- Add more images as needed -->
</div>
</div>
</div>
<!-- Repeat the above structure for each project -->
<!-- ... -->
</div>
<h2 style="margin-top: 15px; margin-bottom: 0;">Other Shitty Projects on Itch.io or GitHub</h2>
</div>
<h3 class="context-button" style="margin-top: 250px; font-size: 14px; z-index: 10001;" onclick="scrollToTop()">Back To Top</h3>
JavaScript Function to Toggle Expansion:
Add the following script to your HTML page, preferably at the bottom of the body or in a separate JS file:
<script>
function toggleExpand(element) {
element.classList.toggle('expanded');
}
</script>
CSS Styling:
You'll need to add CSS to handle the visibility of the .more-info section and style the expanded content. Here's an example:
/* Hide the expanded content by default */
.more-info {
display: none;
margin-top: 15px;
}
/* When the parent has the 'expanded' class, show the content */
.info-point-group-large.expanded .more-info {
display: block;
}
/* Rotate the chevron when expanded */
.info-point-group-large.expanded .info-point-large-chevron {
transform: rotate(90deg);
}
/* Styles for the GitHub link button */
.github-link-button {
display: inline-block;
margin-top: 10px;
padding: 8px 12px;
background-color: #24292e;
color: #ffffff;
text-decoration: none;
border-radius: 4px;
}
.github-link-button:hover {
background-color: #3a3f44;
}
/* Styles for the image scroller */
.image-scroller {
display: flex;
overflow-x: auto;
margin-top: 15px;
}
.image-scroller img {
max-height: 200px;
margin-right: 10px;
border-radius: 4px;
}
Explanation:
HTML Modifications:
onclick="openURL('...')" from the info-point-group-large elements.onclick="toggleExpand(this)" to each info-point-group-large to handle the expansion.div with the class more-info inside each info-point-group-large which contains the longer description, GitHub link button, and image scroller.more-info section is unique to the project and includes relevant information.JavaScript Function:
toggleExpand function toggles the expanded class on the clicked info-point-group-large element.expanded class is present, the CSS rules display the .more-info content and rotate the chevron.CSS Styling:
.more-info class is hidden by default using display: none;..info-point-group-large has the expanded class, the .more-info section is displayed using display: block;.Repeat for Other Projects:
You'll need to replicate the updated structure for each of your projects, ensuring that each has its own unique content within the .more-info section. Here's an example for the second project, VisionTab:
<!-- Project 2: VisionTab -->
<div class="info-point-group-large" onclick="toggleExpand(this)">
<div class="info-point-large">
<div class="hstack">
<img class="info-point-large-icon" src="visiontab.png" alt="VisionTab Icon">
<div class="vstack">
<h1>VisionTab</h1>
<h2 class="point-text">VisionOS NewTab for Chromium.</h2>
</div>
</div>
</div>
<span class="material-symbols-rounded info-point-large-chevron">arrow_forward_ios</span>
<!-- Expanded content -->
<div class="more-info">
<p>
<strong>VisionTab</strong> is a custom new tab page designed for Chromium browsers, inspired by VisionOS's sleek design. It enhances your browsing experience with a modern and intuitive interface.
</p>
<a href="https://github.com/Broco8Dev/VisionTab" class="github-link-button" target="_blank">View on GitHub</a>
<!-- Image scroller -->
<div class="image-scroller">
<img src="visiontab_screenshot1.png" alt="VisionTab Screenshot 1">
<img src="visiontab_screenshot2.png" alt="VisionTab Screenshot 2">
<!-- Add more images as needed -->
</div>
</div>
</div>
Repeat this structure for each project, replacing the content inside .more-info accordingly.
Additional Notes:
src) with the actual content related to your projects.Final Tips:
Consider adding smooth transitions when expanding and collapsing the content for a better user experience. You can do this by adding a transition to the .more-info class:
.more-info {
display: none;
margin-top: 15px;
opacity: 0;
transition: opacity 0.3s ease;
}
.info-point-group-large.expanded .more-info {
display: block;
opacity: 1;
}
If you run into any issues with specificity in CSS, you might need to adjust the selectors or add !important sparingly.
Keep accessibility in mind. If you expect users to navigate via keyboard or screen readers, you might want to use <button> elements or add ARIA attributes.
By implementing these changes, your project sections will now expand to reveal more information on click, providing users with an enriched experience on your portfolio page.
Not yet included in a published release.