Move to self-hosted Gitea, remove the built styles from the repository, clean up stuff.
This commit is contained in:
parent
6765719529
commit
1a4c59ca14
|
@ -4,6 +4,10 @@ logs
|
|||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
|
@ -16,6 +20,7 @@ lib-cov
|
|||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
@ -39,12 +44,21 @@ jspm_packages/
|
|||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
|
@ -61,11 +75,18 @@ typings/
|
|||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
|
||||
# next.js build output
|
||||
# Next.js build output
|
||||
.next
|
||||
|
||||
# nuxt.js build output
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and *not* Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
@ -79,5 +100,8 @@ typings/
|
|||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# CSS Development folder
|
||||
temp/
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Build directory.
|
||||
build/
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License
|
||||
|
||||
Copyright (c) 2018-2020 Bauke <me@bauke.xyz>
|
||||
|
||||
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.
|
7
License
7
License
|
@ -1,7 +0,0 @@
|
|||
Copyright © 2018-2020 Bauke <me@bauke.xyz>
|
||||
|
||||
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.
|
|
@ -0,0 +1,17 @@
|
|||
# Userstyles
|
||||
|
||||
> A collection of all my userstyles for various websites.
|
||||
|
||||
## Building
|
||||
|
||||
To build the userstyles [Node](https://nodejs.org) and [Yarn](https://yarnpkg.com) are required.
|
||||
|
||||
Run `yarn start` to watch the SCSS for changes and auto-rebuild or run `yarn build` to build all the userstyles once. The userstyles will be output to `build/`.
|
||||
|
||||
## Installation
|
||||
|
||||
Head to [bauke.xyz/userstyles](https://bauke.xyz/userstyles) to see all the available userstyles and installation options.
|
||||
|
||||
## License
|
||||
|
||||
Code open-sourced with the [MIT license](https://git.holllo.cc/Bauke/userstyles/src/branch/main/LICENSE), style logos licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).
|
22
ReadMe.md
22
ReadMe.md
|
@ -1,22 +0,0 @@
|
|||
# Styles
|
||||
|
||||
> Collection of my user styles for various websites.
|
||||
|
||||
## Collection
|
||||
|
||||
| Name | Version | Applies To | User CSS |
|
||||
|------|---------|------------|----------|
|
||||
| Tildes Baukula | 1.0.8 | [tildes.net](https://tildes.net) | [Click](https://gitlab.com/Bauke/styles/raw/master/css/tildes-baukula/tildes-baukula.user.css)
|
||||
| Tildes Compact | 1.0.9 | [tildes.net](https://tildes.net) | [Click](https://gitlab.com/Bauke/styles/raw/master/css/tildes-compact/tildes-compact.user.css) |
|
||||
|
||||
## Installing
|
||||
|
||||
Refer to [the Wiki](https://gitlab.com/Bauke/styles/wikis/Installing-Styles) for installation guidelines.
|
||||
|
||||
## Building
|
||||
|
||||
If you'd like to build the CSS yourself, refer to [the Wiki](https://gitlab.com/Bauke/styles/wikis/Building-Styles) for building guidelines.
|
||||
|
||||
## License
|
||||
|
||||
Licensed under [MIT](License).
|
111
build.js
111
build.js
|
@ -1,111 +0,0 @@
|
|||
const {execSync} = require('child_process');
|
||||
const {join} = require('path');
|
||||
const {
|
||||
moveSync,
|
||||
mkdirpSync,
|
||||
readdirSync,
|
||||
readFileSync,
|
||||
removeSync,
|
||||
writeFileSync
|
||||
} = require('fs-extra');
|
||||
const {create} = require('usercss-creator');
|
||||
|
||||
if (!process.env.STYLE_ENV) {
|
||||
throw new Error('Environment variable STYLE_ENV is not set.');
|
||||
}
|
||||
|
||||
const tempPath = join(__dirname, 'temp');
|
||||
const logMeta =
|
||||
process.env.STYLE_ENV === 'dev' ? '[build]'.padEnd(10) : '[build] ';
|
||||
|
||||
// If we're in prod then clear the temp folder to avoid unwanted files going into `css`
|
||||
if (process.env.STYLE_ENV === 'prod') {
|
||||
console.log(logMeta + 'building for production, see `css/` for output');
|
||||
removeSync(tempPath);
|
||||
}
|
||||
|
||||
console.log(`${logMeta}reading \`${join(__dirname, 'source')}\` files`);
|
||||
let cssFiles = readdirSync(join(__dirname, 'source'));
|
||||
|
||||
// Generate all the SCSS using the CLI
|
||||
console.log(logMeta + 'generating SASS/SCSS -> CSS');
|
||||
const outputStyle = 'expanded';
|
||||
mkdirpSync('temp/');
|
||||
for (const cssFile of cssFiles) {
|
||||
execSync(
|
||||
`yarn sass --no-source-map --style ${outputStyle} source/${cssFile}/${cssFile}.s* ${tempPath}/${cssFile}.css`
|
||||
);
|
||||
console.log(`${logMeta}✔ ${cssFile}`);
|
||||
}
|
||||
|
||||
console.log(`${logMeta}reading \`${tempPath}\` files`);
|
||||
cssFiles = readdirSync(tempPath);
|
||||
|
||||
console.log(logMeta + 'generating CSS -> UserCSS');
|
||||
for (const cssFile of cssFiles) {
|
||||
// Only generate non-usercss files
|
||||
if (cssFile.endsWith('.user.css')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const cssPath = join(tempPath, cssFile);
|
||||
// This uses the css file's name to resolve the appropriate `package.json`
|
||||
// All CSS files have the same name as their directory
|
||||
const packagePath = join(
|
||||
__dirname,
|
||||
'source',
|
||||
cssFile.slice(0, cssFile.indexOf('.')),
|
||||
'package.json'
|
||||
);
|
||||
const {usercss} = JSON.parse(readFileSync(packagePath, 'UTF8'));
|
||||
// We don't specify an output path because we just want it generated next to the regular CSS file
|
||||
create(cssPath, usercss);
|
||||
}
|
||||
|
||||
cssFiles = readdirSync(tempPath);
|
||||
// Add `@-moz-document domain(...)` to all the `.user.css` files
|
||||
for (const cssFile of cssFiles) {
|
||||
if (!cssFile.endsWith('.user.css')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const cssPath = join(tempPath, cssFile);
|
||||
const packagePath = join(
|
||||
__dirname,
|
||||
'source',
|
||||
cssFile.slice(0, cssFile.indexOf('.')),
|
||||
'package.json'
|
||||
);
|
||||
const {usercss} = JSON.parse(readFileSync(packagePath, 'UTF8'));
|
||||
let css = readFileSync(cssPath, 'UTF8');
|
||||
const usercssIndex = css.indexOf('==/UserStyle== */');
|
||||
const usercssLength = '==/UserStyle== */'.length;
|
||||
css =
|
||||
css.slice(0, Math.max(0, usercssIndex + usercssLength)) +
|
||||
`\n@-moz-document domain("${usercss.namespace}") {\n` +
|
||||
css.slice(usercssIndex + usercssLength + 1, css.length) +
|
||||
'}\n';
|
||||
writeFileSync(cssPath, css);
|
||||
console.log(`${logMeta}✔ ${cssFile} v${usercss.version}`);
|
||||
}
|
||||
|
||||
// If we're in prod, we now wanna move all the files into `css`
|
||||
if (process.env.STYLE_ENV === 'prod') {
|
||||
cssFiles = readdirSync(tempPath);
|
||||
console.log(`${logMeta}moving ${cssFiles.length} generated files`);
|
||||
for (const cssFile of cssFiles) {
|
||||
const cssPath = join(tempPath, cssFile);
|
||||
const prodPath = join(__dirname, 'css');
|
||||
const dirPath = join(
|
||||
prodPath,
|
||||
cssFile.slice(0, Math.max(0, cssFile.indexOf('.')))
|
||||
);
|
||||
// `mkdir -p <path>` to create any directories that don't exist yet
|
||||
mkdirpSync(dirPath);
|
||||
moveSync(cssPath, join(dirPath, cssFile), {overwrite: true});
|
||||
}
|
||||
|
||||
removeSync(tempPath);
|
||||
}
|
||||
|
||||
console.log(logMeta + 'finished 😁');
|
|
@ -1,7 +0,0 @@
|
|||
# Tildes Baukula
|
||||
|
||||
> Adaptations to make the official Dracula theme look like my old one.
|
||||
|
||||
## Installing
|
||||
|
||||
To install this theme, check out [the Wiki](https://gitlab.com/Bauke/styles/wikis/Installing-Styles).
|
|
@ -1,331 +0,0 @@
|
|||
body:not(.theme-dracula) .site-header-logo::after {
|
||||
content: " Baukula won't activate unless you use the official Dracula theme!";
|
||||
}
|
||||
|
||||
body.theme-dracula {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula.static-site .article-summary {
|
||||
border: 1px solid #6272a4;
|
||||
background-color: #282a36;
|
||||
padding: 0.8rem;
|
||||
}
|
||||
body.theme-dracula.static-site .article-summary h2 {
|
||||
margin: 0 0 0.4rem;
|
||||
}
|
||||
body.theme-dracula.static-site .article-summary .text-secondary {
|
||||
color: #6272a4;
|
||||
}
|
||||
body.theme-dracula .btn {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .btn:hover {
|
||||
color: #282a36;
|
||||
}
|
||||
body.theme-dracula .btn:hover, body.theme-dracula .btn.btn-primary:hover {
|
||||
border-color: #ff79c6;
|
||||
background-color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .btn.btn-link {
|
||||
border: 1px solid #8be9fd;
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .btn.btn-link:hover {
|
||||
color: #282a36;
|
||||
}
|
||||
body.theme-dracula .btn.btn-link:hover {
|
||||
border-color: #ff79c6;
|
||||
background-color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .btn.btn-used {
|
||||
color: #282a36;
|
||||
border-color: #ff79c6;
|
||||
background-color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .btn-post button {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .btn-post button:hover {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .btn-post button.btn-post-action-used {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .comment {
|
||||
border-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .comment[data-comment-depth="0"] {
|
||||
border-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .comment-header {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .comment .comment-nav-link,
|
||||
body.theme-dracula .comment .comment-nav-link:visited {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .comment .comment-nav-link:hover,
|
||||
body.theme-dracula .comment .comment-nav-link:visited:hover {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .comment .comment-votes {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula .date-info.text-secondary.text-small {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula .toc {
|
||||
border: 1px solid #6272a4;
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .dropdown menu {
|
||||
border: 1px solid #6272a4;
|
||||
}
|
||||
body.theme-dracula .user-label {
|
||||
border-radius: none;
|
||||
}
|
||||
body.theme-dracula .label-edit-box {
|
||||
color: #f8f8f2;
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .label-edit-box > input {
|
||||
border: 1px solid #6272a4;
|
||||
background-color: #44475a;
|
||||
}
|
||||
body.theme-dracula .label-light,
|
||||
body.theme-dracula .label-dark {
|
||||
color: transparent;
|
||||
}
|
||||
body.theme-dracula .bg-none {
|
||||
color: #f8f8f2;
|
||||
border-color: #6272a4;
|
||||
}
|
||||
body.theme-dracula .bg-red {
|
||||
color: #282a36;
|
||||
background-color: #f55;
|
||||
}
|
||||
body.theme-dracula .bg-orangered {
|
||||
color: #282a36;
|
||||
background-color: #ffb86c;
|
||||
}
|
||||
body.theme-dracula .bg-orange {
|
||||
color: #282a36;
|
||||
background-color: #f1fa8c;
|
||||
}
|
||||
body.theme-dracula .bg-dodgerblue {
|
||||
color: #282a36;
|
||||
background-color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .bg-forestgreen {
|
||||
color: #282a36;
|
||||
background-color: #50fa7b;
|
||||
}
|
||||
body.theme-dracula .bg-slategray {
|
||||
color: #282a36;
|
||||
background-color: #44475a;
|
||||
}
|
||||
body.theme-dracula a,
|
||||
body.theme-dracula a:visited {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula a:hover,
|
||||
body.theme-dracula a:visited:hover {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula blockquote {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula pre,
|
||||
body.theme-dracula code {
|
||||
color: #f8f8f2;
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula figure,
|
||||
body.theme-dracula section {
|
||||
border-color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula input,
|
||||
body.theme-dracula textarea,
|
||||
body.theme-dracula .form-input,
|
||||
body.theme-dracula .form-input:not(:focus) {
|
||||
color: #f8f8f2;
|
||||
border-color: #6272a4;
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula main,
|
||||
body.theme-dracula #sidebar {
|
||||
background-color: #44475a;
|
||||
}
|
||||
body.theme-dracula th {
|
||||
border-color: #6272a4;
|
||||
}
|
||||
body.theme-dracula td {
|
||||
border-color: #44475a;
|
||||
}
|
||||
body.theme-dracula thead {
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
body.theme-dracula tbody tr:nth-of-type(n) {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula a.link-user,
|
||||
body.theme-dracula a.site-header-context[href^="/user"] {
|
||||
color: #50fa7b;
|
||||
}
|
||||
body.theme-dracula a.link-user:visited,
|
||||
body.theme-dracula a.site-header-context[href^="/user"]:visited {
|
||||
color: #50fa7b;
|
||||
}
|
||||
body.theme-dracula a.link-group,
|
||||
body.theme-dracula a.site-header-context[href^="/~"],
|
||||
body.theme-dracula .nav .nav-item a[href^="/~"] {
|
||||
color: #ffb86c;
|
||||
}
|
||||
body.theme-dracula a.link-group:visited,
|
||||
body.theme-dracula a.site-header-context[href^="/~"]:visited,
|
||||
body.theme-dracula .nav .nav-item a[href^="/~"]:visited {
|
||||
color: #ffb86c;
|
||||
}
|
||||
body.theme-dracula .group-list-item-subscribed a.link-group {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .group-list-item-not-subscribed a.link-group {
|
||||
color: #f1fa8c;
|
||||
}
|
||||
body.theme-dracula a.site-header-logo:hover {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula a.logged-in-user-alert,
|
||||
body.theme-dracula a.logged-in-user-alert:visited {
|
||||
color: #282a36;
|
||||
background-color: #ffb86c;
|
||||
padding: 0.1rem 0.3rem;
|
||||
}
|
||||
body.theme-dracula a.logged-in-user-alert:hover,
|
||||
body.theme-dracula a.logged-in-user-alert:visited:hover {
|
||||
background-color: #f1fa8c;
|
||||
}
|
||||
body.theme-dracula #sidebar form[action="/logout"] > button,
|
||||
body.theme-dracula #sidebar form[action="/logout"] > button:hover {
|
||||
color: #8be9fd;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
body.theme-dracula #sidebar .btn.btn-link[href="/settings/filters"] {
|
||||
width: 100%;
|
||||
margin: 0.2rem 0;
|
||||
}
|
||||
body.theme-dracula .label.label-topic-tag:not([class*=label-topic-tag-spoiler]):not([class*=label-topic-tag-nsfw]) {
|
||||
color: #6272a4;
|
||||
}
|
||||
body.theme-dracula .label.label-topic-tag:not([class*=label-topic-tag-spoiler]):not([class*=label-topic-tag-nsfw]) a {
|
||||
color: #6272a4;
|
||||
}
|
||||
body.theme-dracula .label.label-topic-tag:not([class*=label-topic-tag-spoiler]):not([class*=label-topic-tag-nsfw]) a:hover {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .divider {
|
||||
border-color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula > header > a:nth-child(1):not(.no-header-logo) {
|
||||
color: #f8f8f2;
|
||||
background-size: 32px 32px;
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAMAAADQmBKKAAAAHlBMVEUoKjZQ+nticqSL6f29k/nx+oz/VVX/ecb/uGz///+3yBn7AAAAaklEQVR42u3Oxw2AQAADsNDZf2IGyO8kioQ9gQMAAAAAcLelCAkJCQkJCQkJ/Tk0lZS5ZMhZhISEhISEhISEvhbaSoasJWUvKUJCQkJCQkJCQu+GnnSUFCEhISEhISEhoXdDAAAAAAA3uwDrCC2R1NNC7QAAAABJRU5ErkJggg==");
|
||||
}
|
||||
body.theme-dracula .form-status-success {
|
||||
color: #50fa7b;
|
||||
}
|
||||
body.theme-dracula .form-status-error {
|
||||
color: #f55;
|
||||
}
|
||||
body.theme-dracula .donation-goal meter {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .settings-list {
|
||||
margin-left: 0;
|
||||
}
|
||||
body.theme-dracula .settings-list li {
|
||||
border: 1px solid #6272a4;
|
||||
background-color: #282a36;
|
||||
margin-bottom: 4px;
|
||||
padding: 0.4rem;
|
||||
}
|
||||
body.theme-dracula .settings-list form[name=account-default-theme] {
|
||||
margin: 8px 0;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order {
|
||||
border-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item {
|
||||
background-color: #282a36;
|
||||
margin: 4px 2px;
|
||||
padding: 0;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item.active a {
|
||||
color: #ff79c6;
|
||||
border-color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item a {
|
||||
color: #f8f8f2;
|
||||
margin: 0;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item a:hover {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .form-select:not([multiple]):not([size]) {
|
||||
border: 1px solid #6272a4;
|
||||
background-color: #282a36;
|
||||
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg%20xmlns="http://www.w3.org/2000/svg"%20viewBox="0%200%204%205"%3E%3Cpath%20fill="%23f8f8f2"%20d="M2%200L0%202h4zm0%205L0%203h4z"/%3E%3C/svg%3E');
|
||||
}
|
||||
body.theme-dracula .tab.tab-markdown-mode {
|
||||
border-bottom: none;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
body.theme-dracula .tab.tab-markdown-mode > .tab-item {
|
||||
margin-right: 4px;
|
||||
}
|
||||
body.theme-dracula .tab.tab-markdown-mode > .tab-item:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
body.theme-dracula .tab.tab-markdown-mode > .tab-item.active > .btn {
|
||||
background-color: #ff79c6;
|
||||
border-color: #ff79c6;
|
||||
color: #282a36;
|
||||
}
|
||||
body.theme-dracula .topic-listing > li:nth-of-type(n) {
|
||||
margin-bottom: 0.2rem;
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .post-listing .topic {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .topic.is-topic-official {
|
||||
border-left-color: #f55;
|
||||
}
|
||||
body.theme-dracula .topic.is-topic-official h1 a,
|
||||
body.theme-dracula .topic.is-topic-official h1 a:visited {
|
||||
color: #f55;
|
||||
}
|
||||
body.theme-dracula .topic .topic-title a:hover {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .topic .topic-title a:visited {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .topic .topic-info-comments a:visited {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .topic div[aria-label="Link domain"],
|
||||
body.theme-dracula .topic .time-responsive {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula .topic-full .topic-full-byline {
|
||||
color: #f8f8f2;
|
||||
}
|
|
@ -1,344 +0,0 @@
|
|||
/* ==UserStyle==
|
||||
@name Tildes Baukula
|
||||
@namespace tildes.net
|
||||
@version 1.0.8
|
||||
@author Bauke
|
||||
@description Adaptations to make the official Dracula theme look like my old one.
|
||||
@homepageURL https://gitlab.com/Bauke/styles
|
||||
@supportURL https://gitlab.com/Bauke/styles/issues
|
||||
@updateURL https://gitlab.com/Bauke/styles/raw/master/css/tildes-baukula/tildes-baukula.user.css
|
||||
@license MIT
|
||||
==/UserStyle== */
|
||||
@-moz-document domain("tildes.net") {
|
||||
body:not(.theme-dracula) .site-header-logo::after {
|
||||
content: " Baukula won't activate unless you use the official Dracula theme!";
|
||||
}
|
||||
|
||||
body.theme-dracula {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula.static-site .article-summary {
|
||||
border: 1px solid #6272a4;
|
||||
background-color: #282a36;
|
||||
padding: 0.8rem;
|
||||
}
|
||||
body.theme-dracula.static-site .article-summary h2 {
|
||||
margin: 0 0 0.4rem;
|
||||
}
|
||||
body.theme-dracula.static-site .article-summary .text-secondary {
|
||||
color: #6272a4;
|
||||
}
|
||||
body.theme-dracula .btn {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .btn:hover {
|
||||
color: #282a36;
|
||||
}
|
||||
body.theme-dracula .btn:hover, body.theme-dracula .btn.btn-primary:hover {
|
||||
border-color: #ff79c6;
|
||||
background-color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .btn.btn-link {
|
||||
border: 1px solid #8be9fd;
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .btn.btn-link:hover {
|
||||
color: #282a36;
|
||||
}
|
||||
body.theme-dracula .btn.btn-link:hover {
|
||||
border-color: #ff79c6;
|
||||
background-color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .btn.btn-used {
|
||||
color: #282a36;
|
||||
border-color: #ff79c6;
|
||||
background-color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .btn-post button {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .btn-post button:hover {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .btn-post button.btn-post-action-used {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .comment {
|
||||
border-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .comment[data-comment-depth="0"] {
|
||||
border-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .comment-header {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .comment .comment-nav-link,
|
||||
body.theme-dracula .comment .comment-nav-link:visited {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .comment .comment-nav-link:hover,
|
||||
body.theme-dracula .comment .comment-nav-link:visited:hover {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .comment .comment-votes {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula .date-info.text-secondary.text-small {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula .toc {
|
||||
border: 1px solid #6272a4;
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .dropdown menu {
|
||||
border: 1px solid #6272a4;
|
||||
}
|
||||
body.theme-dracula .user-label {
|
||||
border-radius: none;
|
||||
}
|
||||
body.theme-dracula .label-edit-box {
|
||||
color: #f8f8f2;
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .label-edit-box > input {
|
||||
border: 1px solid #6272a4;
|
||||
background-color: #44475a;
|
||||
}
|
||||
body.theme-dracula .label-light,
|
||||
body.theme-dracula .label-dark {
|
||||
color: transparent;
|
||||
}
|
||||
body.theme-dracula .bg-none {
|
||||
color: #f8f8f2;
|
||||
border-color: #6272a4;
|
||||
}
|
||||
body.theme-dracula .bg-red {
|
||||
color: #282a36;
|
||||
background-color: #f55;
|
||||
}
|
||||
body.theme-dracula .bg-orangered {
|
||||
color: #282a36;
|
||||
background-color: #ffb86c;
|
||||
}
|
||||
body.theme-dracula .bg-orange {
|
||||
color: #282a36;
|
||||
background-color: #f1fa8c;
|
||||
}
|
||||
body.theme-dracula .bg-dodgerblue {
|
||||
color: #282a36;
|
||||
background-color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .bg-forestgreen {
|
||||
color: #282a36;
|
||||
background-color: #50fa7b;
|
||||
}
|
||||
body.theme-dracula .bg-slategray {
|
||||
color: #282a36;
|
||||
background-color: #44475a;
|
||||
}
|
||||
body.theme-dracula a,
|
||||
body.theme-dracula a:visited {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula a:hover,
|
||||
body.theme-dracula a:visited:hover {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula blockquote {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula pre,
|
||||
body.theme-dracula code {
|
||||
color: #f8f8f2;
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula figure,
|
||||
body.theme-dracula section {
|
||||
border-color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula input,
|
||||
body.theme-dracula textarea,
|
||||
body.theme-dracula .form-input,
|
||||
body.theme-dracula .form-input:not(:focus) {
|
||||
color: #f8f8f2;
|
||||
border-color: #6272a4;
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula main,
|
||||
body.theme-dracula #sidebar {
|
||||
background-color: #44475a;
|
||||
}
|
||||
body.theme-dracula th {
|
||||
border-color: #6272a4;
|
||||
}
|
||||
body.theme-dracula td {
|
||||
border-color: #44475a;
|
||||
}
|
||||
body.theme-dracula thead {
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
body.theme-dracula tbody tr:nth-of-type(n) {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula a.link-user,
|
||||
body.theme-dracula a.site-header-context[href^="/user"] {
|
||||
color: #50fa7b;
|
||||
}
|
||||
body.theme-dracula a.link-user:visited,
|
||||
body.theme-dracula a.site-header-context[href^="/user"]:visited {
|
||||
color: #50fa7b;
|
||||
}
|
||||
body.theme-dracula a.link-group,
|
||||
body.theme-dracula a.site-header-context[href^="/~"],
|
||||
body.theme-dracula .nav .nav-item a[href^="/~"] {
|
||||
color: #ffb86c;
|
||||
}
|
||||
body.theme-dracula a.link-group:visited,
|
||||
body.theme-dracula a.site-header-context[href^="/~"]:visited,
|
||||
body.theme-dracula .nav .nav-item a[href^="/~"]:visited {
|
||||
color: #ffb86c;
|
||||
}
|
||||
body.theme-dracula .group-list-item-subscribed a.link-group {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .group-list-item-not-subscribed a.link-group {
|
||||
color: #f1fa8c;
|
||||
}
|
||||
body.theme-dracula a.site-header-logo:hover {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula a.logged-in-user-alert,
|
||||
body.theme-dracula a.logged-in-user-alert:visited {
|
||||
color: #282a36;
|
||||
background-color: #ffb86c;
|
||||
padding: 0.1rem 0.3rem;
|
||||
}
|
||||
body.theme-dracula a.logged-in-user-alert:hover,
|
||||
body.theme-dracula a.logged-in-user-alert:visited:hover {
|
||||
background-color: #f1fa8c;
|
||||
}
|
||||
body.theme-dracula #sidebar form[action="/logout"] > button,
|
||||
body.theme-dracula #sidebar form[action="/logout"] > button:hover {
|
||||
color: #8be9fd;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
body.theme-dracula #sidebar .btn.btn-link[href="/settings/filters"] {
|
||||
width: 100%;
|
||||
margin: 0.2rem 0;
|
||||
}
|
||||
body.theme-dracula .label.label-topic-tag:not([class*=label-topic-tag-spoiler]):not([class*=label-topic-tag-nsfw]) {
|
||||
color: #6272a4;
|
||||
}
|
||||
body.theme-dracula .label.label-topic-tag:not([class*=label-topic-tag-spoiler]):not([class*=label-topic-tag-nsfw]) a {
|
||||
color: #6272a4;
|
||||
}
|
||||
body.theme-dracula .label.label-topic-tag:not([class*=label-topic-tag-spoiler]):not([class*=label-topic-tag-nsfw]) a:hover {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .divider {
|
||||
border-color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula > header > a:nth-child(1):not(.no-header-logo) {
|
||||
color: #f8f8f2;
|
||||
background-size: 32px 32px;
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAMAAADQmBKKAAAAHlBMVEUoKjZQ+nticqSL6f29k/nx+oz/VVX/ecb/uGz///+3yBn7AAAAaklEQVR42u3Oxw2AQAADsNDZf2IGyO8kioQ9gQMAAAAAcLelCAkJCQkJCQkJ/Tk0lZS5ZMhZhISEhISEhISEvhbaSoasJWUvKUJCQkJCQkJCQu+GnnSUFCEhISEhISEhoXdDAAAAAAA3uwDrCC2R1NNC7QAAAABJRU5ErkJggg==");
|
||||
}
|
||||
body.theme-dracula .form-status-success {
|
||||
color: #50fa7b;
|
||||
}
|
||||
body.theme-dracula .form-status-error {
|
||||
color: #f55;
|
||||
}
|
||||
body.theme-dracula .donation-goal meter {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .settings-list {
|
||||
margin-left: 0;
|
||||
}
|
||||
body.theme-dracula .settings-list li {
|
||||
border: 1px solid #6272a4;
|
||||
background-color: #282a36;
|
||||
margin-bottom: 4px;
|
||||
padding: 0.4rem;
|
||||
}
|
||||
body.theme-dracula .settings-list form[name=account-default-theme] {
|
||||
margin: 8px 0;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order {
|
||||
border-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item {
|
||||
background-color: #282a36;
|
||||
margin: 4px 2px;
|
||||
padding: 0;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item.active a {
|
||||
color: #ff79c6;
|
||||
border-color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item a {
|
||||
color: #f8f8f2;
|
||||
margin: 0;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
body.theme-dracula .tab.tab-listing-order .tab-item a:hover {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .form-select:not([multiple]):not([size]) {
|
||||
border: 1px solid #6272a4;
|
||||
background-color: #282a36;
|
||||
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg%20xmlns="http://www.w3.org/2000/svg"%20viewBox="0%200%204%205"%3E%3Cpath%20fill="%23f8f8f2"%20d="M2%200L0%202h4zm0%205L0%203h4z"/%3E%3C/svg%3E');
|
||||
}
|
||||
body.theme-dracula .tab.tab-markdown-mode {
|
||||
border-bottom: none;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
body.theme-dracula .tab.tab-markdown-mode > .tab-item {
|
||||
margin-right: 4px;
|
||||
}
|
||||
body.theme-dracula .tab.tab-markdown-mode > .tab-item:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
body.theme-dracula .tab.tab-markdown-mode > .tab-item.active > .btn {
|
||||
background-color: #ff79c6;
|
||||
border-color: #ff79c6;
|
||||
color: #282a36;
|
||||
}
|
||||
body.theme-dracula .topic-listing > li:nth-of-type(n) {
|
||||
margin-bottom: 0.2rem;
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .post-listing .topic {
|
||||
background-color: #282a36;
|
||||
}
|
||||
body.theme-dracula .topic.is-topic-official {
|
||||
border-left-color: #f55;
|
||||
}
|
||||
body.theme-dracula .topic.is-topic-official h1 a,
|
||||
body.theme-dracula .topic.is-topic-official h1 a:visited {
|
||||
color: #f55;
|
||||
}
|
||||
body.theme-dracula .topic .topic-title a:hover {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .topic .topic-title a:visited {
|
||||
color: #ff79c6;
|
||||
}
|
||||
body.theme-dracula .topic .topic-info-comments a:visited {
|
||||
color: #8be9fd;
|
||||
}
|
||||
body.theme-dracula .topic div[aria-label="Link domain"],
|
||||
body.theme-dracula .topic .time-responsive {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
body.theme-dracula .topic-full .topic-full-byline {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
# Tildes Compact
|
||||
|
||||
> Hides some elements and changes some sizes to make the [Tildes.net](https://tildes.net) layout a little more compact.
|
||||
|
||||
## Changes
|
||||
|
||||
- Resizes the topic info (X comments, domain/user, date posted) width to 500px.
|
||||
- Reduces the bottom margin of topics and comments on your profile to 0.4rem.
|
||||
- Reduces the width of total tags to be displayed to 200px.
|
||||
- Hides all but the first 3 tags of a topic, if their total width is less than 200px.
|
||||
- Hides the topic text excerpt from the topic listing.
|
||||
- Hides the Tildes Extended user labels on the topic listing.
|
||||
- Hides the post buttons (vote/edit/label/...) buttons and amount of votes of comments on your profile.
|
||||
|
||||
## Installing
|
||||
|
||||
To install this theme, check out [the Wiki](https://gitlab.com/Bauke/styles/wikis/Installing-Styles).
|
||||
|
||||
## Screenshots
|
||||
|
||||
![Thread Listing Difference](img/screenshot-1.png)
|
||||
|
||||
![User Profile Difference](img/screenshot-2.png)
|
Binary file not shown.
Before Width: | Height: | Size: 35 KiB |
Binary file not shown.
Before Width: | Height: | Size: 21 KiB |
|
@ -1,36 +0,0 @@
|
|||
.topic-listing .topic-text-excerpt,
|
||||
.post-listing .topic-text-excerpt {
|
||||
display: none !important;
|
||||
}
|
||||
.topic-listing .topic-metadata,
|
||||
.post-listing .topic-metadata {
|
||||
display: inline-flex !important;
|
||||
height: 1.3em !important;
|
||||
max-width: 200px !important;
|
||||
overflow: hidden !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
.topic-listing .topic-tags li,
|
||||
.post-listing .topic-tags li {
|
||||
display: none !important;
|
||||
}
|
||||
.topic-listing .topic-tags:nth-child(-n+3),
|
||||
.post-listing .topic-tags:nth-child(-n+3) {
|
||||
display: inherit !important;
|
||||
}
|
||||
.topic-listing .topic-info,
|
||||
.post-listing .topic-info {
|
||||
width: 500px !important;
|
||||
}
|
||||
.topic-listing .user-label,
|
||||
.post-listing .user-label {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.post-listing .btn-post,
|
||||
.post-listing .comment-votes {
|
||||
display: none !important;
|
||||
}
|
||||
.post-listing > li {
|
||||
margin-bottom: unset !important;
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
/* ==UserStyle==
|
||||
@name Tildes Compact
|
||||
@namespace tildes.net
|
||||
@version 1.0.9
|
||||
@author Bauke
|
||||
@description Removes some elements and changes some sizes to make the Tildes.net layout a little more compact.
|
||||
@homepageURL https://gitlab.com/Bauke/styles
|
||||
@supportURL https://gitlab.com/Bauke/styles/issues
|
||||
@updateURL https://gitlab.com/Bauke/styles/raw/master/css/tildes-compact/tildes-compact.user.css
|
||||
@license MIT
|
||||
==/UserStyle== */
|
||||
@-moz-document domain("tildes.net") {
|
||||
.topic-listing .topic-text-excerpt,
|
||||
.post-listing .topic-text-excerpt {
|
||||
display: none !important;
|
||||
}
|
||||
.topic-listing .topic-metadata,
|
||||
.post-listing .topic-metadata {
|
||||
display: inline-flex !important;
|
||||
height: 1.3em !important;
|
||||
max-width: 200px !important;
|
||||
overflow: hidden !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
.topic-listing .topic-tags li,
|
||||
.post-listing .topic-tags li {
|
||||
display: none !important;
|
||||
}
|
||||
.topic-listing .topic-tags:nth-child(-n+3),
|
||||
.post-listing .topic-tags:nth-child(-n+3) {
|
||||
display: inherit !important;
|
||||
}
|
||||
.topic-listing .topic-info,
|
||||
.post-listing .topic-info {
|
||||
width: 500px !important;
|
||||
}
|
||||
.topic-listing .user-label,
|
||||
.post-listing .user-label {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.post-listing .btn-post,
|
||||
.post-listing .comment-votes {
|
||||
display: none !important;
|
||||
}
|
||||
.post-listing > li {
|
||||
margin-bottom: unset !important;
|
||||
}
|
||||
}
|
35
package.json
35
package.json
|
@ -1,24 +1,26 @@
|
|||
{
|
||||
"name": "bauke-styles",
|
||||
"version": "1.0.0",
|
||||
"name": "userstyles",
|
||||
"description": "A collection of all my userstyles for various websites.",
|
||||
"version": "0.1.0",
|
||||
"author": "Bauke <me@bauke.xyz>",
|
||||
"main": "build.js",
|
||||
"homepage": "https://bauke.xyz/userstyles",
|
||||
"repository": "https://git.holllo.cc/Bauke/userstyles",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "yarn test && STYLE_ENV=prod node .",
|
||||
"watch": "STYLE_ENV=dev nodemon . --watch source/ --ext scss",
|
||||
"start": "nodemon 'source/index.js' --watch 'source/' --ext 'scss'",
|
||||
"build": "USERSTYLE_ENV='production' node 'source/index.js'",
|
||||
"test": "xo && stylelint 'source/**/*.scss'"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"fs-extra": "^8.1.0",
|
||||
"nodemon": "^2.0.2",
|
||||
"dependencies": {
|
||||
"sass": "^1.22.12",
|
||||
"usercss-meta": "^0.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^4.2.5",
|
||||
"nodemon": "^2.0.2",
|
||||
"stylelint": "^13.2.0",
|
||||
"stylelint-config-xo-scss": "^0.12.0",
|
||||
"stylelint-config-xo-space": "^0.14.0",
|
||||
"usercss-creator": "^1.2.0",
|
||||
"xo": "^0.27.2"
|
||||
},
|
||||
"stylelint": {
|
||||
|
@ -27,7 +29,7 @@
|
|||
"stylelint-config-xo-space"
|
||||
],
|
||||
"ignoreFiles": [
|
||||
"css/**/*.css"
|
||||
"build/**/*.css"
|
||||
],
|
||||
"rules": {
|
||||
"at-rule-no-unknown": null,
|
||||
|
@ -37,6 +39,15 @@
|
|||
},
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"no-await-in-loop": "off"
|
||||
},
|
||||
"space": true
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "yarn test",
|
||||
"pre-push": "yarn test"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
const {promises: fsp} = require('fs');
|
||||
const {join} = require('path');
|
||||
|
||||
const {createUserstyle} = require('./utilities');
|
||||
|
||||
async function main() {
|
||||
// Make sure the `build/` directory exists.
|
||||
await fsp.mkdir(join(__dirname, '../build/'), {recursive: true});
|
||||
|
||||
// Create each userstyle and output them to `build/`.
|
||||
for (const style of styles) {
|
||||
await createUserstyle(style, 'build');
|
||||
}
|
||||
|
||||
// Log how many and which userstyles were built.
|
||||
const styleList = styles.map(style => `* ${style}`).join('\n');
|
||||
console.log(`Built ${styles.length} styles:\n${styleList}`);
|
||||
}
|
||||
|
||||
// Define the userstyles to build here.
|
||||
const styles = ['tildes-baukula', 'tildes-compact'];
|
||||
|
||||
// Export the `main()` function as `build()` for external use.
|
||||
module.exports = {
|
||||
build: main,
|
||||
styles
|
||||
};
|
||||
|
||||
// Run `main()` if this script was called directly (like `node source/index.js`).
|
||||
if (require.main === module) {
|
||||
main();
|
||||
}
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "Tildes Baukula",
|
||||
"namespace": "https://bauke.xyz/userstyles",
|
||||
"version": "2.0.0",
|
||||
"author": "Bauke <me@bauke.xyz>",
|
||||
"description": "Adaptations to the official Tildes Dracula theme to make it look like my old custom Tildes Dracula theme.",
|
||||
"homepageURL": "https://bauke.xyz/userstyles",
|
||||
"updateURL": "https://bauke.xyz/userstyles/tildes-baukula.user.css",
|
||||
"license": "MIT",
|
||||
"domain": "tildes.net"
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"name": "tildes-baukula",
|
||||
"version": "1.0.8",
|
||||
"usercss": {
|
||||
"name": "Tildes Baukula",
|
||||
"namespace": "tildes.net",
|
||||
"version": "1.0.8",
|
||||
"author": "Bauke",
|
||||
"description": "Adaptations to make the official Dracula theme look like my old one.",
|
||||
"homepageURL": "https://gitlab.com/Bauke/styles",
|
||||
"supportURL": "https://gitlab.com/Bauke/styles/issues",
|
||||
"updateURL": "https://gitlab.com/Bauke/styles/raw/master/css/tildes-baukula/tildes-baukula.user.css",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "Tildes Compact",
|
||||
"namespace": "https://bauke.xyz/userstyles",
|
||||
"version": "2.0.0",
|
||||
"author": "Bauke <me@bauke.xyz>",
|
||||
"description": "Removes elements and changes sizes to make Tildes more compact.",
|
||||
"homepageURL": "https://bauke.xyz/userstyles",
|
||||
"updateURL": "https://bauke.xyz/userstyles/tildes-compact.user.css",
|
||||
"license": "MIT",
|
||||
"domain": "tildes.net"
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"name": "tildes-compact",
|
||||
"version": "1.0.9",
|
||||
"usercss": {
|
||||
"name": "Tildes Compact",
|
||||
"namespace": "tildes.net",
|
||||
"version": "1.0.9",
|
||||
"author": "Bauke",
|
||||
"description": "Removes some elements and changes some sizes to make the Tildes.net layout a little more compact.",
|
||||
"homepageURL": "https://gitlab.com/Bauke/styles",
|
||||
"supportURL": "https://gitlab.com/Bauke/styles/issues",
|
||||
"updateURL": "https://gitlab.com/Bauke/styles/raw/master/css/tildes-compact/tildes-compact.user.css",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
const {promises: fsp} = require('fs');
|
||||
const {join} = require('path');
|
||||
const sass = require('sass');
|
||||
const usercss = require('usercss-meta');
|
||||
|
||||
/**
|
||||
* Creates the userstyle for a given style.
|
||||
* @param {string} style The style's source directory.
|
||||
* @param {string} dir The style's output directory.
|
||||
*/
|
||||
async function createUserstyle(style, dir) {
|
||||
// Read the style's metadata.
|
||||
const metadata = await readStyleMetadata(style);
|
||||
|
||||
// Build the style's CSS.
|
||||
const scss = sass.renderSync({
|
||||
file: join(__dirname, style, `${style}.scss`),
|
||||
outputStyle: 'expanded'
|
||||
});
|
||||
|
||||
// Insert the `@-moz-document domain()` into the CSS.
|
||||
const domain = metadata.domain;
|
||||
const css = `\n@-moz-document domain("${domain}") {\n${scss.css.toString()}\n}\n`;
|
||||
|
||||
// Remove the domain from the metadata, as it's not needed in the usercss data.
|
||||
delete metadata.domain;
|
||||
|
||||
// Create the userstyle.
|
||||
const userstyle = usercss.stringify(metadata, {alignKeys: true}) + css;
|
||||
|
||||
// Create the destination path for the userstyle.
|
||||
const destination = join(__dirname, '..', dir, `${style}.user.css`);
|
||||
|
||||
// Write the userstyle to file.
|
||||
return fsp.writeFile(destination, userstyle);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads and parses the `metadata.json` file from a given style.
|
||||
* @param {string} style The style's source directory.
|
||||
*/
|
||||
async function readStyleMetadata(style) {
|
||||
return JSON.parse(
|
||||
await fsp.readFile(join(__dirname, style, 'metadata.json'), 'utf8')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the given style has an `images/` directory.
|
||||
* @param {string} style The style's source directory.
|
||||
*/
|
||||
async function styleHasImages(style) {
|
||||
try {
|
||||
const styleStat = await fsp.stat(join(__dirname, style, 'images'));
|
||||
return styleStat.isDirectory();
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
createUserstyle,
|
||||
readStyleMetadata,
|
||||
styleHasImages
|
||||
};
|
73
yarn.lock
73
yarn.lock
|
@ -676,6 +676,14 @@ chalk@^3.0.0:
|
|||
ansi-styles "^4.1.0"
|
||||
supports-color "^7.1.0"
|
||||
|
||||
chalk@^4.0.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
|
||||
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
|
||||
dependencies:
|
||||
ansi-styles "^4.1.0"
|
||||
supports-color "^7.1.0"
|
||||
|
||||
character-entities-html4@^1.0.0:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-1.1.4.tgz#0e64b0a3753ddbf1fdc044c5fd01d0199a02e125"
|
||||
|
@ -821,6 +829,11 @@ commondir@^1.0.1:
|
|||
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
|
||||
integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=
|
||||
|
||||
compare-versions@^3.6.0:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62"
|
||||
integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==
|
||||
|
||||
component-emitter@^1.2.1:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
|
||||
|
@ -1678,6 +1691,13 @@ find-up@^4.0.0, find-up@^4.1.0:
|
|||
locate-path "^5.0.0"
|
||||
path-exists "^4.0.0"
|
||||
|
||||
find-versions@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e"
|
||||
integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==
|
||||
dependencies:
|
||||
semver-regex "^2.0.0"
|
||||
|
||||
flat-cache@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0"
|
||||
|
@ -2018,6 +2038,22 @@ http-cache-semantics@^4.0.0:
|
|||
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#13eeb612424bb113d52172c28a13109c46fa85d7"
|
||||
integrity sha512-Z2EICWNJou7Tr9Bd2M2UqDJq3A9F2ePG9w3lIpjoyuSyXFP9QbniJVu3XQYytuw5ebmG7dXSXO9PgAjJG8DDKA==
|
||||
|
||||
husky@^4.2.5:
|
||||
version "4.2.5"
|
||||
resolved "https://registry.yarnpkg.com/husky/-/husky-4.2.5.tgz#2b4f7622673a71579f901d9885ed448394b5fa36"
|
||||
integrity sha512-SYZ95AjKcX7goYVZtVZF2i6XiZcHknw50iXvY7b0MiGoj5RwdgRQNEHdb+gPDPCXKlzwrybjFjkL6FOj8uRhZQ==
|
||||
dependencies:
|
||||
chalk "^4.0.0"
|
||||
ci-info "^2.0.0"
|
||||
compare-versions "^3.6.0"
|
||||
cosmiconfig "^6.0.0"
|
||||
find-versions "^3.2.0"
|
||||
opencollective-postinstall "^2.0.2"
|
||||
pkg-dir "^4.2.0"
|
||||
please-upgrade-node "^3.2.0"
|
||||
slash "^3.0.0"
|
||||
which-pm-runs "^1.0.0"
|
||||
|
||||
iconv-lite@^0.4.24:
|
||||
version "0.4.24"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
||||
|
@ -3171,6 +3207,11 @@ open@^6.2.0:
|
|||
dependencies:
|
||||
is-wsl "^1.1.0"
|
||||
|
||||
opencollective-postinstall@^2.0.2:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259"
|
||||
integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==
|
||||
|
||||
optionator@^0.8.3:
|
||||
version "0.8.3"
|
||||
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
|
||||
|
@ -3398,6 +3439,13 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0:
|
|||
dependencies:
|
||||
find-up "^4.0.0"
|
||||
|
||||
please-upgrade-node@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942"
|
||||
integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==
|
||||
dependencies:
|
||||
semver-compare "^1.0.0"
|
||||
|
||||
plur@^3.0.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/plur/-/plur-3.1.1.tgz#60267967866a8d811504fe58f2faaba237546a5b"
|
||||
|
@ -3932,6 +3980,11 @@ sass@^1.22.12:
|
|||
dependencies:
|
||||
chokidar ">=2.0.0 <4.0.0"
|
||||
|
||||
semver-compare@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
|
||||
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
|
||||
|
||||
semver-diff@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36"
|
||||
|
@ -3946,6 +3999,11 @@ semver-diff@^3.1.1:
|
|||
dependencies:
|
||||
semver "^6.3.0"
|
||||
|
||||
semver-regex@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338"
|
||||
integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==
|
||||
|
||||
"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.4.1, semver@^5.5.0, semver@^5.7.1:
|
||||
version "5.7.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
||||
|
@ -4750,10 +4808,12 @@ use@^3.1.0:
|
|||
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
|
||||
integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
|
||||
|
||||
usercss-creator@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/usercss-creator/-/usercss-creator-1.2.0.tgz#3414a83d58982d3f209efa6d0460b98a0338c3d5"
|
||||
integrity sha512-NBesQFpsTt2ROdCgn5Y0Vwc9xfnBQnZE3jHnaovua+ekCbv4ldjn8QenOd1u915AnQi2qRn0T9rEtlchiN6nwA==
|
||||
usercss-meta@^0.9.0:
|
||||
version "0.9.0"
|
||||
resolved "https://registry.yarnpkg.com/usercss-meta/-/usercss-meta-0.9.0.tgz#f37746ed706c541dc5593ceb96ff5404060493e1"
|
||||
integrity sha512-S6AuhI11jc2xh6DIx3xR+4EU5/YiV0lLIvDhJgE5BTJTkcBEXrScJUIKVvzApGRou3lSLV0Qi4fVbSsN9BR6Ig==
|
||||
dependencies:
|
||||
semver-regex "^2.0.0"
|
||||
|
||||
util-deprecate@^1.0.1:
|
||||
version "1.0.2"
|
||||
|
@ -4803,6 +4863,11 @@ vfile@^3.0.0:
|
|||
unist-util-stringify-position "^1.0.0"
|
||||
vfile-message "^1.0.0"
|
||||
|
||||
which-pm-runs@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"
|
||||
integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=
|
||||
|
||||
which@^1.2.9, which@^1.3.1:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
|
||||
|
|
Loading…
Reference in New Issue