Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Saltssaumure authored May 25, 2024
0 parents commit 4a51752
Show file tree
Hide file tree
Showing 14 changed files with 2,227 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/css.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and deploy CSS

on:
push:
branches:
- main
- master

jobs:
build:
name: Build CSS
runs-on: ubuntu-latest

steps:
- name: Checkout theme
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 21

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: Install dependencies
run: pnpm install

- name: Build CSS
run: pnpm run build:css

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: deploy
publish_dir: "./"
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint

on:
push:
branches-ignore:
- deploy
pull_request:

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Checkout theme
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 21

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: Install dependencies
run: pnpm install

- name: Run linters
run: pnpm run lint
40 changes: 40 additions & 0 deletions .github/workflows/rp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Bundle and release for Replugged

on:
push:
tags:
- v*

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout theme
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 21

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: Install dependencies
run: pnpm install

- name: Build and bundle theme into .asar
run: pnpm run build:asar

- name: Release bundled asar, json, and theme.css
uses: ncipollo/release-action@v1
with:
artifacts: bundle/*, *.theme.css
makeLatest: true
generateReleaseNotes: true
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Packages
/node_modules

# Build
/bundle
/dist
/src
15 changes: 15 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Folders
/.github
/bundle
/dist
/node_modules
/preview

# File types
*.md
*.min.css
*.theme.css

# Files
LICENSE
pnpm-lock.yaml
15 changes: 15 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"useTabs": false,
"singleQuote": false,
"printWidth": 140,
"tabWidth": 4,
"trailingComma": "none",
"overrides": [
{
"files": "*.json",
"options": {
"tabWidth": 2
}
}
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Saltssaumure / MiniDiscordThemes

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.
117 changes: 117 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
[screenshot]: https://minidiscordthemes.github.io/Template/preview/preview.avif
[light]: https://minidiscordthemes.github.io/Template/preview/light.avif
[dark]: https://minidiscordthemes.github.io/Template/preview/dark.avif

[css-color]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
[css-length]: https://developer.mozilla.org/en-US/docs/Web/CSS/length

[discord]: https://discord.gg/uy8nKQVatp

[BetterDiscord]: https://betterdiscord.app/
[Replugged]: https://replugged.dev/
[Vencord]: https://github.com/Vendicated/Vencord

[shield-donate]: https://img.shields.io/badge/Donate-ko--fi-orange?style=flat-square&logo=kofi&logoColor=orange
[ko-fi]: https://ko-fi.com/saltssaumure "Buy me a coffee!"

[shield-bd-dl]: https://img.shields.io/github/downloads/MiniDiscordThemes/Template/Template.theme.css?color=purple&label=Downloads&style=flat-square
[shield-asar-dl]: https://img.shields.io/github/downloads/MiniDiscordThemes/Template/net.saltssaumure.Template.asar?color=purple&label=Downloads&style=flat-square
[shield-repo-size]: https://img.shields.io/github/repo-size/MiniDiscordThemes/Template?label=Repository&style=flat-square "Total size"

[github]: https://github.com/MiniDiscordThemes/Template
[issues]: https://github.com/MiniDiscordThemes/Template/issues
[license]: https://github.com/MiniDiscordThemes/Template/blob/main/LICENSE
[.theme.css]: https://github.com/MiniDiscordThemes/Template/blob/main/Template.theme.css

[release-bd]: https://betterdiscord.app/theme/?id=000 "BetterDiscord store page"
[release-rp]: https://replugged.dev/store/net.saltssaumure.Template "Replugged store page"
[release-bd-gh]: https://github.com/MiniDiscordThemes/Template/releases/latest/download/Template.theme.css "Get latest release"
[release-rp-gh]: https://github.com/MiniDiscordThemes/Template/releases/latest/download/net.saltssaumure.Template.asar "Get latest release"

# Template Discord Theme
[![Buy me a coffee on ko-fi][shield-donate]][ko-fi]
[![CSS GitHub downloads][shield-bd-dl]][release-bd-gh]
[![Asar GitHub downloads][shield-asar-dl]][release-rp-gh]
[![Total repository size][shield-repo-size]][github]

***A template Discord theme for multiple client mod support.***

![Screenshot of Template applied to Discord][screenshot]

| Light mode | Dark mode |
| -------------------------------------------------------------- | ------------------------------------------------------------ |
| ![Screenshot of Template light mode applied to Discord][light] | ![Screenshot of Template dark mode applied to Discord][dark] |

## Installation

### [BetterDiscord][BetterDiscord]
1. Download `Template.theme.css`:
- [BetterDiscord store][release-bd]
- [GitHub][release-bd-gh]
2. Place the file in the themes folder:
- `Settings` > `BetterDiscord` > `Themes` > `Open Themes Folder`
3. Toggle on the theme card.

### [Replugged][Replugged]
#### Automatic
1. Click to install:
- [Replugged store][release-rp]
#### Manual
1. Download `net.saltssaumure.Template.asar`:
- [GitHub][release-rp-gh]
2. Place the file in the themes folder:
- `Settings` > `Replugged` > `Themes` > `Open Themes Folder`
3. Click `Load Missing Themes` and toggle on the theme card.

### [Vencord][Vencord]
#### Local
1. Download `Template.theme.css`:
- [BetterDiscord store][release-bd]
- [GitHub][release-bd-gh]
2. Place the file in the themes folder:
- `Settings` > `Vencord` > `Themes` > `Local Themes` > `Open Themes Folder`
3. Click `Load missing Themes` and toggle on the theme card.
#### Online
1. Paste the link in `Settings` > `Vencord` > `Themes` > `Online Themes`:
- `https://minidiscordthemes.github.io/Template/Template.theme.css`

## Customisation

| Variable | Description | Valid values | Default value |
| ------------------ | ------------------------------ | ------------------------------- | ------------- |
| `--temp-bg-color` | Background colour | Any [colour][css-color]. | `#000` |
| `--temp-bg-height` | Background height | Any [length][css-length]. | `100vh` |
| `--temp-scanline` | ⛐ Moving scanline on/off | `block` (on) or `none` (off). | `block` |
| `--temp-flicker` | ⚠ Screen flicker on/off | `flicker` (on) or `none` (off). | `none` |

- ⛐ This effect is performance-intensive.
- ⚠ This is a fast flickering effect and may not be suitable for those with photosensitive epilepsy.

### BetterDiscord
1. Open `Settings` > `BetterDiscord` > `Themes`.
2. Click the pencil icon on this theme.
3. Edit the variable values and save changes.

### Replugged
1. Enable `Automatically Apply Quick CSS` in `Settings` > `Replugged` > `General`.
2. Open `Settings` > `Replugged` > `Quick CSS`.
3. Copy and paste lines 15-20 of [`Template.theme.css`][.theme.css].
4. Edit the variable values and save.

### Vencord
#### Local
1. `Open Themes Folder` in `Settings` > `Vencord` > `Themes` > `Local Themes`
2. Open `Template.theme.css` with your favourite text editor.
3. Edit the variable values and save.
#### Online
1. `Enable Custom CSS` in `Settings` > `Vencord` > `Vencord` and click `Open QuickCSS File`.
2. Copy and paste lines 15-20 of [`Template.theme.css`][.theme.css].
3. Edit the variable values.

## License
[MIT License][license]
- <span title="Too long; didn't read; not a lawyer">TL;DR;NAL</span>: Do whatever you want with this theme, just include the original license.

## Questions or suggestions?
- Post [an issue][issues] on GitHub.
- Post in `#theme-support` on [my support server][discord].
21 changes: 21 additions & 0 deletions Template.theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @name Template
* @author Saltssaumure
* @authorLink https://github.com/Saltssaumure
* @description A template theme for multiple client mod support.
* @license MIT
* @version 1.0
* @invite uy8nKQVatp
* @source https://github.com/MiniDiscordThemes/Template
* @donate https://ko-fi.com/saltssaumure
*/

