mirror of
https://github.com/Superredstone/patrickcanal.it.git
synced 2026-11-19 04:41:15 +01:00
chore: fix pre-commit hook
This commit is contained in:
15 files changed
+137
-42
No files matched your search
@@ -8,9 +8,6 @@ devenv.local.yaml
|
||||
# direnv
|
||||
.direnv
|
||||
|
||||
# pre-commit
|
||||
.pre-commit-config.yaml
|
||||
|
||||
*.sqlite3
|
||||
|
||||
*.pyc
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
repos:
|
||||
- repo: https://github.com/djlint/djLint
|
||||
rev: v1.46.1
|
||||
hooks:
|
||||
- id: djlint-reformat-django
|
||||
language: system
|
||||
- id: djlint-django
|
||||
language: system
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.16.6
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
language: system
|
||||
- id: ruff-format
|
||||
language: system
|
||||
-14
@@ -13,18 +13,4 @@
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
git-hooks.hooks = {
|
||||
ruff = {
|
||||
enable = true;
|
||||
package = pkgs.ruff;
|
||||
excludes = [ "migrations/" ];
|
||||
};
|
||||
djlint = {
|
||||
enable = true;
|
||||
name = "djlint";
|
||||
entry = "djlint --check .";
|
||||
types = [ "html" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -18,13 +18,14 @@ Including another URLconf
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from django.urls import include, path
|
||||
|
||||
from portfolio.views import IndexView
|
||||
from patrickcanal_it.views import IndexView
|
||||
|
||||
urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
path("", IndexView.as_view(), name="index"),
|
||||
path("portfolio/", include("portfolio.urls")),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
from django.shortcuts import redirect
|
||||
from django.views.generic import View
|
||||
|
||||
|
||||
class IndexView(View):
|
||||
def get(self, request, *args, **kwargs):
|
||||
return redirect("portfolio")
|
||||
@@ -7,10 +7,17 @@ from portfolio import models
|
||||
class JobExperienceAdmin(admin.ModelAdmin):
|
||||
pass
|
||||
|
||||
|
||||
@admin.register(models.JobTask)
|
||||
class JobTaskAdmin(admin.ModelAdmin):
|
||||
pass
|
||||
|
||||
|
||||
@admin.register(models.Company)
|
||||
class CompanyAdmin(admin.ModelAdmin):
|
||||
pass
|
||||
|
||||
|
||||
@admin.register(models.Project)
|
||||
class ProjectAdmin(admin.ModelAdmin):
|
||||
list_display = ["name", "short_description"]
|
||||
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 6.1 on 2026-08-30 18:10
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('portfolio', '0002_alter_company_options_jobexperience_position'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Project',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=256, verbose_name='Name')),
|
||||
('short_description', models.CharField(max_length=512, verbose_name='Short description')),
|
||||
('url', models.URLField(blank=True, verbose_name='URL')),
|
||||
],
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='jobtask',
|
||||
name='job',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='job_tasks', to='portfolio.jobexperience'),
|
||||
),
|
||||
]
|
||||
+15
-1
@@ -38,9 +38,23 @@ class JobExperience(models.Model):
|
||||
|
||||
class JobTask(models.Model):
|
||||
job = models.ForeignKey(
|
||||
to=JobExperience, null=False, blank=False, on_delete=models.CASCADE, related_name="job_tasks"
|
||||
to=JobExperience,
|
||||
null=False,
|
||||
blank=False,
|
||||
on_delete=models.CASCADE,
|
||||
related_name="job_tasks",
|
||||
)
|
||||
description = models.TextField(verbose_name=_("Description"), max_length=4192)
|
||||
|
||||
def __str__(self):
|
||||
return self.job.__str__()
|
||||
|
||||
|
||||
class Project(models.Model):
|
||||
name = models.CharField(
|
||||
verbose_name=_("Name"), max_length=256, null=False, blank=False
|
||||
)
|
||||
short_description = models.CharField(
|
||||
verbose_name=_("Short description"), max_length=512, blank=False, null=False
|
||||
)
|
||||
url = models.URLField(verbose_name=_("URL"), blank=True, null=False)
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<a href="" class="btn btn-primary btn-lg me-2">My projects</a>
|
||||
<a href="{% url 'projects' %}" class="btn btn-primary btn-lg me-2">My projects</a>
|
||||
<a href="" class="btn btn-outline-secondary btn-lg">Contact me</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,7 +67,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card h-full">
|
||||
<div class="card-body d-flex align-items-center flex-column">
|
||||
<div class="w-24 h-30 text-5xl pt-4">
|
||||
<i class="fa-solid fa-server fa-2xl"></i>
|
||||
@@ -96,7 +96,7 @@
|
||||
<div class="card-body">
|
||||
<p class="text-primary mb-0">{{ je.start }} - {% if je.end %}{{ je.end }}{% else %}{% trans "today" %}{% endif %}</p>
|
||||
<h2 class="fs-2">{{ je.position }}</h2>
|
||||
<div class="">
|
||||
<div>
|
||||
<div class="text-danger">{{ je.company.name }}</div>
|
||||
<div class="text-secondary">{{ je.company.location }}</div>
|
||||
<div class="mt-2 text-white">
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
<div class="container mt-4">
|
||||
<div class="row row-deck row-cards">
|
||||
{% for project in object_list %}
|
||||
<div class="col-md-4">
|
||||
{% if project.url %}
|
||||
<a class="card card-link card-link-pop" href="{{ project.url }}">
|
||||
<div class="card-body">
|
||||
<h4>{{ project.name }}</h4>
|
||||
<p>{{ project.short_description }}</p>
|
||||
</div>
|
||||
</a>
|
||||
{% else %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4>{{ project.name }}</h4>
|
||||
<p>{{ project.short_description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,8 @@
|
||||
from django.urls import path
|
||||
|
||||
from portfolio import views
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.PortfolioView.as_view(), name="portfolio"),
|
||||
path("projects/", views.ProjectList.as_view(), name="projects"),
|
||||
]
|
||||
+10
-3
@@ -1,10 +1,17 @@
|
||||
from django.views.generic import TemplateView
|
||||
from django.views.generic import ListView, TemplateView
|
||||
|
||||
from portfolio import models
|
||||
|
||||
|
||||
class IndexView(TemplateView):
|
||||
class PortfolioView(TemplateView):
|
||||
template_name = "index.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
return {"job_experiences": models.JobExperience.objects.all().order_by("-start")}
|
||||
return {
|
||||
"job_experiences": models.JobExperience.objects.all().order_by("-start")
|
||||
}
|
||||
|
||||
|
||||
class ProjectList(ListView):
|
||||
template_name = "project_list.html"
|
||||
model = models.Project
|
||||
+3
-1
@@ -19,4 +19,6 @@ line-ending = "auto"
|
||||
|
||||
[tool.ruff.lint]
|
||||
extend-select = ["I"]
|
||||
|
||||
ignore = [
|
||||
"RUF012"
|
||||
]
|
||||
Vendored
+6
-6
@@ -1,8 +1,8 @@
|
||||
@charset "UTF-8";
|
||||
/*!
|
||||
* Tabler v1.4.0 (https://tabler.io)
|
||||
* Copyright 2018-2025 The Tabler Authors
|
||||
* Copyright 2018-2025 codecalm.net Paweł Kuna
|
||||
@charset "UTF-8";/*!
|
||||
* Tabler v1.5.0 (https://tabler.io)
|
||||
* Copyright 2018-2026 The Tabler Authors
|
||||
* Copyright 2018-2026 codecalm.net Paweł Kuna
|
||||
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
||||
*/
|
||||
:root,[data-bs-theme=light]{--tblr-blue:#066fd1;--tblr-indigo:#4263eb;--tblr-purple:#ae3ec9;--tblr-pink:#d6336c;--tblr-red:#d63939;--tblr-orange:#f76707;--tblr-yellow:#f59f00;--tblr-green:#2fb344;--tblr-teal:#0ca678;--tblr-cyan:#17a2b8;--tblr-black:#000000;--tblr-white:#ffffff;--tblr-gray:#4b5563;--tblr-gray-dark:#1f2937;--tblr-gray-100:#f3f4f6;--tblr-gray-200:#e5e7eb;--tblr-gray-300:#d1d5db;--tblr-gray-400:#9ca3af;--tblr-gray-500:#6b7280;--tblr-gray-600:#4b5563;--tblr-gray-700:#374151;--tblr-gray-800:#1f2937;--tblr-gray-900:#111827;--tblr-primary:#066fd1;--tblr-secondary:#6b7280;--tblr-success:#2fb344;--tblr-info:#4299e1;--tblr-warning:#f59f00;--tblr-danger:#d63939;--tblr-light:#f9fafb;--tblr-dark:#1f2937;--tblr-muted:#6b7280;--tblr-blue:#066fd1;--tblr-azure:#4299e1;--tblr-indigo:#4263eb;--tblr-purple:#ae3ec9;--tblr-pink:#d6336c;--tblr-red:#d63939;--tblr-orange:#f76707;--tblr-yellow:#f59f00;--tblr-lime:#74b816;--tblr-green:#2fb344;--tblr-teal:#0ca678;--tblr-cyan:#17a2b8;--tblr-primary-rgb:6,111,209;--tblr-secondary-rgb:107,114,128;--tblr-success-rgb:47,179,68;--tblr-info-rgb:66,153,225;--tblr-warning-rgb:245,159,0;--tblr-danger-rgb:214,57,57;--tblr-light-rgb:249,250,251;--tblr-dark-rgb:31,41,55;--tblr-muted-rgb:107,114,128;--tblr-blue-rgb:6,111,209;--tblr-azure-rgb:66,153,225;--tblr-indigo-rgb:66,99,235;--tblr-purple-rgb:174,62,201;--tblr-pink-rgb:214,51,108;--tblr-red-rgb:214,57,57;--tblr-orange-rgb:247,103,7;--tblr-yellow-rgb:245,159,0;--tblr-lime-rgb:116,184,22;--tblr-green-rgb:47,179,68;--tblr-teal-rgb:12,166,120;--tblr-cyan-rgb:23,162,184;--tblr-primary-text-emphasis:rgb(2.4, 44.4, 83.6);--tblr-secondary-text-emphasis:rgb(42.8, 45.6, 51.2);--tblr-success-text-emphasis:rgb(18.8, 71.6, 27.2);--tblr-info-text-emphasis:rgb(26.4, 61.2, 90);--tblr-warning-text-emphasis:rgb(98, 63.6, 0);--tblr-danger-text-emphasis:rgb(85.6, 22.8, 22.8);--tblr-light-text-emphasis:#374151;--tblr-dark-text-emphasis:#374151;--tblr-primary-bg-subtle:rgb(205.2, 226.2, 245.8);--tblr-secondary-bg-subtle:rgb(225.4, 226.8, 229.6);--tblr-success-bg-subtle:rgb(213.4, 239.8, 217.6);--tblr-info-bg-subtle:rgb(217.2, 234.6, 249);--tblr-warning-bg-subtle:rgb(253, 235.8, 204);--tblr-danger-bg-subtle:rgb(246.8, 215.4, 215.4);--tblr-light-bg-subtle:rgb(249, 249.5, 250.5);--tblr-dark-bg-subtle:#9ca3af;--tblr-primary-border-subtle:rgb(155.4, 197.4, 236.6);--tblr-secondary-border-subtle:rgb(195.8, 198.6, 204.2);--tblr-success-border-subtle:rgb(171.8, 224.6, 180.2);--tblr-info-border-subtle:rgb(179.4, 214.2, 243);--tblr-warning-border-subtle:rgb(251, 216.6, 153);--tblr-danger-border-subtle:rgb(238.6, 175.8, 175.8);--tblr-light-border-subtle:#e5e7eb;--tblr-dark-border-subtle:#6b7280;--tblr-white-rgb:255,255,255;--tblr-black-rgb:0,0,0;--tblr-font-sans-serif:"Inter Var",Inter,-apple-system,BlinkMacSystemFont,San Francisco,Segoe UI,Roboto,Helvetica Neue,sans-serif;--tblr-font-monospace:Monaco,Consolas,Liberation Mono,Courier New,monospace;--tblr-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--tblr-body-font-family:var(--tblr-font-sans-serif);--tblr-body-font-size:0.875rem;--tblr-body-font-weight:400;--tblr-body-line-height:1.4285714286;--tblr-body-color:#1f2937;--tblr-body-color-rgb:31,41,55;--tblr-body-bg:#f9fafb;--tblr-body-bg-rgb:249,250,251;--tblr-emphasis-color:#374151;--tblr-emphasis-color-rgb:55,65,81;--tblr-secondary-color:rgba(31, 41, 55, 0.75);--tblr-secondary-color-rgb:31,41,55;--tblr-secondary-bg:#e5e7eb;--tblr-secondary-bg-rgb:229,231,235;--tblr-tertiary-color:rgba(31, 41, 55, 0.5);--tblr-tertiary-color-rgb:31,41,55;--tblr-tertiary-bg:#f3f4f6;--tblr-tertiary-bg-rgb:243,244,246;--tblr-heading-color:inherit;--tblr-link-color:#066fd1;--tblr-link-color-rgb:6,111,209;--tblr-link-decoration:none;--tblr-link-hover-color:rgb(4.8, 88.8, 167.2);--tblr-link-hover-color-rgb:5,89,167;--tblr-link-hover-decoration:underline;--tblr-code-color:light-dark(var(--tblr-gray-600), var(--tblr-gray-400));--tblr-highlight-color:#1f2937;--tblr-highlight-bg:rgb(253, 235.8, 204);--tblr-border-width:1px;--tblr-border-style:solid;--tblr-border-color:#e5e7eb;--tblr-border-color-translucent:rgba(4, 32, 69, 0.1);--tblr-border-radius:6px;--tblr-border-radius-sm:4px;--tblr-border-radius-lg:8px;--tblr-border-radius-xl:1rem;--tblr-border-radius-xxl:2rem;--tblr-border-radius-2xl:var(--tblr-border-radius-xxl);--tblr-border-radius-pill:100rem;--tblr-box-shadow:rgba(var(--tblr-body-color-rgb), 0.04) 0 2px 4px 0;--tblr-box-shadow-sm:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--tblr-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, 0.175);--tblr-box-shadow-inset:0 0 transparent;--tblr-focus-ring-width:0.25rem;--tblr-focus-ring-opacity:0.25;--tblr-focus-ring-color:rgba(var(--tblr-primary-rgb), 0.25);--tblr-form-valid-color:#2fb344;--tblr-form-valid-border-color:#2fb344;--tblr-form-invalid-color:#d63939;--tblr-form-invalid-border-color:#d63939}[data-bs-theme=dark],body[data-bs-theme=dark] [data-bs-theme=light]{color-scheme:dark;--tblr-body-color:#e5e7eb;--tbLine truncated
|
||||
:root,[data-bs-theme=light],[data-theme=light]{--tblr-blue:#066fd1;--tblr-azure:#4299e1;--tblr-indigo:#4263eb;--tblr-purple:#ae3ec9;--tblr-pink:#d6336c;--tblr-red:#d63939;--tblr-orange:#f76707;--tblr-yellow:#f59f00;--tblr-lime:#74b816;--tblr-green:#2fb344;--tblr-teal:#0ca678;--tblr-cyan:#17a2b8;--tblr-black:#000;--tblr-white:#fff;--tblr-gray:#4b5563;--tblr-gray-dark:#1f2937;--tblr-gray-100:#f3f4f6;--tblr-gray-200:#e5e7eb;--tblr-gray-300:#d1d5db;--tblr-gray-400:#9ca3af;--tblr-gray-500:#6b7280;--tblr-gray-600:#4b5563;--tblr-gray-700:#374151;--tblr-gray-800:#1f2937;--tblr-gray-900:#111827;--tblr-primary:#066fd1;--tblr-secondary:#6b7280;--tblr-success:#2fb344;--tblr-info:#4299e1;--tblr-warning:#f59f00;--tblr-danger:#d63939;--tblr-light:#f9fafb;--tblr-dark:#1f2937;--tblr-muted:#6b7280;--tblr-blue:#066fd1;--tblr-azure:#4299e1;--tblr-indigo:#4263eb;--tblr-purple:#ae3ec9;--tblr-pink:#d6336c;--tblr-red:#d63939;--tblr-orange:#f76707;--tblr-yellow:#f59f00;--tblr-lime:#74b816;--tblr-green:#2fb344;--tblr-teal:#0ca678;--tblr-cyan:#17a2b8;--tblr-primary-rgb:6,111,209;--tblr-secondary-rgb:107,114,128;--tblr-success-rgb:47,179,68;--tblr-info-rgb:66,153,225;--tblr-warning-rgb:245,159,0;--tblr-danger-rgb:214,57,57;--tblr-light-rgb:249,250,251;--tblr-dark-rgb:31,41,55;--tblr-muted-rgb:107,114,128;--tblr-blue-rgb:6,111,209;--tblr-azure-rgb:66,153,225;--tblr-indigo-rgb:66,99,235;--tblr-purple-rgb:174,62,201;--tblr-pink-rgb:214,51,108;--tblr-red-rgb:214,57,57;--tblr-orange-rgb:247,103,7;--tblr-yellow-rgb:245,159,0;--tblr-lime-rgb:116,184,22;--tblr-green-rgb:47,179,68;--tblr-teal-rgb:12,166,120;--tblr-cyan-rgb:23,162,184;--tblr-primary-text-emphasis:light-dark(rgb(0.9411764706%, 17.4117647059%, 32.7843137255%), rgb(41.4117647059%, 66.1176470588%, 89.1764705882%));--tblr-secondary-text-emphasis:light-dark(rgb(16.7843137255%, 17.8823529412%, 20.0784313725%), rgb(65.1764705882%, 66.8235294118%, 70.1176470588%));--tblr-success-text-emphasis:light-dark(rgb(7.3725490196%, 28.0784313725%, 10.6666666667%), rgb(51.0588235294%, 82.1176470588%, 56%));--tblr-info-text-emphasis:light-dark(rgb(10.3529411765%, 24%, 35.2941176471%), rgb(55.5294117647%, 76%, 92.9411764706%));--tblr-warning-text-emphasis:light-dark(rgb(38.431372549%, 24.9411764706%, 0%), rgb(97.6470588235%, 77.4117647059%, 40%));--tblr-danger-text-emphasis:light-dark(rgb(33.568627451%, 8.9411764706%, 8.9411764706%), rgb(90.3529411765%, 53.4117647059%, 53.4117647059%));--tblr-light-text-emphasis:light-dark(#374151, #f3f4f6);--tblr-dark-text-emphasis:light-dark(#374151, #d1d5db);--tblr-primary-bg-subtle:light-dark(rgb(80.4705882353%, 88.7058823529%, 96.3921568627%), rgb(0.4705882353%, 8.7058823529%, 16.3921568627%));--tblr-secondary-bg-subtle:light-dark(rgb(88.3921568627%, 88.9411764706%, 90.0392156863%), rgb(8.3921568627%, 8.9411764706%, 10.0392156863%));--tblr-success-bg-subtle:light-dark(rgb(83.6862745098%, 94.0392156863%, 85.3333333333%), rgb(3.6862745098%, 14.0392156863%, 5.3333333333%));--tblr-info-bg-subtle:light-dark(rgb(85.1764705882%, 92%, 97.6470588235%), rgb(5.1764705882%, 12%, 17.6470588235%));--tblr-warning-bg-subtle:light-dark(rgb(99.2156862745%, 92.4705882353%, 80%), rgb(19.2156862745%, 12.4705882353%, 0%));--tblr-danger-bg-subtle:light-dark(rgb(96.7843137255%, 84.4705882353%, 84.4705882353%), rgb(16.7843137255%, 4.4705882353%, 4.4705882353%));--tblr-light-bg-subtle:light-dark(rgb(97.6470588235%, 97.8431372549%, 98.2352941176%), #1f2937);--tblr-dark-bg-subtle:light-dark(#9ca3af, rgb(6.0784313725%, 8.0392156863%, 10.7843137255%));--tblr-primary-border-subtle:light-dark(rgb(60.9411764706%, 77.4117647059%, 92.7843137255%), rgb(1.4117647059%, 26.1176470588%, 49.1764705882%));--tblr-secondary-border-subtle:light-dark(rgb(76.7843137255%, 77.8823529412%, 80.0784313725%), rgb(25.1764705882%, 26.8235294118%, 30.1176470588%));--tblr-success-border-subtle:light-dark(rgb(67.3725490196%, 88.0784313725%, 70.6666666667%), rgb(11.0588235294%, 42.1176470588%, 16%));--tblr-info-border-subtle:light-dark(rgb(70.3529411765%, 84%, 95.2941176471%), rgb(15.5294117647%, 36%, 52.9411764706%));--tblr-warning-border-subtle:light-dark(rgb(98.431372549%, 84.9411764706%, 60%), rgb(57.6470588235%, 37.4117647059%, 0%));--tblr-danger-border-subtle:light-dark(rgb(93.568627451%, 68.9411764706%, 68.9411764706%), rgb(50.3529411765%, 13.4117647059%, 13.4117647059%));--tblr-light-border-subtle:light-dark(#e5e7eb, #374151);--tblr-dark-border-subtle:light-dark(#6b7280, #1f2937);--tblr-white-rgb:255,255,255;--tblr-black-rgb:0,0,0;--tblr-font-sans-serif:system-ui,-apple-system,BlinkMacSystemFont,San Francisco,Segoe UI,Roboto,Helvetica Neue,sans-serif;--tblr-font-monospace:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;--tblr-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--tblr-body-font-family:var(--tblr-font-sans-serif);--tblr-body-font-size:0.875rem;--tblr-body-font-weight:400;--tblr-body-line-height:1.4285714286;--tblr-body-text-Line truncated
|
||||
/*# sourceMappingURL=tabler.min.css.map */
|
||||
Vendored
+5
-9
@@ -1,12 +1,8 @@
|
||||
/*!
|
||||
* Tabler v1.4.0 (https://tabler.io)
|
||||
* Copyright 2018-2025 The Tabler Authors
|
||||
* Copyright 2018-2025 codecalm.net Paweł Kuna
|
||||
* Tabler v1.5.0 (https://tabler.io)
|
||||
* Copyright 2018-2026 The Tabler Authors
|
||||
* Copyright 2018-2026 codecalm.net Paweł Kuna
|
||||
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
||||
*/
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).tabler={})}(this,function(t){"use strict";const e=document.querySelectorAll('[data-bs-toggle="autosize"]');e.length&&e.forEach(function(t){window.autosize&&window.autosize(t)});const i=document.querySelectorAll("[data-countup]");i.length&&i.forEach(function(t){let e={};try{const i=t.getAttribute("data-countup")?JSON.parse(t.getAttribute("data-countup")):{};e=Object.assign({enableScrollSpy:!0},i)}catch(t){}const i=parseInt(t.innerHTML,10);if(window.countUp&&window.countUp.CountUp){const n=new window.countUp.CountUp(t,i,e);n.error||n.start()}}),[].slice.call(document.querySelectorAll("[data-mask]")).map(function(t){window.IMask&&new window.IMask(t,{mask:t.dataset.mask,lazy:"true"===t.dataset["mask-visible"]})});var n="top",s="bottom",o="right",r="left",a="auto",l=[n,s,o,r],c="start",h="end",u="clippingParents",d="viewport",f="popper",p="reference",m=l.reduce(function(t,e){return t.concat([e+"-"+c,e+"-"+h])},[]),g=[].concat(l,[a]).reduce(function(t,e){return t.concat([e,e+"-"+c,e+"-"+h])},[]),_="beforeRead",b="read",v="afterRead",y="beforeMain",w="main",A="afterMain",E="beforeWrite",T="write",C="afterWrite",O=[_,b,v,y,w,A,E,T,C];function x(t){return t?(t.nodeName||"").toLowerCase():null}function k(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function S(t){return t instanceof k(t).Element||t instanceof Element}function L(t){return t instanceof k(t).HTMLElement||t instanceof HTMLElement}function $(t){return"undefined"!=typeof ShadowRoot&&(t instanceof k(t).ShadowRoot||t instanceof ShadowRoot)}const D={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];L(s)&&x(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t},{});L(n)&&x(n)&&(Object.assign(n.style,o),Object.keys(s).forEach(function(t){n.removeAttribute(t)}))})}},requires:["computeStyles"]};function I(t){return t.split("-")[0]}var P=Math.max,N=Math.min,M=Math.round;function j(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function F(){return!/^((?!chrome|android).)*safari/i.test(j())}function H(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&L(t)&&(s=t.offsetWidth>0&&M(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&M(n.height)/t.offsetHeight||1);var r=(S(t)?k(t):window).visualViewport,a=!F()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,u=n.height/o;return{width:h,height:u,top:c,right:l+h,bottom:c+u,left:l,x:l,y:c}}function z(t){var e=H(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function B(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&$(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function W(t){return k(t).getComputedStyle(t)}function q(t){return["table","td","th"].indexOf(x(t))>=0}function R(t){return((S(t)?t.ownerDocument:t.document)||window.document).documentElement}function V(t){return"html"===x(t)?t:t.assignedSlot||t.parentNode||($(t)?t.host:null)||R(t)}function U(t){return L(t)&&"fixed"!==W(t).position?t.offsetParent:null}function K(t){for(var e=k(t),i=U(t);i&&q(i)&&"static"===W(i).position;)i=U(i);return i&&("html"===x(i)||"body"===x(i)&&"static"===W(i).position)?e:i||function(t){var e=/firefox/i.test(j());if(/Trident/i.test(j())&&L(t)&&"fixed"===W(t).position)return null;var i=V(t);for($(i)&&(i=i.host);L(i)&&["html","body"].indexOf(x(i))<0;){var n=W(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function Q(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function X(t,e,i){return P(t,N(e,i))}function Y(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function G(t,e){return e.reduce(function(e,i){return e[i]=t,e},{})}const J={name:"arrow",eLine truncated
|
||||
/*!
|
||||
* Bootstrap v5.3.7 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/let oe=1;const re={mouseenter:"mouseover",mouseleave:"mouseout"},ae=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function le(t,e){return e&&`${e}::${oe++}`||t.uidEvent||oe++}function ce(t){const e=le(t);return t.uidEvent=e,se[e]=se[e]||{},se[e]}function he(t,e,i=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===i)}function ue(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=me(t);return ae.has(o)||(o=t),[n,s,o]}function de(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=ue(e,i,n);if(e in re){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=ce(t),c=l[a]||(l[a]={}),h=he(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const u=le(r,e.replace(ee,"")),d=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return _e(s,{delegateTarget:r}),n.oneOff&&ge.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return _e(n,{delegateTarget:t}),i.oneOff&&ge.off(t,n.type,e),e.apply(t,[n])}}(t,r);d.delegationSelector=o?i:null,d.callable=r,d.oneOff=s,d.uidEvent=u,c[u]=d,t.addEventListener(a,d,o)}function fe(t,e,i,n,s){const o=he(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function pe(t,e,i,n){const s=e[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&fe(t,e,i,r.callable,r.delegationSelector)}function me(t){return t=t.replace(ie,""),re[t]||t}const ge={on(t,e,i,n){de(t,e,i,n,!1)},one(t,e,i,n){de(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=ue(e,i,n),a=r!==e,l=ce(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))pe(t,l,i,e.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(ne,"");a&&!e.includes(s)||fe(t,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;fe(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=Qt();let s=null,o=!0,r=!0,a=!1;e!==me(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=_e(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function _e(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function be(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function ve(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const ye={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${ve(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${ve(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter(t=>t.startsWith("bs")&&!t.startsWith("bsConfig"));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1),e[i]=be(t.dataset[n])}return e},getDataAttribute:(t,e)=>be(t.getAttribute(`data-bs-${ve(e)}`))};class we{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=Bt(e)?ye.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...Bt(e)?ye.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,n]of Object.entries(e)){const e=t[i],s=Bt(e)?"element":Ht(e);if(!new RegExp(n).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${s}" but expected type "${n}".`)}}}class Ae extends we{constructor(t,e){super(),(t=Wt(t))&&(this._element=t,this._config=this._getConfig(e),Mt.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Mt.remove(this._element,this.constructor.DATA_KEY),ge.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){Zt(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),Line truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).tabler={})}(this,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});var e=Object.defineProperty,i=(t,i)=>{let n={};for(var s in t)e(n,s,{get:t[s],enumerable:!0});return i||e(n,Symbol.toStringTag,{value:"Module"}),n},n=document.querySelectorAll('[data-bs-toggle="autosize"]');n.length&&n.forEach(function(t){window.autosize&&window.autosize(t)});var s=document.querySelectorAll("[data-countup]");s.length&&s.forEach(function(t){var e;let i={};try{const e=t.getAttribute("data-countup")?JSON.parse(t.getAttribute("data-countup")):{};i=Object.assign({enableScrollSpy:!0},e)}catch(t){}const n=parseFloat((null!==(e=t.textContent)&&void 0!==e?e:"").replace(/[^0-9.-]/g,""));if(!Number.isNaN(n)&&window.countUp&&window.countUp.CountUp){const e=new window.countUp.CountUp(t,n,i);e.error||i.enableScrollSpy||e.start()}}),[].slice.call(document.querySelectorAll("[data-mask]")).map(function(t){window.IMask&&new window.IMask(t,{mask:t.dataset.mask,lazy:"true"!==t.dataset.maskVisible})});var o="bottom",r="right",a="left",l="auto",c=["top",o,r,a],d="start",u="clippingParents",h="viewport",f="popper",p="reference",g=c.reduce(function(t,e){return t.concat([e+"-"+d,e+"-end"])},[]),m=[].concat(c,[l]).reduce(function(t,e){return t.concat([e,e+"-"+d,e+"-end"])},[]),_="beforeRead",b="read",v="afterRead",y="beforeMain",w="main",A="afterMain",E="beforeWrite",T="write",O="afterWrite",C=[_,b,v,y,w,A,E,T,O];function x(t){return t?(t.nodeName||"").toLowerCase():null}function S(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function k(t){return t instanceof S(t).Element||t instanceof Element}function L(t){return t instanceof S(t).HTMLElement||t instanceof HTMLElement}function $(t){return"undefined"!=typeof ShadowRoot&&(t instanceof S(t).ShadowRoot||t instanceof ShadowRoot)}var D={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];L(s)&&x(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t},{});L(n)&&x(n)&&(Object.assign(n.style,o),Object.keys(s).forEach(function(t){n.removeAttribute(t)}))})}},requires:["computeStyles"]};function P(t){return t.split("-")[0]}var N=Math.max,M=Math.min,I=Math.round;function j(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function F(){return!/^((?!chrome|android).)*safari/i.test(j())}function H(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&L(t)&&(s=t.offsetWidth>0&&I(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&I(n.height)/t.offsetHeight||1);var r=(k(t)?S(t):window).visualViewport,a=!F()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,d=n.width/s,u=n.height/o;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function B(t){var e=H(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function q(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&$(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function W(t){return S(t).getComputedStyle(t)}function z(t){return["table","td","th"].indexOf(x(t))>=0}function R(t){return((k(t)?t.ownerDocument:t.document)||window.document).documentElement}function V(t){return"html"===x(t)?t:t.assignedSlot||t.parentNode||($(t)?t.host:null)||R(t)}function U(t){return L(t)&&"fixed"!==W(t).position?t.offsetParent:null}function K(t){for(var e=S(t),i=U(t);i&&z(i)&&"static"===W(i).position;)i=U(i);return i&&("html"===x(i)||"body"===x(i)&&"static"===W(i).position)?e:i||function(t){var e=/firefox/i.test(j());if(/Trident/i.test(j())&&L(t)&&"fixed"===W(t).position)return null;var i=V(t);for($(i)&&(i=i.host);L(i)&&["html","body"].indexOf(x(i))<0;){var n=W(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return nLine truncated
|
||||
//# sourceMappingURL=tabler.min.js.map
|
||||
Reference in new issue
Block a user