Compare commits

..
3 Commits
Author SHA1 Message Date
Christian 50c6868dfe Merge branch 'main' of https://git.delta87.synology.me/Christian/2aAPC 2026-09-23 17:12:16 +02:00
Christian aa333094e0 Adding Javascript Code 2026-09-23 17:11:32 +02:00
Christian 72a94ecde8 Javascript ITL 23092026 2026-09-23 11:16:37 +02:00
6 changed files with 209 additions and 1 deletions
+7
View File
@@ -33,6 +33,11 @@
var myVariable = 1;
let myVariable = 1;
snake_case --> number_of_snakes
Kebab-case --> number-of-kebabs
camelCase --> firstNumber
PascalCase -->
*/
@@ -42,6 +47,8 @@
firstNumber = "kickboxen";
console.log(firstNumber);
</script>
</body>
</html>
+50
View File
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Second Javascript</title>
<link rel="stylesheet" href="assets/css/02.css">
</head>
<body>
<div class="container">
<h2>Login</h2>
<label for="username">Benutzername</label>
<input type="text" name="userName" id="username" placeholder="Jonny">
<br><br>
<label for="password">Passwort</label>
<input type="password" id="togglePasswordBtn" name="passWord" placeholder="Password"><br><br>
<button id="togglePasswordBtn" onclick="togglePassword()">Passwort anzeigen/ausblenden</button><br>
<button id="togglePasswordBtn2">Passwort anzeigen/ausblenden</button>
</div>
<script>
function togglePassword(){
var passwordField = document.getElementById("togglePasswordBtn");
if(passwordField.type === 'password'){
passwordField.type = 'text';
}
else if(passwordField.type === 'text'){
passwordField.type = 'password';
}
}
document.getElementById('togglePasswordBtn2').addEventListener('click', function() {
var passwordField2 = document.getElementById("togglePasswordBtn");
if(passwordField2.type === 'password'){
passwordField2.type = 'text';
}
else if(passwordField2.type === 'text'){
passwordField2.type = 'password';
}
});
</script>
</body>
</html>
+34
View File
@@ -0,0 +1,34 @@
body {
font-family: Arial, sans-serif;
margin: 20px;
}
.container {
max-width: 300px;
margin: auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 8px;
background-color: #f9f9f9;
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
width: 100%;
padding: 10px;
margin: 8px ;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
+25
View File
@@ -0,0 +1,25 @@
button {
width: 100%;
padding: 10px;
margin: 8px ;
background-color: darkcyan;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
input{
width: 100%;
}
.webBox{
text-align: center;
}
.boxText{
display:block;
float:left;
padding:5px 10px
}
+36
View File
@@ -0,0 +1,36 @@
function setSize(varWidth, varHeight){
var box = document.getElementById("webBoxSel");
var boxHeight = (varHeight / 2);
var boxwidth = (varWidth / 2);
if(boxHeight >= 300)
{
box.style.backgroundColor = 'red';
}else{
box.style.backgroundColor = 'yellow';
}
box.style.width = boxwidth+'px';
box.style.height = boxHeight+'px';
var textInBox = document.getElementById("boxText");
textInBox.style.color = 'blue';
textInBox.style.margin = '25%';
textInBox.style.marginLeft = '25%';
}
if(document.readyState === "loading"){
const varW = window.outerWidth;
const varH = window.outerHeight;
setSize(varW, varH);
}
window.addEventListener("resize", function (){
const varW = window.outerWidth;
const varH = window.outerHeight;
setSize(varW, varH);
})
+57 -1
View File
@@ -1 +1,57 @@
currently leer
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Javascript Grundlagen</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/css/style.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container-sm">
<div class="row">
<div class="col-sm">
<div class="input-group">
<span class="input-group-text">Text</span>
<input type="text" class="form-control" placeholder="Hello World">
<button>Text ändern</button>
</div>
</div>
<div class="col-sm">
<div class="input-group">
<span class="input-group-text">Schriftgröße</span>
<input type="text" class="form-control" placeholder="Hello World">
<span class="input-group-text">px</span>
<button>Schrift ändern</button>
</div>
</div>
<div class="col-sm">
<div class="input-group">
<span class="input-group-text">Drechung</span>
<input type="text" class="form-control" placeholder="Hello World">
<span class="input-group-text">°</span>
<button>Drehung ändern</button>
</div>
</div>
</div>
<div id="webBoxSel" class="container webBox">
<span class="boxText">Das ist nur ein BeipielText</span>
</div>
</div>
<script src="assets/js/manipulation.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script>
</script>
</body>
</html>