-
Notifications
You must be signed in to change notification settings - Fork 0
/
resume.html
38 lines (37 loc) · 1.55 KB
/
resume.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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" style="width:100%; height:100%;">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="shortcut icon" type="image/x-icon" href="contents/favicon.ico">
</head>
<body id="iframeContainer" style="height: 100%; width: 100%; overflow: hidden; margin:0px;">
<script>
function detectMobile() {
var detected = false
if (navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
|| navigator.userAgent.match(/iPod/i)
|| navigator.userAgent.match(/BlackBerry/i)
|| navigator.userAgent.match(/Windows Phone/i)) {
detected = true ;
} else {
detected = false ;
}
return detected
}
let mobileDetected = detectMobile()
if(mobileDetected) {
var iframe = `<meta http-equiv="refresh" content="0; URL=https://jaredbrogan.github.io/contents/Jared%20Brogan%20-%20Resume.pdf" />`;
$(`#iframeContainer`).html(iframe)
console.log('Detected mobile browser')
} else {
var iframe = `<link type="text/css" rel="stylesheet" href="/css/resume.css" /><iframe src="/contents/Jared Brogan - Resume.pdf" width="100%" height="100%" frameBorder="0"></iframe>`;
$(`#iframeContainer`).html(iframe)
console.log('Detected desktop browser')
}
</script>
</body>
</html>