-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
106 lines (92 loc) · 3.16 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TM 4Soul</title>
<meta content="width=device-width, initial-scale=1" name="viewport">
<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css"
rel="stylesheet">
<link href="main.css" rel="stylesheet">
</head>
<body>
<!-- React entrypoint-->
<div id="app"></div>
<!-- Bootstrap Script-->
<script crossorigin="anonymous"
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
<!-- React Script -->
<script type="text/babel">
class App extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<>
<Navbar/>
<Body/>
<Footer/>
</>
)
}
}
const Navbar = () => {
return (
<nav className="navbar sticky-top navbar-light bg-light justify-content-center">
<span className="navbar-text px-4">
Site under construction...
</span>
</nav>
)
}
const Body = () => {
return (
<div className="container py-4">
<img src="assets/img/logo_tm4soul.jpg" width="100%" alt="Logo TM 4Soul"/>
</div>
)
}
class Footer extends React.Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this)
}
decode(a) {
return a.replace(/[a-zA-Z]/g, function (c) {
return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13)
? c : c - 26);
})
}
handleClick() {
const decodedString = this.decode("znvygb:vasb@gz4fbhy.pu");
const emailElement = document.getElementById("email")
emailElement.innerHTML = decodedString.substring(7)
emailElement.setAttribute("href", decodedString);
emailElement.setAttribute("onclick", "");
}
render() {
return (
<footer>
<p>TM 4Soul </p>
<p>Tania & Michel Villard </p>
<p>Strassacher 316 </p>
<p>3176 Neuenegg </p>
<br/>
<p>Tania 079 301 99 14 </p>
<p>Michel 079 285 34 09 </p>
<br/>
<p><a href="" id="email" onClick={this.handleClick}>Email: please click here</a></p>
</footer>
)
}
}
ReactDOM.render(
<App/>, document.getElementById('app')
)
</script>
</body>
</html>