-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path+page.svelte
More file actions
193 lines (176 loc) · 5.95 KB
/
Copy path+page.svelte
File metadata and controls
193 lines (176 loc) · 5.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<script>
import { _, locale } from 'svelte-i18n'
import Tabs from '$lib/components/Tabs.svelte'
import SEO from '$lib/components/SEO.svelte'
// import { fade } from 'svelte/transition'
import { Tween } from 'svelte/motion'
import { cubicOut } from 'svelte/easing'
import tbLogo from '$lib/assets/images/tb_logo.svg'
import olLogo from '$lib/assets/images/ol_logo.svg'
import composeImg from '$lib/assets/images/compose.svg'
let tabItems = [
{ item: 'Thunderbird', logo: tbLogo },
{ item: 'Outlook', logo: olLogo },
]
const addonsJsonLd = {
'@context': 'https://schema.org',
'@graph': [
{
'@type': 'BreadcrumbList',
itemListElement: [
{
'@type': 'ListItem',
position: 1,
name: 'Home',
item: 'https://postguard.eu',
},
{
'@type': 'ListItem',
position: 2,
name: 'Addons',
item: 'https://postguard.eu/addons',
},
],
},
{
'@type': 'SoftwareApplication',
name: 'PostGuard for Thunderbird',
description:
'End-to-end encrypted email directly from Thunderbird using identity-based encryption and Yivi.',
applicationCategory: 'CommunicationApplication',
operatingSystem: 'Windows, macOS, Linux',
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'EUR',
},
url: 'https://postguard.eu/addons',
softwareRequirements: 'Mozilla Thunderbird, Yivi app',
author: {
'@type': 'Organization',
name: 'PostGuard',
url: 'https://postguard.eu',
},
},
{
'@type': 'SoftwareApplication',
name: 'PostGuard for Outlook',
description:
'End-to-end encrypted email directly from Microsoft Outlook using identity-based encryption and Yivi.',
applicationCategory: 'CommunicationApplication',
operatingSystem: 'Windows',
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'EUR',
},
url: 'https://postguard.eu/addons',
softwareRequirements: 'Microsoft Outlook, Yivi app',
author: {
'@type': 'Organization',
name: 'PostGuard',
url: 'https://postguard.eu',
},
},
],
}
let activeItem = $state('Thunderbird')
let containerWidth = $state()
const tween = new Tween(0, { delay: 150, duration: 500, easing: cubicOut })
let height = $derived(
(containerWidth > 800 ? 400 : 500) +
tween.current * (containerWidth > 800 ? 150 : 200)
)
const triggerTabChange = (event) => {
activeItem = event.detail
tween.set(activeItem === 'Thunderbird' ? 0 : 1)
}
</script>
<SEO
title="PostGuard Addons"
description="Install PostGuard for Thunderbird or Outlook to send and receive end-to-end encrypted emails directly from your mail client."
jsonLd={addonsJsonLd}
/>
<div class="page-wrapper">
<div class="grid-container" bind:clientWidth={containerWidth}>
<div class="grid-item header">
<h2><span>{$_('addons.title')}</span></h2>
<p>{$_('addons.par')}</p>
<img
src={composeImg}
class="image invert"
alt=""
aria-hidden="true"
/>
</div>
<div class="grid-item instruction" style="min-height: {height}px">
<h2>{$_('addons.instruction.header')}</h2>
<p>{$_('addons.instruction.download')}</p>
<Tabs {tabItems} {activeItem} on:tabChange={triggerTabChange} />
{#if activeItem}
{#key `${activeItem}-${$locale}`}
{#if activeItem === 'Outlook'}
<div class="callout" role="note">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html $_('addons.outlookWarning')}
</div>
{/if}
<div id="client-instruction">
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html $_(`addons.${activeItem}`)}
</div>
{/key}
{/if}
</div>
</div>
</div>
<style lang="scss">
.page-wrapper {
flex: 1;
min-height: 0;
overflow-y: auto;
display: flex;
justify-content: center;
padding: 1.5rem 1rem;
}
img {
width: 90%;
margin-top: auto;
}
.grid-item {
height: 100%;
display: flex;
flex-direction: column;
}
.grid-container {
display: grid;
grid-template-columns: repeat(2, minmax(0, 550px));
height: fit-content;
align-items: start;
margin: auto;
}
@media only screen and (max-width: 800px) {
.grid-container {
grid-template-columns: 1fr;
}
}
.instruction {
height: 100%;
border: 1px dashed black;
border-radius: 8px;
padding: 20px;
h2 {
margin-top: 0;
}
}
.callout {
background: #fff7e0;
border: 1px solid #e8d28f;
padding: 0.75rem 1rem;
margin: 0.75rem 0 1rem;
border-radius: 4px;
font-size: 0.95em;
line-height: 1.4;
color: #5a3f00;
}
</style>