Skip to main content

Tests

ckanext-midnight-blue-theme

A portable, modern theme implementation of CKAN's classic Midnight Blue theme, fully integrated with ckanext-theming.

By implementing the ckanext-theming workflow, this extension replaces traditional inline HTML/CSS templates with standard, decoupled UI macros. This ensures that the aesthetic and look of the original Midnight Blue theme is preserved while introducing a clean, maintainable, and modern macro-based architecture.


Differences from core theme

This extension provides a faithful port of the original Midnight Blue theme but includes several modern layout improvements:

  • Primary content layout blocks no longer rely on CSS float. Instead, they leverage native Bootstrap 5 grid layout classes (col).
  • Integrates the flexible layout blocks structure, allowing you to easily customize the page layout. For example, add {% block page_layout %}no-sidebar{% endblock %} to hide the sidebar, or set it to sidebar-end to move the sidebar to the right.
  • Employs Bootstrap 5 native styling for field validation errors. Fields with errors have a clean red outline and red helper text without a heavy red background.
  • Cleaned up unnecessary markup; blocks such as header_account_notlogged are not rendered when a user is logged in, rather than rendering empty elements.

Themes Provided

This extension registers the following theme with the ckanext-theming framework:

  1. midnight-blue-portable: The primary theme applying the Midnight Blue layout and styles.

Compatibility

CKAN version Compatible?
2.11 and earlier no (missing helpers)
2.12 yes

Screenshots

Homepage

Homepage

Dataset Search / Registry page

Dataset Search

Dataset Detail page

Dataset Detail


Installation

1. Install the Extension

Activate your CKAN virtual environment and install ckanext-midnight-blue-theme:

pip install ckanext-midnight-blue-theme

Or for development/source installation:

git clone https://github.com/DataShades/ckanext-midnight-blue-theme.git
cd ckanext-midnight-blue-theme
pip install -e .

2. Enable Plugins

Add midnight_blue_theme to the ckan.plugins list in your ckan.ini file:

ckan.plugins = ... midnight_blue_theme

3. Select the Theme

Set midnight-blue-portable as the active theme in your ckan.ini configuration:

ckan.ui.theme = midnight-blue-portable

Development

If you'd like to run the test suite, run:

pytest

License

AGPL-3.0

Metadata

Release files for ckanext-midnight-blue-theme 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ckanext-midnight-blue-theme 0.0.3
File Size Uploaded
ckanext_midnight_blue_theme-0.0.3.tar.gz 253.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ckanext-midnight-blue-theme 0.0.3
File Interpreter ABI Platform
ckanext_midnight_blue_theme-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 603.3 kB

Release files / ckanext_midnight_blue_theme-0.0.3.tar.gz

Download URL ckanext_midnight_blue_theme-0.0.3.tar.gz
Size 253.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d9932a22225cb2054eac875a2e47f95c63fd2e90ddda1571693fa1317b7a9c25
BLAKE2b-256 checksum
How to use checksums
321127bde9a9bf5a3ff00bbe6126a3da8c7fbc394538cd1f477b254807dd2a4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / ckanext_midnight_blue_theme-0.0.3-py3-none-any.whl

Download URL ckanext_midnight_blue_theme-0.0.3-py3-none-any.whl
Size 349.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3a97e8e967a23b652be93a8259a513cf977bf14b607cb8c3fa6ad827eecd1e6
BLAKE2b-256 checksum
How to use checksums
acb289b8549defb154a6f95426dcba059bbf0c1d1949b20677261ef3267dcb6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page