From 3815773c05589651d530c293ceed9b6de85d9f60 Mon Sep 17 00:00:00 2001 From: L3D Date: Sat, 4 Mar 2023 05:17:37 +0100 Subject: [PATCH] upgrade site for integration of plugin --- .gitignore | 1 + content/contents.lr | 30 +++++++++++--- flowblocks/table.ini | 4 -- models/page.ini | 14 ++++--- templates/galaxy.svg | 99 ++++++++++++++++++++++++++++++++++++++++++++ templates/page.html | 24 ++++++++++- 6 files changed, 157 insertions(+), 15 deletions(-) create mode 100644 templates/galaxy.svg diff --git a/.gitignore b/.gitignore index cc2435a..8c8b9ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # lektor packages/ +assets/svg/ # ---> Vim # swap diff --git a/content/contents.lr b/content/contents.lr index 79e7ff1..21bb644 100644 --- a/content/contents.lr +++ b/content/contents.lr @@ -1,17 +1,37 @@ -title: Ansible Roles +title: Awesome Ansible Roles --- body: -This is a basic demo website that shows how to use Lektor for a basic -website with some pages. +Hello Everyone. + +I love open-source and automation. So I wrote some ansible roles. --- table: #### table #### -name: Ansible Role Gitea +name: Gitea and Forgejo ---- galaxy_name: do1jlr.gitea ---- galaxy_url: https://galaxy.ansible.com/do1jlr/gitea +#### table #### +name: foo ---- -galaxy_icon: https://raw.githubusercontent.com/roles-ansible/ansible_role_gitea/main/.github/galaxy.svg +galaxy_name: b +---- +galaxy_url: https://galaxy.ansible.com/do1jlr/gitea +--- +tabletitle: List of my ansible roles +--- +pages: databag.array, name, template.html +--- +model: test.txt +--- +source: + +#### table #### +name: test +---- +galaxy_name: +---- +galaxy_url: diff --git a/flowblocks/table.ini b/flowblocks/table.ini index d324dff..8b02b9c 100644 --- a/flowblocks/table.ini +++ b/flowblocks/table.ini @@ -15,7 +15,3 @@ width = 1/3 label = Ansible Galaxy Address type = url width = 2/3 - -[fields.galaxy_icon] -label = Ansible Galaxy Icon -type = url diff --git a/models/page.ini b/models/page.ini index ceb87d4..3ccc8b1 100644 --- a/models/page.ini +++ b/models/page.ini @@ -3,14 +3,18 @@ name = Page label = {{ this.title }} [fields.title] -label = Title +label = Page Title +type = string + +[fields.body] +label = Introduction +type = markdown + +[fields.tabletitle] +label = Table Title type = string [fields.table] label = Our Ansible Roles type = flow flow_blocks = table - -[fields.body] -label = Body -type = markdown diff --git a/templates/galaxy.svg b/templates/galaxy.svg new file mode 100644 index 0000000..8f5ba8d --- /dev/null +++ b/templates/galaxy.svg @@ -0,0 +1,99 @@ + + + {{ this.title }} + + + + + + + + + + + + + + + + ansible-galaxy + {{ this.name }} + + + + + + ansible-galaxy + {{ this.name }} + + + + + + + + L3D + + + + + L3D <l3d@c3woc.de> + + + ansible.l3d.space + + + CC-BY-SA + + + {{ this.title }} + + + + + + + + + + + + diff --git a/templates/page.html b/templates/page.html index 0430577..bd68062 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,6 +1,28 @@ {% extends "layout.html" %} {% block title %}{{ this.title }}{% endblock %} {% block body %} -

{{ this.title }}

{{ this.body }} + {% if this.table is defined %} + {% if this.table.blocks | length != 0 %} +

{{ this. tabletitle }}

+ + + + + + + + + {% for blk in this.table.blocks -%} + + + + + {% endfor %} + +
Role NameExpenditure
{{ blk.name }} + +
+ {% endif %} + {% endif %} {% endblock %}