Skip to content

Commit

Permalink
ForumImprovements: create, release v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Saltssaumure committed Jun 24, 2024
1 parent 289bdb3 commit 9242c5b
Show file tree
Hide file tree
Showing 15 changed files with 273 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
[DiscordReimaginedPreview1]: https://minidiscordthemes.github.io/Snippets/DiscordReimagined/preview.avif
[DiscordReimaginedPreview2]: https://minidiscordthemes.github.io/Snippets/DiscordReimagined/previewColor.avif
[EfficientSettingsPreview]: https://minidiscordthemes.github.io/Snippets/EfficientSettings/preview.avif
[ForumImprovementsPreview1]: https://minidiscordthemes.github.io/Snippets/ForumImprovements/newpost-after.avif
[ForumImprovementsPreview2]: https://minidiscordthemes.github.io/Snippets/ForumImprovements/tagfilter-after.avif
[ImageLinkPreview]: https://minidiscordthemes.github.io/Snippets/ImageLink/preview.avif
[MessageBarGreyEmojiPreview]: https://minidiscordthemes.github.io/Snippets/MessageBarGreyEmoji/preview.avif
[MinimalAuthAppsPreview]: https://minidiscordthemes.github.io/Snippets/MinimalAuthApps/preview.avif
Expand Down Expand Up @@ -64,6 +66,7 @@
| [Channel List Width](themes/ChannelListWidth) | ![preview][ChannelListWidthPreview1] ![preview][ChannelListWidthPreview2] |
| [Clippy Status](themes/ClippyStatus) | ![preview][ClippyStatusPreview1] ![preview][ClippyStatusPreview2] |
| [Efficient Settings](themes/EfficientSettings) | ![preview][EfficientSettingsPreview] |
| [Forum Improvements](themes/ForumImprovements) | ![preview][ForumImprovementsPreview1] ![preview][ForumImprovementsPreview2] |
| [Image Link](themes/ImageLink) | ![preview][ImageLinkPreview] |
| [Message Bar Grey Emoji](themes/MessageBarGreyEmoji) | ![preview][MessageBarGreyEmojiPreview] |
| [Minimal Auth Apps](themes/MinimalAuthApps) | ![preview][MinimalAuthAppsPreview] |
Expand Down Expand Up @@ -140,7 +143,7 @@ See each snippet's README for the import, Replugged install link, Vencord online
See [CONTRIBUTING.md](.github/CONTRIBUTING.md).

## License
[MIT license](LICENSE)
This collection of snippets is licensed under the [MIT license](LICENSE).

### Credits
See each snippet's README for credits.
Expand Down
34 changes: 34 additions & 0 deletions themes/ForumImprovements/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[newpost-1]: https://minidiscordthemes.github.io/Snippets/ForumImprovements/newpost-before.avif
[newpost-2]: https://minidiscordthemes.github.io/Snippets/ForumImprovements/newpost-after.avif
[tagfilter-1]: https://minidiscordthemes.github.io/Snippets/ForumImprovements/tagfilter-before.avif
[tagfilter-2]: https://minidiscordthemes.github.io/Snippets/ForumImprovements/tagfilter-after.avif

