-
Notifications
You must be signed in to change notification settings - Fork 0
/
portfolio.html
103 lines (87 loc) · 4.53 KB
/
portfolio.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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Portfolio - Juho Tikkanen</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Juho's Portfolio">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/style.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.3.0/handlebars.min.js"></script>
<!-- Google Analytics
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-58210777-1', 'auto');
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script>-->
</head>
<body>
<header>
<img class="profile-picture" src="img/juho.jpg" alt="Photo of Juho Tikkanen" width="90" height="90">
<h1>Juho Tikkanen</h1>
<p>Marketing Specialist at Icebug and PowerBar Finland. Graphic Designer and Web Developer. Loves problem-solving, simplicity and giving the best shots. Tech & techno lover.</p>
</header>
<div id="portfolio" class="portfolio-area">
<script id="portfolio-template" type="text/x-handlebars-template">
{{#each projects}}
<a href="{{this.url}}">
<figure class="portfolio-item" data-project-id="{{this.id}}">
{{#if this.covers.[404]}}
<img class="portfolio-image" src="{{this.covers.[404]}}" alt="{{this.name}}">
{{else}}
{{#if this.covers.[230]}}
<img class="portfolio-image" src="{{this.covers.[230]}}" alt="{{this.name}}">
{{else}}
<img class="portfolio-image" src="{{this.covers.[202]}}" alt="{{this.name}}">
{{/if}}
{{/if}}
<figcaption>
<h2>{{this.name}}</h2>
<ul class="creative-field-list">
{{#each this.fields}}
<li>{{this}}</li>
{{/each}}
</ul>
</figcaption>
</figure>
</a>
{{/each}}
</script>
</div>
<footer>
<small><a href="https://www.behance.net/">Powered by Behance</a></small>
</footer>
<script>
$(document).ready(function () {
var apiKey = 'oTDRtfQleT3MlCrMqMP6Fgtt9DtKS2wf';
var userID = 'JuhoTikkanen';
(function () {
var behanceProjectAPI = 'http://www.behance.net/v2/users/' + userID + '/projects?callback=?&api_key=' + apiKey;
function setPortfolioTemplate() {
var projectData = JSON.parse(sessionStorage.getItem('behanceProject')),
getTemplate = $('#portfolio-template').html(),
template = Handlebars.compile(getTemplate),
result = template(projectData);
$('#portfolio').html(result);
}
if (sessionStorage.getItem('behanceProject')) {
setPortfolioTemplate();
} else {
$.getJSON(behanceProjectAPI, function (project) {
var data = JSON.stringify(project);
sessionStorage.setItem('behanceProject', data);
setPortfolioTemplate();
});
}
})();
});
</script>
</body>
</html>