diff --git a/Makefile b/Makefile index 5b3a484..0df7497 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -BUILDDIR=../ungleich-staticcms-build +BUILDDIR=ungleich-staticcms-build DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms.ungleich.ch/www/ all: publish diff --git a/configs/atom.ini b/configs/atom.ini index af5eb1c..a7decf6 100644 --- a/configs/atom.ini +++ b/configs/atom.ini @@ -3,3 +3,8 @@ name = ungleich Blog source_path = /u/blog filename = feed.xml item_model = blog-post + +[product] +name = ungleich products +source_path = /u/products +item_model = product diff --git a/content/u/products/contents.lr b/content/u/products/contents.lr new file mode 100644 index 0000000..c365e11 --- /dev/null +++ b/content/u/products/contents.lr @@ -0,0 +1,3 @@ +_model: products +--- +title: Ungleich's product page diff --git a/content/u/products/ipv6-only-hosting/contents.lr b/content/u/products/ipv6-only-hosting/contents.lr new file mode 100644 index 0000000..b46f033 --- /dev/null +++ b/content/u/products/ipv6-only-hosting/contents.lr @@ -0,0 +1,7 @@ +name: IPv6 Only Hosting +--- +buy_link: https://google.com +--- +description: Hi there this is descriptino +--- +teaser: We provide best IPv6 only hosting diff --git a/content/u/products/ipv6vpn/contents.lr b/content/u/products/ipv6vpn/contents.lr new file mode 100644 index 0000000..a3c2a5b --- /dev/null +++ b/content/u/products/ipv6vpn/contents.lr @@ -0,0 +1,9 @@ +name: IPv6 VPN +--- +_discoverable: yes +--- +buy_link: http://ungleich.ch +--- +description: This is description +--- +teaser: This is teaser diff --git a/models/product.ini b/models/product.ini new file mode 100644 index 0000000..e677a7a --- /dev/null +++ b/models/product.ini @@ -0,0 +1,25 @@ +[model] +name = Product +label = {{ this.title }} +hidden = yes + +[fields.name] +label = Product Name +type = string +size = large + +[fields.teaser] +label = Teaser +type = string +width = 1/2 + +[fields.description] +label = Description +type = string +width = 1/4 +addon_label = @ + +[fields.buy_link] +label = Buy Link +type = url +width = 1/4 diff --git a/models/products.ini b/models/products.ini new file mode 100644 index 0000000..d57c1d4 --- /dev/null +++ b/models/products.ini @@ -0,0 +1,11 @@ +[model] +name = Products +label = Products +hidden = yes + +[fields.title] +label = Title +type = string + +[children] +model = product diff --git a/templates/macros/product.html b/templates/macros/product.html new file mode 100644 index 0000000..10dfb48 --- /dev/null +++ b/templates/macros/product.html @@ -0,0 +1,29 @@ +{% macro render_product(product, from_index=false) %} + {% if from_index %} +
+
+
+ {% set image = product.attachments.images.first() %} +

{% if image %}{% else %}
{% endif %}

+
+
+ {% if from_index %}

{{ post.title }}

+ {% else %} +

{{ product.title }}

+ {% endif %} + +

+

+ {{ product.abstract }} +

+

+
+
+
+
+ {% else %} + {{ product.body }} + {% endif %} +{% endmacro %} diff --git a/templates/product.html b/templates/product.html new file mode 100644 index 0000000..c32be85 --- /dev/null +++ b/templates/product.html @@ -0,0 +1,105 @@ + +{% extends "layout.html" %} +{% from "macros/blog.html" import render_blog_post %} +{% from "macros/pagination.html" import render_pagination %} +{% block title %}{{ this.title }}{% endblock %} +{% block body %} +
+
+
+
+
+

ungleich store

+
+ +
+
+
+
+
+
+
+
+
+
+

{{this.name}}

+
+
+ {{this.description}} +
+
+
+
+
+ +{% endblock %} diff --git a/templates/products.html b/templates/products.html new file mode 100644 index 0000000..52a7cc9 --- /dev/null +++ b/templates/products.html @@ -0,0 +1,107 @@ + +{% extends "layout.html" %} +{% from "macros/blog.html" import render_blog_post %} +{% from "macros/pagination.html" import render_pagination %} +{% block title %}{{ this.title }}{% endblock %} +{% block body %} +
+
+
+
+
+

ungleich store

+
+ +
+
+
+
+
+
+
+ {% for product in this.children %} +
+
+
+

{{product.name}}

+
+
+ {{product.teaser}} +
+
+
+ {% endfor %} +
+
+ +{% endblock %}