diff --git a/Makefile b/Makefile index 2384ba9..ce779a9 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ PYTHON=env/bin/python + +LIBRARY=polyphonic/interface/static DROPZONE=5.7.0 +BULMA=1.0.4 +ALPINE=3.15.12 VERSION=0.8.4 @@ -39,7 +43,18 @@ upgrade: poetry run manage collectstatic ${MAKE} libraries -libraries: static/dropzone static/fonts/Quicksand_Book.otf +#libraries: static/dropzone static/fonts/Quicksand_Book.otf +libraries: ${LIBRARY}/css/bulma.min.css ${LIBRARY}/js/alpine.js ${LIBRARY}/css/material.css + +${LIBRARY}/css/bulma.min.css: + curl -o $@ "https://cdn.jsdelivr.net/npm/bulma@${BULMA}/css/bulma.min.css" + +${LIBRARY}/js/alpine.js: + curl -o $@ "https://cdn.jsdelivr.net/npm/alpinejs@${ALPINE}/dist/cdn.min.js" + +${LIBRARY}/css/material.css: + curl -o $@ "https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" + static/dropzone: wget -O dropzone-${DROPZONE}.zip https://github.com/enyo/dropzone/archive/v${DROPZONE}.zip diff --git a/polyphonic/interface/forms.py b/polyphonic/interface/forms.py index 002e136..79b8d26 100644 --- a/polyphonic/interface/forms.py +++ b/polyphonic/interface/forms.py @@ -31,12 +31,12 @@ class ProjectForm(forms.ModelForm, BaseForm): class Meta: model = models.Project fields = ["name", "description", "modules", "event_date"] - # widgets = { - # 'event_date': forms.DateTimeInput(attrs={'type': 'date'}) - # } + widgets = {"event_date": forms.DateTimeInput()} modules = forms.MultipleChoiceField( - choices=[(x, x.title()) for x in models.settings.POLYPHONIC_MODULES], + choices=[ + (x, x.replace(".", " ").title()) for x in models.settings.POLYPHONIC_MODULES + ], widget=forms.CheckboxSelectMultiple, required=False, ) diff --git a/polyphonic/interface/models.py b/polyphonic/interface/models.py index 86e1622..a939cca 100644 --- a/polyphonic/interface/models.py +++ b/polyphonic/interface/models.py @@ -192,8 +192,9 @@ class Project(models.Model): class Module(models.Model): """Enable modules on a oriject""" - name = models.SlugField( - max_length=20, choices=[(x, x.title()) for x in settings.POLYPHONIC_MODULES] + name = models.CharField( + max_length=100, + choices=[(x, x.replace(".", " ").title()) for x in settings.POLYPHONIC_MODULES], ) project = models.ForeignKey( Project, related_name="modules", on_delete=models.CASCADE diff --git a/polyphonic/interface/static/interface/css/polyphonic.css b/polyphonic/interface/static/css/polyphonic.css similarity index 100% rename from polyphonic/interface/static/interface/css/polyphonic.css rename to polyphonic/interface/static/css/polyphonic.css diff --git a/polyphonic/interface/static/interface/background.png b/polyphonic/interface/static/images/background.png similarity index 100% rename from polyphonic/interface/static/interface/background.png rename to polyphonic/interface/static/images/background.png diff --git a/polyphonic/interface/static/interface/icon.png b/polyphonic/interface/static/images/icon.png similarity index 100% rename from polyphonic/interface/static/interface/icon.png rename to polyphonic/interface/static/images/icon.png diff --git a/polyphonic/interface/static/interface/js/interface.js b/polyphonic/interface/static/js/interface.js similarity index 100% rename from polyphonic/interface/static/interface/js/interface.js rename to polyphonic/interface/static/js/interface.js diff --git a/polyphonic/interface/templates/base.html b/polyphonic/interface/templates/base.html index cf64fbd..a8aebbe 100644 --- a/polyphonic/interface/templates/base.html +++ b/polyphonic/interface/templates/base.html @@ -5,15 +5,11 @@ - - - - - - - - - + + + + + {% block title %}Polyphonic{% endblock %} {% block media %}{% endblock %} diff --git a/polyphonic/interface/templates/interface/ensemble_detail.html b/polyphonic/interface/templates/interface/ensemble_detail.html index b85cb95..3ea0d8c 100644 --- a/polyphonic/interface/templates/interface/ensemble_detail.html +++ b/polyphonic/interface/templates/interface/ensemble_detail.html @@ -36,22 +36,16 @@ Contacts: {% include 'interface/project_items.html' %} {% if request.is_admin %} -
-
-
-

Admin Details

-
- -
+
+

Admin Details

+
{% endif %} -
+ diff --git a/polyphonic/interface/templates/interface/ensemble_list.html b/polyphonic/interface/templates/interface/ensemble_list.html index e5f9031..c62d14e 100644 --- a/polyphonic/interface/templates/interface/ensemble_list.html +++ b/polyphonic/interface/templates/interface/ensemble_list.html @@ -43,8 +43,11 @@
{% empty %} -
- You don't currently have access to any ensembles - ask your administrator for a link. +
+
+

You don't currently have access to any ensembles

+

Ask your administrator for a link.

+
{% endfor %}
diff --git a/polyphonic/interface/templates/interface/project_base.html b/polyphonic/interface/templates/interface/project_base.html index 0d73bbb..da15f8e 100644 --- a/polyphonic/interface/templates/interface/project_base.html +++ b/polyphonic/interface/templates/interface/project_base.html @@ -21,7 +21,7 @@