OpenNIT

Quelltext des aktuellen Standes

Fassung 1.1.1

403.php

6 KB
<?php $this->layout('layouts/main', ['page_title' => 'Zugriff verweigert', 'breadcrumbs' => [], 'full_width' => true]); ?>

<div class="error-fullwidth">
    <div class="error-scene">
        <div class="error-card">
            <div class="error-icon-wrap error-icon-403">
                <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
                    <rect x="3" y="11" width="18" height="11" rx="2" ry="2"/>
                    <path d="M7 11V7a5 5 0 0 1 10 0v4"/>
                    <circle cx="12" cy="16" r="1"/>
                </svg>
            </div>

            <div class="error-code">403</div>
            <h1><?= $this->te('Zugriff verweigert') ?></h1>

            <p class="error-desc">
                <?= $this->te('Sie haben keine Berechtigung, auf diese Seite zuzugreifen.') ?>
            </p>

            <div class="error-detail">
                <div class="detail-row">
                    <span class="detail-label"><?= $this->te('Angeforderte Seite') ?></span>
                    <span class="detail-value"><?= $this->e($_SERVER['REQUEST_URI'] ?? '/') ?></span>
                </div>
                <div class="detail-row">
                    <span class="detail-label"><?= $this->te('Status') ?></span>
                    <span class="detail-badge badge-denied"><?= $this->te('Zugriff verweigert') ?></span>
                </div>
            </div>

            <p class="error-hint">
                <?= $this->te('Falls Sie Zugang ben&ouml;tigen, wenden Sie sich bitte an einen Administrator.') ?>
            </p>

            <div class="error-actions">
                <a href="/" class="btn-err btn-err-primary">
                    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9,22 9,12 15,12 15,22"/></svg>
                    <?= $this->te('Startseite') ?>
                </a>
                <a href="/topics" class="btn-err btn-err-secondary">
                    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg>
                    <?= $this->te('Themengebiete') ?>
                </a>
                <a href="javascript:history.back()" class="btn-err btn-err-ghost">
                    <?= $this->te('&larr; Zur&uuml;ck') ?>
                </a>
            </div>
        </div>
    </div>
</div>

<style>
.error-fullwidth {
    min-height: calc(100vh - 60px);
    background: var(--slate-50);
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-scene {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
}

.error-card {
    background: var(--color-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 20px 40px -8px rgba(0,0,0,0.08);
    padding: 2.5rem 2rem;
    text-align: center;
}

.error-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.error-icon-wrap svg {
    width: 36px;
    height: 36px;
}

.error-icon-403 {
    background: var(--red-50);
    color: var(--red-600);
}

.error-code {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--red-600), var(--red-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.error-card h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.75rem;
}

.error-desc {
    font-size: 0.95rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

.error-detail {
    background: var(--gray-50);
    border-radius: 0.625rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
}

.detail-row + .detail-row {
    border-top: 1px solid var(--gray-100);
}

.detail-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

.detail-value {
    font-size: 0.8rem;
    color: var(--gray-900);
    font-weight: 500;
    font-family: ui-monospace, 'SF Mono', monospace;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-denied {
    background: var(--red-50);
    color: var(--red-600);
}

.error-hint {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin: 0 0 1.75rem;
}

.error-actions {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-err {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.625rem 1.125rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-err:hover {
    text-decoration: none;
}

.btn-err-primary {
    background: var(--blue-600);
    color: var(--color-on-accent);
}

.btn-err-primary:hover {
    background: var(--blue-700);
}

.btn-err-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-err-secondary:hover {
    background: var(--gray-200);
}

.btn-err-ghost {
    background: transparent;
    color: var(--gray-500);
}

.btn-err-ghost:hover {
    color: var(--gray-900);
    background: var(--gray-50);
}

@media (max-width: 640px) {
    .error-scene {
        padding: 1rem;
    }

    .error-card {
        padding: 2rem 1.5rem;
    }

    .error-code {
        font-size: 2.75rem;
    }

    .error-actions {
        flex-direction: column;
    }

    .btn-err {
        justify-content: center;
    }
}
</style>