Skip to content

Commit

Permalink
Version 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicryc committed Nov 30, 2023
1 parent 0caa6d7 commit 6079f86
Show file tree
Hide file tree
Showing 18 changed files with 992 additions and 155 deletions.
84 changes: 67 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,134 @@

A custom and a personal interpretation CSS theme for Jellyfin.

![Film library overview](img/film-library.png)

## How to use?

### `icon-fix.css`
`icon-fix.css` is to fix Font Awesome Light icons related issues. To load it:
Load any CSS file you want using jsDelivr directly inside your settings (*Dashboard/General/Custom CSS code*). In the following replace `{filename}` with the CSS file you need.

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/icon-fix.css");
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/{filename}.css");
```

### `animation.css`
Creates an animation for the favorite and watched buttons in some context. Typically on the detail page. To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/animation.css");
```

### `backdrop-blur.css`
`backdrop-blur.css` adds a background blur effect when navigating Jellyfin. To load it:
Adds a background blur effect when navigating Jellyfin. To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/backdrop-blur.css");
```

![Detail page](./img/detail-page.png)

### `badge.css`
`badge.css` change the design of the badges (used in the dashboard mainly). To load it:
Changes the design of the badges (used in the dashboard mainly). To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/badge.css");
```

![Dashboard view focused on badges](./img/dashboard-badges.png)

### `button-icon.css`
Changes the appearance of icon-only buttons. It mainly removes the background color on hover. To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/button-icon.css");
```

### `button.css`
`button.css` creates a pretty 3D effect on buttons when hovering them among some little fixes. To load it:
Creates a 3D effect on block buttons when hovering them among some other little fixes. To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/button.css");
```

![Block buttons hovered](./img/block-buttons.png)

### `card.css`
`card.css` changes different elements in the cards (used to present medias) mainly the border radius. To load it:
Changes different elements in the cards (used to present medias) but mainly the border radius. To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/card.css");
```

![Favorite tab focused on media cards](./img/favorite-tab.png)

### `color.css`
`color.css` replaces accentuation colors by others. To load it:
Replaces accentuation colors by others. To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/color.css");
```

### `icon-fix.css`
Fixes Font Awesome Light icons related issues. To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/icon-fix.css");
```

### `input.css`
`input.css` slightly modifies text input, text area input and select input design. To load it:
Slightly modifies text input, text area input and select input design. To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/input.css");
```

![Dashboard view focused on inputs](./img/dashboard-inputs.png)

### `jellyfin-custom-theme.css`
General and little modifications of Jellyfin. To load it:
General and verious modifications of Jellyfin. To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/jellyfin-custom-theme.css");
```

### `keywords-position.css` (does not work)
Attempt to move the keywords and metadata providers links in the media detail pages below the poster. To load it:
Attempts to move the keywords and metadata providers links in the media detail pages below the poster. To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/keywords-position.css");
```

It works badly though.
**Note:** It works badly though.

