|
@@ -95,7 +95,14 @@
|
|
|
function initSiteInfo(){
|
|
|
var defaultSettings = {
|
|
|
siteTitle: "WebStick",
|
|
|
- siteDescription: "A personal web server hosted on an ESP8266 using a micro SD card"
|
|
|
+ siteDescription: "A personal web server hosted on an ESP8266 using a micro SD card",
|
|
|
+ youtubeLink: "https://www.youtube.com/channel/UCzbcGOZHO2BH-ANX7W0MGIg",
|
|
|
+ facebookLink: "",
|
|
|
+ xLink: "",
|
|
|
+ githubLink: "https://github.com/tobychui/webstick",
|
|
|
+ blogLink: "https://blog.imuslab.com",
|
|
|
+ websiteLink: "https://imuslab.com",
|
|
|
+ emailLink: "[email protected]"
|
|
|
};
|
|
|
|
|
|
//Initiate the settings form with current values
|
|
@@ -108,6 +115,28 @@
|
|
|
console.log(data);
|
|
|
$("#site-title").text(data.siteTitle);
|
|
|
$("#site-description").text(data.siteDescription);
|
|
|
+
|
|
|
+ //Clear and regnerate the contact icons
|
|
|
+ $("#contacts_icon").html("");
|
|
|
+ if (data.youtubeLink != ""){
|
|
|
+ $("#contacts_icon").append('<a href="' + data.youtubeLink + '"><span class="ts-icon is-huge is-youtube-icon"></span></a>');
|
|
|
+ }
|
|
|
+ if (data.blogLink != ""){
|
|
|
+ $("#contacts_icon").append('<a class="has-start-spaced-large" href="' + data.blogLink + '"><span class="ts-icon is-huge is-wordpress-icon"></span></a>');
|
|
|
+ }
|
|
|
+ if (data.emailLink != ""){
|
|
|
+ $("#contacts_icon").append('<a class="has-start-spaced-large" href="mailto:' + data.emailLink + '"><span class="ts-icon is-huge is-envelope-icon"></span></a>');
|
|
|
+ }
|
|
|
+ if (data.githubLink != ""){
|
|
|
+ $("#contacts_icon").append('<a class="has-start-spaced-large" href="' + data.githubLink + '"><span class="ts-icon is-huge is-github-icon"></span></a>');
|
|
|
+ }
|
|
|
+ if (data.xLink != ""){
|
|
|
+ $("#contacts_icon").append('<a class="has-start-spaced-large" href="' + data.xLink + '"><span class="ts-icon is-huge is-twitter-icon"></span></a>');
|
|
|
+ }
|
|
|
+ if (data.facebookLink != ""){
|
|
|
+ $("#contacts_icon").append('<a class="has-start-spaced-large" href="' + data.facebookLink + '"><span class="ts-icon is-huge is-facebook-icon"></span></a>');
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|