Fully working language change button

This commit is contained in:
malik 2024-01-27 15:31:42 +01:00
parent 41524afd60
commit 5c6209f930
9 changed files with 22 additions and 149 deletions

View file

@ -52,27 +52,6 @@
</div>
<script>
var menuList = document.getElementById("menuList");
menuList.style.maxHeight = "0px";
function togglemenu(){
if(menuList.style.maxHeight == "0px")
{
menuList.style.maxHeight = "130px";
}
else
{
menuList.style.maxHeight = "0px";
}
}
</script>
<script src="js/lang.js"></script>

View file

@ -44,27 +44,6 @@
</div>
<script>
var menuList = document.getElementById("menuList");
menuList.style.maxHeight = "0px";
function togglemenu(){
if(menuList.style.maxHeight == "0px")
{
menuList.style.maxHeight = "130px";
}
else
{
menuList.style.maxHeight = "0px";
}
}
</script>
<script src="../js/lang.js"></script>

View file

@ -70,26 +70,6 @@
</div>
<script>
var menuList = document.getElementById("menuList");
menuList.style.maxHeight = "0px";
function togglemenu(){
if(menuList.style.maxHeight == "0px")
{
menuList.style.maxHeight = "130px";
}
else
{
menuList.style.maxHeight = "0px";
}
}
</script>
<script src="../js/lang.js"></script>

View file

@ -56,27 +56,6 @@
</div>
<script>
var menuList = document.getElementById("menuList");
menuList.style.maxHeight = "0px";
function togglemenu(){
if(menuList.style.maxHeight == "0px")
{
menuList.style.maxHeight = "130px";
}
else
{
menuList.style.maxHeight = "0px";
}
}
</script>
<script src="../js/lang.js"></script>

View file

@ -43,26 +43,6 @@
</div>
<script>
var menuList = document.getElementById("menuList");
menuList.style.maxHeight = "0px";
function togglemenu(){
if(menuList.style.maxHeight == "0px")
{
menuList.style.maxHeight = "130px";
}
else
{
menuList.style.maxHeight = "0px";
}
}
</script>
<script src="js/lang.js"></script>

View file

@ -185,11 +185,11 @@ h2{
display: block;
margin-top: 10px;
margin-bottom: 10px;
}
nav ul li a{
box-shadow: 0 0 0;
cursor: pointer;
}
.menu-icon{
@ -214,7 +214,6 @@ h2{
.col-2 .fotovonmir{
width: 77%;
transform: translateX(0px);
}

View file

@ -46,27 +46,6 @@
</div>
<script>
var menuList = document.getElementById("menuList");
menuList.style.maxHeight = "0px";
function togglemenu(){
if(menuList.style.maxHeight == "0px")
{
menuList.style.maxHeight = "130px";
}
else
{
menuList.style.maxHeight = "0px";
}
}
</script>
<script src="js/lang.js"></script>
</body>

View file

@ -6,7 +6,7 @@ var language = {
aboutmenav: "About Me",
projectsnav: "Projects",
contactnav: "Contact me",
lang: "Language",
lang: "Switch to German",
//index.html
welcometitle: "Hello Internet!",
welcome1: "I'm Malik, some guy on the web who's learning to code.",
@ -69,7 +69,7 @@ var language = {
aboutmenav: "Über Mich",
projectsnav: "Projekte",
contactnav: "Kontakt",
lang: "Sprache",
lang: "Wechseln zu Englisch",
//index.html
welcometitle: "Hallo Internet!",
welcome1: "Ich bin Malik, ein Typ aus dem Internet, der programmieren lernt.",
@ -295,3 +295,21 @@ function langChange() {
window.location.reload();
}
//menu Script
var menuList = document.getElementById("menuList");
menuList.style.maxHeight = "0px";
function togglemenu(){
if(menuList.style.maxHeight == "0px")
{
menuList.style.maxHeight = "200px";
}
else
{
menuList.style.maxHeight = "0px";
}
}

View file

@ -43,26 +43,6 @@
</div>
<script>
var menuList = document.getElementById("menuList");
menuList.style.maxHeight = "0px";
function togglemenu(){
if(menuList.style.maxHeight == "0px")
{
menuList.style.maxHeight = "130px";
}
else
{
menuList.style.maxHeight = "0px";
}
}
</script>
<script src="js/lang.js"></script>