File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff 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 ">
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments