Skip to content

Commit

Permalink
quick fix for server meta
Browse files Browse the repository at this point in the history
  • Loading branch information
ION606 committed Apr 22, 2024
1 parent b2f48fa commit 265b65b
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 5 deletions.
27 changes: 27 additions & 0 deletions client/CSS/utils.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,31 @@
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

#small-screen-warning {
display: none; /* Hidden by default */
background-color: #333; /* Dark grey background */
color: #ccc; /* Light grey text */
padding: 20px; /* Padding for some space inside the div */
text-align: center; /* Center the text */
border-radius: 5px; /* Rounded corners */
border: 1px solid #555; /* Slightly lighter grey border */
margin: 20px; /* Margin around the div */
font-family: Arial, sans-serif; /* Optional: sets the font */
}

a {
color: #4a90e2; /* Light blue link for a pleasant contrast */
text-decoration: none; /* No underline */
}

a:hover {
text-decoration: underline; /* Underline on hover for better usability */
}

@media (max-width: 500px) {
#small-screen-warning {
display: block; /* Show only on small screens */
}
}
5 changes: 4 additions & 1 deletion client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ <h2 id="loadingstatus" style="color: white !important;"></h2>
</div>
</span>
<span id="errWrapper">
<h1>This site is not yet available on screens smaller than 500px!</h1>
<div id="small-screen-warning">
This site is not yet available on screens smaller than 500px!<br><br>
Wanna see more cool stuff? <a href="https://ion606.com">check out my other projects.</a>
</div>
</span>
</body>

Expand Down
6 changes: 4 additions & 2 deletions client/server.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ <h1>Home</h1>
</div>
</span>
<span id="errWrapper">
<h1>This site is not yet available on screens smaller than 500px!</h1>
<h2>In the meantime, feel free to check out my other stuff at <br> <a href="https://www.itamarorenn.com/projects">www.itamarorenn.com</a></h2>
<div id="small-screen-warning">
This site is not yet available on screens smaller than 500px!
<a href="https://ion606.com">See my other projects.</a>
</div>
</span>
</body>
</html>
2 changes: 1 addition & 1 deletion server/createMetaTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export async function createServerMeta(mongoconnection, serverId, sessionid, res
else {
metaTags += `
<meta property="og:url" content="https://chat.itamarorenn.com/server/${serverId}" />
<meta name="description" content="click to view the \"${sdoc.configs.name}\" chat server!">
<meta name="description" content="click to view the \"${sdoc?.configs?.name}\" chat server!">
`;
}

Expand Down
2 changes: 1 addition & 1 deletion server/guilds/chatServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export async function addToServer(mongoconnection, uid, serverId) {

// check if the user is already in the server
const users = await dbo.findOne({ _id: 'classifications', users: [uid] });
if (users) return {code: 200};
if (users) return {code: 200};

if (!uConfStripped) return { type: 1, code: 404, msg: "user not found" };

Expand Down

0 comments on commit 265b65b

Please sign in to comment.