Skip to main content

Hero Area (image)
New

This template shows how to build a simple responsive view that utilizes image variation of Hero Area. Please note that the example below does not represent a real use case.

Hint: Press F on your keyboard to view both templates and components in fullscreen and ESC to exit the fullscreen mode. You can also open the template in a new browser window.


Open in new window
<!DOCTYPE html>
<html class="duet-sticky-footer" lang="fi">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>LähiTapiola</title>
<link rel="stylesheet" href="https://cdn.duetds.com/api/fonts/1.3.12/lib/localtapiola.css" integrity="sha384-5JYmtSD7nykpUvSmTW1CHMoBDkBZUpUmG0vuh+NUVtZag3F75Kr7+/JU3J7JV6Wq" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.duetds.com/api/css/1.4.11/lib/duet.min.css" integrity="sha384-sUqynDIM4CaM5zvQUnBLiafIVjqmhBqx4ccbPy/SY+emEDchuuECwFY0ftmxWtEY" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.duetds.com/api/tokens/2.0.30/lib/tokens.custom-properties.css" integrity="sha384-arb0dRY7eabL9qYMLabGqlrgO9p75pZ9lvaqh3xpLpNUUW6KBtRjKqkSwBv3HyLp" crossorigin="anonymous" />
<script type="module" src="https://cdn.duetds.com/api/components/4.7.3/lib/duet/duet.esm.js" integrity="sha384-P4A6+AMluHP5nVjKIrl5tvN/QSaymtVwYZbVMCT0R1ND4ipiMgqeCxuguH1icn+E" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.duetds.com/api/components/4.7.3/lib/duet/duet.js" integrity="sha384-qru0HruOE70bAbFK89SKUNI6k0YJstOrzRyAy6J6PJpwEUXowhskmnKjDZNV3Xn1" crossorigin="anonymous"></script>
</head>
<body>
<duet-header skip-to-id="#content" contact="Ota yhteyttä"></duet-header>
<duet-hero
heading="LähiTapiola Meklarit"
description="Tarjoamme vakuutusmeklareille asiantuntevaa palvelua keskitetysti ja alueellisesti.
Rekisteröi&shy;tyessäsi saat käyttöösi kattavat sähköiset asiantuntija&shy;palvelumme."

image="https://www.duetds.com/assets/img/illustrations/placeholder-image.jpg"
variation="image"
button-label="Rekisteröidy käyttäjäksi"
button-url="#"
id="content">

</duet-hero>
<duet-layout>
<div slot="main">
<duet-card padding="large" id="signin">
<duet-heading level="h2" visual-level="h4" border>Kirjaudu sisään</duet-heading>
<duet-spacer size="x-large"></duet-spacer>
<duet-paragraph>
Ole hyvä ja syötä käyttäjätunnuksesi ja salasanasi alla oleviin kenttiin kirjautuaksesi sisään.
Tarvittaessa saat lisätietoja osoitteesta
<duet-link url="mailto:duetdesignsystem@lahitapiola.fi">
duetdesignsystem@lahitapiola.fi
</duet-link>.
</duet-paragraph>
<duet-spacer></duet-spacer>
<duet-grid>
<duet-grid-item margin="none" max-width="400px" fill>
<form method="post">
<duet-input expand type="email" label="Tunnus" placeholder="nimi@email.com" name="email"></duet-input>
<duet-input type="password" expand label="Salasana" placeholder="••••••••••••" name="password"></duet-input>
<duet-spacer></duet-spacer>
<duet-button submit variation="secondary">Kirjaudu</duet-button>
<duet-spacer size="small"></duet-spacer>
</form>
</duet-grid-item>
</duet-grid>
</duet-grid-item>
</duet-card>
</div>
<div slot="sidebar">
<duet-card background="primary-lightest" padding="large" margin="none">
<duet-heading level="h2" visual-level="h5">Toiminnot</duet-heading>
<duet-spacer size="x-small"></duet-spacer>
<duet-link url="#">Lue lisää Meklareista</duet-link><br>
<duet-link url="#">Kysy lisätietoja</duet-link><br>
<duet-link url="#">Yhteystiedot</duet-link><br>
<duet-link url="#">Rekisteröidy käyttäjäksi</duet-link><br>
<duet-link url="#">Unohditko salasanasi?</duet-link>
<duet-spacer></duet-spacer>
</duet-card>
</div>
</duet-layout>
<duet-footer logo-href="/" language="fi"></duet-footer>
<script>
// Save references to components we want to adjust below
var header = document.querySelector("duet-header")
var footer = document.querySelector("duet-footer")

// Set the contact menu items
header.contactItems = [
{ label: "Kysy lisätietoja", href: "mailto:minna.poikela@lahitapiola.fi" },
{ label: "Yhteystiedot", href: "/yhteystiedot/" }
]

// Set label and href for session link
header.session = {
label: "Kirjaudu sisään",
href: "#signin",
type: "signin"
}

// Set the main links in footer
footer.items = [
{ label: 'Hae korvausta', href: '#', icon: 'navigation-make-claim' },
{ label: 'Osta vakuutus', href: '#', icon: 'action-buy-insurance' },
{ label: 'Yhteystiedot', href: '#', icon: 'form-tel' }
]

// Set the help menu items in footer
footer.menu = [
{ label: 'Turvallisuus ja käyttöehdot', href: '#' },
{ label: 'Evästeet', href: '#' },
{ label: 'Henkilötietojen käsittely', href: '#' },
]
</script>
</body>
</html>

Integration

To install this template’s dependencies into your project, run:

npm install @duetds/components
npm install @duetds/css
npm install @duetds/fonts

For further guidelines, please see each package’s documentation.



Tutorials

Follow these practical tutorials to learn how to build simple page layouts using Duet’s CSS Framework, Web Components and other features:

Tutorials

Abstract

Tutorials

Building Layouts

Tutorials

Using CLI Tools

Tutorials

Creating Custom Patterns

Tutorials

Server Side Rendering

Tutorials

Sharing Prototypes

Tutorials

Usage With Markdown

Tutorials

VS Code

Tutorials

Zeplin


Troubleshooting

If you experience any issues while using a template, please head over to the Support page for more guidelines and help.