CameraBuy / templates / index.twig
index.twig
Raw
<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/assets/css/main.css">
    <link rel="stylesheet" href="/assets/css/home.css">
    <title>CameraBuy - Start</title>
    <link rel="stylesheet" href="https://use.typekit.net/mtk3vtw.css">
</head>
<body>
    <header>
        <nav>
            <div class="navigation_image" id="logo_container">
                <a href="#"><img src="/assets/img/logo.svg" alt="CameraBuy Logo"></a>
            </div>
            <div id="navigation">
                <a href="/">Neuigkeiten</a>
                <a href="/shop" >Shop</a>
                <a href="/contact" >Kontakt</a>
            </div>
            <div class="navigation_image" id="shopping_cart_container">
                <a href="/cart"><img src="/assets/img/cart.svg" alt="Shopping Cart"></a>
            </div>
        </nav>
    </header>
    <main>
        <section id="showroom">
            <div>
                <h2>{{entry.showroomProdukt.0.title}}</h2>
                <p>{{entry.showroomProdukt.one().description}}</p>
                <a href="/shop/{{entry.showroomProdukt.one().slug}}" class="buttonlarge darkbutton">Mehr erfahren</a>
            </div>
            {% set preview_image = entry.showroomProdukt.one().productimg.kind('image').one() %}
                <img src='/assets/filesystem/productimg/{{ preview_image.getUrl() }}' alt='{{ preview_image.title }}'>
        </section>
        
        <section id="suggestions">
            {%set mainsuggestion = entry.suggested.0%}
            {%set secondsuggestion = entry.suggested.1%}
            {%set thirdsuggestion = entry.suggested.2%}
            <h1>Unsere Empfehlungen</h1>
            <div>
                <a href="/shop/{{secondsuggestion.slug}}">
                    <img src='assets/filesystem/productimg/{{secondsuggestion.productimg.one().getUrl()}}' alt='{{secondsuggestion.productimg.one().title}}'>
                    <div>
                        {% if secondsuggestion.tags %}
                            <p class='tag'>{{secondsuggestion.tags}}</p>
                        {% endif %}
                        <h3>{{secondsuggestion.title}}</h3>
                        <p class='productdiscription'>{{secondsuggestion.description}}</p>
                        <p class='price'>{{secondsuggestion.price|money}}</p>
                    </div>
                </a>
                <a href="/shop/{{mainsuggestion.slug}}" class="highlighted">
                    <img src='assets/filesystem/productimg/{{mainsuggestion.productimg.one().getUrl()}}' alt='{{mainsuggestion.productimg.one().title}}'>
                    <div>
                        {% if mainsuggestion.tags %}
                            <p class='tag'>{{mainsuggestion.tags}}</p>
                        {% endif %}
                        <h3>{{mainsuggestion.title}}</h3>
                        <p class='productdiscription'>{{mainsuggestion.description}}</p>
                        <p class='price'>{{mainsuggestion.price|money}}</p>
                    </div>
                </a>
                <a href="/shop/{{thirdsuggestion.slug}}">
                    <img src='assets/filesystem/productimg/{{thirdsuggestion.productimg.one().getUrl()}}' alt='{{thirdsuggestion.productimg.one().title}}'>
                    <div>
                        {% if thirdsuggestion.tags %}
                            <p class='tag'>{{thirdsuggestion.tags}}</p>
                        {% endif %}    
                        <h3>{{thirdsuggestion.title}}</h3>
                        <p class='productdiscription'>{{thirdsuggestion.description}}</p>
                        <p class='price'>{{thirdsuggestion.price|money}}</p>
                    </div>
                </a>
            </div>
            
        </section>
        <section id="banner_to_shop">
            <h2>Finde die Kamera, die zu dir passt.</h2>
            <a href="/shop" class="buttonlarge darkbutton">Mehr erfahren</a>
        </section>
        <section id="video">
            {% set entry = craft.entries.section('start').one() %}
            {% set image = entry.bild.kind('image').one() %}
            {% if image %}
                <img src="/assets/filesystem/img/{{ image.getUrl() }}" alt="{{ image.title }}">
            {% endif %}
            <div>
                <h3>{{ craft.entries.section('start').one().headline }}</h3>
                <p>
                    {{ craft.entries.section('start').one().longtext }}
                </p>
                <a href="{{ craft.entries.section('start').one().linkurl }}" class="buttonlarge darkbutton" >{{ craft.entries.section('start').one().buttonText }}</a>
            </div>
        </section>
    </main>
    {{ include ('footer.html') }}  
</body>
</html>