Skip to content

Commit

Permalink
css
Browse files Browse the repository at this point in the history
  • Loading branch information
Vital-Vuillaume committed Oct 5, 2024
1 parent 2d2699e commit c0ecf0a
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 5 deletions.
Binary file added bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 19 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,24 @@
</head>

<body>
<textarea class="hash" placeholder="kee"></textarea>
<textarea class="txt" placeholder="msg"></textarea>
<textarea class="txtHash" placeholder="msg-hash"></textarea>
<div class="bg bloc">
<div class="double">
<p class="bg">Write the key you want...</p>
<textarea class="bg input hash" placeholder="kee"></textarea>
</div>
<div class="double">
<p class="bg">Write the message you want to encrypt...</p>
<textarea class="bg input txt" placeholder="msg"></textarea>
</div>
<div class="double">
<p class="bg">Write the message you want to decipher...</p>
<textarea class="bg input txtHash" placeholder="msg-hash"></textarea>
</div>

<div class="double">
<a class="bg footer" href="https://rmbi.ch/vital/donation"></a>
<a class="bg footer" href="https://github.com/Vital-Vuillaume">ⓒ 2024 - Vital production</a>
</div>
</div>
</body>
</html>
101 changes: 101 additions & 0 deletions msg-hash.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,107 @@ body {

min-height: 100vh;
color: white;
background-image: url(bg.png);
background-attachment: fixed;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
background-color: black;
font-size: 1.2em;

}

.bloc {

position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);

}

.bg {

background-color: rgba(255, 255, 255, 0.25);
backdrop-filter: blur(15px);
max-width: max-content;
padding: 10px;
border-radius: 10px;
color: white;

}

.double {

display: flex;
justify-content:space-between;
gap: 30px;
margin: 20px;
align-items: center;

}

.input {

resize: none;
border: none;
height: 70px;
transition: 1.5s;

}

.input:focus {

outline: none;
box-shadow: inset 0 0 0 2px rgb(240, 242, 252);
background-color: rgba(99, 78, 174, 0.301);

}

.input:-moz-placeholder {

color: white;

}

.input::placeholder {

color: white;

}

.footer {

text-decoration: none;
font-size: 0.9em;

}

@media screen and (max-width: 750px) {

.bloc {

width: 90%;

}

.double {

flex-direction: column;

}

.double:last-child {

flex-direction: row;

}

.input {

height: 150px;
font-size: 1.5em;

}

}
4 changes: 2 additions & 2 deletions msg-hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ txt.addEventListener("input", function() {
try {
let encrypted = encryptDecrypt(txt.value, hashValue);
txtHash.value = btoa(encrypted);
} catch (error) {}
} catch {}
});

txtHash.addEventListener("input", function() {
try {
let decrypted = atob(txtHash.value);
txt.value = encryptDecrypt(decrypted, hashValue);
} catch (error) {}
} catch {}
});

0 comments on commit c0ecf0a

Please sign in to comment.