2
0
mirror of https://github.com/inventree/inventree-website.git synced 2025-05-02 15:28:52 +00:00

refactor to reduce double data

This commit is contained in:
Matthias Mair 2021-11-07 23:43:14 +01:00
parent 2b1a0ce567
commit b6684705d0
12 changed files with 36 additions and 33 deletions

View File

@ -10,7 +10,8 @@
<div class="flex-grow flex flex-wrap md:pl-20 -mb-10 md:mt-0 mt-10 md:text-left text-center">
{% for cat in site.data.footer %}
{% assign footer = footer|default: site.data.general.footer %}
{% for cat in footer %}
<div class="lg:w-1/4 md:w-1/2 w-full px-4">
<h2 class="footer-categorie title-font">{{ cat.title }}</h2>
<nav class="list-none mb-10">

View File

@ -1,7 +1,9 @@
<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">
{% for item in site.data.stats.stats %}
{% 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>

View File

@ -0,0 +1,14 @@
---
layout: default
---
{% include hero.html title=site.tagline title_2=page.title_2 image='https://dummyimage.com/860x600' color='with InvenTree' %}
{% assign data = site.data[page.data] %}
{% include features.html data=data %}
{% include cta.html cta=site.data.general.learn_cta %}
{% include functions.html data=site.data.general.function %}
{% include cta.html cta=site.data.general.end_cta %}
---

View File

@ -1,16 +1,6 @@
---
layout: default
backLink: false
---
{% include hero.html title=site.tagline title_2='for Business' image='https://dummyimage.com/860x600' color='with InvenTree' %}
{% include features.html data=site.data.for_business %}
{% include cta.html cta=site.data.learn_cta %}
{% include functions.html data=site.data.function %}
{% include cta.html cta=site.data.end_cta %}
layout: branche
title: For Business
title_2: for Business
data: for_business
---

View File

@ -1,16 +1,6 @@
---
layout: default
backLink: false
---
{% include hero.html title=site.tagline title_2='for Education' image='https://dummyimage.com/860x600' color='with InvenTree' %}
{% include features.html data=site.data.for_edu %}
{% include cta.html cta=site.data.learn_cta %}
{% include functions.html data=site.data.function %}
{% include cta.html cta=site.data.end_cta %}
layout: branche
title: For Education
title_2: for Education
data: for_edu
---

6
home/hobby.md Normal file
View File

@ -0,0 +1,6 @@
---
layout: branche
title: For Hobby
title_2: for Hobby
data: for_hobby
---

View File

@ -5,7 +5,7 @@ backLink: false
{% include hero.html title=site.tagline title_2='and more' image='https://dummyimage.com/860x600' color='with InvenTree' %}
{% include functions.html data=site.data.function %}
{% include functions.html data=site.data.general.function %}
{% include features.html data=site.data.for_hobby %}
@ -13,8 +13,8 @@ backLink: false
{% include features.html data=site.data.for_edu %}
{% include stats.html data=site.data.stats %}
{% include stats.html data=site.data.general.stats %}
{% include cta.html cta=site.data.end_cta %}
{% include cta.html cta=site.data.general.end_cta %}
---