-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update django and add banner with env name (#2474)
- Loading branch information
1 parent
ff182dd
commit 33ce403
Showing
10 changed files
with
472 additions
and
179 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.contrib import admin | ||
|
||
SITE_NAME = "PyCon Italy" | ||
|
||
admin.site.site_header = SITE_NAME | ||
admin.site.site_title = SITE_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.conf import settings | ||
|
||
|
||
def admin_settings(request): | ||
return {"CURRENT_ENV": settings.ENV} |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{% extends 'admin/base.html' %} | ||
|
||
{% block extrastyle %}{{ block.super }} | ||
<style> | ||
@media (prefers-color-scheme: dark) { | ||
:root { | ||
--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; | ||
/* A bit darker than --body-bg */ | ||
--selected-bg: #e4e4e4; | ||
/* E.g. selected table cells */ | ||
--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; | ||
/* Previously #bbb, contrast 1.92 */ | ||
--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); | ||
} | ||
} | ||
|
||
@media (prefers-color-scheme: light) { | ||
:root { | ||
--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; | ||
/* A bit darker than --body-bg */ | ||
--selected-bg: #e4e4e4; | ||
/* E.g. selected table cells */ | ||
--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; | ||
/* Previously #bbb, contrast 1.92 */ | ||
--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); | ||
} | ||
} | ||
|
||
#header { | ||
margin-top: 40px; | ||
} | ||
</style> | ||
{% endblock extrastyle %} | ||
|
||
{% block userlinks %} | ||
<div | ||
style="position: fixed; z-index: 100; top: 0; left: 0; right: 0; background-color: #417690; text-align: center; padding: 15px 30px;"> | ||
{{CURRENT_ENV}} environment | ||
</div> | ||
{{ block.super }} | ||
{% endblock %} |
Oops, something went wrong.