-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·268 lines (248 loc) · 9.42 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Danyell Mitchell Design</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.9.0/css/lightbox.min.css" rel="stylesheet" />
<link href="style.css" rel="stylesheet" />
</head>
<body>
<div class="content-area">
<img src="images/logo.png" width="100" />
<div class="filter-area">
<button class="active filter-button" data-category='all'>All</button>
<button class="filter-button" data-category='ads'>Ads</button>
<button class="filter-button" data-category='identity'>Identity</button>
<button class="filter-button" data-category='illustrations'>Illustrations</button>
<button class="filter-button" data-category='comics'>Comics</button>
</div>
<div class="grid">
</div>
</div>
<h1>Contact</h1>
<div class="contact-area">
<p><i>Currently accepting commission requests.</i></p>
<a class="email-address">danyellmitchell27 [at] gmail [dot] com</a>
<p class="site-icons">
<a href="http://dotta.deviantart.com/gallery/"><i class="fa fa-deviantart fa-2x"></i></a>
<a href="https://www.instagram.com/dotta18/"><i class="fa fa-instagram fa-2x"></i></a>
<a href="https://www.linkedin.com/in/danyell-mitchell-01482264"><i class="fa fa-linkedin fa-2x"></i></a>
<a href="https://www.youtube.com/channel/UCy7EXyeoe4mkkquyjfW7DCw"><i class="fa fa-youtube-play fa-2x"></i></a>
<a href="https://twitter.com/dotta18"><i class="fa fa-twitter fa-2x"></i></a>
</p>
</div>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/masonry/4.1.1/masonry.pkgd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.9.0/js/lightbox.min.js"></script>
<script>
// If you change this, update .grid-item and .grid-item img in the CSS
var imageWidth = 400;
// NOTE: Order in this list matters! It will be the sorting order of the thumbnails
var images = [
{
thumbnail: 'images/bear-thumb.jpg',
collection: [
'images/bear-1.jpg'
],
category: 'illustrations'
},
{
thumbnail: 'images/hard-and-scrambled-thumb.jpg',
collection: [
'images/hard-and-scrambled-1.jpg',
'images/hard-and-scrambled-2.png'
],
category: 'identity'
},
{
thumbnail: 'images/ups-thumb.jpg',
collection: [
'images/ups-1.jpg'
],
category: 'ads'
},
{
thumbnail: 'images/whackamolethumb.jpg',
collection: [
'images/whackamole-1.jpg',
'images/whackamole-2.jpg',
'images/molestillcombo.jpg',
'images/molegiffyshadow.gif'
],
category: 'identity'
},
{
thumbnail: 'images/thumbnail.jpg',
url: 'https://tapas.io/series/Focal-Points',
category: 'comics'
},
{
thumbnail: 'images/Tittle.jpg',
url: 'https://tapas.io/series/Jessa-and-Nora',
category: 'comics'
},
{
thumbnail: 'images/bear-2.jpg',
collection: [
'images/bear-2.jpg'
],
category: 'illustrations'
},
{
thumbnail: 'images/bear-3.jpg',
collection: [
'images/bear-3.jpg'
],
category: 'illustrations'
},
{
thumbnail: 'images/bear-thumb-4.jpg',
collection: [
'images/bear-4.jpg'
],
category: 'illustrations'
},
{
thumbnail: 'images/bear-5.jpg',
collection: [
'images/bear-5.jpg'
],
category: 'illustrations'
},
{
thumbnail: 'images/drei-thumb.jpg',
collection: [
'images/drei-1.jpg',
'images/drei-2.jpg',
'images/drei-3.jpg',
'images/drei-4.jpg'
],
category: 'identity'
},
{
thumbnail: 'images/fungus-thumb.jpg',
collection: [
'images/fungus-1.jpg',
],
category: 'ads',
},
{
thumbnail: 'images/neglect-thumb.jpg',
collection: [
'images/neglect-1.jpg',
'images/neglect-2.jpg'
],
category: 'ads'
},
{
thumbnail: 'images/jumping-biker-thumb.jpg',
collection: [
'images/jumping-biker.jpg'
],
category: 'ads'
},
];
// Construct the grid of images and their lightboxes
for(var i = 0; i < images.length; ++i) {
// Create the thumbnail in its grid item
var thumbnailPath = images[i].thumbnail;
var category = images[i].category;
// If there's a url, we link to it instead of a lightbox
if(images[i].url) {
var url = images[i].url;
var gridItem = '<div class="grid-item" data-category=' + category + '>' +
'<a href="' + url + '" target="_BLANK">' +
'<img src="' + thumbnailPath + '" />' +
'</a>' +
'</div>';
$('.grid').append(gridItem);
}
else {
var firstImagePath = images[i].collection[0];
var gridItem = '<div class="grid-item" data-category=' + category + '>';
var imageCount = images[i].collection.length;
if(imageCount > 1) {
gridItem += '<span class="image-count-overlay">(' + imageCount + ' images)</span>';
}
gridItem += '<a href="' + firstImagePath + '" data-lightbox="image-' + i + '">' +
'<img src="' + thumbnailPath + '" />' +
'</a>' +
'</div>';
$('.grid').append(gridItem);
// Now add the rest of the image for the lightbox to find
for(var j = 1; j < images[i].collection.length; ++j) {
var imagePath = images[i].collection[j];
$('body').append('<a href="' + imagePath + '" data-lightbox="image-' + i + '"></a>')
}
}
}
/**
* Refreshes masonry in a way that handles the possibility of us being below the "minimum" size.
* Particularly, if the viewport is smaller than is needed to actually display the image, we
* resize the images to fit the viewport. We also have to ensure that the height of the images
* matches the width (hence, thumbnails must be square).
*/
function refreshMasonry() {
var width = imageWidth;
// Special sizing for the window being smaller than the image and its padding
if($(window).width() < imageWidth + 10) {
$('.grid').css('width', '100%');
}
// Set the heights to the widths
$('.grid-item').each(function(index, value) {
width = $(value).css('width');
$(value).css('height', width);
});
$('.grid-item img').each(function(index, value) {
$(value).css('height', $(value).css('width'));
});
// Ensures changes are detected
$('.grid').masonry({
columnWidth: parseInt(width),
});
}
// Initiate the grid
$('.grid').masonry({
itemSelector: '.grid-item',
columnWidth: imageWidth,
fitWidth: true
});
refreshMasonry();
$(window).resize(refreshMasonry);
// Add event handlers to the filter buttons
$('.filter-button').click(function() {
var category = this.dataset.category;
// Hide everything that isn't in the category of the button that got pressed and show everything
// in that category. Refresh the grid after show/hide.
if(category === 'all') {
$('.grid-item').show('fast', function() {
refreshMasonry();
});
}
else {
$('.grid-item[data-category=' + category + ']').show('fast', function() {
refreshMasonry();
});
$('.grid-item[data-category!=' + category + ']').hide('fast', function() {
refreshMasonry();
});
}
// Set the appropriate button as active
$('.filter-button.active').removeClass('active');
$('.filter-button[data-category=' + category + ']').addClass('active');
});
// Anti-spam email features
var obfusicatedEmail = $('.email-address').text();
var cleanEmail = obfusicatedEmail.replace(/\W*\[dot\]\W*/g, '.').replace(/\W*\[at\]\W*/g, '@');
$('.email-address').text(cleanEmail);
$('.email-address').attr('href', 'mailto:' + cleanEmail);
lightbox.option({
'alwaysShowNavOnTouchDevices': true,
'wrapAround': true
})
</script>
</body>
</html>