• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Themes & Styles Finimalism Theme (Offline)

     
    • 0 Vote(s) - 0 Average

    Finimalism Theme (Offline)

    Finimalism can now be used offline on Linux
    LadyZero Away

    Junior Member

    Posts: 16
    Threads: 5
    Joined: 2025 Jan
    Reputation: 2
    Country:Australia
    #1
    2025-02-04, 03:18 AM
    Theme creator: https://github.com/tedhinklater/finimalism

    [Image: 68747470733a2f2f692e696d6775722e636f6d2f...2e6a706567]

    Code:
    #!/bin/bash

    # Set variables
    THEME_DIR="/usr/share/jellyfin/web/themes/finimalism7"
    FONT_URL="https://fonts.googleapis.com/css2?family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000&display=swap"
    FONT_DIR="$THEME_DIR/fonts"
    LOCAL_FONT_CSS="$THEME_DIR/fonts.css"
    MAIN_CSS="$THEME_DIR/finimalism7.css"
    GITHUB_RAW="https://raw.githubusercontent.com/tedhinklater/finimalism/main"

    # Function to download and process fonts
    download_fonts() {
        sudo mkdir -p "$FONT_DIR"
        sudo curl -s "$FONT_URL" | sudo tee "$LOCAL_FONT_CSS" > /dev/null

        # Download ALL font files from the CSS
        sudo grep -oP "https://fonts\.gstatic\.com/s/sofiasans/v16/[^\s)]*\.ttf" "$LOCAL_FONT_CSS" | while read -r font_url; do
            font_file=$(basename "$font_url")
            sudo curl -s "$font_url" -o "$FONT_DIR/$font_file"
            echo "Downloaded: $font_file"
        done

        # Replace ALL Google font URLs with local paths
        sudo sed -i 's|https://fonts\.gstatic\.com/s/sofiasans/v16/|/web/themes/finimalism7/fonts/|g' "$LOCAL_FONT_CSS"
    }

    # Function to update theme CSS files
    update_theme_css() {
        sudo wget -O "$MAIN_CSS" "$GITHUB_RAW/finimalism7.css"
        sudo wget -O "$THEME_DIR/libraryCardAriaText.css" "$GITHUB_RAW/libraryCardAriaText.css"
        sudo wget -O "$THEME_DIR/theme.css" "$GITHUB_RAW/theme.css"
       
        # Ensure the directory exists and has correct permissions
        sudo mkdir -p "$THEME_DIR/libary-cards"
        sudo chown $USER:$USER "$THEME_DIR/libary-cards"
        sudo chmod 755 "$THEME_DIR/libary-cards"

        # Download libary-cards folder contents (images)
        for image in Audiobooks.png Books.png Boxsets.png Games.png HomeVideos.png Movies.png Music.png MusicVideos.png Photos.png Playlists.png TVShows.png; do
            if sudo wget -O "$THEME_DIR/libary-cards/$image" "$GITHUB_RAW/libary-cards/$image"; then
                echo "Downloaded: $image"
                sudo chown $USER:$USER "$THEME_DIR/libary-cards/$image"
                sudo chmod 644 "$THEME_DIR/libary-cards/$image"
            else
                echo "Failed to download: $image"
            fi
        done
       
        # Replace Google Fonts link with local fonts.css
        sudo sed -i 's|https://fonts.googleapis.com/css2?family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000&display=swap|/web/themes/finimalism7/fonts.css?family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000|g' "$MAIN_CSS"
       
        # Update the first line to use local fonts.css
        sudo sed -i '1s|@import url("https://fonts.googleapis.com/css2?family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000&display=swap");|@import url("/web/themes/finimalism7/fonts.css?family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000");|' "$MAIN_CSS"
       
        # Replace remaining https://fonts.gstatic.com URLs
        sudo sed -i 's|https://fonts.gstatic.com/s/sofiasans/v16/|/web/themes/finimalism7/fonts/|g' "$MAIN_CSS"
       
        echo -e "\n/* Imports */\n@import url('/web/themes/finimalism7/fonts.css?family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000');\n@import url('/web/themes/finimalism7/libraryCardAriaText.css');\n@import url('/web/themes/finimalism7/theme.css');" | sudo tee -a "$MAIN_CSS" > /dev/null
    }

    # Function to check and update files
    check_and_update_files() {
        echo "Checking and updating files..."
       
        # Update fonts.css
        if [ -f "$LOCAL_FONT_CSS" ]; then
            sudo sed -i 's|https://fonts.gstatic.com/s/sofiasans/v16/|/web/themes/finimalism7/fonts/|g' "$LOCAL_FONT_CSS"
            echo "Updated fonts.css"
        fi
       
        # Update main CSS file
        if [ -f "$MAIN_CSS" ]; then
            sudo sed -i 's|https://fonts.googleapis.com/css2?family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000&display=swap|/web/themes/finimalism7/fonts.css?family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000|g' "$MAIN_CSS"
            sudo sed -i '1s|@import url("https://fonts.googleapis.com/css2?family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000&display=swap");|@import url("/web/themes/finimalism7/fonts.css?family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000");|' "$MAIN_CSS"
            sudo sed -i 's|https://fonts.gstatic.com/s/sofiasans/v16/|/web/themes/finimalism7/fonts/|g' "$MAIN_CSS"
            echo "Updated main CSS file"
        fi
       
        # Self-check
        echo "Performing self-check..."
        local issues_found=false
       
        # Check fonts.css
        if [ -f "$LOCAL_FONT_CSS" ]; then
            if grep -q "https://fonts.gstatic.com/s/sofiasans/v16/" "$LOCAL_FONT_CSS"; then
                echo "WARNING: fonts.css still contains references to Google Fonts."
                issues_found=true
            fi
        else
            echo "WARNING: fonts.css file not found."
            issues_found=true
        fi
       
        # Check main CSS file
        if [ -f "$MAIN_CSS" ]; then
            if grep -q "https://fonts.googleapis.com/css2?family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000&display=swap" "$MAIN_CSS"; then
                echo "WARNING: Main CSS file still contains references to Google Fonts CSS."
                issues_found=true
            fi
            if grep -q "https://fonts.gstatic.com/s/sofiasans/v16/" "$MAIN_CSS"; then
                echo "WARNING: Main CSS file still contains references to Google Fonts."
                issues_found=true
            fi
        else
            echo "WARNING: Main CSS file not found."
            issues_found=true
        fi
       
        if [ "$issues_found" = false ]; then
            echo "Self-check completed. All files appear to be correctly updated."
        else
            echo "Self-check completed. Some issues were found. Please review the warnings above."
        fi
    }

    # Main menu
    echo "Finimalism7 Theme Installer/Updater"
    echo "1. Full Install"
    echo "2. Update Fonts Only"
    echo "3. Update Theme CSS Files Only"
    echo "4. Check and Update Files"
    echo "Please enter your choice (1-4):"
    read choice

    case $choice in
        1)
            echo "You're about to perform a full install. This will download all theme files and fonts."
            read -p "Do you want to continue? (y/n): " confirm
            if [[ $confirm == [Yy]* ]]; then
                echo "Performing full install..."
                sudo mkdir -p "$THEME_DIR"
                download_fonts
                update_theme_css
                check_and_update_files
            else
                echo "Operation cancelled."
            fi
            ;;
        2)
            echo "You're about to update fonts only. This will download all font files."
            read -p "Do you want to continue? (y/n): " confirm
            if [[ $confirm == [Yy]* ]]; then
                echo "Updating fonts only..."
                download_fonts
                check_and_update_files
            else
                echo "Operation cancelled."
            fi
            ;;
        3)
            echo "You're about to update theme CSS files only. This will download all theme files."
            read -p "Do you want to continue? (y/n): " confirm
            if [[ $confirm == [Yy]* ]]; then
                echo "Updating theme CSS files only..."
                update_theme_css
                check_and_update_files
            else
                echo "Operation cancelled."
            fi
            ;;
        4)
            echo "You're about to check and update all files."
            read -p "Do you want to continue? (y/n): " confirm
            if [[ $confirm == [Yy]* ]]; then
                check_and_update_files
            else
                echo "Operation cancelled."
            fi
            ;;
        *)
            echo "Invalid choice. Exiting."
            exit 1
            ;;
    esac

    # Set permissions
    sudo chown -R jellyfin:jellyfin "$THEME_DIR"
    sudo chmod -R 755 "$THEME_DIR"

    echo "Operation completed."
    echo "Please add the following line to Jellyfin's Custom CSS:"
    echo "@import url(\"/web/themes/finimalism7/finimalism7.css\");"

    Add this to custom CSS code in dashboard settings
    Code:
    @import url("/web/themes/finimalism7/finimalism7.css");

    @import url("/web/themes/finimalism7/libraryCardAriaText.css");


    This Linux bash script automates the installation and management of the Finimalism7 theme for offline use. It provides you with four options: full installation, font updates, theme CSS file updates, and file verification. The script handles downloading theme assets, managing file permissions, replacing Google Font references with local files, and ensuring correct ownership for the Jellyfin service.

    .sh file attachment as not allowed and for good reason Winking-face
    Ted Hinklater
    Offline

    Member

    Posts: 149
    Threads: 8
    Joined: 2023 Nov
    Reputation: 22
    Country:United Kingdom
    #2
    2025-02-04, 09:06 AM
    Clever stuff, ty!
    LadyZero Away

    Junior Member

    Posts: 16
    Threads: 5
    Joined: 2025 Jan
    Reputation: 2
    Country:Australia
    #3
    2025-02-20, 05:11 PM
    (2025-02-04, 09:06 AM)Ted Hinklater Wrote: Clever stuff, ty!

    Only just realised that you're the theme creator!
    Thank you for creating this.
    Neurotik
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2025 Feb
    Reputation: 0
    #4
    2025-02-24, 07:16 PM
    Hi,

    this Theme looks awesome i'm implementing it to my jellyfin. I got just one question there is any way to increase the Font Size? Right now i'm just importing in the dashboard CSS.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode