From 56dc0ae10a2e4f62c74c3f468c7d8836c6b2005a Mon Sep 17 00:00:00 2001 From: Joseph Nix Date: Mon, 23 Apr 2018 16:44:05 -0500 Subject: [PATCH] [pluginlist-update] Better template layouts. --- content/plugin-categories/build/contents.lr | 9 +++++- content/plugin-categories/content/contents.lr | 9 +++++- content/plugin-categories/deploy/contents.lr | 9 +++++- .../plugin-categories/templates/contents.lr | 9 +++++- content/plugins/contents.lr | 12 ++++---- models/plugin-category.ini | 5 +--- templates/macros/plugins.html | 30 ++++++++----------- templates/plugin-category.html | 13 ++++---- templates/plugin.html | 18 ++++++----- templates/plugins.html | 23 ++++++++++---- 10 files changed, 85 insertions(+), 52 deletions(-) diff --git a/content/plugin-categories/build/contents.lr b/content/plugin-categories/build/contents.lr index 43c6708a..ae5472d0 100644 --- a/content/plugin-categories/build/contents.lr +++ b/content/plugin-categories/build/contents.lr @@ -1 +1,8 @@ -name: Build +body: + +#### text-block #### +text: par +---- +class: default +--- +title: Build diff --git a/content/plugin-categories/content/contents.lr b/content/plugin-categories/content/contents.lr index ab96a980..84dc16b2 100644 --- a/content/plugin-categories/content/contents.lr +++ b/content/plugin-categories/content/contents.lr @@ -1 +1,8 @@ -name: Content +title: Content +--- +body: + +#### text-block #### +text: adsf +---- +class: default diff --git a/content/plugin-categories/deploy/contents.lr b/content/plugin-categories/deploy/contents.lr index 79a2a729..27ea37bf 100644 --- a/content/plugin-categories/deploy/contents.lr +++ b/content/plugin-categories/deploy/contents.lr @@ -1 +1,8 @@ -name: Deploy +body: + +#### text-block #### +text: ds +---- +class: default +--- +title: Deploy diff --git a/content/plugin-categories/templates/contents.lr b/content/plugin-categories/templates/contents.lr index 71a04a80..7335f309 100644 --- a/content/plugin-categories/templates/contents.lr +++ b/content/plugin-categories/templates/contents.lr @@ -1 +1,8 @@ -name: Templates +body: + +#### text-block #### +text: saf +---- +class: default +--- +title: Templates diff --git a/content/plugins/contents.lr b/content/plugins/contents.lr index 7e564258..3bbceaa2 100644 --- a/content/plugins/contents.lr +++ b/content/plugins/contents.lr @@ -4,13 +4,11 @@ title: Lektor Loves Plugins --- body: -#### banner #### -image: header.jpg ----- -height: 300 ----- -contents: image content #### text-block #### -text: some text +text: + +Lektor is a young project but it has a growing list of both official and community supported plugins. Official plugins were developed by the authors of Lektor and kept in good shape together with the rest of the project. Community plugins are moderated and updated regularly, but they might not keep pace with development on Lektor. They are maintained by the community. + +This is a list of currently known plugins. Official plugins are prefixed with as asterisk (*) and are listed first in each section and separated by an underline. ---- class: default diff --git a/models/plugin-category.ini b/models/plugin-category.ini index c532d51c..2581cbb6 100644 --- a/models/plugin-category.ini +++ b/models/plugin-category.ini @@ -1,11 +1,8 @@ [model] name = Plugin Category +inherits = page label = {{ this.name }} hidden = yes [children] replaced_with = site.query('/plugins').filter(F.categories.contains(this)) - -[fields.name] -label = Name -type = string diff --git a/templates/macros/plugins.html b/templates/macros/plugins.html index bc3d02d1..0cbcef23 100644 --- a/templates/macros/plugins.html +++ b/templates/macros/plugins.html @@ -7,23 +7,19 @@ {% endmacro %} -{% macro render_plugin_list(plugins, active=none) %} - {% for category in site.query('/plugin-categories') %} -

{{ category.name }}

- {% endmacro %} diff --git a/templates/plugin-category.html b/templates/plugin-category.html index 5dd24dbb..7f02c9c1 100644 --- a/templates/plugin-category.html +++ b/templates/plugin-category.html @@ -1,9 +1,8 @@ -{% extends "layout.html" %} -{% from "macros/plugins.html" import render_category_nav, - render_plugin_list %} -{% block title %}Plugin Category {{ this.name }}{% endblock %} +{% extends "plugins.html" %} + {% block body %} -

Plugin Category {{ this.name }}

- {{ render_category_nav(active=this._id) }} - {{ render_plugin_list(this.children) }} +

{{ this.title }}

+ {% call render_full_width_blocks(this.body.blocks, classes='col-md-12') %} + {% endcall %} + {{ render_plugin_list(this) }} {% endblock %} diff --git a/templates/plugin.html b/templates/plugin.html index 67808659..c00283b8 100644 --- a/templates/plugin.html +++ b/templates/plugin.html @@ -1,11 +1,15 @@ -{% extends "layout.html" %} -{% from 'macros/blocksupport.html' import render_full_width_blocks %} -{% block title %}{{ this.title }}{% endblock %} -{% block outerbody %} +{% extends "plugins.html" %} + +{% block body %}

{{ this.name }}

{% set pd = project_data(this.name) %} - {{ pd }} -
- {{ pd.description }} + {{ pd }}
+ 111
+ {{ pd.author }}
+ {{ pd.version }}
+ {{ pd.home_page }}
+ {{ pd.summary }}
+
+ {{ pd.description|markdown }} {% endblock %} diff --git a/templates/plugins.html b/templates/plugins.html index 713078d3..7993222e 100644 --- a/templates/plugins.html +++ b/templates/plugins.html @@ -1,11 +1,22 @@ {% extends "layout.html" %} -{% from "macros/plugins.html" import - render_plugin_list, render_category_nav %} +{% from "macros/plugins.html" import render_plugin_list %} {% from 'macros/blocksupport.html' import render_full_width_blocks %} {% block title %}{{ this.title }}{% endblock %} + {% block outerbody %} - {% call render_full_width_blocks(this.body.blocks, classes='col-md-12') %} -

{{ this.title }}

- {{ render_plugin_list(this.children) }} - {% endcall %} + {% set image = site.get('/plugins').attachments.images.first() %} + {% if image %} +
+ {% endif %} + {{ super() }} +{% endblock %} + +{% block body %} +

{{ this.title }}

+ {% call render_full_width_blocks(this.body.blocks, classes='col-md-12') %} + {% endcall %} + {% for category in site.query('/plugin-categories') %} +

{{ category.title }}

+ {{ render_plugin_list(category) }} + {% endfor %} {% endblock %}