Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

9.0 KB
Raw Blame
// ============================================
// DOWNLOADS PAGE STYLES
// ============================================

.downloads-page {
    .loading-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: $space-12;
        color: $text-secondary;

        .loading-spinner {
            width: 40px;
            height: 40px; // geometry: spinner
            border: 3px solid $border-default;
            border-top-color: $accent-primary;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: $space-4;
        }
    }

    .alert-error {
        background: $danger-bg;
        border: 1px solid $danger-border;
        border-radius: $radius-card;
        padding: $space-4;
        margin-bottom: $space-6;
        display: flex;
        align-items: center;
        justify-content: space-between;

        p {
            color: $danger;
            margin: 0;
        }

        button {
            background: transparent;
            border: 1px solid $danger;
            color: $danger;
            padding: $space-2 $space-4;
            border-radius: $radius-control;
            cursor: pointer;
            transition: all 0.2s;

            &:hover {
                background: $danger;
                color: $white;
            }
        }
    }

    // Version Banner
    .version-banner {
        background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
        border-radius: $radius-card;
        padding: $space-6 $space-8;
        margin-bottom: $space-8;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: $white;

        @media (max-width: $breakpoint-md) {
            flex-direction: column;
            align-items: flex-start;
            gap: $space-4;
            padding: $space-5;
        }

        .version-info {
            display: flex;
            flex-direction: column;
            gap: $space-1;

            .version-label {
                font-size: $text-xs;
                opacity: 0.8;
            }

            .version-number {
                font-size: $text-2xl;
                font-weight: $font-weight-semibold;
            }

            .version-date {
                font-size: $text-xs;
                opacity: 0.75;
            }
        }

        .version-actions {
            display: flex;
            align-items: center;
            gap: $space-3;
        }

        .btn-banner-outline {
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.4);
            color: $white;
            height: $control-md;
            padding: 0 $space-4;
            border-radius: $radius-control;
            font-size: $text-xs;
            cursor: pointer;
            transition: all 0.2s;

            &:hover {
                background: rgba(255, 255, 255, 0.1);
                border-color: rgba(255, 255, 255, 0.7);
            }
        }

        .btn-banner-primary {
            background: $white;
            color: $accent-primary;
            border: none;
            height: $control-md;
            padding: 0 $space-5;
            border-radius: $radius-control;
            font-size: $text-xs;
            font-weight: $font-weight-semibold;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: $space-2;
            transition: all 0.2s;

            svg {
                width: 16px;
                height: 16px;
            }

            &:hover {
                background: rgba(255, 255, 255, 0.9);
                transform: translateY(-1px);
            }
        }
    }

    // Sections
    .downloads-section {
        margin-bottom: $space-10;

        h2 {
            font-size: $text-lg;
            font-weight: $font-weight-semibold;
            margin-bottom: $space-2;
        }

        .section-description {
            color: $text-secondary;
            margin-bottom: $space-6;

            code {
                background: $bg-secondary;
                padding: $space-1 $space-2;
                border-radius: $radius-badge;
                font-family: $font-mono;
                font-size: $text-xs;
            }
        }
    }

    // Download Cards
    .download-cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: $space-4;
    }

    .download-card {
        background: $bg-card;
        border: 1px solid $border-default;
        border-radius: $radius-card;
        padding: $space-6;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: $space-3;
        transition: all 0.2s;

        &:hover {
            border-color: $accent-primary;
            box-shadow: inset 0 0 0 1px $accent-primary; // geometry: doubles the hover border
        }

        &.unavailable {
            opacity: 0.5;

            &:hover {
                border-color: $border-default;
                box-shadow: none;
            }
        }

        .platform-icon-wrapper {
            width: 56px;
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: $bg-elevated;
            border-radius: $radius-card;
            margin-bottom: $space-1;

            .platform-icon {
                width: 32px;
                height: 32px; // geometry: icon
                color: $text-primary;
            }
        }

        .platform-info {
            h3 {
                font-size: $text-lg;
                font-weight: $font-weight-semibold;
                margin: 0 0 $space-1;
            }

            .platform-arch {
                font-size: $text-xs;
                color: $text-secondary;
            }
        }

        .download-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: $space-2;
            width: 100%;
            margin-top: auto;

            svg {
                width: 18px;
                height: 18px;
            }
        }
    }

    // Install Commands
    .install-commands {
        display: flex;
        flex-direction: column;
        gap: $space-4;
    }

    .command-block {
        background: $bg-card;
        border: 1px solid $border-default;
        border-radius: $radius-card;
        overflow: hidden;

        .command-header {
            display: flex;
            align-items: center;
            gap: $space-3;
            padding: $space-4;
            border-bottom: 1px solid $border-default;
            background: $bg-elevated;

            .platform-icon {
                width: 24px;
                height: 24px; // geometry: icon
                color: $text-primary;
            }

            h3 {
                font-size: $text-base;
                font-weight: $font-weight-semibold;
                margin: 0;
            }
        }

        .command-content {
            padding: $space-4;
            background: $bg-body;
        }

        .command-note {
            padding: $space-3 $space-4;
            @include status-variant($warning, $warning-bg);
            font-size: $text-xs;
            margin: 0;
            border-top: 1px solid $warning-border;
        }
    }

    // Manual Steps
    .manual-steps {
        display: flex;
        flex-direction: column;
        gap: $space-4;
    }

    .step {
        display: flex;
        gap: $space-4;
        padding: $space-4;
        background: $bg-card;
        border: 1px solid $border-default;
        border-radius: $radius-card;

        .step-number {
            flex-shrink: 0;
            width: 32px;
            height: 32px; // geometry: step-number disc
            background: $accent-primary;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: $font-weight-semibold;
            font-size: $text-xs;
            color: $white;
        }

        .step-content {
            flex: 1;

            h4 {
                font-size: $text-base;
                font-weight: $font-weight-semibold;
                margin: 0 0 $space-2;
            }

            p {
                color: $text-secondary;
                margin: 0 0 $space-2;
                font-size: $text-xs;

                &:last-child {
                    margin-bottom: 0;
                }

                code {
                    background: $bg-secondary;
                    padding: $space-1 $space-2;
                    border-radius: $radius-badge;
                    font-family: $font-mono;
                    font-size: $text-xs;
                    color: $text-primary;
                }
            }

            .step-note {
                color: $text-tertiary;
                font-size: $text-xs;
                font-style: italic;
            }
        }
    }

    // Verification
    .verification-command {
        margin-top: $space-4;
    }
}