Skip to content

Commit 698570d

Browse files
use absolute paths with protocol
- prevent Mixed Content in #91
1 parent 5ec5c02 commit 698570d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

_includes/work.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h3 id="work">Work</h3>
1313
<div class="thumb-container">
1414
{% for project in site.data.settings.projects %}
1515
<label for="{{ project.folder }}">
16-
<div class="thumb-unit" data-folder="{{ project.folder }}">
16+
<div class="thumb-unit" data-url="{{ site.github.url }}/work/{{ project.folder }}">
1717
<img src="{{ site.github.url }}/assets/img/work/{{project.folder}}/thumb.jpg" alt="{{ project.name }}" />
1818
</div>
1919
<div class="thumb-overlay">

assets/js/functions.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ function workLoad() {
5151
$('.thumb-container label').click(function() {
5252
var $this = $(this),
5353
newTitle = $this.find('strong').text(),
54-
newFolder = $this.find('.thumb-unit').data('folder'),
5554
spinner = '<div class="loader">Loading...</div>',
56-
newHTML = 'work/'+ newFolder;
55+
url = window.location.origin + $this.find('.thumb-unit').data('url');
5756

58-
$('.project-load').html(spinner).load(newHTML);
57+
$('.project-load').html(spinner).load(url);
5958
$('.project-title').text(newTitle);
6059
});
6160

0 commit comments

Comments
 (0)