/
index.html
131 lines (105 loc) · 3.98 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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BTree Links</title>
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="icon" type="image/png" href="assets/logo.png">
</head>
<body class="background-svg">
<img class="bicon" src="assets/logo.svg" alt="Logo bTree">
<p class="btree">
bTree
</p>
<div id="social"></div>
<div id="links"></div>
<script>
const data = [
{
"Nome": "PlanejaConta",
"url": "https://planejaconta.web.app",
"url_image": "assets/icon-planejaconta.svg"
},
{
"Nome": "bTree Auth",
"url": "https://btreeauth.web.app/",
"url_image": "assets/icon-bauth.svg"
},
{
"Nome": "Pine UI",
"url": "https://www.behance.net/gallery/161882269/Design-System-Pine-UI-v1-bTree",
"url_image": "assets/icon-pineui.svg"
},
{
"Nome": "bTree Theme Vscode",
"url": "https://marketplace.visualstudio.com/items?itemName=bTree.btheme",
"url_image": "assets/icon-vscode.svg"
}
]
const social_data = [
{
"url": "https://btreedevs.site",
"url_image": "assets/icon-web.svg"
},
{
"url": "https://www.instagram.com/btreedev/",
"url_image": "assets/icon-instagram.svg"
},
{
"url": "https://www.threads.net/@btreedev",
"url_image": "assets/icon-threads.svg"
},
{
"url": "https://github.com/BtreeDevelopers",
"url_image": "assets/icon-github.svg"
}
]
const links = document.getElementById('links');
data.forEach((value) => {
const link = document.createElement('a');
link.classList.add('card');
link.setAttribute('href', value.url);
link.setAttribute('target', '_blank');
const card = document.createElement('div');
card.classList.add('link');
const imagem = document.createElement('img');
imagem.classList.add('image');
imagem.src = value.url_image;
const titleSubtitleWrapper = document.createElement('div');
titleSubtitleWrapper.classList.add('titleSubtitle')
const title = document.createElement('h4');
title.classList.add('title');
title.innerHTML = value.Nome;
titleSubtitleWrapper.appendChild(title);
const subtitle = document.createElement('p');
subtitle.classList.add('subtitle');
subtitle.innerHTML = value.url;
if (subtitle.innerHTML.length > 30) {
subtitle.innerHTML = subtitle.innerHTML.substring(0, 30) + '...';
}
titleSubtitleWrapper.appendChild(subtitle);
const icon = document.createElement('img');
icon.classList.add('icon');
icon.src = 'assets/icon-ext.svg';
link.appendChild(imagem);
link.appendChild(titleSubtitleWrapper);
link.appendChild(icon);
card.appendChild(link);
links.appendChild(card);
});
const social = document.getElementById('social')
social_data.forEach((v)=>{
const link = document.createElement('a');
link.classList.add('cardsocial');
link.setAttribute('href', v.url);
link.setAttribute('target', '_blank');
const imagem = document.createElement('img');
imagem.classList.add('imagesocial');
imagem.src = v.url_image;
link.appendChild(imagem);
social.appendChild(link)
})
</script>
</body>
</html>