Skip to content

Commit

Permalink
Default custom style
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobmarin committed Aug 17, 2020
1 parent bcdda6e commit 6dc3a9b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ https://<domain>/playback/presentation/2.3/<recordId>

- chat:
- `scroll`: automatic scroll [`true`|`false`]
- `align`: scroll align [`top`|`center`|`bottom`]
- `align`: scroll align [`top`|`middle`|`bottom`]

- controls:
- `about`
Expand Down Expand Up @@ -76,12 +76,13 @@ https://<domain>/playback/presentation/2.3/<recordId>
- `seconds`: 15

- styles: custom styles
- `url`: css files host
- `default`: default style
- `url`: styles host
- `valid`: valid style names

- thumbnails:
- `scroll`: automatic scroll [`true`|`false`]
- `align`: scroll align [`top`|`center`|`bottom`]
- `align`: scroll align [`left`|`center`|`right`]

- video: primary media configuration
- `fps`: frames per second
Expand Down
2 changes: 2 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

BBB_PLAYBACK_HOMEPAGE=playback/presentation/2.3
BBB_PLAYBACK=/var/bigbluebutton/$BBB_PLAYBACK_HOMEPAGE

Expand Down
2 changes: 1 addition & 1 deletion src/components/utils/avatar/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ $avatar-size: 2.25rem;

.avatar {
border-radius: 50%;
color: var(--avatar-color);
height: $avatar-size;
text-align: center;
width: $avatar-size;

.initials {
align-items: center;
color: var(--avatar-color);
display: flex;
height: 100%;
justify-content: center;
Expand Down
1 change: 1 addition & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
}
},
"styles": {
"default": null,
"url": "HOST",
"valid": []
},
Expand Down
10 changes: 4 additions & 6 deletions src/utils/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,12 @@ const getScrollTop = (firstNode, currentNode, align) => {

const getStyle = () => {
const params = new URLSearchParams(window.location.search);
const { styles } = config;
const { url } = styles;

let style;
let style = styles.default ? `${url}/${styles.default}.css` : null;
if (params && params.has('s')) {
const {
url,
valid,
} = config.styles;

const { valid } = styles;
const value = params.get('s');
if (valid.includes(value)) {
style = `${url}/${value}.css`;
Expand Down

0 comments on commit 6dc3a9b

Please sign in to comment.