[pluginlist-update] Adding some plugin category scaffolding.
This commit is contained in:
parent
c2000963a6
commit
482df9ccb0
|
@ -0,0 +1 @@
|
|||
name: Build
|
|
@ -0,0 +1 @@
|
|||
name: Content
|
|
@ -0,0 +1,3 @@
|
|||
_model: plugin-categories
|
||||
---
|
||||
_slug: plugins/categories
|
|
@ -0,0 +1 @@
|
|||
name: Deploy
|
|
@ -0,0 +1 @@
|
|||
name: Templates
|
|
@ -0,0 +1,16 @@
|
|||
_model: plugins
|
||||
---
|
||||
title: Lektor Loves Plugins
|
||||
---
|
||||
body:
|
||||
|
||||
#### banner ####
|
||||
image: header.jpg
|
||||
----
|
||||
height: 300
|
||||
----
|
||||
contents: image content
|
||||
#### text-block ####
|
||||
text: some text
|
||||
----
|
||||
class: default
|
|
@ -0,0 +1,5 @@
|
|||
title: Disqus Comments
|
||||
---
|
||||
official: yes
|
||||
---
|
||||
categories: templates
|
Binary file not shown.
After Width: | Height: | Size: 210 KiB |
|
@ -0,0 +1,4 @@
|
|||
title: Jinja Content
|
||||
---
|
||||
categories: content
|
||||
---
|
|
@ -0,0 +1,7 @@
|
|||
title: Markdown Admonition
|
||||
---
|
||||
categories: content
|
||||
---
|
||||
link: https://pypi.org/project/lektor-markdown-admonition/
|
||||
---
|
||||
official: yes
|
|
@ -0,0 +1,7 @@
|
|||
title: Markdown Highlighter
|
||||
---
|
||||
categories: content
|
||||
---
|
||||
link: https://pypi.org/project/lektor-markdown-highlighter/
|
||||
---
|
||||
official: yes
|
|
@ -0,0 +1,7 @@
|
|||
title: Webpack Support
|
||||
---
|
||||
categories: build
|
||||
---
|
||||
link: https://pypi.org/project/lektor-webpack-support/
|
||||
---
|
||||
official: yes
|
|
@ -10,6 +10,14 @@ label = Documentation
|
|||
path = /showcase
|
||||
label = Showcase
|
||||
|
||||
[plugins]
|
||||
path = /plugins
|
||||
label = Plugins
|
||||
|
||||
# [themes]
|
||||
# path = /themes
|
||||
# label = Themes
|
||||
|
||||
[community]
|
||||
path = /community
|
||||
label = Community
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
[model]
|
||||
name = Plugin Categories
|
||||
label = Plugin Categories
|
||||
hidden = yes
|
||||
protected = yes
|
||||
|
||||
[children]
|
||||
model = plugin-category
|
||||
order_by = name
|
|
@ -0,0 +1,11 @@
|
|||
[model]
|
||||
name = Plugin Category
|
||||
label = {{ this.name }}
|
||||
hidden = yes
|
||||
|
||||
[children]
|
||||
replaced_with = site.query('/plugins').filter(F.categories.contains(this))
|
||||
|
||||
[fields.name]
|
||||
label = Name
|
||||
type = string
|
|
@ -0,0 +1,27 @@
|
|||
[model]
|
||||
name = Plugin
|
||||
inherit = page
|
||||
label = {{ this.title }}
|
||||
|
||||
[children]
|
||||
enabled = no
|
||||
|
||||
[fields.title]
|
||||
label = Title
|
||||
type = string
|
||||
size = large
|
||||
|
||||
[fields.official]
|
||||
label = Official
|
||||
type = boolean
|
||||
checkbox_label = If true, then the plugin will be marked as official.
|
||||
default = false
|
||||
|
||||
[fields.link]
|
||||
label = PyPI Link. We use this to scrape information about your project and display it on this site.
|
||||
type = url
|
||||
|
||||
[fields.categories]
|
||||
label = Categories
|
||||
type = select
|
||||
source = site.query('/plugin-categories')
|
|
@ -0,0 +1,7 @@
|
|||
[model]
|
||||
name = Plugins
|
||||
inherits = page
|
||||
label = {{ this.title }}
|
||||
|
||||
[children]
|
||||
model = plugin
|
|
@ -0,0 +1,26 @@
|
|||
{% macro render_category_nav(active=none) %}
|
||||
<ul>
|
||||
{% for category in site.query('/plugin-categories') %}
|
||||
<li{% if category._id == active %} class="active"{% endif
|
||||
%}><a href="{{ category|url }}">{{ category.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_plugin_list(plugins, active=none) %}
|
||||
<ul>
|
||||
{% for category in site.query('/plugin-categories') %}
|
||||
<li{% if category._id == active %} class="active"{% endif
|
||||
%}><a href="{{ category|url }}">{{ category.name }}</a></li>
|
||||
<ul>
|
||||
{% for plugin in category.children.order_by('-official', 'title') %}
|
||||
{% if plugin.official %}
|
||||
<li><a href="{{ plugin|url }}">* {{ plugin.title }}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ plugin|url }}">{{ plugin.title }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endmacro %}
|
|
@ -0,0 +1,7 @@
|
|||
{% extends "layout.html" %}
|
||||
{% from "macros/plugins.html" import render_category_nav %}
|
||||
{% block title %}Plugin Categories{% endblock %}
|
||||
{% block body %}
|
||||
<h1>Plugin Categories</h1>
|
||||
{{ render_category_nav(active=none) }}
|
||||
{% endblock %}
|
|
@ -0,0 +1,9 @@
|
|||
{% extends "layout.html" %}
|
||||
{% from "macros/plugins.html" import render_category_nav,
|
||||
render_plugin_list %}
|
||||
{% block title %}Plugin Category {{ this.name }}{% endblock %}
|
||||
{% block body %}
|
||||
<h1>Plugin Category {{ this.name }}</h1>
|
||||
{{ render_category_nav(active=this._id) }}
|
||||
{{ render_plugin_list(this.children) }}
|
||||
{% endblock %}
|
|
@ -0,0 +1,8 @@
|
|||
{% extends "layout.html" %}
|
||||
{% from 'macros/blocksupport.html' import render_full_width_blocks %}
|
||||
{% block title %}{{ this.title }}{% endblock %}
|
||||
{% block outerbody %}
|
||||
<h1>{{ this.title }}</h1>1111
|
||||
{{ this.summary }}2222
|
||||
{{ this.repo }}333
|
||||
{% endblock %}
|
|
@ -0,0 +1,11 @@
|
|||
{% extends "layout.html" %}
|
||||
{% from "macros/plugins.html" import
|
||||
render_plugin_list, render_category_nav %}
|
||||
{% 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') %}
|
||||
<h1>{{ this.title }}</h1>
|
||||
{{ render_plugin_list(this.children) }}
|
||||
{% endcall %}
|
||||
{% endblock %}
|
Loading…
Reference in New Issue