Compare commits

..
12 Commits
Author SHA1 Message Date
davide_borgonovo a96cede14f white-space: normal nello user-tools che altrimenti nella versione mobile tagliava i link in alto a dx 2022-09-14 14:34:35 +02:00
Guido 903417ab79 theme.env_name everywere 2022-09-13 19:04:50 +02:00
davide_borgonovo d76c64c2d6 Messa la migrazione che altrimenti voleva fare la prima volta che si faceva makemigrations. Mi era scapapto un verbose name 2022-08-26 11:23:12 +02:00
davide_borgonovo 4244b0b3ae Aggiornata versione 2022-04-28 18:34:52 +02:00
davide_borgonovo 7baffaf490 Ora più utenti possono avere lo stesso tema e li setto con una Inline 2022-04-28 18:34:28 +02:00
davide_borgonovo b8a160f746 Aggiornata versione 2022-03-15 17:59:01 +01:00
davide_borgonovo 5e3e3a1480 Revert "Converted dynamic inline CSS to external static CSS using CSS variables. #157 #93"
This reverts commit 8fe7178a13.
2022-03-15 17:56:03 +01:00
davide_borgonovo 7d649185cb Forkino per aggiungere modalità demo con un tema selezionato e per rendere il tema associabile ad un utente 2022-03-14 23:58:22 +01:00
Fabio Caccamo 3ff4f05e51 Update test-package.yml
Revert "Update test-package.yml"

This reverts commit d5cb8ff3fd09d43e3b2d333693b9fd97619a2b7f.

Update test-package.yml

Updated `create-matrix-action` version.

Update test-package.yml

Update test-package.yml

Update test-package.yml

Update test-package.yml
2022-03-10 15:50:09 +01:00
Fabio Caccamo d8cffd8c2c Updated CHANGELOG and version. 2022-03-09 10:14:57 +01:00
Mustafa M. A. U. AbuGhazy 8fe7178a13 Converted dynamic inline CSS to external static CSS using CSS variables. #157 #93 2022-03-09 10:14:57 +01:00
Fabio Caccamo d2b680e477 Update test-package.yml 2022-03-09 10:14:57 +01:00
27 changed files with 770 additions and 749 deletions

No files matched your search

