Skip to content

Conversation

@StefanCodes
Copy link
Contributor

@StefanCodes StefanCodes commented Dec 28, 2025

Closes #457

What does this do?

Removes the Materialize CSS framework and drops in Bulma.

Bulma has a pretty good design system that lets us unlock dark mode without much additional effort.

Unfinished

There are some experiments in here that we could remove:

  1. Hamburger menu for mobile screens
  2. Revamping the source add/edit page layout
  3. Moving the media variable naming help into a tooltip
  4. Dark mode scripting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an experiment to see if we can eliminate SASS entirely and rely on pure CSS.

I originally hoped to be able to rely almost entirely on the Bulma styles so TubeSync could have minimal CSS, but this file is still larger than I'd like to really make this pitch.

My motivation here was to facilitate dark mode. I wasn't able to get theme switching to work when SASS variables were involved, but using CSS variables worked. There are some ways to shim in both (basically just redeclaring CSS vars for colours, and leave the SASS otherwise intact), but it seemed brittle to go that route.

Another option would be to let the TubeSync styling change a lot more to fit in with the Bulma defaults. I played with this a little bit and generally just didn't like what it looked like.

I'd love some opinions on this one.

}
</style>
<link type="text/css" rel="stylesheet" href="{% sass_src 'styles/tubesync.scss' %}" media="screen,projection"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.4/css/bulma.min.css" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

CDN Bulma. Maybe we should use a local copy?

Copy link
Contributor

Choose a reason for hiding this comment

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

I absolutely prefer a local copy.

Copy link
Owner

Choose a reason for hiding this comment

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

Local would be essential.

<link rel="icon" href="{% static 'images/favicon.ico' %}" sizes="21x21" type="image/x-icon">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>TubeSync - {% block headtitle %}Synchronize YouTube to your local media server{% endblock %}</title>
<script>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the first of a few JS blocks - I think this is the first script in TubeSync.

I usually prefer implementing the script in TypeScript, but that introduces a bunch of extra build changes. Holding off until there's some consensus on what this should look like.

This script runs on page load to check what the stored theme is. This lives up here to prevent a flash of light mode styles before dark mode is applied.

Copy link
Owner

Choose a reason for hiding this comment

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

Yeah I was a little militant and refused to use any JS at all for tubesync. I'm not opposed to some copy/paste hooks to make Bulma behave though.

</div>
</footer>

<script>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This script is doing 2 things:

  1. Sets up the dark mode toggle button in the header (default styles and click handling)
  2. Sets up a click handler for the hamburger menu when the viewport is small

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are some layout changes to the source page that's still not polished (happy to revert this).

There's 2 things I was playing with:

  1. Allow for more wrapping so the page isn't so tall
  2. Move the media name variables into a tooltip (instead of a long region at the bottom of the page)

Copy link
Contributor

Choose a reason for hiding this comment

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

I really dislike the tooltip because it makes copy/paste much more difficult.

Copy link
Contributor Author

@StefanCodes StefanCodes Dec 28, 2025

Choose a reason for hiding this comment

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

I think the changes to Makefile and Pipfile and urls.py are only local to get this working under MacOS. Will double check but I think this should be removed from the Bulma branch.

@tcely tcely moved this to In Progress in Status Dec 28, 2025
</style>
<link type="text/css" rel="stylesheet" href="{% sass_src 'styles/tubesync.scss' %}" media="screen,projection"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.4/css/bulma.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it just a matter of copying this from the source to the static directory?

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

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Feature Request: Dark Mode 🕶

3 participants