mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
feed themes from global data
This commit is contained in:
@@ -47,6 +47,14 @@ export default async function (eleventyConfig) {
|
||||
flashes: '',
|
||||
});
|
||||
|
||||
//
|
||||
// Add free themes to preset themes global data
|
||||
//
|
||||
// TODO - let's iterate the directory and grab these. We'll need to figure out how to separate free from pro and
|
||||
// update the pro config as well.
|
||||
//
|
||||
eleventyConfig.addGlobalData('freeThemes', ['default', 'awesome', 'shoelace']);
|
||||
|
||||
// Template filters - {{ content | filter }}
|
||||
eleventyConfig.addFilter('inlineMarkdown', content => markdown.renderInline(content || ''));
|
||||
eleventyConfig.addFilter('markdown', content => markdown.render(content || ''));
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
<wa-select appearance="filled" size="small" value="default" pill class="theme-selector">
|
||||
<wa-icon slot="prefix" name="paintbrush" variant="regular"></wa-icon>
|
||||
<wa-option value="default">Default</wa-option>
|
||||
<wa-option value="shoelace">Shoelace</wa-option>
|
||||
<wa-option value="awesome">Awesome</wa-option>
|
||||
<wa-divider></wa-divider>
|
||||
<wa-option value="active">Active</wa-option>
|
||||
<wa-option value="brutalist">Brutalist</wa-option>
|
||||
<wa-option value="glossy">Glossy</wa-option>
|
||||
<wa-option value="matter">Matter</wa-option>
|
||||
<wa-option value="mellow">Mellow</wa-option>
|
||||
<wa-option value="playful">Playful</wa-option>
|
||||
<wa-option value="premium">Premium</wa-option>
|
||||
<wa-option value="tailspin">Tailspin</wa-option>
|
||||
{% for theme in freeThemes %}
|
||||
<wa-option value="{{ theme }}">{{ theme | title }}</wa-option>
|
||||
{% endfor %}
|
||||
|
||||
{% if proThemes.length > 0 %}
|
||||
<wa-divider></wa-divider>
|
||||
{% endif %}
|
||||
|
||||
{% for theme in proThemes %}
|
||||
<wa-option value="{{ theme }}">{{ theme | title }}</wa-option>
|
||||
{% endfor %}
|
||||
</wa-select>
|
||||
|
||||
Reference in New Issue
Block a user