From 6e24e5f91f1d747aa4842f39f71f272d581ff3b6 Mon Sep 17 00:00:00 2001 From: L3D Date: Wed, 22 Mar 2023 00:52:49 +0100 Subject: [PATCH] create Templates --- content/contents.lr | 21 +++++++++++ flowblocks/collections.ini | 50 +++++++++++++++++++++++++++ flowblocks/table.ini | 2 +- models/frontpage.ini | 11 +++++- packages/render-template | 2 +- templates/frontpage.html | 71 +++++++++++++++++++++++++++++++++++++- 6 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 flowblocks/collections.ini diff --git a/content/contents.lr b/content/contents.lr index a8458a0..3911752 100644 --- a/content/contents.lr +++ b/content/contents.lr @@ -302,3 +302,24 @@ trailer: I have all my roles on [github.com/roles-ansible/](https://github.com/roles-ansible/) and welcome any pull requests, questions and comments there. If you want to get away from Microsoft for a good reason, have a look at [backwesen.de/ansible/](https://backwesen.de/ansible/). As soon as Federation for Forgejo and Gitea is implemented, there will be a chance to interact about it. If you like ansible and open source and are thinking about supporting one or more ansible roles or github workflows yourself, please feel free to drop me a line. +--- +tablecollectionstitle: List of my ansible collections +--- +collections: + +#### collections #### +name: Ansible Git Server Collection +---- +gitrepo: +---- +gitearepo: +---- +no_galaxy: true +---- +galaxy_name: l3d.git +---- +galaxy_url: +---- +maintainance: false +---- +license: MIT diff --git a/flowblocks/collections.ini b/flowblocks/collections.ini new file mode 100644 index 0000000..565a214 --- /dev/null +++ b/flowblocks/collections.ini @@ -0,0 +1,50 @@ +[block] +name = Add Ansible Collection +button_label = Add Ansible Collection + +[fields.name] +label = Ansible Collection Name +type = string + +[fields.gitrepo] +label = Github Repo +type = url +width = 1/2 + +[fields.gitearepo] +label = Gitea Repo +type = url +width = 1/2 + +[fields.no_galaxy] +label = Role has Galaxy +type = boolean +checkbox_label = Uncheck if role is not at galaxy +default = true +width = 1/8 + +[fields.galaxy_name] +label = Ansible Galaxy Name +description = And Icons file Name +type = string +width = 3/8 +default = l3d.collection + +[fields.galaxy_url] +label = Ansible Galaxy Address +type = url +width = 1/2 + +[fields.maintainance] +label = Maintainance Status +type = select +choices = well,true,poor,false +default = false +width = 1/2 + +[fields.license] +label = Maintainance Status +type = select +choices = MIT,GPLv3,BSD 3-Clause,CC-BY-4.0,CC-BY-SA-4.0,Apache-2,proprietary +default = MIT +width = 1/2 diff --git a/flowblocks/table.ini b/flowblocks/table.ini index 721fa0a..75027a0 100644 --- a/flowblocks/table.ini +++ b/flowblocks/table.ini @@ -28,7 +28,7 @@ label = Ansible Galaxy Name description = And Icons file Name type = string width = 3/8 -default = do1jlr.template +default = l3d.template [fields.galaxy_url] label = Ansible Galaxy Address diff --git a/models/frontpage.ini b/models/frontpage.ini index dd762b6..c6515c4 100644 --- a/models/frontpage.ini +++ b/models/frontpage.ini @@ -12,8 +12,17 @@ type = string label = Introduction type = markdown +[fields.tablecollectionstitle] +label = Table Collections Title +type = string + +[fields.collections] +label = Our Ansible Collections +type = flow +flow_blocks = collections + [fields.tabletitle] -label = Table Title +label = Table Roles Title type = string [fields.roles] diff --git a/packages/render-template b/packages/render-template index fe489cd..36444bf 160000 --- a/packages/render-template +++ b/packages/render-template @@ -1 +1 @@ -Subproject commit fe489cdea6ee621affd51888a0192fe9c28f84ab +Subproject commit 36444bf833881ea916e586b3fdf5cade11f51142 diff --git a/templates/frontpage.html b/templates/frontpage.html index a0aea21..7f40850 100644 --- a/templates/frontpage.html +++ b/templates/frontpage.html @@ -2,11 +2,80 @@ {% block title %}{{ this.title }}{% endblock %} {% block body %} {{ this.body }} + {% if this.collections is defined %} + {% if this.collections.blocks | length != 0 %} + Ansible Collections + {% endif %} + {% endif %} {% if this.roles is defined %} {% if this.roles.blocks | length != 0 %} Ansible Roles {% endif %} {% endif %} + {% if this.collections is defined %} + {% if this.collections.blocks | length != 0 %} +

{{ this.tablecollectionstitle }}

+ + + + + + + + + + + {% for blk in this.collections.blocks -%} + + + + + + {% endfor %} + +
Collection Name +
    +
  • Github
  • +
  • Gitea
  • +
+
+
    Roles
+
+
    +
  • Ansible Collection
  • +
  • Maintainance Status
  • +
  • License
  • +
+
{{ blk.name }} + + + + +
    +
  • + {% if blk.no_galaxy %} + + + + {% else %}-{% endif %} +
  • +
  • + +
  • +
  • + +
  • +
+
+ {% endif %} + {% endif %} {% if this.roles is defined %} {% if this.roles.blocks | length != 0 %}

{{ this.tabletitle }}

@@ -31,7 +100,7 @@ {% for blk in this.roles.blocks -%} - + {{ blk.name }}