diff --git a/nonpacks/templates/landing/home.html b/nonpacks/templates/landing/home.html index 9b8f056..8ee3809 100644 --- a/nonpacks/templates/landing/home.html +++ b/nonpacks/templates/landing/home.html @@ -10,8 +10,8 @@

Hosted datapacks for Needs Of Nature & Animation Director.

Browse and download packs shared by the community. Upload your own once you have a creator account.

@@ -19,22 +19,22 @@
- 0 + {{ stats.creators }} Creators
- 0 + {{ stats.packs }} Packs
- 0 + {{ stats.downloads }} Downloads
- 0 + {{ stats.versions }} Versions
@@ -42,70 +42,23 @@

Latest packs

- View all + View all
- {% comment %} Example cards — replace with real Pack objects when the library model lands. {% endcomment %} - -
- -
-
diff --git a/nonpacks/templates/library/_project_card.html b/nonpacks/templates/library/_project_card.html new file mode 100644 index 0000000..93e3cc8 --- /dev/null +++ b/nonpacks/templates/library/_project_card.html @@ -0,0 +1,24 @@ +{% load static %} + +
+ {% if project.thumbnail %} + + {% else %} + + {% endif %} +
+
+

{{ project.title }}

+

{{ project.owner.username }}

+

{{ project.summary|default:"No description yet." }}

+
+ {% for link in project.tag_links.all|slice:":4" %} + {{ link.tag.name }} + {% endfor %} +
+
+ {{ project.versions.0.version_name|default:"no versions" }} + {{ project.downloads }} +
+
+
diff --git a/nonpacks/templates/library/_project_form_fields.html b/nonpacks/templates/library/_project_form_fields.html new file mode 100644 index 0000000..80d967f --- /dev/null +++ b/nonpacks/templates/library/_project_form_fields.html @@ -0,0 +1,26 @@ +
+ {{ form.title.errors }} + + {{ form.title }} +
+ +
+ {{ form.summary.errors }} + + {{ form.summary }} +
+ +
+
+ {{ form.category.errors }} + + {{ form.category }} +
+
+ +
+ {{ form.description.errors }} + + {{ form.description }} +

Supports Markdown — headings, lists, links, code, tables and more.

+
diff --git a/nonpacks/templates/library/_project_form_side.html b/nonpacks/templates/library/_project_form_side.html new file mode 100644 index 0000000..1fca4d0 --- /dev/null +++ b/nonpacks/templates/library/_project_form_side.html @@ -0,0 +1,17 @@ +
+ {{ form.thumbnail.errors }} + + {{ form.thumbnail }} +

Square image shown on cards and the project header.

+
+ +
+ +
+ + +
+ {{ form.tags }} +
+

Categories: loader, version, general, creator, content, species, non_version. Unprefixed tags go to General. Creator tags are added automatically.

+
diff --git a/nonpacks/templates/library/_version_form_fields.html b/nonpacks/templates/library/_version_form_fields.html new file mode 100644 index 0000000..a1f7ce8 --- /dev/null +++ b/nonpacks/templates/library/_version_form_fields.html @@ -0,0 +1,18 @@ +
+ {{ form.version_name.errors }} + + {{ form.version_name }} +
+ +
+ {{ form.file.errors }} + + {{ form.file }} +
+ +
+ {{ form.changelog.errors }} + + {{ form.changelog }} +

Supports Markdown.

+
diff --git a/nonpacks/templates/library/asset_upload.html b/nonpacks/templates/library/asset_upload.html new file mode 100644 index 0000000..eca7c3e --- /dev/null +++ b/nonpacks/templates/library/asset_upload.html @@ -0,0 +1,45 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %}Add Media - {{ project.title }}{% endblock %} + +{% block content %} +

Add media — {{ project.title }}

+

← Back to project

+ +
+ {% csrf_token %} + +
+
+
+ +

Drag & drop media here

+

or click to browse — images, videos or gifs, several at once

+
+
+ + +
+
+ +
+ + +
+ +
+ +
+
+ +{{ pending_uploads|json_script:'packs-pending-uploads' }} +{% endblock %} + +{% block extra_js %} + +{% endblock %} diff --git a/nonpacks/templates/library/browse.html b/nonpacks/templates/library/browse.html new file mode 100644 index 0000000..adef34a --- /dev/null +++ b/nonpacks/templates/library/browse.html @@ -0,0 +1,89 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %}Browse - Packs Site{% endblock %} + +{% block content %} +
+

