working base site setup with gatekeeping working

This commit is contained in:
JakeBreath
2026-08-03 12:43:33 -05:00
parent 2764644d8b
commit 85e6241ad4
37 changed files with 1146 additions and 58 deletions
+6 -1
View File
@@ -1,3 +1,8 @@
venv venv
__pycache__ __pycache__
.env .env
Packs_DB
.migrations_done
nonpacks/staticfiles/
nonpacks/media/
*.log
+17
View File
@@ -0,0 +1,17 @@
[Unit]
Description=Packs Site Server
After=network.target
[Service]
Type=simple
User=jake
Group=jake
WorkingDirectory=/mnt/Disco/Proyects/Python3.13/Packs site
ExecStart=/mnt/Disco/Proyects/Python3.13/Packs site/run_prod.sh
Restart=on-failure
StandardOutput=journal
StandardError=journal
SyslogIdentifier=packs-site
[Install]
WantedBy=multi-user.target
+17
View File
@@ -0,0 +1,17 @@
[Unit]
Description=Packs Site Server
After=network.target
[Service]
Type=simple
User=jake
Group=jake
WorkingDirectory=/mnt/Disco/Proyects/Python3.13/Packs site
ExecStart=/mnt/Disco/Proyects/Python3.13/Packs site/run_prod.sh
Restart=on-failure
StandardOutput=journal
StandardError=journal
SyslogIdentifier=packs-site
[Install]
WantedBy=multi-user.target
+33 -13
View File
@@ -64,26 +64,42 @@ def _is_api_request(request):
return False return False
def _get_bearer_token(request): def _get_credentials(request):
"""Extract (username, token) from 'Authorization: Bearer <username> <token>'."""
auth = request.headers.get('Authorization', '') auth = request.headers.get('Authorization', '')
if auth.lower().startswith('bearer '): if not auth.lower().startswith('bearer '):
return auth.split(' ', 1)[1].strip() return None, None
explicit = request.headers.get('X-Auth-Token') parts = auth.split(' ', 2) # ['Bearer', '<username>', '<token>']
return explicit or None if len(parts) < 3:
return None, None
return parts[1].strip(), parts[2].strip()
def _authenticate_token(request, token): def _authenticate_token(request, username, token):
import hmac import hmac
from django.contrib.auth import get_user_model
from django.utils import timezone from django.utils import timezone
from profiles.models import ApiToken from profiles.models import ApiToken
if not token: if not username or not token:
return False return False
User = get_user_model()
# Resolve the user case-insensitively; prefer an exact-case match if it
# exists to avoid ambiguity.
user = (
User.objects.filter(username=username).first()
or User.objects.filter(username__iexact=username).first()
)
if user is None:
return False
prefix = token[:8] prefix = token[:8]
# Matches on the prefix keyed index, then constant-time compares. # Scope the lookup to the claimed user so a token never authenticates as
for candidate in ApiToken.objects.filter(key_prefix=prefix): # anyone but its owner (prevents cross-authentication).
for candidate in ApiToken.objects.filter(user=user, key_prefix=prefix):
if hmac.compare_digest(candidate.token or '', token): if hmac.compare_digest(candidate.token or '', token):
candidate.last_used = timezone.now() candidate.last_used = timezone.now()
candidate.save(update_fields=['last_used']) candidate.save(update_fields=['last_used'])
@@ -117,11 +133,15 @@ class GateMiddleware:
if _is_whitelisted(request): if _is_whitelisted(request):
return self.get_response(request) return self.get_response(request)
# API/media requests are allowed a bearer token to bypass the gate # API/media requests are allowed a bearer credential to bypass the
# (non-browser downloaders such as the Fabric mod). # gate (non-browser downloaders such as the Fabric mod). Credentials
# are 'Authorization: Bearer <username> <token>'. Token auth is
# CSRF-safe (header-based, not cookie-based), so mark the request as
# CSRF-processed to let it reach the view.
if _is_token_request(request): if _is_token_request(request):
token = _get_bearer_token(request) username, token = _get_credentials(request)
if _authenticate_token(request, token): if _authenticate_token(request, username, token):
request.csrf_processing_done = True
return self.get_response(request) return self.get_response(request)
# fall through: reject with 401 for API/media. # fall through: reject with 401 for API/media.
+52 -24
View File
@@ -3,42 +3,70 @@ import platform
import os import os
from functools import lru_cache from functools import lru_cache
@lru_cache(maxsize=1)
def get_os_info():
"""
Detect Linux distribution and return (fontawesome_class, display_name).
Falls back to generic Linux.
"""
system = platform.system()
if system != 'Linux':
return ('fa-brands fa-linux', system)
# Try to read /etc/os-release # Map distro IDs (from /etc/os-release) to (fontawesome_class, display_name)
os_release_path = '/etc/os-release' _DISTRO_MAPPING = {
'debian': ('fa-brands fa-debian', 'Debian'),
'ubuntu': ('fa-brands fa-ubuntu', 'Ubuntu'),
'fedora': ('fa-brands fa-fedora', 'Fedora'),
'rhel': ('fa-brands fa-redhat', 'RHEL'),
'centos': ('fa-brands fa-centos', 'CentOS'),
'opensuse': ('fa-brands fa-opensuse', 'openSUSE'),
'suse': ('fa-brands fa-suse', 'SUSE'),
'arch': ('fa-brands fa-arch-linux', 'Arch Linux'),
'raspbian': ('fa-brands fa-raspberry-pi', 'Raspberry Pi OS'),
}
# Map platform.system() values to (fontawesome_class, display_name)
_SYSTEM_MAPPING = {
'Windows': ('fa-brands fa-windows', 'Windows'),
'Darwin': ('fa-brands fa-apple', 'macOS'),
'FreeBSD': ('fa-brands fa-freebsd', 'FreeBSD'),
}
def _parse_os_release():
"""
Read /etc/os-release and return (distro_id, distro_name, id_like_list).
Any missing field falls back to empty values.
"""
distro_id = '' distro_id = ''
distro_name = '' distro_name = ''
id_like = ''
try: try:
with open(os_release_path, 'r') as f: with open('/etc/os-release', 'r') as f:
for line in f: for line in f:
if line.startswith('ID='): if line.startswith('ID='):
distro_id = line.split('=', 1)[1].strip().strip('"').lower() distro_id = line.split('=', 1)[1].strip().strip('"').lower()
elif line.startswith('NAME='): elif line.startswith('NAME='):
distro_name = line.split('=', 1)[1].strip().strip('"') distro_name = line.split('=', 1)[1].strip().strip('"')
elif line.startswith('ID_LIKE='):
id_like = line.split('=', 1)[1].strip().strip('"')
except Exception: except Exception:
pass pass
return distro_id, distro_name, id_like.split()
# Map IDs to FontAwesome icons and display names
mapping = {
'debian': ('fa-brands fa-debian', 'Debian'),
'ubuntu': ('fa-brands fa-ubuntu', 'Ubuntu'),
'fedora': ('fa-brands fa-fedora', 'Fedora'),
'rhel': ('fa-brands fa-redhat', 'RHEL'),
'centos': ('fa-brands fa-centos', 'CentOS'),
'opensuse': ('fa-brands fa-suse', 'openSUSE'),
'suse': ('fa-brands fa-suse', 'SUSE'),
}
if distro_id in mapping: @lru_cache(maxsize=1)
return mapping[distro_id] def get_os_info():
"""
Detect the operating system / Linux distribution and return
(fontawesome_class, display_name). Falls back to generic Linux.
"""
system = platform.system()
if system != 'Linux':
return _SYSTEM_MAPPING.get(system, ('fa-brands fa-linux', system))
distro_id, distro_name, id_like = _parse_os_release()
# Exact ID match first
if distro_id in _DISTRO_MAPPING:
return _DISTRO_MAPPING[distro_id]
# ID_LIKE fallback (e.g. linuxmint/pop/neon -> ubuntu, lmde/kali -> debian,
# rocky/almalinux -> rhel/fedora). Walk in order and take the first hit.
for parent in id_like:
if parent in _DISTRO_MAPPING:
return _DISTRO_MAPPING[parent]
return ('fa-brands fa-linux', distro_name or 'Linux') return ('fa-brands fa-linux', distro_name or 'Linux')
+1 -1
View File
@@ -48,13 +48,13 @@ MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware', 'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'common.middleware.GateMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',
'common.middleware.TimingMiddleware', 'common.middleware.TimingMiddleware',
'common.middleware.GateMiddleware',
] ]
ROOT_URLCONF = 'common.urls' ROOT_URLCONF = 'common.urls'
@@ -1,8 +0,0 @@
{% extends 'base.html' %}
{% block title %}Home - Packs{% endblock %}
{% block content %}
<h1>Welcome</h1>
<p>Pack library and download area will live here.</p>
{% endblock %}
+2 -2
View File
@@ -33,7 +33,7 @@ def gate(request):
if hmac.compare_digest(submitted, master): if hmac.compare_digest(submitted, master):
request.session['authorized'] = True request.session['authorized'] = True
request.session.pop('lock_until', None) request.session.pop('lock_until', None)
return redirect('home') return redirect('landing:home')
else: else:
_start_lockout(request) _start_lockout(request)
return render(request, 'landing/gate.html', { return render(request, 'landing/gate.html', {
@@ -41,7 +41,7 @@ def gate(request):
}) })
if request.session.get('authorized'): if request.session.get('authorized'):
return redirect('home') return redirect('landing:home')
return render(request, 'landing/gate.html') return render(request, 'landing/gate.html')
@@ -0,0 +1,19 @@
# Generated by Django 6.0.3 on 2026-08-03 17:13
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profiles', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AddIndex(
model_name='apitoken',
index=models.Index(fields=['user', 'key_prefix'], name='profiles_ap_user_id_c2920d_idx'),
),
]
+5
View File
@@ -32,5 +32,10 @@ class ApiToken(models.Model):
created_at = models.DateTimeField(auto_now_add=True) created_at = models.DateTimeField(auto_now_add=True)
last_used = models.DateTimeField(null=True, blank=True) last_used = models.DateTimeField(null=True, blank=True)
class Meta:
indexes = [
models.Index(fields=['user', 'key_prefix']),
]
def __str__(self): def __str__(self):
return f'{self.user.username} - {self.label} ({self.key_prefix}...)' return f'{self.user.username} - {self.label} ({self.key_prefix}...)'
+74 -1
View File
@@ -1,3 +1,76 @@
import secrets
from django.contrib.auth import get_user_model
from django.test import TestCase from django.test import TestCase
# Create your tests here. from .models import ApiToken, UserProfile
class ApiTokenAuthTests(TestCase):
"""Credential auth: 'Authorization: Bearer <username> <token>'."""
def setUp(self):
User = get_user_model()
self.alice = User.objects.create_user(username='Alice', password='pw')
UserProfile.objects.get_or_create(user=self.alice)
self.bob = User.objects.create_user(username='Bob', password='pw')
UserProfile.objects.get_or_create(user=self.bob)
self.token = secrets.token_urlsafe(48)
ApiToken.objects.create(
user=self.alice,
token=self.token,
key_prefix=self.token[:8],
label='test',
)
def _auth(self, credential=None, username=None, token=None):
if credential is None:
credential = f'{username or ""} {token or ""}'.strip()
return self.client.get(
'/home/',
HTTP_AUTHORIZATION=f'Bearer {credential}',
HTTP_ACCEPT='application/json',
)
def test_valid_credentials_pass(self):
resp = self._auth(username='Alice', token=self.token)
self.assertEqual(resp.status_code, 200)
def test_wrong_username_rejected(self):
# A valid token presented under another user's name must not work.
resp = self._auth(username='Bob', token=self.token)
self.assertEqual(resp.status_code, 401)
def test_wrong_token_rejected(self):
resp = self._auth(username='Alice', token='x' * 64)
self.assertEqual(resp.status_code, 401)
def test_revoked_token_rejected(self):
ApiToken.objects.all().delete()
resp = self._auth(username='Alice', token=self.token)
self.assertEqual(resp.status_code, 401)
def test_missing_username_rejected(self):
resp = self._auth(token=self.token)
self.assertEqual(resp.status_code, 401)
def test_missing_credentials_rejected(self):
resp = self._auth()
self.assertEqual(resp.status_code, 401)
def test_username_case_insensitive(self):
resp = self._auth(username='aLiCe', token=self.token)
self.assertEqual(resp.status_code, 200)
def test_unknown_user_rejected(self):
resp = self._auth(username='Nobody', token=self.token)
self.assertEqual(resp.status_code, 401)
def test_authenticates_as_owner(self):
self.client.get(
'/home/',
HTTP_AUTHORIZATION=f'Bearer Alice {self.token}',
HTTP_ACCEPT='application/json',
)
token = ApiToken.objects.get(token=self.token)
self.assertIsNotNone(token.last_used)
+4 -4
View File
@@ -17,7 +17,7 @@ def register(request):
UserProfile.objects.get_or_create(user=user) UserProfile.objects.get_or_create(user=user)
login(request, user) login(request, user)
messages.success(request, 'Registration successful.') messages.success(request, 'Registration successful.')
return redirect('home') return redirect('landing:home')
else: else:
form = UserCreationForm() form = UserCreationForm()
return render(request, 'profiles/register.html', {'form': form}) return render(request, 'profiles/register.html', {'form': form})
@@ -29,7 +29,7 @@ def user_login(request):
if form.is_valid(): if form.is_valid():
user = form.get_user() user = form.get_user()
login(request, user) login(request, user)
return redirect('home') return redirect('landing:home')
else: else:
form = AuthenticationForm(request) form = AuthenticationForm(request)
return render(request, 'profiles/login.html', {'form': form}) return render(request, 'profiles/login.html', {'form': form})
@@ -38,8 +38,8 @@ def user_login(request):
def user_logout(request): def user_logout(request):
if request.method == 'POST': if request.method == 'POST':
logout(request) logout(request)
return redirect('home') return redirect('landing:home')
return redirect('home') return redirect('landing:home')
@login_required @login_required
+247
View File
@@ -732,6 +732,18 @@ textarea {
color: var(--md-sys-color-on-surface-variant); color: var(--md-sys-color-on-surface-variant);
} }
.token-hint {
font-size: 0.85rem;
color: var(--md-sys-color-on-surface-variant);
margin-bottom: 16px;
}
.token-hint code {
background: var(--md-sys-color-surface-variant);
padding: 2px 6px;
border-radius: 4px;
color: var(--md-sys-color-on-surface);
}
/* ========== User Bar & Auth Bar ========== */ /* ========== User Bar & Auth Bar ========== */
.user-bar { .user-bar {
position: fixed; position: fixed;
@@ -1511,3 +1523,238 @@ a.deletelink {
.htmx-indicator { display: none; } .htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: block; } .htmx-request .htmx-indicator { display: block; }
.htmx-request.htmx-indicator { display: block; } .htmx-request.htmx-indicator { display: block; }
/* ========== Home Page ========== */
.home-hero {
background: var(--md-sys-color-surface);
border-radius: 16px;
padding: 48px 32px;
text-align: center;
margin-bottom: 24px;
border: 1px solid var(--md-sys-color-outline);
}
.home-hero h1 {
font-size: 2.5rem;
font-weight: 700;
color: var(--md-sys-color-primary);
margin-bottom: 12px;
}
.home-hero p {
color: var(--md-sys-color-on-surface-variant);
font-size: 1.1rem;
max-width: 640px;
margin: 0 auto 8px auto;
}
.home-hero .home-hero-sub {
font-size: 0.95rem;
max-width: 560px;
}
.home-hero-actions {
margin-top: 24px;
display: flex;
gap: 12px;
justify-content: center;
flex-wrap: wrap;
}
.btn-primary {
background: var(--md-sys-color-primary);
color: var(--md-sys-color-on-primary);
text-decoration: none;
padding: 10px 20px;
border-radius: 24px;
font-weight: 500;
display: inline-flex;
align-items: center;
gap: 8px;
}
.btn-primary:hover {
background: var(--ctp-mocha-pink);
}
.btn-secondary {
background: var(--md-sys-color-surface-variant);
color: var(--md-sys-color-on-surface);
text-decoration: none;
padding: 10px 20px;
border-radius: 24px;
font-weight: 500;
display: inline-flex;
align-items: center;
gap: 8px;
}
.btn-secondary:hover {
background: var(--md-sys-color-outline);
}
.home-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 16px;
margin-bottom: 32px;
}
.stat-card {
background: var(--md-sys-color-surface);
border-radius: 12px;
padding: 20px;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
border: 1px solid var(--md-sys-color-outline);
}
.stat-card i {
font-size: 1.5rem;
color: var(--md-sys-color-primary);
}
.stat-value {
font-size: 1.8rem;
font-weight: 700;
color: var(--md-sys-color-on-surface);
}
.stat-label {
font-size: 0.8rem;
color: var(--md-sys-color-on-surface-variant);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.home-section {
margin-bottom: 32px;
}
.home-section-header {
display: flex;
align-items: baseline;
justify-content: space-between;
margin-bottom: 16px;
}
.home-section-header h2 {
font-size: 1.3rem;
font-weight: 500;
color: var(--md-sys-color-on-surface);
}
.home-section-link {
color: var(--md-sys-color-primary);
text-decoration: none;
font-size: 0.9rem;
}
.pack-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 16px;
}
.pack-card {
background: var(--md-sys-color-surface);
border-radius: 12px;
overflow: hidden;
text-decoration: none;
color: inherit;
border: 1px solid var(--md-sys-color-outline);
transition: transform 0.2s, box-shadow 0.2s;
display: flex;
flex-direction: column;
}
.pack-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}
.pack-card-thumb {
aspect-ratio: 16 / 9;
background: var(--md-sys-color-surface-variant);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.pack-card-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.pack-card-body {
padding: 12px 16px 16px 16px;
display: flex;
flex-direction: column;
gap: 4px;
flex: 1;
}
.pack-card-body h3 {
font-size: 1rem;
font-weight: 500;
color: var(--md-sys-color-on-surface);
}
.pack-card-author {
font-size: 0.8rem;
color: var(--md-sys-color-primary);
display: flex;
align-items: center;
gap: 6px;
}
.pack-card-desc {
font-size: 0.85rem;
color: var(--md-sys-color-on-surface-variant);
flex: 1;
}
.pack-card-meta {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 8px;
font-size: 0.78rem;
color: var(--md-sys-color-on-surface-variant);
}
.pack-card-version,
.pack-card-downloads {
display: inline-flex;
align-items: center;
gap: 4px;
}
.how-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 16px;
}
.how-card {
background: var(--md-sys-color-surface);
border-radius: 12px;
padding: 20px;
border: 1px solid var(--md-sys-color-outline);
display: flex;
flex-direction: column;
gap: 8px;
}
.how-card i {
font-size: 1.5rem;
color: var(--md-sys-color-primary);
}
.how-card h3 {
font-size: 1rem;
font-weight: 500;
}
.how-card p {
font-size: 0.85rem;
color: var(--md-sys-color-on-surface-variant);
line-height: 1.5;
}
.home-gate-note {
background: var(--md-sys-color-surface-variant);
border-radius: 12px;
padding: 16px 20px;
display: flex;
align-items: center;
gap: 12px;
font-size: 0.85rem;
color: var(--md-sys-color-on-surface-variant);
}
.home-gate-note i {
color: var(--md-sys-color-primary);
font-size: 1.2rem;
}
.home-gate-note code {
background: var(--md-sys-color-surface);
padding: 2px 6px;
border-radius: 4px;
color: var(--md-sys-color-on-surface);
}
+165
View File
@@ -0,0 +1,165 @@
Fonticons, Inc. (https://fontawesome.com)
--------------------------------------------------------------------------------
Font Awesome Free License
Font Awesome Free is free, open source, and GPL friendly. You can use it for
commercial projects, open source projects, or really almost whatever you want.
Full Font Awesome Free license: https://fontawesome.com/license/free.
--------------------------------------------------------------------------------
# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
The Font Awesome Free download is licensed under a Creative Commons
Attribution 4.0 International License and applies to all icons packaged
as SVG and JS file types.
--------------------------------------------------------------------------------
# Fonts: SIL OFL 1.1 License
In the Font Awesome Free download, the SIL OFL license applies to all icons
packaged as web and desktop font files.
Copyright (c) 2026 Fonticons, Inc. (https://fontawesome.com)
with Reserved Font Name: "Font Awesome".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
SIL OPEN FONT LICENSE
Version 1.1 - 26 February 2007
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting — in part or in whole — any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
--------------------------------------------------------------------------------
# Code: MIT License (https://opensource.org/licenses/MIT)
In the Font Awesome Free download, the MIT license applies to all non-font and
non-icon files.
Copyright 2026 Fonticons, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in the
Software without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
# Attribution
Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
Awesome Free files already contain embedded comments with sufficient
attribution, so you shouldn't need to do anything additional when using these
files normally.
We've kept attribution comments terse, so we ask that you do not actively work
to remove them from files, especially code. They're a great way for folks to
learn about Font Awesome.
--------------------------------------------------------------------------------
# Brand Icons
All brand icons are trademarks of their respective owners. The use of these
trademarks does not indicate endorsement of the trademark holder by Font
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
to represent the company, product, or service to which they refer.**
File diff suppressed because one or more lines are too long
+270
View File
@@ -0,0 +1,270 @@
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3GUBGEe.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3iUBGEe.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3CUBGEe.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3-UBGEe.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* math */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMawCUBGEe.woff2) format('woff2');
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
}
/* symbols */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMaxKUBGEe.woff2) format('woff2');
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3OUBGEe.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3KUBGEe.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3yUBA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3GUBGEe.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3iUBGEe.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3CUBGEe.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3-UBGEe.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* math */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMawCUBGEe.woff2) format('woff2');
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
}
/* symbols */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMaxKUBGEe.woff2) format('woff2');
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3OUBGEe.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3KUBGEe.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3yUBA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3GUBGEe.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3iUBGEe.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3CUBGEe.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3-UBGEe.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* math */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMawCUBGEe.woff2) format('woff2');
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
}
/* symbols */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMaxKUBGEe.woff2) format('woff2');
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3OUBGEe.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3KUBGEe.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
font-display: swap;
src: url(KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3yUBA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
+2 -2
View File
@@ -8,8 +8,8 @@
<link rel="stylesheet" href="{% static 'css/style.css' %}"> <link rel="stylesheet" href="{% static 'css/style.css' %}">
{% block extra_head %}{% endblock %} {% block extra_head %}{% endblock %}
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet"> <link rel="stylesheet" href="{% static 'fonts/roboto.css' %}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css"> <link rel="stylesheet" href="{% static 'fontawesome/css/all.min.css' %}">
<link rel="icon" type="image/png" href="{% static 'Logo.png' %}"> <link rel="icon" type="image/png" href="{% static 'Logo.png' %}">
</head> </head>
<body> <body>
+146
View File
@@ -0,0 +1,146 @@
{% extends 'base.html' %}
{% load static %}
{% block title %}Home - Packs Site{% endblock %}
{% block content %}
<div class="home-hero">
<div class="home-hero-inner">
<h1>Packs Site</h1>
<p>Hosted datapacks for Needs Of Nature &amp; Animation Director.</p>
<p class="home-hero-sub">Browse and download packs shared by the community. Upload your own once you have a creator account.</p>
<div class="home-hero-actions">
<a href="#" class="btn btn-primary"><i class="fas fa-download"></i> Browse packs</a>
<a href="#" class="btn btn-secondary"><i class="fas fa-upload"></i> Upload a pack</a>
</div>
</div>
</div>
<div class="home-stats">
<div class="stat-card">
<i class="fas fa-users"></i>
<span class="stat-value">0</span>
<span class="stat-label">Creators</span>
</div>
<div class="stat-card">
<i class="fas fa-box-open"></i>
<span class="stat-value">0</span>
<span class="stat-label">Packs</span>
</div>
<div class="stat-card">
<i class="fas fa-download"></i>
<span class="stat-value">0</span>
<span class="stat-label">Downloads</span>
</div>
<div class="stat-card">
<i class="fas fa-tag"></i>
<span class="stat-value">0</span>
<span class="stat-label">Versions</span>
</div>
</div>
<div class="home-section">
<div class="home-section-header">
<h2>Latest packs</h2>
<a href="#" class="home-section-link">View all <i class="fas fa-arrow-right"></i></a>
</div>
<div class="pack-grid">
{% comment %} Example cards — replace with real Pack objects when the library model lands. {% endcomment %}
<a href="#" class="pack-card">
<div class="pack-card-thumb">
<img src="{% static 'Logo.png' %}" alt="">
</div>
<div class="pack-card-body">
<h3>Example Pack</h3>
<p class="pack-card-author"><i class="fas fa-user"></i> a_creator</p>
<p class="pack-card-desc">Placeholder description for a datapack.</p>
<div class="pack-card-meta">
<span class="pack-card-version"><i class="fas fa-tag"></i> v1.0.0</span>
<span class="pack-card-downloads"><i class="fas fa-download"></i> 0</span>
</div>
</div>
</a>
<a href="#" class="pack-card">
<div class="pack-card-thumb">
<img src="{% static 'Logo.png' %}" alt="">
</div>
<div class="pack-card-body">
<h3>Another Pack</h3>
<p class="pack-card-author"><i class="fas fa-user"></i> someone</p>
<p class="pack-card-desc">This card shows what the library grid will look like.</p>
<div class="pack-card-meta">
<span class="pack-card-version"><i class="fas fa-tag"></i> v0.9.2</span>
<span class="pack-card-downloads"><i class="fas fa-download"></i> 0</span>
</div>
</div>
</a>
<a href="#" class="pack-card">
<div class="pack-card-thumb">
<img src="{% static 'Logo.png' %}" alt="">
</div>
<div class="pack-card-body">
<h3>Third Example</h3>
<p class="pack-card-author"><i class="fas fa-user"></i> dev</p>
<p class="pack-card-desc">Static assets, profile pictures and zip downloads land under /media/&lt;user&gt;/&lt;pack&gt;/.</p>
<div class="pack-card-meta">
<span class="pack-card-version"><i class="fas fa-tag"></i> v1.1.0</span>
<span class="pack-card-downloads"><i class="fas fa-download"></i> 0</span>
</div>
</div>
</a>
<a href="#" class="pack-card">
<div class="pack-card-thumb">
<img src="{% static 'Logo.png' %}" alt="">
</div>
<div class="pack-card-body">
<h3>And Another</h3>
<p class="pack-card-author"><i class="fas fa-user"></i> tester</p>
<p class="pack-card-desc">Responsive grid, Catppuccin-styled, ready for real data.</p>
<div class="pack-card-meta">
<span class="pack-card-version"><i class="fas fa-tag"></i> v0.1.0</span>
<span class="pack-card-downloads"><i class="fas fa-download"></i> 0</span>
</div>
</div>
</a>
</div>
</div>
<div class="home-section">
<div class="home-section-header">
<h2>How it works</h2>
</div>
<div class="how-grid">
<div class="how-card">
<i class="fas fa-key"></i>
<h3>Enter the site</h3>
<p>Use the master password to get in. It only grants access to browse and download.</p>
</div>
<div class="how-card">
<i class="fas fa-user-plus"></i>
<h3>Create an account</h3>
<p>Creators register to get their own profile, upload packs and manage their content.</p>
</div>
<div class="how-card">
<i class="fas fa-upload"></i>
<h3>Share packs</h3>
<p>Upload a .zip plus page assets. Everything is stored under your own folder.</p>
</div>
<div class="how-card">
<i class="fas fa-robot"></i>
<h3>Keep mods updated</h3>
<p>The Fabric mod checks the API with your personal token and downloads new versions automatically.</p>
</div>
</div>
</div>
<div class="home-section">
<div class="home-gate-note">
<i class="fas fa-shield-halved"></i>
<p>This is a private site. All content is gated and only reachable by authorized users. Unauthorized API or media requests are rejected with <code>401 Unauthorized</code>.</p>
</div>
</div>
{% endblock %}
@@ -15,6 +15,10 @@
<h2>API Tokens</h2> <h2>API Tokens</h2>
<p>Tokens let non-browser clients (like a Fabric mod) access the API and download packs.</p> <p>Tokens let non-browser clients (like a Fabric mod) access the API and download packs.</p>
<p class="token-hint">
Send credentials as <code>Authorization: Bearer &lt;username&gt; &lt;token&gt;</code>,
e.g. <code>Authorization: Bearer {{ request.user.username }} &lt;token&gt;</code>
</p>
<form method="post" action="{% url 'profiles:token_create' %}" class="token-create"> <form method="post" action="{% url 'profiles:token_create' %}" class="token-create">
{% csrf_token %} {% csrf_token %}
@@ -27,7 +31,7 @@
<thead> <thead>
<tr> <tr>
<th>Label</th> <th>Label</th>
<th>Token</th> <th>Credential</th>
<th>Created</th> <th>Created</th>
<th>Last used</th> <th>Last used</th>
<th></th> <th></th>
@@ -37,7 +41,7 @@
{% for token in tokens %} {% for token in tokens %}
<tr> <tr>
<td>{{ token.label }}</td> <td>{{ token.label }}</td>
<td><code>{{ token.token }}</code></td> <td><code>{{ request.user.username }} {{ token.token }}</code></td>
<td>{{ token.created_at }}</td> <td>{{ token.created_at }}</td>
<td>{{ token.last_used|default:"never" }}</td> <td>{{ token.last_used|default:"never" }}</td>
<td> <td>
Executable
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
# Development startup script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DJANGO_DIR="$SCRIPT_DIR/nonpacks"
PYTHON_BIN="$SCRIPT_DIR/venv/bin/python"
FLAG_FILE="$SCRIPT_DIR/.migrations_done"
FORCE_SETUP=0
# Check for --force-setup argument
for arg in "$@"; do
if [ "$arg" = "--force-setup" ]; then
FORCE_SETUP=1
fi
done
cd "$DJANGO_DIR"
# Run migrations once, flag it, skip next time
if [ ! -f "$FLAG_FILE" ] || [ $FORCE_SETUP -eq 1 ]; then
echo "Running database migrations..."
"$PYTHON_BIN" manage.py migrate
touch "$FLAG_FILE"
echo "Migrations applied. Flag file created: $FLAG_FILE"
else
echo "Database already migrated (found $FLAG_FILE). Skipping."
echo "To force re-run, use: $0 --force-setup"
fi
echo "Starting Django development server on 0.0.0.0:8000..."
exec "$PYTHON_BIN" manage.py runserver 0.0.0.0:8000
Executable
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
# Production startup script (for systemd or manual)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DJANGO_DIR="$SCRIPT_DIR/nonpacks"
PYTHON_BIN="$SCRIPT_DIR/venv/bin/python"
GUNICORN_BIN="$SCRIPT_DIR/venv/bin/gunicorn"
FLAG_FILE="$SCRIPT_DIR/.migrations_done"
FORCE_SETUP=0
# Check for --force-setup argument
for arg in "$@"; do
if [ "$arg" = "--force-setup" ]; then
FORCE_SETUP=1
fi
done
cd "$DJANGO_DIR"
# Run migrations once, flag it, skip next time
if [ ! -f "$FLAG_FILE" ] || [ $FORCE_SETUP -eq 1 ]; then
echo "Running database migrations..."
"$PYTHON_BIN" manage.py migrate
touch "$FLAG_FILE"
echo "Migrations applied. Flag file created: $FLAG_FILE"
else
echo "Database already migrated (found $FLAG_FILE). Skipping."
echo "To force re-run, use: $0 --force-setup"
fi
# Collect static files (served by gunicorn via whitenoise)
"$PYTHON_BIN" manage.py collectstatic --noinput
echo "Starting Gunicorn on 0.0.0.0:8000..."
exec "$GUNICORN_BIN" \
--workers 3 \
--bind 0.0.0.0:8000 \
common.wsgi:application