- JavaScript 91.4%
- SCSS 8.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| media | ||
| node_modules | ||
| src | ||
| .gitattributes | ||
| .npmignore | ||
| bd-css.config.js | ||
| bd-scss.config.js | ||
| bun.lock | ||
| package.json | ||
| README.md | ||
Fluxer Theme Template
A Fluxer Theme Generator for Fluxer based on BD-SCSS
Note
Currently only compiles correctly on Linux and targets to
~/.config/Influx/Themesin Dev Mode. Themes will continue to compile correctly using Dist, but need to be manually imported.
InFlux is a Fluxer Client Mod that is currently in development. It is not publically available yet. However, it is entirely possible to modify fluxer-noctalia or similar to function with the generator in this repo.
Pre-Requisites:
This repo uses a modified version of the Node Module bd-scss (version 3.0.8).
Because I'm lazy and dont feel like dealing with NPM too much, I will not be forking the actual project for release with NPM.
BD-SCSS runs with either bun, npm or pnpm. Make sure you have either of those installed.
Everything else should already be included in the modified [/node_modules/] folder.
If not, I may be stupid and you should yell at me in the issues tab.
How to use it
- It is reccomended that you fork this repo before anything. But if you dont intend to publish your development environment and will just publish the compiled CSS, this step is optional.
- Locally clone the repo.
- Edit the
[/bd-scss.config.js]file.
/** @type {import('bd-scss/lib/config').Config} */
export default {
meta: {
name: 'Theme Template',
author: 'Your Name Here',
version: '1.0.0',
description: 'A short description of your theme here.',
source: 'https://github.com/yourusername/yourtheme',
tags: ['Styling', ' Overhaul', ' UI', ' Theme'], // Fluxer uses a tagging system to help users sort their themes.
// You can add as many tags as you want, but make sure to separate them with commas and wrap them in quotes.
// Optional, but reccomened, include spaces leading a new tag to make it easier to read in the UI.
workswith: ['Stable', ' Canary'] // Entirely optional, but reccomended; Specify which version of Fluxer your theme works with.
// Currently, only Stable and Canary exist, with canary being declared the default for users by the Fluxer Development Team.
// Fluxer Canary, while visually similar to Stable, has a different CSS structure for many things,
// and also exposes many data-attributes that Stable does not, which can be used to style elements in ways that Stable cannot.
// The primary themes community (https://fluxer.gg/themes) has a dedicated section for themes that primarily target Canary.
}
};
- Edit the
[/src/]folder according to your theme. Since this uses SCSS, you are able to split your theme into individual components and load them with@use "path/to/file.scss";or@use "path/to/scss-component;, where the latter half allows you to omit a leading_and trailing.scss. (Remember that these components should be in/_something.scssfiles). - Compile your theme or CSS using
bun dist(or the equivalent for your setup) in the project root. This produces a/dist/folder on the project root containing a*.cssand a*.theme.cssfile. Both should be identical, with only one difference; the latter file contains the theme META header, derived from the[/bd-scss.config.js]file. The former can be pasted into the custom theme tokens/quick css file if you (or your users) fancy, while the latter, once downloaded, can be imported with Fluxer Canary's Theme Studio.
Live Mode
bd-scss supports a "live mode" environment for editing the source code of your theme. Currently, this build of the compiler specifically targets the user folder [~/.config/InFlux/Themes], and only on Linux. This is because I don't have and am willing to set up a Windows or MacOS system. If you're developing on Windows or Mac…Figure it out I guess.
Assuming you have InFlux, or something similar, that is able to load local CSS files, and does dynamic reloading upon changes, You can in fact use Live Mode to develop your CSS.
Simply run bun dev (or the equivalent for your setup) to start Live Mode.
While this is active, every time you make an edit in [/src/], the theme will immediately get compiled into a *.theme.css-file in the above mentioned folder.
If dynamic reloading is active, changes made will immediately be reflected in the loaded theme file.
Changes over normal BD-SCSS
For the time being, this repo stands as a personal tool to aide the development of themes for Fluxer. While it currently targets the InFlux mod, nothing is stopping you from using this template to build with a different mod.
To make this work, I've had to make a couple of changes to the way BD-SCSS works.
- Targetted output folder
- As mentioned before, this repo stands as a personal tool to aide the development of themes for Fluxer. It currently targets only my best use-case, and only on my current system.
- For the time being, InFlux is the only mod I trust, in part, due to being co-developed by me.
- Omission of remote import in
*.theme.cssfile;- Fluxer's CSP Currently blocks
@importstatements that target most remote css sources, such as GitHub. Making it incompatible with the way Custom Themes on Discord for example are handled. Pushing the dist file with only the import would not only trip the CSP, but also fail to load the theme, because the policy states that importing from a non-whitelisted source is not allowed, and the client refuses to pull the data. To get around this, I've opted for removing the import in the dist file, and simply including what would have been imported in the*.theme.cssfile anyway.
- Fluxer's CSP Currently blocks
- OS Support
- Like I mentioned earlier, I can't be bothered to set up a Windows or MacOS environment to test either my Client mod, or this compiler on. So unless somoene else wants to figure that out for me, I will only support Linux.
- This also kinda ties in with the Targetted Output Folder, because I dont support anything other than Linux with InFlux either yet—Its still a proof of Concept as of writing this.
Theming Community/Support
If you have any questions, either with this template or in general CSS, even if its not related to fluxer, Come join the Nexus Themes community on Fluxer. https://fluxer.gg/TqOzU3eN
Alternatively, for a community specifically cenetered around Fluxer themes, visit the Themes community.
Warning
THIS IS NOT THE PLACE TO ASK ABOUT THIS TEMPLATE. https://fluxer.gg/themes
Licence information
BD-SCSSis Licenced underMITA copy of the original licence can be found here:LICENCE
MIT License Copyright (c) 2022 Gibbu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