Browse

+
+
+ + +
+
+
+ +
+ + +
+
+ {{ projects.paginator.count }} project{{ projects.paginator.count|pluralize }} +
+ {% if q %}{% endif %} + {% if category %}{% endif %} + {% for t in active_tags %}{% endfor %} + +
+
+ +
+ {% for project in projects %} + {% include 'library/_project_card.html' %} + {% empty %} +
+ +

No projects match your filters.

+
+ {% endfor %} +
+ + {% if projects.paginator.num_pages > 1 %} + + {% endif %} +
+
+{% endblock %} diff --git a/nonpacks/templates/library/contributors.html b/nonpacks/templates/library/contributors.html new file mode 100644 index 0000000..1293896 --- /dev/null +++ b/nonpacks/templates/library/contributors.html @@ -0,0 +1,86 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %}Contributors - {{ project.title }}{% endblock %} + +{% block content %} +

Contributors — {{ project.title }}

+

← Back to project

+ +
+

Add contributor

+
+ {% csrf_token %} + +
+ {{ contributor_form.username.errors }} + + {{ contributor_form.username }} + +
+ +
+
+ +
+

Current contributors

+ {% if contributors %} +
    +
  • + {{ project.owner.username }} (owner) +
  • + {% for contributor in contributors %} +
  • + {{ contributor.user.username }} +
    + {% csrf_token %} + + + +
    +
  • + {% endfor %} +
+ {% else %} +

No additional contributors yet.

+ {% endif %} +
+{% endblock %} + +{% block extra_js %} + +{% endblock %} diff --git a/nonpacks/templates/library/project_create.html b/nonpacks/templates/library/project_create.html new file mode 100644 index 0000000..1c6919f --- /dev/null +++ b/nonpacks/templates/library/project_create.html @@ -0,0 +1,122 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %}Create Project - Packs Site{% endblock %} + +{% block content %} +

New Project

+
+ {% csrf_token %} + +
+
+

Project

+ +
+ {{ project_form.title.errors }} + + {{ project_form.title }} +
+
+ {{ project_form.summary.errors }} + + {{ project_form.summary }} +
+
+ {{ project_form.category.errors }} + + {{ project_form.category }} +
+
+ {{ project_form.description.errors }} + + {{ project_form.description }} +

Supports Markdown — headings, lists, links, code, tables and more.

+
+
+ +
+

Thumbnail

+
+
+
+ +

Drag & drop an image

+

or click to browse

+
+
+ +
+
+ +

Tags

+
+ + +
+ {{ project_form.tags }} +
+

Categories: loader, version, general, creator, content, species, non_version. Unprefixed tags go to General.

+
+ +
+

First version

+
+ {{ version_form.version_name.errors }} + + {{ version_form.version_name }} +
+
+
+
+ +

Drag & drop the pack file

+

or click to browse

+
+
+ +
+
+
+ {{ version_form.changelog.errors }} + + {{ version_form.changelog }} +

Supports Markdown.

+
+ +

Gallery media

+
+
+
+ +

Drag & drop media

+

or click to browse — several at once

+
+
+ + +
+
+
+ {{ project_form.caption.errors }} + + {{ project_form.caption }} +
+
+
+ +
+ + +
+
+{% endblock %} + +{% block extra_js %} +{{ draft_uploads|json_script:'packs-draft-uploads' }} + + +{% endblock %} diff --git a/nonpacks/templates/library/project_delete.html b/nonpacks/templates/library/project_delete.html new file mode 100644 index 0000000..a38d884 --- /dev/null +++ b/nonpacks/templates/library/project_delete.html @@ -0,0 +1,17 @@ +{% extends 'base.html' %} + +{% block title %}Delete {{ project.title }} - Packs Site{% endblock %} + +{% block content %} +
+

Delete {{ project.title }}?

+

This permanently deletes the project, all its versions and gallery media. This cannot be undone.

