Compare commits
2 Commits
029ee3114e
...
3492d250f1
Author | SHA1 | Date |
---|---|---|
Bauke | 3492d250f1 | |
Bauke | 96f72dd8ba |
17
Cargo.toml
17
Cargo.toml
|
@ -1,19 +1,22 @@
|
||||||
[package]
|
[package]
|
||||||
name = "userstyles"
|
name = "userstyles"
|
||||||
description = "https://bauke.xyz/userstyles"
|
description = "https://bauke.xyz/userstyles"
|
||||||
version = "1.0.0"
|
repository = "https://git.bauke.xyz/Bauke/userstyles"
|
||||||
edition = "2018"
|
|
||||||
repository = "https://git.holllo.cc/Bauke/userstyles"
|
|
||||||
license = "AGPL-3.0-or-later"
|
license = "AGPL-3.0-or-later"
|
||||||
|
version = "1.0.0"
|
||||||
|
edition = "2021"
|
||||||
build = "source/build.rs"
|
build = "source/build.rs"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
path = "source/lib.rs"
|
path = "source/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "1.0.130", features = ["derive"] }
|
serde_json = "1.0.85"
|
||||||
serde_json = "1.0.67"
|
thiserror = "1.0.37"
|
||||||
thiserror = "1.0.26"
|
|
||||||
|
[dependencies.serde]
|
||||||
|
features = ["derive"]
|
||||||
|
version = "1.0.145"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
rsass = "0.22.2"
|
rsass = "0.23.4"
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
[tasks.fmt]
|
||||||
|
command = "cargo"
|
||||||
|
args = ["fmt", "${@}"]
|
||||||
|
|
||||||
|
[tasks.check]
|
||||||
|
command = "cargo"
|
||||||
|
args = ["check", "${@}"]
|
||||||
|
|
||||||
|
[tasks.clippy]
|
||||||
|
command = "cargo"
|
||||||
|
args = ["clippy", "${@}"]
|
||||||
|
|
||||||
|
[tasks.test]
|
||||||
|
command = "cargo"
|
||||||
|
args = ["test", "${@}"]
|
||||||
|
|
||||||
|
[tasks.doc]
|
||||||
|
command = "cargo"
|
||||||
|
args = ["doc", "${@}"]
|
||||||
|
|
||||||
|
[tasks.build]
|
||||||
|
command = "cargo"
|
||||||
|
args = ["build", "${@}"]
|
||||||
|
|
||||||
|
[tasks.complete-check]
|
||||||
|
dependencies = ["fmt", "check", "clippy", "test", "doc", "build"]
|
||||||
|
|
||||||
|
[tasks.code-coverage]
|
||||||
|
workspace = false
|
||||||
|
install_crate = "cargo-tarpaulin"
|
||||||
|
command = "cargo"
|
||||||
|
args = [
|
||||||
|
"tarpaulin",
|
||||||
|
"--exclude-files=target/*",
|
||||||
|
"--out=html",
|
||||||
|
"--output-dir=coverage",
|
||||||
|
"--skip-clean",
|
||||||
|
"--target-dir=target/tarpaulin"
|
||||||
|
]
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Userstyles 🎨
|
||||||
|
|
||||||
|
> **Bauke's collection of userstyles.**
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Distributed under the [AGPL-3.0-or-later](https://spdx.org/licenses/AGPL-3.0-or-later.html) license, see [LICENSE](https://git.bauke.xyz/Bauke/userstyles/src/branch/main/LICENSE) for more information.
|
21
package.json
21
package.json
|
@ -1,27 +1,22 @@
|
||||||
{
|
{
|
||||||
"name": "userstyles",
|
"private": true,
|
||||||
"version": "0.0.0",
|
|
||||||
"license": "AGPL-3.0-or-later",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "stylelint 'source/**/*.scss'"
|
"test": "cargo make complete-check && stylelint 'source/**/*.scss'"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"stylelint": "^13.13.1",
|
"stylelint": "^14.12.1",
|
||||||
"stylelint-config-xo-scss": "^0.14.0",
|
"stylelint-config-standard-scss": "^5.0.0"
|
||||||
"stylelint-config-xo-space": "^0.15.1"
|
|
||||||
},
|
},
|
||||||
"stylelint": {
|
"stylelint": {
|
||||||
"extends": [
|
"extends": [
|
||||||
"stylelint-config-xo-scss",
|
"stylelint-config-standard-scss"
|
||||||
"stylelint-config-xo-space"
|
|
||||||
],
|
|
||||||
"ignoreFiles": [
|
|
||||||
"build/**/*.css"
|
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"at-rule-no-unknown": null,
|
"at-rule-no-unknown": null,
|
||||||
"block-no-empty": null,
|
"block-no-empty": null,
|
||||||
"no-descending-specificity": null
|
"no-descending-specificity": null,
|
||||||
|
"no-invalid-position-at-import-rule": null,
|
||||||
|
"string-quotes": "single"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,20 @@
|
||||||
|
//! # Userstyles 🎨
|
||||||
|
//!
|
||||||
|
//! > **Bauke's collection of userstyles.**
|
||||||
|
|
||||||
#![forbid(unsafe_code)]
|
#![forbid(unsafe_code)]
|
||||||
#![warn(missing_docs, clippy::missing_docs_in_private_items)]
|
#![warn(missing_docs, clippy::missing_docs_in_private_items)]
|
||||||
|
|
||||||
//! # https://bauke.xyz/userstyles
|
|
||||||
|
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
/// All potential errors that could occur.
|
/// All potential errors that could occur.
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// [`std::io::Error`]
|
/// [`std::io`] errors.
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Io(#[from] std::io::Error),
|
Io(#[from] std::io::Error),
|
||||||
/// [`serde_json::Error`]
|
|
||||||
|
/// [`serde_json`] errors.
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Json(#[from] serde_json::Error),
|
Json(#[from] serde_json::Error),
|
||||||
}
|
}
|
||||||
|
@ -25,6 +28,7 @@ pub const ALL_USERSTYLES: &[Userstyles] =
|
||||||
pub enum Userstyles {
|
pub enum Userstyles {
|
||||||
/// Tildes Baukula
|
/// Tildes Baukula
|
||||||
TildesBaukula,
|
TildesBaukula,
|
||||||
|
|
||||||
/// Tildes Compact
|
/// Tildes Compact
|
||||||
TildesCompact,
|
TildesCompact,
|
||||||
}
|
}
|
||||||
|
@ -34,8 +38,10 @@ pub enum Userstyles {
|
||||||
pub struct Userstyle {
|
pub struct Userstyle {
|
||||||
/// Compiled CSS.
|
/// Compiled CSS.
|
||||||
pub css: String,
|
pub css: String,
|
||||||
|
|
||||||
/// An optional image.
|
/// An optional image.
|
||||||
pub image: Option<Vec<u8>>,
|
pub image: Option<Vec<u8>>,
|
||||||
|
|
||||||
/// Metadata of the userstyle.
|
/// Metadata of the userstyle.
|
||||||
pub metadata: UserstyleMetadata,
|
pub metadata: UserstyleMetadata,
|
||||||
}
|
}
|
||||||
|
@ -45,22 +51,30 @@ pub struct Userstyle {
|
||||||
pub struct UserstyleMetadata {
|
pub struct UserstyleMetadata {
|
||||||
/// The name.
|
/// The name.
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
|
||||||
/// The namespace.
|
/// The namespace.
|
||||||
pub namespace: String,
|
pub namespace: String,
|
||||||
|
|
||||||
/// The version.
|
/// The version.
|
||||||
pub version: String,
|
pub version: String,
|
||||||
|
|
||||||
/// The author.
|
/// The author.
|
||||||
pub author: String,
|
pub author: String,
|
||||||
|
|
||||||
/// The description.
|
/// The description.
|
||||||
pub description: String,
|
pub description: String,
|
||||||
|
|
||||||
/// The homepage URL.
|
/// The homepage URL.
|
||||||
#[serde(rename = "homepageURL")]
|
#[serde(rename = "homepageURL")]
|
||||||
pub homepage_url: String,
|
pub homepage_url: String,
|
||||||
|
|
||||||
/// The update URL.
|
/// The update URL.
|
||||||
#[serde(rename = "updateURL")]
|
#[serde(rename = "updateURL")]
|
||||||
pub update_url: String,
|
pub update_url: String,
|
||||||
|
|
||||||
/// The license.
|
/// The license.
|
||||||
pub license: String,
|
pub license: String,
|
||||||
|
|
||||||
/// The domain for `@-moz-document domain`.
|
/// The domain for `@-moz-document domain`.
|
||||||
pub domain: String,
|
pub domain: String,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.btn {
|
.btn {
|
||||||
@include color-hover($cyan, $background);
|
@include color-hover($cyan, $background);
|
||||||
|
|
||||||
transition: none;
|
transition: none;
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
|
@ -9,9 +10,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.btn-link {
|
&.btn-link {
|
||||||
border: 1px solid $cyan;
|
|
||||||
@include color-hover($cyan, $background);
|
@include color-hover($cyan, $background);
|
||||||
|
|
||||||
|
border: 1px solid $cyan;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: $pink;
|
border-color: $pink;
|
||||||
background-color: $pink;
|
background-color: $pink;
|
||||||
|
|
|
@ -54,4 +54,3 @@
|
||||||
background-color: $selection;
|
background-color: $selection;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,9 @@ a.site-header-logo:hover {
|
||||||
|
|
||||||
a.logged-in-user-alert,
|
a.logged-in-user-alert,
|
||||||
a.logged-in-user-alert:visited {
|
a.logged-in-user-alert:visited {
|
||||||
color: $background;
|
|
||||||
@include background-hover($orange, $yellow);
|
@include background-hover($orange, $yellow);
|
||||||
|
|
||||||
|
color: $background;
|
||||||
padding: 0.1rem 0.3rem;
|
padding: 0.1rem 0.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +57,7 @@ a.logged-in-user-alert:visited {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Target all label-topic-tags expect spoiler and nsfw ones
|
// Target all label-topic-tags expect spoiler and nsfw ones
|
||||||
.label.label-topic-tag:not([class*='label-topic-tag-spoiler']):not([class*='label-topic-tag-nsfw']) {
|
.label.label-topic-tag:not([class*='label-topic-tag-spoiler'], [class*='label-topic-tag-nsfw']) {
|
||||||
color: $comment;
|
color: $comment;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
|
|
@ -21,15 +21,17 @@
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@include color-hover($foreground, $cyan);
|
@include color-hover($foreground, $cyan);
|
||||||
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-select:not([multiple]):not([size]) {
|
.form-select:not([multiple], [size]) {
|
||||||
border: 1px solid $comment;
|
border: 1px solid $comment;
|
||||||
background-color: $background;
|
background-color: $background;
|
||||||
|
|
||||||
// Changes the "from last X period" icon to be the same color as the foreground, it's hardcoded though
|
// Changes the "from last X period" icon to be the same color as the foreground, it's hardcoded though
|
||||||
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');
|
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');
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
@import 'mixins';
|
@import 'mixins';
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: $background;
|
|
||||||
@import 'blog';
|
@import 'blog';
|
||||||
@import 'buttons';
|
@import 'buttons';
|
||||||
@import 'comments';
|
@import 'comments';
|
||||||
|
@ -15,4 +14,6 @@ body {
|
||||||
@import 'tabs';
|
@import 'tabs';
|
||||||
@import 'topic-listing';
|
@import 'topic-listing';
|
||||||
@import 'topics';
|
@import 'topics';
|
||||||
|
|
||||||
|
background-color: $background;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue