Skip to content

Commit ebc1fb1

Browse files
committed
doc: add SCSS variables for plugins
1 parent 469a766 commit ebc1fb1

File tree

6 files changed

+76
-6
lines changed

6 files changed

+76
-6
lines changed

docs/plugins/gallery.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,18 @@ This plugin adds buttons to the default navbar:
194194
- `gallery` allows to toggle the gallery panel
195195

196196
If you use a [custom navbar](../guide/navbar.md) you will need to manually add the buttons to the list.
197+
198+
## SCSS variables
199+
200+
| variable | default | description |
201+
| -------- | ------- | ----------- |
202+
| $psv-gallery-breakpoint | 500px | Screen size bellow which the gallery is displayed full-height |
203+
| $psv-gallery-padding | 15px | Padding of the container |
204+
| $psv-gallery-border | 1px solid $psv-caption-text-color | Border between the gallery and the navbar |
205+
| $psv-gallery-background | $psv-navbar-background | Background of the gallery |
206+
| $psv-gallery-item-radius | 5px | Corner radius of gallery items |
207+
| $psv-gallery-item-active-border | 3px solid white | Border of active gallery item |
208+
| $psv-gallery-title-font | $psv-caption-font | Font of the gallery item title |
209+
| $psv-gallery-title-color | $psv-caption-text-color | Color of the gallery item title |
210+
| $psv-gallery-title-background | rgba(0, 0, 0, .6) | Background of the gallery item title |
211+
| $psv-gallery-thumb-hover-scale | 1.2 | Scale factor of thumbnails on mouse hover |

docs/plugins/map.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,3 +428,15 @@ mapPlugin.addEventListener('select-hotspot', ({ hotspotId }) => {
428428
#### `view-changed(view)`
429429

430430
Triggered when the map is maximized (`view=maximized`), minimized or opened (`view=normal`) or closed (`view=closed`).
431+
432+
## SCSS variables
433+
434+
| variable | default | description |
435+
| -------- | ------- | ----------- |
436+
| $psv-map-background | rgba(61, 61, 61, .7) | Background color of the map |
437+
| $psv-map-button-size | 34px | Size of map buttons |
438+
| $psv-map-button-color | $psv-buttons-color | Color of map buttons |
439+
| $psv-map-toolbar-font | 12px sans-serif | Font for the zoom indicator |
440+
| $psv-map-toolbar-text-color | white | Color of the zoom indicator |
441+
| $psv-map-toolbar-background | #222 | Background color of the zoom indicator |
442+
| $psv-map-transition | ease-in-out .3s | Transition |

docs/plugins/plan.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,3 +414,14 @@ planPlugin.addEventListener('select-hotspot', ({ hotspotId }) => {
414414
#### `view-changed(view)`
415415

416416
Triggered when the map is maximized (`view=maximized`), minimized or opened (`view=normal`) or closed (`view=closed`).
417+
418+
## SCSS variables
419+
420+
| variable | default | description |
421+
| -------- | ------- | ----------- |
422+
| $psv-plan-radius | 8px | Corner radius of the plan |
423+
| $psv-plan-shadow | 0 0 5px rgba(0, 0, 0, .7) | Shadow applied to the plan |
424+
| $psv-plan-button-size | 34px | Size if plan buttons |
425+
| $psv-plan-button-background | rgba(0, 0, 0, .7) | Background color of buttons |
426+
| $psv-plan-button-color | white | Icon color if buttons |
427+
| $psv-map-transition | ease-in-out .3s | Transition |

docs/plugins/settings.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This plugin is available in the [@photo-sphere-viewer/settings-plugin](https://w
1313

1414
## Usage
1515

16-
Once enabled the plugin will add a new "Settings" button which other plugins can use to display various settings in the side panel.
16+
Once enabled the plugin will add a new "Settings" button which can be populated by other plugins.
1717

1818
```js
1919
const viewer = new PhotoSphereViewer.Viewer({
@@ -187,3 +187,17 @@ This plugin adds buttons to the default navbar:
187187
- `settings` allows to open the settings panel
188188

189189
If you use a [custom navbar](../guide/navbar.md) you will need to manually add the buttons to the list.
190+
191+
## SCSS variables
192+
193+
| variable | default | description |
194+
| -------- | ------- | ----------- |
195+
| $psv-settings-font | $psv-caption-font | Font of settings |
196+
| $psv-settings-text-color | $psv-panel-text-color | Text color of settings |
197+
| $psv-settings-background | $psv-panel-background | Background color of settings |
198+
| $psv-settings-item-height | $psv-panel-menu-item-height | Height of each settings item |
199+
| $psv-settings-item-padding | $psv-panel-menu-item-padding | Padding of each settings item |
200+
| $psv-settings-hover-background | $psv-panel-menu-hover-background | Background color of items on mouse hover |
201+
| $psv-settings-badge-font | 10px / .9 monospace | Font of the badge displayed on the button |
202+
| $psv-settings-badge-text-color | white | Text color if the badge |
203+
| $psv-settings-badge-background | #111 | Background color of the badge |

docs/plugins/video.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,22 @@ This plugin adds buttons to the default navbar:
230230
- `videoTime` shows the video time and duration (not a real button)
231231

232232
If you use a [custom navbar](../guide/navbar.md) you will need to manually add the buttons to the list.
233+
234+
## SCSS variables
235+
236+
| variable | default | description |
237+
| -------- | ------- | ----------- |
238+
| $psv-progressbar-height | 3px | Height of the progress bar |
239+
| $psv-progressbar-height-active | 5px | Height of the progress bar on mouse hover |
240+
| $psv-progressbar-progress-color | $psv-buttons-color | Color of the playing progress bar |
241+
| $psv-progressbar-buffer-color | $psv-buttons-active-background | Color of the buffer progress bar |
242+
| $psv-progressbar-handle-size | 9px | Size of the seek handle |
243+
| $psv-progressbar-handle-color | white | Color of the seek handle |
244+
| $psv-volume-height | 80px | Height of the volume control |
245+
| $psv-volume-width | $psv-progressbar-height-active | Width of the volume control |
246+
| $psv-volume-bar-color | $psv-progressbar-progress-color | Color of the volume controle |
247+
| $psv-volume-track-color | $psv-progressbar-buffer-color | Background color of the volume control |
248+
| $psv-volume-handle-size | $psv-progressbar-handle-size | Size of the volume handle |
249+
| $psv-volume-handle-color | $psv-progressbar-handle-color | Color of the volume handle |
250+
| $psv-video-bigbutton-color | $psv-buttons-color | Color of the central play button |
251+
| $psv-video-bigbutton-size | (portrait: 20vw,<br>landscape: 10vw) | Size if the central play button, depending on screen orientation |

packages/plan-plugin/src/style.scss

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ $psv-plan-shadow: 0 0 5px rgba(0, 0, 0, 0.7) !default;
77
$psv-plan-button-size: 34px !default;
88
$psv-plan-button-background: rgba(0, 0, 0, 0.7) !default;
99
$psv-plan-button-color: white !default;
10-
$psv-plan-button-radius: $psv-plan-radius !default;
1110
$psv-plan-transition: ease-in-out 0.3s !default;
1211

1312
.psv-container {
@@ -59,25 +58,25 @@ $psv-plan-transition: ease-in-out 0.3s !default;
5958
&--top-left {
6059
left: 0;
6160
top: 0;
62-
border-bottom-right-radius: $psv-plan-button-radius;
61+
border-bottom-right-radius: $psv-plan-radius;
6362
}
6463

6564
&--top-right {
6665
right: 0;
6766
top: 0;
68-
border-bottom-left-radius: $psv-plan-button-radius;
67+
border-bottom-left-radius: $psv-plan-radius;
6968
}
7069

7170
&--bottom-left {
7271
left: 0;
7372
bottom: 0;
74-
border-top-right-radius: $psv-plan-button-radius;
73+
border-top-right-radius: $psv-plan-radius;
7574
}
7675

7776
&--bottom-right {
7877
right: 0;
7978
bottom: 0;
80-
border-top-left-radius: $psv-plan-button-radius;
79+
border-top-left-radius: $psv-plan-radius;
8180
}
8281
}
8382

0 commit comments

Comments
 (0)