# Forum Improvements
![Status: working](https://img.shields.io/badge/status-working-green?style=flat-square)

Various forum improvements.
- Hover to show all tags in post filter bar and new post tagging.
- Switch smoothly between markdown and preview in the post editor.
- View and edit post attachments easily.
- View the whole image without clicking in gallery view.
- No more jittering hovered posts.
- ...and various bug fixes.

| Post editor | Tag filter |
| :------------------------------: | :-------------------------------: |
| ![Post editor][newpost-1] Before | ![Tag filter][tagfilter-1] Before |
| ![Post editor][newpost-2] After | ![Tag filter][tagfilter-2] After |

## Usage
### `@import`
```css
@import url("https://minidiscordthemes.github.io/Snippets/ForumImprovements/main.css");
```
### Replugged automatic theme
[Install now](https://replugged.dev/install?identifier=net.saltssaumure.ForumImprovements)
### Replugged manual theme
[Download now](https://github.com/MiniDiscordThemes/Snippets/releases/latest/download/net.saltssaumure.ForumImprovements.asar)
### Vencord online theme
```
https://minidiscordthemes.github.io/Snippets/ForumImprovements/main.css
```
25 changes: 25 additions & 0 deletions themes/ForumImprovements/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id": "net.saltssaumure.ForumImprovements",
"name": "Forum Improvements",
"description": "A collection of forum improvements, details listed on GitHub.",
"author": [
{
"name": "Saltssaumure",
"discordID": "134142022092062720",
"github": "Saltssaumure"
}
],
"version": "1.1.1",
"updater": {
"type": "store",
"id": "net.saltssaumure.ForumImprovements"
},
"license": "MIT",
"type": "replugged-theme",
"main": "scss/main.scss",
"source": "https://github.com/MiniDiscordThemes/Snippets/blob/main/themes/ForumImprovements",
"image": [
"https://minidiscordthemes.github.io/Snippets/ForumImprovements/newpost-after.avif",
"https://minidiscordthemes.github.io/Snippets/ForumImprovements/tagfilter-after.avif"
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions themes/ForumImprovements/scss/_actionsbar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Make post actions bar actually sticky
.scrollerInner_e2e187 {
overflow: unset;

// Hide divider
.divider_af45f8 {
display: none;
}

// Actions bar always acts as header
.container_b385c8 {
box-shadow: var(--elevation-low);
border-top-color: transparent;
}
}
47 changes: 47 additions & 0 deletions themes/ForumImprovements/scss/_attachment.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// New post attachments
.popout_a15d29 {
height: calc(18px + var(--custom-forum-composer-attachments-attachment-size) + 24px);

@at-root .uploadContainer_df1eaf {
// Image attachment
.imageSmall_f847a3 {
border-radius: 12px 12px 0 0;

.spoilerContainer_a3d0f7 {
border-radius: 12px 12px 0 0;
}
}

// Attachment options
@at-root .actionBarContainer_df1eaf {
top: unset;
bottom: 0;

@at-root .smallActionBar_df1eaf {
transform: none;
opacity: 1;

@at-root .wrapper_ef319f {
border-radius: 0 0 12px 12px;
}
}
}
}
}

// Small attachments
.imageSmall_f847a3 {
// Non-image attachments
&.icon_f847a3 {
background-color: var(--background-primary);
background-size: 60%;
}

.spoilerContainer_a3d0f7 {
border-radius: 12px;

.spoilerWarning_a3d0f7 {
zoom: 0.7;
}
}
}
48 changes: 48 additions & 0 deletions themes/ForumImprovements/scss/_card.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Forum posts
.mainCard_a6d69a {
&:hover {
transform: none;
}

// Image attachment in gallery view
// Don't stretch the image
.imageCover_a57509 {
object-fit: contain;
background: var(--background-secondary);
}

// Gif indicator, post tags
@at-root :is(.mediaIconsRow_a57509, .tagsRow_a57509) {
transition: opacity 0.2s;

// Hide content overlays on hover
.postBody_a57509:hover & {
opacity: 0;
}

// Replace gif icon with modern gif icon
.mediaIcon_a57509 {
background-image: url("https://discord.com/assets/c5a74fc51ff67682b11a.svg");
height: 22px;
path {
fill: transparent;
}
}
}

// Thumbnail attachment in list view
@at-root .thumbnailContainer_d331f1 {
// Center the thumbnail
.loadingOverlay_d4597d {
display: flex;
align-items: center;
justify-content: center;
}

// Stop alt text pushing thumbnail up
.altText_cf58b5 {
position: absolute;
z-index: -1;
}
}
}
23 changes: 23 additions & 0 deletions themes/ForumImprovements/scss/_preview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// New post preview
// Match position as closely as possible to the post editor
.previewForm_c1668f {
padding: 0;
margin: 1px 12px 0 0;
border: 0;
outline: 2px solid var(--background-modifier-selected);
border-radius: var(--radius-xs);

// Prevent long no-whitespace text from overflowing
width: calc(100% - 24px - 78px - (2 * 12px));
.contentContainer_c1668f {
width: 100%;
}

// Do not add extra space for preview indicator
.previewModeIndicator_c1668f {
position: absolute;
pointer-events: none;
bottom: 4px;
right: 4px;
}
}
6 changes: 6 additions & 0 deletions themes/ForumImprovements/scss/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@forward "./tagbar/";

@forward "./actionsbar";
@forward "./attachment";
@forward "./card";
@forward "./preview";
39 changes: 39 additions & 0 deletions themes/ForumImprovements/scss/tagbar/_filter.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Tag filter bar
.tagsContainer_a6d69a {
gap: 16px;
align-items: flex-start;

// Post sort order
.sortDropdown_a6d69a {
}

// Divider
.divider_a6d69a {
display: none;
}

// Tag list
.tagList_a6d69a {
height: auto;
max-height: 32px;
transition: max-height 0.2s ease;
&:is(:hover, :has(.selected_c993da)) {
max-height: 256px;
}

.tagListInner_a6d69a {
justify-content: center;
}
}

// See all tags
.tagsButton_a6d69a {
position: static;
margin-left: 0;
}

// See more tags (currently does nothing)
@at-root .tagsButtonPlaceholder_a6d69a {
display: none;
}
}
30 changes: 30 additions & 0 deletions themes/ForumImprovements/scss/tagbar/_newpost.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// New post tags bar
.tagsContainer_c1668f {
align-items: flex-start;

// Tag icon
.tagsIcon_c1668f {
height: 24px;
}

// Tags list
.tagList_c1668f {
height: auto;
max-height: 24px;
transition: max-height 0.2s ease;
&:is(:hover, :has(.selected_c993da)) {
max-height: 192px;
}
}

// See more tags
.tagsButton_c1668f {
position: static;
margin-left: 0;
}

// ??? (currently does nothing)
@at-root .tagsButtonPlaceholder_c1668f {
display: none;
}
}
2 changes: 2 additions & 0 deletions themes/ForumImprovements/scss/tagbar/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@forward "./filter";
@forward "./newpost";

0 comments on commit 9242c5b

Please sign in to comment.