@projektemacher/storymapjs 0.10.6 → 0.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG +11 -0
- package/dist/assets/{demo-CVQ7kFek.js → demo-D6cTmzn6.js} +1 -1
- package/dist/assets/{harness-C-VZV-ou.js → harness-BPFlzutp.js} +1 -1
- package/dist/assets/main-Y-MYUSJ4.js +17 -0
- package/dist/css/fonts/font.oldstandard.css +18 -22
- package/dist/demo.html +2 -2
- package/dist/docs/migration.html +1 -1
- package/dist/embed/index.html +129 -4
- package/dist/harness.html +2 -2
- package/dist/index.html +17 -0
- package/dist/js/storymap.d.ts +126 -7
- package/dist/js/storymap.js +4518 -3613
- package/dist/js/storymap.js.map +1 -1
- package/docs/migration-from-knightlab.md +139 -0
- package/docs/storymap-as-iiif-manifest.md +510 -0
- package/package.json +6 -3
- package/src/animation/easings.ts +18 -0
- package/src/animation/morpheus.d.ts +41 -0
- package/src/core/Browser.ts +19 -0
- package/src/core/Load.ts +180 -0
- package/src/core/Util.ts +354 -0
- package/src/core/mixins.ts +171 -0
- package/src/dom/Dom.ts +31 -0
- package/src/dom/DomEvent.ts +61 -0
- package/src/globals.d.ts +16 -0
- package/src/language/Language.ts +107 -0
- package/src/language/locale/be.json +18 -0
- package/src/language/locale/bg.json +18 -0
- package/src/language/locale/cs.json +18 -0
- package/src/language/locale/de.json +20 -0
- package/src/language/locale/el.json +18 -0
- package/src/language/locale/en.json +28 -0
- package/src/language/locale/es.json +18 -0
- package/src/language/locale/et.json +18 -0
- package/src/language/locale/fr.json +18 -0
- package/src/language/locale/he.json +18 -0
- package/src/language/locale/hu.json +18 -0
- package/src/language/locale/is.json +18 -0
- package/src/language/locale/it.json +18 -0
- package/src/language/locale/jp.json +18 -0
- package/src/language/locale/ko.json +18 -0
- package/src/language/locale/nl.json +18 -0
- package/src/language/locale/nn.json +18 -0
- package/src/language/locale/no.json +18 -0
- package/src/language/locale/pl.json +18 -0
- package/src/language/locale/pt.json +18 -0
- package/src/language/locale/ru.json +18 -0
- package/src/language/locale/sk.json +18 -0
- package/src/language/locale/sr.json +17 -0
- package/src/language/locale/sv.json +18 -0
- package/src/language/locale/tr.json +18 -0
- package/src/language/locale/uk.json +18 -0
- package/src/language/locale/ur.json +18 -0
- package/src/language/locale/zh-cn.json +18 -0
- package/src/language/locale/zh-tw.json +18 -0
- package/src/main.ts +51 -0
- package/src/map/Map.ts +717 -0
- package/src/map/MapMarker.ts +149 -0
- package/src/map/openlayers/Map.OpenLayers.ts +1879 -0
- package/src/map/openlayers/MapMarker.OpenLayers.ts +176 -0
- package/src/map/openlayers/zoomifyTiles.ts +28 -0
- package/src/map/types.ts +17 -0
- package/src/media/EmbedUtil.ts +168 -0
- package/src/media/Media.ts +409 -0
- package/src/media/MediaType.ts +163 -0
- package/src/media/types/Audio.ts +87 -0
- package/src/media/types/Blockquote.ts +40 -0
- package/src/media/types/DailyMotion.ts +58 -0
- package/src/media/types/DocumentCloud.ts +41 -0
- package/src/media/types/Facebook.ts +41 -0
- package/src/media/types/Flickr.ts +115 -0
- package/src/media/types/GoogleDoc.ts +59 -0
- package/src/media/types/IFrame.ts +51 -0
- package/src/media/types/Image.ts +49 -0
- package/src/media/types/Juxtapose.ts +32 -0
- package/src/media/types/SoundCloud.ts +77 -0
- package/src/media/types/Text.ts +172 -0
- package/src/media/types/Twitter.ts +96 -0
- package/src/media/types/Video.ts +84 -0
- package/src/media/types/Vimeo.ts +65 -0
- package/src/media/types/Website.ts +36 -0
- package/src/media/types/Wikipedia.ts +124 -0
- package/src/media/types/YouTube.ts +192 -0
- package/src/scss/Typography.scss +237 -0
- package/src/scss/VCO.StoryMap.Dark.scss +138 -0
- package/src/scss/VCO.StoryMap.scss +164 -0
- package/src/scss/Variables.Dark.scss +56 -0
- package/src/scss/Variables.scss +47 -0
- package/src/scss/core/Mixins.scss +112 -0
- package/src/scss/core/Reset.scss +206 -0
- package/src/scss/fonts/_font.base.scss +113 -0
- package/src/scss/fonts/font.abril-droidsans.scss +75 -0
- package/src/scss/fonts/font.amatic-andika.scss +73 -0
- package/src/scss/fonts/font.bitter-raleway.scss +86 -0
- package/src/scss/fonts/font.clicker-garamond.scss +92 -0
- package/src/scss/fonts/font.dancing-ledger.scss +74 -0
- package/src/scss/fonts/font.default.scss +9 -0
- package/src/scss/fonts/font.fjalla-average.scss +80 -0
- package/src/scss/fonts/font.georgia-helvetica.scss +58 -0
- package/src/scss/fonts/font.knightlab.scss +97 -0
- package/src/scss/fonts/font.lustria-lato.scss +80 -0
- package/src/scss/fonts/font.medula-lato.scss +73 -0
- package/src/scss/fonts/font.oldstandard.scss +88 -0
- package/src/scss/fonts/font.opensans-gentiumbook.scss +80 -0
- package/src/scss/fonts/font.playfair-faunaone.scss +86 -0
- package/src/scss/fonts/font.playfair.scss +85 -0
- package/src/scss/fonts/font.pt.scss +90 -0
- package/src/scss/fonts/font.roboto-megrim.scss +73 -0
- package/src/scss/fonts/font.rufina-sintony.scss +73 -0
- package/src/scss/fonts/font.ubuntu.scss +78 -0
- package/src/scss/fonts/font.unicaone-vollkorn.scss +85 -0
- package/src/scss/icons/Icons.scss +239 -0
- package/src/scss/map/VCO.ImageMarker.scss +23 -0
- package/src/scss/map/VCO.Map.scss +21 -0
- package/src/scss/map/VCO.MapMarker.scss +147 -0
- package/src/scss/map/openlayers/VCO.Map.OpenLayers.scss +126 -0
- package/src/scss/media/VCO.Media.scss +222 -0
- package/src/scss/media/types/VCO.Media.Blockquote.scss +76 -0
- package/src/scss/media/types/VCO.Media.IFrame.scss +11 -0
- package/src/scss/media/types/VCO.Media.Image.scss +13 -0
- package/src/scss/media/types/VCO.Media.Instagram.scss +7 -0
- package/src/scss/media/types/VCO.Media.Profile.scss +5 -0
- package/src/scss/media/types/VCO.Media.Text.scss +90 -0
- package/src/scss/media/types/VCO.Media.Twitter.scss +87 -0
- package/src/scss/media/types/VCO.Media.Wikipedia.scss +64 -0
- package/src/scss/site/site.scss +748 -0
- package/src/scss/slider/VCO.Slide.scss +447 -0
- package/src/scss/slider/VCO.SlideNav.scss +338 -0
- package/src/scss/slider/VCO.StorySlider.scss +64 -0
- package/src/scss/snapmap/VCO.SnapMap.scss +103 -0
- package/src/scss/ui/VCO.Consent.scss +77 -0
- package/src/scss/ui/VCO.MenuBar.Button.scss +99 -0
- package/src/scss/ui/VCO.MenuBar.scss +20 -0
- package/src/scss/ui/VCO.Message.scss +104 -0
- package/src/site/site.ts +87 -0
- package/src/slider/Slide.ts +460 -0
- package/src/slider/SlideNav.ts +212 -0
- package/src/slider/StorySlider.ts +722 -0
- package/src/storymap/Consent.ts +146 -0
- package/src/storymap/StoryMap.ts +1108 -0
- package/src/storymap/iiif.ts +386 -0
- package/src/storymap/validate.ts +184 -0
- package/src/types.ts +297 -0
- package/src/ui/Draggable.ts +374 -0
- package/src/ui/MenuBar.ts +323 -0
- package/src/ui/Message.ts +118 -0
- package/src/ui/Swipable.ts +388 -0
- package/dist/assets/main-DwbXrrYn.js +0 -17
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { unique_ID, getUrlVars, ratio } from "../../core/Util";
|
|
2
|
+
import { Media } from "../Media";
|
|
3
|
+
import Dom from "../../dom/Dom";
|
|
4
|
+
import { Language } from "../../language/Language";
|
|
5
|
+
|
|
6
|
+
/* Media.YouTube
|
|
7
|
+
================================================== */
|
|
8
|
+
|
|
9
|
+
/* Minimal surface of the YouTube iframe API player used here. */
|
|
10
|
+
interface YTPlayer {
|
|
11
|
+
playVideo: () => void;
|
|
12
|
+
pauseVideo: () => void;
|
|
13
|
+
seekTo: (seconds: number) => void;
|
|
14
|
+
destroy: () => void;
|
|
15
|
+
loadVideoById: (id: string) => void;
|
|
16
|
+
cueVideoById: (id: string) => void;
|
|
17
|
+
setVolume: (volume: number) => void;
|
|
18
|
+
getDuration: () => number;
|
|
19
|
+
getPlayerState: () => number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* The externally loaded YT global, narrowed at its usage sites. */
|
|
23
|
+
type YTGlobal = {
|
|
24
|
+
Player: new (el: HTMLElement | string, opts: unknown) => YTPlayer;
|
|
25
|
+
PlayerState: Record<string, number>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
interface YouTubeMediaID {
|
|
29
|
+
id?: string;
|
|
30
|
+
start?: number | string;
|
|
31
|
+
hd?: boolean | string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default class YouTube extends Media {
|
|
35
|
+
declare "youtube_loaded": boolean;
|
|
36
|
+
declare "media_id": YouTubeMediaID;
|
|
37
|
+
declare "player": YTPlayer;
|
|
38
|
+
|
|
39
|
+
/* Load the media
|
|
40
|
+
================================================== */
|
|
41
|
+
async _loadMedia() {
|
|
42
|
+
// Loading Message
|
|
43
|
+
this.message.updateMessage(Language.messages.loading + " " + this.options.media_name);
|
|
44
|
+
|
|
45
|
+
this.youtube_loaded = false;
|
|
46
|
+
|
|
47
|
+
// Create Dom element
|
|
48
|
+
this._el.content_item = Dom.create(
|
|
49
|
+
"div",
|
|
50
|
+
"vco-media-item vco-media-youtube vco-media-shadow",
|
|
51
|
+
this._el.content,
|
|
52
|
+
);
|
|
53
|
+
this._el.content_item.id = unique_ID(7);
|
|
54
|
+
|
|
55
|
+
// URL Vars
|
|
56
|
+
const url_vars = getUrlVars(this.data.url);
|
|
57
|
+
|
|
58
|
+
// Get Media ID
|
|
59
|
+
this.media_id = {};
|
|
60
|
+
|
|
61
|
+
if (this.data.url.match("v=")) {
|
|
62
|
+
this.media_id.id = url_vars["v"];
|
|
63
|
+
} else if (this.data.url.match("/embed/")) {
|
|
64
|
+
this.media_id.id = this.data.url.split("embed/")[1].split(/[?&]/)[0];
|
|
65
|
+
} else if (this.data.url.match(/v\/|v=|youtu\.be\/|shorts\//)) {
|
|
66
|
+
this.media_id.id = this.data.url
|
|
67
|
+
.split(/v\/|v=|youtu\.be\/|shorts\//)[1]
|
|
68
|
+
.split(/[?&]/)[0];
|
|
69
|
+
} else {
|
|
70
|
+
console.log("YouTube in URL but not a valid video");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
this.media_id.start = url_vars["t"];
|
|
74
|
+
this.media_id.hd = url_vars["hd"];
|
|
75
|
+
|
|
76
|
+
// API Call
|
|
77
|
+
try {
|
|
78
|
+
await this.loadScript("https://www.youtube.com/iframe_api");
|
|
79
|
+
} catch {
|
|
80
|
+
// aborted or failed to load; nothing to show
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this.createMedia();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Update Media Display
|
|
87
|
+
_updateMediaDisplay() {
|
|
88
|
+
this._el.content_item.style.height =
|
|
89
|
+
ratio.r16_9({ w: this._el.content_item.offsetWidth }) + "px";
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
_stopMedia() {
|
|
93
|
+
// cancel a pending API retry so a poll cannot outlive the slide
|
|
94
|
+
clearTimeout(this.timer);
|
|
95
|
+
this.timer = null;
|
|
96
|
+
if (this.youtube_loaded) {
|
|
97
|
+
try {
|
|
98
|
+
const yt = YT as YTGlobal;
|
|
99
|
+
if (this.player.getPlayerState() === yt.PlayerState.PLAYING) {
|
|
100
|
+
this.player.pauseVideo();
|
|
101
|
+
}
|
|
102
|
+
} catch (err) {
|
|
103
|
+
console.log(err);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
createMedia() {
|
|
109
|
+
// Determine Start of Media
|
|
110
|
+
if (typeof this.media_id.start != "undefined") {
|
|
111
|
+
const vidstart = this.media_id.start.toString();
|
|
112
|
+
// supports the "90" (seconds), "1m30s" and "1h2m30s" formats
|
|
113
|
+
const hours = /(\d+)h/.exec(vidstart);
|
|
114
|
+
const minutes = /(\d+)m/.exec(vidstart);
|
|
115
|
+
const seconds = /(\d+)s/.exec(vidstart);
|
|
116
|
+
if (hours || minutes || seconds) {
|
|
117
|
+
this.media_id.start =
|
|
118
|
+
(hours ? parseInt(hours[1], 10) * 3600 : 0) +
|
|
119
|
+
(minutes ? parseInt(minutes[1], 10) * 60 : 0) +
|
|
120
|
+
(seconds ? parseInt(seconds[1], 10) : 0);
|
|
121
|
+
} else {
|
|
122
|
+
const parsed = parseInt(vidstart, 10);
|
|
123
|
+
this.media_id.start = Number.isNaN(parsed) ? 0 : parsed;
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
this.media_id.start = 0;
|
|
127
|
+
}
|
|
128
|
+
// Determine HD
|
|
129
|
+
if (typeof this.media_id.hd != "undefined") {
|
|
130
|
+
this.media_id.hd = true;
|
|
131
|
+
} else {
|
|
132
|
+
this.media_id.hd = false;
|
|
133
|
+
}
|
|
134
|
+
this.createPlayer();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
createPlayer() {
|
|
138
|
+
clearTimeout(this.timer);
|
|
139
|
+
if (typeof YT != "undefined" && typeof YT.Player != "undefined") {
|
|
140
|
+
// Create Player
|
|
141
|
+
const yt = YT as YTGlobal;
|
|
142
|
+
this.player = new yt.Player(this._el.content_item.id, {
|
|
143
|
+
playerVars: {
|
|
144
|
+
enablejsapi: 1,
|
|
145
|
+
color: "white",
|
|
146
|
+
autohide: 1,
|
|
147
|
+
showinfo: 0,
|
|
148
|
+
theme: "light",
|
|
149
|
+
start: this.media_id.start,
|
|
150
|
+
fs: 0,
|
|
151
|
+
rel: 0,
|
|
152
|
+
},
|
|
153
|
+
videoId: this.media_id.id,
|
|
154
|
+
events: {
|
|
155
|
+
onReady: () => {
|
|
156
|
+
this.onPlayerReady();
|
|
157
|
+
// After Loaded
|
|
158
|
+
//this.onLoaded();
|
|
159
|
+
},
|
|
160
|
+
onStateChange: this.onStateChange,
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
} else {
|
|
164
|
+
this.timer = setTimeout(() => {
|
|
165
|
+
this.createPlayer();
|
|
166
|
+
}, 1000);
|
|
167
|
+
}
|
|
168
|
+
this.onLoaded();
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Events
|
|
172
|
+
================================================== */
|
|
173
|
+
onPlayerReady(e?: unknown) {
|
|
174
|
+
this.youtube_loaded = true;
|
|
175
|
+
// the iframe replaces the placeholder div — re-resolve it, but a
|
|
176
|
+
// slide removed in the meantime must not crash the display update
|
|
177
|
+
const el = document.getElementById(this._el.content_item.id);
|
|
178
|
+
if (el) {
|
|
179
|
+
this._el.content_item = el;
|
|
180
|
+
}
|
|
181
|
+
this.onMediaLoaded();
|
|
182
|
+
this.onLoaded();
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
onStateChange(e: { data: number; target: YTPlayer }) {
|
|
186
|
+
const yt = YT as YTGlobal;
|
|
187
|
+
if (e.data === yt.PlayerState.ENDED) {
|
|
188
|
+
e.target.seekTo(0);
|
|
189
|
+
e.target.pauseVideo();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
@use "Variables" as *;
|
|
3
|
+
@use "core/Mixins" as *;
|
|
4
|
+
|
|
5
|
+
.vco-storymap {
|
|
6
|
+
font-family: $font-main;
|
|
7
|
+
|
|
8
|
+
// runtime-themable text colors (issue #177); set inline via the
|
|
9
|
+
// text_color/text_background_color options
|
|
10
|
+
--vco-color-text: #{$color-text};
|
|
11
|
+
--vco-color-text-muted: #{color.adjust($color-dark, $lightness: 40%)};
|
|
12
|
+
|
|
13
|
+
h1,
|
|
14
|
+
h2,
|
|
15
|
+
h3 {
|
|
16
|
+
font-size: $base-font-size-xlarge;
|
|
17
|
+
line-height: $base-font-size-xlarge;
|
|
18
|
+
|
|
19
|
+
small {
|
|
20
|
+
font-size: $base-font-size-large;
|
|
21
|
+
line-height: $base-font-size-large;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
h4,
|
|
26
|
+
h5,
|
|
27
|
+
h6 {
|
|
28
|
+
font-size: $base-font-size-large;
|
|
29
|
+
line-height: $base-font-size-large;
|
|
30
|
+
margin-bottom: 0;
|
|
31
|
+
|
|
32
|
+
small {
|
|
33
|
+
font-size: $base-font-size;
|
|
34
|
+
line-height: $base-font-size;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
h2.vco-headline-title {
|
|
39
|
+
font-size: $base-font-size-xlarge + 10;
|
|
40
|
+
line-height: $base-font-size-xlarge + 10;
|
|
41
|
+
|
|
42
|
+
small {
|
|
43
|
+
display: block;
|
|
44
|
+
margin-top: 5px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
h2 {
|
|
49
|
+
margin-top: 20px;
|
|
50
|
+
margin-bottom: 5px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
p {
|
|
54
|
+
margin-top: 5px;
|
|
55
|
+
margin-bottom: 10px;
|
|
56
|
+
font-size: $base-font-size;
|
|
57
|
+
|
|
58
|
+
// font-family: $font-secondary;
|
|
59
|
+
color: var(--vco-color-text-muted);
|
|
60
|
+
|
|
61
|
+
a {
|
|
62
|
+
color: var(--vco-color-text-muted);
|
|
63
|
+
text-decoration: none;
|
|
64
|
+
background-image: linear-gradient(
|
|
65
|
+
to bottom,
|
|
66
|
+
rgba(color.adjust($color-dark, $lightness: 40%), 0%) 50%,
|
|
67
|
+
rgba(color.adjust($color-dark, $lightness: 40%), 60%) 50%
|
|
68
|
+
);
|
|
69
|
+
background-repeat: repeat-x;
|
|
70
|
+
background-size: 2px 2px;
|
|
71
|
+
background-position: 0 $base-font-size + 2;
|
|
72
|
+
text-shadow:
|
|
73
|
+
-2px -1px 0 white,
|
|
74
|
+
2px -1px 0 white,
|
|
75
|
+
-2px 1px 0 white,
|
|
76
|
+
2px 1px 0 white;
|
|
77
|
+
|
|
78
|
+
&:hover,
|
|
79
|
+
&:focus {
|
|
80
|
+
color: $color-theme;
|
|
81
|
+
text-decoration: none;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@media (resolution >= 144dpi) {
|
|
86
|
+
a {
|
|
87
|
+
text-decoration: underline;
|
|
88
|
+
background-image: none;
|
|
89
|
+
text-shadow: none;
|
|
90
|
+
|
|
91
|
+
&:hover,
|
|
92
|
+
&:focus {
|
|
93
|
+
color: $color-theme;
|
|
94
|
+
text-decoration: underline;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
b,
|
|
101
|
+
strong {
|
|
102
|
+
font-weight: bold;
|
|
103
|
+
|
|
104
|
+
// color: $color-dark;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
i,
|
|
108
|
+
em {
|
|
109
|
+
font-style: italic;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
a {
|
|
113
|
+
text-decoration: none;
|
|
114
|
+
color: $color-theme;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
a:hover {
|
|
118
|
+
text-decoration: underline;
|
|
119
|
+
color: color.adjust($color-theme, $lightness: -20%);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.vco-caption,
|
|
123
|
+
.vco-credit,
|
|
124
|
+
.vco-slidenav-next,
|
|
125
|
+
.vco-slidenav-previous {
|
|
126
|
+
// font-family: $font-sanserif;
|
|
127
|
+
font-size: $base-font-size-small;
|
|
128
|
+
line-height: $base-font-size-small;
|
|
129
|
+
|
|
130
|
+
a {
|
|
131
|
+
color: $color-dark;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
blockquote,
|
|
136
|
+
blockquote p {
|
|
137
|
+
font-family: $font-serif;
|
|
138
|
+
color: color.adjust($color-dark, $lightness: 60%);
|
|
139
|
+
text-align: left;
|
|
140
|
+
background: transparent;
|
|
141
|
+
border: 0;
|
|
142
|
+
padding: 0;
|
|
143
|
+
|
|
144
|
+
cite {
|
|
145
|
+
font-family: $font-sanserif;
|
|
146
|
+
font-size: $base-font-size-small;
|
|
147
|
+
text-align: right;
|
|
148
|
+
font-style: normal;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
cite::before {
|
|
152
|
+
content: "\2014";
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
blockquote p::before {
|
|
157
|
+
content: open-quote;
|
|
158
|
+
display: inline-block;
|
|
159
|
+
position: relative;
|
|
160
|
+
top: 8px;
|
|
161
|
+
margin-right: 5px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
blockquote p::after {
|
|
165
|
+
content: close-quote;
|
|
166
|
+
margin-left: 3px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
blockquote {
|
|
170
|
+
margin: 10px;
|
|
171
|
+
|
|
172
|
+
p {
|
|
173
|
+
margin: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// margin-left:18px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.vcard {
|
|
180
|
+
font-family: $font-main;
|
|
181
|
+
line-height: $base-font-size;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.vco-text {
|
|
185
|
+
ul {
|
|
186
|
+
padding: 0;
|
|
187
|
+
padding-left: 30px;
|
|
188
|
+
|
|
189
|
+
li {
|
|
190
|
+
margin-bottom: 5px;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.vco-note {
|
|
196
|
+
display: block;
|
|
197
|
+
line-height: $base-font-size + 2;
|
|
198
|
+
padding: 10px;
|
|
199
|
+
|
|
200
|
+
@include border-radius(7px);
|
|
201
|
+
|
|
202
|
+
color: #8a6d3b;
|
|
203
|
+
background-color: #fcf8e3;
|
|
204
|
+
border: 1px solid #faebcc;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Skinnier
|
|
209
|
+
@media only screen and (width <= 800px), only screen and (device-width <= 800px) {
|
|
210
|
+
.vco-storymap {
|
|
211
|
+
h1,
|
|
212
|
+
h2,
|
|
213
|
+
h3 {
|
|
214
|
+
font-size: $base-font-size-xlarge;
|
|
215
|
+
line-height: $base-font-size-xlarge;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Mobile, iPhone and skinny
|
|
221
|
+
@media only screen and (width <= 500px), only screen and (device-width <= 500px) {
|
|
222
|
+
.vco-storymap {
|
|
223
|
+
h1,
|
|
224
|
+
h2,
|
|
225
|
+
h3 {
|
|
226
|
+
font-size: $base-font-size-xlarge - 4;
|
|
227
|
+
line-height: $base-font-size-xlarge - 4;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.vco-skinny {
|
|
233
|
+
h2 {
|
|
234
|
+
margin-top: 0;
|
|
235
|
+
padding-top: 20px;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
StoryMap
|
|
3
|
+
|
|
4
|
+
Designed and built by Zach Wise for the Northwestern University Knight Lab
|
|
5
|
+
|
|
6
|
+
This Source Code Form is subject to the terms of the Mozilla Public
|
|
7
|
+
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
8
|
+
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
9
|
+
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* Includes
|
|
13
|
+
================================================== */
|
|
14
|
+
@use "sass:color";
|
|
15
|
+
@use "Variables.Dark" as *; // Variables (easy way to make style changes)
|
|
16
|
+
@use "core/Mixins" as *; // Less shortcuts and functions
|
|
17
|
+
@use "core/Reset" as *; // CSS Reset
|
|
18
|
+
@use "Typography" as *;
|
|
19
|
+
|
|
20
|
+
// Icons
|
|
21
|
+
@use "icons/Icons" as *;
|
|
22
|
+
|
|
23
|
+
// Components
|
|
24
|
+
@use "ui/VCO.MenuBar" as *;
|
|
25
|
+
@use "ui/VCO.MenuBar.Button" as *;
|
|
26
|
+
@use "ui/VCO.Message" as *;
|
|
27
|
+
@use "slider/VCO.Slide" as *;
|
|
28
|
+
@use "slider/VCO.SlideNav" as *;
|
|
29
|
+
@use "slider/VCO.StorySlider" as *;
|
|
30
|
+
@use "media/VCO.Media" as *;
|
|
31
|
+
@use "media/types/VCO.Media.Text" as *;
|
|
32
|
+
@use "media/types/VCO.Media.Image" as *;
|
|
33
|
+
@use "media/types/VCO.Media.Twitter" as *;
|
|
34
|
+
@use "media/types/VCO.Media.Blockquote" as *;
|
|
35
|
+
@use "media/types/VCO.Media.Instagram" as *;
|
|
36
|
+
@use "media/types/VCO.Media.Profile" as *;
|
|
37
|
+
@use "media/types/VCO.Media.IFrame" as *;
|
|
38
|
+
@use "media/types/VCO.Media.Wikipedia" as *;
|
|
39
|
+
@use "map/openlayers/VCO.Map.OpenLayers" as *;
|
|
40
|
+
@use "map/VCO.MapMarker" as *;
|
|
41
|
+
@use "map/VCO.ImageMarker" as *;
|
|
42
|
+
@use "map/VCO.Map" as *;
|
|
43
|
+
@use "snapmap/VCO.SnapMap" as *;
|
|
44
|
+
|
|
45
|
+
/* StoryMap
|
|
46
|
+
================================================== */
|
|
47
|
+
.vco-storymap {
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
font-size: 16px;
|
|
51
|
+
line-height: normal;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
position: relative;
|
|
54
|
+
|
|
55
|
+
@include user-select(none);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Portrait
|
|
59
|
+
================================================== */
|
|
60
|
+
.vco-layout-portrait {
|
|
61
|
+
.vco-storyslider {
|
|
62
|
+
padding-top: 10px;
|
|
63
|
+
|
|
64
|
+
@include box-shadow(0 -3px 6px rgba(0, 0, 0, 0.2));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Landscape
|
|
69
|
+
================================================== */
|
|
70
|
+
.vco-layout-landscape {
|
|
71
|
+
.vco-storyslider {
|
|
72
|
+
padding-top: 0;
|
|
73
|
+
position: absolute;
|
|
74
|
+
width: 50%;
|
|
75
|
+
left: 50%;
|
|
76
|
+
overflow: visible;
|
|
77
|
+
|
|
78
|
+
.vco-slider-background {
|
|
79
|
+
margin-left: -20%;
|
|
80
|
+
width: 120%;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
|
|
83
|
+
@include gradient-horizontal(
|
|
84
|
+
rgba(255, 255, 255, 0.0001),
|
|
85
|
+
rgba(255, 255, 255, 0.85),
|
|
86
|
+
0%,
|
|
87
|
+
15%
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.vco-slider-container-mask {
|
|
92
|
+
overflow: visible;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.vco-slidenav-next,
|
|
96
|
+
.vco-slidenav-previous {
|
|
97
|
+
.vco-slidenav-icon::before {
|
|
98
|
+
background-color: $color-background;
|
|
99
|
+
padding: 20px;
|
|
100
|
+
border: 1px solid color.adjust($color-background, $lightness: -30%);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.vco-slidenav-icon,
|
|
104
|
+
.vco-slidenav-title,
|
|
105
|
+
.vco-slidenav-description {
|
|
106
|
+
text-shadow: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.vco-slidenav-title,
|
|
110
|
+
.vco-slidenav-description {
|
|
111
|
+
display: none;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.vco-slidenav-previous {
|
|
116
|
+
left: -100%;
|
|
117
|
+
margin-left: 0;
|
|
118
|
+
|
|
119
|
+
.vco-slidenav-icon::before {
|
|
120
|
+
@include border-right-radius(7px);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.vco-slidenav-next {
|
|
125
|
+
right: 130px;
|
|
126
|
+
|
|
127
|
+
.vco-slidenav-icon::before {
|
|
128
|
+
@include border-left-radius(7px);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.vco-slidenav-previous:hover {
|
|
133
|
+
.vco-slidenav-icon {
|
|
134
|
+
margin-left: -4px;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|