Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tera variables in style properties are shown as an error. #24

Open
persello opened this issue Feb 8, 2023 · 1 comment
Open

Tera variables in style properties are shown as an error. #24

persello opened this issue Feb 8, 2023 · 1 comment

Comments

@persello
Copy link

persello commented Feb 8, 2023

{% macro hero(hero_section) %}
<div class="macro-hero" style="background-image: url({{ hero_section.wallpaper | default(value="") }})">
    <div class="hero-content">
        <h4>{{ hero_section.intro }}</h4>
        <h1>{{ hero_section.title }}</h1>
        <p>{{ hero_section.description }}</p>

        {% if hero_section.buttons %}
        <div class="hero-buttons">
            {% for button in hero_section.buttons %}

            {% if button.primary %}
            <a class="button primary" href="{{ button.url }}">{{ button.text }}</a>
            {% else %}
            <a class="button" href="{{ button.url }}">{{ button.text }}</a>
            {% endif %}

            {% endfor %}
        </div>
        {% endif %}

    </div>

    {% if hero_section.social_links %}
    <nav class="hero-social">
        {% for social in hero_section.social_links %}
        <a href="{{ social.url }}"><img src="{{ social.icon }}" alt="{{ social.name }}"></a>
        {% endfor %}
    </nav>
    {% endif %}
</div>
{% endmacro %}

The contents of the style property at line 2 is shown as an error, as shown in the image below.

image

@karuna
Copy link
Owner

karuna commented Feb 8, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants