diff --git a/requirements.txt b/requirements.txt index 4a13480..19f07f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # Requirements django -django-bootstrap3 +django-bootstrap4 django-select2 django-watson django-graphos diff --git a/settings.py b/settings.py index bbc23b2..3b1d8c4 100644 --- a/settings.py +++ b/settings.py @@ -51,7 +51,7 @@ TEMPLATES[0]['DIRS'] += [ # Applications INSTALLED_APPS += [ # Design - 'bootstrap3', + 'bootstrap4', 'django_select2', # Search Engine 'watson', diff --git a/website/static/css/dashboard.css b/website/static/css/dashboard.css new file mode 100644 index 0000000..eb3bb85 --- /dev/null +++ b/website/static/css/dashboard.css @@ -0,0 +1,100 @@ +body { + font-size: .875rem; +} + +.feather { + width: 16px; + height: 16px; + vertical-align: text-bottom; +} + +/* + * Sidebar + */ + +.sidebar { + position: fixed; + top: 0; + bottom: 0; + left: 0; + z-index: 100; /* Behind the navbar */ + padding: 48px 0 0; /* Height of navbar */ + box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1); +} + +.sidebar-sticky { + position: relative; + top: 0; + height: calc(100vh - 48px); + padding-top: .5rem; + overflow-x: hidden; + overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ +} + +@supports ((position: -webkit-sticky) or (position: sticky)) { + .sidebar-sticky { + position: -webkit-sticky; + position: sticky; + } +} + +.sidebar .nav-link { + font-weight: 500; + color: #333; +} + +.sidebar .nav-link .feather { + margin-right: 4px; + color: #999; +} + +.sidebar .nav-link.active { + color: #007bff; +} + +.sidebar .nav-link:hover .feather, +.sidebar .nav-link.active .feather { + color: inherit; +} + +.sidebar-heading { + font-size: .75rem; + text-transform: uppercase; +} + +/* + * Content + */ + +[role="main"] { + padding-top: 48px; /* Space for fixed navbar */ +} + +/* + * Navbar + */ + +.navbar-brand { + padding-top: .75rem; + padding-bottom: .75rem; + font-size: 1rem; + background-color: rgba(0, 0, 0, .25); + box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25); +} + +.navbar .form-control { + padding: .75rem 1rem; + border-width: 0; + border-radius: 0; +} + +.form-control-dark { + color: #fff; + background-color: rgba(255, 255, 255, .1); + border-color: rgba(255, 255, 255, .1); +} + +.form-control-dark:focus { + border-color: transparent; + box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); +} diff --git a/website/templates/base.html b/website/templates/base.html index fd64de5..e5805af 100644 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -1,84 +1,97 @@ -{% load staticfiles %} {% load bootstrap3 %} {% load navbar %} +{% load staticfiles %} {% load bootstrap4 %} {% load navbar %}