2
0
mirror of https://github.com/inventree/inventree-website.git synced 2025-07-31 09:41:38 +00:00

move html blocks

This commit is contained in:
2022-02-07 01:13:52 +01:00
parent f237b273c7
commit b1f3c19052
8 changed files with 16 additions and 16 deletions

17
_includes/block/cta.html Normal file
View File

@@ -0,0 +1,17 @@
<section class="cm-gray-2 body-font">
{% unless include.no_container %}
<div class="container px-5 py-24 mx-auto">
{% endunless %}
<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>
{% 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>
{% endfor %}
{% 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>
{% endif %}
</div>
{% unless include.no_container %}
</div>
{% endunless %}
</section>

View File

@@ -0,0 +1,37 @@
<section class="cm-gray-2 body-font">
<div class="container px-5 py-24 mx-auto">
<div class="flex flex-wrap w-full mb-4">
<div class="lg:w-1/2 w-full mb-6 lg:mb-0">
<a class="anchor" id="{{ include.data.ref }}"></a>
<div class="inline-flex items-center">
<h1 class="sm:text-3xl text-2xl font-medium title-font mb-2 cm-gray-1">{{ include.data.title }}</h1>
{% if 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>
{% endif %}
</div>
<div class="h-1 w-20 bg-secondary rounded"></div>
</div>
<p class="lg:w-1/2 w-full leading-relaxed cm-gray-3">{{ include.data.text }}</p>
</div>
<div class="flex flex-wrap -m-4">
{% for item in include.data.features %}
<div class="xl:w-1/4 md:w-1/2 p-4">
<div class="bg-gray-100 p-6 rounded-lg">
<h3 class="tracking-widest text-primary text-xs font-medium title-font">{{ item.subtitle }}</h3>
<h2 class="text-lg cm-gray-1 font-medium title-font mb-4">{{ item.title }}</h2>
<p class="leading-relaxed text-base">{{ item.description }}
{% if include.extend and item.extend %}<br><br>{{ item.extend }}{% endif %}
</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>
</div>
</div>
{% endfor %}
</div>
{% if include.data.cta %}
{% include cta.html no_container=true cta=include.data.cta %}
{% endif %}
</div>
</section>

View File

@@ -0,0 +1,34 @@
{% if include.padding != nil and include.padding != true %}
{% assign padding = false %}
{% else %}
{% assign padding = true %}
{% endif %}
<section class="cm-gray-2 body-font">
<div class="container px-5 {% if padding == true %}py-24{% endif %} mx-auto">
{% if include.data.title or include.data.text or include.data.link %}
<div class="flex flex-col text-center w-full mb-20">
{% 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.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>
{% endif %}
</div>
{% endif %}
<div class="flex flex-wrap">
{% assign function_len = include.data.functions | size %}
{% for item in include.data.functions %}
<div class="xl:w-1/{{ function_len }} lg:w-1/2 md:w-full px-8 py-6">
<h2 class="text-lg sm:text-xl cm-gray-1 font-medium title-font mb-2">{{ item.title }}</h2>
<p class="leading-relaxed text-base mb-4">
{{ item.text }}
{% if include.extend and item.extend %}<br><br>{{ item.extend }}{% endif %}
</p>
{% 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>
{% endif %}
</div>
{% endfor %}
</div>
</div>
</section>

24
_includes/block/hero.html Normal file
View File

@@ -0,0 +1,24 @@
<section class="cm-gray-2 body-font">
<div class="container mx-auto flex px-5 py-24 md:flex-row flex-col items-center">
<div class="lg:flex-grow md:w-1/2 lg:pr-24 md:pr-16 flex flex-col md:items-start md:text-left mb-16 md:mb-0 items-center text-center">
<h1 class="title-font sm:text-4xl text-3xl mb-4 font-medium cm-gray-1">{{ include.title }}
{% if include.title_2 %}
<br class="hidden lg:inline-block">{{ include.title_2 }}
{% endif %}
{% if include.color %}
<span class="bg-clip-text text-transparent bg-gradient-to-r from-primary to-secondary">{{ include.color }}</span>
{% endif %}
</h1>
<p class="mb-8 leading-relaxed">{{ include.detail }}</p>
<div class="flex justify-center">
<button class="inline-flex text-white bg-secondary border-0 py-2 px-6 focus:outline-none hover:bg-primary rounded text-lg">Button</button>
<button class="ml-4 inline-flex cm-hvr-btn border-0 py-2 px-6 focus:outline-none text-lg">Button</button>
</div>
</div>
<div class="lg:max-w-lg lg:w-full md:w-1/2 w-5/6">
{% if include.image %}
<img class="object-cover object-center rounded" alt="hero" src="{{ include.image }}">
{% endif %}
</div>
</div>
</section>

View File

@@ -0,0 +1,14 @@
<section class="cm-gray-2 body-font">
<div class="container px-5 py-24 mx-auto">
<div class="flex flex-wrap -m-4 text-center">
{% assign stats = stats|default:site.data.general.stats.stats %}
{% for item in stats %}
<div class="p-4 sm:w-1/4 w-1/2">
<h2 class="title-font font-medium sm:text-4xl text-3xl cm-gray-1">{{ item.number }}</h2>
<p class="leading-relaxed">{{ item.name }}</p>
</div>
{% endfor %}
</div>
</div>
</section>