First Commit

This commit is contained in:
marco
2026-09-01 10:46:29 -03:00
commit bf96b77e9c
10000 changed files with 3508600 additions and 0 deletions
+92
View File
@@ -0,0 +1,92 @@
{% extends "layouts/dashboard.twig" %}
{% block title %}{{ title }} - {{ platformName }}{% endblock %}
{% block content %}
<div class="container-fluid px-4">
<h1 class="mt-4">{{ title }}</h1>
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item"><a href="{{ url('dashboard') }}">{{ __('layout.menu.dashboard') }}</a></li>
<li class="breadcrumb-item"><a href="{{ url('admin/themes') }}">Temas</a></li>
<li class="breadcrumb-item active">Personalizar</li>
</ol>
{% if session_has('success') or current_uri matches '/success=1/' %}
<div class="alert alert-success alert-dismissible fade show" role="alert">
Configurações salvas com sucesso!
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endif %}
<div class="row">
<div class="col-lg-8">
<form action="{{ url('admin/themes/' ~ theme ~ '/customize/save') }}" method="POST">
{% for section in config.sections %}
<div class="card mb-4">
<div class="card-header bg-light">
<i class="bi bi-gear-fill me-1"></i>
<strong>{{ section.title }}</strong>
</div>
<div class="card-body">
{% for field in section.fields %}
<div class="mb-3 row align-items-center">
<label for="{{ field.id }}" class="col-sm-4 col-form-label">{{ field.label }}</label>
<div class="col-sm-8">
{% if field.type == 'color' %}
<div class="d-flex align-items-center">
<input type="color" class="form-control form-control-color me-2" id="{{ field.id }}" name="{{ field.id }}" value="{{ field.value }}" title="Escolha a cor">
<code>{{ field.value }}</code>
</div>
{% elseif field.type == 'text' %}
<input type="text" class="form-control" id="{{ field.id }}" name="{{ field.id }}" value="{{ field.value }}">
{% elseif field.type == 'switch' %}
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="{{ field.id }}" name="{{ field.id }}" value="1" {{ field.value ? 'checked' : '' }}>
</div>
{% elseif field.type == 'select' %}
<select class="form-select" id="{{ field.id }}" name="{{ field.id }}">
{% for val, label in field.options %}
<option value="{{ val }}" {{ field.value == val ? 'selected' : '' }}>{{ label }}</option>
{% endfor %}
</select>
{% endif %}
{% if field.description %}
<div class="form-text">{{ field.description }}</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
<div class="d-grid gap-2 d-md-flex justify-content-md-end mb-5">
<a href="{{ url('admin/themes') }}" class="btn btn-secondary">Cancelar</a>
<button type="submit" class="btn btn-primary">Salvar Alterações</button>
</div>
</form>
</div>
<div class="col-lg-4">
<div class="card mb-4 shadow-sm">
<div class="card-header bg-primary text-white">
<i class="bi bi-info-circle me-1"></i>
Dica de Uso
</div>
<div class="card-body">
<p>Essas configurações são injetadas automaticamente no seu tema.</p>
<p>Você pode acessá-las no Twig usando:</p>
<pre class="bg-light p-2 rounded"><code>{{ '{{ theme_settings.campo_id }}' }}</code></pre>
<hr>
<h6>Exemplo de CSS dinâmico:</h6>
<pre class="bg-light p-2 rounded small"><code>&lt;style&gt;
:root {
--primary-color: {{ '{{ theme_settings.primary_color }}' }};
}
&lt;/style&gt;</code></pre>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
+53
View File
@@ -0,0 +1,53 @@
{% extends "layouts/dashboard.twig" %}
{% block title %}{{ __('systemconfig.title') }}{% endblock %}
{% block content %}
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">{{ __('systemconfig.title') }}</h1>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">{{ __('systemconfig.general_settings') }}</h6>
</div>
<div class="card-body">
<form method="POST" action="{{ url('admin/systemconfig/update') }}">
{{ csrf_field()|raw }}
{% if configs|length > 0 %}
{% for config in configs %}
<div class="mb-3">
<label for="{{ config.system_config_key }}" class="form-label fw-bold">
{{ config.system_config_description ? config.system_config_description : config.system_config_key }}
</label>
{% if config.system_config_type == 'boolean' %}
<select class="form-select" id="{{ config.system_config_key }}" name="{{ config.system_config_key }}">
<option value="1" {% if config.system_config_value == '1' %}selected{% endif %}>{{ __('systemconfig.yes') }}</option>
<option value="0" {% if config.system_config_value == '0' %}selected{% endif %}>{{ __('systemconfig.no') }}</option>
</select>
{% elseif config.system_config_type == 'textarea' %}
<textarea class="form-control" id="{{ config.system_config_key }}" name="{{ config.system_config_key }}" rows="3">{{ config.system_config_value }}</textarea>
{% else %}
<input type="text" class="form-control" id="{{ config.system_config_key }}" name="{{ config.system_config_key }}" value="{{ config.system_config_value }}">
{% endif %}
<div class="form-text text-muted small">{{ __('systemconfig.key') }}: {{ config.system_config_key }}</div>
</div>
{% endfor %}
{% else %}
<div class="alert alert-info">
{{ __('systemconfig.no_configs') }}
</div>
{% endif %}
<div class="mt-4">
<button type="submit" class="btn btn-primary">
<i class="bi bi-save"></i> {{ __('systemconfig.save_changes') }}
</button>
</div>
</form>
</div>
</div>
{% endblock %}
+82
View File
@@ -0,0 +1,82 @@
{% extends 'layouts/dashboard.twig' %}
{% block title %}{{ title }}{% endblock %}
{% block content %}
<div class="container-fluid px-4">
<h1 class="mt-4">Temas</h1>
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item"><a href="{{ url('admin') }}">Dashboard</a></li>
<li class="breadcrumb-item active">Temas</li>
</ol>
<div class="row">
{% for slug, theme in themes %}
<div class="col-xl-4 col-md-6 mb-4">
<div class="card h-100 theme-card {% if slug == activeTheme %}border-primary border-3{% endif %} shadow-sm">
{% if theme.screenshot %}
<img src="{{ theme.screenshot }}" class="card-img-top" alt="{{ theme.name }}" style="height: 200px; object-fit: cover;">
{% else %}
<div class="card-img-top bg-secondary d-flex align-items-center justify-content-center text-white" style="height: 200px;">
<i class="bi bi-image" style="font-size: 4rem;"></i>
</div>
{% endif %}
<div class="card-body">
<h5 class="card-title d-flex justify-content-between align-items-center">
{{ theme.name }}
{% if slug == activeTheme %}
<span class="badge bg-primary">Ativo</span>
{% endif %}
</h5>
<p class="card-text text-muted small">{{ theme.description|slice(0, 100) }}{% if theme.description|length > 100 %}...{% endif %}</p>
<div class="theme-meta mb-3">
<span class="badge bg-light text-dark">v{{ theme.version }}</span>
<span class="badge bg-light text-dark">Por: {{ theme.author }}</span>
</div>
</div>
<div class="card-footer bg-white border-top-0 pb-3">
<div class="d-grid gap-2">
{% if slug == activeTheme %}
{% if theme.is_customizable %}
<a href="{{ url('admin/themes/' ~ slug ~ '/customize') }}" class="btn btn-outline-primary">Personalizar</a>
{% else %}
<button class="btn btn-outline-secondary" disabled title="Este tema não suporta o Customizer">Personalizar</button>
{% endif %}
{% else %}
<form action="{{ url('admin/themes/activate/' ~ slug) }}" method="POST">
{{ csrf_field()|raw }}
<button type="submit" class="btn btn-primary w-100">Ativar</button>
</form>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
{# Card para Adicionar Novo Tema (Simulação) #}
<div class="col-xl-4 col-md-6 mb-4">
<div class="card h-100 border-dashed d-flex align-items-center justify-content-center bg-light" style="border: 2px dashed #dee2e6; min-height: 350px;">
<div class="text-center p-5">
<i class="bi bi-plus-circle text-muted" style="font-size: 3rem;"></i>
<h5 class="mt-3 text-muted">Adicionar Novo Tema</h5>
<p class="text-muted small">Faça upload de um arquivo .zip ou explore o repositório.</p>
<button class="btn btn-outline-primary btn-sm mt-2" disabled>Upload (Breve)</button>
</div>
</div>
</div>
</div>
</div>
<style>
.theme-card:hover {
transform: translateY(-5px);
transition: all 0.3s ease;
}
.border-dashed {
border-style: dashed !important;
}
</style>
{% endblock %}