mirror of
https://github.com/abrendan/MicDropMessages.git
synced 2025-12-14 17:34:05 +01:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b28d9a16db | ||
|
|
91e2fa270a | ||
|
|
201546a7f3 | ||
|
|
1733bb9a00 | ||
|
|
5ad7ad2ce6 | ||
|
|
226f1250da | ||
|
|
8f6697b00b | ||
|
|
831834728d | ||
|
|
7bd7e14910 | ||
|
|
da41439428 | ||
|
|
3ff4eedf62 | ||
|
|
d4112b4a19 | ||
|
|
b23c6692ab | ||
|
|
b1bccfb358 | ||
|
|
a80e0b0abc | ||
|
|
83a6d186ea | ||
|
|
30f3ea974d |
@@ -2,5 +2,9 @@
|
|||||||
|
|
||||||
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!
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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,8 @@
|
|||||||
<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.2 </h1>
|
<!-- <img id = "Logo" src="https://micdropmessages.app/pictures/micdropmessages_logo-circle.png" alt="Logo"> -->
|
||||||
|
<h1 id = "Title"> MicDropMessages V2 </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,10 +39,14 @@
|
|||||||
<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>
|
||||||
|
<p class="version-number">V2.0.1</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
BIN
html/pictures/jezael-melgoza-2FiXtdnVhjQ-unsplash.jpg
Normal file
BIN
html/pictures/jezael-melgoza-2FiXtdnVhjQ-unsplash.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 540 KiB |
BIN
html/pictures/micdropmessages_logo-circle.png
Normal file
BIN
html/pictures/micdropmessages_logo-circle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 448 KiB |
56
html/privacy.html
Normal file
56
html/privacy.html
Normal file
File diff suppressed because one or more lines are too long
@@ -39,7 +39,7 @@ function onload(){
|
|||||||
}
|
}
|
||||||
for (var i = 0; i < messages.length; i++){
|
for (var i = 0; i < messages.length; i++){
|
||||||
document.getElementById("Message"+i).innerHTML = messages[i];
|
document.getElementById("Message"+i).innerHTML = messages[i];
|
||||||
document.getElementById("Message"+i).style.color = "#000000";
|
document.getElementById("Message"+i).style.color = getComputedStyle(document.body).color;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -64,3 +64,13 @@ function delayReset(){
|
|||||||
function toggleDarkMode() {
|
function toggleDarkMode() {
|
||||||
document.body.classList.toggle('dark-mode');
|
document.body.classList.toggle('dark-mode');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.addEventListener('keydown', function(event) {
|
||||||
|
// Check if Alt + Ctrl + R are pressed together
|
||||||
|
if (event.altKey && event.ctrlKey && event.key === 'r') {
|
||||||
|
// Prevent the default action to avoid conflicts
|
||||||
|
event.preventDefault();
|
||||||
|
// Open the desired webpage in a new window/tab
|
||||||
|
window.open('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
|
||||||
|
}
|
||||||
|
});
|
||||||
224
html/style.css
224
html/style.css
@@ -1,88 +1,156 @@
|
|||||||
body{
|
body{
|
||||||
background-image: url('https://images.unsplash.com/37/IHLjdHdzSvi0rgUMMlSK_TE3_0286.jpg'); /* Path to your example image */
|
background-image: url('https://micdropmessages.app/pictures/jezael-melgoza-2FiXtdnVhjQ-unsplash.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 */
|
||||||
|
align-items: center; /* Center vertically */
|
||||||
|
}
|
||||||
|
label{
|
||||||
|
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 */
|
||||||
|
text-align: left; /* Align text to the left */
|
||||||
|
}
|
||||||
|
input{
|
||||||
|
background-color: rgba(255, 255, 255, 0.15);
|
||||||
|
color: #000000;
|
||||||
|
font-size: 120%;
|
||||||
|
border: none;
|
||||||
|
width: 100%; /* Full width input fields */
|
||||||
|
box-sizing: border-box; /* Border box sizing for padding and borders */
|
||||||
|
margin-bottom: 1em; /* Provide space below inputs */
|
||||||
|
}
|
||||||
|
.Message{
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
#Logo{
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
#Main{
|
||||||
|
min-height: 94.5vh; /* Stretch to fill the viewport height */
|
||||||
|
width: 50%;
|
||||||
|
padding: 20px; /* Padding added to the main content area */
|
||||||
|
border-radius: 10px;
|
||||||
|
backdrop-filter: blur(5px); /* Provide a translucent frosted-glass effect */
|
||||||
|
-webkit-backdrop-filter: blur(5px);
|
||||||
|
background-color: rgba(255, 255, 255, 0.2); /* Slightly white transparent background */
|
||||||
|
display: flex; /* Adding flex properties to layout contents */
|
||||||
|
flex-direction: column; /* Stack children elements vertically */
|
||||||
|
align-items: center; /* Centering child elements horizontally */
|
||||||
|
position: relative; /* To position the version number correctly */
|
||||||
|
}
|
||||||
|
#Title{
|
||||||
|
font-size: 300%;
|
||||||
|
}
|
||||||
|
#LinkButtons{
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
background-color:transparent;
|
||||||
|
border-radius:28px;
|
||||||
|
border:0px solid #000000;
|
||||||
|
display:inline-block;
|
||||||
|
cursor:pointer;
|
||||||
|
color:#000000;
|
||||||
|
font-size:17px;
|
||||||
|
padding:16px 31px;
|
||||||
|
text-decoration:none;
|
||||||
|
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 */
|
||||||
|
width: auto; /* Width is determined by content within */
|
||||||
|
margin: 0.5em 0; /* Margin around buttons */
|
||||||
|
}
|
||||||
|
.button:hover {
|
||||||
|
background-color:#000000;
|
||||||
|
color:#ffffff;
|
||||||
|
}
|
||||||
|
.button:active {
|
||||||
|
position:relative;
|
||||||
|
top:1px;
|
||||||
|
}
|
||||||
|
/* Add this to your CSS to support dark mode */
|
||||||
|
body.dark-mode {
|
||||||
|
color: #ffffff; /* Light text color for contrast */
|
||||||
|
|
||||||
label{
|
background-color: rgba(0, 0, 0, 1); /* Slightly transparent dark background */
|
||||||
width: 5%;
|
}
|
||||||
display: inline-block;
|
body.dark-mode .button {
|
||||||
text-align: right;
|
color: #ffffff; /* Dark button background color */
|
||||||
}
|
}
|
||||||
|
body.dark-mode .button2 {
|
||||||
|
color: #ffffff; /* Dark button background color */
|
||||||
|
}
|
||||||
|
body.dark-mode .input {
|
||||||
|
color: #ffffff; /* Dark button background color */
|
||||||
|
}
|
||||||
|
.dark-mode #Main {
|
||||||
|
background-color: rgba(0, 0, 0, 0.5); /* Slightly transparent dark background */
|
||||||
|
}
|
||||||
|
body.dark-mode .version-number {
|
||||||
|
color: #ffffff; /* Dark button background color */
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
input{
|
.version-number {
|
||||||
background-color: rgba(255, 255, 255, 0.15);
|
position: absolute;
|
||||||
color: #000000;
|
bottom: 1px;
|
||||||
font-size: 120%;
|
right: 10px;
|
||||||
border: none;
|
font-size: 0.75em;
|
||||||
|
color: #000000; /* Assuming light text for visibility against a potentially dark background */
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
label {
|
||||||
|
width: auto; /* Full width on narrow screens */
|
||||||
}
|
}
|
||||||
|
#Main {
|
||||||
.Message{
|
width: 100%; /* Full width on narrow screens */
|
||||||
color: #000000;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#Main{
|
@media (max-width: 650px) {
|
||||||
padding: 20px; /* Padding added to the main content area */
|
#Title {
|
||||||
border-radius: 10px;
|
font-size: 150%;
|
||||||
backdrop-filter: blur(5px); /* Provide a translucent frosted-glass effect */
|
|
||||||
background-color: rgba(255, 255, 255, 0.2); /* Slightly white transparent background */
|
|
||||||
}
|
}
|
||||||
|
#ConnectButton {
|
||||||
#Title{
|
display: block;
|
||||||
font-size: 300%;
|
margin: 0 auto;
|
||||||
|
padding: 20px 40px; /* Increase the padding to make the button bigger */
|
||||||
|
font-size: 20px; /* Increase the font-size for better readability on small screens */
|
||||||
}
|
}
|
||||||
|
#WebsiteButton {
|
||||||
.button {
|
display: block;
|
||||||
background-color:transparent;
|
margin: 0 auto;
|
||||||
border-radius:28px;
|
|
||||||
border:0px solid #000000;
|
|
||||||
display:inline-block;
|
|
||||||
cursor:pointer;
|
|
||||||
color:#000000;
|
|
||||||
font-size:17px;
|
|
||||||
padding:16px 31px;
|
|
||||||
text-decoration:none;
|
|
||||||
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:hover {
|
#LinkButtons {
|
||||||
background-color:#000000;
|
text-align: center;
|
||||||
color:#ffffff;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.button:active {
|
#SendMessage {
|
||||||
position:relative;
|
display: block;
|
||||||
top:1px;
|
margin: 0 auto;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 20px 40px; /* Increase the padding to make the button bigger */
|
||||||
|
font-size: 20px; /* Increase the font-size for better readability on small screens */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* Add this to your CSS to support dark mode */
|
|
||||||
body.dark-mode {
|
|
||||||
color: #ffffff; /* Light text color for contrast */
|
|
||||||
}
|
|
||||||
/* You might want to customize other elements for dark mode, for example: */
|
|
||||||
.dark-mode #Main {
|
|
||||||
background-color: #333; /* Dark background for main content area */
|
|
||||||
}
|
|
||||||
/* Additional elements can be customized as needed for dark mode... */
|
|
||||||
|
|
||||||
.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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user