2
0
mirror of https://github.com/inventree/inventree-website.git synced 2025-04-28 13:36:47 +00:00

refactor functions

This commit is contained in:
Matthias Mair 2022-02-07 01:16:35 +01:00
parent b1f3c19052
commit 41e8c5c3e7
6 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,7 @@
<nav class="list-none mb-10"><ul> <nav class="list-none mb-10"><ul>
{% for item in cat.cats %} {% for item in cat.cats %}
<li> <li>
<a href="{% include link.html item=item%}" class="footer-link">{{ item.name }}</a> <a href="{% include fnc/link.html item=item%}" class="footer-link">{{ item.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul></nav> </ul></nav>

View File

@ -5,10 +5,10 @@
<div class="lg:w-2/3 flex flex-col sm:flex-row sm:items-center items-start mx-auto"> <div class="lg:w-2/3 flex flex-col sm:flex-row sm:items-center items-start mx-auto">
<h1 class="flex-grow sm:pr-16 text-2xl font-medium title-font cm-gray-1">{{ include.cta.text|default:include.text }}</h1> <h1 class="flex-grow sm:pr-16 text-2xl font-medium title-font cm-gray-1">{{ include.cta.text|default:include.text }}</h1>
{% for item in include.cta.btn %} {% for item in include.cta.btn %}
<a href="{% include link.html item=item.link %}" class="text-white bg-secondary focus:outline-none hover:bg-primary text-lg rounded flex-shrink-0 border-0 py-2 px-4 mt-10 sm:mt-0 ml-4">{{ item.text }}</a> <a href="{% include fnc/link.html item=item.link %}" class="text-white bg-secondary focus:outline-none hover:bg-primary text-lg rounded flex-shrink-0 border-0 py-2 px-4 mt-10 sm:mt-0 ml-4">{{ item.text }}</a>
{% endfor %} {% endfor %}
{% if include.link %} {% if include.link %}
<a href="{% include link.html item=include.link %}" class="flex-shrink-0 text-white bg-secondary border-0 py-2 px-8 focus:outline-none hover:bg-primary rounded text-lg mt-10 sm:mt-0">{{ include.link_text }}</a> <a href="{% include fnc/link.html item=include.link %}" class="flex-shrink-0 text-white bg-secondary border-0 py-2 px-8 focus:outline-none hover:bg-primary rounded text-lg mt-10 sm:mt-0">{{ include.link_text }}</a>
{% endif %} {% endif %}
</div> </div>
{% unless include.no_container %} {% unless include.no_container %}

View File

@ -7,7 +7,7 @@
<h1 class="sm:text-3xl text-2xl font-medium title-font mb-2 cm-gray-1">{{ include.data.title }}</h1> <h1 class="sm:text-3xl text-2xl font-medium title-font mb-2 cm-gray-1">{{ include.data.title }}</h1>
{% if include.link %} {% if include.link %}
{% assign link=include.data.link|default:include.link %} {% assign link=include.data.link|default:include.link %}
<a href="{% include link.html item=link %}" alt="learn more">{% include learn_more.html %}</a> <a href="{% include fnc/link.html item=link %}" alt="learn more">{% include fnc/learn_more.html %}</a>
{% endif %} {% endif %}
</div> </div>
<div class="h-1 w-20 bg-secondary rounded"></div> <div class="h-1 w-20 bg-secondary rounded"></div>
@ -24,7 +24,7 @@
<p class="leading-relaxed text-base">{{ item.description }} <p class="leading-relaxed text-base">{{ item.description }}
{% if include.extend and item.extend %}<br><br>{{ item.extend }}{% endif %} {% if include.extend and item.extend %}<br><br>{{ item.extend }}{% endif %}
</p> </p>
<a class="text-secondary inline-flex items-center" href="{% include link.html item=item.link %}" alt="learn more">Learn More {% include learn_more.html %}</a> <a class="text-secondary inline-flex items-center" href="{% include fnc/link.html item=item.link %}" alt="learn more">Learn More {% include fnc/learn_more.html %}</a>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}

View File

@ -11,7 +11,7 @@
{% if include.data.title %}<h1 class="sm:text-3xl text-2xl font-medium title-font mb-4 cm-gray-1">{{ include.data.title }}</h1>{% endif %} {% if include.data.title %}<h1 class="sm:text-3xl text-2xl font-medium title-font mb-4 cm-gray-1">{{ include.data.title }}</h1>{% endif %}
{% if include.data.text %}<p class="lg:w-2/3 mx-auto leading-relaxed text-base">{{ include.data.text }}</p>{% endif %} {% if include.data.text %}<p class="lg:w-2/3 mx-auto leading-relaxed text-base">{{ include.data.text }}</p>{% endif %}
{% if include.data.link and include.no_link != true %} {% if include.data.link and include.no_link != true %}
<a class="text-secondary inline-flex items-center justify-center" href="{% include link.html item=include.data.link %}" alt="learn more">Learn More {% include learn_more.html %}</a> <a class="text-secondary inline-flex items-center justify-center" href="{% include fnc/link.html item=include.data.link %}" alt="learn more">Learn More {% include fnc/learn_more.html %}</a>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
@ -25,7 +25,7 @@
{% if include.extend and item.extend %}<br><br>{{ item.extend }}{% endif %} {% if include.extend and item.extend %}<br><br>{{ item.extend }}{% endif %}
</p> </p>
{% if item.link %} {% if item.link %}
<a class="text-secondary inline-flex items-center" href="{% include link.html item=item.link %}" alt="learn more">Learn More {% include learn_more.html %}</a> <a class="text-secondary inline-flex items-center" href="{% include fnc/link.html item=item.link %}" alt="learn more">Learn More {% include fnc/learn_more.html %}</a>
{% endif %} {% endif %}
</div> </div>
{% endfor %} {% endfor %}

View File

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 195 B