diff --git a/.gitignore b/.gitignore index 0aacd71..6aadb1e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,7 @@ __pycache__ *.css.map /cloud/templates/ -/cloud/static/assets/css/ -/cloud/static/assets/js/bootstrap.min.js +/cloud/static/assets/ node_modules/ /config_local.py diff --git a/cloud/__init__.py b/cloud/__init__.py index af55054..abb7cd0 100644 --- a/cloud/__init__.py +++ b/cloud/__init__.py @@ -41,6 +41,7 @@ class CloudExtension(PillarExtension): 'EXTERNAL_SUBSCRIPTIONS_MANAGEMENT_SERVER': 'https://store.blender.org/api/', 'EXTERNAL_SUBSCRIPTIONS_TIMEOUT_SECS': 10, 'BLENDER_ID_WEBHOOK_USER_CHANGED_SECRET': 'oos9wah1Zoa0Yau6ahThohleiChephoi', + 'NODE_TAGS': ['animation', 'modelling', 'rigging'], } def eve_settings(self): diff --git a/cloud/routes.py b/cloud/routes.py index c05e7f1..68b5572 100644 --- a/cloud/routes.py +++ b/cloud/routes.py @@ -391,6 +391,11 @@ def privacy(): return render_template('privacy.html') +@blueprint.route('/production') +def production(): + return render_template('production.html') + + @blueprint.route('/emails/welcome.send') @login_required def emails_welcome_send(): diff --git a/cloud/tagged/__init__.py b/cloud/tagged/__init__.py new file mode 100644 index 0000000..e3afbdd --- /dev/null +++ b/cloud/tagged/__init__.py @@ -0,0 +1,3 @@ +"""Routes for fetching tagged assets.""" + + diff --git a/cloud/tagged/routes.py b/cloud/tagged/routes.py new file mode 100644 index 0000000..2f53551 --- /dev/null +++ b/cloud/tagged/routes.py @@ -0,0 +1,16 @@ +import logging +import datetime +import functools + +from flask import Blueprint, jsonify + +blueprint = Blueprint('cloud.tagged', __name__, url_prefix='/tagged') + +log = logging.getLogger(__name__) + + +@blueprint.route('/') +def index(): + """Return all tagged assets as JSON, grouped by tag.""" + + diff --git a/src/scripts/tagged_assets.js b/src/scripts/tagged_assets.js new file mode 100644 index 0000000..5ad7c9f --- /dev/null +++ b/src/scripts/tagged_assets.js @@ -0,0 +1,109 @@ +/** + * Support for fetching & rendering assets by tags. + */ +(function($) { + /* How many nodes to load initially, and when clicked on the 'Load Next' link. */ + const LOAD_INITIAL_COUNT = 5; + const LOAD_NEXT_COUNT = 3; + + /* Renders a node as a