Skip to content

Commit

Permalink
Add Favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
foivospro committed Oct 1, 2024
1 parent aeceefe commit 19b3806
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 8 deletions.
Empty file modified bin/pre-commit
100755 → 100644
Empty file.
Empty file removed blockly_unix_database.db
Empty file.
Binary file modified db/blockly_unix_database.db
Binary file not shown.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
/>
<link id="light-theme" rel="stylesheet" href="css/styles.css" />
<link id="dark-theme" rel="stylesheet" href="css/styledark.css" disabled />
<link rel="icon" href="/img/favicon.png" />
</head>
<body>
<div id="navbar">
Expand Down
29 changes: 26 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@blockly/toolbox-search": "^2.0.8",
"dotenv": "^16.4.5",
"passport-google-oauth20": "^2.0.0",
"serve-favicon": "^2.5.0",
"sqlite3": "^5.1.7"
}
}
Binary file added public/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions public/js/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
Blockly.JavaScript.init(workspace);
Blockly.JavaScript = new Blockly.Generator('JavaScript');
var generator = javascript.javascriptGenerator;
let workspaceChangedAfterLastExecution = false; // Flag to track if the workspace has changed after execution
let hasExecuted = false;
let executedWorkspace = '';
Expand Down
3 changes: 2 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const flash = require('express-flash');
const session = require('express-session');
const jwt = require('jsonwebtoken');
const cookieParser = require('cookie-parser');
const favicon = require('serve-favicon');
const sqlite3 = require('sqlite3').verbose();
app.use(express.json());
const db = new sqlite3.Database('db/blockly_unix_database.db', (err) => {
Expand Down Expand Up @@ -68,7 +69,7 @@ app.use((req, res, next) => {
function addAuthToken(req, res, next) {
if (req.isAuthenticated()) {
const token = jwt.sign({ user: req.user.id }, process.env.SECRET_KEY, {
expiresIn: '20m'
expiresIn: '30m'
}); // Token expires in 10 seconds for testing. When in production, set to 20 minutes
req.authToken = token;
} else {
Expand Down
1 change: 1 addition & 0 deletions views/homePage.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<!-- Link to custom CSS -->
<link rel="stylesheet" href="/css/homePage.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<link rel="icon" href="/img/favicon.png">

<script>
document.addEventListener('DOMContentLoaded', () => {
Expand Down
2 changes: 1 addition & 1 deletion views/login.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">

<link rel="icon" href="/img/favicon.png">
</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions views/register.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link rel="stylesheet" href="homePage.css">
<link rel="icon" href="/img/favicon.png">
<style>
body {
background-color: #F2F2F2;
Expand Down
1 change: 1 addition & 0 deletions views/tutorials.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<!-- Link to custom CSS -->
<link rel="stylesheet" href="/css/homePage.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<link rel="icon" href="/img/favicon.png">

<script>
document.addEventListener('DOMContentLoaded', () => {
Expand Down

0 comments on commit 19b3806

Please sign in to comment.