-
Notifications
You must be signed in to change notification settings - Fork 0
/
catalog.html
116 lines (104 loc) · 3.44 KB
/
catalog.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
<!DOCTYPE html>
<html lang="pt">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<title>Brindigrafica</title>
<meta name="description" content="Ao seu dispor desde 1989">
<link rel="icon" type="image/png" href="images/favicon.png"/>
<link rel="stylesheet" href="css/main.css" />
<noscript><link rel="stylesheet" href="css/noscript.css" /></noscript>
</head>
<body class="is-preload">
<div id="wrapper">
<header id="header">
<div class="inner">
<a href="/" class="logo">
<span class="symbol"><img src="images/logo.svg" alt="" />
</a>
<!-- Nav -->
<nav>
<ul>
<li><a href="#menu">Menu</a></li>
</ul>
</nav>
</div>
</header>
<!-- Menu -->
<nav id="menu">
<h2>Menu</h2>
<ul>
<li><a href="index.html">Inicio</a></li>
<!-- <li><a href="about.html">Sobre nós</a></li> -->
</ul>
</nav>
<div id="main">
<div class="inner">
<object id="pdf-viewer" type="application/pdf" style="width: 100%;height: 52em;">
</object>
</div>
</div>
<!-- Footer -->
<footer id="footer">
<div class="inner">
<section>
<h2>Contacta-nos</h2>
<form method="post" action="#" id="contact">
<div class="fields">
<div class="field half">
<input type="text" name="name" id="name" placeholder="Nome" />
</div>
<div class="field half">
<input type="email" name="email" id="email" placeholder="Email" />
</div>
<div class="field">
<textarea name="message" id="message" placeholder="Mensagem"></textarea>
</div>
</div>
<ul class="actions">
<li><input type="submit" value="Enviar" class="primary" /></li>
</ul>
</form>
</section>
<section>
<h2>Segue-nos</h2>
<ul class="icons">
<li><a href="https://www.facebook.com/Brindigrafica" class="icon brands style2 fa-facebook-f" target="_blank"><span class="label">Facebook</span></a></li>
<li><a href="https://www.instagram.com/brindigrafica/" class="icon brands style2 fa-instagram" target="_blank"><span class="label">Instagram</span></a></li>
<li><a href="tel:00351966002995" class="icon solid style2 fa-phone"><span class="label">Telefone</span></a></li>
<li><a href="mailto:[email protected]?subject=Contacto pelo site" class="icon solid style2 fa-envelope" target="_blank"><span class="label">Email</span></a></li>
</ul>
</section>
<ul class="copyright">
<li>© Brindigrafica. Todos os direitos reservados.</li>
</ul>
</div>
</footer>
</div>
<!-- Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/browser.min.js"></script>
<script src="js/breakpoints.min.js"></script>
<script src="js/util.js"></script>
<script src="js/main.js"></script>
<script>
function loadCatalog() {
const search = window.location.search
const regex = /(?:pdf=)([a-z]+)/
const results = regex.exec(search)
console.log('results from regexp ', results)
if (results.length < 2) {
console.log('catalog not found')
}
const catalog = results[1]
const BASE_URL = "https://storage.googleapis.com/storage.brindigrafica.pt/catalogs/"
var pdfViewer = document.getElementById('pdf-viewer')
console.log('found pdf viewer', pdfViewer)
const url = BASE_URL + catalog + '.pdf'
pdfViewer.setAttribute('data', url)
console.log('loading catalog', url)
}
loadCatalog()
</script>
</body>
</html>