-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
156 lines (130 loc) · 7.15 KB
/
index.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
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html>
<head>
<title>Graphviser</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<link rel="shortcut icon" type="image/png" href="./images/Icon@4x.png"/>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="./style/style.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XF9DSXG0EL"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XF9DSXG0EL');
</script>
<!-- HTML Meta Tags -->
<meta name="description" content="Egy interaktív és modern gráf elmélet oktató alkalmazáscsomag, rajzolással, algoritmus futtatással és tanuló oldallal.">
<!-- Google / Search Engine Tags -->
<meta itemprop="name" content="Graphviser">
<meta itemprop="description" content="Egy interaktív és modern gráf elmélet oktató alkalmazáscsomag, rajzolással, algoritmus futtatással és tanuló oldallal.">
<meta itemprop="image" content="https://user-images.githubusercontent.com/54114237/88288175-10913c80-ccfc-11ea-8ac7-78b9b6c1ada1.png">
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://graphviser.app">
<meta property="og:type" content="website">
<meta property="og:title" content="Graphviser">
<meta property="og:description" content="Egy interaktív és modern gráf elmélet oktató alkalmazáscsomag, rajzolással, algoritmus futtatással és tanuló oldallal.">
<meta property="og:image" content="https://user-images.githubusercontent.com/54114237/88288175-10913c80-ccfc-11ea-8ac7-78b9b6c1ada1.png">
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Graphviser">
<meta name="twitter:description" content="Egy interaktív és modern gráf elmélet oktató alkalmazáscsomag, rajzolással, algoritmus futtatással és tanuló oldallal.">
<meta name="twitter:image" content="https://user-images.githubusercontent.com/54114237/88288175-10913c80-ccfc-11ea-8ac7-78b9b6c1ada1.png">
<!-- Meta Tags Generated via http://heymeta.com -->
</head>
<body>
<canvas id="canvas"></canvas>
<div id="content">
<div style="text-align: right;">
<a id="hu-link"><img class="flag" src="./images/hu_flag.png"></a>
<a id="ro-link"><img class="flag" src="./images/ro_flag.png"></a>
</div>
<img src="./images/logo@10x.png" class="img-fluid">
<h1 id="header-text">
</h1>
<div class="card" style="width: 18rem;">
<img class="card-img-top" src="./images/app.png" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Graphviser app</h5>
<p class="card-text" id="app-text"></p>
<a class="btn btn-primary" id="app-button"></a>
</div>
</div>
<div class="card" style="width: 18rem;">
<img class="card-img-top" src="./images/learn.png" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Graphviser learn</h5>
<p class="card-text" id="learn-text"></p>
<a class="btn btn-primary" id="learn-button"></a>
</div>
</div>
<div class="card" style="width: 18rem;">
<img class="card-img-top" src="./images/docs.png" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Graphviser docs</h5>
<p class="card-text" id="docs-text"></p>
<a class="btn btn-primary" id="docs-button"></a>
</div>
</div>
<br>
</div>
</body>
<script>
/**
* This function returns the value of the given parameter
* @param {String} name the name of the parameter to read
*/
function urlParam(name){
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
if (results==null) {
var searchParams = new URLSearchParams(window.location.search)
searchParams.set("locale", "hu");
var newRelativePathQuery = window.location.pathname + '?' + searchParams.toString();
history.pushState(null, '', newRelativePathQuery);
return "hu";
}
return decodeURI(results[1]) || 0;
}
let locale = urlParam("locale");
if(locale == "ro"){
//h1
document.getElementById("header-text").innerHTML = "O suită de aplicații interactive și moderne de predare a teoriei grafurilor"
//App
document.getElementById("app-text").innerHTML = "O aplicație de vizualizare a algoritmilor teoriei grafurilor.";
document.getElementById("app-button").innerHTML = "Pornește aplicația";
//Learn
document.getElementById("learn-text").innerHTML = "O pagină cu toate informațiile despre teoria grafurilor și quiz-uri ajutătoare.";
document.getElementById("learn-button").innerHTML = "Începe să înveți";
//Docs
document.getElementById("docs-text").innerHTML = "Documentația applicației de vizualizare.";
document.getElementById("docs-button").innerHTML = "Citește documentația";
}
else if(locale == "hu"){
//h1
document.getElementById("header-text").innerHTML = "Egy interaktív és modern gráf elmélet oktató alkalmazáscsomag"
//App
document.getElementById("app-text").innerHTML = "Egy alkalmazás, amely a gráf elmélet algoritmusait vizualizálja.";
document.getElementById("app-button").innerHTML = "Az alkalmazás indítása";
//Learn
document.getElementById("learn-text").innerHTML = "Egy oldal, amely gráf elmélet tananyagot tartalmaz, segítő kvízekkel.";
document.getElementById("learn-button").innerHTML = "Kezdj el tanulni";
//Docs
document.getElementById("docs-text").innerHTML = "A vizualizáló applikáció dokumentációja.";
document.getElementById("docs-button").innerHTML = "Olvass bele a dokumentációba";
}
//Button links
document.getElementById("app-button").href = "https://app."+window.location.hostname+"?locale="+locale;
document.getElementById("learn-button").href = "https://learn."+window.location.hostname+"?locale="+locale;
document.getElementById("docs-button").href = "https://docs."+window.location.hostname+"?locale="+locale;
//Flag hiding
document.getElementById(locale+"-link").style.display = "none";
//Flag links
let url = window.location.href;
document.getElementById("hu-link").href = url.replace("locale="+locale,"locale=hu");
document.getElementById("ro-link").href = url.replace("locale="+locale,"locale=ro");
</script>
<script src="./scripts/particles.js"></script>
</html>