UNPKG

9.57 kBMarkdownView Raw
1# greenwood-starter-presentation
2
3Greenwood plugin and kickstarter repo for creating and authoring a slide deck from markdown, powered by [**GreenwoodJS**](https://www.greenwoodjs.io/)! ♻️
4
5![greenwood-starter-presentation](./.github/images/greenwood-starter-presentation.png)
6
7[![Netlify Status](https://api.netlify.com/api/v1/badges/f1bd02db-7f54-44d1-a3f2-b88b75db8167/deploy-status)](https://app.netlify.com/sites/awesome-bhaskara-b7d76c/deploys)
8
9## Installation
10
11There are a couple options available for how you can use this project to kickstart your next presentation.
12
13### Greenwood Plugin (recommended)
14This project is principally intended to be consumed by a Greenwood project as a ["theme pack" plugin](https://www.greenwoodjs.io/guides/theme-packs/) installed from npm. The advantage being that as enhancements and improvements are made to the project, you can pull those in just by updating a version number in your _package.json_.
15
16
17> Check out these links to learn more [about Greenwood](https://www.greenwoodjs.io/about/) as well as the [Quick start guide](https://www.greenwoodjs.io/getting-started/).
18
19To add this plugin to an _existing_ Greenwood project (where `@greenwood/cli` has already been installed), please do the following:
20
211. Install the plugin and its dependencies
22 ```sh
23 $ npm install @greenwood/plugin-import-css greenwood-starter-presentation --save-dev
24 $ npm install lit
25 ```
261. Add this plugin and all dependent plugins to your _greenwood.config.js_
27 ```js
28 import { greenwoodPluginImportCss } from '@greenwood/plugin-import-css';
29 import { greenwoodThemeStarterPresentation } from 'greenwood-starter-presentation';
30
31 export default {
32 .
33 .
34
35 plugins: [
36 ...greenwoodPluginImportCss(),
37 ...greenwoodThemeStarterPresentation()
38 ]
39
40 };
41 ```
421. Make sure to add `type: "module"` to uour _package.json_
431. Create a markdown file in your _src/pages_ directory called _index.md_ with these contents
44 ```md
45 ---
46 template: index
47 ---
48 ```
49
50> _You can see an example of this project in use as a Greenwood plugin in [this repo](https://github.com/thescientist13/knowing-your-tco). Feel free to clone or fork that or do whatever you want from there as well._
51
52
53### Git (Fork / Clone)
54
55You can also just fork and / or clone this repo from GitHub using `git`.
56
571. Clone the repo
58 ```sh
59 # Using SSH (recommended)
60 $ git clone git@github.com:thescientist13/greenwood-starter-presentation.git
61
62 # Using HTTP / GitHub Credentials
63 $ git clone https://github.com/thescientist13/greenwood-starter-presentation.git
64 ```
651. Change into the project directory and install dependencies
66 ```sh
67 $ cd greenwood-starter-presentation
68 $ npm install
69 ```
70
71## Usage
72
73For those unfamiliar, [CSS Zen Garden](http://www.csszengarden.com/) is a site the shares examples of designers and developers using the same HTML, but making completely unique looking layouts using just CSS. The concept of a theme pack is an homage to this philosophy. Just like you would have in Google Slides or Powerpoint, this project provides not only templates and styles to pre-theme and layout all your context, but also a complete UI to develop and present the slides with!
74
75
76> _As this repo and plugin are both based on Greenwood, you are able to use all of Greenwood's [APIs](https://www.greenwoodjs.io/docs/) and [plugins](https://www.greenwoodjs.io/plugins/) in your own project too._
77
78
79### Development
80
81To start developing, simply run the `start` script
82
83```sh
84$ npm start
85```
86
87This will open a local development server for you at `localhost:1984`.
88
89----
90
91You can preview a production build by using the `serve` script
92
93```sh
94$ npm run serve
95```
96
97You can preview the final site at `localhost:8080`.
98
99> If you are using Windows, run `npm run serve:win`
100
101### User Interface
102
103When you are running the app, the following controls and behaviors are available:
104- Updating in any content will live reload the browser for you, preserving the focused slide.
105- Scrolling and clicking any slide in the _Preview List_ on the left will make that slide appear in the _Current Slide) view.
106- Clicking the _Presenter Mode_ button will enable Full Screen mode:
107 - Navigate left and right using the left and right arrow keys
108 - To exit presenter mode, hit the ESC key
109
110### Slide Templates and Layouts
111
112To organize your slide content, this plugin provides the following template that can be specificed in markdown file's frontmatter.
113
114ex.
115```md
116---
117template: theme-statement
118---
119
120Lorum Ipsum all my content....
121```
122
1231. `theme-center-content` - All content is positioned in the center both vertically and horizontally.
1241. `theme-outline` - Centers a list in the middle of the page with a heading tag at the top/
1251. `theme-statement` - A slide with content positioned in the bottom left hand corner to help emphasize a point.
1261. `theme-title` - Provides an opening slide to highlight the talk title and author prominently in the center using heading tags.
1271. `theme-top-title-image-left` - Positions an image in the lower left hand corner with content flowing to the right.
1281. `theme-top-title` - Positions an `<h1>` at the top behind a page width banner using `--color-tertiary`, with any extra content positioned to the right of the page.
1291. `page` - (the default if no `template` is specified) - Will just display a slide with the `--color-primary` variable to the background color.
130
131The supported structure for the above slides looks like this
132
133#### Center Content
134```md
135---
136template: theme-center-content
137---
138
139# What's the Deal...?
140
141Lorum Ipsum
142```
143
144> See [_pages/slides/3.md_](https://github.com/thescientist13/greenwood-starter-presentation/blob/master/src/pages/slides/3.md) for an example.
145
146#### Outline
147```md
148---
149template: theme-outline
150---
151
152# My Talk Agenda
153
1541. Intro
1551. Topic 1
1561. Topic 2
1571. Topic 3
1581. Thank you!
159```
160
161> See [_pages/slides/2.md_](https://github.com/thescientist13/greenwood-starter-presentation/blob/master/src/pages/slides/3.md) for an example.
162
163#### Statement
164```md
165---
166template: theme-statement
167---
168
169Spicy jalapeno bacon ipsum dolor.
170```
171
172> See [_pages/slides/6.md_](https://github.com/thescientist13/greenwood-starter-presentation/blob/master/src/pages/slides/1.md) for an example.
173
174#### Title
175```md
176---
177template: theme-title
178---
179
180# My Talk
181
182## By Your Name
183```
184
185> See [_pages/slides/1.md_](https://github.com/thescientist13/greenwood-starter-presentation/blob/master/src/pages/slides/1.md) for an example.
186
187
188#### Top Title Image Left
189```md
190---
191template: theme-top-title-image-left
192---
193
194# Thank You!
195
196@twitter_name
197
198![kitten](https://chuckanddons.com/media/wysiwyg/kitten_blog.jpg)
199```
200
201> See [_pages/slides/7.md_](https://github.com/thescientist13/greenwood-starter-presentation/blob/master/src/pages/slides/1.md) for an example.
202
203
204#### Top Title
205```md
206---
207template: theme-top-title
208---
209
210# Welcome To My Talk
211
212Empty page body with an h1 at the top with `--color-secondary` color behind it as a top bar.
213```
214
215> See [_pages/slides/4.md_](https://github.com/thescientist13/greenwood-starter-presentation/blob/master/src/pages/slides/2.md) for an example.
216
217----
218
219> _Remember, you can always add your own HTML and <style> tags right into markdown. Additionaly, Greenwood also supports ad-hoc and one off imports of CSS and JS via [frontmatter imports]() for extra customization!_
220
221### Theming and Design System
222The following global variables are provided to you to customize and override using [CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties).
223
224```css
225:root {
226 --color-primary: #135;
227 --color-secondary: #74b238;
228 --color-tertiary: #2b85da;
229 --color-text-light: #efefef;
230 --color-text-dark: #020202;
231 --font-family: 'Optima', sans-serif;
232 --font-size: 1.5rem;
233 --backgroundUrl: url('../assets/background.jpg');
234}
235
236:host {
237 --color-primary: #135;
238 --color-secondary: #74b238;
239 --color-tertiary: #2b85da;
240 --color-text-light: #efefef;
241 --color-text-dark: #020202;
242 --font-family: 'Optima', sans-serif;
243 --font-size: 1.5rem;
244 --backgroundUrl: url('../assets/background.jpg');
245}
246```
247
248## Support and Upgrades
249
250### Known Issues
251
252There a few open items in our issue tracker as we work to an [initial 1.0.0 release](https://github.com/thescientist13/greenwood-starter-presentation/milestone/1). It would also be useful to be familiar with Greenwood's [Theme Pack FAQ](https://www.greenwoodjs.io/guides/theme-packs/#faq) if something isn't working as expected.
253
254### Upgrades
255
256To stay up to date with this repo depends on how you initialized your project or repo.
257
258#### Plugin
259
260If you using the plugin, any upgrades should just be as simple as uprading the version of this plugin in your _package.json_ using your package manager of choice.
261
262```sh
263# npm
264$ npm install greenwood-starter-presentation
265
266# yarn
267$ yarn upgrade greenwood-starter-presentation --latest
268```
269
270#### Git
271
272If you cloned this repo, then you should just be able to pull
273```sh
274$ git pull origin master
275```
276
277If you forked, make sure to add this repo as an upstream and pull changes in as needed
278```sh
279# use SSH (recommended) or HTTPS depending on your needs
280$ git remote add upsteam git@github.com:thescientist13/greenwood-starter-presentation.git
281$ git fetch upstream master
282$ git checkout master
283$ git merge upstream/master
284```
285
286> ⚠️ Note: By using git and this project, be aware that pulling in upstream changes could likely be prone to merge conflicts if you are changing anything other than _src/pages_.
\No newline at end of file