5 Commits
V1.3 ... V1.5

Author SHA1 Message Date
Brendan
7bd7e14910 Update README.md 2024-01-01 02:58:30 +01:00
abrendan
da41439428 Added a button for the GitHub Page and changed the font to Google's Roboto 2024-01-01 01:56:43 +00:00
Brendan
3ff4eedf62 Update README.md 2023-12-26 13:53:35 +01:00
abrendan
d4112b4a19 V1.4! Now with a centered design and the web application isn't broken on a mobile device anymore 2023-12-11 14:37:23 +00:00
Brendan
b23c6692ab Update README.md 2023-12-02 01:25:49 +01:00
3 changed files with 119 additions and 102 deletions

View File

@@ -2,5 +2,8 @@
MicDropMessages is a basic chat platform using socket.io and JavaScript. Now with a simple dark mode option! MicDropMessages is a basic chat platform using socket.io and JavaScript. Now with a simple dark mode option!
![grafik](https://github.com/abrendan/MicDropMessages/assets/94894839/1e91b762-3acd-4d1b-b89b-86957ef50064) ![grafik](https://github.com/abrendan/MicDropMessages/assets/94894839/259fcb85-5a20-44a7-b966-296aecb9e612)

View File

@@ -4,6 +4,7 @@
<title> MicDropMessages </title> <title> MicDropMessages </title>
<meta name = "charset" charset = "utf-8"> <meta name = "charset" charset = "utf-8">
<meta name = "viewport" content = "width=device-width"> <meta name = "viewport" content = "width=device-width">
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>
<link rel = "stylesheet" type = "text/css" href = "style.css"> <link rel = "stylesheet" type = "text/css" href = "style.css">
<script src = "script.js"></script> <script src = "script.js"></script>
<script src= "socket.io/socket.io.js"></script> <script src= "socket.io/socket.io.js"></script>
@@ -11,7 +12,7 @@
<body onload = "onload()"> <body onload = "onload()">
<div id = "Main"> <div id = "Main">
<audio id = "Ding" src = "Ding.mp3"> </audio> <audio id = "Ding" src = "Ding.mp3"> </audio>
<h1 id = "Title"> MicDropMessages V1.3 </h1> <h1 id = "Title"> MicDropMessages V1.5 </h1>
<p>Welcome to MicDropMessages! This small webbased application allows you to chat with your friends anonymously! To start, enter your username and enter a chatroom.</p> <p>Welcome to MicDropMessages! This small webbased application allows you to chat with your friends anonymously! To start, enter your username and enter a chatroom.</p>
<div id = "AccessPort"> <div id = "AccessPort">
<label id = "NameLabel"> Username </label> <label id = "NameLabel"> Username </label>
@@ -37,9 +38,12 @@
<input id = "ComposedMessage" class="input" type = "text"> <input id = "ComposedMessage" class="input" type = "text">
<input id = "SendMessage" onclick="Send()" value = "Send your message" class="button2" type = "submit"> <input id = "SendMessage" onclick="Send()" value = "Send your message" class="button2" type = "submit">
</div> </div>
<p>Made by abrendan. Visit my website for more of my projects.</p>
<button id="darkModeToggle" onclick="toggleDarkMode()" class="button">Toggle Dark Mode</button> <button id="darkModeToggle" onclick="toggleDarkMode()" class="button">Toggle Dark Mode</button>
<button onclick=" window.open('http://www.abrendan.dev','_blank')" class="button">abrendan.dev</button> <p>Made by abrendan. Visit my website for more of my projects.</p>
<div id="LinkButtons">
<button id="GitHubButton" onclick=" window.open('https://github.com/abrendan/MicDropMessages','_blank')" class="button">GitHub Page for MicDropMessages</button>
<button id="WebsiteButton" onclick=" window.open('http://www.abrendan.dev','_blank')" class="button">abrendan.dev</button>
</div>
<br><br> <br><br>
</div> </div>
</body> </body>

View File

@@ -1,104 +1,114 @@
body{ body{
background-image: url('https://images.unsplash.com/37/IHLjdHdzSvi0rgUMMlSK_TE3_0286.jpg'); /* Path to your example image */ background-image: url('https://images.unsplash.com/37/IHLjdHdzSvi0rgUMMlSK_TE3_0286.jpg'); /* Path to your example image */
background-size: cover; /* Cover the entire viewport */ background-size: cover; /* Cover the entire viewport */
background-repeat: no-repeat; /* Do not repeat the image */ background-repeat: no-repeat; /* Do not repeat the image */
background-attachment: fixed; /* The background image does not scroll */ background-attachment: fixed; /* The background image does not scroll */
color: #000000; color: #000000;
font-family: 'Segoe UI'; font-family: 'Roboto';
} display: flex; /* Use flexbox to center content */
justify-content: center; /* Center horizontally */
label{ align-items: center; /* Center vertically */
width: 5%; }
display: inline-block; label{
text-align: right; min-width: 70px; /* Ensure label has enough width */
} display: block; /* Make labels stack above inputs and buttons */
margin-bottom: 0.5em; /* Provide some space between label and input/button */
input{ text-align: left; /* Align text to the left */
background-color: rgba(255, 255, 255, 0.15); }
color: #000000; input{
font-size: 120%; background-color: rgba(255, 255, 255, 0.15);
border: none; color: #000000;
font-size: 120%;
} border: none;
width: 100%; /* Full width input fields */
.Message{ box-sizing: border-box; /* Border box sizing for padding and borders */
color: #000000; margin-bottom: 1em; /* Provide space below inputs */
}
} .Message{
color: #000000;
#Main{ }
min-height: 94.5vh; /* Stretch to fill the viewport height */ #Main{
padding: 20px; /* Padding added to the main content area */ min-height: 94.5vh; /* Stretch to fill the viewport height */
border-radius: 10px; width: 50%;
backdrop-filter: blur(5px); /* Provide a translucent frosted-glass effect */ padding: 20px; /* Padding added to the main content area */
background-color: rgba(255, 255, 255, 0.2); /* Slightly white transparent background */ border-radius: 10px;
} backdrop-filter: blur(5px); /* Provide a translucent frosted-glass effect */
background-color: rgba(255, 255, 255, 0.2); /* Slightly white transparent background */
display: flex; /* Adding flex properties to layout contents */
#Title{ flex-direction: column; /* Stack children elements vertically */
font-size: 300%; align-items: center; /* Centering child elements horizontally */
} }
#Title{
.button { font-family: 'Segoe UI';
background-color:transparent; font-size: 300%;
border-radius:28px; }
border:0px solid #000000; #LinkButtons{
display:inline-block; display: inline-block;
cursor:pointer; }
color:#000000; .button {
font-size:17px; background-color:transparent;
padding:16px 31px; border-radius:28px;
text-decoration:none; border:0px solid #000000;
text-shadow:0px 1px 0px #000000; display:inline-block;
background-color: rgba(255, 255, 255, 0.2); /* Slightly white transparent background */ cursor:pointer;
transition: background-color 0.3s ease; /* Transition for button hover effects */ color:#000000;
} font-size:17px;
.button:hover { padding:16px 31px;
background-color:#000000; text-decoration:none;
color:#ffffff; text-shadow:0px 1px 0px #000000;
background-color: rgba(255, 255, 255, 0.2); /* Slightly white transparent background */
} transition: background-color 0.3s ease; /* Transition for button hover effects */
.button:active { width: auto; /* Width is determined by content within */
position:relative; margin: 0.5em 0; /* Margin around buttons */
top:1px; }
} .button:hover {
background-color:#000000;
/* Add this to your CSS to support dark mode */ color:#ffffff;
body.dark-mode { }
color: #ffffff; /* Light text color for contrast */ .button:active {
} position:relative;
body.dark-mode .button { top:1px;
color: #ffffff; /* Dark button background color */ }
} /* Add this to your CSS to support dark mode */
body.dark-mode {
color: #ffffff; /* Light text color for contrast */
backdrop-filter: blur(5px); /* Provide a translucent frosted-glass effect */
background-color: rgba(0, 0, 0, 1); /* Slightly transparent dark background */
}
body.dark-mode .button {
color: #ffffff; /* Dark button background color */
}
body.dark-mode .button2 { body.dark-mode .button2 {
color: #ffffff; /* Dark button background color */ color: #ffffff; /* Dark button background color */
} }
body.dark-mode .input { body.dark-mode .input {
color: #ffffff; /* Dark button background color */ color: #ffffff; /* Dark button background color */
} }
.dark-mode #Main {
background-color: #333; /* Dark background for main content area */
/* You might want to customize other elements for dark mode, for example: */ }
.dark-mode #Main { .input {
background-color: #333; /* Dark background for main content area */ border-radius: 10px;
padding: 6px;
width: 100%; /* Full width input fields */
box-sizing: border-box; /* Border box sizing for padding and borders */
}
.button2 {
border-radius: 10px;
padding: 6px;
transition: background-color 0.3s ease; /* Transition for button hover effects */
width: auto; /* Width is determined by content within */
margin: 0.5em 0; /* Margin around buttons */
}
.button2:hover {
background-color:#000000;
color:#ffffff;
}
@media (max-width: 600px) {
label {
width: auto; /* Full width on narrow screens */
} }
/* Additional elements can be customized as needed for dark mode... */ #Main {
width: 100%; /* Full width on narrow screens */
.input {
border-radius: 10px;
padding: 6px;
} }
}
.button2 {
border-radius: 10px;
padding: 6px;
transition: background-color 0.3s ease; /* Transition for button hover effects */
}
.button2:hover {
background-color:#000000;
color:#ffffff;
}