-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
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
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
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,9 @@ | ||
""" UI Application """ | ||
|
||
from django.apps import AppConfig | ||
|
||
|
||
class UIConfig(AppConfig): | ||
"""UI Configuration""" | ||
|
||
name = "ui" |
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,9 @@ | ||
""" UI Application """ | ||
|
||
from django.apps import AppConfig | ||
|
||
|
||
class UIConfig(AppConfig): | ||
"""UI Configuration""" | ||
|
||
name = "ui" |
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,28 @@ | ||
html, body { | ||
background-color: #c82934; | ||
margin: 0; | ||
padding: 0; | ||
max-height: 100vh; | ||
} | ||
|
||
.banner { | ||
max-width: 100%; | ||
} | ||
|
||
.content-background { | ||
background-color: #1a1a1a; | ||
color: #ffffff; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
min-height: 100vh; | ||
} | ||
|
||
.content { | ||
margin: .5rem; | ||
padding: .5rem; | ||
flex: 1; | ||
border-radius: .5rem; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,16 @@ | ||
{% load ladder %} | ||
{% load static %} | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="{% static 'css/style.css' %}"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div> | ||
<img src="{% static 'img/oscrbanner-slim-dark-label.png' %}" class='banner'></img> | ||
</div> | ||
<div class="content content-background"> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
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,20 @@ | ||
""" Ladder Template Tags """ | ||
|
||
import logging | ||
|
||
from django import template | ||
from ladder.models import Ladder | ||
|
||
register = template.Library() | ||
LOGGER = logging.getLogger("django") | ||
|
||
@register.simple_tag | ||
def get_ladders(): | ||
"""Return the list of ladders""" | ||
entries = {} | ||
for ladder in Ladder.objects.all(): | ||
if entries.get(ladder.name) is None: | ||
entries[ladder.name] = {} | ||
if entries[ladder.name].get(ladder.difficulty) is None: | ||
entries[ladder.name][ladder.difficulty] = ladder.is_solo | ||
return entries |
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,8 @@ | ||
""" URL URLs """ | ||
|
||
from django.urls import include, path | ||
from django.views.generic import TemplateView | ||
|
||
urlpatterns = [ | ||
path("ui/", TemplateView.as_view(template_name="ui.html")), | ||
] |