Skip to content

Commit

Permalink
feat: Added new favicon. Refactored config menu to dynamic title and …
Browse files Browse the repository at this point in the history
…text depending mode (first set up/reconfig)
  • Loading branch information
migtarx committed Mar 18, 2022
1 parent bc9c6f2 commit 2b8d08b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
Binary file modified img/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ function checkFirstTime(){
} else {
document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Storage...";
}
}
}
setInterval(getClockTime, 0);
12 changes: 12 additions & 0 deletions js/set-up.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var elementIsClicked = false;
var inputSelectedLang = document.getElementById("selectedLang");
var selectedLang = -1;
checkFirstTime()
inputSelectedLang.disabled = true;


Expand Down Expand Up @@ -58,5 +59,16 @@ function clickConfirmLang() {
location.href = "index.html";
}
}

function checkFirstTime(){
if (typeof(Storage) !== "undefined") {
if (localStorage.getItem("username") === null) {
document.title = "New Tab - First set up";
document.getElementById("htitle").textContent = "First set up"
}
} else {
document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Storage...";
}
}
var element = document.getElementById("confirmLang");
element.addEventListener("click", clickConfirmLang);
5 changes: 3 additions & 2 deletions name.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>New Tab- First set up</title>
<link rel="icon" type="image/png" href="img/icon.png"/>
<title>New Tab - Reconfig</title>
<link rel="stylesheet" href="css/main.css" />
</head>
<body>
<body>
<h1>First set up</h1>
<h1 id="htitle">Reconfig</h1>
<div id="pick-username">
<input id="username" type="text" class="ghost-input" placeholder="My name is..." required style="margin-top: 45%" />
<a class="btn btn-white" id="confirm">Confirm</a>
Expand Down

0 comments on commit 2b8d08b

Please sign in to comment.