Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
brandalokadjaya authored Jun 5, 2024
1 parent 6a40da9 commit 9c92322
Show file tree
Hide file tree
Showing 2 changed files with 205 additions and 0 deletions.
53 changes: 53 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> From brandalokajaya </title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100&family=Open+Sans:wght@100&family=Lobster&family=Montserrat:wght@100&family=Poppins:wght@100&family=Raleway:wght@100&family=Pacifico&family=Roboto+Mono:wght@100&family=Nunito:wght@100&family=Quicksand:wght@100&family=Playfair+Display:wght@100&family=Lora:wght@100&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<div class="logo-container">
<img src="https://i.ibb.co.com/wJ4DzpT/20240511-155654.png" alt="Logo" class="logo">
</div>
</header>
<div id="form-container" class="container">
<div class="column">
<textarea id="text1" placeholder="Masukkan teks di kolom 1..."></textarea>
<label for="fontSelect">Pilih Font:</label>
<select id="fontSelect" onchange="updateTextStyle()">
<option value="Roboto">Roboto</option>
<option value="Open Sans">Open Sans</option>
<option value="Lobster">Lobster</option>
<option value="Montserrat">Montserrat</option>
<option value="Poppins">Poppins</option>
<option value="Raleway">Raleway</option>
<option value="Pacifico">Pacifico</option>
<option value="Roboto Mono">Roboto Mono</option>
<option value="Nunito">Nunito</option>
<option value="Quicksand">Quicksand</option>
<option value="Playfair Display">Playfair Display</option>
<option value="Lora">Lora</option>
</select>
<label for="colorPicker">Pilih Warna:</label>
<input type="color" id="colorPicker" onchange="updateTextStyle()">
</div>
<div class="column">
<textarea id="text2" placeholder="Masukkan teks di kolom 2..."></textarea>
</div>
<button onclick="generateURL()">Buat URL</button>
<div id="result">
<input type="text" id="generatedURL" readonly>
<button onclick="copyURL()">Salin & kirimkan URL ini ke temanmu</button>
</div>
</div>
<div id="displayTexts">
<div id="marqueeText"></div>
<button id="listenButton" onclick="speakText()">Dengarkan</button>
<div id="animatedText"></div>
</div>
<script src="script.js"></script>
</body>
</html>
152 changes: 152 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
margin: 20px;
padding: 0;
box-sizing: border-box;
}

header {
background-color: #000; /* Warna hitam */
width: 100%; /* Lebar penuh */
padding: 10px 0;
text-align: center;
position: fixed; /* Tetap di tempat saat digulir */
top: 0;
left: 0;
z-index: 1000; /* Menempatkan di depan elemen lainnya */
}

.logo-container {
display: inline-block;
}

.logo {
height: 50px;
}

.container {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 80px; /* Memberi ruang untuk header tetap */
}

.column {
margin: 10px;
}


.container {
display: flex;
flex-direction: column;
width: 100%;
max-width: 600px;
align-items: center;
padding: 10px;
}

.column {
width: 100%;
margin: 10px 0;
}

textarea {
width: 100%;
height: 150px;
padding: 10px;
box-sizing: border-box;
}

button {
margin-top: 10px;
padding: 10px 20px;
cursor: pointer;
}

#result {
margin-top: 20px;
display: flex;
align-items: center;
width: 100%;
}

#generatedURL {
width: 70%;
padding: 10px;
margin-right: 10px;
box-sizing: border-box;
}

#displayTexts {
margin-top: 20px;
width: 100%;
max-width: 600px;
word-wrap: break-word;
white-space: pre-wrap; /* To preserve newlines */
display: none;
align-items: center;
}
#marqueeText {
width: 100%;
white-space: nowrap;
overflow: hidden;
box-sizing: border-box;
margin-bottom: 10px;
font-size: 100px;
}

#marqueeText span {
display: inline-block;
padding-left: 100%;
animation: simpleMarquee 15s linear infinite;
}

/* Animasi marquee sederhana */
@keyframes simpleMarquee {
from {
transform: translateX(100%);
}
to {
transform: translateX(-100%);
}
}
#animatedText {
width: 100%;
}

#listenButton {
margin-top: 10px;
}

@keyframes marquee {
from {
transform: translateX(100%);
}
to {
transform: translateX(-100%);
}
}

@media (max-width: 600px) {
.container {
padding: 5px;
}

button {
width: 100%;
margin: 5px 0;
}

#result {
flex-direction: column;
align-items: stretch;
}

#generatedURL {
width: 100%;
margin-bottom: 10px;
}
}

0 comments on commit 9c92322

Please sign in to comment.