Move to custom SSG instead of eleventy.
This commit is contained in:
14
docs/renderer/nodes/Button.njk
Normal file
14
docs/renderer/nodes/Button.njk
Normal file
@@ -0,0 +1,14 @@
|
||||
{% set commonClasses = "px-6 py-2 md:px-12 md:py-3 text-white rounded-md w-auto whitespace-nowrap not-prose" %}
|
||||
{% macro render(node) %}
|
||||
<a
|
||||
href="{{ node.href }}"
|
||||
target="{{ node.target }}"
|
||||
{% if node.variant == "primary" %}
|
||||
class="{{ node.class }} {{ commonClasses }} bg-gradient-to-b from-primary-500 to-primary-600 hover:from-primary-400 hover:to-primary-600 active:from-primary-600 active:to-primary-500"
|
||||
{% elseif node.variant == 'neutral' %}
|
||||
class="{{ node.class }} {{ commonClasses }} bg-gradient-to-b from-neutral-500 to-neutral-800"
|
||||
{% endif %}
|
||||
>
|
||||
{{ node.text | safe }}
|
||||
</a>
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user