### `media-player.css`
Styles the media player progression bar. To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/media-player.css");
```

### `tooltip.css`
Adds a tooltip for icon-only buttons in some context (in the header, on detail page etc.). To load it:

```css
@import url("https://cdn.jsdelivr.net/gh/Nicryc/jellyfin-meduse@main/tooltip.css");
```

## Recommendation
I recommend to load the file in this order:
I recommend to load the files in this order:
1. `jellyfin-custom-theme` (mandatory since it imports other CSS files)
2. `icon-fix`
3. `input`
4. `button`
5. `card`
6. `color`
7. `badge`
8. `backdrop-blur`
9. `keywords-position`
6. `media-player`
7. `tooltip`
8. `button-icon`
9. `color`
10. `badge`
11. `backdrop-blur`
12. `animation`
13. `keywords-position`

## Note
This theme doesn't intend to be cross-browser compatible and is only tested with Firefox.
215 changes: 215 additions & 0 deletions animation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
/* Remove background on buttons Favorite, Watched and More */
.cardOverlayButton[data-isfavorite]:hover, /* :has(span.favorite) */
.cardOverlayButton[data-played]:hover, /* :has(span.check) */
.cardOverlayButton[data-action="menu"]:hover /* :has(span.more_vert) */ {
background-color: transparent !important;
}

/* Increase the font weight when is watched or is favorite (fulfilled heart) */
.ratingbutton-withrating .ratingbutton-icon-withrating,
.playstatebutton-played .playstatebutton-icon-played {
font-weight: 900;
}

/* Allow animation to overflow the button limits (otherwise it is not visible) */
.cardOverlayButton, .listItemButton {
overflow: visible;
}

/* Center the animation origin using flexbox workaround */
span.detailButton-icon.favorite,
span.detailButton-icon.check,
button.listItemButton[data-isfavorite] span.material-icons.favorite,
button.listItemButton[data-played] span.material-icons.check {
display: flex;
justify-content: center;
align-items: center;
}

/********************************************/
/* Key frames definitions (animation steps) */
/********************************************/

@keyframes heart {
0%,
17.5% {
font-size: 0;
}
}

@keyframes check {
0%,
17.5% {
font-size: 0;
transform: rotate(360deg);
}
}

@keyframes bubble {
15% {
transform: scale(1);
border-color: #cc8ef5;
border-width: 1.75rem;
}

30%,
100% {
transform: scale(1);
border-color: #cc8ef5;
border-width: 0;
}
}

@keyframes particles {
0%,
20% {
opacity: 0;
}

25% {
opacity: 1;
box-shadow: 0.25981rem -1.9rem 0 0rem #ff8080,
-0.25981rem -1.6rem 0 0rem #ffed80,
1.64747rem -0.9815rem 0 0rem #ffed80,
1.08894rem -1.20071rem 0 0rem #a4ff80,
1.79455rem 0.67608rem 0 0rem #a4ff80,
1.6177rem 0.10274rem 0 0rem #80ffc8,
0.5903rem 1.82457rem 0 0rem #80ffc8,
0.92829rem 1.32882rem 0 0rem #80c8ff,
-1.05846rem 1.59911rem 0 0rem #80c8ff,
-0.46014rem 1.55428rem 0 0rem #a480ff,
-1.91018rem 0.1695rem 0 0rem #a480ff,
-1.50207rem 0.60933rem 0 0rem #ff80ed,
-1.32349rem -1.38776rem 0 0rem #ff80ed,
-1.41292rem -0.79446rem 0 0rem #ff8080;
}
}

/***********************************************************/
/******************** Common components ********************/
/***********************************************************/
/* Currently there is an animation for the watched and */
/* favorite buttons (check and heart) on the detail page, */
/* on the card overlay and on the TV show episodes list */
/***********************************************************/

button.cardOverlayButton[data-isfavorite].ratingbutton-withrating::before,
button.cardOverlayButton[data-isfavorite].ratingbutton-withrating::after,
button.cardOverlayButton[data-played].playstatebutton-played::before,
button.cardOverlayButton[data-played].playstatebutton-played::after,
button.detailButton[data-isfavorite].ratingbutton-withrating div::before,
button.detailButton[data-isfavorite].ratingbutton-withrating div::after,
button.detailButton[data-played].playstatebutton-played div::before,
button.detailButton[data-played].playstatebutton-played div::after,
button.listItemButton[data-isfavorite].ratingbutton-withrating::before,
button.listItemButton[data-isfavorite].ratingbutton-withrating::after,
button.listItemButton[data-played].playstatebutton-played::before,
button.listItemButton[data-played].playstatebutton-played::after {
/* will-change: font-size; */
animation: heart 1s cubic-bezier(0.17, 0.89, 0.32, 1.49);
animation-timing-function: ease-out;
}

button.cardOverlayButton[data-isfavorite].ratingbutton-withrating::before,
button.cardOverlayButton[data-played].playstatebutton-played::before,
button.detailButton[data-isfavorite].ratingbutton-withrating div::before,
button.detailButton[data-played].playstatebutton-played div::before,
button.listItemButton[data-isfavorite].ratingbutton-withrating::before,
button.listItemButton[data-played].playstatebutton-played::before {
/* will-change: transform, border-width, border-color; */
animation-name: bubble;
}

button.cardOverlayButton[data-isfavorite].ratingbutton-withrating::after,
button.cardOverlayButton[data-played].playstatebutton-played::after,
button.detailButton[data-isfavorite].ratingbutton-withrating div::after,
button.detailButton[data-played].playstatebutton-played div::after,
button.listItemButton[data-isfavorite].ratingbutton-withrating::after,
button.listItemButton[data-played].playstatebutton-played::after {
/* will-change: opacity, box-shadow; */
animation-name: particles;
}

button.cardOverlayButton[data-isfavorite]::before,
button.cardOverlayButton[data-isfavorite]::after,
button.detailButton[data-isfavorite] div::before,
button.detailButton[data-isfavorite] div::after,
button.cardOverlayButton[data-played]::before,
button.cardOverlayButton[data-played]::after,
button.detailButton[data-played] div::before,
button.detailButton[data-played] div::after,
button.listItemButton[data-isfavorite]::before,
button.listItemButton[data-isfavorite]::after,
button.listItemButton[data-played]::before,
button.listItemButton[data-played]::after {
position: absolute;
z-index: -1;
top: 50%;
left: 50%;
border-radius: 50%;
content: '';
}

button.cardOverlayButton[data-isfavorite]::before,
button.detailButton[data-isfavorite] div::before,
button.cardOverlayButton[data-played]::before,
button.detailButton[data-played] div::before,
button.listItemButton[data-isfavorite]::before,
button.listItemButton[data-played]::before {
box-sizing: border-box;
margin: -1.75rem;
border: solid 1.75rem #e2264d;
width: 3.5rem;
height: 3.5rem;
transform: scale(0);
}

button.cardOverlayButton[data-isfavorite]::after,
button.detailButton[data-isfavorite] div::after,
button.cardOverlayButton[data-played]::after,
button.detailButton[data-played] div::after,
button.listItemButton[data-isfavorite]::after,
button.listItemButton[data-played]::after {
margin: -0.15rem;
width: 0.3rem;
height: 0.3rem;
box-shadow: 0.25981rem -2.3375rem 0 -0.15rem #ff8080,
-0.25981rem -2.0375rem 0 -0.15rem #ffed80,
1.98952rem -1.25428rem 0 -0.15rem #ffed80,
1.43099rem -1.47349rem 0 -0.15rem #a4ff80,
2.22108rem 0.77344rem 0 -0.15rem #a4ff80,
2.04423rem 0.20009rem 0 -0.15rem #80ffc8,
0.78012rem 2.21874rem 0 -0.15rem #80ffc8,
1.11812rem 1.723rem 0 -0.15rem #80c8ff,
-1.24828rem 1.99329rem 0 -0.15rem #80c8ff,
-0.64996rem 1.94845rem 0 -0.15rem #a480ff,
-2.33671rem 0.26685rem 0 -0.15rem #a480ff,
-1.9286rem 0.70668rem 0 -0.15rem #ff80ed,
-1.66554rem -1.66053rem 0 -0.15rem #ff80ed,
-1.75497rem -1.06723rem 0 -0.15rem #ff8080;
}

/***************************************/
/** Favorite animation specific rules **/
/***************************************/

button.cardOverlayButton[data-isfavorite].ratingbutton-withrating span::before,
button.detailButton[data-isfavorite].ratingbutton-withrating div span::before,
button.listItemButton[data-isfavorite].ratingbutton-withrating span::before {
color: #e2264d;
/* will-change: font-size; */
animation: heart 1s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}

/**************************************/
/** Watched animation specific rules **/
/**************************************/

button.cardOverlayButton[data-played].playstatebutton-played span::before,
button.detailButton[data-played].playstatebutton-played div span,
button.detailButton[data-played].playstatebutton-played div span::before,
button.listItemButton[data-played].playstatebutton-played span::before {
color: #5dd000;
/* will-change: font-size, transform; */
animation: check 1s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}
Loading

0 comments on commit 6079f86

Please sign in to comment.