Server Side Rendered
Ready
This template shows an example of server side rendered components that use the LocalTapiola theme. Please note that you need to separately render components for each theme.
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-bg-gradient 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="/components/duet.esm.js"></script>
<script nomodule src="/components/duet.js"></script>
</head>
<body>
<duet-header
language="fi"
skip-to-id="#content"
contact="Ota yhteyttä"
current-href="/vakuutukset/"
items='[
{ "label": "Etusivu","href": "/work/duet-design-system/" },
{ "label": "Vakuutukset", "href": "/work/duet-design-system/vakuutukset/" },
{ "label": "Vahinkoasiat", "href": "#" },
{ "label": "Säästöt ja sijoitukset", "href": "#" },
{ "label": "Laskut", "href": "#", "badge": "true" },
{ "label": "Viestit", "href": "#" }
]'
language-items='[
{ "label": "Suomeksi", "country": "fi", "href": "/work/duet-design-system/?lang=fi" },
{ "label": "På Svenska", "country": "sv", "href": "/work/duet-design-system/?lang=sv" },
{ "label": "In English", "country": "en", "href": "/work/duet-design-system/?lang=en" }
]'
contact-items='[
{ "label": "Lähetä viesti", "href": "/work/duet-design-system/viestit/laheta" },
{ "label": "Avaa chat", "href": "/work/duet-design-system/chat/" },
{ "label": "Yhteystiedot", "href": "/work/duet-design-system/yhteystiedot/" }
]'
session='{ "label": "Kirjaudu ulos", "href": "/work/duet-design-system/?logout", "type": "logout" }'
user='{ "label": "Elina", "href": "/work/duet-design-system/?userId=elina" }'>
</duet-header>
<duet-layout id="content" margin="none">
<div slot="main">
<duet-grid alignment="center" direction="vertical">
<duet-grid-item max-width="920px">
<duet-grid alignment="center" direction="vertical">
<duet-grid-item margin="none" max-width="600px" class="duet-text-center">
<duet-card variation="plain" padding="x-small">
<duet-spacer breakpoint="x-small" size="xx-large"></duet-spacer>
<duet-spacer breakpoint="small" size="xxx-large"></duet-spacer>
<duet-spacer breakpoint="large" size="large"></duet-spacer>
<duet-icon margin="none" name="messaging-action-success" theme="default" size="xxx-large">
</duet-icon>
<duet-spacer size="large"></duet-spacer>
<duet-heading level="h1">Kiitos käyttäjä!</duet-heading>
<duet-paragraph variation="intro">
Tämä teksti on luotu Paragraph komponentin intro-tyylillä. Intro-tyyli sopii
esimerkiksi ingresseihin.
</duet-paragraph>
</duet-card>
</duet-grid-item>
</duet-grid>
<duet-card padding="large">
<duet-grid responsive distribution="space-between" alignment="top" mobile="center">
<duet-spacer breakpoint="x-small" direction="vertical" size="large"></duet-spacer>
<duet-icon name="action-buy-insurance" theme="default" size="xx-large"></duet-icon>
<duet-spacer breakpoint="small" size="large" direction="horizontal"></duet-spacer>
<duet-grid responsive breakpoint="medium" mobile="center">
<duet-grid-item margin="none" fill>
<duet-heading level="h2" visual-level="h3">Vakuutuksesi tiedot</duet-heading>
<duet-paragraph>
Näet uuden vakuutuksen tiedot täällä verkkopalvelussamme heti ja lasku on
verkossa huomenna. Ensimmäisen laskun eräpäivään on aikaa noin kuukausi.
Saat myös kaikki asiakirjat kotiisi postitse.
</duet-paragraph>
</duet-grid-item>
</duet-grid>
</duet-grid>
</duet-card>
<duet-card padding="large">
<duet-grid responsive distribution="space-between" alignment="top" mobile="center">
<duet-spacer breakpoint="x-small" direction="vertical" size="large"></duet-spacer>
<duet-icon name="category-pet" theme="default" size="xx-large"></duet-icon>
<duet-spacer breakpoint="small" size="large" direction="horizontal"></duet-spacer>
<duet-grid responsive breakpoint="medium" mobile="center">
<duet-grid-item margin="none" fill>
<duet-heading level="h2" visual-level="h3">Lemmikkihelppi</duet-heading>
<duet-paragraph>
Eläinlääkäriin yhden tassun kosketuksella 24/7. Tutustu palveluun ja
lataa LemmikkiHelppi puhelimeesi App Storesta tai Google Playsta.
</duet-paragraph>
</duet-grid-item>
<duet-grid-item margin="none">
<duet-grid mobile="center">
<duet-spacer breakpoint="medium" direction="horizontal" size="xxxx-large">
</duet-spacer>
<duet-button fixed wrapping="none" margin="none" variation="primary">
Tutustu palveluun
</duet-button>
</duet-grid>
<duet-spacer breakpoint="x-small" direction="vertical" size="large">
</duet-spacer>
</duet-grid-item>
</duet-grid>
</duet-grid>
</duet-card>
<duet-card padding="large">
<duet-grid responsive distribution="space-between" alignment="top" mobile="center">
<duet-spacer breakpoint="x-small" direction="vertical" size="large"></duet-spacer>
<duet-icon name="messaging-laptop"theme="default" size="xx-large"></duet-icon>
<duet-spacer breakpoint="small" size="large" direction="horizontal"></duet-spacer>
<duet-grid responsive breakpoint="medium" mobile="center">
<duet-grid-item margin="none" fill>
<duet-heading level="h2" visual-level="h3">
Ota käyttöön paperiton palvelu
</duet-heading>
<duet-paragraph>
Säästä luontoa ja pienennä hiilijalanjälkeäsi.
<duet-link url="#">Lue lisää paperittomuudesta täältä</duet-link>.
</duet-paragraph>
</duet-grid-item>
<duet-grid-item margin="none">
<duet-grid mobile="center">
<duet-spacer breakpoint="medium" direction="horizontal" size="xxxx-large"></duet-spacer>
<duet-button fixed wrapping="none" margin="none" variation="primary">Ota käyttöön</duet-button>
</duet-grid>
<duet-spacer breakpoint="x-small" direction="vertical" size="large"></duet-spacer>
</duet-grid-item>
</duet-grid>
</duet-grid>
</duet-card>
<duet-card padding="large" variation="info">
<duet-grid distribution="center">
<duet-grid-cell fill>
<duet-spacer size="xx-large"></duet-spacer>
<duet-heading margin="none">TBD</duet-heading>
<duet-spacer size="xx-large"></duet-spacer>
</duet-grid-cell>
</duet-grid>
</duet-card>
<duet-spacer breakpoint="small" size="xxx-large"></duet-spacer>
</duet-grid-item>
</duet-grid>
</div>
</duet-layout>
<duet-footer
logo-href="#"
language="fi"
items='[
{ "label": "Hae korvausta", "href": "#", "icon": "navigation-make-claim" },
{ "label": "Osta vakuutus", "href": "#", "icon": "action-buy-insurance" },
{ "label": "Yhteystiedot", "href": "#", "icon": "form-tel" }
]'
menu='[
{ "label": "Turvallisuus ja käyttöehdot", "href": "#" },
{ "label": "Evästeet", "href": "#" },
{ "label": "Henkilötietojen käsittely", "href": "#" }
]'>
</duet-footer>
<script>
// Save references to components we want to adjust below
var header = document.querySelector("duet-header")
// Listen for change events inside the header component
header.addEventListener("duetChange", function(ev) {
var event = ev.detail.originalEvent
var data = ev.detail.data
if (data.href !== "#content") {
event.preventDefault()
}
})
</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
TutorialsBuilding Layouts
TutorialsUsing CLI Tools
TutorialsCreating Custom Patterns
TutorialsServer Side Rendering
TutorialsSharing Prototypes
TutorialsVS Code
TutorialsZeplin
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.