Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional material design #255

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add material design theme option
h2Entwicklung committed Sep 4, 2022

Verified

This commit was signed with the committer’s verified signature.
mrgrain Momo Kornher
commit a1730206ef5f8079314956711e135a971275781d
1 change: 1 addition & 0 deletions client-data/board.html
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
<title>{{board}} | WBO | {{translations.collaborative_whiteboard}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" href="../board.css" />
{{#if theme}}<link rel="stylesheet" type="text/css" href="../{{theme}}_board.css" /> {{/if}}
<script src="../socket.io/socket.io.js"></script>
<meta name="description" content="{{translations.tagline}}" />
<meta name="keywords"
23 changes: 23 additions & 0 deletions client-data/material_board.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

#menu .tool {
border-radius: 0.5rem;
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 7%), 0 4px 6px -2px rgb(0 0 0 / 5%);
background-color: #f2f6fc;
margin-top: 16px;
}
#menu .tool.curTool {
box-shadow: 0 4px 10px 0 rgb(0 0 0 / 20%), 0 4px 20px 0 rgb(0 0 0 / 10%);
border-bottom: 4px solid #36A2FF;
background: #f2f6fc;
}
#textToolInput {
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 7%), 0 4px 6px -2px rgb(0 0 0 / 5%);
padding: 8px;
font-size: 24px;
border: none;
background: #f2f6fc;
}
#textToolInput:focus-visible {
border: none;
box-shadow: 0 4px 10px 0 rgb(0 0 0 / 20%), 0 4px 20px 0 rgb(0 0 0 / 10%);
}
3 changes: 3 additions & 0 deletions server/configuration.js
Original file line number Diff line number Diff line change
@@ -58,4 +58,7 @@ module.exports = {
/** Secret key for jwt */
AUTH_SECRET_KEY: (process.env["AUTH_SECRET_KEY"] || ""),

/** Theme options e.g. material */
THEME_OPTIONS: (process.env["THEME_OPTIONS"] || ""),

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need that do we ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️

};
3 changes: 2 additions & 1 deletion server/templating.js
Original file line number Diff line number Diff line change
@@ -51,7 +51,8 @@ class Template {
const prefix = request.url.split("/boards/")[0].substr(1);
const baseUrl = findBaseUrl(request) + (prefix ? prefix + "/" : "");
const moderator = isModerator;
return { baseUrl, languages, language, translations, configuration, moderator };
const theme = process.env.THEME_OPTIONS===''?false:process.env.THEME_OPTIONS;
return { baseUrl, languages, language, translations, configuration, moderator, theme};
}
serve(request, response, isModerator) {
const parsedUrl = url.parse(request.url, true);