Skip to content

Commit f68c8bf

Browse files
authored
Portable stories (#57)
* New structure for stories: single markdown with assest dir next to them. * Refactor usecase -> story * Use remark-directive to split markdown in chapters * Use nuxt directives for parsing panels to markdown * Remove sectionize proof-of-concept * Add search functionality to index page * Incorporate #56 (add composit map to heave_precip story) * Improve README * Add licences * Add citation.cff
1 parent e67106b commit f68c8bf

File tree

256 files changed

+2889
-2001
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+2889
-2001
lines changed

CITATION.cff

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# YAML 1.2
2+
# More than one affiliation:
3+
# https://github.com/citation-file-format/citation-file-format/issues/268
4+
---
5+
title: EUCP Storyboard viewer
6+
keywords:
7+
- climate
8+
- EUCP
9+
repository-code: "https://github.com/eucp-project/storyboards"
10+
license: "Apache-2.0"
11+
message: "If you use this software, please cite it using these metadata."
12+
cff-version: "1.2.0"
13+
authors:
14+
-
15+
family-names: Kalverla
16+
given-names: Peter
17+
orcid: "https://orcid.org/0000-0002-5025-7862"
18+
affiliation: "Netherlands eScience Center"
19+
-
20+
family-names: Alidoost
21+
given-names: Fakhereh
22+
orcid: "https://orcid.org/0000-0001-8407-6472"
23+
affiliation: "Netherlands eScience Center"
24+
-
25+
family-names: Liu
26+
given-names: Yang
27+
orcid: "https://orcid.org/0000-0002-1966-8460"
28+
affiliation: "Netherlands eScience Center"
29+
-
30+
family-names: Verhoeven
31+
given-names: Stefan
32+
orcid: "https://orcid.org/0000-0002-5821-2060"
33+
affiliation: "Netherlands eScience Center"
34+
-
35+
family-names: Vreede
36+
given-names: Barbara
37+
orcid: "https://orcid.org/0000-0002-5023-4601"
38+
affiliation: "Netherlands eScience Center"
39+
identifiers:
40+
- type: doi
41+
value: ''
42+
description: The concept DOI of the work.
43+
...

LICENSE

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
Apache Software License 2.0
3+
4+
Copyright (c) 2022, Netherlands eScience Center
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
18+
This license file does not apply to the content of /stories. A separate license file is included in that directory.

README.md

Lines changed: 87 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,117 @@
1-
# usecases
1+
# Storyboards
22

3-
## Build Setup
3+
This repository contains the source code for the
4+
[EUCP](https://www.eucp-project.eu/) [Storyboard
5+
website](https://eucp-project.github.io/storyboards/).
46

5-
```bash
6-
# install dependencies
7-
$ npm install
7+
The website has been built with [Nuxt](https://nuxtjs.org), using
8+
[nuxt-content](https://content.nuxtjs.org/) for authoring stories and
9+
[tailwindcss](https://tailwindcss.com/docs/installation) + [tailwind
10+
typography](https://tailwindcss.com/docs/typography-plugin) for styling. It is
11+
hosted on [GitHub pages](https://nuxtjs.org/deployments/github-pages/).
812

9-
# serve with hot reload at localhost:3000
10-
$ npm run dev
11-
12-
# build for production and launch server
13-
$ npm run build
14-
$ npm run start
13+
## Writing a story
1514

16-
# generate static project
17-
$ npm run generate
18-
```
15+
All stories are stored in the `static/stories` folder. Each story consists of a
16+
markdown file and a folder with some assets (images, etc.) belonging to the
17+
story. In addition to standard markdown, the `:::Chapter{}` directive is used to
18+
break the story into parts that can be displayed individually.
1919

20-
For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org).
20+
An example story might look like this:
2121

22-
## Special Directories
22+
`static/stories/example-story.md`
23+
```markdown
24+
---
25+
title: Example story
26+
author: Peter Kalverla et al., Netherlands eScience Center
27+
thumbnail: "intro.png"
28+
category: EUCP data and products
29+
trl: high
30+
id: 13
31+
---
32+
:::Chapter{headline="Introduction" image="intro.png"}
33+
## This is the first Chapter
34+
You can format text using markdown.
2335

24-
You can create the following extra directories, some of which have special behaviors. Only `pages` is required; you can delete them if you don't want to use their functionality.
36+
The headline property will be used for the chapter navigation blocks.
2537

26-
### `assets`
38+
The image property will be used for the main display image of this chapter.
2739

28-
The assets directory contains your uncompiled assets such as Stylus or Sass files, images, or fonts.
40+
Even though it's called 'image', you can also add standalone HTML pages, such as
41+
an exported mapbox file.
2942

30-
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/assets).
43+
The three colons below mark the end of the first chapter.
44+
:::
3145

32-
### `components`
46+
:::Chapter{headline="Methods" image="concept.png"}
47+
## This is the second Chapter
3348

34-
The components directory contains your Vue.js components. Components make up the different parts of your page and can be reused and imported into your pages, layouts and even other components.
49+
and so on...
50+
:::
51+
```
3552

36-
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/components).
53+
This produces the following layout:
3754

