diff --git a/index.html b/index.html index 3458469..df23161 100644 --- a/index.html +++ b/index.html @@ -232,8 +232,6 @@ @@ -254,16 +252,14 @@
-
-
+
+
Results will appear here... + +
-
diff --git a/public/main.js b/public/main.js index 7081e1d..8c38489 100644 --- a/public/main.js +++ b/public/main.js @@ -22,14 +22,6 @@ document document.getElementById('light-theme').disabled = true; document.getElementById('dark-theme').disabled = false; workspace.setTheme(Blockly.Themes.Dark); - } else if (selectedTheme === 'tritanopia') { - workspace.setTheme(Blockly.Themes.Tritanopia); - document.getElementById('light-theme').disabled = false; - document.getElementById('dark-theme').disabled = true; - } else if (selectedTheme === 'dark-tritanopia') { - workspace.setTheme(Blockly.Themes.DarkTritanopia); - document.getElementById('light-theme').disabled = true; - document.getElementById('dark-theme').disabled = false; } }); diff --git a/public/styledark.css b/public/styledark.css index 89f1134..8514688 100644 --- a/public/styledark.css +++ b/public/styledark.css @@ -20,6 +20,10 @@ body { color: rgb(208, 208, 208); /* Light text color for contrast */ } +#navbar { + background-color: #252526; +} + #blocklyArea { height: 85%; } @@ -43,18 +47,34 @@ body { box-sizing: border-box; padding: 10px; border-top: 1px solid #555; /* Darker border for results area */ - background-color: #2e2e2e; /* Dark background for results wrapper */ } #resultsArea { - position: relative; + position: relative; /* To allow absolute positioning for button */ margin-top: 8px; - padding: 9px; - background: #3a3a3a; /* Darker background for results area */ - height: 25px; + padding: 9px 40px 9px 9px; /* Adjust padding to provide space for the button */ + background: #252526; /* Dark background for results area */ overflow-y: hidden; border-radius: 8px; + border: 1px solid #555; /* Darker border */ color: #fff; /* White text for results area */ + display: flex; /* Flexbox layout */ + align-items: center; /* Vertically center content */ + justify-content: space-between; /* Space between text and button */ +} + +#copyButton { + position: absolute; /* Positioned relative to #resultsArea */ + right: 10px; /* 10px from the right edge of #resultsArea */ + top: 50%; /* Center vertically */ + transform: translateY(-50%); /* Adjust for vertical centering */ + background-color: #252526 !important; /* Dark grey background color */ + border: none !important; /* Remove border */ + outline: none !important; /* Remove outline */ + box-shadow: none !important; /* Remove shadow */ + border-radius: 4px; /* Slight rounding for aesthetics */ + color: #fff; /* White color for the icon */ + cursor: pointer; } .blockly-minimap { @@ -78,18 +98,6 @@ body { fill: #252526; /* Applies to SVG elements */ } -#copyButton { - position: absolute; - right: 10px; - bottom: 21px; - background-color: rgb(37, 37, 38) !important; /* Μαύρο-γκρι χρώμα */ - border: none !important; /* Αφαίρεση περιγράμματος */ - outline: none !important; /* Αφαίρεση του outline (αν υπάρχει) */ - box-shadow: none !important; /* Αφαίρεση σκιάς (αν υπάρχει) */ - border-radius: 0%; /* Καμία στρογγυλοποίηση στις γωνίες */ - color: #fff; /* Λευκό χρώμα για το εικονίδιο */ -} - .icon-button:hover { background-color: #444; /* Darker hover state color */ } @@ -154,6 +162,7 @@ body { align-items: center; justify-content: flex-end; padding: 4px; + background-color: rgb(37, 37, 38); } button { diff --git a/public/styles.css b/public/styles.css index 8f745a5..72daee8 100644 --- a/public/styles.css +++ b/public/styles.css @@ -43,13 +43,31 @@ body { } #resultsArea { - position: relative; + position: relative; /* To position the button inside */ margin-top: 8px; - padding: 9px; + padding: 9px 40px 9px 9px; /* Adjust padding to provide space for button */ background: #fff; - height: 25px; + height: auto; /* Adjust height to fit content */ overflow-y: hidden; - border-radius: 3px; + border-radius: 8px; + border: 1px solid #d1d1d1; + display: flex; /* Flexbox layout */ + align-items: center; /* Vertically center content */ + justify-content: space-between; /* Space between text and button */ +} + +#copyButton { + position: absolute; /* Positioned relative to #resultsArea */ + right: 10px; /* 10px from the right edge of #resultsArea */ + top: 50%; /* Center vertically */ + transform: translateY(-50%); /* Adjust for vertical centering */ + background-color: rgb(255, 255, 255) !important; + border: none !important; + outline: none !important; + box-shadow: none !important; + border-radius: 4px; /* Slight rounding for aesthetics */ + color: #000000; + cursor: pointer; } .blockly-minimap { @@ -71,18 +89,6 @@ body { fill-opacity: 0.1; } -#copyButton { - position: absolute; - right: 10px; - bottom: 21px; - background-color: rgb(255, 255, 255) !important; - border: none !important; - outline: none !important; - box-shadow: none !important; - border-radius: 0%; - color: #000000; -} - .icon-button:hover { background-color: #e7e7e7; /* Hover state color */ } @@ -125,7 +131,6 @@ body { padding: 4px; height: 100%; border-radius: 5px; /* Rounded corners */ - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } #loginButton, diff --git a/server.js b/server.js index 0b4bea6..ea4d325 100644 --- a/server.js +++ b/server.js @@ -78,37 +78,6 @@ app.use((req, res, next) => { next(); }); -function checkRememberMe(req, res, next) { - if (req.isAuthenticated()) { - return next(); - } - const token = req.cookies.remember_me; - if (token) { - jwt.verify(token, process.env.SECRET_KEY, (err, decoded) => { - if (err) { - return next(); - } - db.get( - 'SELECT * FROM users WHERE id = ?', - [decoded.user], - (err, user) => { - if (err || !user) { - return next(); - } - req.logIn(user, (err) => { - if (err) { - return next(); - } - return res.redirect('/blockly_unix'); - }); - } - ); - }); - } else { - return next(); - } -} - // Middleware to add auth token function addAuthToken(req, res, next) { if (req.isAuthenticated()) { diff --git a/views/login.ejs b/views/login.ejs index a8f4efd..ec105ff 100644 --- a/views/login.ejs +++ b/views/login.ejs @@ -46,7 +46,7 @@ Home
@@ -77,10 +77,6 @@
-
- - Remember Me -
diff --git a/views/register.ejs b/views/register.ejs index 8af9942..0ba5b19 100644 --- a/views/register.ejs +++ b/views/register.ejs @@ -48,7 +48,7 @@ Home