-
Notifications
You must be signed in to change notification settings - Fork 0
/
element.html
148 lines (142 loc) · 6.36 KB
/
element.html
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
<!doctype html>
<html lang="fr-FR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name='robots' content='noindex, nofollow'>
<title>Atelier des Medias - Element</title>
<meta name="description" content="Liens vers les sites, réseaux sociaux et outils de l'ADM">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0d2f39">
<meta name="apple-mobile-web-app-title" content="ADM">
<meta name="application-name" content="ADM">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="theme-color" content="#ffffff">
<script src="https://kit.fontawesome.com/ac5688d412.js" crossorigin="anonymous"></script>
<script src="https://cdn.tailwindcss.com"></script>
<style type="text/tailwindcss">
@layer components {
.btn {
@apply border-2 border-emerald-500 text-emerald-500 hover:bg-emerald-500 hover:text-white rounded-full py-2 w-48;
}
}
</style>
<style type="text/css">
body {
background-color: #ffffff;
background: linear-gradient(135deg, #fcfcff55 25%, transparent 25%) -11px 0/ 22px 22px, linear-gradient(225deg, #fcfcff 25%, transparent 25%) -11px 0/ 22px 22px, linear-gradient(315deg, #fcfcff55 25%, transparent 25%) 0px 0/ 22px 22px, linear-gradient(45deg, #fcfcff 25%, #ffffff 25%) 0px 0/ 22px 22px;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
// try to launch app
setTimeout(() => {
window.location = 'element://room';
}, 100);
// handle copying of server URL
const copy = document.getElementById('copy');
copy.addEventListener("click", function(event) {
var copyText = document.getElementById("server");
copyText.select();
copyText.setSelectionRange(0, 99999); /* For mobile devices */
navigator.clipboard.writeText(copyText.value);
});
// Detects if device is on Mac
const isMac = () => {
const userAgent = window.navigator.userAgent.toLowerCase();
return /macintosh|macos|mac os/.test( userAgent );
}
// Detects if device is on Windows
const isWindows = () => {
const userAgent = window.navigator.userAgent.toLowerCase();
return /win/.test( userAgent );
}
// Detects if device is on Linux
const isLinux = () => {
const userAgent = window.navigator.userAgent.toLowerCase();
return /linux/.test( userAgent );
}
// Detects if device is on Android
const isAndroid = () => {
const userAgent = window.navigator.userAgent.toLowerCase();
return /android|silk/.test( userAgent );
}
// Detects if device is on iOS
const isIos = () => {
const userAgent = window.navigator.userAgent.toLowerCase();
return /iphone|ipad|ipod/.test( userAgent );
}
let sysclass = '.hidden';
if (isIos()) {
sysclass = '.ios';
} else if (isMac()) {
sysclass = '.mac';
} else if (isAndroid()) {
sysclass = '.android';
} else if (isLinux()) {
sysclass = '.linux';
} else if (isWindows()) {
sysclass = '.windows';
}
document.querySelectorAll(sysclass).forEach((el) => {
el.classList.remove('hidden');
})
});
</script>
</head>
<body class="m-4">
<div class="mx-auto max-w-lg">
<h1 class="text-center text-lg font-bold mb-4">
Télécharger Element si l'application n'est pas installée
</h1>
<div class="text-center flex flex-col gap-4">
<a href="https://apps.apple.com/app/vector/id1083446067" target="_blank" class="mac self-center hidden">
<img src="macappstore.svg" width="188">
</a>
<a href="https://apps.apple.com/app/vector/id1083446067" target="_blank" class="ios self-center hidden">
<img src="appstore.svg" width="152">
</a>
<a href="https://play.google.com/store/apps/details?id=im.vector.app" target="_blank" class="android self-center hidden">
<img src="playstore.svg" width="162">
</a>
<a href="https://packages.riot.im/desktop/install/macos/Element.dmg" target="_blank" class="mac self-center btn hidden">
<i class="fa-brands fa-apple"></i> Mac
</a>
<a href="https://packages.riot.im/desktop/install/win32/x64/Element%20Setup.exe" target="_blank" class="windows self-center btn hidden">
<i class="fa-brands fa-windows"></i> Windows (64 bit)
</a>
<a href="https://element.io/get-started#linux-details" target="_blank" class="linux self-center btn hidden">
<i class="fa-brands fa-linux"></i> Linux
</a>
<noscript>
<a href="https://element.io/get-started#download" target="_blank" class="self-center btn">
Télécharger Element
</a>
</noscript>
</div>
<h1 class="text-center text-lg font-bold mt-8 mb-4">
Configuration du serveur de l'Atelier des Médias
</h1>
<p class="text-center my-2">
Après avoir lancé Element, cliquer sur "Modifier" puis saisir l'adresse suivante dans "Autre serveur d'accueil" :
</p>
<p class="text-center">
<input type="text" id="server" value="matrix.atelier-medias.org" class="border px-2 py-1 text-center w-52">
<i class="fa-solid fa-copy ml-1 cursor-pointer text-emerald-500 font-bold" id="copy" title="Copier"></i>
</p>
<div class="text-center flex flex-col my-4">
<a href="element://room" target="_blank" class="self-center btn">
Lancer Element
</a>
</div>
<p class="text-center">
<a href="/" class="text-emerald-500">
Retour
</a>
</p>
</div>
</body>
</html>