-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v1.0.0
- Loading branch information
Showing
109 changed files
with
28,134 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
], | ||
"plugins": [ | ||
"react-hot-loader/babel", | ||
["@babel/plugin-proposal-decorators", { "legacy": true }] | ||
], | ||
"env": { | ||
"production": { | ||
"plugins": [ | ||
["@babel/plugin-transform-modules-commonjs"], | ||
"transform-react-remove-prop-types", | ||
"@babel/plugin-transform-react-constant-elements", | ||
"@babel/plugin-transform-react-inline-elements", | ||
"@babel/plugin-transform-runtime", | ||
["@babel/plugin-proposal-decorators", { "legacy": true }] | ||
] | ||
}, | ||
"test": { | ||
"plugins": [ | ||
"@babel/plugin-transform-modules-commonjs" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
"extends": | ||
- "formidable/configurations/es6-react" | ||
|
||
"rules": | ||
"max-len": 0 | ||
"no-magic-numbers": 0 | ||
"react/prefer-es6-class": 0 | ||
"react/no-multi-comp": 0 | ||
"quotes": [2, "single"] | ||
"object-property-newline": 0 | ||
"valid-jsdoc": 0 | ||
"template-tag-spacing": 0 | ||
"arrow-parens": 0 | ||
"env": | ||
"browser": true, | ||
"node": true | ||
"globals": | ||
"afterEach": true, | ||
"describe": true, | ||
"expect": true, | ||
"it": true, | ||
"jest": true, | ||
"test": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,4 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.next | ||
.DS_Store | ||
node_modules | ||
npm-debug.log | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"printWidth": 140, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
MIT License | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2019 Dan Harris | ||
Copyright (c) 2013 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,56 @@ | ||
# presentation-productively-productive | ||
# Spectacle Boilerplate | ||
|
||
## Contents | ||
|
||
- [Reference](#reference) | ||
- [Getting Started](#getting-started) | ||
- [Tutorial](#tutorial) | ||
- [Build & Deployment](#build-deployment) | ||
|
||
## Reference | ||
|
||
The Spectacle core API is available in the [Spectacle Docs](https://github.com/FormidableLabs/spectacle/blob/master/README.md). | ||
|
||
## Getting Started | ||
|
||
1. Download the boilerplate | ||
|
||
```sh | ||
git clone git@github.com:FormidableLabs/spectacle-boilerplate.git | ||
``` | ||
|
||
2. Remove existing version control | ||
|
||
```sh | ||
rm -R .git | ||
``` | ||
|
||
3. Install dependencies | ||
|
||
```sh | ||
yarn install | ||
``` | ||
|
||
4. Start the webpack server. The server will run at [`localhost:3000`](http://localhost:3000). | ||
|
||
```sh | ||
yarn start | ||
``` | ||
|
||
## Tutorial | ||
|
||
If want you a step-by-step guide for getting started with Spectacle, a basic tutorial is available [here](https://github.com/FormidableLabs/spectacle/blob/master/docs/tutorial.md). | ||
|
||
## Build & Deployment | ||
|
||
Building the dist version of the project is as easy as running | ||
|
||
```sh | ||
yarn build | ||
``` | ||
|
||
If you want to deploy the slideshow to surge, run | ||
|
||
```sh | ||
yarn deploy | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
public class IndexModel : PageModel { | ||
|
||
/// | ||
/// current order based on customer id (if we have it) | ||
/// | ||
public PizzaGhostPizzeria.Models.Order Order { get; set; } | ||
|
||
/// | ||
/// state object for client initial state | ||
/// (let's us preload client side with modifiable state) | ||
/// | ||
public JObject InitialState = new JObject(); | ||
|
||
private readonly OrderService _orderService; | ||
|
||
private readonly IdentityService _identityService; | ||
|
||
public IndexModel( | ||
OrderService orderService, | ||
IdentityService identityService | ||
) { | ||
_orderService = orderService; | ||
_identityService = identityService; | ||
} | ||
|
||
public async Task OnGetAsync() { | ||
// populate data | ||
Order = await _orderService | ||
.GetOrderByCustomerId(_identityService.CustomerId); | ||
// set initial state | ||
InitialState["order"] = JObject.FromObject(Order); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
@page | ||
@model IndexModel | ||
<!-- set some initial state --> | ||
<pgp-client-state initial="@Model.InitialState"></pgp-client-state> | ||
|
||
<!-- content wrapper --> | ||
<div class="content-wrapper content-wrapper--centred"> | ||
|
||
<!-- scripts --> | ||
<pgp-script client-script="page-home" inline></pgp-script> | ||
<pgp-style client-style="page-home"></pgp-style> | ||
|
||
<!-- pizzeria logo --> | ||
<pgp-partial name="_logo"></pgp-partial> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
@Injectable() | ||
class HomePage { | ||
|
||
@Query(".pgp-logo") | ||
logoElement: HTMLElement; | ||
|
||
constructor() {} | ||
|
||
@Listen("click", ".pgp-logo") | ||
onClickLogo(event: any) { | ||
// add a class | ||
this.logoElement.classList.add("rumble"); | ||
// set a timer for animations then remove class | ||
setTimeout( | ||
() => | ||
requestAnimationFrame(() => | ||
this.logoElement.classList.remove("rumble") | ||
), | ||
800 | ||
); | ||
} | ||
} | ||
|
||
/// | ||
/// init the page | ||
/// | ||
initPage<HomePage>(HomePage, []); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
/// | ||
/// query for our element | ||
/// | ||
const myElement = $('.my-element'); | ||
|
||
/// | ||
/// native query for our element | ||
/// | ||
const myElement = document.querySelector('.my-element'); | ||
|
||
|
||
/// | ||
/// add class | ||
/// | ||
myElement.addClass('make-item-blue'); | ||
|
||
/// | ||
/// native add class | ||
/// | ||
myElement.classList.add('make-item-blue'); | ||
|
||
|
||
/// | ||
/// handle element event | ||
/// | ||
myElement.click(doSomething()); | ||
/// or | ||
myElement.on('click', doSomething()); | ||
|
||
/// | ||
/// native handle element event | ||
/// | ||
myElement.onclick(doSomething()); | ||
/// or | ||
myElement.addEventListener('click', doSomething()); |
Oops, something went wrong.