Native App Ready
This template shows how to build a native view for iOS that utilizes Components, Design Tokens and CSS Framework. Please note that this example only works in modern browsers.
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.
<!DOCTYPE html>
<html class="duet-no-theming" 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/3.0.51/lib/localtapiola.css" integrity="sha384-5JYmtSD7nykpUvSmTW1CHMoBDkBZUpUmG0vuh+NUVtZag3F75Kr7+/JU3J7JV6Wq" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.duetds.com/api/css/4.0.45/lib/duet.min.css" integrity="sha384-UoMJnpXiN8f7fKVnTzfKfyi7LzQlApQ+WTS9O3PXlYr6CO9yzou4glfsHV747f3v" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.duetds.com/api/tokens/4.0.59/lib/tokens.custom-properties.css" integrity="sha384-AexjbYNj18dJLZR54wNVU44b/akdDc+tpbLIWhAnzjMAbwFSli2DHpSP+7NCK+Xw" crossorigin="anonymous" />
<script type="module" src="https://cdn.duetds.com/api/components/8.7.1/lib/duet/duet.esm.js" integrity="sha384-c3hLghWHTPntUxndMlK4myD7d59stA2U0EvBp2rPb3ibtacAwh56geBpq6z7nXLn" crossorigin="anonymous"></script>
<script nomodule src="https://cdn.duetds.com/api/components/8.7.1/lib/duet/duet.js" integrity="sha384-H7RH4Ssj/LmElXa1VCHFSIjvtCSoLXMiPXG/KQZTS9EvYujTo7tWaj0V6/GGkY16" crossorigin="anonymous"></script>
</head>
<body>
<style>
:root {
--layout-max-width: 414px;
}
html, body {
background: var(--color-secondary);
max-width: var(--layout-max-width);
min-height: 100%;
height: 100%;
margin: 0 auto;
}
body {
box-shadow: var(--shadow-modal);
}
h1 {
transform: translateY(-50%);
text-transform: uppercase;
position: absolute;
width: 100%;
margin: 0;
top: 50%;
left: 0;
}
header {
background: linear-gradient(var(--color-secondary), var(--color-primary-dark));
height: calc(var(--size-header) * 2);
z-index: var(--z-index-header);
position: relative;
}
main {
min-height: calc(100% - calc(var(--size-header) * 2));
padding: var(--space-x-large) var(--space-large) 0;
background: var(--color-gray-lighter);
z-index: var(--z-index-masked);
position: relative;
overflow: hidden;
width: 100%;
}
nav {
padding: var(--space-small) var(--space-xx-large) var(--space-x-large);
border-top: var(--size-form-border) solid var(--color-gray-light);
min-height: var(--size-tappable-square);
max-width: var(--layout-max-width);
z-index: var(--z-index-overlay);
transform: translateX(-50%);
background: rgba(255,255,255, 0.95);
position: fixed;
width: 100%;
bottom: 0;
left: 50%;
}
@supports (backdrop-filter: blur(8px)) {
nav {
background: rgba(255,255,255, 0.8);
backdrop-filter: blur(8px);
}
}
@supports (-webkit-backdrop-filter: blur(8px)) {
nav {
background: rgba(255,255,255, 0.8);
-webkit-backdrop-filter: blur(8px);
}
}
nav a {
width: var(--size-tappable-square);
height: var(--size-tappable-square);
justify-content: center;
align-items: center;
display: flex;
}
aside {
padding: var(--space-medium) var(--space-large) 0;
background: var(--color-gray-lightest);
box-shadow: var(--shadow-default);
z-index: var(--z-index-mask);
scrollbar-width: none;
position: sticky;
overflow: auto;
width: 100%;
top: 0;
}
aside::-webkit-scrollbar {
display: none;
}
aside a {
display: block;
text-decoration: none;
}
</style>
<header>
<h1 class="duet-text-center duet-color-gray-lightest duet-font-size-x-large duet-font-weight-extra-bold duet-letter-spacing-heading">Elämänturva</h1>
</header>
<aside>
<duet-grid>
<duet-grid-item class="duet-text-center duet-mx-x-small">
<a href="#" class="duet-color-secondary">
<duet-icon responsive="false" background="category-finance" name="category-wealth" margin="none"></duet-icon>
<div class="duet-mt-x-small duet-font-size-x-small">Talous</div>
</a>
</duet-grid-item>
<duet-grid-item class="duet-text-center duet-mx-x-small">
<a href="#" class="duet-color-secondary">
<duet-icon responsive="false" background="category-travel" name="category-travel" margin="none"></duet-icon>
<div class="duet-mt-x-small duet-font-size-x-small">Matkailu</div>
</a>
</duet-grid-item>
<duet-grid-item class="duet-text-center duet-mx-x-small">
<a href="#" class="duet-color-secondary">
<duet-icon responsive="false" background="category-home" name="category-apartment" margin="none"></duet-icon>
<div class="duet-mt-x-small duet-font-size-x-small">Asuminen</div>
</a>
</duet-grid-item>
<duet-grid-item class="duet-text-center duet-mx-x-small">
<a href="#" class="duet-color-secondary">
<duet-icon responsive="false" background="category-vehicle" name="category-car" margin="none"></duet-icon>
<div class="duet-mt-x-small duet-font-size-x-small">Ajoneuvot</div>
</a>
</duet-grid-item>
<duet-grid-item class="duet-text-center">
<a href="#" class="duet-color-secondary">
<duet-icon responsive="false" background="category-family" name="category-personal" margin="none"></duet-icon>
<div class="duet-mt-x-small duet-font-size-x-small">Minä ja muut</div>
</a>
</duet-grid-item>
<duet-grid-item class="duet-text-center duet-mx-x-small">
<a href="#" class="duet-color-secondary">
<duet-icon responsive="false" background="category-pet" name="category-pet" margin="none"></duet-icon>
<div class="duet-mt-x-small duet-font-size-x-small">Lemmikit</div>
</a>
</duet-grid-item>
<duet-grid-item>
</duet-grid-item>
</duet-grid>
</aside>
<main>
<duet-card url="#" image="https://www.duetds.com/assets/img/templates/card1.jpg">
<duet-heading level="h2" visual-level="h4">Autovakuutus</duet-heading>
<duet-paragraph margin="none">
Valitse autollesi Suomen suosituin autovakuutus.
</duet-paragraph>
<duet-button tabindex="-1" variation="plain" icon="action-arrow-right-small" icon-right icon-size="small" padding="none">Tutustu</duet-button>
</duet-card>
<duet-card url="#" image="https://www.duetds.com/assets/img/templates/card2.jpg">
<duet-heading level="h2" visual-level="h4">Moottoripyörävakuutus</duet-heading>
<duet-paragraph margin="none">
Edullinen ja kattava moottoripyörävakuutus koostuu kaskosta ja liikenne­vakuutuksesta.
</duet-paragraph>
<duet-button tabindex="-1" variation="plain" icon="action-arrow-right-small" icon-right icon-size="small" padding="none">Tutustu</duet-button>
</duet-card>
<duet-card url="#" image="https://www.duetds.com/assets/img/templates/card3.jpg">
<duet-heading level="h2" visual-level="h4">Mopovakuutus</duet-heading>
<duet-paragraph margin="none">
Mopollesi tai skootterillesi Suomen suosituin mopovakuutus.
</duet-paragraph>
<duet-button tabindex="-1" variation="plain" icon="action-arrow-right-small" icon-right icon-size="small" padding="none">Tutustu</duet-button>
</duet-card>
<duet-card url="#" image="https://www.duetds.com/assets/img/templates/card4.jpg">
<duet-heading level="h2" visual-level="h4">Muiden ajoneuvojen vakuutus</duet-heading>
<duet-paragraph margin="none">
Vakuuta moottorikelkka, mönkijä, matkailuauto tai -vaunu, peräkärry tai traktori.
</duet-paragraph>
<duet-button tabindex="-1" variation="plain" icon="action-arrow-right-small" icon-right icon-size="small" padding="none">Tutustu</duet-button>
</duet-card>
<duet-card url="#" image="https://www.duetds.com/assets/img/templates/card5.jpg">
<duet-heading level="h2" visual-level="h4">Museo- ja harraste­ajoneuvo­vakuutus</duet-heading>
<duet-paragraph margin="none">
Kaskovakuutus korvaa omalle museo- ja harrasteajoneuvolle aiheutuneet vahingot.
</duet-paragraph>
<duet-button tabindex="-1" variation="plain" icon="action-arrow-right-small" icon-right icon-size="small" padding="none">Tutustu</duet-button>
</duet-card>
<duet-card url="#" image="https://www.duetds.com/assets/img/templates/card6.jpg">
<duet-heading level="h2" visual-level="h4">Liikennevakuutus</duet-heading>
<duet-paragraph margin="none">
Liikennevakuutus tarvitaan kaikille liikenteessä käytettäville ajoneuvoille.
</duet-paragraph>
<duet-button tabindex="-1" variation="plain" icon="action-arrow-right-small" icon-right icon-size="small" padding="none">Tutustu</duet-button>
</duet-card>
<duet-card url="#" image="https://www.duetds.com/assets/img/templates/card7.jpg">
<duet-heading level="h2" visual-level="h4">Autovakuutuslaskuri</duet-heading>
<duet-paragraph margin="none">
Vakuuta moottorikelkka, mönkijä, matkailuauto tai -vaunu, peräkärry tai traktori.
</duet-paragraph>
<duet-button tabindex="-1" variation="plain" icon="action-arrow-right-small" icon-right icon-size="small" padding="none">Tutustu</duet-button>
</duet-card>
<duet-card url="#" image="https://www.duetds.com/assets/img/templates/card8.jpg">
<duet-heading level="h2" visual-level="h4">Kaskovakuutus</duet-heading>
<duet-paragraph margin="none">
Entistä paremmat kaskot samaan hintaan.
</duet-paragraph>
<duet-button tabindex="-1" variation="plain" icon="action-arrow-right-small" icon-right icon-size="small" padding="none">Tutustu</duet-button>
</duet-card>
<duet-card url="#" image="https://www.duetds.com/assets/img/templates/card10.jpg">
<duet-heading level="h2" visual-level="h4">Venevakuutus</duet-heading>
<duet-paragraph margin="none">
Venevakuutus turvaa veneesi sekä vesillä että talviteloilla.
</duet-paragraph>
<duet-button tabindex="-1" variation="plain" icon="action-arrow-right-small" icon-right icon-size="small" padding="none">Tutustu</duet-button>
</duet-card>
<duet-spacer direction="vertical" size="xxx-large"></duet-spacer>
<duet-spacer direction="vertical" size="xxx-large"></duet-spacer>
<duet-spacer direction="vertical" size="x-large"></duet-spacer>
</main>
<nav>
<duet-grid alignment="center" distribution="space-between">
<a href="#" class="active duet-radius-circle duet-background-primary duet-color-gray-lightest">
<duet-icon name="damage-home" color="currentColor" size="small" margin="none"></duet-icon>
<duet-visually-hidden>Etusivu</duet-visually-hidden>
</a>
<a href="#">
<duet-icon color="secondary" name="form-file" size="medium" margin="none"></duet-icon>
<duet-visually-hidden>Tiedostot</duet-visually-hidden>
</a>
<a href="#">
<duet-icon color="secondary" name="messaging-contact" size="medium" margin="none"></duet-icon>
<duet-visually-hidden>Yhteystiedot</duet-visually-hidden>
</a>
<a href="#">
<duet-icon color="secondary" name="profile-icon" size="medium" margin="none"></duet-icon>
<duet-visually-hidden>Omat tiedot</duet-visually-hidden>
</a>
</duet-grid>
</nav>
</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
Building Layouts
TutorialsUsing CLI Tools
TutorialsCreating Custom Patterns
TutorialsServer Side Rendering
TutorialsSharing Prototypes
TutorialsUsage With Markdown
Troubleshooting
If you experience any issues while using a template, please head over to the Support page for more guidelines and help.