Skip to content

Conversation

@KristjanESPERANTO
Copy link
Contributor

@KristjanESPERANTO KristjanESPERANTO commented Jan 5, 2026

Live result you can checkout here: https://kristjanesperanto.github.io/MagicMirror-Website/

To compare: https://magicmirror.builders/

Major Changes

Dependencies

  • Remove jQuery 3.7.1, Bootstrap 3.3.7, and animate.css
  • Replace with vanilla JavaScript and CSS

Dark Mode

  • Theme toggle with localStorage → system preference → light fallback
  • Dynamic icon switching and smooth 0.3s transitions

Modern CSS & Responsive Design

  • Auto-fit grid
  • Fluid typography with clamp() for headings, text, and spacing
  • Unified 825px breakpoint for better navbar layout
  • Fluid jumbotron background positioning and sizing
  • Responsive magpi-watermark: clamp(60px, 12vw, 125px)

Visual Enhancements

Deployment

Benefits

  • Faster load times
  • Better accessibility (semantic HTML, ARIA labels)
  • Native dark mode with user preference detection
  • Smooth animations without libraries
  • Fully responsive without hard breakpoints
  • Easier to maintain by cutting down hidden complexity (getting rid of third-party libraries) and using vanilla JS + modern CSS

- Replace deprecated use.fontawesome.com script with cdnjs CSS link
- Update all icons to FontAwesome 6 syntax (fa-solid, fa-brands)
- Replace fa-diamond with fa-gem (diamond removed in FA5+)
- Replace fa-simplybuilt with fa-discord for Discord link
- Replace Bootstrap with custom vanilla CSS
- Remove jQuery dependency
- Replace Bootstrap Grid with CSS Grid and Flexbox
- Add semantic HTML5 structure (main, header, section, footer)
- Maintain identical visual appearance and functionality
Implement proper scroll-triggered fadeInUp animation using Intersection Observer and vanilla CSS. The animation was previously broken due to missing JavaScript trigger - animate.css only provided the CSS but no scroll detection.

- Add custom fade-in-up CSS with 30px translateY and smooth transitions
- Implement Intersection Observer to trigger animation on scroll
- Add staggered animation with 150ms delay between boxes
- Remove animate.css dependency (67KB saved)

Side effect: One less external dependency to maintain
- Replace fixed grid breakpoints with auto-fit minmax() (removed 2 media queries)
- Use clamp() for fluid logo and section spacing (removed 1 media query)
- Unify all breakpoints to 767px for consistency
- Move media queries next to their components for better maintainability
- Remove deprecated 'only screen and' syntax
- Remove unnecessary !important in media queries
- CSS custom properties for light/dark themes with 0.3s transitions
- Theme toggle button with localStorage → system preference → fallback logic
- Extract all JavaScript to main.js ES module in <head>
- Convert fixed sizes to clamp(): h2, h3, lead, grid gap, jumbotron padding
- magpi-watermark now scales with viewport
- Adjust responsive breakpoint to 825px for better navbar layout"
@rejas
Copy link
Collaborator

rejas commented Jan 5, 2026

Great incentive, I really like this modernization.

Two things though (that are already present on the current site):

  1. snyk security badge: are we really using this? has anyone configured that? @MichMich ?
  2. positioning of the top-pick-logo, it doesnt play well when the viewport gets smaller
  3. coloring of the top-pick-logo, svg would be better but I couldnt find any. any idea how to make it look good on dark mode?
grafik

@KristjanESPERANTO
Copy link
Contributor Author

KristjanESPERANTO commented Jan 5, 2026

Thanks for the feedback! It seems that my sleep problems have actually led to something productive 😅

  1. Snyk: We removed Snyk 2020 from the projects repository: MagicMirrorOrg/MagicMirror@40886bc. That looks pretty clear, so I've just removed the badge here as well.

  2. positioning of the top-pick-logo: The positioning was already like this before the PR. But I think I've found a goodsolution with the last commit.

  3. coloring of the top-pick-logo: Fortunately, there was already a suitable image for this in the repo. I just changed it that it is now been used in dark mode.

Live preview is also updated: https://kristjanesperanto.github.io/MagicMirror-Website/

Ekrankopio de 2026-01-05 16 38 21

@KristjanESPERANTO
Copy link
Contributor Author

KristjanESPERANTO commented Jan 5, 2026

@khassel Can you explain why you are in the commit? I'm not aware that I did anything special, but you are listed as the author and I'm as the committer 🤔

bildo bildo

I would leave it as it is if you don't mind, or should I straighten it out?

@rejas
Copy link
Collaborator

rejas commented Jan 5, 2026

Speaking of badges: I would like to get the openssf best practice badge to 100%, alas the module on bestpractices.dev is owned by @nhubbard maybe he can move it over to one of us if he sees this message?
Otherwise this PR looks fine to me

@nhubbard
Copy link

nhubbard commented Jan 5, 2026

@rejas Wow I completely forgot about that! Let me see if I can move it.

@rejas
Copy link
Collaborator

rejas commented Jan 5, 2026

@rejas Wow I completely forgot about that! Let me see if I can move it.

Fastest reaction I ever had from someone outside of a project :-D

@nhubbard
Copy link

nhubbard commented Jan 5, 2026

@rejas Can you link me your BestPractices.dev profile? I'm submitting a request to see if it can be transferred. If it can, I'll have them transfer it to you. If not, I'll delete my account and see if they can move it to you.

@rejas
Copy link
Collaborator

rejas commented Jan 5, 2026

@rejas Can you link me your BestPractices.dev profile? I'm submitting a request to see if it can be transferred. If it can, I'll have them transfer it to you. If not, I'll delete my account and see if they can move it to you.

it's https://www.bestpractices.dev/en/users/8747 thanks for your time and effort!

@khassel
Copy link
Contributor

khassel commented Jan 5, 2026

@khassel Can you explain why you are in the commit? I'm not aware that I did anything special, but you are listed as the author and I'm as the committer 🤔

I would leave it as it is if you don't mind, or should I straighten it out?

can't explain, don't know what you did ... I did not touch your fork. But no problem, leave it as it is.

The date of this strange commit is exactly the date of my last commit in this repo:

grafik

@khassel
Copy link
Contributor

khassel commented Jan 5, 2026

@rejas can we merge this or is the "not 100% badge" something we have to wait for?

@rejas rejas merged commit 30afc5b into MagicMirrorOrg:master Jan 5, 2026
@nhubbard
Copy link

nhubbard commented Jan 7, 2026

@rejas I just finished the transfer to your BestPractices account. Apparently there was a way in the UI, but I couldn't find it anywhere when I looked for it.

@rejas
Copy link
Collaborator

rejas commented Jan 8, 2026

@rejas I just finished the transfer to your BestPractices account. Apparently there was a way in the UI, but I couldn't find it anywhere when I looked for it.

Thanks, shows up as "owned" in my accoutn now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants