Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeK34959 committed Oct 22, 2023
1 parent b6752e8 commit e16f7c6
Show file tree
Hide file tree
Showing 1,885 changed files with 304,458 additions and 1,829 deletions.
Binary file renamed src/app/.DS_Store → .DS_Store
Binary file not shown.
84 changes: 84 additions & 0 deletions AssassinBrotherhood.theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/**
* @name Assassin Brotherhood
* @version 6.3.0
* @description Highly customizable and beautiful theme for BetterDiscord.
* @source https://github.com/ClearVision/ClearVision-v6
* @website https://clearvision.github.io
* @invite 7pNUC9C
*/

@import url('https://jakek34959.github.io/CV-Assassin-Brotherhood/main.css');

:root {
--main-color: #379B6E;
--hover-color: #1F583F;
--success-color: #251835;
--danger-color: #431313;
--url-color: #57F8A0;
--background-image: url("https://live.staticflickr.com/65535/53271980123_6e5674788f_k.jpg");;
--background-shading: 0%;
--background-position: center;
--background-size: cover;
--background-repeat: no-repeat;
--background-attachment: fixed;
--background-brightness: 100%;
--background-contrast: 100%;
--background-saturation: 100%;
--background-grayscale: 0%;
--background-invert: 0%;
--background-blur: 0px;
--background-overlay: rgba(0,0,0,0.6);
--user-popout-image: var(--background-image);
--user-popout-position: 100% 10%;
--user-popout-size: contain;
--user-popout-repeat: no-repeat;
--user-popout-attachment: local;
--user-popout-brightness: 100%;
--user-popout-contrast: 100%;
--user-popout-saturation: 100%;
--user-popout-grayscale: 0%;
--user-popout-invert: 0%;
--user-popout-blur: 1px;
--user-modal-image: var(--background-image);
--user-modal-position: 50% -20%;
--user-modal-size: 70%;
--user-modal-repeat: no-repeat;
--user-modal-attachment: fixed;
--user-modal-brightness: 100%;
--user-modal-contrast: 100%;
--user-modal-saturation: 100%;
--user-modal-grayscale: 0%;
--user-modal-invert: 0%;
--user-modal-blur: 3px;
--home-icon: url('https://i.imgur.com/gu9ybte.png');
--home-position: top center;
--home-size: 40px;
--channel-unread: var(--main-color);
--channel-color: rgba(255,255,255,0.3);
--muted-color: rgba(255,255,255,0.1);
--online-color: #51B202;
--idle-color: #FBE84D;
--dnd-color: #EA3724;
--streaming-color: #63D8FB;
--offline-color: #808080;
--channels-width: 220px;
--members-width: 240px;
--backdrop-overlay: rgba(0,0,0,0.8);
--backdrop-image: var(--background-image);
--backdrop-position: var(--background-position);
--backdrop-size: var(--background-size);
--backdrop-repeat: var(--background-repeat);
--backdrop-attachment: var(--background-attachment);
--backdrop-brightness: var(--background-brightness);
--backdrop-contrast: var(--background-contrast);
--backdrop-saturation: var(--background-saturation);
--backdrop-invert: var(--background-invert);
--backdrop-grayscale: var(--background-grayscale);
--backdrop-sepia: var(--background-sepia);
--backdrop-blur: var(--background-blur);
--bd-blue: var(--main-color);
--bd-blue-hover: var(--hover-color);
--bd-blue-active: var(--hover-color);
}

/* Any custom CSS below here */
301 changes: 301 additions & 0 deletions Backgroundsurls.js

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
[![Issues][issues-badge]][issues-link]
[![Pull Requests][prs-badge]][prs-link]

![v6 Sapphire](https://github.com/ClearVision/ClearVision-v6/raw/master/screenshots/6-stable.4.7.9.png)
![v6 Sapphire](https://i.imgur.com/U7UXrEN.png)

</div>

## Theme Editor

You are now able to customize the theme with a preview before downloading it to your computer.
You can now customize the theme with a preview before downloading it to your computer.

Please keep in mind that **we do not manage the theme editor**, and cannot help with any bugs that come from using it.

> [Theme Editor](https://bdeditor.dev/theme/clearvision)
Expand All @@ -35,22 +37,19 @@ _Thank you to @Gibbu to providing this._

Note: ClearVision doesn't actively support plugins (as in, we don't seek out and actively theme fixes to every new plugin). However, when a plugin is widely used, we try our best to stay compatible.

Download the theme file and move it into your [BetterDiscord](https://betterdiscord.app) themes folder:

> [ClearVision_v6.theme.css](https://clearvision.gitlab.io/download/v6/latest)
Download the theme file from [the BetterDiscord Website](https://betterdiscord.app/theme/ClearVision) or [releases](https://github.com/ClearVision/ClearVision-v6/releases) and move it into your [BetterDiscord](https://betterdiscord.app) themes folder:

## Building from source

In order build the theme from source, you can simply run `npm install` to install all missing dependencies, and `npm run build` to compile the theme into the `/public` folder.
To build the theme from source, you can simply run `npm install` to install all missing dependencies and `npm run build` to compile the theme into the `/public` folder.

### Dependencies

- [NodeJS/npm](https://nodejs.org/)
- [sass](https://www.npmjs.com/package/sass)
- [PostCSS Autoprefixer](https://www.npmjs.com/package/autoprefixer)
- [PostCSS CLI](https://www.npmjs.com/package/postcss-cli)
- [rimraf](https://www.npmjs.com/package/rimraf) (for cleanup)
- [Prettier](https://www.npmjs.com/package/prettier) (code formatting)
- _[DiscordSelectors](https://github.com/Zerthox/DiscordSelectors) (included in the `/lib` folder)_

## Contributing

Expand Down
44 changes: 44 additions & 0 deletions ThemeRandomizer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const fs = require('fs');
const css = require('css');
const { bgurls } = require('./Backgroundsurls'); // Import the bgurls array from Backgroundsurls.js

let lastChoice = '';

function changebackground() {
let pick = bgurls[Math.floor(Math.random() * bgurls.length)];

// Ensure that the new pick is different from the last choice
while (pick === lastChoice) {
pick = bgurls[Math.floor(Math.random() * bgurls.length)];
}
console.log(pick); // Use console.log to print pick

lastChoice = pick;

const cssFilePath = 'AssassinBrotherhood.theme.css';
const cssContent = fs.readFileSync(cssFilePath, 'utf8');

const ast = css.parse(cssContent);
const newBackgroundImageUrl = `url("${pick}");`;

ast.stylesheet.rules.forEach((rule) => {
if (rule.type === 'rule') {
rule.declarations.forEach((declaration) => {
if (declaration.property === '--background-image') {
declaration.value = newBackgroundImageUrl;
}
});
}
});

const modifiedCss = css.stringify(ast);

fs.writeFile(cssFilePath, modifiedCss, (err) => {
if (err) {
console.error(err);
}
});
}

// Use setInterval without the while loop
setInterval(changebackground, 5000);
Binary file added __pycache__/Backgroundsurls.cpython-312.pyc
Binary file not shown.
Loading

0 comments on commit e16f7c6

Please sign in to comment.