Skip to content

Commit

Permalink
Move app_*.js scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Dec 17, 2024
1 parent 735b58e commit 0606a54
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 6 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion showcase/cities4cities/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ <h4 style="margin-top: -2%; padding-left: 13%; padding-right: 13%;">Smart Soluti

<script src="https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js"></script>
<script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js"></script>
<script src="../../app_marketplace.js"></script>
<script src="../app_marketplace.js"></script>
<script>
var scr = document.createElement("script");
scr.src = "./pageData.js" + "?ts=" + Math.round(new Date().getTime()/3600000);
Expand Down
2 changes: 1 addition & 1 deletion showcase/fiware-ready/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ <h4 style="margin-top: -2%; padding-left: 13%; padding-right: 13%;">Pluggable Io

<script src="https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js"></script>
<script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js"></script>
<script src="../../app_marketplace.js"></script>
<script src="../app_marketplace.js"></script>
<script>
var scr = document.createElement("script");
scr.src = "./pageData.js" + "?ts=" + Math.round(new Date().getTime()/3600000);
Expand Down
2 changes: 1 addition & 1 deletion showcase/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,7 @@ <h3>Impact Stories</h3>


<div class="et_pb_code_inner"><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.waitforimages/1.5.0/jquery.waitforimages.min.js"></script>
<script src="../app_featured.js"></script></div>
<script src="./app_featured.js"></script></div>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion showcase/powered-by-fiware/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ <h4 style="margin-top: -2%; padding-left: 13%; padding-right: 13%;">Smart Soluti
}
</script>

<script src="../../app_marketplace.js"></script>
<script src="../app_marketplace.js"></script>

<script>
var scr = document.createElement("script");
Expand Down
2 changes: 1 addition & 1 deletion showcase/product-details/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ <h4 id="excerpt" style="margin-top: -2%">Sorry, it looks like there is nothing t



<div class="et_pb_code_inner"><script src="../../app_product.js"></script>
<div class="et_pb_code_inner"><script src="../app_product.js"></script>
<script>
var scr = document.createElement("script");
scr.src = "./pageData.js" + "?ts=" + Math.round(new Date().getTime()/3600000);
Expand Down
69 changes: 69 additions & 0 deletions showcase/support-services/app_featured.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
function includeHTML(cb) {
let z;
let i;
let elmnt;
let file;
let xhttp;
z = document.getElementsByTagName("*");
for (i = 0; i < z.length; i++) {
elmnt = z[i];
file = elmnt.getAttribute("w3-include-html");
if (file) {
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4) {
if (this.status == 200) {
$(`#${elmnt.id}`).html(this.responseText);
}
if (this.status == 404) {
$(`#${elmnt.id}`).html("Page not found.");
}
elmnt.removeAttribute("w3-include-html");
includeHTML(cb);
}
};
xhttp.open("GET", file, true);
xhttp.send();
return;
}
}
if (cb) {
cb();
}
}

function enableCarousel(e) {
e.target.removeEventListener("html-included", enableCarousel, false);
$(".owl-carousel").owlCarousel({
stagePadding: 30,
loop: false,
autoplay: false,
margin: 15,
nav: true,
navText: [
'<span class="uk-margin-small-right uk-icon" uk-icon="icon: chevron-left"></span>',
'<span class="uk-margin-small-left uk-icon" uk-icon="icon: chevron-right"></span>',
],
responsive: {
0: {
items: 1,
loop: true,
},
600: {
items: 2,
loop: true,
},
1000: {
items: 3,
},
1400: {
items: 4,
},
1600: {
items: 4,
},
},
});
}

document.addEventListener("html-included", enableCarousel);
61 changes: 61 additions & 0 deletions showcase/support-services/card.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{{#each this}}
<div id="item-{{@index}}" class="grid-item {{createClass company}} {{createClass country}} {{createClass department}} {{createClasses filters}} {{createClass domain}}">
<div class='f-cat active'>
{{#if bio}}
<div class='cat-bio' data-modal='{{@index}}'>
{{/if}}
<div class='city-photo-container'>
<picture>
<source srcset="{{webp img}}" type="image/webp"/>
<img alt="" class="city-photo" src="{{img}}" loading="lazy" />
</picture>
</div>
{{#if bio}}
</div>
{{/if}}
<div class='profile-details'>
{{#if bio}}
<div class='cat-bio' data-modal='{{@index}}'>
{{/if}}
<h6 class='name'>{{title}}{{name}}</h6>
<h4 class='position'>{{job}}</h4>
<a target='_blank' href='{{website}}' rel='noopener'>
<h5 class='company-link'>{{company}}{{companyType}}</h5>
</a>
{{#if team}}
<div class='department'>{{team}}</div>
{{else}}
{{#if department}}
<div class='department'>{{department}}</div>
{{/if}}
{{/if}}
{{#if domain}}
<div class='chip-domain'>{{domain}}</div>
{{/if}}
</div>
{{#if bio}}
</div>
{{/if}}
<div class='icons'>
{{#if linkedIn}}
<a class='cat-linkedin' target='_blank' href='{{linkedIn}}' rel='noopener'><span
class='icon linkedin'
></span></a>
{{/if}}
{{#if twitter}}
<a class='cat-twitter' target='_blank' href='{{twitter}}' rel='noopener'><span
class='icon twitter'
></span></a>
{{/if}}
{{#if country}}
<div class='cat-location'><span class='location-label'>{{country}}</span><img
alt='{{country}}'
class='flag'
src='{{flagUrl}}'
loading='lazy'
/></div>
{{/if}}
</div>
</div>
</div>
{{/each}}
2 changes: 1 addition & 1 deletion showcase/support-services/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ <h4 style="margin-top: -2%; padding-left: 13%; padding-right: 13%;">Organization

<script src="https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js"></script>
<script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js"></script>
<script src="../../app_marketplace.js"></script>
<script src="../app_marketplace.js"></script>
<script>
var scr = document.createElement("script");
scr.src = "./pageData.js" + "?ts=" + Math.round(new Date().getTime()/3600000);
Expand Down

0 comments on commit 0606a54

Please sign in to comment.