|
1 | | -# usecases |
| 1 | +# Storyboards |
2 | 2 |
|
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/). |
4 | 6 |
|
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/). |
8 | 12 |
|
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 |
15 | 14 |
|
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. |
19 | 19 |
|
20 | | -For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org). |
| 20 | +An example story might look like this: |
21 | 21 |
|
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. |
23 | 35 |
|
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. |
25 | 37 |
|
26 | | -### `assets` |
| 38 | +The image property will be used for the main display image of this chapter. |
27 | 39 |
|
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. |
29 | 42 |
|
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 | +::: |
31 | 45 |
|
32 | | -### `components` |
| 46 | +:::Chapter{headline="Methods" image="concept.png"} |
| 47 | +## This is the second Chapter |
33 | 48 |
|
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 | +``` |
35 | 52 |
|
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: |
37 | 54 |
|
38 | | -### `layouts` |
| 55 | + |
39 | 56 |
|
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: |
41 | 59 |
|
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 | +``` |
43 | 68 |
|
| 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. |
44 | 72 |
|
45 | | -### `pages` |
| 73 | +## Adding your story to our collection |
46 | 74 |
|
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. |
48 | 80 |
|
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. |
50 | 83 |
|
51 | | -### `plugins` |
| 84 | +## Serving the site locally |
52 | 85 |
|
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: |
54 | 90 |
|
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 |
56 | 94 |
|
57 | | -### `static` |
| 95 | +# serve with hot reload at localhost:3000 |
| 96 | +$ npm run dev |
58 | 97 |
|
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 |
60 | 101 |
|
61 | | -Example: `/static/robots.txt` is mapped as `/robots.txt`. |
| 102 | +# generate static project |
| 103 | +$ npm run generate |
| 104 | +``` |
62 | 105 |
|
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). |
64 | 107 |
|
65 | | -### `store` |
| 108 | +# Reusing the storyboards format for a different project |
66 | 109 |
|
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. |
68 | 114 |
|
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. |
0 commit comments