#css loader
Explore tagged Tumblr posts
divinector · 5 months ago
Text
Tumblr media
Animated Loading Bar
5 notes · View notes
codenewbies · 4 months ago
Text
Tumblr media
Flipping Text CSS Loader
4 notes · View notes
codingflicks · 3 months ago
Text
Tumblr media
CSS Loader
3 notes · View notes
techwrath · 25 days ago
Text
1 note · View note
newcodesociety · 1 year ago
Text
0 notes
utopicwork · 14 days ago
Text
Latest work on the editor:
Pure css loader that displays while the SAP is loading so the user doesnt have to wait on a blank screen
Loading the filesystem into a nested dictionary for the file browser for proper hierarchy
Recursive jinja2 templating for the file browser that can handle the nested dictionary representation of the filesystem
9 notes · View notes
umbrapets · 25 days ago
Text
I am sooo close to a working wardrobe system right now! Ignore the css, it's horrid, I'll fix it!
You might have the impression that the wardrobe system has been here a while, and technically that is true, the pets have been made up of a bunch of different parts, but the distance between a working pet loader and a working inventory and dressup system is still something! I was also sick for the majority of March, got that bug that's going around. Leaving the wardrobe system to pretty much be a month overdue..good thing I only have to answer to me!
I have had a talk with me about this and told me that it's important to rest during illness and while we'd love to get some features out I shouldn't feel too bad about it ;)
5 notes · View notes
snugglesquiggle · 4 days ago
Text
my neocities site used to have a bunch of javascript.
for example, i had a page that existed to load up chapters of various stories so that you could read all of the chapters in one page, sort of like ao3's view full work feature. because it was scripted dynamically, i didn't have to maintain a separate copy of the text, and it was actually more flexible than what ao3 offers, because you could read specific arcs, heck, you could read a specific sequence of chapters (e.g., 2-13 specifically)
another thing i didn't want to maintain by hand was header at the top of the page with navigational links, so i had a script that updates them on page load.
problem is, it kind of just feels bad to load a page, then see a visible delay before the header pops in.
i spent almost a year living like that, but i eventually stopped maintaining my html by hand, and learned the joys of the static site generator.
i didn't need the chapter loader anymore, either - i could code my site generator to concatenate chapters into a full-text page, and since it's static, it'd load much faster than make the user's browser stitch together the html every time they want to open that page.
slowly but surely, everything i might've used js for was getting replaced by simpler, faster, and easier means.
i don't make much use of it, but my site actually has discord-style spoiler text. blocks of text you can click to reveal (and the css is uses currentColor, so it works even on different themes)
Tumblr media Tumblr media
i don't even need javascript for this; the way i accomplish it is a bit clever:
Tumblr media
it's a checkbox! even if you hide the actual box, you can still click the label to toggle its state
this was something i implemented early, based on this blog post where a similar trick was used for a no-js dark/light mode toggle.
but i took this to a new height this year: i added fancy footnotes
Tumblr media
but under the hood, it's the same principle
Tumblr media
check box to toggle the state, then some fancy css it position it to float above the text.
but of course, if i'm doing all of this without javascript, what do i need javascript for?
and there was only one feature that stuck around. it's something that i think no one really used, but i'm attached to it.
you see, i'm notorious for writing long chapters. i could split them up, but i have particular stopping points in mind. still, i am merciful, so in my stories with consistently long chapters, i'm gone out of my way to insert break points, "subchapters" seamless into the main text.
Tumblr media
those little roman numerals would trigger a script that reformatted the page to hide all the other subchapters, and reconfiguring the next/prev buttons so that clicking them takes you to the next section rather than the next chapter
in theory, you could read Hostile Takeover as if it were a fic with 72 chapters instead of 16.
now, this is a very complex feature. you cant use checkbox tricks to emulate this, unless you want to go crazy writing a dozen css rules for every permutation of checkboxes, or force the user to figure out an arcane system where you need to uncheck one section before loading the next
but it turns out, while i wasn't paying attention, the css committee added a crazy new feature. there are :has selectors, enabling you to style elements based on the properties of elements that come below it in the document.
the whole game has changed now.
couple this with learning about :target selectors courtesy of wonder how a couple of really ambitious ao3 fics do their magic, i had everything i need
all it took to make subchapters happen now a few simple rules
Tumblr media
really, you only need that first line. it says "if main has a target element, hide all subchapters that aren't the target"
the other lines are convenience; they had the next/prev chapter buttons if you're in the middle of the chapter. there's a couple other rules (beside the subchap nav i added a button that takes you to the top of the page, which resets the anchor target), but overall, it was quick and painless. really, the actual struggle was teaching my site generator spit out the right html. (i spent five minutes tearing out my hair and rebuilding to no effect because i forgot i had two layers of caching. whoops)
this new approach does sacrifice the ability to make the arrow buttons do double duty, but i don't think it's a big loss when the subchapter buttons are right there, and arguably retaining the single function of each button is a win for usability.
the biggest loss is that there's no real way to style the buttons differently if they've been clicked, so you don't actually know which subchapter you're actually browsing.
(maybe if anyone i actually uses this feature, they can complain to me and i'll whip up a quick bit of js to patch it :v)
but until then, i'll take some satisfaction in delete my site's scripts entirely. in a way, that's the biggest loss, but it's one of i'm proud of
2 notes · View notes
fujowebdev · 6 months ago
Text
Stream in a hour! (....well, 40 minutes)
Come work with @essential-randomness on the second step of her "roadmap to getting a (tech consulting) job": getting her projects page updated and spruced up like job searching demands.
[Twitch link]
This edition may include:
CSS updates via client-side JavaScript
Making more Astro loaders
What will it be? Come find out with her. She doesn't know yet.
See the current page!
5 notes · View notes
cssscriptcom · 1 year ago
Text
Highly Customizable Skeleton Loader In Pure CSS - Skeleton Mammoth
Skeleton Mammoth is a CSS library for creating customizable skeleton loaders to provide a visual placeholder while the content loads. You can use the library to simulate text blocks, images, inputs, buttons, cards, and more on your page. Ideal for listing pages, profiles, dashboard views, e-commerce products, search results, etc. How to use it: 1. Download and import the Skeleton Mammoth’s…
Tumblr media
View On WordPress
3 notes · View notes
freefrontend-blog · 1 year ago
Text
Bicycle Preloader: https://codepen.io/jkantner/pen/XWPbNNE More CSS loaders: https://freefrontend.com/css-loaders/
4 notes · View notes
divinector · 3 months ago
Text
Tumblr media
CSS Loading Animation
4 notes · View notes
codingflicks · 1 year ago
Text
Tumblr media
Preloader Animation CSS
0 notes
gleitzman · 29 days ago
Text
Yet Another Age Verification Pop-up for Squarespace
I wanted to add an Age Gate / Age Verification pop-up for Squarespace. The top search engine result had some code, but it A) didn't work B) didn't look very good and C) didn't have any functionality for tracking cookies. Instead, use this code:
Tumblr media
First, put this into the injected code in the Header
<!-- Age Verification Pop-up HTML --> <div id="age-verification-popup"> <div class="popup-content"> <h2>ARE YOU 21+?</h2> <div class="image-circle-container" style="margin-bottom: 24px;"> <img src="https://images.squarespace-cdn.com/content/6788837817ec6330feff09fe/a0416e38-e21f-4f14-88b3-0a8c8589e435/lambi_lamb_black.png" alt="LAMBI" class="centered-image" fetchpriority="high" loading="eager" decoding="async" data-loader="raw"> </div> <div class="button-container"> <button id="verify-button-yes">YES</button> <button id="verify-button-no">NO</button> </div> <p class="disclaimer"> You must be of legal drinking age in<br> your respective country for entry.<br><br> We encourage drinking responsibly! </p> </div> </div>
Next, inject this CSS:
/* Style for Age Verification Pop-up */ #age-verification-popup { display: none; /* Initially hidden, JS will show it if needed */ position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black overlay */ z-index: 9999; font-family: Arial, sans-serif; /* Or choose a font that matches */ } .popup-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #fff; /* White background */ padding: 40px 30px; /* Adjust padding as needed */ text-align: center; border: 1px solid #ccc; /* Optional: adds a light border */ min-width: 300px; /* Minimum width */ box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Optional subtle shadow */ } /* Optional logo styling */ /* .popup-logo { max-width: 80px; margin-bottom: 20px; } */ .popup-content h2 { font-size: 1.2em; /* Adjust size as needed */ margin-top: 0; margin-bottom: 25px; font-weight: bold; line-height: 1.4; color: #000; /* Black text */ } .button-container { margin-bottom: 25px; } #verify-button-yes, #verify-button-no { background-color: #000; /* Black background */ color: #fff; /* White text */ padding: 12px 30px; /* Adjust padding */ border: none; cursor: pointer; font-size: 1em; font-weight: bold; margin: 0 5px; /* Space between buttons */ min-width: 80px; /* Minimum width for buttons */ transition: background-color 0.2s ease; /* Smooth hover effect */ } #verify-button-yes:hover, #verify-button-no:hover { background-color: #333; /* Slightly lighter black on hover */ } .popup-content .disclaimer { font-size: 0.9em; /* Smaller font size for disclaimer */ color: #555; /* Grey text */ line-height: 1.5; } .image-circle-container { width: 70px; /* Adjust size of the circle as needed */ height: 70px; /* Must be the same as width for a perfect circle */ background-color: transparent; /* Black background */ border-radius: 50%; /* This makes the div circular */ display: flex; /* Enables flexbox for easy centering */ justify-content: center; /* Centers content (image) horizontally */ align-items: center; /* Centers content (image) vertically */ overflow: hidden; /* Ensures image doesn't spill outside the circle if it's too big */ margin-left: auto; /* Centers the circle container itself horizontally */ margin-right: auto; /* Centers the circle container itself horizontally */ } .centered-image { display: block; /* Removes extra space below the image */ height: 50px; /* Your desired image height */ width: auto; /* Let width adjust automatically to maintain aspect ratio */ max-width: 90%; /* Optional: Prevents image from touching the circle edge */ max-height: 90%;/* Optional: Prevents image from touching the circle edge */ }
Finally, inject this code into the footer
<script> // JavaScript for Age Verification Pop-up with Cookies document.addEventListener("DOMContentLoaded", function () { const popup = document.getElementById("age-verification-popup"); const verifyButtonYes = document.getElementById("verify-button-yes"); const verifyButtonNo = document.getElementById("verify-button-no"); const cookieName = "ageVerified"; // Name of our cookie // Function to set a cookie function setCookie(name, value, days) { let expires = ""; if (days) { const date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toUTCString(); } // Add SameSite=Lax and Secure attributes for better security, especially if using HTTPS // For local testing (http), you might omit 'Secure' // document.cookie = name + "=" + (value || "") + expires + "; path=/; SameSite=Lax; Secure"; document.cookie = name + "=" + (value || "") + expires + "; path=/; SameSite=Lax"; // Use this line if not using HTTPS for testing } // Function to get a cookie function getCookie(name) { const nameEQ = name + "="; const ca = document.cookie.split(';'); for(let i = 0; i < ca.length; i++) { let c = ca[i]; while (c.charAt(0) === ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length); } return null; } // Check if the age verification cookie exists const isVerified = getCookie(cookieName); if (!isVerified) { // If the cookie doesn't exist, show the pop-up if (popup) { popup.style.display = "block"; } } else { // If the cookie exists, keep the pop-up hidden (it's hidden by default CSS) console.log("Age already verified."); } // Event listener for the "YES" button if (verifyButtonYes) { verifyButtonYes.addEventListener("click", function () { // Set a cookie to remember verification for 365 days setCookie(cookieName, "yes", 365); // Hide the pop-up if (popup) { popup.style.display = "none"; } }); } // Event listener for the "NO" button if (verifyButtonNo) { verifyButtonNo.addEventListener("click", function () { // Redirect the user to the specified URL when they click "NO" window.location.href = "https://www.youtube.com/watch?v=s50vvwTystA"; }); } }); </script>
Enjoy!
0 notes
newcodesociety · 1 year ago
Text
0 notes
some-programming-pearls · 1 month ago
Video
youtube
Loaders using html and css #coding #html #css
0 notes