diff --git a/.gitignore b/.gitignore index a344568c0..1b23b0a2d 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ venv .direnv/ .envrc venv +.vscode diff --git a/debug_toolbar/panels/community.py b/debug_toolbar/panels/community.py new file mode 100644 index 000000000..82e24150b --- /dev/null +++ b/debug_toolbar/panels/community.py @@ -0,0 +1,13 @@ +from django.utils.translation import gettext_lazy as _ + +from debug_toolbar.panels import Panel + + +class CommunityPanel(Panel): + """ + A panel that provides links to the Django Debug Toolbar community. + """ + + is_async = True + template = "debug_toolbar/panels/community.html" + title = _("Community") diff --git a/debug_toolbar/settings.py b/debug_toolbar/settings.py index c0561524b..d6b9003b6 100644 --- a/debug_toolbar/settings.py +++ b/debug_toolbar/settings.py @@ -80,6 +80,7 @@ def get_config(): "debug_toolbar.panels.alerts.AlertsPanel", "debug_toolbar.panels.cache.CachePanel", "debug_toolbar.panels.signals.SignalsPanel", + "debug_toolbar.panels.community.CommunityPanel", "debug_toolbar.panels.redirects.RedirectsPanel", "debug_toolbar.panels.profiling.ProfilingPanel", ] diff --git a/debug_toolbar/static/debug_toolbar/css/toolbar.css b/debug_toolbar/static/debug_toolbar/css/toolbar.css index 43b432069..120b8958c 100644 --- a/debug_toolbar/static/debug_toolbar/css/toolbar.css +++ b/debug_toolbar/static/debug_toolbar/css/toolbar.css @@ -1182,3 +1182,40 @@ To regenerate: height: 1rem; width: 1rem; } + +#djDebug .djdt-community-panel { + padding: 1.5em; +} + +#djDebug .djdt-community-panel h2 { + font-size: 2em; +} + +#djDebug .djdt-community-panel p { + font-size: 1em; + margin: 0 0 1em 0; +} + +#djDebug .djdt-community-panel .djdt-community-description { + font-size: 1em; + margin: 0 0 1.5em 0; +} + +#djDebug .djdt-community-panel ul { + list-style-type: disc; + padding-left: 1.25em; + margin: 1em 0; +} + +#djDebug .djdt-community-panel li { + margin: 0.5em 0; +} + +#djDebug .djdt-community-panel a { + font-weight: bold; + font-size: 1em; +} + +#djDebug .djdt-community-panel a:hover { + text-decoration: underline; +} diff --git a/debug_toolbar/templates/debug_toolbar/panels/community.html b/debug_toolbar/templates/debug_toolbar/panels/community.html new file mode 100644 index 000000000..9fa231f90 --- /dev/null +++ b/debug_toolbar/templates/debug_toolbar/panels/community.html @@ -0,0 +1,48 @@ +{% load i18n %} + +
+ {% translate "Want to contribute to Django Debug Toolbar? Get involved in our community!" %} +
+ ++ {% translate "Explore the official documentation to learn more about Django Debug Toolbar." %} +
+ +