Skip to content

Commit

Permalink
Setup Dashkit UI (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbengfort authored Oct 2, 2024
1 parent 1084621 commit 1fdb219
Show file tree
Hide file tree
Showing 60 changed files with 11,601 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,7 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Parlance Specific Ignores
tmp
theme
24 changes: 24 additions & 0 deletions parlance/urls.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# parlance.urls
# Defines all of the routes and associated views with the urls for the app.
#
# Author: Benjamin Bengfort <[email protected]>
# Created: Tue Oct 01 21:19:17 2024 -0500
#
# Copyright (C) 2024 Rotational Labs, Inc.
# For license information, see LICENSE
#
# ID: urls.py [] [email protected] $

"""
URL configuration for parlance project.
Expand All @@ -14,9 +25,22 @@
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""

##########################################################################
## Imports
##########################################################################

from django.contrib import admin
from django.urls import path

from parlance.views import Dashboard


##########################################################################
## URL Patterns
##########################################################################

urlpatterns = [
path("", Dashboard.as_view(), name="dashboard"),
path('admin/', admin.site.urls),
]
5 changes: 1 addition & 4 deletions parlance/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ def get_version(short=False, revision=False):
)
)

vers = ["{major}.{minor}".format(**__version_info__)]

if __version_info__['micro']:
vers.append(".{micro}".format(**__version_info__))
vers = ["{major}.{minor}.{micro}".format(**__version_info__)]

if __version_info__['releaselevel'] != 'final' and not short:
vers.append('{}{}'.format(__version_info__['releaselevel'][0],
Expand Down
25 changes: 25 additions & 0 deletions parlance/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# parlance.views
# Site level views and pages not associated with a specific app.
#
# Author: Benjamin Bengfort <[email protected]>
# Created: Tue Oct 01 21:17:47 2024 -0500
#
# Copyright (C) 2024 Rotational Labs, Inc.
# For license information, see LICENSE
#
# ID: views.py [] [email protected] $

"""
Site level views and pages not associated with a specific app.
"""

##########################################################################
## Imports
##########################################################################

from django.views.generic import TemplateView


class Dashboard(TemplateView):

template_name = "site/dashboard.html"
18 changes: 18 additions & 0 deletions parley/templatetags/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# parley.templatetags
# Custom template tags and filters for parley views.
#
# Author: Benjamin Bengfort <[email protected]>
# Created: Tue Oct 01 21:46:28 2024 -0500
#
# Copyright (C) 2024 Rotational Labs, Inc.
# For license information, see LICENSE
#
# ID: __init__.py [] [email protected] $

"""
Custom template tags and filters for accounting views.
"""

##########################################################################
## Imports
##########################################################################
35 changes: 35 additions & 0 deletions parley/templatetags/gravatar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# parley.templatetags.gravatar
# Helpers for user profile images
#
# Author: Benjamin Bengfort <[email protected]>
# Created: Sat Dec 28 15:58:52 2019 -0600
#
# ID: gravatar.py [] [email protected] $

"""
Helpers for user profile images.
TODO: move to profiles specific app when created.
"""

##########################################################################
## Imports
##########################################################################

from hashlib import md5
from django import template

register = template.Library()


##########################################################################
## Template Tags
##########################################################################


@register.filter(name="gravatar")
def gravatar(user, size=64):
email = str(user.email.strip().lower()).encode("utf-8")
email_hash = md5(email).hexdigest()
url = "//www.gravatar.com/avatar/{0}?s={1}&d=identicon&r=PG"
return url.format(email_hash, size)
32 changes: 32 additions & 0 deletions parley/templatetags/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# parley.templatetags.version
# Adds version information to the page.
#
# Author: Benjamin Bengfort <[email protected]>
# Created: Tue Oct 01 21:52:22 2024 -0500
#
# ID: version.py [] [email protected] $

"""
Adds version information to the page.
TODO: move to parlance specific app when created.
"""

##########################################################################
## Imports
##########################################################################

from parlance import get_version
from django import template

register = template.Library()


##########################################################################
## Template Tags
##########################################################################


@register.simple_tag()
def version():
return get_version(short=True, revision=False)
7 changes: 7 additions & 0 deletions static/css/libs.bundle.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions static/css/libs.bundle.css.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions static/css/theme.bundle.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions static/css/theme.bundle.css.map

Large diffs are not rendered by default.

Binary file added static/favicon.ico
Binary file not shown.
Binary file added static/fonts/cerebrisans/cerebrisans-bold.eot
Binary file not shown.
Loading

0 comments on commit 1fdb219

Please sign in to comment.