@import url("https://minidiscordthemes.github.io/Template/temp.min.css");

/* See https://github.com/MiniDiscordThemes/Template#customisation for customisation settings. */
:root {
--temp-bg-color: #000;
--temp-bg-height: 100vh;
--temp-scanline: block;
--temp-flicker: none;
}
20 changes: 20 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"id": "net.saltssaumure.Template",
"name": "Template",
"description": "A template theme for multiple client mod support.",
"author": {
"name": "Saltssaumure",
"discordID": "134142022092062720",
"github": "Saltssaumure"
},
"version": "1.0.0",
"updater": {
"type": "store",
"id": "net.saltssaumure.Template"
},
"license": "MIT",
"type": "replugged-theme",
"main": "scss/temp.scss",
"source": "https://github.com/MiniDiscordThemes/Template",
"image": ["https://minidiscordthemes.github.io/Template/preview/preview.avif"]
}
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "template-discord-theme",
"version": "1.0.0",
"description": "A template Discord theme for multiple client mod support.",
"repository": "github:MiniDiscordThemes/Template",
"author": "Saltssaumure <[email protected]>",
"license": "MIT",
"private": true,
"type": "module",
"scripts": {
"dev:bd": "bd-scss dev",
"dev:rp": "replugged build theme --watch",
"dev:vc": "bd-scss dev:vc",
"dev:vt": "bd-scss dev:vt",
"build:css": "bd-scss build",
"build:asar": "replugged bundle theme",
"lint": "prettier ./scss --check",
"lint:fix": "prettier ./scss --write --log-level warn",
"release": "replugged release"
},
"devDependencies": {
"prettier": "^3.2.5",
"replugged": "^4.7.9",
"salt-bd-scss": "^1.2.2"
}
}
Loading

0 comments on commit 4a51752

Please sign in to comment.