1
Fork 0

Compare commits

..

No commits in common. "3492d250f16f4c2506565b582343fd5af770b6d4" and "029ee3114e8297621c67052845051ed7c654b78c" have entirely different histories.

11 changed files with 2016 additions and 94 deletions

View File

@ -1,22 +1,19 @@
[package]
name = "userstyles"
description = "https://bauke.xyz/userstyles"
repository = "https://git.bauke.xyz/Bauke/userstyles"
license = "AGPL-3.0-or-later"
version = "1.0.0"
edition = "2021"
build = "source/build.rs"
edition = "2018"
repository = "https://git.holllo.cc/Bauke/userstyles"
license = "AGPL-3.0-or-later"
build="source/build.rs"
[lib]
path = "source/lib.rs"
[dependencies]
serde_json = "1.0.85"
thiserror = "1.0.37"
[dependencies.serde]
features = ["derive"]
version = "1.0.145"
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.67"
thiserror = "1.0.26"
[build-dependencies]
rsass = "0.23.4"
rsass = "0.22.2"

View File

@ -1,39 +0,0 @@
[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"
]

View File

@ -1,7 +0,0 @@
# 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.

View File

@ -1,22 +1,27 @@
{
"private": true,
"name": "userstyles",
"version": "0.0.0",
"license": "AGPL-3.0-or-later",
"scripts": {
"test": "cargo make complete-check && stylelint 'source/**/*.scss'"
"test": "stylelint 'source/**/*.scss'"
},
"devDependencies": {
"stylelint": "^14.12.1",
"stylelint-config-standard-scss": "^5.0.0"
"stylelint": "^13.13.1",
"stylelint-config-xo-scss": "^0.14.0",
"stylelint-config-xo-space": "^0.15.1"
},
"stylelint": {
"extends": [
"stylelint-config-standard-scss"
"stylelint-config-xo-scss",
"stylelint-config-xo-space"
],
"ignoreFiles": [
"build/**/*.css"
],
"rules": {
"at-rule-no-unknown": null,
"block-no-empty": null,
"no-descending-specificity": null,
"no-invalid-position-at-import-rule": null,
"string-quotes": "single"
"no-descending-specificity": null
}
}
}

View File

@ -1,20 +1,17 @@
//! # Userstyles 🎨
//!
//! > **Bauke's collection of userstyles.**
#![forbid(unsafe_code)]
#![warn(missing_docs, clippy::missing_docs_in_private_items)]
//! # https://bauke.xyz/userstyles
use serde::Deserialize;
/// All potential errors that could occur.
#[derive(Debug, thiserror::Error)]
pub enum Error {
/// [`std::io`] errors.
/// [`std::io::Error`]
#[error(transparent)]
Io(#[from] std::io::Error),
/// [`serde_json`] errors.
/// [`serde_json::Error`]
#[error(transparent)]
Json(#[from] serde_json::Error),
}
@ -28,7 +25,6 @@ pub const ALL_USERSTYLES: &[Userstyles] =
pub enum Userstyles {
/// Tildes Baukula
TildesBaukula,
/// Tildes Compact
TildesCompact,
}
@ -38,10 +34,8 @@ pub enum Userstyles {
pub struct Userstyle {
/// Compiled CSS.
pub css: String,
/// An optional image.
pub image: Option<Vec<u8>>,
/// Metadata of the userstyle.
pub metadata: UserstyleMetadata,
}
@ -51,30 +45,22 @@ pub struct Userstyle {
pub struct UserstyleMetadata {
/// The name.
pub name: String,
/// The namespace.
pub namespace: String,
/// The version.
pub version: String,
/// The author.
pub author: String,
/// The description.
pub description: String,
/// The homepage URL.
#[serde(rename = "homepageURL")]
pub homepage_url: String,
/// The update URL.
#[serde(rename = "updateURL")]
pub update_url: String,
/// The license.
pub license: String,
/// The domain for `@-moz-document domain`.
pub domain: String,
}

View File

@ -1,6 +1,5 @@
.btn {
@include color-hover($cyan, $background);
transition: none;
&:hover,
@ -10,9 +9,8 @@
}
&.btn-link {
@include color-hover($cyan, $background);
border: 1px solid $cyan;
@include color-hover($cyan, $background);
&:hover {
border-color: $pink;

View File

@ -54,3 +54,4 @@
background-color: $selection;
}
}

View File

@ -34,9 +34,8 @@ a.site-header-logo:hover {
a.logged-in-user-alert,
a.logged-in-user-alert:visited {
@include background-hover($orange, $yellow);
color: $background;
@include background-hover($orange, $yellow);
padding: 0.1rem 0.3rem;
}
@ -57,7 +56,7 @@ a.logged-in-user-alert:visited {
}
// Target all label-topic-tags expect spoiler and nsfw ones
.label.label-topic-tag:not([class*='label-topic-tag-spoiler'], [class*='label-topic-tag-nsfw']) {
.label.label-topic-tag:not([class*='label-topic-tag-spoiler']):not([class*='label-topic-tag-nsfw']) {
color: $comment;
a {

View File

@ -21,17 +21,15 @@
a {
@include color-hover($foreground, $cyan);
margin: 0;
padding: 4px 8px;
}
}
}
.form-select:not([multiple], [size]) {
.form-select:not([multiple]):not([size]) {
border: 1px solid $comment;
background-color: $background;
// 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');
}

View File

@ -2,6 +2,7 @@
@import 'mixins';
body {
background-color: $background;
@import 'blog';
@import 'buttons';
@import 'comments';
@ -14,6 +15,4 @@ body {
@import 'tabs';
@import 'topic-listing';
@import 'topics';
background-color: $background;
}

1985
yarn.lock Normal file

File diff suppressed because it is too large Load Diff