8000 Refactor: Split Code into Separate Files for Better Organization and added Share Functionality by sands21 · Pull Request #8 · markodenic/links · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refactor: Split Code into Separate Files for Better Organization and added Share Functionality #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sands21
Copy link
@sands21 sands21 commented May 15, 2025

Changes Made

This PR improves the codebase structure by separating the monolithic index.html file into three distinct files:

  • index.html - Core HTML structure
  • styles.css - All styling rules and theme variables
  • script.js - JavaScript functionality

Benefits

  • Improved code organization and maintainability
  • < 8000 li>Better separation of concerns
  • Enhanced browser caching capabilities
  • Easier debugging and modification of individual components
  • Cleaner development workflow

Technical Details

  1. Extracted all CSS from inline <style> tag to styles.css

    • Maintained all existing styling rules
    • Preserved CSS variable structure for theming
    • Kept logical grouping of related styles
  2. Moved all JavaScript from inline <script> tag to script.js

    • Theme toggle functionality
    • Dynamic year update
    • Share buttons implementation
    • QR code generation and modal handling
  3. Updated index.html to:

    • Remove inline styles and scripts
    • Add proper file references
    • Maintain existing functionality

Testing

  • Verified all existing functionality works as before
  • Tested theme switching
  • Confirmed sharing features work correctly
  • Validated QR code generation and download
  • Checked responsive design across different screen sizes

No Breaking Changes

This is a pure refactor that maintains 100% of the existing functionality while improving code organization.

…tons and QR code modal, and link external script for functionality
Copy link
vercel bot commented May 15, 2025

@sands21 is attempting to deploy a commit to the Marko D's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
netlify bot commented May 15, 2025

Deploy Preview for denicmarko ready!

Name Link
🔨 Latest commit 3dac134
🔍 Latest deploy log https://app.netlify.com/projects/denicmarko/deploys/6840a5185f03bc0008703337
😎 Deploy Preview https://deploy-preview-8--denicmarko.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sands21 sands21 changed the title Refactor: Split Code into Separate Files for Better Organization Refactor: Split Code into Separate Files for Better Organization and added Share Functionality May 15, 2025
@markodenic
Copy link
Owner

@sands21 I like. The share buttons are a bit off on the mobile. Can you take a look, please?

…veness with media queries for share buttons, container, and modal
@sands21
Copy link
Author
sands21 commented May 16, 2025

Hi yeah I looked into it and fixed it. It should be good now.

Copy link
Owner
@markodenic markodenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sands21 I checked this more in detail. I don't like the share functionality, I think it's shifting attention from the links. I would take the refactor, though. Feel free to reopen or create a new PR!

@sands21
Copy link
Author
sands21 commented May 26, 2025

@sands21 I checked this more in detail. I don't like the share functionality, I think it's shifting attention from the links. I would take the refactor, though. Feel free to reopen or create a new PR!

I removed the share buttons and the qr code entirely while keeping the refactor. Please look into it

Copy link
Owner
@markodenic markodenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sands21 Nicely done! There's only the QR code script left behind. Can you please remove it?

@sands21
Copy link
Author
sands21 commented Jun 4, 2025

@sands21 Nicely done! There's only the QR code script left behind. Can you please remove it?

Removed the unused code. It should be clean now. Sorry for the blunder before

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.

2 participants
0