Skip to content

Commit 2c228dd

Browse files
committed
Some styling
1 parent 95a17c5 commit 2c228dd

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

packages/base/src/panelview/components/story-maps/StoryViewerPanel.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
IJGISLayer,
44
IJGISStoryMap,
55
IJupyterGISModel,
6-
ILandmarkLayer,
76
} from '@jupytergis/schema';
87
import React, { useEffect, useMemo, useState } from 'react';
98
import Markdown from 'react-markdown';
@@ -38,7 +37,7 @@ function StoryViewerPanel({ model, togglePreview }: IStoryViewerPanelProps) {
3837

3938
// Derive active slide and layer name from current landmark
4039
const activeSlide = useMemo(() => {
41-
return currentLandmark?.parameters as ILandmarkLayer | undefined;
40+
return currentLandmark?.parameters;
4241
}, [currentLandmark]);
4342

4443
const layerName = useMemo(() => {
@@ -154,6 +153,7 @@ function StoryViewerPanel({ model, togglePreview }: IStoryViewerPanelProps) {
154153
style={{
155154
width: '100%',
156155
height: '100%',
156+
maxHeight: '240px',
157157
objectFit: 'cover',
158158
display: 'block',
159159
}}
@@ -172,22 +172,24 @@ function StoryViewerPanel({ model, togglePreview }: IStoryViewerPanelProps) {
172172
textAlign: 'center',
173173
}}
174174
>
175-
{storyData.title}
175+
{`Slide ${currentRankDisplayed + 1} - ${layerName ? layerName : 'Landmark Name'}`}
176176
</h1>
177177
</div>
178178
) : (
179179
<h1 style={{ textAlign: 'center' }}>{storyData.title}</h1>
180180
)}
181181
<h2 style={{ textAlign: 'center' }}>
182-
{`Slide ${currentRankDisplayed} - ${layerName ? layerName : 'Landmark Name'}`}
182+
{activeSlide?.content?.title
183+
? activeSlide.content.title
184+
: 'Slide Title'}
183185
</h2>
184-
<h3 style={{ paddingLeft: 2 }}>
186+
{/* <h3 style={{ paddingLeft: 2 }}>
185187
{activeSlide?.content?.title
186188
? activeSlide.content.title
187189
: 'Slide Title'}
188-
</h3>
190+
</h3> */}
189191
{activeSlide?.content?.markdown && (
190-
<div style={{ paddingLeft: 4 }}>
192+
<div className="jgis-story-panel-content" style={{ paddingLeft: 32 }}>
191193
<Markdown>{activeSlide.content.markdown}</Markdown>
192194
</div>
193195
)}

packages/base/style/base.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@import url('./statusBar.css');
1212
@import url('./temporalSlider.css');
1313
@import url('./tabPanel.css');
14+
@import url('./storyPanel.css');
1415
@import url('ol/ol.css');
1516
@import url('./shared/button.css');
1617
@import url('./shared/toggle.css');

packages/base/style/storyPanel.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.jgis-story-panel-content p,
2+
.jgis-story-panel-content span,
3+
.jgis-story-panel-content li {
4+
font-size: var(--jp-ui-font-size2);
5+
}
6+
7+
.jgis-story-panel-content > ul {
8+
padding-left: 1rem;
9+
}

0 commit comments

Comments
 (0)