Fix linting issues.
This commit is contained in:
		
							parent
							
								
									96f72dd8ba
								
							
						
					
					
						commit
						3492d250f1
					
				|  | @ -1,17 +1,20 @@ | |||
| //! # 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::Error`]
 | ||||
|   /// [`std::io`] errors.
 | ||||
|   #[error(transparent)] | ||||
|   Io(#[from] std::io::Error), | ||||
|   /// [`serde_json::Error`]
 | ||||
| 
 | ||||
|   /// [`serde_json`] errors.
 | ||||
|   #[error(transparent)] | ||||
|   Json(#[from] serde_json::Error), | ||||
| } | ||||
|  | @ -25,6 +28,7 @@ pub const ALL_USERSTYLES: &[Userstyles] = | |||
| pub enum Userstyles { | ||||
|   /// Tildes Baukula
 | ||||
|   TildesBaukula, | ||||
| 
 | ||||
|   /// Tildes Compact
 | ||||
|   TildesCompact, | ||||
| } | ||||
|  | @ -34,8 +38,10 @@ 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, | ||||
| } | ||||
|  | @ -45,22 +51,30 @@ 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, | ||||
| } | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| .btn { | ||||
|   @include color-hover($cyan, $background); | ||||
| 
 | ||||
|   transition: none; | ||||
| 
 | ||||
|   &:hover, | ||||
|  | @ -9,9 +10,10 @@ | |||
|   } | ||||
| 
 | ||||
|   &.btn-link { | ||||
|     border: 1px solid $cyan; | ||||
|     @include color-hover($cyan, $background); | ||||
| 
 | ||||
|     border: 1px solid $cyan; | ||||
| 
 | ||||
|     &:hover { | ||||
|       border-color: $pink; | ||||
|       background-color: $pink; | ||||
|  |  | |||
|  | @ -54,4 +54,3 @@ | |||
|     background-color: $selection; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -34,8 +34,9 @@ a.site-header-logo:hover { | |||
| 
 | ||||
| a.logged-in-user-alert, | ||||
| a.logged-in-user-alert:visited { | ||||
|   color: $background; | ||||
|   @include background-hover($orange, $yellow); | ||||
| 
 | ||||
|   color: $background; | ||||
|   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 | ||||
| .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; | ||||
| 
 | ||||
|   a { | ||||
|  |  | |||
|  | @ -21,15 +21,17 @@ | |||
| 
 | ||||
|     a { | ||||
|       @include color-hover($foreground, $cyan); | ||||
| 
 | ||||
|       margin: 0; | ||||
|       padding: 4px 8px; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| .form-select:not([multiple]):not([size]) { | ||||
| .form-select:not([multiple], [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'); | ||||
| } | ||||
|  |  | |||
|  | @ -2,7 +2,6 @@ | |||
| @import 'mixins'; | ||||
| 
 | ||||
| body { | ||||
|   background-color: $background; | ||||
|   @import 'blog'; | ||||
|   @import 'buttons'; | ||||
|   @import 'comments'; | ||||
|  | @ -15,4 +14,6 @@ body { | |||
|   @import 'tabs'; | ||||
|   @import 'topic-listing'; | ||||
|   @import 'topics'; | ||||
| 
 | ||||
|   background-color: $background; | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue