Skip to content

rolandjlevy/express-pug-and-css-experiment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌀 Swirly thing with Node, Pug + CSS 🌀

This started off as an exercise to learn Pug and ended up being a lot of fun creating this interactive swirly thing.

Links 🔗

Features 💡

  • Built using a minimal amount of code in Express, Pug, JavaScript and CSS.
  • Why Pug? and what is it? Just like EJS it's a template engine for Node which compiles to HTML. I like it because of the simplified syntax. For example to generate 25 divs with the class 'line' you just have to do this:
- let count = 25;
while count--
    .line
  • How does the movement work? The CSS variables determine the movement of the lines using the width, height and transform properties in the .line class in style.css. JavaScript is used to update the CSS variables. For example, this updates the --size variable for each line:
$('.size').addEventListener('input', (e) => {
  document.documentElement.style.setProperty('--size', e.target.value);
}, false);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published