+9 -18
View File
@@ -6,7 +6,8 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
create_matrix:
prepare:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -14,7 +15,8 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Create matrix - name: Create matrix
uses: fabiocaccamo/create-matrix-action@v1 uses: fabiocaccamo/create-matrix-action@v2
id: create_matrix
with: with:
matrix: | matrix: |
python-version {2.7}, django-version {1.8,1.9,1.10,1.11}, database {sqlite,postgres} python-version {2.7}, django-version {1.8,1.9,1.10,1.11}, database {sqlite,postgres}
@@ -24,22 +26,17 @@ jobs:
python-version {3.9}, django-version {2.2,3.0,3.1,3.2}, database {sqlite,postgres} python-version {3.9}, django-version {2.2,3.0,3.1,3.2}, database {sqlite,postgres}
python-version {3.10}, django-version {3.2,4.0}, database {sqlite,postgres} python-version {3.10}, django-version {3.2,4.0}, database {sqlite,postgres}
- name: Set matrix output variable
id: set_matrix
run: |
echo "::set-output name=matrix::$(cat ./matrix.json)"
outputs: outputs:
matrix: ${{ steps.set_matrix.outputs.matrix }} matrix: ${{ steps.create_matrix.outputs.matrix }}
run_tests: test:
needs: create_matrix needs: prepare
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
include: ${{fromJson(needs.create_matrix.outputs.matrix)}} include: ${{fromJson(needs.prepare.outputs.matrix)}}
services: services:
postgres: postgres:
@@ -55,13 +52,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install psycopg2 prerequisites - name: Install psycopg2 prerequisites
run: sudo apt-get install libpq-dev run: sudo apt-get install libpq-dev
+15 -4
View File
@@ -1,16 +1,25 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from admin_interface.compat import gettext_lazy as _
from admin_interface.models import Theme
from django.contrib import admin from django.contrib import admin
from django.contrib.auth import models as auth_models
from admin_interface.compat import gettext_lazy as _
from admin_interface.models import Theme, UserTheme
class UserInline(admin.TabularInline):
model = UserTheme
extra = 0
autocomplete_fields = ('user', )
class ThemeAdmin(admin.ModelAdmin): class ThemeAdmin(admin.ModelAdmin):
inlines = [UserInline, ]
list_display = ( list_display = (
"name", "name",
"active", "active",
"demo",
) )
list_editable = ("active",) list_editable = ("active",)
list_per_page = 100 list_per_page = 100
@@ -24,6 +33,7 @@ class ThemeAdmin(admin.ModelAdmin):
"fields": ( "fields": (
"name", "name",
"active", "active",
"demo",
), ),
}, },
), ),
@@ -133,7 +143,8 @@ class ThemeAdmin(admin.ModelAdmin):
), ),
}, },
), ),
(_("Navigation Bar"), {"classes": ("wide",), "fields": ("foldable_apps",)}), (_("Navigation Bar"), {"classes": (
"wide",), "fields": ("foldable_apps",)}),
( (
_("Related Modal"), _("Related Modal"),
{ {
+36
View File
@@ -0,0 +1,36 @@
from .models import Theme
def get_active_theme(request):
objs_manager = Theme.objects
objs_active_qs = objs_manager.filter(active=True)
objs_active_ls = list(objs_active_qs)
objs_active_count = len(objs_active_ls)
if objs_active_count == 0:
obj = objs_manager.first()
if obj:
obj.set_active()
else:
obj = objs_manager.create()
elif objs_active_count == 1:
obj = objs_active_ls[0]
elif objs_active_count > 1:
# for frame_record in inspect.stack():
# if frame_record[3]=='get_response':
# request = frame_record[0].f_locals['request']
# user = request.user
# break
# else:
# request = None
user = request.user
try:
obj = objs_active_qs.filter(user=user).first()
except:
obj = objs_active_ls[-1]
obj.set_active()
return {
'theme': obj,
}
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("admin_interface", "0024_remove_theme_css"),
]
operations = [
migrations.AddField(
model_name="theme",
name="demo",
field=models.BooleanField(default=False, verbose_name="demo"),
),
]
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("admin_interface", "0025_add_demo_option"),
]
operations = [
migrations.AddField(
model_name="theme",
name="user",
field=models.ForeignKey('auth.User', on_delete=models.CASCADE, null=True, blank=True, verbose_name="active for user"),
),
]
@@ -0,0 +1,37 @@
# Generated by Django 3.2.13 on 2022-04-28 16:03
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('admin_interface', '0026_add_user_option'),
]
operations = [
migrations.RemoveField(
model_name='theme',
name='user',
),
migrations.CreateModel(
name='UserTheme',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('theme', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admin_interface.theme')),
('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, unique=True)),
],
options={
'verbose_name': 'Users theme',
'verbose_name_plural': 'Users themes',
},
),
migrations.AddField(
model_name='theme',
name='users',
field=models.ManyToManyField(through='admin_interface.UserTheme', to=settings.AUTH_USER_MODEL),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 4.0.4 on 2022-08-25 14:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('admin_interface', '0027_usertheme_m2m'),
]
operations = [
migrations.AlterField(
model_name='theme',
name='demo',
field=models.BooleanField(default=False, verbose_name='is demo'),
),
]
+55 -25
View File
@@ -2,16 +2,28 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from admin_interface.cache import del_cached_active_theme import inspect
from admin_interface.compat import FileExtensionValidator, force_str, gettext_lazy as _
from colorfield.fields import ColorField from colorfield.fields import ColorField
from django.db import models from django.db import models
from django.db.models.signals import post_delete, post_save, pre_save from django.db.models.signals import post_delete, post_save, pre_save
from six import python_2_unicode_compatible from six import python_2_unicode_compatible
from admin_interface.cache import del_cached_active_theme
from admin_interface.compat import FileExtensionValidator, force_str
from admin_interface.compat import gettext_lazy as _
@python_2_unicode_compatible
class UserTheme(models.Model):
class Meta:
verbose_name = 'Users theme'
verbose_name_plural = 'Users themes'
user = models.ForeignKey(
'auth.User', on_delete=models.CASCADE, null=True, unique=True)
theme = models.ForeignKey('Theme', on_delete=models.CASCADE)
@python_2_unicode_compatible @python_2_unicode_compatible
class Theme(models.Model): class Theme(models.Model):
@@ -25,22 +37,22 @@ class Theme(models.Model):
del_cached_active_theme() del_cached_active_theme()
Theme.get_active_theme() Theme.get_active_theme()
@staticmethod # @staticmethod
def post_save_handler(instance, **kwargs): # def post_save_handler(instance, **kwargs):
del_cached_active_theme() # del_cached_active_theme()
if instance.active: # if instance.active:
Theme.objects.exclude(pk=instance.pk).update(active=False) # Theme.objects.exclude(pk=instance.pk).update(active=False)
Theme.get_active_theme() # Theme.get_active_theme()
@staticmethod # @staticmethod
def pre_save_handler(instance, **kwargs): # def pre_save_handler(instance, **kwargs):
if instance.pk is None: # if instance.pk is None:
try: # try:
obj = Theme.objects.get(name=instance.name) # obj = Theme.objects.get(name=instance.name)
if obj: # if obj:
instance.pk = obj.pk # instance.pk = obj.pk
except Theme.DoesNotExist: # except Theme.DoesNotExist:
pass # pass
@staticmethod @staticmethod
def get_active_theme(): def get_active_theme():
@@ -60,6 +72,17 @@ class Theme(models.Model):
obj = objs_active_ls[0] obj = objs_active_ls[0]
elif objs_active_count > 1: elif objs_active_count > 1:
for frame_record in inspect.stack():
if frame_record[3] == 'get_response':
request = frame_record[0].f_locals['request']
user = request.user
break
else:
request = None
try:
return objs_active_qs.filter(user=user).first()
except:
obj = objs_active_ls[-1] obj = objs_active_ls[-1]
obj.set_active() obj.set_active()
@@ -70,6 +93,9 @@ class Theme(models.Model):
) )
active = models.BooleanField(default=True, verbose_name=_("active")) active = models.BooleanField(default=True, verbose_name=_("active"))
demo = models.BooleanField(default=False, verbose_name=_("is demo"))
users = models.ManyToManyField('auth.User', through=UserTheme)
title = models.CharField( title = models.CharField(
max_length=50, max_length=50,
default=_("Django administration"), default=_("Django administration"),
@@ -83,7 +109,8 @@ class Theme(models.Model):
max_length=10, max_length=10,
verbose_name=_("color"), verbose_name=_("color"),
) )
title_visible = models.BooleanField(default=True, verbose_name=_("visible")) title_visible = models.BooleanField(
default=True, verbose_name=_("visible"))
logo = models.FileField( logo = models.FileField(
upload_to="admin-interface/logo/", upload_to="admin-interface/logo/",
@@ -123,7 +150,8 @@ class Theme(models.Model):
verbose_name=_("favicon"), verbose_name=_("favicon"),
) )
env_name = models.CharField(blank=True, max_length=50, verbose_name=_("name")) env_name = models.CharField(
blank=True, max_length=50, verbose_name=_("name"))
env_color = ColorField( env_color = ColorField(
blank=True, blank=True,
default="#E74C3C", default="#E74C3C",
@@ -294,7 +322,8 @@ class Theme(models.Model):
verbose_name=_("text color"), verbose_name=_("text color"),
) )
related_modal_active = models.BooleanField(default=True, verbose_name=_("active")) related_modal_active = models.BooleanField(
default=True, verbose_name=_("active"))
related_modal_background_color = ColorField( related_modal_background_color = ColorField(
blank=True, blank=True,
default="#000000", default="#000000",
@@ -361,7 +390,8 @@ class Theme(models.Model):
default=True, verbose_name=_("sticky position") default=True, verbose_name=_("sticky position")
) )
foldable_apps = models.BooleanField(default=True, verbose_name=_("foldable apps")) foldable_apps = models.BooleanField(
default=True, verbose_name=_("foldable apps"))
recent_actions_visible = models.BooleanField( recent_actions_visible = models.BooleanField(
default=True, verbose_name=_("visible") default=True, verbose_name=_("visible")
@@ -389,5 +419,5 @@ class Theme(models.Model):
post_delete.connect(Theme.post_delete_handler, sender=Theme) post_delete.connect(Theme.post_delete_handler, sender=Theme)
post_save.connect(Theme.post_save_handler, sender=Theme) # post_save.connect(Theme.post_save_handler, sender=Theme)
pre_save.connect(Theme.pre_save_handler, sender=Theme) # pre_save.connect(Theme.pre_save_handler, sender=Theme)
@@ -1,440 +0,0 @@
@media (prefers-color-scheme: dark) {
:root .admin-interface {
--primary: #79aec8;
--secondary: #417690;
--accent: #f5dd5d;
--primary-fg: #fff;
--body-fg: #333;
--body-bg: #fff;
--body-quiet-color: #666;
--body-loud-color: #000;
--header-color: #ffc;
--header-branding-color: var(--accent);
--header-bg: var(--secondary);
--header-link-color: var(--primary-fg);
--breadcrumbs-fg: #c4dce8;
--breadcrumbs-link-fg: var(--body-bg);
--breadcrumbs-bg: var(--primary);
--link-fg: #447e9b;
--link-hover-color: #036;
--link-selected-fg: #5b80b2;
--hairline-color: #e8e8e8;
--border-color: #ccc;
--error-fg: #ba2121;
--message-success-bg: #dfd;
--message-warning-bg: #ffc;
--message-error-bg: #ffefef;
--darkened-bg: #f8f8f8;
--selected-bg: #e4e4e4;
--selected-row: #ffc;
--button-fg: #fff;
--button-bg: var(--primary);
--button-hover-bg: #609ab6;
--default-button-bg: var(--secondary);
--default-button-hover-bg: #205067;
--close-button-bg: #888;
--close-button-hover-bg: #747474;
--delete-button-bg: #ba2121;
--delete-button-hover-bg: #a41515;
--object-tools-fg: var(--button-fg);
--object-tools-bg: var(--close-button-bg);
--object-tools-hover-bg: var(--close-button-hover-bg);
}
}
.admin-interface #header {
background: var(--admin-interface-header-background-color);
color: var(--admin-interface-header-text-color);
}
.admin-interface #header + #main {
border-top: var(--admin-interface-main-border-top);
}
.admin-interface .environment-label {
}
.admin-interface .environment-label::before {
content: "";
display: inline-block;
width: 8px;
height: 8px;
background-color: var(--admin-interface-env-color);
border-radius: 100%;
margin-right: 6px;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.admin-interface .environment-label::after {
content: " - ";
}
@media (max-width: 1024px) {
.admin-interface .environment-label::after {
content: "";
}
}
.admin-interface .language-chooser {
display: inline-block;
position: absolute;
top: 15px;
right: 15px;
z-index: 10;
}
@media (min-width: 768px) {
.admin-interface .language-chooser {
right: 30px;
}
}
@media (min-width: 1024px) {
.admin-interface .language-chooser {
position: static;
float: right;
margin-left: 20px;
}
}
.admin-interface .language-chooser-hidden-form {
display: none;
}
.admin-interface .language-chooser-select-form {
display: inline-block;
}
.admin-interface #branding h1,
.admin-interface.login #header h1,
.admin-interface.login #header h1 a {
color: var(--admin-interface-title-color);
}
.admin-interface #branding h1 a {
color: inherit;
}
.admin-interface #branding h1 .logo.default {
background-color: transparent;
background-repeat: no-repeat;
background-position: center center;
background-size: 104px 36px;
background-image: var(--admin-interface-logo-default-background-image);
}
.admin-interface #branding h1 img.logo,
.admin-interface.login #header #branding h1 img.logo {
max-width: var(--admin-interface-log-max-width);
max-height: var(--admin-interface-log-max-height);
}
.admin-interface #header #user-tools a {
color: var(--admin-interface-header-link-color);
}
.admin-interface #header #user-tools a:hover,
.admin-interface #header #user-tools a:active {
color: var(--admin-interface-header-link_hover-color);
border-bottom-color: rgba(255, 255, 255, 0.5);
}
.admin-interface #nav-sidebar .current-app .section:link,
.admin-interface #nav-sidebar .current-app .section:visited {
color: var(--admin-interface-module-link-selected-color);
font-weight: normal;
}
.admin-interface #nav-sidebar .current-app .section:focus,
.admin-interface #nav-sidebar .current-app .section:hover {
color: var(--admin-interface-module-link-hover-color);
}
.admin-interface #nav-sidebar .current-model {
background: var(--admin-interface-module-background-selected-color);
}
.admin-interface #changelist table tbody tr.selected {
background-color: var(--admin-interface-module-background-selected-color);
}
.admin-interface .module h2,
.admin-interface .module caption,
.admin-interface .module.filtered h2 {
background: var(--admin-interface-module-background-color);
color: var(--admin-interface-module-text-color);
}
.admin-interface .module a.section:link,
.admin-interface .module a.section:visited {
color: var(--admin-interface-module-link-color);
}
.admin-interface .module a.section:active,
.admin-interface .module a.section:hover {
color: var(--admin-interface-module-link-hover-color);
}
.admin-interface div.breadcrumbs {
background: var(--admin-interface-module-background-color);
color: var(--admin-interface-module-text-color);
}
.admin-interface div.breadcrumbs a {
color: var(--admin-interface-module-link-color);
}
.admin-interface div.breadcrumbs a:active,
.admin-interface div.breadcrumbs a:focus,
.admin-interface div.breadcrumbs a:hover {
color: var(--admin-interface-module-link-hover-color);
}
.admin-interface fieldset.collapse.collapsed a.collapse-toggle {
color: var(--admin-interface-module-link-color);
}
.admin-interface fieldset.collapse.collapsed a.collapse-toggle:hover,
.admin-interface fieldset.collapse.collapsed a.collapse-toggle:active {
color: var(--admin-interface-module-link-hover-color);
}
.admin-interface fieldset.collapse a.collapse-toggle {
color: var(--admin-interface-module-link-color);
}
.admin-interface fieldset.collapse a.collapse-toggle:hover,
.admin-interface fieldset.collapse a.collapse-toggle:active {
color: var(--admin-interface-module-link-hover-color);
}
.admin-interface .inline-group h2 {
background: var(--admin-interface-module-background-color);
color: var(--admin-interface-module-text-color);
}
.admin-interface .selector .selector-chosen h2 {
border-color: var(--admin-interface-module-background-color);
background: var(--admin-interface-module-background-color);
color: var(--admin-interface-module-text-color);
}
.admin-interface .selector .selector-available h2,
.admin-interface .selector .selector-chosen h2 {
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}
.admin-interface .selector a.selector-chooseall:focus,
.admin-interface .selector a.selector-chooseall:hover,
.admin-interface .selector a.selector-clearall:focus,
.admin-interface .selector a.selector-clearall:hover {
color: var(--admin-interface-generic-link-hover-color);
}
.admin-interface a:link,
.admin-interface a:visited {
color: var(--admin-interface-generic-link-color);
}
.admin-interface a:hover {
color: var(--admin-interface-generic-link-hover-color);
}
.admin-interface thead th a,
.admin-interface thead th a:link,
.admin-interface thead th a:visited,
.admin-interface thead th a:focus,
.admin-interface thead th a:hover {
color: #666666;
}
.admin-interface .button,
.admin-interface input[type=submit],
.admin-interface input[type=button],
.admin-interface .submit-row input,
.admin-interface a.button {
background: var(--admin-interface-save-button-background-color);
color: var(--admin-interface-save-button-text-color);
}
.admin-interface .button:active,
.admin-interface .button:focus,
.admin-interface .button:hover,
.admin-interface input[type=submit]:active,
.admin-interface input[type=submit]:focus,
.admin-interface input[type=submit]:hover,
.admin-interface input[type=button]:active,
.admin-interface input[type=button]:focus,
.admin-interface input[type=button]:hover {
background: var(--admin-interface-save-button-background-hover-color);
color: var(--admin-interface-save-button-text-color);
outline: none;
}
.admin-interface .button.default,
.admin-interface input[type=submit].default,
.admin-interface .submit-row input.default {
background: var(--admin-interface-save-button-background-color);
color: var(--admin-interface-save-button-text-color);
outline: none;
}
.admin-interface .button.default:active,
.admin-interface .button.default:focus,
.admin-interface .button.default:hover,
.admin-interface input[type=submit].default:active,
.admin-interface input[type=submit].default:focus,
.admin-interface input[type=submit].default:hover,
.admin-interface.delete-confirmation form .cancel-link:hover {
background: var(--admin-interface-save-button-background-hover-color);
color: var(--admin-interface-save-button-text-color);
outline: none;
}
.admin-interface .submit-row a.deletelink:link,
.admin-interface .submit-row a.deletelink:visited,
.admin-interface.delete-confirmation form input[type="submit"] {
background: var(--admin-interface-delete-button-background-color);
color: var(--admin-interface-delete-button-text-color);
}
.admin-interface .submit-row a.deletelink:hover,
.admin-interface.delete-confirmation form input[type="submit"]:hover {
background: var(--admin-interface-delete-button-background-hover-color);
color: var(--admin-interface-delete-button-text-color);
}
.admin-interface .paginator a,
.admin-interface .paginator a:link,
.admin-interface .paginator a:visited,
.admin-interface .paginator .this-page {
border-radius: var(--admin-interface-module-border-radius);
}
.admin-interface .paginator a,
.admin-interface .paginator a:link,
.admin-interface .paginator a:visited {
background-color: #FFFFFF;
color: var(--admin-interface-generic-link-color);
}
.admin-interface .paginator a:hover,
.admin-interface .paginator a:active {
background-color: #F8F8F8;
color: var(--admin-interface-generic-link-hover-color);
}
.admin-interface .paginator .this-page {
background-color: var(--admin-interface-module-background-color);
color: var(--admin-interface-module-link-color);
}
.admin-interface .paginator a.showall,
.admin-interface .paginator a.showall:link,
.admin-interface .paginator a.showall:visited {
color: var(--admin-interface-generic-link-color);
}
.admin-interface .paginator a.showall:hover,
.admin-interface .paginator a.showall:active {
color: var(--admin-interface-generic-link-hover-color);
}
/* list-filter sticky */
@media (min-width: 768px) {
.admin-interface.list-filter-sticky .module.filtered #changelist-filter {
position: sticky;
top: 40px;
float: right;
z-index: 30;
}
/* feature not available for django < 3.1.2 */
.admin-interface.list-filter-sticky .module.filtered #toolbar + #changelist-filter {
position: absolute;
top: 0px;
z-index: 30;
}
}
.admin-interface .module.filtered #changelist-filter {
border-bottom-left-radius: var(--admin-interface-module-border-radius);
border-bottom-right-radius: var(--admin-interface-module-border-radius);
}
.admin-interface .module.filtered #changelist-filter #changelist-filter-clear a:focus,
.admin-interface .module.filtered #changelist-filter #changelist-filter-clear a:hover {
color: #666;
text-decoration: none;
}
.admin-interface .module.filtered #changelist-filter li a:focus,
.admin-interface .module.filtered #changelist-filter li a:hover {
color: #666;
text-decoration: none;
}
.admin-interface .module.filtered #changelist-filter li.selected a,
.admin-interface .module.filtered #changelist-filter li.selected a:link,
.admin-interface .module.filtered #changelist-filter li.selected a:visited,
.admin-interface .module.filtered #changelist-filter li.selected a:focus,
.admin-interface .module.filtered #changelist-filter li.selected a:hover {
/* color: #666; */
color: var(--admin-interface-generic-link-hover-color);
}
/* begin fix issue #11 - Inline border bottom should not be rounded */
.admin-interface .module h2,
.admin-interface.dashboard .module caption,
.admin-interface #nav-sidebar .module th,
.admin-interface #nav-sidebar .module caption,
.admin-interface .module.filtered h2 {
border-radius: var(--admin-interface-module-border-radius);
}
.admin-interface .inline-group h2 {
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}
.admin-interface .module.collapse.collapsed h2 {
/* fix collapsed inlines rounded bottom borders */
border-bottom-left-radius: var(--admin-interface-module-border-radius);
border-bottom-right-radius: var(--admin-interface-module-border-radius);
}
/* end fix */
.admin-interface #content-related {
border-radius: var(--admin-interface-module-border-radius);
}
.admin-interface .select2-container--admin-autocomplete .select2-results__option--highlighted[aria-selected] {
background-color: var(--admin-interface-module-background-color);
color: var(--admin-interface-module-text-color);
}
.admin-interface #toggle-nav-sidebar {
border-top-right-radius: var(--admin-interface-module-border-radius);
border-bottom-right-radius: var(--admin-interface-module-border-radius);
color: var(--admin-interface-generic-link-color);
}
.admin-interface #toggle-nav-sidebar:focus,
.admin-interface #toggle-nav-sidebar:hover,
.admin-interface #toggle-nav-sidebar:active {
color: var(--admin-interface-generic-link-hover-color);
}
.admin-interface .calendar td.selected a,
.admin-interface .calendar td a:active,
.admin-interface .calendar td a:focus,
.admin-interface .calendar td a:hover,
.admin-interface .timelist a:active,
.admin-interface .timelist a:focus,
.admin-interface .timelist a:hover {
background: var(--admin-interface-module-background-color);
}
@@ -1,13 +0,0 @@
.admin-interface.dashboard #content {
max-width: 600px;
margin-right: auto;
margin-left: auto;
}
.admin-interface.dashboard #content #recent-actions-module {
display: none;
}
.admin-interface.dashboard #content {
width: auto;
}
+17 -103
View File
@@ -2,109 +2,28 @@
{% load i18n static admin_interface_tags %} {% load i18n static admin_interface_tags %}
{% block title %} {% block title %}
{% get_admin_interface_theme as theme %}
{% if title %}{{ title }} | {% endif %}{% if theme.title %}{% trans theme.title %}{% else %}{{ site_title|default:_('Django administration') }}{% endif %} {% if title %}{{ title }} | {% endif %}{% if theme.title %}{% trans theme.title %}{% else %}{{ site_title|default:_('Django administration') }}{% endif %}
{% endblock %} {% endblock %}
{% block extrastyle %} {% block extrastyle %}
{% get_admin_interface_theme as theme %}
{% get_admin_interface_nocache as version_md5_cache %} {% get_admin_interface_nocache as version_md5_cache %}
{% get_current_language as current_lang %} {% get_current_language as current_lang %}
<style type="text/css"> <style type="text/css">
:root .admin-interface { {% include "admin_interface/css/admin-interface.css" %}
--admin-interface-title-color: {{ theme.title_color }}; {% include "admin_interface/css/admin-interface-fix.css" %}
--admin-interface-logo-color: {{ theme.logo_color }}; {% include "admin_interface/css/form-controls.css" %}
--admin-interface-logo-default-background-image: url("data:image/svg+xml;utf8,<?xml version='1.0' encoding='utf-8'?><svg width='104px' height='36px' viewBox='0 0 104 36' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:sketch='http://www.bohemiancoding.com/sketch/ns'><g id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' sketch:type='MSPage'><g id='logo-django' sketch:type='MSArtboardGroup' transform='translate(-8.000000, -5.000000)' fill='{{ theme.logo_color|urlencode }}'><path d='M20.2602817,5 L25.9509859,5 L25.9509859,31.0824248 C23.0360563,31.6338042 20.8901408,31.8507285 18.5684507,31.8507285 C11.6180282,31.8434735 8,28.7383366 8,22.7747325 C8,17.0287781 11.8377465,13.2997118 17.7847887,13.2997118 C18.7076056,13.2997118 19.4107042,13.3722617 20.2602817,13.5899115 L20.2602817,5 L20.2602817,5 Z M20.2602817,18.1242821 C19.5938028,17.9066323 19.044507,17.8340823 18.3414085,17.8340823 C15.4630986,17.8340823 13.8005634,19.5897906 13.8005634,22.6666331 C13.8005634,25.6622196 15.3898592,27.316358 18.3047887,27.316358 C18.9346479,27.316358 19.4473239,27.2808085 20.2602817,27.1719836 L20.2602817,18.1242821 L20.2602817,18.1242821 Z M34.9960563,13.6987364 L34.9960563,26.7577235 C34.9960563,31.2550936 34.6591549,33.417807 33.6704225,35.2823401 C32.7476056,37.0750489 31.531831,38.2053768 29.0197183,39.453961 L23.7391549,36.9654985 C26.2512676,35.7981701 27.4670423,34.7665101 28.2433803,33.1921767 C29.056338,31.5822938 29.3126761,29.7177606 29.3126761,24.8133855 L29.3126761,13.6987364 L34.9960563,13.6987364 Z M29.3126761,5.02901997 L35.0033803,5.02901997 L35.0033803,10.8112493 L29.3126761,10.8112493 L29.3126761,5.02901997 Z M38.4302535,14.9828702 C40.9430986,13.8148163 43.3453521,13.2997118 45.9673239,13.2997118 C48.8895775,13.2997118 50.8077183,14.0687411 51.6580282,15.5705246 C52.1340845,16.4121037 52.2878873,17.5076077 52.2878873,19.8509704 L52.2878873,31.2993491 C49.7398873,31.6620987 46.5239437,31.922553 44.1649014,31.922553 C39.3970141,31.922553 37.2584225,30.2756696 37.2584225,26.6198787 C37.2584225,22.6659076 40.1008451,20.8376494 47.079831,20.2565245 L47.079831,19.0159207 C47.079831,17.9929667 46.559831,17.6229621 45.124338,17.6229621 C43.0223662,17.6229621 40.6567324,18.2106165 38.4375775,19.3423954 L38.4302535,14.9828702 Z M47.336169,23.9420608 C43.571662,24.3048105 42.3485634,24.8931904 42.3485634,26.3579734 C42.3485634,27.4549284 43.051662,27.9693073 44.604338,27.9693073 C45.4539155,27.9693073 46.2302535,27.8967574 47.3354366,27.7153826 L47.3354366,23.9420608 L47.336169,23.9420608 Z M55.056338,14.5765906 C58.4180282,13.6987364 61.1857465,13.2997118 63.9908169,13.2997118 C66.9057465,13.2997118 69.0157746,13.9599162 70.2674366,15.2367949 C71.4458592,16.4411237 71.8208451,17.7615324 71.8208451,20.5764696 L71.8208451,31.6258237 L66.1294085,31.6258237 L66.1294085,20.8013744 C66.1294085,18.6393866 65.3896901,17.8340823 63.3616901,17.8340823 C62.5846197,17.8340823 61.8822535,17.9066323 60.7397183,18.2403619 L60.7397183,31.6265492 L55.056338,31.6265492 L55.056338,14.5765906 Z M74.0326761,34.7012152 C76.0240563,35.7241692 78.0169014,36.1964692 80.1261972,36.1964692 C83.8540845,36.1964692 85.4433803,34.6946857 85.4433803,31.1107193 L85.4433803,31.0018944 C84.3374648,31.5460188 83.223493,31.7716491 81.7513803,31.7716491 C76.764507,31.7716491 73.5932394,28.5141573 73.5932394,23.3558574 C73.5932394,16.9496987 78.2878873,13.3294573 86.5932394,13.3294573 C89.0321127,13.3294573 91.2878873,13.583382 94.0189859,14.1347615 L92.0708169,18.1975575 C90.5562254,17.9073578 91.9463099,18.1540275 90.804507,18.0452026 L90.804507,18.6328571 L90.8777465,21.0124947 L90.9136338,24.0886117 C90.9509859,24.8583664 90.9509859,25.6259447 90.988338,26.3956994 L90.988338,27.9330324 C90.988338,32.7648576 90.5774648,35.0291409 89.3616901,36.900929 C87.5892958,39.6425908 84.5212958,41 80.1620845,41 C77.943662,41 76.0240563,40.6727998 74.0326761,39.9030451 L74.0326761,34.7012152 L74.0326761,34.7012152 Z M85.3335211,17.8703573 L85.1504225,17.8703573 L84.7395493,17.8703573 C83.6336338,17.8340823 82.3380282,18.1242821 81.4510986,18.6756615 C80.0895775,19.4446908 79.3872113,20.8376494 79.3872113,22.8110074 C79.3872113,25.6252192 80.7934085,27.2365531 83.3055211,27.2365531 C84.0811268,27.2365531 84.7117183,27.0921787 85.4441127,26.8738034 L85.4441127,26.4667983 L85.4441127,24.9294653 C85.4441127,24.269261 85.4067606,23.5365067 85.4067606,22.7674775 L85.3708732,20.17019 L85.3335211,18.3056569 L85.3335211,17.8703573 Z M102.84507,13.2271619 C108.528451,13.2271619 112,16.7748534 112,22.5208077 C112,28.4118619 108.382704,32.1039278 102.617296,32.1039278 C96.9265915,32.1039278 93.4176901,28.5569618 93.4176901,22.8480079 C93.4272113,16.9199532 97.044507,13.2271619 102.84507,13.2271619 Z M102.727887,27.5623023 C104.910423,27.5623023 106.199437,25.7710445 106.199437,22.6586526 C106.199437,19.5825356 104.94631,17.7542774 102.765239,17.7542774 C100.509465,17.7542774 99.2189859,Line truncated {% include "admin_interface/css/list-filter-dropdown.css" %}
--admin-interface-env-color: {{ theme.env_color }}; {% include "admin_interface/css/recent-actions.css" %}
--admin-interface-header-background-color: {{ theme.css_header_background_color }}; {% include "admin_interface/css/related-modal.css" %}
--admin-interface-header-text-color: {{ theme.css_header_text_color }}; {% include "admin_interface/css/jquery.ui.tabs.css" %}
--admin-interface-header-link-color: {{ theme.css_header_link_color }}; {% include "admin_interface/css/modeltranslation.css" %}
--admin-interface-header-link_hover-color: {{ theme.css_header_link_hover_color }}; {% include "admin_interface/css/sorl-thumbnail.css" %}
--admin-interface-module-background-color: {{ theme.css_module_background_color }}; {% include "admin_interface/css/tabbed-admin.css" %}
--admin-interface-module-background-selected-color: {{ theme.css_module_background_selected_color }}; {% include "admin_interface/css/ckeditor.css" %}
--admin-interface-module-text-color: {{ theme.css_module_text_color }}; {% include "admin_interface/css/tinymce.css" %}
--admin-interface-module-link-color: {{ theme.css_module_link_color }}; {% include "admin_interface/css/json-widget.css" %}
--admin-interface-module-link-selected-color: {{ theme.css_module_link_selected_color }}; {% include "admin_interface/css/rtl.css" %}
--admin-interface-module-link-hover-color: {{ theme.css_module_link_hover_color }}; </style>
--admin-interface-generic-link-color: {{ theme.css_generic_link_color }};
--admin-interface-generic-link-hover-color: {{ theme.css_generic_link_hover_color }};
--admin-interface-save-button-background-color: {{ theme.css_save_button_background_color }};
--admin-interface-save-button-background-hover-color: {{ theme.css_save_button_background_hover_color }};
--admin-interface-save-button-text-color: {{ theme.css_save_button_text_color }};
--admin-interface-delete-button-background-color: {{ theme.css_delete_button_background_color }};
--admin-interface-delete-button-background-hover-color: {{ theme.css_delete_button_background_hover_color }};
--admin-interface-delete-button-text-color: {{ theme.css_delete_button_text_color }};
--admin-interface-related-modal-background-color: {{ theme.related_modal_background_color }};
--admin-interface-related-modal-background-opacity: {{ theme.related_modal_background_opacity }};
{% if theme.css_header_background_color != theme.css_module_background_color %}
--admin-interface-main-border-top: 10px solid var(--admin-interface-module-background-color);
{% else %}
--admin-interface-main-border-top: 0px;
{% endif %}
{% if theme.logo_max_width > 0 %}
--admin-interface-log-max-width: min({{ theme.logo_max_width }}px, 100%);
{% else %}
--admin-interface-log-max-width: 100%;
{% endif %}
{% if theme.logo_max_height > 0 %}
--admin-interface-log-max-height: {{ theme.logo_max_height }}px;
{% else %}
--admin-interface-log-max-height: unset;
{% endif %}
{% if theme.related_modal_rounded_corners %}
--admin-interface-related-modal-border-radius: 4px;
{% else %}
--admin-interface-related-modal-border-radius: 0px;
{% endif %}
{% if theme.css_module_rounded_corners %}
--admin-interface-module-border-radius: 4px;
--admin-interface-jsoneditor-border-radius: var(--admin-interface-module-border-radius);
--admin-interface-jsoneditor-overflow: hidden;
{% else %}
--admin-interface-module-border-radius: 0px;
--admin-interface-jsoneditor-border-radius: var(--admin-interface-module-border-radius);
--admin-interface-jsoneditor-overflow: unset;
{% endif %}
{% if not theme.related_modal_close_button_visible %}
--admin-interface-related-modal-close-button-display: none;
{% else %}
--admin-interface-related-modal-close-button-display: unset;
{% endif %}
}
</style>
<link rel="stylesheet" type="text/css"
href="{% static 'admin_interface/css/admin-interface.css' %}?v={{ version_md5_cache }}">
<link rel="stylesheet" type="text/css"
href="{% static 'admin_interface/css/admin-interface-fix.css' %}?v={{ version_md5_cache }}">
<link rel="stylesheet" type="text/css" href="{% static 'admin_interface/css/form-controls.css' %}">
<link rel="stylesheet" type="text/css"
href="{% static 'admin_interface/css/list-filter-dropdown.css' %}?v={{ version_md5_cache }}">
{% if not theme.recent_actions_visible %}
<link rel="stylesheet" type="text/css"
href="{% static 'admin_interface/css/recent-actions.css' %}?v={{ version_md5_cache }}"/>
{% endif %}
<link rel="stylesheet" type="text/css"
href="{% static 'admin_interface/css/related-modal.css' %}?v={{ version_md5_cache }}"/>
<link rel="stylesheet" type="text/css"
href="{% static 'admin_interface/css/jquery.ui.tabs.css' %}?v={{ version_md5_cache }}"/>
<link rel="stylesheet" type="text/css"
href="{% static 'admin_interface/css/modeltranslation.css' %}?v={{ version_md5_cache }}"/>
<link rel="stylesheet" type="text/css"
href="{% static 'admin_interface/css/sorl-thumbnail.css' %}?v={{ version_md5_cache }}"/>
<link rel="stylesheet" type="text/css"
href="{% static 'admin_interface/css/ckeditor.css' %}?v={{ version_md5_cache }}"/>
<link rel="stylesheet" type="text/css"
href="{% static 'admin_interface/css/tinymce.css' %}?v={{ version_md5_cache }}"/>
<link rel="stylesheet" type="text/css"
href="{% static 'admin_interface/css/json-widget.css' %}?v={{ version_md5_cache }}"/>
<link rel="stylesheet" type="text/css" href="{% static 'admin_interface/css/rtl.css' %}?v={{ version_md5_cache }}"/>
{% if current_lang == 'fa' %} {% if current_lang == 'fa' %}
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v27.2.2/dist/font-face.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v27.2.2/dist/font-face.css" />
@@ -114,7 +33,6 @@
{% block blockbots %} {% block blockbots %}
{{ block.super }} {{ block.super }}
{% get_admin_interface_theme as theme %}
{% get_admin_interface_nocache as version_md5_cache %} {% get_admin_interface_nocache as version_md5_cache %}
{# https://github.com/elky/django-flat-responsive#important-note #} {# https://github.com/elky/django-flat-responsive#important-note #}
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"> <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
@@ -130,17 +48,14 @@
{% endblock %} {% endblock %}
{% block bodyclass %} {% block bodyclass %}
{% get_admin_interface_theme as theme %}
flat-theme admin-interface flat-theme admin-interface
{% if theme.name %} {{ theme.name|slugify }}-theme {% endif %} {% if theme.name %} {{ theme.name|slugify }}-theme {% endif %}
{% if theme.foldable_apps %} foldable-apps {% endif %} {% if theme.foldable_apps %} foldable-apps {% endif %}
{% if theme.form_submit_sticky %} sticky-submit {% endif %} {% if theme.form_submit_sticky %} sticky-submit {% endif %}
{% if theme.form_pagination_sticky %} sticky-pagination {% endif %} {% if theme.form_pagination_sticky %} sticky-pagination {% endif %}
{% if theme.list_filter_sticky %} list-filter-sticky {% endif %}
{% endblock %} {% endblock %}
{% block branding %} {% block branding %}
{% get_admin_interface_theme as theme %}
<h1 id="site-name"> <h1 id="site-name">
<a href="{% url 'admin:index' %}"> <a href="{% url 'admin:index' %}">
{% if theme.logo_visible %} {% if theme.logo_visible %}
@@ -158,10 +73,9 @@ flat-theme admin-interface
{% endblock %} {% endblock %}
{% block welcome-msg %} {% block welcome-msg %}
{% get_admin_interface_theme as theme %}
{% if theme.language_chooser_active %} {% if theme.language_chooser_active %}
{% get_admin_interface_languages as languages %} {% get_admin_interface_languages as languages %}
{% include "admin_interface/language_chooser.html" %} {% include "admin_interface/language_chooser.html" %}
{% endif %} {% endif %}
{% if theme.env_visible_in_header %}<span class="environment-label {{ theme.env_name }}">{{ theme.env_name }}</span><br>{% endif %}{{ block.super }}<br> {% if theme.env_visible_in_header %}<span class="environment-label"></span><br>{% endif %}{{ block.super }}<br>
{% endblock %} {% endblock %}
@@ -103,7 +103,7 @@
.admin-interface #user-tools { .admin-interface #user-tools {
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
white-space: nowrap; white-space: normal;
align-self: flex-start; align-self: flex-start;
} }
@@ -0,0 +1,487 @@
@media (prefers-color-scheme: dark) {
:root .admin-interface {
--primary: #79aec8;
--secondary: #417690;
--accent: #f5dd5d;
--primary-fg: #fff;
--body-fg: #333;
--body-bg: #fff;
--body-quiet-color: #666;
--body-loud-color: #000;
--header-color: #ffc;
--header-branding-color: var(--accent);
--header-bg: var(--secondary);
--header-link-color: var(--primary-fg);
--breadcrumbs-fg: #c4dce8;
--breadcrumbs-link-fg: var(--body-bg);
--breadcrumbs-bg: var(--primary);
--link-fg: #447e9b;
--link-hover-color: #036;
--link-selected-fg: #5b80b2;
--hairline-color: #e8e8e8;
--border-color: #ccc;
--error-fg: #ba2121;
--message-success-bg: #dfd;
--message-warning-bg: #ffc;
--message-error-bg: #ffefef;
--darkened-bg: #f8f8f8;
--selected-bg: #e4e4e4;
--selected-row: #ffc;
--button-fg: #fff;
--button-bg: var(--primary);
--button-hover-bg: #609ab6;
--default-button-bg: var(--secondary);
--default-button-hover-bg: #205067;
--close-button-bg: #888;
--close-button-hover-bg: #747474;
--delete-button-bg: #ba2121;
--delete-button-hover-bg: #a41515;
--object-tools-fg: var(--button-fg);
--object-tools-bg: var(--close-button-bg);
--object-tools-hover-bg: var(--close-button-hover-bg);
}
}
:root .admin-interface {
--admin-interface-title-color: {{ theme.title_color }};
--admin-interface-logo-color: {{ theme.logo_color }};
--admin-interface-env-color: {{ theme.env_color }};
--admin-interface-header-background-color: {{ theme.css_header_background_color }};
--admin-interface-header-text-color: {{ theme.css_header_text_color }};
--admin-interface-header-link-color: {{ theme.css_header_link_color }};
--admin-interface-header-link_hover-color: {{ theme.css_header_link_hover_color }};
--admin-interface-module-background-color: {{ theme.css_module_background_color }};
--admin-interface-module-background-selected-color: {{ theme.css_module_background_selected_color }};
--admin-interface-module-text-color: {{ theme.css_module_text_color }};
--admin-interface-module-link-color: {{ theme.css_module_link_color }};
--admin-interface-module-link-selected-color: {{ theme.css_module_link_selected_color }};
--admin-interface-module-link-hover-color: {{ theme.css_module_link_hover_color }};
--admin-interface-generic-link-color: {{ theme.css_generic_link_color }};
--admin-interface-generic-link-hover-color: {{ theme.css_generic_link_hover_color }};
--admin-interface-save-button-background-color: {{ theme.css_save_button_background_color }};
--admin-interface-save-button-background-hover-color: {{ theme.css_save_button_background_hover_color }};
--admin-interface-save-button-text-color: {{ theme.css_save_button_text_color }};
--admin-interface-delete-button-background-color: {{ theme.css_delete_button_background_color }};
--admin-interface-delete-button-background-hover-color: {{ theme.css_delete_button_background_hover_color }};
--admin-interface-delete-button-text-color: {{ theme.css_delete_button_text_color }};
--admin-interface-related-modal-background-color: {{ theme.related_modal_background_color }};
--admin-interface-related-modal-background-opacity: {{ theme.related_modal_background_opacity }};
}
.admin-interface #header {
background: {{ theme.css_header_background_color }};
color: {{ theme.css_header_text_color }};
}
.admin-interface #header + #main {
{% if theme.css_header_background_color != theme.css_module_background_color %}
border-top: 10px solid {{ theme.css_module_background_color }};
{% endif %}
}
.admin-interface .environment-label {
}
.admin-interface .environment-label::before {
content: "";
display: inline-block;
width: 8px;
height: 8px;
background-color: {{ theme.env_color }};
border-radius: 100%;
margin-right: 6px;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.admin-interface .environment-label::after {
content: "{{ theme.env_name }} - ";
}
@media (max-width:1024px) {
.admin-interface .environment-label::after {
content: "{{ theme.env_name }}";
}
}
.admin-interface .language-chooser {
display: inline-block;
position: absolute;
top: 15px;
right: 15px;
z-index: 10;
}
@media (min-width:768px) {
.admin-interface .language-chooser {
right: 30px;
}
}
@media (min-width:1024px) {
.admin-interface .language-chooser {
position: static;
float: right;
margin-left: 20px;
}
}
.admin-interface .language-chooser-hidden-form {
display: none;
}
.admin-interface .language-chooser-select-form {
display: inline-block;
}
.admin-interface #branding h1,
.admin-interface.login #header h1,
.admin-interface.login #header h1 a {
color: {{ theme.title_color }};
}
.admin-interface #branding h1 a {
color: inherit;
}
.admin-interface #branding h1 .logo.default {
background-color: transparent;
background-repeat: no-repeat;
background-position: center center;
background-size: 104px 36px;
background-image: url("data:image/svg+xml;utf8,<?xml version='1.0' encoding='utf-8'?><svg width='104px' height='36px' viewBox='0 0 104 36' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:sketch='http://www.bohemiancoding.com/sketch/ns'><g id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' sketch:type='MSPage'><g id='logo-django' sketch:type='MSArtboardGroup' transform='translate(-8.000000, -5.000000)' fill='{{ theme.logo_color|urlencode }}'><path d='M20.2602817,5 L25.9509859,5 L25.9509859,31.0824248 C23.0360563,31.6338042 20.8901408,31.8507285 18.5684507,31.8507285 C11.6180282,31.8434735 8,28.7383366 8,22.7747325 C8,17.0287781 11.8377465,13.2997118 17.7847887,13.2997118 C18.7076056,13.2997118 19.4107042,13.3722617 20.2602817,13.5899115 L20.2602817,5 L20.2602817,5 Z M20.2602817,18.1242821 C19.5938028,17.9066323 19.044507,17.8340823 18.3414085,17.8340823 C15.4630986,17.8340823 13.8005634,19.5897906 13.8005634,22.6666331 C13.8005634,25.6622196 15.3898592,27.316358 18.3047887,27.316358 C18.9346479,27.316358 19.4473239,27.2808085 20.2602817,27.1719836 L20.2602817,18.1242821 L20.2602817,18.1242821 Z M34.9960563,13.6987364 L34.9960563,26.7577235 C34.9960563,31.2550936 34.6591549,33.417807 33.6704225,35.2823401 C32.7476056,37.0750489 31.531831,38.2053768 29.0197183,39.453961 L23.7391549,36.9654985 C26.2512676,35.7981701 27.4670423,34.7665101 28.2433803,33.1921767 C29.056338,31.5822938 29.3126761,29.7177606 29.3126761,24.8133855 L29.3126761,13.6987364 L34.9960563,13.6987364 Z M29.3126761,5.02901997 L35.0033803,5.02901997 L35.0033803,10.8112493 L29.3126761,10.8112493 L29.3126761,5.02901997 Z M38.4302535,14.9828702 C40.9430986,13.8148163 43.3453521,13.2997118 45.9673239,13.2997118 C48.8895775,13.2997118 50.8077183,14.0687411 51.6580282,15.5705246 C52.1340845,16.4121037 52.2878873,17.5076077 52.2878873,19.8509704 L52.2878873,31.2993491 C49.7398873,31.6620987 46.5239437,31.922553 44.1649014,31.922553 C39.3970141,31.922553 37.2584225,30.2756696 37.2584225,26.6198787 C37.2584225,22.6659076 40.1008451,20.8376494 47.079831,20.2565245 L47.079831,19.0159207 C47.079831,17.9929667 46.559831,17.6229621 45.124338,17.6229621 C43.0223662,17.6229621 40.6567324,18.2106165 38.4375775,19.3423954 L38.4302535,14.9828702 Z M47.336169,23.9420608 C43.571662,24.3048105 42.3485634,24.8931904 42.3485634,26.3579734 C42.3485634,27.4549284 43.051662,27.9693073 44.604338,27.9693073 C45.4539155,27.9693073 46.2302535,27.8967574 47.3354366,27.7153826 L47.3354366,23.9420608 L47.336169,23.9420608 Z M55.056338,14.5765906 C58.4180282,13.6987364 61.1857465,13.2997118 63.9908169,13.2997118 C66.9057465,13.2997118 69.0157746,13.9599162 70.2674366,15.2367949 C71.4458592,16.4411237 71.8208451,17.7615324 71.8208451,20.5764696 L71.8208451,31.6258237 L66.1294085,31.6258237 L66.1294085,20.8013744 C66.1294085,18.6393866 65.3896901,17.8340823 63.3616901,17.8340823 C62.5846197,17.8340823 61.8822535,17.9066323 60.7397183,18.2403619 L60.7397183,31.6265492 L55.056338,31.6265492 L55.056338,14.5765906 Z M74.0326761,34.7012152 C76.0240563,35.7241692 78.0169014,36.1964692 80.1261972,36.1964692 C83.8540845,36.1964692 85.4433803,34.6946857 85.4433803,31.1107193 L85.4433803,31.0018944 C84.3374648,31.5460188 83.223493,31.7716491 81.7513803,31.7716491 C76.764507,31.7716491 73.5932394,28.5141573 73.5932394,23.3558574 C73.5932394,16.9496987 78.2878873,13.3294573 86.5932394,13.3294573 C89.0321127,13.3294573 91.2878873,13.583382 94.0189859,14.1347615 L92.0708169,18.1975575 C90.5562254,17.9073578 91.9463099,18.1540275 90.804507,18.0452026 L90.804507,18.6328571 L90.8777465,21.0124947 L90.9136338,24.0886117 C90.9509859,24.8583664 90.9509859,25.6259447 90.988338,26.3956994 L90.988338,27.9330324 C90.988338,32.7648576 90.5774648,35.0291409 89.3616901,36.900929 C87.5892958,39.6425908 84.5212958,41 80.1620845,41 C77.943662,41 76.0240563,40.6727998 74.0326761,39.9030451 L74.0326761,34.7012152 L74.0326761,34.7012152 Z M85.3335211,17.8703573 L85.1504225,17.8703573 L84.7395493,17.8703573 C83.6336338,17.8340823 82.3380282,18.1242821 81.4510986,18.6756615 C80.0895775,19.4446908 79.3872113,20.8376494 79.3872113,22.8110074 C79.3872113,25.6252192 80.7934085,27.2365531 83.3055211,27.2365531 C84.0811268,27.2365531 84.7117183,27.0921787 85.4441127,26.8738034 L85.4441127,26.4667983 L85.4441127,24.9294653 C85.4441127,24.269261 85.4067606,23.5365067 85.4067606,22.7674775 L85.3708732,20.17019 L85.3335211,18.3056569 L85.3335211,17.8703573 Z M102.84507,13.2271619 C108.528451,13.2271619 112,16.7748534 112,22.5208077 C112,28.4118619 108.382704,32.1039278 102.617296,32.1039278 C96.9265915,32.1039278 93.4176901,28.5569618 93.4176901,22.8480079 C93.4272113,16.9199532 97.044507,13.2271619 102.84507,13.2271619 Z M102.727887,27.5623023 C104.910423,27.5623023 106.199437,25.7710445 106.199437,22.6586526 C106.199437,19.5825356 104.94631,17.7542774 102.765239,17.7542774 C100.509465,17.7542774 99.2189859,19.5462607 99.2189859,22.6586526 C99.21Line truncated
}
.admin-interface #branding h1 img.logo,
.admin-interface.login #header #branding h1 img.logo {
{% if theme.logo_max_width > 0 %}
max-width: {{ theme.logo_max_width }}px;
max-width: min({{ theme.logo_max_width }}px, 100%);
{% else %}
max-width: 100%;
{% endif %}
{% if theme.logo_max_height > 0 %}
max-height: {{ theme.logo_max_height }}px;
{% endif %}
}
.admin-interface #header #user-tools a {
color:{{ theme.css_header_link_color }};
}
.admin-interface #header #user-tools a:hover,
.admin-interface #header #user-tools a:active {
color:{{ theme.css_header_link_hover_color }};
border-bottom-color:rgba(255, 255, 255, 0.5);
}
.admin-interface #nav-sidebar .current-app .section:link,
.admin-interface #nav-sidebar .current-app .section:visited {
color: {{ theme.css_module_link_selected_color }};
font-weight: normal;
}
.admin-interface #nav-sidebar .current-app .section:focus,
.admin-interface #nav-sidebar .current-app .section:hover {
color: {{ theme.css_module_link_hover_color }};
}
.admin-interface #nav-sidebar .current-model {
background: {{ theme.css_module_background_selected_color }};
}
.admin-interface #changelist table tbody tr.selected {
background-color: {{ theme.css_module_background_selected_color }};
}
.admin-interface .module h2,
.admin-interface .module caption,
.admin-interface .module.filtered h2 {
background:{{ theme.css_module_background_color }};
color:{{ theme.css_module_text_color }};
}
.admin-interface .module a.section:link,
.admin-interface .module a.section:visited {
color:{{ theme.css_module_link_color }};
}
.admin-interface .module a.section:active,
.admin-interface .module a.section:hover {
color:{{ theme.css_module_link_hover_color }};
}
.admin-interface div.breadcrumbs {
background:{{ theme.css_module_background_color }};
color:{{ theme.css_module_text_color }};
}
.admin-interface div.breadcrumbs a {
color:{{ theme.css_module_link_color }};
}
.admin-interface div.breadcrumbs a:active,
.admin-interface div.breadcrumbs a:focus,
.admin-interface div.breadcrumbs a:hover {
color:{{ theme.css_module_link_hover_color }};
}
.admin-interface fieldset.collapse.collapsed a.collapse-toggle {
color:{{ theme.css_module_link_color }};
}
.admin-interface fieldset.collapse.collapsed a.collapse-toggle:hover,
.admin-interface fieldset.collapse.collapsed a.collapse-toggle:active {
color:{{ theme.css_module_link_hover_color }};
}
.admin-interface fieldset.collapse a.collapse-toggle {
color:{{ theme.css_module_link_color }};
}
.admin-interface fieldset.collapse a.collapse-toggle:hover,
.admin-interface fieldset.collapse a.collapse-toggle:active {
color:{{ theme.css_module_link_hover_color }};
}
.admin-interface .inline-group h2 {
background:{{ theme.css_module_background_color }};
color:{{ theme.css_module_text_color }};
}
.admin-interface .selector .selector-chosen h2 {
border-color:{{ theme.css_module_background_color }};
background:{{ theme.css_module_background_color }};
color:{{ theme.css_module_text_color }};
}
.admin-interface .selector .selector-available h2,
.admin-interface .selector .selector-chosen h2 {
{% if theme.css_module_rounded_corners %}
border-bottom-left-radius:0;
border-bottom-right-radius:0;
{% endif %}
}
.admin-interface .selector a.selector-chooseall:focus,
.admin-interface .selector a.selector-chooseall:hover,
.admin-interface .selector a.selector-clearall:focus,
.admin-interface .selector a.selector-clearall:hover {
color:{{ theme.css_generic_link_hover_color }};
}
.admin-interface a:link,
.admin-interface a:visited {
color:{{ theme.css_generic_link_color }};
}
.admin-interface a:hover {
color:{{ theme.css_generic_link_hover_color }};
}
.admin-interface thead th a,
.admin-interface thead th a:link,
.admin-interface thead th a:visited,
.admin-interface thead th a:focus,
.admin-interface thead th a:hover {
color: #666666;
}
.admin-interface .button,
.admin-interface input[type=submit],
.admin-interface input[type=button],
.admin-interface .submit-row input,
.admin-interface a.button {
background:{{ theme.css_save_button_background_color }};
color:{{ theme.css_save_button_text_color }};
}
.admin-interface .button:active,
.admin-interface .button:focus,
.admin-interface .button:hover,
.admin-interface input[type=submit]:active,
.admin-interface input[type=submit]:focus,
.admin-interface input[type=submit]:hover,
.admin-interface input[type=button]:active,
.admin-interface input[type=button]:focus,
.admin-interface input[type=button]:hover {
background:{{ theme.css_save_button_background_hover_color }};
color:{{ theme.css_save_button_text_color }};
outline: none;
}
.admin-interface .button.default,
.admin-interface input[type=submit].default,
.admin-interface .submit-row input.default {
background:{{ theme.css_save_button_background_color }};
color:{{ theme.css_save_button_text_color }};
outline: none;
}
.admin-interface .button.default:active,
.admin-interface .button.default:focus,
.admin-interface .button.default:hover,
.admin-interface input[type=submit].default:active,
.admin-interface input[type=submit].default:focus,
.admin-interface input[type=submit].default:hover,
.admin-interface.delete-confirmation form .cancel-link:hover {
background:{{ theme.css_save_button_background_hover_color }};
color:{{ theme.css_save_button_text_color }};
outline: none;
}
.admin-interface .submit-row a.deletelink:link,
.admin-interface .submit-row a.deletelink:visited,
.admin-interface.delete-confirmation form input[type="submit"] {
background:{{ theme.css_delete_button_background_color }};
color:{{ theme.css_delete_button_text_color }};
}
.admin-interface .submit-row a.deletelink:hover,
.admin-interface.delete-confirmation form input[type="submit"]:hover {
background:{{ theme.css_delete_button_background_hover_color }};
color:{{ theme.css_delete_button_text_color }};
}
.admin-interface .paginator a,
.admin-interface .paginator a:link,
.admin-interface .paginator a:visited,
.admin-interface .paginator .this-page {
{% if theme.css_module_rounded_corners %}border-radius:4px;{% endif %}
}
.admin-interface .paginator a,
.admin-interface .paginator a:link,
.admin-interface .paginator a:visited {
background-color:#FFFFFF;
color:{{ theme.css_generic_link_color }};
}
.admin-interface .paginator a:hover,
.admin-interface .paginator a:active {
background-color:#F8F8F8;
color:{{ theme.css_generic_link_hover_color }};
}
.admin-interface .paginator .this-page {
background-color:{{ theme.css_module_background_color }};
color:{{ theme.css_module_link_color }};
}
.admin-interface .paginator a.showall,
.admin-interface .paginator a.showall:link,
.admin-interface .paginator a.showall:visited {
color:{{ theme.css_generic_link_color }};
}
.admin-interface .paginator a.showall:hover,
.admin-interface .paginator a.showall:active {
color:{{ theme.css_generic_link_hover_color }};
}
/* list-filter sticky */
{% if theme.list_filter_sticky %}
@media (min-width: 768px) {
.admin-interface .module.filtered #changelist-filter {
position: sticky;
top: 40px;
float: right;
z-index: 30;
}
/* feature not available for django < 3.1.2 */
.admin-interface .module.filtered #toolbar + #changelist-filter {
position: absolute;
top: 0px;
z-index: 30;
}
}
{% endif %}
.admin-interface .module.filtered #changelist-filter {
{% if theme.css_module_rounded_corners %}
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
{% endif %}
}
.admin-interface .module.filtered #changelist-filter #changelist-filter-clear a:focus,
.admin-interface .module.filtered #changelist-filter #changelist-filter-clear a:hover {
color: #666;
text-decoration: none;
}
.admin-interface .module.filtered #changelist-filter li a:focus,
.admin-interface .module.filtered #changelist-filter li a:hover {
color: #666;
text-decoration: none;
}
.admin-interface .module.filtered #changelist-filter li.selected a,
.admin-interface .module.filtered #changelist-filter li.selected a:link,
.admin-interface .module.filtered #changelist-filter li.selected a:visited,
.admin-interface .module.filtered #changelist-filter li.selected a:focus,
.admin-interface .module.filtered #changelist-filter li.selected a:hover {
/* color: #666; */
color: {{ theme.css_generic_link_hover_color }};
}
/* begin fix issue #11 - Inline border bottom should not be rounded */
.admin-interface .module h2,
.admin-interface.dashboard .module caption,
.admin-interface #nav-sidebar .module th,
.admin-interface #nav-sidebar .module caption,
.admin-interface .module.filtered h2 {
{% if theme.css_module_rounded_corners %}
border-radius:4px;
{% endif %}
}
.admin-interface .inline-group h2 {
{% if theme.css_module_rounded_corners %}
border-bottom-left-radius:0;
border-bottom-right-radius:0;
{% endif %}
}
.admin-interface .module.collapse.collapsed h2 {
/* fix collapsed inlines rounded bottom borders */
{% if theme.css_module_rounded_corners %}
border-bottom-left-radius:4px;
border-bottom-right-radius:4px;
{% endif %}
}
/* end fix */
.admin-interface #content-related {
{% if theme.css_module_rounded_corners %}
border-radius:4px;
{% endif %}
}
.admin-interface .select2-container--admin-autocomplete .select2-results__option--highlighted[aria-selected] {
background-color: {{ theme.css_module_background_color }};
color: {{ theme.css_module_text_color }};
}
.admin-interface #toggle-nav-sidebar {
{% if theme.css_module_rounded_corners %}
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
{% endif %}
color: {{ theme.css_generic_link_color }};
}
.admin-interface #toggle-nav-sidebar:focus,
.admin-interface #toggle-nav-sidebar:hover,
.admin-interface #toggle-nav-sidebar:active {
color: {{ theme.css_generic_link_hover_color }};
}
.admin-interface .calendar td.selected a,
.admin-interface .calendar td a:active,
.admin-interface .calendar td a:focus,
.admin-interface .calendar td a:hover,
.admin-interface .timelist a:active,
.admin-interface .timelist a:focus,
.admin-interface .timelist a:hover {
background: {{ theme.css_module_background_color }};
}
@@ -13,127 +13,27 @@ backward compatibility:
/* Layout helpers /* Layout helpers
----------------------------------*/ ----------------------------------*/
.ui-helper-hidden { .ui-helper-hidden { display: none; }
display: none; .ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
} .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-hidden-accessible { .ui-helper-clearfix { display: inline-block; }
position: absolute;
left: -99999999px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}
.ui-helper-clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.ui-helper-clearfix {
display: inline-block;
}
/* required comment for clearfix to work in Opera \*/ /* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { * html .ui-helper-clearfix { height:1%; }
height: 1%; .ui-helper-clearfix { display:block; }
} .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
.ui-state-disabled { cursor: default !important; }
.ui-helper-clearfix { .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
display: block;
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter: Alpha(Opacity=0);
}
.ui-state-disabled {
cursor: default !important;
}
.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
/* http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery.ui.tabs.css */ /* http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery.ui.tabs.css */
.ui-widget-overlay { .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
position: absolute; .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
top: 0; .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
left: 0; .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
width: 100%; .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
height: 100%; .ui-tabs .ui-tabs-nav li.ui-tabs-active, .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
} .ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs { .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
position: relative;
padding: .2em;
zoom: 1;
}
/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav {
margin: 0;
padding: .2em .2em 0;
}
.ui-tabs .ui-tabs-nav li {
list-style: none;
float: left;
position: relative;
top: 1px;
margin: 0 .2em 1px 0;
border-bottom: 0 !important;
padding: 0;
white-space: nowrap;
}
.ui-tabs .ui-tabs-nav li a {
float: left;
padding: .5em 1em;
text-decoration: none;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active, .ui-tabs .ui-tabs-nav li.ui-tabs-selected {
margin-bottom: 0;
padding-bottom: 1px;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a {
cursor: text;
}
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a {
cursor: pointer;
}
/* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel {
display: block;
border-width: 0;
padding: 1em 1.4em;
background: none;
}
.ui-tabs .ui-tabs-hide { .ui-tabs .ui-tabs-hide {
position: absolute; position: absolute;
display: none; display: none;
@@ -155,15 +55,12 @@ backward compatibility:
padding: 10px 0 0 10px; padding: 10px 0 0 10px;
border-bottom: none; border-bottom: none;
} }
.admin-interface .ui-tabs .ui-tabs-nav li { .admin-interface .ui-tabs .ui-tabs-nav li {
margin: 0 0 0 -1px; margin: 0 0 0 -1px;
} }
.admin-interface .ui-tabs .ui-tabs-nav li.required { .admin-interface .ui-tabs .ui-tabs-nav li.required {
font-weight: bold; font-weight: bold;
} }
.admin-interface .ui-tabs .ui-tabs-nav li a { .admin-interface .ui-tabs .ui-tabs-nav li a {
border: 1px solid #eeeeee; border: 1px solid #eeeeee;
background-color: #f8f8f8; background-color: #f8f8f8;
@@ -189,7 +86,7 @@ backward compatibility:
margin-bottom: -1px; margin-bottom: -1px;
font-weight: bold; font-weight: bold;
background-color: #FFFFFF; background-color: #FFFFFF;
color: var(--admin-interface-module-background-color); color: {{ theme.css_module_background_color }};
border-bottom: 1px solid #FFFFFF; border-bottom: 1px solid #FFFFFF;
} }
@@ -4,24 +4,26 @@ https://github.com/jmrivas86/django-json-widget
*/ */
.admin-interface div.jsoneditor { .admin-interface div.jsoneditor {
border: 1px solid var(--admin-interface-module-background-color); border: 1px solid {{ theme.css_module_background_color }};
border-radius: var(--admin-interface-jsoneditor-border-radius); {% if theme.css_module_rounded_corners %}
overflow: var(--admin-interface-jsoneditor-overflow); border-radius: 4px;
overflow: hidden;
{% endif %}
} }
.admin-interface div.jsoneditor-menu { .admin-interface div.jsoneditor-menu {
background-color: var(--admin-interface-module-background-color); background-color: {{ theme.css_module_background_color }};
border-bottom: 1px solid var(--admin-interface-module-background-color); border-bottom: 1px solid {{ theme.css_module_background_color }};
} }
.admin-interface div.jsoneditor-menu a.jsoneditor-poweredBy { .admin-interface div.jsoneditor-menu a.jsoneditor-poweredBy {
color: var(--admin-interface-module-link-color); color: {{ theme.css_module_link_color }};
} }
.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected, .admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected,
.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:focus, .admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:focus,
.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:hover { .admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:hover {
background-color: var(--admin-interface-module-background-selected-color); background-color: {{ theme.css_module_background_selected_color }};
color: #000000; color: #000000;
font-weight: bold; font-weight: bold;
} }
@@ -0,0 +1,9 @@
{% if not theme.recent_actions_visible %}
.admin-interface.dashboard #content {
max-width:600px;
margin-right:0;
}
.admin-interface.dashboard #content #recent-actions-module {
display:none;
}
{% endif %}
@@ -3,15 +3,15 @@ related modal + magnific popup customization
https://github.com/dimsemenov/Magnific-Popup https://github.com/dimsemenov/Magnific-Popup
*/ */
.admin-interface .related-modal.mfp-bg { .admin-interface .related-modal.mfp-bg {
background-color: var(--admin-interface-related-modal-background-color); background-color: {{ theme.related_modal_background_color }};
opacity: var(--admin-interface-related-modal-background-opacity); opacity: {{ theme.related_modal_background_opacity }};
} }
.admin-interface .related-modal .mfp-content { .admin-interface .related-modal .mfp-content {
height: 100%; height: 100%;
-webkit-box-shadow: 0px 5px 30px 0px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2);
-moz-box-shadow: 0px 5px 30px 0px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2);
box-shadow: 0px 5px 30px 0px rgba(0, 0, 0, 0.2); box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2);
} }
.admin-interface .related-modal .mfp-container { .admin-interface .related-modal .mfp-container {
@@ -22,22 +22,20 @@ https://github.com/dimsemenov/Magnific-Popup
padding: 40px 80px 40px 80px; padding: 40px 80px 40px 80px;
} }
@media (max-width: 640px) { @media (max-width:640px){
.admin-interface .related-modal .mfp-container { .admin-interface .related-modal .mfp-container {
padding: 80px 20px 80px 20px; padding: 80px 20px 80px 20px;
} }
.admin-interface .related-modal__nested .mfp-container { .admin-interface .related-modal__nested .mfp-container {
padding: 40px 40px 40px 40px; padding: 40px 40px 40px 40px;
} }
} }
@media (max-height: 640px) { @media (max-height:640px){
.admin-interface .related-modal .mfp-container { .admin-interface .related-modal .mfp-container {
padding-top: 20px; padding-top: 20px;
padding-bottom: 20px; padding-bottom: 20px;
} }
.admin-interface .related-modal__nested .mfp-container { .admin-interface .related-modal__nested .mfp-container {
padding: 40px 40px 40px 40px; padding: 40px 40px 40px 40px;
} }
@@ -50,7 +48,9 @@ https://github.com/dimsemenov/Magnific-Popup
position: relative; position: relative;
z-index: 100; z-index: 100;
overflow: hidden; overflow: hidden;
border-radius: var(--admin-interface-related-modal-border-radius); {% if theme.related_modal_rounded_corners %}
border-radius: 4px;
{% endif %}
} }
.admin-interface .related-modal #related-modal-iframe { .admin-interface .related-modal #related-modal-iframe {
@@ -72,7 +72,9 @@ https://github.com/dimsemenov/Magnific-Popup
height: 40px; height: 40px;
opacity: 1.0; opacity: 1.0;
color: rgba(0, 0, 0, 0.4); color: rgba(0, 0, 0, 0.4);
display: var(--admin-interface-related-modal-close-button-display); {% if not theme.related_modal_close_button_visible %}
display: none;
{% endif %}
} }
.admin-interface .related-modal .mfp-close:hover, .admin-interface .related-modal .mfp-close:hover,
@@ -67,10 +67,10 @@ def get_admin_interface_languages(context):
@simple_tag(takes_context=True) @simple_tag(takes_context=True)
def get_admin_interface_theme(context): def get_admin_interface_theme(context):
theme = get_cached_active_theme() # theme = get_cached_active_theme()
if not theme: # if not theme:
theme = Theme.get_active_theme() theme = Theme.get_active_theme()
set_cached_active_theme(theme) # set_cached_active_theme(theme)
return theme return theme
+1 -1
View File
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
__version__ = "0.19.0" __version__ = "0.19.3"