diff --git a/src/django_idom/static/js/idom.js b/src/django_idom/static/js/idom.js new file mode 100644 index 00000000..297f9808 --- /dev/null +++ b/src/django_idom/static/js/idom.js @@ -0,0 +1,2 @@ +// Build.js is going to need to be moved here via your deployment scripts +// This will allow developers to import IDOM the Django way \ No newline at end of file diff --git a/src/django_idom/templates/idom/head_content.html b/src/django_idom/templates/idom/head_content.html new file mode 100644 index 00000000..1140b2ab --- /dev/null +++ b/src/django_idom/templates/idom/head_content.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/django_idom/templates/idom/root.html b/src/django_idom/templates/idom/root.html new file mode 100644 index 00000000..fbd81269 --- /dev/null +++ b/src/django_idom/templates/idom/root.html @@ -0,0 +1,4 @@ + +
\ No newline at end of file diff --git a/src/django_idom/templatetags/__init__.py b/src/django_idom/templatetags/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/django_idom/templatetags/idom.py b/src/django_idom/templatetags/idom.py new file mode 100644 index 00000000..ac0a3686 --- /dev/null +++ b/src/django_idom/templatetags/idom.py @@ -0,0 +1,16 @@ +from django import template + + +register = template.Library() + + +# Template tag that renders the IDOM scripts +@register.inclusion_tag("idom/head_content.html") +def idom_scripts(): + pass + + +# Template tag that renders an empty idom root object +@register.inclusion_tag("idom/root.html") +def idom_view(html_id): + return {"html_id": html_id}