+
+ {% csrf_token %} +
+ Cancel + +
+
+
+{% endblock %} diff --git a/nonpacks/templates/library/project_detail.html b/nonpacks/templates/library/project_detail.html new file mode 100644 index 0000000..f21c356 --- /dev/null +++ b/nonpacks/templates/library/project_detail.html @@ -0,0 +1,140 @@ +{% extends 'base.html' %} +{% load static %} +{% load markdown %} + +{% block title %}{{ project.title }} - Packs Site{% endblock %} + +{% block content %} +
+
+ {% if project.thumbnail %} + {{ project.title }} + {% else %} +
{{ project.title|first|upper }}
+ {% endif %} +
+
+
+

{{ project.title }}

+ {{ project.get_category_display }} +
+ {% if project.summary %}

{{ project.summary }}

{% endif %} +
+ + {{ project.owner.username }} + + {{ project.downloads }} + {{ versions|length }} version{{ versions|length|pluralize }} +
+ {% if can_edit %} +
+ New version + Add media + Edit + {% if request.user == project.owner %} + Contributors + + {% endif %} +
+ {% endif %} +
+
+ +{% if tags %} +
+ {% regroup tags by tag.category as tag_groups %} + {% for group in tag_groups %} +
+ + + {{ group.grouper.name }} + + {% for link in group.list %} + {{ link.tag.name }} + {% endfor %} +
+ {% endfor %} +
+{% endif %} + +
+ + + +
+ +
+
+ {% if project.description %} +
{{ project.description|markdown }}
+ {% else %} +

No description yet.

+ {% endif %} +
+
+ +
+
+

Versions

+ {% for version in versions %} +
+
+
+ {{ version.version_name }} + {% if forloop.first %}latest{% endif %} +
+ {{ version.created_at|date:"M j, Y" }} +
+ {% if version.changelog %} +
{{ version.changelog|markdown }}
+ {% endif %} + + {{ version.downloads }} + +
+ {% empty %} +

No versions yet.

+ {% endfor %} +
+
+ + +{% endblock %} + +{% block extra_js %} + +{% endblock %} diff --git a/nonpacks/templates/library/project_edit.html b/nonpacks/templates/library/project_edit.html new file mode 100644 index 0000000..1ceb723 --- /dev/null +++ b/nonpacks/templates/library/project_edit.html @@ -0,0 +1,31 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %}Edit {{ project.title }} - Packs Site{% endblock %} + +{% block content %} +

Edit {{ project.title }}

+

← Back to project

+ +
+ {% csrf_token %} + +
+
+ {% include 'library/_project_form_fields.html' with form=project_form %} +
+ + +
+ +
+ +
+
+{% endblock %} + +{% block extra_js %} + +{% endblock %} diff --git a/nonpacks/templates/library/version_upload.html b/nonpacks/templates/library/version_upload.html new file mode 100644 index 0000000..c012f51 --- /dev/null +++ b/nonpacks/templates/library/version_upload.html @@ -0,0 +1,17 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %}New Version - {{ project.title }}{% endblock %} + +{% block content %} +

New version — {{ project.title }}

+

← Back to project

+ +
+ {% csrf_token %} + {% include 'library/_version_form_fields.html' with form=version_form %} +
+ +
+
+{% endblock %} diff --git a/nonpacks/templates/profiles/profile.html b/nonpacks/templates/profiles/profile.html index 27abe97..dee39e3 100644 --- a/nonpacks/templates/profiles/profile.html +++ b/nonpacks/templates/profiles/profile.html @@ -1,5 +1,6 @@ {% extends 'base.html' %} {% load static %} +{% load markdown %} {% block title %}{{ profile_user.username }} - Packs{% endblock %} @@ -38,11 +39,16 @@ {{ bio_form.bio.errors }} {{ bio_form.bio }}
- +

Supports Markdown — headings, lists, links, code, tables and more.

+
+ + +
+ {% else %} {% if profile.bio %} -

{{ profile.bio }}

+
{{ profile.bio|markdown }}
{% else %}

{{ profile_user.username }} hasn't written a bio yet.

{% endif %} @@ -54,16 +60,67 @@

Packs by {{ profile_user.username }}

- {% comment %} Placeholder — replace with real Pack objects when the library model lands. {% endcomment %} -
-
- + {% for project in projects %} + {% include 'library/_project_card.html' %} + {% empty %} +
+
+ +
+
+

No packs yet

+

This creator hasn't published anything yet.

+
-
-

No packs yet

-

This creator hasn't published any datapacks.

-
-
+ {% endfor %}
{% endblock %} + +{% block extra_js %} +{% if is_owner %} + +{% endif %} +{% endblock %}