-
Notifications
You must be signed in to change notification settings - Fork 0
/
offline.html
154 lines (113 loc) · 5.41 KB
/
offline.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
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<link rel="manifest" href="manifest.json">
<link rel="shortcut icon" href="icons/favicon.ico" type="image/x-icon">
<link rel="icon" href="icons/favicon.ico" type="image/x-icon">
<!-- iOS meta tags and icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Connect Peeople">
<link rel="apple-touch-icon" href="icons/152.png">
<meta name="description" content="App para conectar pessoas da TI">
<meta name="theme-color" content="#b0029f" />
<title>Connect Peeople - App</title>
</head>
<body>
<!-- Detalhamento do Card-->
<!-- Modal -->
<div class="modal fade" id="fullProfile" tabindex="-1" aria-labelledby="fullProfile" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="fullProfile_Title">---</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="fullProfile_Body">
<h5>Letra:</h5>
<span id="fullProfile_Experiencia"></span>
</div>
</div>
</div>
</div>
<header class="container-fluid fixed-top">
<img src="imgs/logo1.png" class="logo">
</header>
<main class="container">
<div class="row">
<div class="col-12">
<div class="alert alert-warning" role="alert" style="min-height: 90px;">
<img src="imgs/offline.png" width="64" style="float: left; margin-right: 5px;">
Você está acessando a versão offline do app. Conecte a internet para atualizar os conteúdos.
</div>
</div>
</div>
<div id="content">
<div class="row">
<div class="col-12" style="text-align: center; margin-top: 20px;" >
<img src="imgs/loading.gif" width="128">
</div>
</div>
</div>
</main>
<footer class="container-fluid fixed-bottom">
</footer>
<script src="js/bootstrap.bundle.min.js"></script>
<script>
//Carregar dados dinâmicos (AJAX)
var ajax = new XMLHttpRequest();
ajax.open("GET", "./dados.json", true);
ajax.send();
ajax.onreadystatechange = function(){
var content = document.getElementById("content");
if(ajax.readyState == 4 && ajax.status == 200){
var data_json = JSON.parse(ajax.responseText);
if(data_json.length == 0){
content.innerHTML = '<div class="alert alert-warning" role="alert">Nenhum curriculo cadastrado.</div>';
}else{
var html_content = "";
for(var i = 0; i <data_json.length; i++){
html_content += '<div class="row title_cat"><div class="col-12"><h2>'+data_json[i].cargo+'</h2></div></div><div class="row">';
if(data_json[i].bandas.length == 0){
html_content += '<div class="col-12"><div class="alert alert-warning" role="alert">Nenhum curriculo cadastrado para este cargo.</div></div>';
}else{
for(var j = 0; j < data_json[i].bandas.length; j++){
var artista = data_json[i].bandas[j];
html_content += card_pessoa(artista.nome,artista.foto,artista.titulo,artista.video,artista.letra);
}
}
html_content +="</div>";
}
content.innerHTML = html_content;
}
}
}
var card_pessoa = function(nome, imagem, posicao, url_linkedin, experiencia){
return '<div class="col-md-4">'+
'<div class="card">'+
'<img src="'+imagem+'" class="img_profile">'+
'<h5 class="card-header">'+nome+'</h5>'+
'<div class="card-body" style="text-align: center;">'+
'<h5 class="card-title">'+posicao+'</h5>'+
'<p class="card-text">Largo conhecimento técnico e liderança.</p>'+
'<a href="#" onClick="javascript:dadosModal(\''+nome+'\', \''+experiencia+'\');" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#fullProfile">Sobre</a> '+
'</div>'+
'</div>'+
'</div>';
}
var dadosModal = function(nome, experiencia, formacao, habilidades){
console.log(nome);
document.getElementById('fullProfile_Title').innerHTML = nome;
document.getElementById('fullProfile_Experiencia').innerHTML = experiencia;
document.getElementById('fullProfile_Formacao').innerHTML = formacao;
document.getElementById('fullProfile_Habilidade').innerHTML = habilidades;
}
</script>
</body>
</html>