Initial commit
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
db.sqlite3
|
||||
__pycache__
|
||||
sandbox/__pycache__
|
28
DJANGOCMS-LICENSE
Normal file
28
DJANGOCMS-LICENSE
Normal file
@ -0,0 +1,28 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2023, django CMS Association
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
21
LICENCE
Normal file
21
LICENCE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Colormatic
|
||||
|
||||
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.
|
50
README.md
Normal file
50
README.md
Normal file
@ -0,0 +1,50 @@
|
||||
# Colormatic Library Sandbox
|
||||
|
||||
This is a development environment for working on templates, views, and models for the Colormatic Library.
|
||||
|
||||
To get started working in this codebase, first ensure that you have Python, Pip, and optionally venv installed.
|
||||
|
||||
Optionally, you can create a virtual environment to install packages locally:
|
||||
|
||||
```
|
||||
python -m venv <your_venv_name>
|
||||
```
|
||||
|
||||
Replace `<your_venv_name>` with whatever you want to call the virtual environment, e.g. "venv".
|
||||
|
||||
Clone this repository:
|
||||
|
||||
```
|
||||
git clone https://git.colormatic.org/ColormaticStudios/Colormatic-Library-Sandbox.git
|
||||
cd Colormatic-Library-Sandbox
|
||||
```
|
||||
|
||||
Install the necessary packages:
|
||||
|
||||
```
|
||||
python -m pip install -r requirements.in
|
||||
```
|
||||
|
||||
Initialize the database with your admin user:
|
||||
|
||||
```
|
||||
python -m manage migrate
|
||||
python -m manage createsuperuser
|
||||
```
|
||||
|
||||
Check if everything is configured properly:
|
||||
|
||||
```
|
||||
python -m manage cms check
|
||||
```
|
||||
|
||||
You should now have a db.sqlite3 ready to go.
|
||||
Run the project with:
|
||||
|
||||
```
|
||||
python -m manage runserver
|
||||
```
|
||||
|
||||
Refer to the Django and Django CMS documentation.
|
||||
|
||||
Run `djade <filename>` to format a template.
|
22
manage.py
Executable file
22
manage.py
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
"""Django's command-line utility for administrative tasks."""
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
"""Run administrative tasks."""
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sandbox.settings')
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError as exc:
|
||||
raise ImportError(
|
||||
"Couldn't import Django. Are you sure it's installed and "
|
||||
"available on your PYTHONPATH environment variable? Did you "
|
||||
"forget to activate a virtual environment?"
|
||||
) from exc
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
7
requirements.in
Normal file
7
requirements.in
Normal file
@ -0,0 +1,7 @@
|
||||
djangocms-versioning
|
||||
djangocms-alias
|
||||
djangocms-frontend>=2.0.0a1
|
||||
django-filer
|
||||
djangocms-text
|
||||
django-fsm<3
|
||||
djade
|
0
sandbox/__init__.py
Normal file
0
sandbox/__init__.py
Normal file
16
sandbox/asgi.py
Normal file
16
sandbox/asgi.py
Normal file
@ -0,0 +1,16 @@
|
||||
"""
|
||||
ASGI config for sandbox project.
|
||||
|
||||
It exposes the ASGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sandbox.settings')
|
||||
|
||||
application = get_asgi_application()
|
241
sandbox/settings.py
Normal file
241
sandbox/settings.py
Normal file
@ -0,0 +1,241 @@
|
||||
"""
|
||||
Django settings for sandbox project.
|
||||
|
||||
Generated by 'djangocms' command using django CMS 5.0.0 and Django 5.2.1.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/5.2/topics/settings/
|
||||
|
||||
For the full list of Django settings and their values, see
|
||||
https://docs.djangoproject.com/en/5.2/ref/settings/
|
||||
|
||||
For the list of django CMS settings and their values, see
|
||||
https://docs.django-cms.org/en/release-5.0.x/reference/configuration.html
|
||||
"""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure-l*51_imckgkjri#_$sjsq=mcm0329%)^&nfmq+wj30&e76#prk'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'djangocms_admin_style',
|
||||
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'django.contrib.sites',
|
||||
# CMS base apps
|
||||
'cms',
|
||||
'menus',
|
||||
|
||||
'djangocms_text',
|
||||
'djangocms_link',
|
||||
'djangocms_alias',
|
||||
'djangocms_versioning',
|
||||
|
||||
'sekizai',
|
||||
'treebeard',
|
||||
'parler',
|
||||
|
||||
'filer',
|
||||
'easy_thumbnails',
|
||||
'djangocms_frontend',
|
||||
'djangocms_frontend.contrib.accordion',
|
||||
'djangocms_frontend.contrib.alert',
|
||||
'djangocms_frontend.contrib.badge',
|
||||
'djangocms_frontend.contrib.card',
|
||||
'djangocms_frontend.contrib.carousel',
|
||||
'djangocms_frontend.contrib.collapse',
|
||||
'djangocms_frontend.contrib.content',
|
||||
'djangocms_frontend.contrib.grid',
|
||||
'djangocms_frontend.contrib.icon',
|
||||
'djangocms_frontend.contrib.image',
|
||||
'djangocms_frontend.contrib.jumbotron',
|
||||
'djangocms_frontend.contrib.link',
|
||||
'djangocms_frontend.contrib.listgroup',
|
||||
'djangocms_frontend.contrib.media',
|
||||
'djangocms_frontend.contrib.navigation',
|
||||
'djangocms_frontend.contrib.tabs',
|
||||
'djangocms_frontend.contrib.utilities',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'cms.middleware.user.CurrentUserMiddleware',
|
||||
'cms.middleware.page.CurrentPageMiddleware',
|
||||
'cms.middleware.toolbar.ToolbarMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'cms.middleware.language.LanguageCookieMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'sandbox.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [
|
||||
os.path.join(BASE_DIR, "sandbox", "templates"),
|
||||
],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.template.context_processors.i18n',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'sekizai.context_processors.sekizai',
|
||||
'cms.context_processors.cms_settings',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
THUMBNAIL_PROCESSORS = (
|
||||
'easy_thumbnails.processors.colorspace',
|
||||
'easy_thumbnails.processors.autocrop',
|
||||
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
|
||||
'easy_thumbnails.processors.filters',
|
||||
)
|
||||
|
||||
WSGI_APPLICATION = 'sandbox.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/5.2/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'en'
|
||||
|
||||
LANGUAGES = [
|
||||
("en", _("English")),
|
||||
# Add additional languages here
|
||||
]
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
USE_L10N = True
|
||||
USE_THOUSAND_SEPARATOR = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/5.2/howto/static-files/
|
||||
|
||||
STATIC_URL = 'static/'
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
|
||||
|
||||
# This is a django CMS 4 template
|
||||
|
||||
CMS_CONFIRM_VERSION4 = True
|
||||
|
||||
# django CMS requires the site framework
|
||||
# https://docs.django-cms.org/en/release-5.0.x/how_to/multi-site.html
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
# A base template is part of this setup
|
||||
# https://docs.django-cms.org/en/release-5.0.x/reference/configuration.html#cms-templates
|
||||
|
||||
CMS_TEMPLATES = (
|
||||
("base.html", _("Standard")),
|
||||
)
|
||||
|
||||
# Enable permissions
|
||||
# https://docs.django-cms.org/en/release-5.0.x/topics/permissions.html
|
||||
|
||||
CMS_PERMISSION = True
|
||||
|
||||
# Allow admin sidebar to open admin URLs
|
||||
|
||||
X_FRAME_OPTIONS = 'SAMEORIGIN'
|
||||
|
||||
# Enable inline editing with djangocms-text
|
||||
# https://github.com/django-cms/djangocms-text#inline-editing-feature
|
||||
|
||||
TEXT_INLINE_EDITING = True
|
||||
|
||||
# Allow deletion of version objects
|
||||
# https://djangocms-versioning.readthedocs.io/en/latest/settings.html#DJANGOCMS_VERSIONING_ALLOW_DELETING_VERSIONS
|
||||
|
||||
DJANGOCMS_VERSIONING_ALLOW_DELETING_VERSIONS = True
|
||||
|
||||
# Add project-wide static files directory
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#staticfiles-dirs
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
BASE_DIR / "sandbox" / "static",
|
||||
]
|
||||
|
||||
INTERNAL_IPS = [
|
||||
"127.0.0.1",
|
||||
]
|
||||
|
||||
# Add project-wide static files directory
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#media-root
|
||||
|
||||
MEDIA_URL = "media/"
|
||||
MEDIA_ROOT = str(BASE_DIR.parent / "media")
|
211
sandbox/static/colormatic_logo.svg
Normal file
211
sandbox/static/colormatic_logo.svg
Normal file
@ -0,0 +1,211 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="1000"
|
||||
height="1000"
|
||||
viewBox="0 0 264.58332 264.58333"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
xml:space="preserve"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
sodipodi:docname="colormatic_logo.svg"
|
||||
inkscape:export-filename="drawing.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="px"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.52850974"
|
||||
inkscape:cx="347.20268"
|
||||
inkscape:cy="504.24804"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1006"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="38"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
showguides="false"><inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid1290"
|
||||
originx="0"
|
||||
originy="0" /></sodipodi:namedview><defs
|
||||
id="defs2"><inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect2036"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
nodesatellites_param="F,0,0,1,0,8,0,1 @ F,0,0,1,0,8,0,1 @ F,0,0,1,0,8,0,1 @ F,0,0,1,0,8,0,1"
|
||||
unit="px"
|
||||
method="auto"
|
||||
mode="F"
|
||||
radius="8"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false" /><inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect2034"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
nodesatellites_param="F,0,0,1,0,8,0,1 @ F,0,0,1,0,8,0,1 @ F,0,0,1,0,8,0,1 @ F,0,0,1,0,8,0,1"
|
||||
unit="px"
|
||||
method="auto"
|
||||
mode="F"
|
||||
radius="8"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false" /><inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect2028"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
|
||||
unit="px"
|
||||
method="auto"
|
||||
mode="F"
|
||||
radius="8"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false" /><inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect2024"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
nodesatellites_param="F,0,0,1,0,8,0,1 @ F,0,0,1,0,8,0,1 @ F,0,0,1,0,8,0,1 @ F,0,0,1,0,8,0,1"
|
||||
unit="px"
|
||||
method="auto"
|
||||
mode="F"
|
||||
radius="8"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false" /><inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect869"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
satellites_param="F,0,0,1,0,1,0,1 @ F,0,0,1,0,1,0,1 @ F,0,0,1,0,1,0,1 @ F,0,0,1,0,1,0,1"
|
||||
unit="px"
|
||||
method="auto"
|
||||
mode="F"
|
||||
radius="1"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false"
|
||||
nodesatellites_param="F,0,0,1,0,1,0,1 @ F,0,0,1,0,1,0,1 @ F,0,0,1,0,1,0,1 @ F,0,0,1,0,1,0,1" /><inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect859"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
satellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
|
||||
unit="px"
|
||||
method="auto"
|
||||
mode="F"
|
||||
radius="1"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false"
|
||||
nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1" /></defs><g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"><path
|
||||
style="fill:#d65e7a;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 138.44549,250.55474 c -4.55247,0.26406 -9.37823,0.91958 -14.82915,1.92718 -11.65067,2.15418 -20.84357,5.04773 -26.044079,7.49308 a 132.70987,132.29573 0 0 0 34.353209,4.60832 132.70987,132.29573 0 0 0 42.66233,-7.10995 c -14.12901,-5.29674 -24.48059,-7.59639 -36.14231,-6.91863 z"
|
||||
id="path414" /><path
|
||||
style="fill:#08d3dd;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 146.83866,229.35597 c -2.43608,0.30575 -3.42495,1.37126 -2.1974,3.35149 2.17347,3.50575 9.32279,6.36804 15.8858,6.36804 6.56298,0 11.93534,2.63551 11.93534,5.85335 0,2.45646 6.41314,5.36808 14.37288,7.72054 a 132.70987,132.29573 0 0 0 10.99878,-5.55408 c -3.68628,-1.58437 -7.52511,-3.20626 -10.00216,-4.71604 -13.27189,-8.08976 -33.68501,-13.94288 -40.99331,-13.0233 z"
|
||||
id="path412" /><path
|
||||
style="fill:#8ec419;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 63.17105,201.37013 c -5.57449,-1.71639 -10.666234,1.54963 -21.289134,11.6349 -3.282631,3.11639 -5.498672,5.86216 -7.804821,8.61835 a 132.70987,132.29573 0 0 0 3.314046,3.39944 c 1.629756,-2.08469 3.171263,-4.14344 6.820206,-6.69117 20.499607,-14.31373 29.60477,-11.92258 11.443052,3.00451 l -11.87533,9.75543 a 132.70987,132.29573 0 0 0 0.672443,0.57445 l 15.465557,-8.51064 c 17.704391,-9.75775 18.607937,-11.57027 9.22169,-18.48149 -2.187879,-1.60985 -4.109522,-2.73188 -5.967709,-3.30378 z"
|
||||
id="path410" /><path
|
||||
style="fill:#b158bc;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 106.06151,190.04655 c -8.675019,0 -18.804135,13.50742 -15.861792,21.15105 2.99165,7.77174 -23.483751,21.62544 -40.741133,24.72978 a 132.70987,132.29573 0 0 0 15.285433,10.42578 c 6.14523,-0.47717 12.036586,-1.15353 18.575454,-1.23229 20.287698,-0.24553 41.351558,-0.78292 46.804878,-1.19754 15.759,-1.19985 6.53919,-21.29374 -13.58037,-29.6017 -9.8219,-4.05565 -17.855032,-9.95811 -17.855032,-13.11897 0,-3.16178 2.766542,-4.04546 6.147812,-1.96424 3.38129,2.08238 6.14778,0.86399 6.14778,-2.70523 0,-3.56969 -2.21808,-6.4878 -4.92303,-6.4878 z"
|
||||
id="path408" /><path
|
||||
style="fill:#2ead98;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 47.561409,180.92556 c -3.746301,1.4616 -12.502138,8.43976 -22.645963,18.31402 -1.857699,1.80905 -3.024436,2.59405 -4.766955,4.20135 a 132.70987,132.29573 0 0 0 5.163194,7.46922 c 13.344295,-13.41268 24.194928,-26.39475 24.194928,-29.50581 0,-0.83851 -0.696375,-0.9659 -1.945297,-0.47948 z"
|
||||
id="path406" /><path
|
||||
style="fill:#0a7726;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 31.063232,137.51046 c -6.266056,0 -10.047025,2.17503 -8.405186,4.82397 1.641838,2.64965 5.423016,4.81194 8.405186,4.81194 2.98217,0 6.763348,-2.16345 8.405186,-4.81194 1.642071,-2.64941 -2.139084,-4.82397 -8.405186,-4.82397 z"
|
||||
id="path404" /><path
|
||||
style="fill:#27663e;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 264.58332,133.81175 c -1.452,0.55592 -2.23946,0.80377 -3.97445,1.4616 l -17.17059,6.49961 18.31131,17.61982 a 132.70987,132.29573 0 0 0 2.83373,-25.57987 z"
|
||||
id="path402" /><path
|
||||
style="fill:#a762ad;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 75.73079,127.02492 c -2.591112,-1.42222 -18.266023,14.23752 -34.845502,34.80857 -28.501954,35.36332 -28.829811,36.15365 -5.895632,14.42375 13.340763,-12.64018 26.768753,-22.98234 29.838406,-22.98234 3.069652,0 2.256424,3.30493 -1.801236,7.3497 -4.057521,4.04499 -7.372543,9.99378 -7.372543,13.21463 0,3.22085 6.913916,-2.15187 15.357487,-11.94598 8.443549,-9.79389 12.566385,-18.73953 9.173663,-19.8699 -3.392723,-1.13036 -4.720669,-4.38017 -2.953822,-7.22994 1.766846,-2.85001 1.090221,-6.34627 -1.50103,-7.76849 z"
|
||||
id="path400" /><path
|
||||
style="fill:#c14015;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 130.83281,116.50325 c -6.22932,0 -16.41841,17.6717 -14.80515,25.67553 0.46796,2.32258 -4.54885,5.93072 -11.15489,8.02004 -17.704412,5.60134 -40.129495,39.10512 -31.759604,47.44875 4.801785,4.78692 8.418732,2.06848 12.895961,-9.67181 3.423207,-8.97576 9.23138,-16.31504 12.89596,-16.31504 3.664443,0 4.763103,3.05524 2.449513,6.78707 -2.788638,4.49853 -0.0837,5.47625 8.03295,2.90861 10.33856,-3.27112 11.7994,-1.57511 9.40181,10.92865 -2.42616,12.65222 0.60413,15.9699 20.80886,22.80259 13.00342,4.39754 27.34446,8.62507 31.86765,9.3964 4.52316,0.77134 12.8227,5.46305 18.44338,10.42601 3.54654,3.13144 8.73362,6.07155 13.89257,8.49859 a 132.70987,132.29573 0 0 0 7.42059,-5.1471 c -7.24742,-0.50728 -8.12533,-1.80905 0.84044,-8.5704 10.40618,-7.84678 10.6028,-9.00147 1.53704,-9.00147 -5.71818,0 -10.39842,-2.8961 -10.39842,-6.4278 0,-3.5317 -7.32309,-13.18429 -16.27004,-21.45009 -8.94691,-8.26581 -13.30487,-15.02229 -9.68996,-15.02229 3.61494,0 15.19246,8.59727 25.73188,19.10388 14.29868,14.25328 22.07136,17.791 34.18509,15.8842 a 132.70987,132.29573 0 0 0 22.57391,-45.21049 c -17.16074,-14.03461 -27.62917,-18.79349 -38.08749,-16.85357 l -15.36948,2.84884 15.36948,-6.97862 c 8.45321,-3.83259 12.3897,-8.09509 8.75339,-9.48025 -10.83348,-4.12792 -42.56625,12.39025 -42.56625,22.15657 0,4.97477 -8.29954,11.82947 -18.44338,15.23771 -10.14385,3.40801 -19.82666,7.81551 -21.51729,9.79133 -1.69063,1.97583 -8.2232,5.4839 -14.51696,7.8044 -8.69761,3.20672 -10.57069,1.93876 -7.7928,-5.27868 2.04497,-5.31272 -0.14639,-10.94509 -4.98308,-12.79584 -14.50338,-5.54806 -15.36178,-18.16762 -1.30887,-19.22387 10.41232,-0.78292 11.2179,0.20847 3.93842,4.78808 -10.15405,6.4 -9.97411,6.52601 13.90458,9.34845 20.93488,2.47453 21.35336,-3.22224 1.60907,-21.71346 -11.69125,-10.94903 -13.682,-16.24901 -8.46522,-22.51537 4.30184,-5.16725 4.51196,-8.19955 0.57624,-8.19955 z"
|
||||
id="path398" /><path
|
||||
style="fill:#a06a61;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 37.571242,104.24618 c -3.580839,0 -6.50801,2.75782 -6.50801,6.12854 0,3.37071 1.222665,6.12853 2.713681,6.12853 1.491038,0 4.418186,-2.75782 6.50801,-6.12853 2.089823,-3.37072 0.867158,-6.12854 -2.713681,-6.12854 z"
|
||||
id="path396" /><path
|
||||
style="fill:#d7a0e8;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 247.41273,100.64314 c -4.2432,-0.40999 -8.31299,0.84778 -13.56836,3.65076 -12.4078,6.61959 -12.58662,7.74185 -2.97785,18.32607 8.42475,9.28035 13.40469,10.18209 28.16938,5.0512 2.40089,-0.83387 3.55066,-1.37589 5.42737,-2.07079 a 132.70987,132.29573 0 0 0 -2.25736,-18.45763 c -0.0837,-0.0463 -0.10688,-0.0695 -0.19285,-0.13898 -5.94692,-3.88448 -10.35781,-5.95875 -14.60103,-6.36804 z"
|
||||
id="path394" /><path
|
||||
style="fill:#8c4888;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 19.608167,93.054168 c -1.911838,0.04633 -4.965272,0.889468 -9.14966,2.489817 -5.5365232,2.117121 -8.5348187,6.330975 -6.664108,9.348455 1.8707107,3.01747 0.7695682,5.48228 -2.4495134,5.48228 -0.079002,0 -0.1835625,0.13898 -0.2641906,0.16214 A 132.70987,132.29573 0 0 0 0,118.77209 c 2.0565968,-1.69555 3.2230317,-2.22831 6.015714,-4.89555 14.822902,-14.156685 19.327804,-20.9866 13.592383,-20.815887 z"
|
||||
id="path392" /><path
|
||||
style="fill:#759cef;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 175.76453,82.688152 c -5.5293,0.115816 -13.11914,4.135334 -21.38521,12.029832 -15.01776,14.343146 -17.79943,24.160886 -13.43629,47.424886 0.43149,2.30012 6.34843,5.93767 13.16013,8.09185 6.81177,2.15418 10.80072,6.48386 8.86147,9.61182 -1.93926,3.1282 -0.8897,5.68565 2.32943,5.68565 3.2191,0 7.38809,-4.00562 9.26972,-8.89376 1.88163,-4.88837 13.68084,-14.1312 26.21218,-20.54024 L 223.55402,124.45148 204.16204,113.032 c -10.66997,-6.28326 -19.40397,-14.805943 -19.40397,-18.936413 0,-7.725637 -3.46427,-11.52024 -8.99354,-11.407435 z m -6.38795,9.63591 c 5.19071,-0.861673 9.2337,0.905683 9.2337,5.793359 0,3.370719 -2.5388,6.128759 -5.64347,6.128759 -3.10477,0 -10.71266,1.89707 -16.90646,4.2134 -9.91335,3.70751 -10.24913,2.97393 -2.82172,-6.12876 4.6125,-5.652531 10.94724,-9.145317 16.13795,-10.006758 z"
|
||||
id="path390" /><path
|
||||
style="fill:#9e5ba5;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 9.9662108,80.354224 a 132.70987,132.29573 0 0 0 -2.16139,5.266627 c 2.6607262,-0.29649 4.8149832,-1.206805 4.8149832,-2.465728 0,-0.641622 -1.795659,-1.806733 -2.6536396,-2.800899 z"
|
||||
id="path388" /><path
|
||||
style="fill:#7781ce;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 92.949415,64.266423 c -5.909992,0.433153 -20.17117,8.528012 -31.699567,17.978848 -11.52842,9.450836 -16.123523,15.596508 -10.206282,13.657744 6.96759,-2.281579 10.758643,-0.35903 10.758643,5.470235 0,12.89312 1.930659,11.68122 22.994174,-14.447614 C 99.936662,68.144414 101.55615,63.634067 92.949415,64.266423 Z M 79.58516,74.189558 c 1.692957,-0.326602 3.220778,-0.06949 4.286649,0.993703 1.547501,1.542672 -1.40251,6.293685 -6.556039,10.557575 -5.842793,4.833475 -9.365775,5.29674 -9.365775,1.232285 0,-5.555009 6.556131,-11.800979 11.635165,-12.784027 z"
|
||||
id="path386" /><path
|
||||
style="fill:#669aa8;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 34.05307,58.101989 c -0.944069,0.54202 -0.693588,1.998988 0.768406,4.357006 2.922291,4.714184 1.029576,5.804015 -5.631464,3.255826 C 24.115322,63.773741 18.83739,64.640047 16.41411,67.25981 A 132.70987,132.29573 0 0 0 14.985111,69.953 c 0.660592,4.979403 17.416826,4.555052 27.3529,-1.723345 6.562823,-4.147148 6.187356,-5.946469 -1.861184,-9.025327 -3.340651,-1.278611 -5.479898,-1.644591 -6.423967,-1.100254 z"
|
||||
id="path384" /><path
|
||||
style="fill:#f940a3;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 187.98807,80.617358 -0.15568,0.13898 0.1673,-0.115817 z m 0.012,0.02316 5.06714,6.822734 c 10.52852,14.196288 15.78186,16.598088 28.43355,12.999448 8.53356,-2.427279 21.659,-4.631957 29.16598,-4.9076 l 8.65734,-0.324285 a 132.70987,132.29573 0 0 0 -2.20926,-6.822734 l -7.37254,-6.822965 c -8.01058,-7.404595 -15.71123,-16.917971 -17.12257,-21.138778 -1.83168,-5.477876 -8.61031,-3.672996 -23.67863,6.308047 z m 27.85721,5.218911 c 3.58077,0 4.80348,2.757816 2.71366,6.128532 -2.08983,3.370715 -5.01697,6.128531 -6.50801,6.128531 -1.49127,0 -2.71368,-2.757816 -2.71368,-6.128531 0,-3.370716 2.92719,-6.128532 6.50803,-6.128532 z"
|
||||
id="path382" /><path
|
||||
style="fill:#1aaf5d;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 212.26704,38.686789 c -4.39011,-1.368948 -9.00971,2.4831 -17.6989,13.34643 l -14.40891,18.026795 7.82884,10.557344 18.15519,-15.524933 c 14.72299,-12.577179 16.79955,-17.15192 10.57854,-23.353416 -1.55517,-1.549621 -2.99139,-2.595904 -4.45476,-3.05222 z"
|
||||
id="path380" /><path
|
||||
style="fill:#1d4d75;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 111.41682,12.317056 c -3.38127,0 -9.10867,5.515631 -12.727872,12.257062 -4.232834,7.884074 -4.386562,12.257295 -0.432185,12.257295 3.381287,0 9.108647,-5.515864 12.727847,-12.257295 4.23284,-7.883842 4.38659,-12.257062 0.43221,-12.257062 z"
|
||||
id="path378" /><path
|
||||
style="fill:#3a995c;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 101.78688,3.4830572 a 132.70987,132.29573 0 0 0 -8.032974,2.1426001 c -0.807442,1.0330808 -1.651365,1.570468 -2.389472,2.8847506 -5.182155,9.2310161 -7.443273,9.7973581 -11.851305,3.0042731 -0.274646,-0.423888 -0.293002,-0.09265 -0.540463,-0.430837 a 132.70987,132.29573 0 0 0 -3.314023,1.447703 c -0.05112,1.577417 -0.358528,2.272315 -0.04879,5.183008 1.036547,9.721151 -1.90115,15.143203 -8.813439,16.255039 -8.764481,1.408325 -8.532146,-1.264713 -1.669024,-15.967815 A 132.70987,132.29573 0 0 0 49.829939,28.379608 c -5.946658,10.229121 3.978519,21.026667 16.858424,16.099613 7.296864,-2.791402 8.509073,-0.961274 5.139168,7.792579 v 0.01181 c -4.292085,11.139436 -4.083893,11.143837 8.189048,0.06949 6.928809,-6.251065 11.184996,-12.764801 9.461832,-14.483514 -1.723164,-1.718712 1.250084,-9.797357 6.60409,-17.942944 C 100.55315,13.12499 102.3625,6.8994042 101.78602,3.4798143 Z"
|
||||
id="path376" /><path
|
||||
style="fill:#249b12;fill-opacity:1;stroke-width:6.13818"
|
||||
d="M 152.69828,1.6279129 C 143.95311,9.3306184 137.82082,17.109763 139.65823,20.0735 c 2.43316,3.923854 0.62923,4.66832 -4.67087,1.927182 -4.74904,-2.456231 -3.10032,0.208469 3.66226,5.913113 12.094,10.205031 12.04365,10.311582 -3.07391,6.966578 -10.94053,-2.420791 -20.68419,1.109519 -33.81286,12.233204 -10.143845,8.595649 -14.047847,14.1949 -8.669351,12.43681 5.37859,-1.758091 13.678121,-0.701847 18.443381,2.358018 7.23162,4.641914 7.29684,6.444478 0.36016,10.904561 -6.53011,4.199033 -5.24827,7.481728 5.97969,15.32156 7.85943,5.487604 11.45428,9.982895 7.99694,9.982895 -3.45739,0 -9.24951,-2.960262 -12.87194,-6.571412 -10.07391,-10.042425 -35.214227,23.822011 -25.948017,34.952181 8.254642,9.91526 19.936607,4.43553 15.441527,-7.24176 -1.88488,-4.89601 -0.0325,-7.05622 4.5508,-5.30276 4.25188,1.62606 18.06029,-8.16574 30.67893,-21.761175 21.30252,-22.951996 22.75508,-28.087519 7.07236,-24.93338 -3.38124,0.680999 -4.09154,-0.806081 -1.58491,-3.303774 2.50665,-2.498851 1.47245,-8.248431 -2.29337,-12.771982 -9.73841,-11.697207 0.7152,-10.198545 14.28881,2.047631 10.79331,9.737365 12.84242,8.77169 39.62444,-18.69714 4.56204,-4.678975 7.72522,-8.400845 10.93877,-12.161398 A 132.70987,132.29573 0 0 0 170.32518,5.6624869 c -2.26897,1.7441923 -4.2777,2.9160209 -6.64008,5.0391641 l -18.83962,16.93766 15.34545,-18.3858262 c 2.09354,-2.5081162 2.30986,-2.9025863 4.21462,-5.2189108 A 132.70987,132.29573 0 0 0 152.6983,1.6286078 Z"
|
||||
id="path374" /><path
|
||||
style="fill:#7a5d34;fill-opacity:1;stroke-width:6.13818"
|
||||
d="m 131.92547,0 a 132.70987,132.29573 0 0 0 -19.36796,1.4245396 c 0.30485,0.2084692 0.55975,0.5188567 0.8646,0.7180606 10.31164,6.7351767 14.44914,6.9698204 25.76792,-1.95034527 a 132.70987,132.29573 0 0 0 -7.26449,-0.18530596 z"
|
||||
id="path315" /></g></svg>
|
After Width: | Height: | Size: 18 KiB |
81
sandbox/templates/base.html
Normal file
81
sandbox/templates/base.html
Normal file
@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>{% load cms_tags i18n menu_tags sekizai_tags static %}{% spaceless %}
|
||||
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
|
||||
<html data-bs-theme="dark" lang="{{ LANGUAGE_CODE|default:"en-us" }}" dir="{{ LANGUAGE_BIDI|yesno:'rtl,ltr,auto' }}">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<link rel="icon" type="image/x-icon" href="{% static 'colormatic_logo.svg' %}">
|
||||
{% block meta %}
|
||||
<meta name="description" content="{% page_attribute "meta_description" %}"/>
|
||||
<meta property="og:type" content="website"/>
|
||||
<meta property="og:title" content="{{ request.current_page.get_page_title|escape }}"/>
|
||||
<meta property="og:description" content="{% page_attribute meta_description %}"/>
|
||||
{% endblock meta %}
|
||||
{% block canonical_url %}
|
||||
<link rel="canonical" href="{{ request.build_absolute_uri|urlencode:":/&?" }}"/>
|
||||
<meta property="og:url" content="{{ request.build_absolute_uri|urlencode:"&?" }}"/>
|
||||
{% endblock canonical_url %}
|
||||
{% block fb_meta %}{% endblock %}
|
||||
<title>{% block title %}{{ request.current_page.get_page_title|striptags }}{% endblock %}</title>
|
||||
{% block base_css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
{% endblock base_css %}
|
||||
{% endspaceless %}{% render_block 'css' %}{% spaceless %}
|
||||
{% block page_head %}{% endblock %}
|
||||
</head>
|
||||
<body {% block body_attrs %}{% endblock %}>
|
||||
{% endspaceless %}{% cms_toolbar %}{% block navbar %}
|
||||
<nav class="navbar {% block navbar_options %}navbar-expand-lg{% endblock %}">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/"><img class="logo" width="30" src="{% static 'colormatic_logo.svg' %}" alt="Colormatic Logo">{% block brand %}{% endblock %}</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">{% block menubar %}{% show_menu 0 100 100 100 'bootstrap5/menu.html' %}{% endblock %}</ul>
|
||||
{% block searchbar %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endblock navbar %}
|
||||
{% block content %}
|
||||
<section>
|
||||
{% placeholder "Page Content" %}
|
||||
</section>
|
||||
{% endblock content %}{% spaceless %}
|
||||
{% block base_js %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
{% endblock base_js %}
|
||||
{% endspaceless %}{% render_block 'js' %}{% spaceless %}
|
||||
{% block end_js %}
|
||||
<script>
|
||||
|
||||
/*/
|
||||
* Automatically set dark theme
|
||||
*
|
||||
* This code will detect when the OS's color scheme changes
|
||||
* and will update accordingly.
|
||||
/*/
|
||||
|
||||
let isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
|
||||
if (isDarkMode) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
||||
}
|
||||
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (event) => {
|
||||
isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
|
||||
if (isDarkMode) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
||||
} else {
|
||||
document.documentElement.removeAttribute('data-bs-theme');
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock end_js %}
|
||||
{% block bottom_css %}{% endblock %}
|
||||
</body>
|
||||
</html>{% endspaceless %}
|
34
sandbox/urls.py
Normal file
34
sandbox/urls.py
Normal file
@ -0,0 +1,34 @@
|
||||
"""
|
||||
URL configuration for sandbox project.
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/5.2/topics/http/urls/
|
||||
Examples:
|
||||
Function views
|
||||
1. Add an import: from my_app import views
|
||||
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
||||
Class-based views
|
||||
1. Add an import: from other_app.views import Home
|
||||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
||||
Including another URLconf
|
||||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.conf import settings
|
||||
from django.conf.urls.i18n import i18n_patterns
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
from django.views.i18n import JavaScriptCatalog
|
||||
|
||||
urlpatterns = i18n_patterns(
|
||||
path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),
|
||||
path('admin/', admin.site.urls),
|
||||
path('filer/', include('filer.urls')),
|
||||
path('', include('cms.urls')),
|
||||
)
|
||||
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
16
sandbox/wsgi.py
Normal file
16
sandbox/wsgi.py
Normal file
@ -0,0 +1,16 @@
|
||||
"""
|
||||
WSGI config for sandbox project.
|
||||
|
||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sandbox.settings')
|
||||
|
||||
application = get_wsgi_application()
|
Reference in New Issue
Block a user