upgrade site for integration of plugin

This commit is contained in:
L3D 2023-03-04 05:17:37 +01:00
parent 068e80dc63
commit 3815773c05
Signed by: l3d
GPG key ID: CD08445BFF4313D1
6 changed files with 157 additions and 15 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
# lektor # lektor
packages/ packages/
assets/svg/
# ---> Vim # ---> Vim
# swap # swap

View file

@ -1,17 +1,37 @@
title: Ansible Roles title: Awesome Ansible Roles
--- ---
body: body:
This is a basic demo website that shows how to use Lektor for a basic Hello Everyone.
website with some pages.
I love open-source and automation. So I wrote some ansible roles.
--- ---
table: table:
#### table #### #### table ####
name: Ansible Role Gitea name: Gitea and Forgejo
---- ----
galaxy_name: do1jlr.gitea galaxy_name: do1jlr.gitea
---- ----
galaxy_url: https://galaxy.ansible.com/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:

View file

@ -15,7 +15,3 @@ width = 1/3
label = Ansible Galaxy Address label = Ansible Galaxy Address
type = url type = url
width = 2/3 width = 2/3
[fields.galaxy_icon]
label = Ansible Galaxy Icon
type = url

View file

@ -3,14 +3,18 @@ name = Page
label = {{ this.title }} label = {{ this.title }}
[fields.title] [fields.title]
label = Title label = Page Title
type = string
[fields.body]
label = Introduction
type = markdown
[fields.tabletitle]
label = Table Title
type = string type = string
[fields.table] [fields.table]
label = Our Ansible Roles label = Our Ansible Roles
type = flow type = flow
flow_blocks = table flow_blocks = table
[fields.body]
label = Body
type = markdown

99
templates/galaxy.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -1,6 +1,28 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block title %}{{ this.title }}{% endblock %} {% block title %}{{ this.title }}{% endblock %}
{% block body %} {% block body %}
<h2>{{ this.title }}</h2>
{{ this.body }} {{ this.body }}
{% if this.table is defined %}
{% if this.table.blocks | length != 0 %}
<h2>{{ this. tabletitle }}</h2>
<table>
<thead>
<tr>
<th scope="col">Role Name</th>
<th scope="col">Expenditure</th>
</tr>
</thead>
<tbody>
{% for blk in this.table.blocks -%}
<tr>
<th>{{ blk.name }}</th>
<td>
<a href="{{ blk.galaxy_url }}"><img src="{{ blk.galaxy_name | svg }}" /></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endif %}
{% endblock %} {% endblock %}