38-
### `layouts`
55+
![Screenshot of example-story](example-story.png)
3956

40-
Layouts are a great help when you want to change the look and feel of your Nuxt app, whether you want to include a sidebar or have distinct layouts for mobile and desktop.
57+
The images should be stored in a directory with the same name as the story, but
58+
with a leading underscore, like so:
4159

42-
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/layouts).
60+
```bash
61+
- static/
62+
- stories/
63+
- example-story.md
64+
- _example-story/
65+
- intro.png
66+
- concept.png
67+
```
4368

69+
The frontmatter (title, author, etc.) will be used to show the story on the
70+
stories overview page. The ID and TRL (technical readiness level) properties are
71+
currently not used, but they are still here for legacy reasons.
4472

45-
### `pages`
73+
## Adding your story to our collection
4674

47-
This directory contains your application views and routes. Nuxt will read all the `*.vue` files inside this directory and setup Vue Router automatically.
75+
If you want your story to be included on
76+
[eucp-project.github.io/storyboards](https://eucp-project.github.io/storyboards),
77+
you can make a pull request to this repository. We will review it and if
78+
everything is okay, we'll merge the story into the main branch. Continous
79+
deployment will then automatically update the site.
4880

49-
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/get-started/routing).
81+
If you want to add a story but are unsure about the github workflow, please
82+
don't hesitate to get in touch. We are happy to help.
5083

51-
### `plugins`
84+
## Serving the site locally
5285

53-
The plugins directory contains JavaScript plugins that you want to run before instantiating the root Vue.js Application. This is the place to add Vue plugins and to inject functions or constants. Every time you need to use `Vue.use()`, you should create a file in `plugins/` and add its path to plugins in `nuxt.config.js`.
86+
You can also make a local build of the site, if you want to check that your
87+
story is formatted correctly before making a pull request. The following
88+
instructions are the default instructions from a new nuxt project. After cloning
89+
the repository:
5490

55-
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/plugins).
91+
```bash
92+
# install dependencies
93+
$ npm install
5694

57-
### `static`
95+
# serve with hot reload at localhost:3000
96+
$ npm run dev
5897

59-
This directory contains your static files. Each file inside this directory is mapped to `/`.
98+
# build for production and launch server
99+
$ npm run build
100+
$ npm run start
60101

61-
Example: `/static/robots.txt` is mapped as `/robots.txt`.
102+
# generate static project
103+
$ npm run generate
104+
```
62105

63-
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/static).
106+
For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org).
64107

65-
### `store`
108+
# Reusing the storyboards format for a different project
66109

67-
This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex.
110+
The source code (excluding the stories content) is licenced under Apache 2. You
111+
can fork this repo and add your own content, modify the styling, and do whatever
112+
you want. We'd appreciate it if you inform us about your re-using the software.
113+
We're also happy to help setting it up for you.
68114

69-
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/store).
115+
# Reusing the storyboard materials
116+
The content of the storyboards is licenced under CC-BY 4.0. Please don't
117+
hesitate to contact the storyboard authors if you're interested in their work.

components/StoryCard.vue

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<template>
2+
<NuxtLink :to="url">
3+
<!-- relative parent needed for absolute positioning of svg badges-->
4+
<div class="relative">
5+
<div class="flex flex-row bg-white shadow-xl max-w-xl rounded-lg h-48">
6+
<!-- story cards -->
7+
<div class="prose m-4">
8+
<h4>
9+
{{ title }}
10+
</h4>
11+
<p>
12+
{{ author }}
13+
</p>
14+
</div>
15+
<img :src="thumbnail" alt="storyboard preview" class="max-w-xs rounded-r-lg">
16+
</div>
17+
</div>
18+
</NuxtLink>
19+
</template>
20+
21+
<script>
22+
23+
export default {
24+
props: ['title', 'author', 'thumbnail', 'url']
25+
}
26+
</script>

components/UseCaseCard.vue

Lines changed: 0 additions & 60 deletions
This file was deleted.

content/atlas/1_intro.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

content/atlas/2_methods.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

content/atlas/3_out_of_sample.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

content/atlas/4_atlas.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

content/atlas/5_examples.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)