├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── contracts ├── Migrations.sol └── NonGovernmentalOrganizations.sol ├── e2e ├── protractor.conf.js ├── src │ ├── app.e2e-spec.ts │ └── app.po.ts └── tsconfig.e2e.json ├── ganache-cli.sh ├── index.html ├── migrations ├── 1_initial_migration.js └── 2_deploy_contracts.js ├── package-lock.json ├── package.json ├── patch.js ├── slides ├── build.properties ├── export │ ├── desarrollo-dapps-blockchain-ethereum-reveal-slides.html │ └── desarrollo-dapps-blockchain-ethereum-reveal-slides.pdf ├── img │ ├── apps-vs-dapps-1.png │ ├── apps-vs-dapps-2.png │ ├── apps-vs-dapps-bn.png │ ├── apps-vs-dapps.png │ ├── apps.png │ ├── codemotion-charla.png │ ├── dapp-de-donaciones-a-ONG.png │ ├── dapps.png │ ├── esquema-implementacion-dapp-1.png │ ├── esquema-implementacion-dapp-2.png │ ├── esquema-implementacion-dapp-3.png │ ├── esquema-implementacion-dapp-4.png │ ├── slides-sombra.png │ ├── slides.png │ ├── video-sombra.png │ └── video.png ├── lib │ ├── reveal.js-menu │ │ ├── LICENSE │ │ ├── README.md │ │ ├── TODO │ │ ├── bower.json │ │ ├── font-awesome-4.3.0 │ │ │ ├── css │ │ │ │ ├── font-awesome.css │ │ │ │ └── font-awesome.min.css │ │ │ └── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ ├── lib │ │ │ ├── bowser.min.js │ │ │ └── jeesh.min.js │ │ ├── menu.css │ │ ├── menu.js │ │ └── package.json │ └── reveal.js │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── Gruntfile.js │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bower.json │ │ ├── css │ │ ├── print │ │ │ ├── paper.css │ │ │ └── pdf.css │ │ ├── reveal.css │ │ ├── reveal.scss │ │ └── theme │ │ │ ├── README.md │ │ │ ├── beige.css │ │ │ ├── black.css │ │ │ ├── blood.css │ │ │ ├── league.css │ │ │ ├── moon.css │ │ │ ├── night.css │ │ │ ├── serif.css │ │ │ ├── simple.css │ │ │ ├── sky.css │ │ │ ├── solarized.css │ │ │ ├── source │ │ │ ├── beige.scss │ │ │ ├── black.scss │ │ │ ├── blood.scss │ │ │ ├── league.scss │ │ │ ├── moon.scss │ │ │ ├── night.scss │ │ │ ├── serif.scss │ │ │ ├── simple.scss │ │ │ ├── sky.scss │ │ │ ├── solarized.scss │ │ │ └── white.scss │ │ │ ├── template │ │ │ ├── mixins.scss │ │ │ ├── settings.scss │ │ │ └── theme.scss │ │ │ └── white.css │ │ ├── demo.html │ │ ├── index.html │ │ ├── js │ │ └── reveal.js │ │ ├── lib │ │ ├── css │ │ │ └── zenburn.css │ │ ├── font │ │ │ ├── league-gothic │ │ │ │ ├── LICENSE │ │ │ │ ├── league-gothic.css │ │ │ │ ├── league-gothic.eot │ │ │ │ ├── league-gothic.ttf │ │ │ │ └── league-gothic.woff │ │ │ └── source-sans-pro │ │ │ │ ├── LICENSE │ │ │ │ ├── source-sans-pro-italic.eot │ │ │ │ ├── source-sans-pro-italic.ttf │ │ │ │ ├── source-sans-pro-italic.woff │ │ │ │ ├── source-sans-pro-regular.eot │ │ │ │ ├── source-sans-pro-regular.ttf │ │ │ │ ├── source-sans-pro-regular.woff │ │ │ │ ├── source-sans-pro-semibold.eot │ │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ │ ├── source-sans-pro-semibold.woff │ │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ │ └── source-sans-pro.css │ │ └── js │ │ │ ├── classList.js │ │ │ ├── head.min.js │ │ │ └── html5shiv.js │ │ ├── package.json │ │ ├── plugin │ │ ├── highlight │ │ │ └── highlight.js │ │ ├── markdown │ │ │ ├── example.html │ │ │ ├── example.md │ │ │ ├── markdown.js │ │ │ └── marked.js │ │ ├── math │ │ │ └── math.js │ │ ├── multiplex │ │ │ ├── client.js │ │ │ ├── index.js │ │ │ ├── master.js │ │ │ └── package.json │ │ ├── notes-server │ │ │ ├── client.js │ │ │ ├── index.js │ │ │ └── notes.html │ │ ├── notes │ │ │ ├── notes.html │ │ │ └── notes.js │ │ ├── print-pdf │ │ │ └── print-pdf.js │ │ ├── search │ │ │ └── search.js │ │ └── zoom-js │ │ │ └── zoom.js │ │ └── test │ │ ├── examples │ │ ├── assets │ │ │ ├── image1.png │ │ │ └── image2.png │ │ ├── barebones.html │ │ ├── embedded-media.html │ │ ├── math.html │ │ ├── slide-backgrounds.html │ │ └── slide-transitions.html │ │ ├── qunit-1.12.0.css │ │ ├── qunit-1.12.0.js │ │ ├── test-markdown-element-attributes.html │ │ ├── test-markdown-element-attributes.js │ │ ├── test-markdown-slide-attributes.html │ │ ├── test-markdown-slide-attributes.js │ │ ├── test-markdown.html │ │ ├── test-markdown.js │ │ ├── test-pdf.html │ │ ├── test-pdf.js │ │ ├── test.html │ │ └── test.js └── md │ └── desarrollo-dapps-blockchain-ethereum.md ├── src ├── app │ ├── app-routing.module.ts │ ├── app.component.css │ ├── app.component.html │ ├── app.component.ts │ ├── app.module.ts │ ├── components │ │ ├── organizations │ │ │ ├── organization-add.component.html │ │ │ ├── organization-add.component.ts │ │ │ ├── organization-donation.component.html │ │ │ ├── organization-donation.component.ts │ │ │ ├── organizations-table.component.html │ │ │ ├── organizations-table.component.ts │ │ │ ├── organizations.component.html │ │ │ └── organizations.component.ts │ │ └── user │ │ │ ├── user.component.html │ │ │ └── user.component.ts │ ├── models │ │ ├── donation.ts │ │ └── organization.ts │ ├── services │ │ ├── messages.service.ts │ │ ├── organizations.service.ts │ │ ├── service.module.ts │ │ └── web3.service.ts │ └── util │ │ ├── address.util.ts │ │ └── storage.util.ts ├── assets │ ├── .gitkeep │ └── logo │ │ ├── logo-blanco-recortado.png │ │ ├── logo-blanco.ico │ │ ├── logo-blanco.png │ │ ├── logo.ico │ │ └── logo.png ├── browserslist ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon-blanco.ico ├── favicon.ico ├── index.html ├── karma.conf.js ├── main.ts ├── polyfills.ts ├── styles.css ├── test.ts ├── tsconfig.app.json ├── tsconfig.spec.json └── tslint.json ├── test └── TestNonGovernmentalOrganizations.js ├── truffle.js ├── tsconfig.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | /private 3 | ganache-cli.log 4 | 5 | # compiled output 6 | /build 7 | /dist 8 | /tmp 9 | /out-tsc 10 | 11 | # dependencies 12 | /node_modules 13 | 14 | # IDEs and editors 15 | /.idea 16 | .project 17 | .classpath 18 | .c9/ 19 | *.launch 20 | .settings/ 21 | *.sublime-workspace 22 | 23 | # IDE - VSCode 24 | .vscode/* 25 | !.vscode/settings.json 26 | !.vscode/tasks.json 27 | !.vscode/launch.json 28 | !.vscode/extensions.json 29 | 30 | # misc 31 | /.sass-cache 32 | /connect.lock 33 | /coverage 34 | /libpeerconnection.log 35 | npm-debug.log 36 | yarn-error.log 37 | testem.log 38 | /typings 39 | 40 | # System Files 41 | .DS_Store 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cómo desarrollar aplicaciones descentralizadas en la Blockchain de Ethereum 2 | 3 | En esta charla práctica y nada teórica (bueno un poco si), pretendo mostrar el código necesario para desarrollar una pequeña aplicación descentralizada ([ÐApps](https://en.wikipedia.org/wiki/Decentralized_application)) con un pequeño contrato inteligente ([Smart Contracts](https://en.wikipedia.org/wiki/Smart_contract)) en la Blockchain de [Ethereum](https://www.ethereum.org/). 4 | 5 | Veremos un poco de [Solidity](https://solidity.readthedocs.io/en/v0.4.24/), un lenguaje para programar contratos inteligentes. Utilizaremos también [Truffle](http://truffleframework.com/), un framework para desarrollar y testear aplicaciones descentralizadas. Necesitaremos usar [web3js](https://github.com/ethereum/web3.js/) para llamar desde nuestra web a la Blockchain. Usaremos [MetaMask](https://metamask.io/) para interactuar con la aplicación. Y para minar nuestras transacciones de prueba levantaremos una instancia de [Ganache](http://truffleframework.com/ganache/). 6 | 7 | Es una charla de 45 minutos en donde presento resumir todo lo que yo he aprendido a base de golpes durante casi un año. 8 | 9 | [Charla en el Codemotion](https://madrid2018.codemotionworld.com/conference/) 10 | 11 | ## Recursos 12 | 13 | ### Vídeo de la charla 14 | 15 | [Vídeo de la charla](https://www.youtube.com/watch?v=P8W9YBqJnk0) 16 | 17 | 18 | Vídeo de la charla 19 | 20 | 21 | ### Slides de la charla 22 | 23 | [Slides de la charla](https://asanzdiego.github.io/codemotion-charla-blockchain/) 24 | 25 | 26 | Slides de la charla 27 | 28 | 29 | ## Ejecución de la ÐApp 30 | 31 | ### Prerequisitos 32 | 33 | Instalar NodeJS https://nodejs.org/ 34 | 35 | Instalar MetaMask https://metamask.io/ 36 | 37 | ### Clonar el repositorio 38 | 39 | Ejecutar: 40 | 41 | ~~~ 42 | git clone git@github.com:asanzdiego/codemotion-charla-blockchain.git 43 | cd codemotion-charla-blockchain 44 | ~~~ 45 | 46 | ### Instalar dependencias globales 47 | 48 | Ejecutar: 49 | 50 | ~~~ 51 | npm install -g truffle 52 | npm install -g ganache-cli 53 | npm install -g @angular/cli 54 | ~~~ 55 | 56 | ### Instalar dependencias del proyecto 57 | 58 | Ejecutar en la carpeta del proyecto: 59 | 60 | ~~~ 61 | npm install 62 | ~~~ 63 | 64 | ### Ejecutar ganache (nodo privado) 65 | 66 | Ejecutar en la carpeta del proyecto en una consola separada: 67 | 68 | ~~~ 69 | ganache-cli --gasLimit 7000001 70 | ~~~ 71 | 72 | ### Compilar y migrar los contratos al nodo privado 73 | 74 | Ejecutar en la carpeta del proyecto en una consola separada: 75 | 76 | ~~~ 77 | truffle compile && truffle migrate 78 | ~~~ 79 | 80 | ### Testear los contratos contra el nodo privado 81 | 82 | Ejecutar en la carpeta del proyecto en una consola separada: 83 | 84 | ~~~ 85 | truffle test 86 | ~~~ 87 | 88 | ### Arrancar el front 89 | 90 | Ejecutar en la carpeta del proyecto en una consola separada: 91 | 92 | ~~~ 93 | ng serve 94 | ~~~ 95 | 96 | ### Abrir la aplicación 97 | 98 | En un navegador con MetaMask instalado abrir: . 99 | 100 | Ejemplo en . 101 | 102 | ### Para desarrollar 103 | 104 | Recomiendo [Visual Studio Code](https://code.visualstudio.com/) con el [plugin de Solidity de Juan Blanco](https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity) 105 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "material": { 7 | "root": "", 8 | "sourceRoot": "src", 9 | "projectType": "application", 10 | "prefix": "app", 11 | "schematics": {}, 12 | "architect": { 13 | "build": { 14 | "builder": "@angular-devkit/build-angular:browser", 15 | "options": { 16 | "outputPath": "dist/material", 17 | "index": "src/index.html", 18 | "main": "src/main.ts", 19 | "polyfills": "src/polyfills.ts", 20 | "tsConfig": "src/tsconfig.app.json", 21 | "assets": [ 22 | "src/favicon.ico", 23 | "src/assets" 24 | ], 25 | "styles": [ 26 | "src/styles.css" 27 | ], 28 | "scripts": [] 29 | }, 30 | "configurations": { 31 | "production": { 32 | "fileReplacements": [ 33 | { 34 | "replace": "src/environments/environment.ts", 35 | "with": "src/environments/environment.prod.ts" 36 | } 37 | ], 38 | "optimization": true, 39 | "outputHashing": "all", 40 | "sourceMap": false, 41 | "extractCss": true, 42 | "namedChunks": false, 43 | "aot": true, 44 | "extractLicenses": true, 45 | "vendorChunk": false, 46 | "buildOptimizer": true 47 | } 48 | } 49 | }, 50 | "serve": { 51 | "builder": "@angular-devkit/build-angular:dev-server", 52 | "options": { 53 | "browserTarget": "material:build" 54 | }, 55 | "configurations": { 56 | "production": { 57 | "browserTarget": "material:build:production" 58 | } 59 | } 60 | }, 61 | "extract-i18n": { 62 | "builder": "@angular-devkit/build-angular:extract-i18n", 63 | "options": { 64 | "browserTarget": "material:build" 65 | } 66 | }, 67 | "test": { 68 | "builder": "@angular-devkit/build-angular:karma", 69 | "options": { 70 | "main": "src/test.ts", 71 | "polyfills": "src/polyfills.ts", 72 | "tsConfig": "src/tsconfig.spec.json", 73 | "karmaConfig": "src/karma.conf.js", 74 | "styles": [ 75 | "src/styles.css" 76 | ], 77 | "scripts": [], 78 | "assets": [ 79 | "src/favicon.ico", 80 | "src/assets" 81 | ] 82 | } 83 | }, 84 | "lint": { 85 | "builder": "@angular-devkit/build-angular:tslint", 86 | "options": { 87 | "tsConfig": [ 88 | "src/tsconfig.app.json", 89 | "src/tsconfig.spec.json" 90 | ], 91 | "exclude": [ 92 | "**/node_modules/**" 93 | ] 94 | } 95 | } 96 | } 97 | }, 98 | "material-e2e": { 99 | "root": "e2e/", 100 | "projectType": "application", 101 | "architect": { 102 | "e2e": { 103 | "builder": "@angular-devkit/build-angular:protractor", 104 | "options": { 105 | "protractorConfig": "e2e/protractor.conf.js", 106 | "devServerTarget": "material:serve" 107 | }, 108 | "configurations": { 109 | "production": { 110 | "devServerTarget": "material:serve:production" 111 | } 112 | } 113 | }, 114 | "lint": { 115 | "builder": "@angular-devkit/build-angular:tslint", 116 | "options": { 117 | "tsConfig": "e2e/tsconfig.e2e.json", 118 | "exclude": [ 119 | "**/node_modules/**" 120 | ] 121 | } 122 | } 123 | } 124 | } 125 | }, 126 | "defaultProject": "material" 127 | } -------------------------------------------------------------------------------- /contracts/Migrations.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.16; 2 | 3 | contract Migrations { 4 | address public owner; 5 | uint public last_completed_migration; 6 | 7 | modifier restricted() { 8 | if (msg.sender == owner) _; 9 | } 10 | 11 | constructor() public { 12 | owner = msg.sender; 13 | } 14 | 15 | function setCompleted(uint completed) public restricted { 16 | last_completed_migration = completed; 17 | } 18 | 19 | function upgrade(address new_address) public restricted { 20 | Migrations upgraded = Migrations(new_address); 21 | upgraded.setCompleted(last_completed_migration); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /contracts/NonGovernmentalOrganizations.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.21; 2 | contract NonGovernmentalOrganizations { 3 | 4 | struct Organization { 5 | uint id; 6 | address owner; 7 | string name; 8 | } 9 | 10 | Organization[] public organizations; 11 | 12 | mapping(address => uint) public ownerToOrganizationId; 13 | 14 | constructor() public { 15 | 16 | organizations.push(Organization(0, 0, "0")); // to fix problem with nulls 17 | } 18 | 19 | event OrganizationCreated(uint indexed id, address indexed owner, string name); 20 | event DonationSubmitted(uint indexed id, address indexed owner, address indexed sender, uint value); 21 | 22 | modifier ownerNotExists() { 23 | 24 | require(ownerToOrganizationId[msg.sender] == 0, "suplied owner already have an organization"); 25 | _; 26 | } 27 | 28 | modifier ownerExists(uint _organizationId) { 29 | 30 | require(organizations[_organizationId].owner != address(0), "suplied organization ID doesn't have a correct owner address"); 31 | _; 32 | } 33 | 34 | function addOrganization(string _name) external 35 | ownerNotExists() { 36 | 37 | uint organizationId = organizations.push(Organization(organizations.length, msg.sender, _name)) - 1; 38 | ownerToOrganizationId[msg.sender] = organizationId; 39 | emit OrganizationCreated(organizationId, msg.sender, _name); 40 | } 41 | 42 | function donation(uint _organizationId) external payable 43 | ownerExists(_organizationId) { 44 | 45 | organizations[_organizationId].owner.transfer(msg.value); 46 | emit DonationSubmitted(_organizationId, organizations[_organizationId].owner, msg.sender, msg.value); 47 | } 48 | 49 | function getOrganizationsLength() external view returns(uint) { 50 | 51 | return organizations.length; 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('Welcome to material!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /ganache-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "" > ganache-cli.log 4 | 5 | ganache-cli --gasLimit 7000001 --mnemonic "$(cat private/wallet.mnemonic)" >> ganache-cli.log & 6 | 7 | time sleep 2.0 > /dev/null 8 | 9 | tail -n 10 -f ganache-cli.log -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | var Migrations = artifacts.require("./Migrations.sol"); 2 | 3 | module.exports = function(deployer) { 4 | deployer.deploy(Migrations); 5 | }; 6 | -------------------------------------------------------------------------------- /migrations/2_deploy_contracts.js: -------------------------------------------------------------------------------- 1 | var NonGovernmentalOrganizations = artifacts.require("./NonGovernmentalOrganizations.sol"); 2 | 3 | module.exports = function(deployer) { 4 | deployer.deploy(NonGovernmentalOrganizations); 5 | }; 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "academic-records", 3 | "version": "0.0.0", 4 | "license": "MIT", 5 | "scripts": { 6 | "ng": "ng", 7 | "start": "ng serve", 8 | "build": "ng build", 9 | "test": "ng test", 10 | "lint": "ng lint", 11 | "e2e": "ng e2e", 12 | "postinstall": "node patch.js" 13 | }, 14 | "private": true, 15 | "dependencies": { 16 | "@angular/animations": "6.1.1", 17 | "@angular/cdk": "6.4.2", 18 | "@angular/common": "6.1.1", 19 | "@angular/compiler": "6.1.1", 20 | "@angular/core": "6.1.1", 21 | "@angular/forms": "6.1.1", 22 | "@angular/http": "6.1.1", 23 | "@angular/material": "6.4.2", 24 | "@angular/material-moment-adapter": "6.4.2", 25 | "@angular/platform-browser": "6.1.1", 26 | "@angular/platform-browser-dynamic": "6.1.1", 27 | "@angular/router": "6.1.1", 28 | "angular-in-memory-web-api": "0.6.1", 29 | "core-js": "2.5.7", 30 | "hammerjs": "2.0.8", 31 | "moment": "2.22.2", 32 | "rxjs": "6.2.2", 33 | "truffle-hdwallet-provider": "0.0.6", 34 | "web-animations-js": "2.3.1", 35 | "web3": "1.0.0-beta.34", 36 | "zone.js": "0.8.26" 37 | }, 38 | "devDependencies": { 39 | "@angular-devkit/build-angular": "^0.10.6", 40 | "@angular/cli": "~6.0.8", 41 | "@angular/compiler-cli": "^6.0.3", 42 | "@angular/language-service": "^6.0.3", 43 | "@types/jasmine": "~2.8.6", 44 | "@types/jasminewd2": "~2.0.3", 45 | "@types/node": "~8.9.4", 46 | "codelyzer": "~4.2.1", 47 | "jasmine-core": "~2.99.1", 48 | "jasmine-spec-reporter": "~4.2.1", 49 | "karma": "^3.1.1", 50 | "karma-chrome-launcher": "~2.2.0", 51 | "karma-cli": "~1.0.1", 52 | "karma-coverage-istanbul-reporter": "~2.0.0", 53 | "karma-jasmine": "~1.1.1", 54 | "karma-jasmine-html-reporter": "^0.2.2", 55 | "protractor": "^5.4.1", 56 | "truffle-contract": "^3.0.4", 57 | "ts-node": "~5.0.1", 58 | "tslint": "~5.9.1", 59 | "typescript": "~2.7.2" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /patch.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const f = 'node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js'; 3 | 4 | fs.readFile(f, 'utf8', function (err, data) { 5 | if (err) { 6 | return console.log(err); 7 | } 8 | var result = data.replace(/node: false/g, 'node: {crypto: true, stream: true}'); 9 | 10 | fs.writeFile(f, result, 'utf8', function (err) { 11 | if (err) return console.log(err); 12 | }); 13 | }); -------------------------------------------------------------------------------- /slides/build.properties: -------------------------------------------------------------------------------- 1 | CLEAN_LIB_FOLDER='no' 2 | COPY_IMG_FOLDER='no' 3 | ZIP_EXPORT_FOLDER='no' 4 | NUMBER_OFFSET='no' 5 | CURRENT_NUMBER_OFFSET=1 6 | REMOVE_MD_TO_BOOK='yes' 7 | REMOVE_MD_TO_SLIDES='yes' 8 | 9 | REVEAL_JS_SRC_ONLINE='https://asanzdiego.github.io/markdownslides/doc/lib/reveal.js/' 10 | REVEAL_JS_MENU_SRC_ONLINE='https://asanzdiego.github.io/markdownslides/doc/lib/reveal.js-menu/' 11 | 12 | #GENERATION_MODE='min|med|max' 13 | DEFAULT_GENERATION_MODE='min' 14 | 15 | #16:9 -> 800x450 960x540 1024x576 1280x720 1360x765 1600x900 1920x1080 16 | #4:3 -> 800x600 960x720 1024x768 1280x960 1360x1020 1600x1200 1920x1440 17 | 18 | #see https://github.com/hakimel/reveal.js#presentation-size 19 | WIDTH='1024' 20 | HEIGHT='576' 21 | MARGIN='0.3' 22 | MIN_SCALE='0.1' 23 | MAX_SCALE='1.9' 24 | #none/fade/slide/convex/concave/zoom 25 | TRANSITION='fade' 26 | 27 | PHANTOMJS_RESOLUTION="800x450" 28 | 29 | BUILD_REVEAL_SLIDES='min' 30 | BUILD_REVEAL_SLIDES_PDF='min' 31 | BUILD_REVEAL_SLIDES_ONLINE='max' 32 | BUILD_REVEAL_SLIDES_ALTERNATIVE='med' 33 | BUILD_REVEAL_SLIDES_ALTERNATIVE_PDF='med' 34 | BUILD_REVEAL_SLIDES_ALTERNATIVE_ONLINE='max' 35 | BUILD_BEAMER_SLIDES='deprecated' 36 | BUILD_DECK_SLIDES='deprecated' 37 | BUILD_DECK_SLIDES_ALTERNATIVE='deprecated' 38 | 39 | BUILD_HTML_BOOK='med' 40 | BUILD_DOCX_BOOK='max' 41 | BUILD_EPUB_BOOK='max' 42 | BUILD_ODT_BOOK='deprecated' 43 | BUILD_PDF_BOOK='deprecated' 44 | -------------------------------------------------------------------------------- /slides/export/desarrollo-dapps-blockchain-ethereum-reveal-slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/export/desarrollo-dapps-blockchain-ethereum-reveal-slides.pdf -------------------------------------------------------------------------------- /slides/img/apps-vs-dapps-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/apps-vs-dapps-1.png -------------------------------------------------------------------------------- /slides/img/apps-vs-dapps-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/apps-vs-dapps-2.png -------------------------------------------------------------------------------- /slides/img/apps-vs-dapps-bn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/apps-vs-dapps-bn.png -------------------------------------------------------------------------------- /slides/img/apps-vs-dapps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/apps-vs-dapps.png -------------------------------------------------------------------------------- /slides/img/apps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/apps.png -------------------------------------------------------------------------------- /slides/img/codemotion-charla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/codemotion-charla.png -------------------------------------------------------------------------------- /slides/img/dapp-de-donaciones-a-ONG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/dapp-de-donaciones-a-ONG.png -------------------------------------------------------------------------------- /slides/img/dapps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/dapps.png -------------------------------------------------------------------------------- /slides/img/esquema-implementacion-dapp-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/esquema-implementacion-dapp-1.png -------------------------------------------------------------------------------- /slides/img/esquema-implementacion-dapp-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/esquema-implementacion-dapp-2.png -------------------------------------------------------------------------------- /slides/img/esquema-implementacion-dapp-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/esquema-implementacion-dapp-3.png -------------------------------------------------------------------------------- /slides/img/esquema-implementacion-dapp-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/esquema-implementacion-dapp-4.png -------------------------------------------------------------------------------- /slides/img/slides-sombra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/slides-sombra.png -------------------------------------------------------------------------------- /slides/img/slides.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/slides.png -------------------------------------------------------------------------------- /slides/img/video-sombra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/video-sombra.png -------------------------------------------------------------------------------- /slides/img/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/img/video.png -------------------------------------------------------------------------------- /slides/lib/reveal.js-menu/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2015 Greg Denehy 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /slides/lib/reveal.js-menu/TODO: -------------------------------------------------------------------------------- 1 | TODO 2 | 3 | Add menu panel for changing options, for both reveal (eg autoSlide, loop, show/hide controls, ...) and menu (eg change side, effect, ...) 4 | 5 | Customise width 6 | -------------------------------------------------------------------------------- /slides/lib/reveal.js-menu/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal.js-menu", 3 | "version": "0.7.2", 4 | "homepage": "https://denehyg.github.io/reveal.js-menu", 5 | "authors": [ 6 | "Greg Denehy" 7 | ], 8 | "description": "A slideout menu for navigating reveal.js presentations", 9 | "keywords": [ 10 | "reveal", 11 | "menu" 12 | ], 13 | "license": "MIT, Copyright (C) 2016 Greg Denehy", 14 | "ignore": [ 15 | "**/.*", 16 | "node_modules", 17 | "bower_components", 18 | "test", 19 | "tests" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /slides/lib/reveal.js-menu/font-awesome-4.3.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js-menu/font-awesome-4.3.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /slides/lib/reveal.js-menu/font-awesome-4.3.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js-menu/font-awesome-4.3.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /slides/lib/reveal.js-menu/font-awesome-4.3.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js-menu/font-awesome-4.3.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /slides/lib/reveal.js-menu/font-awesome-4.3.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js-menu/font-awesome-4.3.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /slides/lib/reveal.js-menu/font-awesome-4.3.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js-menu/font-awesome-4.3.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /slides/lib/reveal.js-menu/lib/bowser.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bowser - a browser detector 3 | * https://github.com/ded/bowser 4 | * MIT License | (c) Dustin Diaz 2014 5 | */ 6 | !function(e,t){typeof module!="undefined"&&module.exports?module.exports.browser=t():typeof define=="function"&&define.amd?define(t):this[e]=t()}("bowser",function(){function t(t){function n(e){var n=t.match(e);return n&&n.length>1&&n[1]||""}function r(e){var n=t.match(e);return n&&n.length>1&&n[2]||""}var i=n(/(ipod|iphone|ipad)/i).toLowerCase(),s=/like android/i.test(t),o=!s&&/android/i.test(t),u=n(/edge\/(\d+(\.\d+)?)/i),a=n(/version\/(\d+(\.\d+)?)/i),f=/tablet/i.test(t),l=!f&&/[^-]mobi/i.test(t),c;/opera|opr/i.test(t)?c={name:"Opera",opera:e,version:a||n(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(t)?c={name:"Yandex Browser",yandexbrowser:e,version:a||n(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/windows phone/i.test(t)?(c={name:"Windows Phone",windowsphone:e},u?(c.msedge=e,c.version=u):(c.msie=e,c.version=n(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?c={name:"Internet Explorer",msie:e,version:n(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(t)?c={name:"Microsoft Edge",msedge:e,version:u}:/chrome|crios|crmo/i.test(t)?c={name:"Chrome",chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:i?(c={name:i=="iphone"?"iPhone":i=="ipad"?"iPad":"iPod"},a&&(c.version=a)):/sailfish/i.test(t)?c={name:"Sailfish",sailfish:e,version:n(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?c={name:"SeaMonkey",seamonkey:e,version:n(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel/i.test(t)?(c={name:"Firefox",firefox:e,version:n(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(c.firefoxos=e)):/silk/i.test(t)?c={name:"Amazon Silk",silk:e,version:n(/silk\/(\d+(\.\d+)?)/i)}:o?c={name:"Android",version:a}:/phantom/i.test(t)?c={name:"PhantomJS",phantom:e,version:n(/phantomjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?c={name:"BlackBerry",blackberry:e,version:a||n(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:/(web|hpw)os/i.test(t)?(c={name:"WebOS",webos:e,version:a||n(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(c.touchpad=e)):/bada/i.test(t)?c={name:"Bada",bada:e,version:n(/dolfin\/(\d+(\.\d+)?)/i)}:/tizen/i.test(t)?c={name:"Tizen",tizen:e,version:n(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||a}:/safari/i.test(t)?c={name:"Safari",safari:e,version:a}:c={name:n(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!c.msedge&&/(apple)?webkit/i.test(t)?(c.name=c.name||"Webkit",c.webkit=e,!c.version&&a&&(c.version=a)):!c.opera&&/gecko\//i.test(t)&&(c.name=c.name||"Gecko",c.gecko=e,c.version=c.version||n(/gecko\/(\d+(\.\d+)?)/i)),!c.msedge&&(o||c.silk)?c.android=e:i&&(c[i]=e,c.ios=e);var h="";c.windowsphone?h=n(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i?(h=n(/os (\d+([_\s]\d+)*) like mac os x/i),h=h.replace(/[_\s]/g,".")):o?h=n(/android[ \/-](\d+(\.\d+)*)/i):c.webos?h=n(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):c.blackberry?h=n(/rim\stablet\sos\s(\d+(\.\d+)*)/i):c.bada?h=n(/bada\/(\d+(\.\d+)*)/i):c.tizen&&(h=n(/tizen[\/\s](\d+(\.\d+)*)/i)),h&&(c.osversion=h);var p=h.split(".")[0];if(f||i=="ipad"||o&&(p==3||p==4&&!l)||c.silk)c.tablet=e;else if(l||i=="iphone"||i=="ipod"||o||c.blackberry||c.webos||c.bada)c.mobile=e;return c.msedge||c.msie&&c.version>=10||c.yandexbrowser&&c.version>=15||c.chrome&&c.version>=20||c.firefox&&c.version>=20||c.safari&&c.version>=6||c.opera&&c.version>=10||c.ios&&c.osversion&&c.osversion.split(".")[0]>=6||c.blackberry&&c.version>=10.1?c.a=e:c.msie&&c.version<10||c.chrome&&c.version<20||c.firefox&&c.version<20||c.safari&&c.version<6||c.opera&&c.version<10||c.ios&&c.osversion&&c.osversion.split(".")[0]<6?c.c=e:c.x=e,c}var e=!0,n=t(typeof navigator!="undefined"?navigator.userAgent:"");return n.test=function(e){for(var t=0;t li { 127 | display: table-cell; 128 | line-height: 150%; 129 | text-align: center; 130 | vertical-align: middle; 131 | cursor: pointer; 132 | color: #aaa; 133 | border-radius: 3px; 134 | } 135 | 136 | .reveal .slide-menu-toolbar > li.active-toolbar-button { 137 | color: white; 138 | text-shadow: 0 1px black; 139 | } 140 | 141 | .slide-menu-toolbar > li:hover { 142 | color: white; 143 | } 144 | 145 | /* 146 | * Panels 147 | */ 148 | .reveal .slide-menu-panel { 149 | position: absolute; 150 | width: 100%; 151 | visibility: hidden; 152 | height: calc(100% - 60px); 153 | overflow-x: hidden; 154 | overflow-y: auto; 155 | color: #AAA; 156 | } 157 | 158 | .reveal .slide-menu-panel.active-menu-panel { 159 | visibility: visible; 160 | } 161 | 162 | .reveal .slide-menu-panel h1, 163 | .reveal .slide-menu-panel h2, 164 | .reveal .slide-menu-panel h3, 165 | .reveal .slide-menu-panel h4, 166 | .reveal .slide-menu-panel h5, 167 | .reveal .slide-menu-panel h6 { 168 | margin: 20px 0 10px 0; 169 | color: #FFF; 170 | line-height: 1.2; 171 | letter-spacing: normal; 172 | text-shadow: none; 173 | } 174 | 175 | .reveal .slide-menu-panel h1 { 176 | font-size: 1.6em; 177 | } 178 | .reveal .slide-menu-panel h2 { 179 | font-size: 1.4em; 180 | } 181 | .reveal .slide-menu-panel h3 { 182 | font-size: 1.3em; 183 | } 184 | .reveal .slide-menu-panel h4 { 185 | font-size: 1.1em; 186 | } 187 | .reveal .slide-menu-panel h5 { 188 | font-size: 1em; 189 | } 190 | .reveal .slide-menu-panel h6 { 191 | font-size: 0.9em; 192 | } 193 | 194 | .reveal .slide-menu-panel p { 195 | margin: 10px 0 5px 0; 196 | } 197 | 198 | .reveal .slide-menu-panel a { 199 | color: #CCC; 200 | text-decoration: underline; 201 | } 202 | 203 | .reveal .slide-menu-panel a:hover { 204 | color: white; 205 | } 206 | 207 | .reveal .slide-menu-item a { 208 | text-decoration: none; 209 | } 210 | 211 | .reveal .slide-menu-custom-panel { 212 | width: calc(100% - 20px); 213 | padding-left: 10px; 214 | padding-right: 10px; 215 | } 216 | 217 | .reveal .slide-menu-custom-panel .slide-menu-items { 218 | width: calc(100% + 20px); 219 | margin-left: -10px; 220 | margin-right: 10px; 221 | } 222 | 223 | 224 | /* 225 | * Theme and Transitions buttons 226 | */ 227 | 228 | .reveal div[data-panel="Themes"] li, 229 | .reveal div[data-panel="Transitions"] li { 230 | display: block; 231 | text-align: left; 232 | cursor: pointer; 233 | color: #848484; 234 | } 235 | 236 | /* 237 | * Menu controls 238 | */ 239 | .reveal .slide-menu-button { 240 | position: fixed; 241 | left: 30px; 242 | bottom: 30px; 243 | z-index: 30; 244 | font-size: 24px; 245 | } 246 | 247 | /* 248 | * Menu overlay 249 | */ 250 | 251 | .reveal .slide-menu-overlay { 252 | position: fixed; 253 | z-index: 199; 254 | top: 0; 255 | left: 0; 256 | overflow: hidden; 257 | width: 0; 258 | height: 0; 259 | background-color: #000; 260 | opacity: 0; 261 | transition: opacity 0.3s, width 0s 0.3s, height 0s 0.3s; 262 | } 263 | 264 | .reveal .slide-menu-overlay.active { 265 | width: 100%; 266 | height: 100%; 267 | opacity: 0.7; 268 | transition: opacity 0.3s; 269 | } 270 | -------------------------------------------------------------------------------- /slides/lib/reveal.js-menu/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal.js-menu", 3 | "version": "0.7.2", 4 | "description": "A slideout menu for navigating reveal.js presentations", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "git+https://github.com/denehyg/reveal.js-menu.git" 11 | }, 12 | "keywords": [ 13 | "reveal", 14 | "menu" 15 | ], 16 | "author": "Greg Denehy", 17 | "license": "MIT, Copyright (C) 2016 Greg Denehy", 18 | "bugs": { 19 | "url": "https://github.com/denehyg/reveal.js-menu/issues" 20 | }, 21 | "homepage": "https://github.com/denehyg/reveal.js-menu#readme" 22 | } 23 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.iml 3 | *.iws 4 | *.eml 5 | out/ 6 | .DS_Store 7 | .svn 8 | log/*.log 9 | tmp/** 10 | node_modules/ 11 | .sass-cache 12 | css/reveal.min.css 13 | js/reveal.min.js -------------------------------------------------------------------------------- /slides/lib/reveal.js/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 4.1.1 4 | before_script: 5 | - npm install -g grunt-cli -------------------------------------------------------------------------------- /slides/lib/reveal.js/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | Please keep the [issue tracker](http://github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**. 4 | 5 | 6 | ### Personal Support 7 | If you have personal support or setup questions the best place to ask those are [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js). 8 | 9 | 10 | ### Bug Reports 11 | When reporting a bug make sure to include information about which browser and operating system you are on as well as the necessary steps to reproduce the issue. If possible please include a link to a sample presentation where the bug can be tested. 12 | 13 | 14 | ### Pull Requests 15 | - Should follow the coding style of the file you work in, most importantly: 16 | - Tabs to indent 17 | - Single-quoted strings 18 | - Should be made towards the **dev branch** 19 | - Should be submitted from a feature/topic branch (not your master) 20 | 21 | 22 | ### Plugins 23 | Please do not submit plugins as pull requests. They should be maintained in their own separate repository. More information here: https://github.com/hakimel/reveal.js/wiki/Plugin-Guidelines 24 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/Gruntfile.js: -------------------------------------------------------------------------------- 1 | /* global module:false */ 2 | module.exports = function(grunt) { 3 | var port = grunt.option('port') || 8000; 4 | var base = grunt.option('base') || '.'; 5 | 6 | // Project configuration 7 | grunt.initConfig({ 8 | pkg: grunt.file.readJSON('package.json'), 9 | meta: { 10 | banner: 11 | '/*!\n' + 12 | ' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' + 13 | ' * http://lab.hakim.se/reveal-js\n' + 14 | ' * MIT licensed\n' + 15 | ' *\n' + 16 | ' * Copyright (C) 2016 Hakim El Hattab, http://hakim.se\n' + 17 | ' */' 18 | }, 19 | 20 | qunit: { 21 | files: [ 'test/*.html' ] 22 | }, 23 | 24 | uglify: { 25 | options: { 26 | banner: '<%= meta.banner %>\n' 27 | }, 28 | build: { 29 | src: 'js/reveal.js', 30 | dest: 'js/reveal.min.js' 31 | } 32 | }, 33 | 34 | sass: { 35 | core: { 36 | files: { 37 | 'css/reveal.css': 'css/reveal.scss', 38 | } 39 | }, 40 | themes: { 41 | files: [ 42 | { 43 | expand: true, 44 | cwd: 'css/theme/source', 45 | src: ['*.scss'], 46 | dest: 'css/theme', 47 | ext: '.css' 48 | } 49 | ] 50 | } 51 | }, 52 | 53 | autoprefixer: { 54 | dist: { 55 | src: 'css/reveal.css' 56 | } 57 | }, 58 | 59 | cssmin: { 60 | compress: { 61 | files: { 62 | 'css/reveal.min.css': [ 'css/reveal.css' ] 63 | } 64 | } 65 | }, 66 | 67 | jshint: { 68 | options: { 69 | curly: false, 70 | eqeqeq: true, 71 | immed: true, 72 | latedef: true, 73 | newcap: true, 74 | noarg: true, 75 | sub: true, 76 | undef: true, 77 | eqnull: true, 78 | browser: true, 79 | expr: true, 80 | globals: { 81 | head: false, 82 | module: false, 83 | console: false, 84 | unescape: false, 85 | define: false, 86 | exports: false 87 | } 88 | }, 89 | files: [ 'Gruntfile.js', 'js/reveal.js' ] 90 | }, 91 | 92 | connect: { 93 | server: { 94 | options: { 95 | port: port, 96 | base: base, 97 | livereload: true, 98 | open: true 99 | } 100 | } 101 | }, 102 | 103 | zip: { 104 | 'reveal-js-presentation.zip': [ 105 | 'index.html', 106 | 'css/**', 107 | 'js/**', 108 | 'lib/**', 109 | 'images/**', 110 | 'plugin/**', 111 | '**.md' 112 | ] 113 | }, 114 | 115 | watch: { 116 | js: { 117 | files: [ 'Gruntfile.js', 'js/reveal.js' ], 118 | tasks: 'js' 119 | }, 120 | theme: { 121 | files: [ 'css/theme/source/*.scss', 'css/theme/template/*.scss' ], 122 | tasks: 'css-themes' 123 | }, 124 | css: { 125 | files: [ 'css/reveal.scss' ], 126 | tasks: 'css-core' 127 | }, 128 | html: { 129 | files: [ '*.html'] 130 | }, 131 | markdown: { 132 | files: [ '*.md' ] 133 | }, 134 | options: { 135 | livereload: true 136 | } 137 | } 138 | 139 | }); 140 | 141 | // Dependencies 142 | grunt.loadNpmTasks( 'grunt-contrib-qunit' ); 143 | grunt.loadNpmTasks( 'grunt-contrib-jshint' ); 144 | grunt.loadNpmTasks( 'grunt-contrib-cssmin' ); 145 | grunt.loadNpmTasks( 'grunt-contrib-uglify' ); 146 | grunt.loadNpmTasks( 'grunt-contrib-watch' ); 147 | grunt.loadNpmTasks( 'grunt-sass' ); 148 | grunt.loadNpmTasks( 'grunt-contrib-connect' ); 149 | grunt.loadNpmTasks( 'grunt-autoprefixer' ); 150 | grunt.loadNpmTasks( 'grunt-zip' ); 151 | 152 | // Default task 153 | grunt.registerTask( 'default', [ 'css', 'js' ] ); 154 | 155 | // JS task 156 | grunt.registerTask( 'js', [ 'jshint', 'uglify', 'qunit' ] ); 157 | 158 | // Theme CSS 159 | grunt.registerTask( 'css-themes', [ 'sass:themes' ] ); 160 | 161 | // Core framework CSS 162 | grunt.registerTask( 'css-core', [ 'sass:core', 'autoprefixer', 'cssmin' ] ); 163 | 164 | // All CSS 165 | grunt.registerTask( 'css', [ 'sass', 'autoprefixer', 'cssmin' ] ); 166 | 167 | // Package presentation to archive 168 | grunt.registerTask( 'package', [ 'default', 'zip' ] ); 169 | 170 | // Serve presentation locally 171 | grunt.registerTask( 'serve', [ 'connect', 'watch' ] ); 172 | 173 | // Run tests 174 | grunt.registerTask( 'test', [ 'jshint', 'qunit' ] ); 175 | 176 | }; 177 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2016 Hakim El Hattab, http://hakim.se 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /slides/lib/reveal.js/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal.js", 3 | "version": "3.3.0", 4 | "main": [ 5 | "js/reveal.js", 6 | "css/reveal.css" 7 | ], 8 | "homepage": "http://lab.hakim.se/reveal-js/", 9 | "license": "MIT", 10 | "description": "The HTML Presentation Framework", 11 | "authors": [ 12 | "Hakim El Hattab " 13 | ], 14 | "dependencies": { 15 | "headjs": "~1.0.3" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/hakimel/reveal.js.git" 20 | }, 21 | "ignore": [ 22 | "**/.*", 23 | "node_modules", 24 | "bower_components", 25 | "test" 26 | ] 27 | } -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/print/paper.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | @media print { 10 | 11 | /* SECTION 1: Set default width, margin, float, and 12 | background. This prevents elements from extending 13 | beyond the edge of the printed page, and prevents 14 | unnecessary background images from printing */ 15 | html { 16 | background: #fff; 17 | width: auto; 18 | height: auto; 19 | overflow: visible; 20 | } 21 | body { 22 | background: #fff; 23 | font-size: 20pt; 24 | width: auto; 25 | height: auto; 26 | border: 0; 27 | margin: 0 5%; 28 | padding: 0; 29 | overflow: visible; 30 | float: none !important; 31 | } 32 | 33 | /* SECTION 2: Remove any elements not needed in print. 34 | This would include navigation, ads, sidebars, etc. */ 35 | .nestedarrow, 36 | .controls, 37 | .fork-reveal, 38 | .share-reveal, 39 | .state-background, 40 | .reveal .progress, 41 | .reveal .backgrounds { 42 | display: none !important; 43 | } 44 | 45 | /* SECTION 3: Set body font face, size, and color. 46 | Consider using a serif font for readability. */ 47 | body, p, td, li, div { 48 | font-size: 20pt!important; 49 | font-family: Georgia, "Times New Roman", Times, serif !important; 50 | color: #000; 51 | } 52 | 53 | /* SECTION 4: Set heading font face, sizes, and color. 54 | Differentiate your headings from your body text. 55 | Perhaps use a large sans-serif for distinction. */ 56 | h1,h2,h3,h4,h5,h6 { 57 | color: #000!important; 58 | height: auto; 59 | line-height: normal; 60 | font-family: Georgia, "Times New Roman", Times, serif !important; 61 | text-shadow: 0 0 0 #000 !important; 62 | text-align: left; 63 | letter-spacing: normal; 64 | } 65 | /* Need to reduce the size of the fonts for printing */ 66 | h1 { font-size: 28pt !important; } 67 | h2 { font-size: 24pt !important; } 68 | h3 { font-size: 22pt !important; } 69 | h4 { font-size: 22pt !important; font-variant: small-caps; } 70 | h5 { font-size: 21pt !important; } 71 | h6 { font-size: 20pt !important; font-style: italic; } 72 | 73 | /* SECTION 5: Make hyperlinks more usable. 74 | Ensure links are underlined, and consider appending 75 | the URL to the end of the link for usability. */ 76 | a:link, 77 | a:visited { 78 | color: #000 !important; 79 | font-weight: bold; 80 | text-decoration: underline; 81 | } 82 | /* 83 | .reveal a:link:after, 84 | .reveal a:visited:after { 85 | content: " (" attr(href) ") "; 86 | color: #222 !important; 87 | font-size: 90%; 88 | } 89 | */ 90 | 91 | 92 | /* SECTION 6: more reveal.js specific additions by @skypanther */ 93 | ul, ol, div, p { 94 | visibility: visible; 95 | position: static; 96 | width: auto; 97 | height: auto; 98 | display: block; 99 | overflow: visible; 100 | margin: 0; 101 | text-align: left !important; 102 | } 103 | .reveal pre, 104 | .reveal table { 105 | margin-left: 0; 106 | margin-right: 0; 107 | } 108 | .reveal pre code { 109 | padding: 20px; 110 | border: 1px solid #ddd; 111 | } 112 | .reveal blockquote { 113 | margin: 20px 0; 114 | } 115 | .reveal .slides { 116 | position: static !important; 117 | width: auto !important; 118 | height: auto !important; 119 | 120 | left: 0 !important; 121 | top: 0 !important; 122 | margin-left: 0 !important; 123 | margin-top: 0 !important; 124 | padding: 0 !important; 125 | zoom: 1 !important; 126 | 127 | overflow: visible !important; 128 | display: block !important; 129 | 130 | text-align: left !important; 131 | -webkit-perspective: none; 132 | -moz-perspective: none; 133 | -ms-perspective: none; 134 | perspective: none; 135 | 136 | -webkit-perspective-origin: 50% 50%; 137 | -moz-perspective-origin: 50% 50%; 138 | -ms-perspective-origin: 50% 50%; 139 | perspective-origin: 50% 50%; 140 | } 141 | .reveal .slides section { 142 | visibility: visible !important; 143 | position: static !important; 144 | width: auto !important; 145 | height: auto !important; 146 | display: block !important; 147 | overflow: visible !important; 148 | 149 | left: 0 !important; 150 | top: 0 !important; 151 | margin-left: 0 !important; 152 | margin-top: 0 !important; 153 | padding: 60px 20px !important; 154 | z-index: auto !important; 155 | 156 | opacity: 1 !important; 157 | 158 | page-break-after: always !important; 159 | 160 | -webkit-transform-style: flat !important; 161 | -moz-transform-style: flat !important; 162 | -ms-transform-style: flat !important; 163 | transform-style: flat !important; 164 | 165 | -webkit-transform: none !important; 166 | -moz-transform: none !important; 167 | -ms-transform: none !important; 168 | transform: none !important; 169 | 170 | -webkit-transition: none !important; 171 | -moz-transition: none !important; 172 | -ms-transition: none !important; 173 | transition: none !important; 174 | } 175 | .reveal .slides section.stack { 176 | padding: 0 !important; 177 | } 178 | .reveal section:last-of-type { 179 | page-break-after: avoid !important; 180 | } 181 | .reveal section .fragment { 182 | opacity: 1 !important; 183 | visibility: visible !important; 184 | 185 | -webkit-transform: none !important; 186 | -moz-transform: none !important; 187 | -ms-transform: none !important; 188 | transform: none !important; 189 | } 190 | .reveal section img { 191 | display: block; 192 | margin: 15px 0px; 193 | background: rgba(255,255,255,1); 194 | border: 1px solid #666; 195 | box-shadow: none; 196 | } 197 | 198 | .reveal section small { 199 | font-size: 0.8em; 200 | } 201 | 202 | } -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/print/pdf.css: -------------------------------------------------------------------------------- 1 | /** 2 | * This stylesheet is used to print reveal.js 3 | * presentations to PDF. 4 | * 5 | * https://github.com/hakimel/reveal.js#pdf-export 6 | */ 7 | 8 | * { 9 | -webkit-print-color-adjust: exact; 10 | } 11 | 12 | body { 13 | margin: 0 auto !important; 14 | border: 0; 15 | padding: 0; 16 | float: none !important; 17 | overflow: visible; 18 | } 19 | 20 | html { 21 | width: 100%; 22 | height: 100%; 23 | overflow: visible; 24 | } 25 | 26 | /* Remove any elements not needed in print. */ 27 | .nestedarrow, 28 | .reveal .controls, 29 | .reveal .progress, 30 | .reveal .playback, 31 | .reveal.overview, 32 | .fork-reveal, 33 | .share-reveal, 34 | .state-background { 35 | display: none !important; 36 | } 37 | 38 | h1, h2, h3, h4, h5, h6 { 39 | text-shadow: 0 0 0 #000 !important; 40 | } 41 | 42 | .reveal pre code { 43 | overflow: hidden !important; 44 | font-family: Courier, 'Courier New', monospace !important; 45 | } 46 | 47 | ul, ol, div, p { 48 | visibility: visible; 49 | position: static; 50 | width: auto; 51 | height: auto; 52 | display: block; 53 | overflow: visible; 54 | margin: auto; 55 | } 56 | .reveal { 57 | width: auto !important; 58 | height: auto !important; 59 | overflow: hidden !important; 60 | } 61 | .reveal .slides { 62 | position: static; 63 | width: 100%; 64 | height: auto; 65 | 66 | left: auto; 67 | top: auto; 68 | margin: 0 !important; 69 | padding: 0 !important; 70 | 71 | overflow: visible; 72 | display: block; 73 | 74 | -webkit-perspective: none; 75 | -moz-perspective: none; 76 | -ms-perspective: none; 77 | perspective: none; 78 | 79 | -webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */ 80 | -moz-perspective-origin: 50% 50%; 81 | -ms-perspective-origin: 50% 50%; 82 | perspective-origin: 50% 50%; 83 | } 84 | 85 | .reveal .slides section { 86 | page-break-after: always !important; 87 | 88 | visibility: visible !important; 89 | position: relative !important; 90 | display: block !important; 91 | position: relative !important; 92 | 93 | margin: 0 !important; 94 | padding: 0 !important; 95 | box-sizing: border-box !important; 96 | min-height: 1px; 97 | 98 | opacity: 1 !important; 99 | 100 | -webkit-transform-style: flat !important; 101 | -moz-transform-style: flat !important; 102 | -ms-transform-style: flat !important; 103 | transform-style: flat !important; 104 | 105 | -webkit-transform: none !important; 106 | -moz-transform: none !important; 107 | -ms-transform: none !important; 108 | transform: none !important; 109 | } 110 | 111 | .reveal section.stack { 112 | margin: 0 !important; 113 | padding: 0 !important; 114 | page-break-after: avoid !important; 115 | height: auto !important; 116 | min-height: auto !important; 117 | } 118 | 119 | .reveal img { 120 | box-shadow: none; 121 | } 122 | 123 | .reveal .roll { 124 | overflow: visible; 125 | line-height: 1em; 126 | } 127 | 128 | /* Slide backgrounds are placed inside of their slide when exporting to PDF */ 129 | .reveal section .slide-background { 130 | display: block !important; 131 | position: absolute; 132 | top: 0; 133 | left: 0; 134 | width: 100%; 135 | z-index: -1; 136 | } 137 | 138 | /* All elements should be above the slide-background */ 139 | .reveal section>* { 140 | position: relative; 141 | z-index: 1; 142 | } 143 | 144 | /* Display slide speaker notes when 'showNotes' is enabled */ 145 | .reveal .speaker-notes-pdf { 146 | display: block; 147 | width: 100%; 148 | max-height: none; 149 | left: auto; 150 | top: auto; 151 | z-index: 100; 152 | } 153 | 154 | /* Display slide numbers when 'slideNumber' is enabled */ 155 | .reveal .slide-number-pdf { 156 | display: block; 157 | position: absolute; 158 | font-size: 14px; 159 | } 160 | 161 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/README.md: -------------------------------------------------------------------------------- 1 | ## Dependencies 2 | 3 | Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceding: https://github.com/hakimel/reveal.js#full-setup 4 | 5 | ## Creating a Theme 6 | 7 | To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `grunt css-themes`. 8 | 9 | Each theme file does four things in the following order: 10 | 11 | 1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)** 12 | Shared utility functions. 13 | 14 | 2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)** 15 | Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3. 16 | 17 | 3. **Override** 18 | This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please. 19 | 20 | 4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)** 21 | The template theme file which will generate final CSS output based on the currently defined variables. 22 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/source/beige.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Beige theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(../../lib/font/league-gothic/league-gothic.css); 17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainColor: #333; 22 | $headingColor: #333; 23 | $headingTextShadow: none; 24 | $backgroundColor: #f7f3de; 25 | $linkColor: #8b743d; 26 | $linkColorHover: lighten( $linkColor, 20% ); 27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99); 28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 29 | 30 | // Background generator 31 | @mixin bodyBackground() { 32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); 33 | } 34 | 35 | 36 | 37 | // Theme template ------------------------------ 38 | @import "../template/theme"; 39 | // --------------------------------------------- -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/source/black.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. This is the opposite of the 'white' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #222; 20 | 21 | $mainColor: #fff; 22 | $headingColor: #fff; 23 | 24 | $mainFontSize: 38px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #42affa; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-light-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #222; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/source/blood.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Blood theme for reveal.js 3 | * Author: Walther http://github.com/Walther 4 | * 5 | * Designed to be used with highlight.js theme 6 | * "monokai_sublime.css" available from 7 | * https://github.com/isagalaev/highlight.js/ 8 | * 9 | * For other themes, change $codeBackground accordingly. 10 | * 11 | */ 12 | 13 | // Default mixins and settings ----------------- 14 | @import "../template/mixins"; 15 | @import "../template/settings"; 16 | // --------------------------------------------- 17 | 18 | // Include theme-specific fonts 19 | 20 | @import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic); 21 | 22 | // Colors used in the theme 23 | $blood: #a23; 24 | $coal: #222; 25 | $codeBackground: #23241f; 26 | 27 | $backgroundColor: $coal; 28 | 29 | // Main text 30 | $mainFont: Ubuntu, 'sans-serif'; 31 | $mainFontSize: 36px; 32 | $mainColor: #eee; 33 | 34 | // Headings 35 | $headingFont: Ubuntu, 'sans-serif'; 36 | $headingTextShadow: 2px 2px 2px $coal; 37 | 38 | // h1 shadow, borrowed humbly from 39 | // (c) Default theme by Hakim El Hattab 40 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 41 | 42 | // Links 43 | $linkColor: $blood; 44 | $linkColorHover: lighten( $linkColor, 20% ); 45 | 46 | // Text selection 47 | $selectionBackgroundColor: $blood; 48 | $selectionColor: #fff; 49 | 50 | 51 | // Theme template ------------------------------ 52 | @import "../template/theme"; 53 | // --------------------------------------------- 54 | 55 | // some overrides after theme template import 56 | 57 | .reveal p { 58 | font-weight: 300; 59 | text-shadow: 1px 1px $coal; 60 | } 61 | 62 | .reveal h1, 63 | .reveal h2, 64 | .reveal h3, 65 | .reveal h4, 66 | .reveal h5, 67 | .reveal h6 { 68 | font-weight: 700; 69 | } 70 | 71 | .reveal p code { 72 | background-color: $codeBackground; 73 | display: inline-block; 74 | border-radius: 7px; 75 | } 76 | 77 | .reveal small code { 78 | vertical-align: baseline; 79 | } -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/source/league.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * League theme for reveal.js. 3 | * 4 | * This was the default theme pre-3.0.0. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(../../lib/font/league-gothic/league-gothic.css); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | // Override theme settings (see ../template/settings.scss) 22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); 23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 24 | 25 | // Background generator 26 | @mixin bodyBackground() { 27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); 28 | } 29 | 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/source/moon.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Dark theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | /** 19 | * Solarized colors by Ethan Schoonover 20 | */ 21 | html * { 22 | color-profile: sRGB; 23 | rendering-intent: auto; 24 | } 25 | 26 | // Solarized colors 27 | $base03: #002b36; 28 | $base02: #073642; 29 | $base01: #586e75; 30 | $base00: #657b83; 31 | $base0: #839496; 32 | $base1: #93a1a1; 33 | $base2: #eee8d5; 34 | $base3: #fdf6e3; 35 | $yellow: #b58900; 36 | $orange: #cb4b16; 37 | $red: #dc322f; 38 | $magenta: #d33682; 39 | $violet: #6c71c4; 40 | $blue: #268bd2; 41 | $cyan: #2aa198; 42 | $green: #859900; 43 | 44 | // Override theme settings (see ../template/settings.scss) 45 | $mainColor: $base1; 46 | $headingColor: $base2; 47 | $headingTextShadow: none; 48 | $backgroundColor: $base03; 49 | $linkColor: $blue; 50 | $linkColorHover: lighten( $linkColor, 20% ); 51 | $selectionBackgroundColor: $magenta; 52 | 53 | 54 | 55 | // Theme template ------------------------------ 56 | @import "../template/theme"; 57 | // --------------------------------------------- 58 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/source/night.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 17 | 18 | 19 | // Override theme settings (see ../template/settings.scss) 20 | $backgroundColor: #111; 21 | 22 | $mainFont: 'Open Sans', sans-serif; 23 | $linkColor: #e7ad52; 24 | $linkColorHover: lighten( $linkColor, 20% ); 25 | $headingFont: 'Montserrat', Impact, sans-serif; 26 | $headingTextShadow: none; 27 | $headingLetterSpacing: -0.03em; 28 | $headingTextTransform: none; 29 | $selectionBackgroundColor: #e7ad52; 30 | $mainFontSize: 30px; 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/source/serif.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | 8 | 9 | // Default mixins and settings ----------------- 10 | @import "../template/mixins"; 11 | @import "../template/settings"; 12 | // --------------------------------------------- 13 | 14 | 15 | 16 | // Override theme settings (see ../template/settings.scss) 17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 18 | $mainColor: #000; 19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 20 | $headingColor: #383D3D; 21 | $headingTextShadow: none; 22 | $headingTextTransform: none; 23 | $backgroundColor: #F0F1EB; 24 | $linkColor: #51483D; 25 | $linkColorHover: lighten( $linkColor, 20% ); 26 | $selectionBackgroundColor: #26351C; 27 | 28 | .reveal a { 29 | line-height: 1.3em; 30 | } 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- 36 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/source/simple.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | 22 | // Override theme settings (see ../template/settings.scss) 23 | $mainFont: 'Lato', sans-serif; 24 | $mainColor: #000; 25 | $headingFont: 'News Cycle', Impact, sans-serif; 26 | $headingColor: #000; 27 | $headingTextShadow: none; 28 | $headingTextTransform: none; 29 | $backgroundColor: #fff; 30 | $linkColor: #00008B; 31 | $linkColorHover: lighten( $linkColor, 20% ); 32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99); 33 | 34 | 35 | 36 | // Theme template ------------------------------ 37 | @import "../template/theme"; 38 | // --------------------------------------------- -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/source/sky.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Sky theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); 17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainFont: 'Open Sans', sans-serif; 22 | $mainColor: #333; 23 | $headingFont: 'Quicksand', sans-serif; 24 | $headingColor: #333; 25 | $headingLetterSpacing: -0.08em; 26 | $headingTextShadow: none; 27 | $backgroundColor: #f7fbfc; 28 | $linkColor: #3b759e; 29 | $linkColorHover: lighten( $linkColor, 20% ); 30 | $selectionBackgroundColor: #134674; 31 | 32 | // Fix links so they are not cut off 33 | .reveal a { 34 | line-height: 1.3em; 35 | } 36 | 37 | // Background generator 38 | @mixin bodyBackground() { 39 | @include radial-gradient( #add9e4, #f7fbfc ); 40 | } 41 | 42 | 43 | 44 | // Theme template ------------------------------ 45 | @import "../template/theme"; 46 | // --------------------------------------------- 47 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/source/solarized.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Light theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | 19 | /** 20 | * Solarized colors by Ethan Schoonover 21 | */ 22 | html * { 23 | color-profile: sRGB; 24 | rendering-intent: auto; 25 | } 26 | 27 | // Solarized colors 28 | $base03: #002b36; 29 | $base02: #073642; 30 | $base01: #586e75; 31 | $base00: #657b83; 32 | $base0: #839496; 33 | $base1: #93a1a1; 34 | $base2: #eee8d5; 35 | $base3: #fdf6e3; 36 | $yellow: #b58900; 37 | $orange: #cb4b16; 38 | $red: #dc322f; 39 | $magenta: #d33682; 40 | $violet: #6c71c4; 41 | $blue: #268bd2; 42 | $cyan: #2aa198; 43 | $green: #859900; 44 | 45 | // Override theme settings (see ../template/settings.scss) 46 | $mainColor: $base00; 47 | $headingColor: $base01; 48 | $headingTextShadow: none; 49 | $backgroundColor: $base3; 50 | $linkColor: $blue; 51 | $linkColorHover: lighten( $linkColor, 20% ); 52 | $selectionBackgroundColor: $magenta; 53 | 54 | // Background generator 55 | // @mixin bodyBackground() { 56 | // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) ); 57 | // } 58 | 59 | 60 | 61 | // Theme template ------------------------------ 62 | @import "../template/theme"; 63 | // --------------------------------------------- 64 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/source/white.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * White theme for reveal.js. This is the opposite of the 'black' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #fff; 20 | 21 | $mainColor: #222; 22 | $headingColor: #222; 23 | 24 | $mainFontSize: 38px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #2a76dd; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-dark-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #fff; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/template/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin vertical-gradient( $top, $bottom ) { 2 | background: $top; 3 | background: -moz-linear-gradient( top, $top 0%, $bottom 100% ); 4 | background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) ); 5 | background: -webkit-linear-gradient( top, $top 0%, $bottom 100% ); 6 | background: -o-linear-gradient( top, $top 0%, $bottom 100% ); 7 | background: -ms-linear-gradient( top, $top 0%, $bottom 100% ); 8 | background: linear-gradient( top, $top 0%, $bottom 100% ); 9 | } 10 | 11 | @mixin horizontal-gradient( $top, $bottom ) { 12 | background: $top; 13 | background: -moz-linear-gradient( left, $top 0%, $bottom 100% ); 14 | background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) ); 15 | background: -webkit-linear-gradient( left, $top 0%, $bottom 100% ); 16 | background: -o-linear-gradient( left, $top 0%, $bottom 100% ); 17 | background: -ms-linear-gradient( left, $top 0%, $bottom 100% ); 18 | background: linear-gradient( left, $top 0%, $bottom 100% ); 19 | } 20 | 21 | @mixin radial-gradient( $outer, $inner, $type: circle ) { 22 | background: $outer; 23 | background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 24 | background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) ); 25 | background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 26 | background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 27 | background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 28 | background: radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 29 | } -------------------------------------------------------------------------------- /slides/lib/reveal.js/css/theme/template/settings.scss: -------------------------------------------------------------------------------- 1 | // Base settings for all themes that can optionally be 2 | // overridden by the super-theme 3 | 4 | // Background of the presentation 5 | $backgroundColor: #2b2b2b; 6 | 7 | // Primary/body text 8 | $mainFont: 'Lato', sans-serif; 9 | $mainFontSize: 36px; 10 | $mainColor: #eee; 11 | 12 | // Vertical spacing between blocks of text 13 | $blockMargin: 20px; 14 | 15 | // Headings 16 | $headingMargin: 0 0 $blockMargin 0; 17 | $headingFont: 'League Gothic', Impact, sans-serif; 18 | $headingColor: #eee; 19 | $headingLineHeight: 1.2; 20 | $headingLetterSpacing: normal; 21 | $headingTextTransform: uppercase; 22 | $headingTextShadow: none; 23 | $headingFontWeight: normal; 24 | $heading1TextShadow: $headingTextShadow; 25 | 26 | $heading1Size: 3.77em; 27 | $heading2Size: 2.11em; 28 | $heading3Size: 1.55em; 29 | $heading4Size: 1.00em; 30 | 31 | // Links and actions 32 | $linkColor: #13DAEC; 33 | $linkColorHover: lighten( $linkColor, 20% ); 34 | 35 | // Text selection 36 | $selectionBackgroundColor: #FF5E99; 37 | $selectionColor: #fff; 38 | 39 | // Generates the presentation background, can be overridden 40 | // to return a background image or gradient 41 | @mixin bodyBackground() { 42 | background: $backgroundColor; 43 | } -------------------------------------------------------------------------------- /slides/lib/reveal.js/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 24 | 25 |
26 |
27 |
Slide 1
28 |
Slide 2
29 |
30 |
31 | 32 | 33 | 34 | 35 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #3f3f3f; 13 | color: #dcdcdc; 14 | } 15 | 16 | .hljs-keyword, 17 | .hljs-selector-tag, 18 | .hljs-tag { 19 | color: #e3ceab; 20 | } 21 | 22 | .hljs-template-tag { 23 | color: #dcdcdc; 24 | } 25 | 26 | .hljs-number { 27 | color: #8cd0d3; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-attribute { 33 | color: #efdcbc; 34 | } 35 | 36 | .hljs-literal { 37 | color: #efefaf; 38 | } 39 | 40 | .hljs-subst { 41 | color: #8f8f8f; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-name, 46 | .hljs-selector-id, 47 | .hljs-selector-class, 48 | .hljs-section, 49 | .hljs-type { 50 | color: #efef8f; 51 | } 52 | 53 | .hljs-symbol, 54 | .hljs-bullet, 55 | .hljs-link { 56 | color: #dca3a3; 57 | } 58 | 59 | .hljs-deletion, 60 | .hljs-string, 61 | .hljs-built_in, 62 | .hljs-builtin-name { 63 | color: #cc9393; 64 | } 65 | 66 | .hljs-addition, 67 | .hljs-comment, 68 | .hljs-quote, 69 | .hljs-meta { 70 | color: #7f9f7f; 71 | } 72 | 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License 2 | 3 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. 4 | 5 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 6 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 7 | 8 | —————————————————————————————- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | —————————————————————————————- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 14 | 15 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 16 | 17 | DEFINITIONS 18 | “Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 19 | 20 | “Reserved Font Name” refers to any names specified as such after the copyright statement(s). 21 | 22 | “Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s). 23 | 24 | “Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 25 | 26 | “Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 27 | 28 | PERMISSION & CONDITIONS 29 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 30 | 31 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 32 | 33 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 34 | 35 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 36 | 37 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 38 | 39 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 40 | 41 | TERMINATION 42 | This license becomes null and void if any of the above conditions are not met. 43 | 44 | DISCLAIMER 45 | THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/font/source-sans-pro/source-sans-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | src: url('source-sans-pro-regular.eot'); 4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'), 5 | url('source-sans-pro-regular.woff') format('woff'), 6 | url('source-sans-pro-regular.ttf') format('truetype'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: 'Source Sans Pro'; 13 | src: url('source-sans-pro-italic.eot'); 14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'), 15 | url('source-sans-pro-italic.woff') format('woff'), 16 | url('source-sans-pro-italic.ttf') format('truetype'); 17 | font-weight: normal; 18 | font-style: italic; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Source Sans Pro'; 23 | src: url('source-sans-pro-semibold.eot'); 24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'), 25 | url('source-sans-pro-semibold.woff') format('woff'), 26 | url('source-sans-pro-semibold.ttf') format('truetype'); 27 | font-weight: 600; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: 'Source Sans Pro'; 33 | src: url('source-sans-pro-semibolditalic.eot'); 34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'), 35 | url('source-sans-pro-semibolditalic.woff') format('woff'), 36 | url('source-sans-pro-semibolditalic.ttf') format('truetype'); 37 | font-weight: 600; 38 | font-style: italic; 39 | } -------------------------------------------------------------------------------- /slides/lib/reveal.js/lib/js/classList.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Markdown Demo 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 |
26 | 36 |
37 | 38 | 39 |
40 | 54 |
55 | 56 | 57 |
58 | 69 |
70 | 71 | 72 |
73 | 77 |
78 | 79 | 80 |
81 | 86 |
87 | 88 | 89 |
90 | 100 |
101 | 102 |
103 |
104 | 105 | 106 | 107 | 108 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/plugin/markdown/example.md: -------------------------------------------------------------------------------- 1 | # Markdown Demo 2 | 3 | 4 | 5 | ## External 1.1 6 | 7 | Content 1.1 8 | 9 | Note: This will only appear in the speaker notes window. 10 | 11 | 12 | ## External 1.2 13 | 14 | Content 1.2 15 | 16 | 17 | 18 | ## External 2 19 | 20 | Content 2.1 21 | 22 | 23 | 24 | ## External 3.1 25 | 26 | Content 3.1 27 | 28 | 29 | ## External 3.2 30 | 31 | Content 3.2 32 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/plugin/math/math.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A plugin which enables rendering of math equations inside 3 | * of reveal.js slides. Essentially a thin wrapper for MathJax. 4 | * 5 | * @author Hakim El Hattab 6 | */ 7 | var RevealMath = window.RevealMath || (function(){ 8 | 9 | var options = Reveal.getConfig().math || {}; 10 | options.mathjax = options.mathjax || 'https://cdn.mathjax.org/mathjax/latest/MathJax.js'; 11 | options.config = options.config || 'TeX-AMS_HTML-full'; 12 | 13 | loadScript( options.mathjax + '?config=' + options.config, function() { 14 | 15 | MathJax.Hub.Config({ 16 | messageStyle: 'none', 17 | tex2jax: { 18 | inlineMath: [['$','$'],['\\(','\\)']] , 19 | skipTags: ['script','noscript','style','textarea','pre'] 20 | }, 21 | skipStartupTypeset: true 22 | }); 23 | 24 | // Typeset followed by an immediate reveal.js layout since 25 | // the typesetting process could affect slide height 26 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] ); 27 | MathJax.Hub.Queue( Reveal.layout ); 28 | 29 | // Reprocess equations in slides when they turn visible 30 | Reveal.addEventListener( 'slidechanged', function( event ) { 31 | 32 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] ); 33 | 34 | } ); 35 | 36 | } ); 37 | 38 | function loadScript( url, callback ) { 39 | 40 | var head = document.querySelector( 'head' ); 41 | var script = document.createElement( 'script' ); 42 | script.type = 'text/javascript'; 43 | script.src = url; 44 | 45 | // Wrapper for callback to make sure it only fires once 46 | var finish = function() { 47 | if( typeof callback === 'function' ) { 48 | callback.call(); 49 | callback = null; 50 | } 51 | } 52 | 53 | script.onload = finish; 54 | 55 | // IE 56 | script.onreadystatechange = function() { 57 | if ( this.readyState === 'loaded' ) { 58 | finish(); 59 | } 60 | } 61 | 62 | // Normal browsers 63 | head.appendChild( script ); 64 | 65 | } 66 | 67 | })(); 68 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/plugin/multiplex/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var multiplex = Reveal.getConfig().multiplex; 3 | var socketId = multiplex.id; 4 | var socket = io.connect(multiplex.url); 5 | 6 | socket.on(multiplex.id, function(data) { 7 | // ignore data from sockets that aren't ours 8 | if (data.socketId !== socketId) { return; } 9 | if( window.location.host === 'localhost:1947' ) return; 10 | 11 | Reveal.setState(data.state); 12 | }); 13 | }()); 14 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/plugin/multiplex/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var crypto = require('crypto'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port: process.env.PORT || 1948, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | socket.on('multiplex-statechanged', function(data) { 20 | if (typeof data.secret == 'undefined' || data.secret == null || data.secret === '') return; 21 | if (createHash(data.secret) === data.socketId) { 22 | data.secret = null; 23 | socket.broadcast.emit(data.socketId, data); 24 | }; 25 | }); 26 | }); 27 | 28 | [ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) { 29 | app.use('/' + dir, staticDir(opts.baseDir + dir)); 30 | }); 31 | 32 | app.get("/", function(req, res) { 33 | res.writeHead(200, {'Content-Type': 'text/html'}); 34 | 35 | var stream = fs.createReadStream(opts.baseDir + '/index.html'); 36 | stream.on('error', function( error ) { 37 | res.write('

reveal.js multiplex server.

Generate token'); 38 | res.end(); 39 | }); 40 | stream.on('readable', function() { 41 | stream.pipe(res); 42 | }); 43 | }); 44 | 45 | app.get("/token", function(req,res) { 46 | var ts = new Date().getTime(); 47 | var rand = Math.floor(Math.random()*9999999); 48 | var secret = ts.toString() + rand.toString(); 49 | res.send({secret: secret, socketId: createHash(secret)}); 50 | }); 51 | 52 | var createHash = function(secret) { 53 | var cipher = crypto.createCipher('blowfish', secret); 54 | return(cipher.final('hex')); 55 | }; 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | console.log( brown + "reveal.js:" + reset + " Multiplex running on port " + green + opts.port + reset ); -------------------------------------------------------------------------------- /slides/lib/reveal.js/plugin/multiplex/master.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // Don't emit events from inside of notes windows 4 | if ( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var multiplex = Reveal.getConfig().multiplex; 7 | 8 | var socket = io.connect( multiplex.url ); 9 | 10 | function post() { 11 | 12 | var messageData = { 13 | state: Reveal.getState(), 14 | secret: multiplex.secret, 15 | socketId: multiplex.id 16 | }; 17 | 18 | socket.emit( 'multiplex-statechanged', messageData ); 19 | 20 | }; 21 | 22 | // Monitor events that trigger a change in state 23 | Reveal.addEventListener( 'slidechanged', post ); 24 | Reveal.addEventListener( 'fragmentshown', post ); 25 | Reveal.addEventListener( 'fragmenthidden', post ); 26 | Reveal.addEventListener( 'overviewhidden', post ); 27 | Reveal.addEventListener( 'overviewshown', post ); 28 | Reveal.addEventListener( 'paused', post ); 29 | Reveal.addEventListener( 'resumed', post ); 30 | 31 | }()); -------------------------------------------------------------------------------- /slides/lib/reveal.js/plugin/multiplex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal-js-multiplex", 3 | "version": "1.0.0", 4 | "description": "reveal.js multiplex server", 5 | "homepage": "http://lab.hakim.se/reveal-js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "engines": { 10 | "node": "~4.1.1" 11 | }, 12 | "dependencies": { 13 | "express": "~4.13.3", 14 | "grunt-cli": "~0.1.13", 15 | "mustache": "~2.2.1", 16 | "socket.io": "~1.3.7" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/plugin/notes-server/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // don't emit events from inside the previews themselves 4 | if( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var socket = io.connect( window.location.origin ), 7 | socketId = Math.random().toString().slice( 2 ); 8 | 9 | console.log( 'View slide notes at ' + window.location.origin + '/notes/' + socketId ); 10 | 11 | window.open( window.location.origin + '/notes/' + socketId, 'notes-' + socketId ); 12 | 13 | /** 14 | * Posts the current slide data to the notes window 15 | */ 16 | function post() { 17 | 18 | var slideElement = Reveal.getCurrentSlide(), 19 | notesElement = slideElement.querySelector( 'aside.notes' ); 20 | 21 | var messageData = { 22 | notes: '', 23 | markdown: false, 24 | socketId: socketId, 25 | state: Reveal.getState() 26 | }; 27 | 28 | // Look for notes defined in a slide attribute 29 | if( slideElement.hasAttribute( 'data-notes' ) ) { 30 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 31 | } 32 | 33 | // Look for notes defined in an aside element 34 | if( notesElement ) { 35 | messageData.notes = notesElement.innerHTML; 36 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 37 | } 38 | 39 | socket.emit( 'statechanged', messageData ); 40 | 41 | } 42 | 43 | // When a new notes window connects, post our current state 44 | socket.on( 'new-subscriber', function( data ) { 45 | post(); 46 | } ); 47 | 48 | // When the state changes from inside of the speaker view 49 | socket.on( 'statechanged-speaker', function( data ) { 50 | Reveal.setState( data.state ); 51 | } ); 52 | 53 | // Monitor events that trigger a change in state 54 | Reveal.addEventListener( 'slidechanged', post ); 55 | Reveal.addEventListener( 'fragmentshown', post ); 56 | Reveal.addEventListener( 'fragmenthidden', post ); 57 | Reveal.addEventListener( 'overviewhidden', post ); 58 | Reveal.addEventListener( 'overviewshown', post ); 59 | Reveal.addEventListener( 'paused', post ); 60 | Reveal.addEventListener( 'resumed', post ); 61 | 62 | // Post the initial state 63 | post(); 64 | 65 | }()); 66 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/plugin/notes-server/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var Mustache = require('mustache'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port : 1947, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | 20 | socket.on( 'new-subscriber', function( data ) { 21 | socket.broadcast.emit( 'new-subscriber', data ); 22 | }); 23 | 24 | socket.on( 'statechanged', function( data ) { 25 | delete data.state.overview; 26 | socket.broadcast.emit( 'statechanged', data ); 27 | }); 28 | 29 | socket.on( 'statechanged-speaker', function( data ) { 30 | delete data.state.overview; 31 | socket.broadcast.emit( 'statechanged-speaker', data ); 32 | }); 33 | 34 | }); 35 | 36 | [ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) { 37 | app.use( '/' + dir, staticDir( opts.baseDir + dir ) ); 38 | }); 39 | 40 | app.get('/', function( req, res ) { 41 | 42 | res.writeHead( 200, { 'Content-Type': 'text/html' } ); 43 | fs.createReadStream( opts.baseDir + '/index.html' ).pipe( res ); 44 | 45 | }); 46 | 47 | app.get( '/notes/:socketId', function( req, res ) { 48 | 49 | fs.readFile( opts.baseDir + 'plugin/notes-server/notes.html', function( err, data ) { 50 | res.send( Mustache.to_html( data.toString(), { 51 | socketId : req.params.socketId 52 | })); 53 | }); 54 | 55 | }); 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : '' ); 65 | 66 | console.log( brown + 'reveal.js - Speaker Notes' + reset ); 67 | console.log( '1. Open the slides at ' + green + slidesLocation + reset ); 68 | console.log( '2. Click on the link in your JS console to go to the notes page' ); 69 | console.log( '3. Advance through your slides and your notes will advance automatically' ); 70 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/plugin/notes/notes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Handles opening of and synchronization with the reveal.js 3 | * notes window. 4 | * 5 | * Handshake process: 6 | * 1. This window posts 'connect' to notes window 7 | * - Includes URL of presentation to show 8 | * 2. Notes window responds with 'connected' when it is available 9 | * 3. This window proceeds to send the current presentation state 10 | * to the notes window 11 | */ 12 | var RevealNotes = (function() { 13 | 14 | function openNotes( notesFilePath ) { 15 | 16 | if( !notesFilePath ) { 17 | var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path 18 | jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path 19 | notesFilePath = jsFileLocation + 'notes.html'; 20 | } 21 | 22 | var notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' ); 23 | 24 | /** 25 | * Connect to the notes window through a postmessage handshake. 26 | * Using postmessage enables us to work in situations where the 27 | * origins differ, such as a presentation being opened from the 28 | * file system. 29 | */ 30 | function connect() { 31 | // Keep trying to connect until we get a 'connected' message back 32 | var connectInterval = setInterval( function() { 33 | notesPopup.postMessage( JSON.stringify( { 34 | namespace: 'reveal-notes', 35 | type: 'connect', 36 | url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search, 37 | state: Reveal.getState() 38 | } ), '*' ); 39 | }, 500 ); 40 | 41 | window.addEventListener( 'message', function( event ) { 42 | var data = JSON.parse( event.data ); 43 | if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) { 44 | clearInterval( connectInterval ); 45 | onConnected(); 46 | } 47 | } ); 48 | } 49 | 50 | /** 51 | * Posts the current slide data to the notes window 52 | */ 53 | function post() { 54 | 55 | var slideElement = Reveal.getCurrentSlide(), 56 | notesElement = slideElement.querySelector( 'aside.notes' ); 57 | 58 | var messageData = { 59 | namespace: 'reveal-notes', 60 | type: 'state', 61 | notes: '', 62 | markdown: false, 63 | whitespace: 'normal', 64 | state: Reveal.getState() 65 | }; 66 | 67 | // Look for notes defined in a slide attribute 68 | if( slideElement.hasAttribute( 'data-notes' ) ) { 69 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 70 | messageData.whitespace = 'pre-wrap'; 71 | } 72 | 73 | // Look for notes defined in an aside element 74 | if( notesElement ) { 75 | messageData.notes = notesElement.innerHTML; 76 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 77 | } 78 | 79 | notesPopup.postMessage( JSON.stringify( messageData ), '*' ); 80 | 81 | } 82 | 83 | /** 84 | * Called once we have established a connection to the notes 85 | * window. 86 | */ 87 | function onConnected() { 88 | 89 | // Monitor events that trigger a change in state 90 | Reveal.addEventListener( 'slidechanged', post ); 91 | Reveal.addEventListener( 'fragmentshown', post ); 92 | Reveal.addEventListener( 'fragmenthidden', post ); 93 | Reveal.addEventListener( 'overviewhidden', post ); 94 | Reveal.addEventListener( 'overviewshown', post ); 95 | Reveal.addEventListener( 'paused', post ); 96 | Reveal.addEventListener( 'resumed', post ); 97 | 98 | // Post the initial state 99 | post(); 100 | 101 | } 102 | 103 | connect(); 104 | 105 | } 106 | 107 | if( !/receiver/i.test( window.location.search ) ) { 108 | 109 | // If the there's a 'notes' query set, open directly 110 | if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) { 111 | openNotes(); 112 | } 113 | 114 | // Open the notes when the 's' key is hit 115 | document.addEventListener( 'keydown', function( event ) { 116 | // Disregard the event if the target is editable or a 117 | // modifier is present 118 | if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return; 119 | 120 | // Disregard the event if keyboard is disabled 121 | if ( Reveal.getConfig().keyboard === false ) return; 122 | 123 | if( event.keyCode === 83 ) { 124 | event.preventDefault(); 125 | openNotes(); 126 | } 127 | }, false ); 128 | 129 | // Show our keyboard shortcut in the reveal.js help overlay 130 | if( window.Reveal ) Reveal.registerKeyboardShortcut( 'S', 'Speaker notes view' ); 131 | 132 | } 133 | 134 | return { open: openNotes }; 135 | 136 | })(); 137 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/plugin/print-pdf/print-pdf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * phantomjs script for printing presentations to PDF. 3 | * 4 | * Example: 5 | * phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf 6 | * 7 | * By Manuel Bieh (https://github.com/manuelbieh) 8 | */ 9 | 10 | // html2pdf.js 11 | var page = new WebPage(); 12 | var system = require( 'system' ); 13 | 14 | var slideWidth = system.args[3] ? system.args[3].split( 'x' )[0] : 960; 15 | var slideHeight = system.args[3] ? system.args[3].split( 'x' )[1] : 700; 16 | 17 | page.viewportSize = { 18 | width: slideWidth, 19 | height: slideHeight 20 | }; 21 | 22 | // TODO 23 | // Something is wrong with these config values. An input 24 | // paper width of 1920px actually results in a 756px wide 25 | // PDF. 26 | page.paperSize = { 27 | width: Math.round( slideWidth * 2 ), 28 | height: Math.round( slideHeight * 2 ), 29 | border: 0 30 | }; 31 | 32 | var inputFile = system.args[1] || 'index.html?print-pdf'; 33 | var outputFile = system.args[2] || 'slides.pdf'; 34 | 35 | if( outputFile.match( /\.pdf$/gi ) === null ) { 36 | outputFile += '.pdf'; 37 | } 38 | 39 | console.log( 'Printing PDF (Paper size: '+ page.paperSize.width + 'x' + page.paperSize.height +')' ); 40 | 41 | page.open( inputFile, function( status ) { 42 | window.setTimeout( function() { 43 | console.log( 'Printed successfully' ); 44 | page.render( outputFile ); 45 | phantom.exit(); 46 | }, 1000 ); 47 | } ); 48 | 49 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/examples/assets/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/test/examples/assets/image1.png -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/examples/assets/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/slides/lib/reveal.js/test/examples/assets/image2.png -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/examples/barebones.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Barebones 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 |
19 |

Barebones Presentation

20 |

This example contains the bare minimum includes and markup required to run a reveal.js presentation.

21 |
22 | 23 |
24 |

No Theme

25 |

There's no theme included, so it will fall back on browser defaults.

26 |
27 | 28 |
29 | 30 |
31 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/examples/embedded-media.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Embedded Media 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 |
22 |

Embedded Media Test

23 |
24 | 25 |
26 | 27 |
28 | 29 |
30 |

Empty Slide

31 |
32 | 33 |
34 | 35 |
36 | 37 | 38 | 39 | 40 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/examples/math.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Math Plugin 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 |
22 |

reveal.js Math Plugin

23 |

A thin wrapper for MathJax

24 |
25 | 26 |
27 |

The Lorenz Equations

28 | 29 | \[\begin{aligned} 30 | \dot{x} & = \sigma(y-x) \\ 31 | \dot{y} & = \rho x - y - xz \\ 32 | \dot{z} & = -\beta z + xy 33 | \end{aligned} \] 34 |
35 | 36 |
37 |

The Cauchy-Schwarz Inequality

38 | 39 | 42 |
43 | 44 |
45 |

A Cross Product Formula

46 | 47 | \[\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} 48 | \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 49 | \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ 50 | \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 51 | \end{vmatrix} \] 52 |
53 | 54 |
55 |

The probability of getting \(k\) heads when flipping \(n\) coins is

56 | 57 | \[P(E) = {n \choose k} p^k (1-p)^{ n-k} \] 58 |
59 | 60 |
61 |

An Identity of Ramanujan

62 | 63 | \[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 64 | 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} 65 | {1+\frac{e^{-8\pi}} {1+\ldots} } } } \] 66 |
67 | 68 |
69 |

A Rogers-Ramanujan Identity

70 | 71 | \[ 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = 72 | \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}\] 73 |
74 | 75 |
76 |

Maxwell’s Equations

77 | 78 | \[ \begin{aligned} 79 | \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ 80 | \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ 81 | \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} 82 | \] 83 |
84 | 85 |
86 |
87 |

The Lorenz Equations

88 | 89 |
90 | \[\begin{aligned} 91 | \dot{x} & = \sigma(y-x) \\ 92 | \dot{y} & = \rho x - y - xz \\ 93 | \dot{z} & = -\beta z + xy 94 | \end{aligned} \] 95 |
96 |
97 | 98 |
99 |

The Cauchy-Schwarz Inequality

100 | 101 |
102 | \[ \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \] 103 |
104 |
105 | 106 |
107 |

A Cross Product Formula

108 | 109 |
110 | \[\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} 111 | \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 112 | \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ 113 | \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 114 | \end{vmatrix} \] 115 |
116 |
117 | 118 |
119 |

The probability of getting \(k\) heads when flipping \(n\) coins is

120 | 121 |
122 | \[P(E) = {n \choose k} p^k (1-p)^{ n-k} \] 123 |
124 |
125 | 126 |
127 |

An Identity of Ramanujan

128 | 129 |
130 | \[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 131 | 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} 132 | {1+\frac{e^{-8\pi}} {1+\ldots} } } } \] 133 |
134 |
135 | 136 |
137 |

A Rogers-Ramanujan Identity

138 | 139 |
140 | \[ 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = 141 | \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}\] 142 |
143 |
144 | 145 |
146 |

Maxwell’s Equations

147 | 148 |
149 | \[ \begin{aligned} 150 | \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ 151 | \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ 152 | \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} 153 | \] 154 |
155 |
156 |
157 | 158 |
159 | 160 |
161 | 162 | 163 | 164 | 165 | 183 | 184 | 185 | 186 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/examples/slide-backgrounds.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Slide Backgrounds 8 | 9 | 10 | 11 | 12 | 13 | 23 | 24 | 25 | 26 | 27 |
28 | 29 |
30 | 31 |
32 |

data-background: #00ffff

33 |
34 | 35 |
36 |

data-background: #bb00bb

37 |
38 | 39 |
40 |

data-background: lightblue

41 |
42 | 43 |
44 |
45 |

data-background: #ff0000

46 |
47 |
48 |

data-background: rgba(0, 0, 0, 0.2)

49 |
50 |
51 |

data-background: salmon

52 |
53 |
54 | 55 |
56 |
57 |

Background applied to stack

58 |
59 |
60 |

Background applied to stack

61 |
62 |
63 |

Background applied to slide inside of stack

64 |
65 |
66 | 67 |
68 |

Background image

69 |
70 | 71 |
72 |
73 |

Background image

74 |
75 |
76 |

Background image

77 |
78 |
79 | 80 |
81 |

Background image

82 |
data-background-size="100px" data-background-repeat="repeat" data-background-color="#111"
83 |
84 | 85 |
86 |

Same background twice (1/2)

87 |
88 |
89 |

Same background twice (2/2)

90 |
91 | 92 |
93 |

Video background

94 |
95 | 96 |
97 |

Iframe background

98 |
99 | 100 |
101 |
102 |

Same background twice vertical (1/2)

103 |
104 |
105 |

Same background twice vertical (2/2)

106 |
107 |
108 | 109 |
110 |

Same background from horizontal to vertical (1/3)

111 |
112 |
113 |
114 |

Same background from horizontal to vertical (2/3)

115 |
116 |
117 |

Same background from horizontal to vertical (3/3)

118 |
119 |
120 | 121 |
122 | 123 |
124 | 125 | 126 | 127 | 128 | 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/examples/slide-transitions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Slide Transitions 8 | 9 | 10 | 11 | 21 | 22 | 23 | 24 | 25 |
26 | 27 |
28 | 29 |
30 |

Default

31 |
32 | 33 |
34 |

Default

35 |
36 | 37 |
38 |

data-transition: zoom

39 |
40 | 41 |
42 |

data-transition: zoom-in fade-out

43 |
44 | 45 |
46 |

Default

47 |
48 | 49 |
50 |

data-transition: convex

51 |
52 | 53 |
54 |

data-transition: convex-in concave-out

55 |
56 | 57 |
58 |
59 |

Default

60 |
61 |
62 |

data-transition: concave

63 |
64 |
65 |

data-transition: convex-in fade-out

66 |
67 |
68 |

Default

69 |
70 |
71 | 72 |
73 |

data-transition: none

74 |
75 | 76 |
77 |

Default

78 |
79 | 80 |
81 | 82 |
83 | 84 | 85 | 86 | 87 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/qunit-1.12.0.css: -------------------------------------------------------------------------------- 1 | /** 2 | * QUnit v1.12.0 - A JavaScript Unit Testing Framework 3 | * 4 | * http://qunitjs.com 5 | * 6 | * Copyright 2012 jQuery Foundation and other contributors 7 | * Released under the MIT license. 8 | * http://jquery.org/license 9 | */ 10 | 11 | /** Font Family and Sizes */ 12 | 13 | #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { 14 | font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; 15 | } 16 | 17 | #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } 18 | #qunit-tests { font-size: smaller; } 19 | 20 | 21 | /** Resets */ 22 | 23 | #qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter { 24 | margin: 0; 25 | padding: 0; 26 | } 27 | 28 | 29 | /** Header */ 30 | 31 | #qunit-header { 32 | padding: 0.5em 0 0.5em 1em; 33 | 34 | color: #8699a4; 35 | background-color: #0d3349; 36 | 37 | font-size: 1.5em; 38 | line-height: 1em; 39 | font-weight: normal; 40 | 41 | border-radius: 5px 5px 0 0; 42 | -moz-border-radius: 5px 5px 0 0; 43 | -webkit-border-top-right-radius: 5px; 44 | -webkit-border-top-left-radius: 5px; 45 | } 46 | 47 | #qunit-header a { 48 | text-decoration: none; 49 | color: #c2ccd1; 50 | } 51 | 52 | #qunit-header a:hover, 53 | #qunit-header a:focus { 54 | color: #fff; 55 | } 56 | 57 | #qunit-testrunner-toolbar label { 58 | display: inline-block; 59 | padding: 0 .5em 0 .1em; 60 | } 61 | 62 | #qunit-banner { 63 | height: 5px; 64 | } 65 | 66 | #qunit-testrunner-toolbar { 67 | padding: 0.5em 0 0.5em 2em; 68 | color: #5E740B; 69 | background-color: #eee; 70 | overflow: hidden; 71 | } 72 | 73 | #qunit-userAgent { 74 | padding: 0.5em 0 0.5em 2.5em; 75 | background-color: #2b81af; 76 | color: #fff; 77 | text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; 78 | } 79 | 80 | #qunit-modulefilter-container { 81 | float: right; 82 | } 83 | 84 | /** Tests: Pass/Fail */ 85 | 86 | #qunit-tests { 87 | list-style-position: inside; 88 | } 89 | 90 | #qunit-tests li { 91 | padding: 0.4em 0.5em 0.4em 2.5em; 92 | border-bottom: 1px solid #fff; 93 | list-style-position: inside; 94 | } 95 | 96 | #qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { 97 | display: none; 98 | } 99 | 100 | #qunit-tests li strong { 101 | cursor: pointer; 102 | } 103 | 104 | #qunit-tests li a { 105 | padding: 0.5em; 106 | color: #c2ccd1; 107 | text-decoration: none; 108 | } 109 | #qunit-tests li a:hover, 110 | #qunit-tests li a:focus { 111 | color: #000; 112 | } 113 | 114 | #qunit-tests li .runtime { 115 | float: right; 116 | font-size: smaller; 117 | } 118 | 119 | .qunit-assert-list { 120 | margin-top: 0.5em; 121 | padding: 0.5em; 122 | 123 | background-color: #fff; 124 | 125 | border-radius: 5px; 126 | -moz-border-radius: 5px; 127 | -webkit-border-radius: 5px; 128 | } 129 | 130 | .qunit-collapsed { 131 | display: none; 132 | } 133 | 134 | #qunit-tests table { 135 | border-collapse: collapse; 136 | margin-top: .2em; 137 | } 138 | 139 | #qunit-tests th { 140 | text-align: right; 141 | vertical-align: top; 142 | padding: 0 .5em 0 0; 143 | } 144 | 145 | #qunit-tests td { 146 | vertical-align: top; 147 | } 148 | 149 | #qunit-tests pre { 150 | margin: 0; 151 | white-space: pre-wrap; 152 | word-wrap: break-word; 153 | } 154 | 155 | #qunit-tests del { 156 | background-color: #e0f2be; 157 | color: #374e0c; 158 | text-decoration: none; 159 | } 160 | 161 | #qunit-tests ins { 162 | background-color: #ffcaca; 163 | color: #500; 164 | text-decoration: none; 165 | } 166 | 167 | /*** Test Counts */ 168 | 169 | #qunit-tests b.counts { color: black; } 170 | #qunit-tests b.passed { color: #5E740B; } 171 | #qunit-tests b.failed { color: #710909; } 172 | 173 | #qunit-tests li li { 174 | padding: 5px; 175 | background-color: #fff; 176 | border-bottom: none; 177 | list-style-position: inside; 178 | } 179 | 180 | /*** Passing Styles */ 181 | 182 | #qunit-tests li li.pass { 183 | color: #3c510c; 184 | background-color: #fff; 185 | border-left: 10px solid #C6E746; 186 | } 187 | 188 | #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } 189 | #qunit-tests .pass .test-name { color: #366097; } 190 | 191 | #qunit-tests .pass .test-actual, 192 | #qunit-tests .pass .test-expected { color: #999999; } 193 | 194 | #qunit-banner.qunit-pass { background-color: #C6E746; } 195 | 196 | /*** Failing Styles */ 197 | 198 | #qunit-tests li li.fail { 199 | color: #710909; 200 | background-color: #fff; 201 | border-left: 10px solid #EE5757; 202 | white-space: pre; 203 | } 204 | 205 | #qunit-tests > li:last-child { 206 | border-radius: 0 0 5px 5px; 207 | -moz-border-radius: 0 0 5px 5px; 208 | -webkit-border-bottom-right-radius: 5px; 209 | -webkit-border-bottom-left-radius: 5px; 210 | } 211 | 212 | #qunit-tests .fail { color: #000000; background-color: #EE5757; } 213 | #qunit-tests .fail .test-name, 214 | #qunit-tests .fail .module-name { color: #000000; } 215 | 216 | #qunit-tests .fail .test-actual { color: #EE5757; } 217 | #qunit-tests .fail .test-expected { color: green; } 218 | 219 | #qunit-banner.qunit-fail { background-color: #EE5757; } 220 | 221 | 222 | /** Result */ 223 | 224 | #qunit-testresult { 225 | padding: 0.5em 0.5em 0.5em 2.5em; 226 | 227 | color: #2b81af; 228 | background-color: #D2E0E6; 229 | 230 | border-bottom: 1px solid white; 231 | } 232 | #qunit-testresult .module-name { 233 | font-weight: bold; 234 | } 235 | 236 | /** Fixture */ 237 | 238 | #qunit-fixture { 239 | position: absolute; 240 | top: -10000px; 241 | left: -10000px; 242 | width: 1000px; 243 | height: 1000px; 244 | } -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/test-markdown-element-attributes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Element Attributes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/test-markdown-element-attributes.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reveal.addEventListener( 'ready', function() { 4 | 5 | QUnit.module( 'Markdown' ); 6 | 7 | test( 'Vertical separator', function() { 8 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 4, 'found four slides' ); 9 | }); 10 | 11 | 12 | test( 'Attributes on element header in vertical slides', function() { 13 | strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.fade-out' ).length, 1, 'found one vertical slide with class fragment.fade-out on header' ); 14 | strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.shrink' ).length, 1, 'found one vertical slide with class fragment.shrink on header' ); 15 | }); 16 | 17 | test( 'Attributes on element paragraphs in vertical slides', function() { 18 | strictEqual( document.querySelectorAll( '.reveal .slides section>section p.fragment.grow' ).length, 2, 'found a vertical slide with two paragraphs with class fragment.grow' ); 19 | }); 20 | 21 | test( 'Attributes on element list items in vertical slides', function() { 22 | strictEqual( document.querySelectorAll( '.reveal .slides section>section li.fragment.grow' ).length, 3, 'found a vertical slide with three list items with class fragment.grow' ); 23 | }); 24 | 25 | test( 'Attributes on element paragraphs in horizontal slides', function() { 26 | strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-red' ).length, 4, 'found a horizontal slide with four paragraphs with class fragment.grow' ); 27 | }); 28 | test( 'Attributes on element list items in horizontal slides', function() { 29 | strictEqual( document.querySelectorAll( '.reveal .slides section li.fragment.highlight-green' ).length, 5, 'found a horizontal slide with five list items with class fragment.roll-in' ); 30 | }); 31 | test( 'Attributes on element list items in horizontal slides', function() { 32 | strictEqual( document.querySelectorAll( '.reveal .slides section img.reveal.stretch' ).length, 1, 'found a horizontal slide with stretched image, class img.reveal.stretch' ); 33 | }); 34 | 35 | test( 'Attributes on elements in vertical slides with default element attribute separator', function() { 36 | strictEqual( document.querySelectorAll( '.reveal .slides section h2.fragment.highlight-red' ).length, 2, 'found two h2 titles with fragment highlight-red in vertical slides with default element attribute separator' ); 37 | }); 38 | 39 | test( 'Attributes on elements in single slides with default element attribute separator', function() { 40 | strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-blue' ).length, 3, 'found three elements with fragment highlight-blue in single slide with default element attribute separator' ); 41 | }); 42 | 43 | } ); 44 | 45 | Reveal.initialize(); 46 | 47 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/test-markdown-slide-attributes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Attributes 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/test-markdown-slide-attributes.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reveal.addEventListener( 'ready', function() { 4 | 5 | QUnit.module( 'Markdown' ); 6 | 7 | test( 'Vertical separator', function() { 8 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 6, 'found six vertical slides' ); 9 | }); 10 | 11 | test( 'Id on slide', function() { 12 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section#slide2' ).length, 1, 'found one slide with id slide2' ); 13 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section a[href="#/slide2"]' ).length, 1, 'found one slide with a link to slide2' ); 14 | }); 15 | 16 | test( 'data-background attributes', function() { 17 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A0C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' ); 18 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#ff0000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' ); 19 | strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C6916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' ); 20 | }); 21 | 22 | test( 'data-transition attributes', function() { 23 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="zoom"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' ); 24 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="fade"]' ).length, 1, 'found one vertical slide with data-transition="fade"' ); 25 | strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="zoom"]' ).length, 1, 'found one slide with data-transition="zoom"' ); 26 | }); 27 | 28 | test( 'data-background attributes with default separator', function() { 29 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A7C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' ); 30 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#f70000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' ); 31 | strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C7916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' ); 32 | }); 33 | 34 | test( 'data-transition attributes with default separator', function() { 35 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="concave"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' ); 36 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="page"]' ).length, 1, 'found one vertical slide with data-transition="fade"' ); 37 | strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="concave"]' ).length, 1, 'found one slide with data-transition="zoom"' ); 38 | }); 39 | 40 | test( 'data-transition attributes with inline content', function() { 41 | strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#ff0000"]' ).length, 3, 'found three horizontal slides with data-background="#ff0000"' ); 42 | }); 43 | 44 | } ); 45 | 46 | Reveal.initialize(); 47 | 48 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/test-markdown.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/test-markdown.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reveal.addEventListener( 'ready', function() { 4 | 5 | QUnit.module( 'Markdown' ); 6 | 7 | test( 'Vertical separator', function() { 8 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' ); 9 | }); 10 | 11 | 12 | } ); 13 | 14 | Reveal.initialize(); 15 | 16 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/test-pdf.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test PDF exports 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 19 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/test-pdf.js: -------------------------------------------------------------------------------- 1 | 2 | Reveal.addEventListener( 'ready', function() { 3 | 4 | // Only one test for now, we're mainly ensuring that there 5 | // are no execution errors when running PDF mode 6 | 7 | test( 'Reveal.isReady', function() { 8 | strictEqual( Reveal.isReady(), true, 'returns true' ); 9 | }); 10 | 11 | 12 | } ); 13 | 14 | Reveal.initialize({ pdf: true }); 15 | 16 | -------------------------------------------------------------------------------- /slides/lib/reveal.js/test/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Tests 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | 4 | import { OrganizationsComponent } from './components/organizations/organizations.component'; 5 | import { OrganizationAddComponent } from './components/organizations/organization-add.component'; 6 | import { OrganizationDonationComponent } from './components/organizations/organization-donation.component'; 7 | import { UserComponent } from './components/user/user.component'; 8 | 9 | const routes: Routes = [ 10 | { path: '', redirectTo: '/user', pathMatch: 'full' }, 11 | { path: 'organizations', component: OrganizationsComponent }, 12 | { path: 'organization-add', component: OrganizationAddComponent }, 13 | { path: 'organization-donation/:organizationId', component: OrganizationDonationComponent }, 14 | { path: 'user', component: UserComponent }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forRoot(routes)], 19 | exports: [RouterModule] 20 | }) 21 | export class AppRoutingModule { 22 | // nothing here 23 | } 24 | -------------------------------------------------------------------------------- /src/app/app.component.css: -------------------------------------------------------------------------------- 1 | .app-container { 2 | display: flex; 3 | flex-direction: column; 4 | position: absolute; 5 | top: 0; 6 | bottom: 0; 7 | left: 0; 8 | right: 0; 9 | } 10 | 11 | .app-toolbar { 12 | position: fixed; 13 | z-index: 2; 14 | } 15 | 16 | .app-sidenav-name { 17 | text-align: center; 18 | width: 100%; 19 | } 20 | 21 | .app-sidenav-logo { 22 | height: 1em; 23 | } 24 | 25 | .app-sidenav-container { 26 | margin-top: 4em; 27 | flex: 1 0 auto; 28 | } 29 | 30 | .app-sidenav-content { 31 | padding: 1em; 32 | } -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 7 |

8 | Non Governmental Organizations 9 |

10 |
11 | 12 | 13 | 14 | 15 | 16 | User 17 | Organizations 18 | 19 | 20 | 21 | 22 |
23 |

Non Governmental Organizations

24 | 25 |
{{error}}
26 |
27 |
28 | 29 |
30 | 31 |
32 | 33 |
-------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { MessagesService } from './services/messages.service'; 3 | import { Web3Service } from './services/web3.service'; 4 | import { Router } from '@angular/router'; 5 | import { StorageUtil } from './util/storage.util'; 6 | 7 | @Component({ 8 | selector: 'app-root', 9 | templateUrl: './app.component.html', 10 | styleUrls: ['./app.component.css'] 11 | }) 12 | export class AppComponent implements OnInit { 13 | 14 | error = ''; 15 | 16 | constructor( 17 | private web3Service: Web3Service, 18 | private messagesService: MessagesService, 19 | private router: Router) { 20 | } 21 | 22 | ngOnInit() { 23 | 24 | this.messagesService.getErrorMessage().subscribe(error => { 25 | this.error = error; 26 | }); 27 | 28 | this.messagesService.getNewUserAddressMessage().subscribe(userAddress => { 29 | 30 | console.log('AppComponent->userAddress', userAddress); 31 | //window.location.reload(); 32 | window.location.href = 'user' 33 | }); 34 | 35 | this.web3Service.init(); 36 | } 37 | 38 | goInit() { 39 | this.router.navigate(['/init']); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { AppComponent } from './app.component'; 3 | import { AppRoutingModule } from './app-routing.module'; 4 | import { BrowserModule } from '@angular/platform-browser'; 5 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 6 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 7 | import { ServicesModule } from './services/service.module'; 8 | 9 | import { OrganizationsComponent } from './components/organizations/organizations.component'; 10 | import { OrganizationsTableComponent } from './components/organizations/organizations-table.component'; 11 | import { OrganizationAddComponent } from './components/organizations/organization-add.component'; 12 | import { OrganizationDonationComponent } from './components/organizations/organization-donation.component'; 13 | import { UserComponent } from './components/user/user.component'; 14 | 15 | import { 16 | MatButtonModule, 17 | MatCardModule, 18 | MatCheckboxModule, 19 | MatGridListModule, 20 | MatIconModule, 21 | MatInputModule, 22 | MatListModule, 23 | MatSortModule, 24 | MatProgressSpinnerModule, 25 | MatTableModule, 26 | MatToolbarModule, 27 | MatSidenavModule, 28 | MatSlideToggleModule, 29 | MatSelectModule, 30 | } from '@angular/material'; 31 | 32 | @NgModule({ 33 | declarations: [ 34 | AppComponent, 35 | OrganizationsComponent, 36 | OrganizationAddComponent, 37 | OrganizationDonationComponent, 38 | OrganizationsTableComponent, 39 | UserComponent 40 | ], 41 | imports: [ 42 | AppRoutingModule, 43 | BrowserAnimationsModule, 44 | BrowserModule, 45 | FormsModule, 46 | MatButtonModule, 47 | MatCardModule, 48 | MatCheckboxModule, 49 | MatGridListModule, 50 | MatIconModule, 51 | MatInputModule, 52 | MatListModule, 53 | MatSelectModule, 54 | MatSidenavModule, 55 | MatSlideToggleModule, 56 | MatSortModule, 57 | MatProgressSpinnerModule, 58 | MatTableModule, 59 | MatToolbarModule, 60 | ReactiveFormsModule, 61 | ServicesModule 62 | ], 63 | providers: [], 64 | bootstrap: [AppComponent] 65 | }) 66 | export class AppModule { } 67 | -------------------------------------------------------------------------------- /src/app/components/organizations/organization-add.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

New organization

4 |
5 |
6 | 7 | 8 |
{{error}}
9 |
10 | 11 | 12 |
{{message}}
13 |
14 | 15 |
16 | 17 |
18 | Loading... 19 |
20 | 21 |
22 | 23 |
24 | Creating organization... 25 |
26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
35 | 36 |
37 | 38 |
39 | 40 |
41 | 42 |
43 |
44 |   45 |
46 |
47 |
48 | 49 | arrow_back 50 | Return 51 | 52 |   53 | 57 |
58 |
-------------------------------------------------------------------------------- /src/app/components/organizations/organization-add.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Organization } from '../../models/organization'; 3 | import { OrganizationsService } from '../../services/organizations.service'; 4 | import { StorageUtil } from '../../util/storage.util'; 5 | 6 | @Component({ 7 | selector: 'app-organization-add', 8 | templateUrl: './organization-add.component.html' 9 | }) 10 | export class OrganizationAddComponent implements OnInit { 11 | 12 | organization = new Organization(); 13 | isLoading = true; 14 | isCreating = false; 15 | error = ''; 16 | message = ''; 17 | 18 | constructor(private organizationsService: OrganizationsService) { } 19 | 20 | ngOnInit() { 21 | 22 | this._init().catch(error => this.error = error); 23 | } 24 | 25 | private async _init(): Promise { 26 | 27 | const organization: Organization = await this.organizationsService.getCurrentUserOrganizationAsOwner(); 28 | if (organization) { 29 | throw new Error('The user is already the owner of the organization with ID "' + organization.id + '".'); 30 | } 31 | this.organization.ownerAddress = StorageUtil.getUserAddress(); 32 | this.isLoading = false; 33 | } 34 | 35 | create() { 36 | 37 | this._create().catch(error => this.error = error); 38 | } 39 | 40 | private async _create(): Promise { 41 | 42 | if (this.organization.ownerAddress && this.organization.name && !this.isCreating) { 43 | this.isCreating = true; 44 | this.organization = await this.organizationsService.add(this.organization); 45 | this.message = 'Created organization with ID "' + this.organization.id + '".'; 46 | this.isCreating = false; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/app/components/organizations/organization-donation.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Donate to an organization

4 |
5 |
6 | 7 | 8 |
{{error}}
9 |
10 | 11 | 12 |
{{message}}
13 |
14 | 15 |
16 | 17 |
18 | Loading... 19 |
20 | 21 |
22 | 23 |
24 | Updating... 25 |
26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 | 45 |
46 | 47 |
48 | 49 |
50 | 51 |
52 |
53 |   54 |
55 |
56 |
57 | 58 | arrow_back 59 | Return 60 | 61 |   62 | 66 |
67 |
-------------------------------------------------------------------------------- /src/app/components/organizations/organization-donation.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { ActivatedRoute } from '@angular/router'; 3 | import { Organization } from '../../models/organization'; 4 | import { OrganizationsService } from '../../services/organizations.service'; 5 | import { Donation } from 'src/app/models/donation'; 6 | 7 | @Component({ 8 | selector: 'app-organization-donation', 9 | templateUrl: './organization-donation.component.html' 10 | }) 11 | export class OrganizationDonationComponent implements OnInit { 12 | 13 | organization = new Organization(); 14 | isLoading = true; 15 | isUpdating = false; 16 | error = ''; 17 | message = ''; 18 | value: number; 19 | donation: Donation; 20 | 21 | constructor( 22 | private route: ActivatedRoute, 23 | private organizationsService: OrganizationsService) { 24 | 25 | } 26 | 27 | ngOnInit() { 28 | 29 | this._init().catch(error => this.error = error); 30 | } 31 | 32 | private async _init(): Promise { 33 | 34 | const organizationId: number = +this.route.snapshot.paramMap.get('organizationId'); 35 | this.organization = await this.organizationsService.getOne(organizationId); 36 | if (!this.organization) { 37 | throw new Error('Organization with ID "' + organizationId + '" not found.'); 38 | } 39 | this.isLoading = false; 40 | } 41 | 42 | donate() { 43 | 44 | this._donate().catch(error => { 45 | this.error = error; 46 | }); 47 | } 48 | 49 | private async _donate(): Promise { 50 | 51 | if (this.value && !this.isUpdating) { 52 | this.isUpdating = true; 53 | this.donation = await this.organizationsService.donation(this.organization.id, this.value); 54 | this.message = 'Donation of "' + this.donation.value + '" ETH submitted to the organization with ID "' + this.organization.id + '".'; 55 | this.isUpdating = false; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/app/components/organizations/organizations-table.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 36 | 37 | 38 | 39 | 40 | 41 |
ID 10 | {{element.id}} 11 | Owner Address 17 | {{element.ownerAddress}} 18 | Name 24 | {{element.name}} 25 | 31 | 32 | monetization_on 33 | Donate 34 | 35 |
-------------------------------------------------------------------------------- /src/app/components/organizations/organizations-table.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ViewChild, Input } from '@angular/core'; 2 | import { MatSort, MatTableDataSource } from '@angular/material'; 3 | import { Organization } from '../../models/organization'; 4 | 5 | @Component({ 6 | selector: 'app-organizations-table', 7 | templateUrl: './organizations-table.component.html' 8 | }) 9 | export class OrganizationsTableComponent implements OnInit { 10 | 11 | @ViewChild(MatSort) sort: MatSort; 12 | 13 | @Input() organizations: Organization[]; 14 | @Input() organization: Organization; 15 | 16 | dataSource: MatTableDataSource; 17 | displayedColumns: string[] = ['id', 'ownerAddress', 'name', 'donation']; 18 | 19 | constructor() { } 20 | 21 | ngOnInit() { 22 | if (this.organization) { 23 | this.organizations = []; 24 | this.organizations.push(this.organization); 25 | } 26 | this.dataSource = new MatTableDataSource(this.organizations); 27 | this.dataSource.sort = this.sort; 28 | } 29 | 30 | applyFilter(filterValue: string) { 31 | this.dataSource.filter = filterValue.trim().toLowerCase(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/app/components/organizations/organizations.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Organizations

4 |
5 | 10 |
11 | 12 | 13 |
{{error}}
14 |
15 | 16 |
17 | 18 |
19 | Loading user organization... 20 |
21 | 22 |
23 | 24 |
25 |

My organization (as owner)

26 | 27 |

Other organizations

28 |
29 | 30 |
31 | Loading other organizations... 32 |
33 | 34 |
35 | 36 | 37 | 38 | 39 |
No organizations found.
40 |
41 | 42 |
43 | 44 |
45 | 46 |
-------------------------------------------------------------------------------- /src/app/components/organizations/organizations.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ViewChild } from '@angular/core'; 2 | import { Organization } from '../../models/organization'; 3 | import { OrganizationsService } from '../../services/organizations.service'; 4 | 5 | @Component({ 6 | selector: 'app-organizations', 7 | templateUrl: './organizations.component.html' 8 | }) 9 | export class OrganizationsComponent implements OnInit { 10 | 11 | organization: Organization; 12 | organizations: Organization[] = []; 13 | canCreate = false; 14 | isLoadingOrganization = true; 15 | isLoadingOrganizations = true; 16 | error = ''; 17 | 18 | constructor( 19 | private organizationsService: OrganizationsService) { 20 | 21 | } 22 | 23 | ngOnInit() { 24 | 25 | this._init().catch(error => this.error = error); 26 | } 27 | 28 | private async _init(): Promise { 29 | 30 | this.organization = await this.organizationsService.getCurrentUserOrganizationAsOwner(); 31 | if (!this.organization) { 32 | this.canCreate = true; 33 | } 34 | this.isLoadingOrganization = false; 35 | 36 | const organizations = await this.organizationsService.getAll(); 37 | for (let index = 0; index < organizations.length; index++) { 38 | if (!this.organization || this.organization.id.toString() !== organizations[index].id.toString()) { 39 | this.organizations.push(organizations[index]); 40 | } 41 | } 42 | this.isLoadingOrganizations = false; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/app/components/user/user.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | User 4 |

5 |
6 | 7 | 8 |
{{error}}
9 |
10 | 11 |
12 | 13 | 14 |
Your user address is {{userAddress}}.
15 |
16 | 17 |
18 | 19 | 20 |
21 | Loading user organization as owner... 22 |
23 | 24 |
25 | 26 |
27 |

You are the owner of the organization:

28 | 29 |
30 | 31 |
32 |

You are not the owner of any organizations.

33 | 34 | add 35 | Add organization 36 | 37 |
38 | 39 |
40 |
41 | 42 |
-------------------------------------------------------------------------------- /src/app/components/user/user.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ViewChild } from '@angular/core'; 2 | import { StorageUtil } from '../../util/storage.util'; 3 | import { Organization } from '../../models/organization'; 4 | import { OrganizationsService } from '../../services/organizations.service'; 5 | 6 | @Component({ 7 | selector: 'app-user', 8 | templateUrl: './user.component.html' 9 | }) 10 | export class UserComponent implements OnInit { 11 | 12 | userAddress = ''; 13 | organizationOwner: Organization; 14 | isLoadingOwner = true; 15 | error = ''; 16 | 17 | constructor( 18 | private organizationsService: OrganizationsService) { 19 | 20 | } 21 | 22 | ngOnInit() { 23 | 24 | this.userAddress = StorageUtil.getUserAddress(); 25 | 26 | this._init().catch(error => this.error = error); 27 | } 28 | 29 | private async _init(): Promise { 30 | 31 | this.organizationOwner = await this.organizationsService.getCurrentUserOrganizationAsOwner(); 32 | this.isLoadingOwner = false; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/app/models/donation.ts: -------------------------------------------------------------------------------- 1 | import { AddressUtil } from '../util/address.util'; 2 | 3 | export class Donation { 4 | 5 | organizationId: number; 6 | ownerAddress: string; 7 | senderAddress: string; 8 | value: string; 9 | string: string; 10 | 11 | ownerAddressTruncated(): string { 12 | 13 | return AddressUtil.truncateAddress(this.ownerAddress); 14 | } 15 | 16 | senderAddressTruncated(): string { 17 | 18 | return AddressUtil.truncateAddress(this.senderAddress); 19 | } 20 | 21 | getString() { 22 | this.setString(); 23 | return this.string; 24 | } 25 | 26 | setString() { 27 | this.string = 'Donation[organizationID=' + this.organizationId + '' 28 | + ', ownerAddress=' + this.ownerAddress + '' 29 | + ', senderAddress=' + this.senderAddress + '' 30 | + ', value=' + this.value + ']'; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/app/models/organization.ts: -------------------------------------------------------------------------------- 1 | import { AddressUtil } from '../util/address.util'; 2 | 3 | export class Organization { 4 | 5 | id: number; 6 | ownerAddress: string; 7 | name: string; 8 | string: string; 9 | 10 | ownerAddressTruncated(): string { 11 | 12 | return AddressUtil.truncateAddress(this.ownerAddress); 13 | } 14 | 15 | getString() { 16 | this.setString(); 17 | return this.string; 18 | } 19 | 20 | setString() { 21 | this.string = 'Organization[ID=' + this.id + '' 22 | + ', ownerAddress=' + this.ownerAddress + '' 23 | + ', name=' + this.name + ']'; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/app/services/messages.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Observable, Subject } from 'rxjs'; 3 | 4 | @Injectable() 5 | export class MessagesService { 6 | 7 | private newUserAddressSubject = new Subject(); 8 | private errorSubject = new Subject(); 9 | 10 | sendNewUserAddressMessage(message: string) { 11 | this.newUserAddressSubject.next(message); 12 | } 13 | 14 | getNewUserAddressMessage(): Observable { 15 | return this.newUserAddressSubject.asObservable(); 16 | } 17 | 18 | sendErrorMessage(message: string) { 19 | this.errorSubject.next(message); 20 | } 21 | 22 | getErrorMessage(): Observable { 23 | return this.errorSubject.asObservable(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/app/services/organizations.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Organization } from '../models/organization'; 3 | import { Web3Service } from './web3.service'; 4 | import { StorageUtil } from '../util/storage.util'; 5 | import { Donation } from '../models/donation'; 6 | 7 | @Injectable() 8 | export class OrganizationsService { 9 | 10 | private organizations: Organization[] = []; 11 | private senderAddress: string; 12 | 13 | constructor( 14 | private web3Service: Web3Service) { 15 | 16 | this.senderAddress = StorageUtil.getUserAddress(); 17 | } 18 | 19 | async getCurrentUserOrganizationAsOwner(): Promise { 20 | 21 | return await this.getUserOrganizationAsOwner(this.senderAddress); 22 | } 23 | 24 | async getUserOrganizationAsOwner(userAddress: string): Promise { 25 | 26 | const contractInstance = await this.web3Service.getContractInstance(); 27 | const organizationId = await contractInstance.ownerToOrganizationId.call(userAddress); 28 | if (!organizationId || organizationId.toString() === '0') { 29 | console.log('OrganizationService->getUserOrganizationAsOwner->organizationId', organizationId); 30 | return; 31 | } 32 | const organization = await this.getOne(organizationId); 33 | console.log('OrganizationService->getUserOrganizationAsOwner', organization); 34 | return organization; 35 | } 36 | 37 | async getAll(): Promise { 38 | 39 | const contractInstance = await this.web3Service.getContractInstance(); 40 | const lengthBigNumber = await contractInstance.getOrganizationsLength(); 41 | const organizationLength = lengthBigNumber.toString() * 1; 42 | if (this.organizations.length + 1 === organizationLength) { 43 | console.log('OrganizationService->getAll->old', this.organizations); 44 | return this.organizations; 45 | } 46 | const organizations = []; 47 | for (let index = 1; index < organizationLength; index++) { 48 | const organization = await this.getOne(index); 49 | organizations.push(organization); 50 | } 51 | this.organizations = organizations; 52 | console.log('OrganizationService->getAll->new', this.organizations); 53 | return this.organizations; 54 | } 55 | 56 | async getOne(id: number): Promise { 57 | 58 | const oldElement = this.organizations[id - 1]; 59 | if (oldElement) { 60 | return oldElement; 61 | } 62 | const contractInstance = await this.web3Service.getContractInstance(); 63 | const organizationArray = await contractInstance.organizations.call(id); 64 | const organization = this._getOrganizationFromArray(organizationArray); 65 | if (!organization.id 66 | || organization.id.toString() === '0' 67 | || organization.id.toString() !== id.toString()) { 68 | throw new Error('The organization ID is not correct.'); 69 | } 70 | return organization; 71 | } 72 | 73 | async add(organization: Organization): Promise { 74 | 75 | const contractInstance = await this.web3Service.getContractInstance(); 76 | const oldOrganization = await this.getCurrentUserOrganizationAsOwner(); 77 | if (oldOrganization) { 78 | throw new Error('The user is already the owner of the organization with ID "' + oldOrganization.id + '".'); 79 | } 80 | const transaction = await contractInstance.addOrganization(organization.name, { from: this.senderAddress }); 81 | const newOrganization = this._getOrganizationFromTransaction(transaction); 82 | if (!newOrganization.id 83 | || newOrganization.id.toString() === '0') { 84 | throw new Error('The organization ID is not correct.'); 85 | } 86 | this.organizations.push(newOrganization); 87 | console.log('OrganizationService->add', newOrganization); 88 | return newOrganization; 89 | } 90 | 91 | async donation(id: number, ethValue: number): Promise { 92 | 93 | const organization = await this.getOne(id); 94 | const contractInstance = await this.web3Service.getContractInstance(); 95 | const weiValue = this.web3Service.etherToWei(ethValue.toString()); 96 | const transaction = await contractInstance.donation(organization.id, 97 | { value: weiValue, from: this.senderAddress }); 98 | const donation = await this._getDonationFromTransaction(transaction); 99 | if (donation.organizationId.toString() !== id.toString() 100 | || donation.ownerAddress !== organization.ownerAddress 101 | || donation.senderAddress !== this.senderAddress 102 | || donation.value.toString() !== ethValue.toString()) { 103 | throw new Error('Some error found donating.'); 104 | } 105 | console.log('OrganizationService->donation', donation); 106 | return donation; 107 | } 108 | 109 | private _getOrganizationFromArray(array: any): Organization { 110 | 111 | const organization = new Organization(); 112 | organization.id = array[0]; 113 | organization.ownerAddress = array[1]; 114 | organization.name = array[2]; 115 | organization.setString(); 116 | return organization; 117 | } 118 | 119 | private _getOrganizationFromTransaction(transaction: any): Organization { 120 | 121 | const organization = new Organization(); 122 | organization.id = transaction.logs[0].args.id; 123 | organization.ownerAddress = transaction.logs[0].args.owner; 124 | organization.name = transaction.logs[0].args.name; 125 | organization.setString(); 126 | return organization; 127 | } 128 | 129 | private _getDonationFromTransaction(transaction: any): Donation { 130 | 131 | const organization = new Donation(); 132 | organization.organizationId = transaction.logs[0].args.id; 133 | organization.ownerAddress = transaction.logs[0].args.owner; 134 | organization.senderAddress = transaction.logs[0].args.sender; 135 | const weiValue = transaction.logs[0].args.value; 136 | const ethValue = this.web3Service.weiToEther(weiValue.toString()); 137 | organization.value = ethValue; 138 | organization.setString(); 139 | return organization; 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /src/app/services/service.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { MessagesService } from './messages.service'; 3 | import { OrganizationsService } from './organizations.service'; 4 | import { Web3Service } from './web3.service'; 5 | 6 | @NgModule({ 7 | providers: [ 8 | MessagesService, 9 | OrganizationsService, 10 | Web3Service, 11 | ] 12 | }) 13 | export class ServicesModule { 14 | // nothing here 15 | } 16 | -------------------------------------------------------------------------------- /src/app/services/web3.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { StorageUtil } from '../util/storage.util'; 3 | import { MessagesService } from './messages.service'; 4 | 5 | import * as contract from 'truffle-contract'; 6 | declare let require: any; 7 | declare let window: any; 8 | const Web3 = require('web3'); 9 | const artifacts = require('../../../build/contracts/NonGovernmentalOrganizations.json'); 10 | 11 | @Injectable() 12 | export class Web3Service { 13 | 14 | web3: any; 15 | 16 | constructor(private messagesService: MessagesService) { 17 | 18 | if (typeof window.web3 === 'undefined') { 19 | return; 20 | } 21 | 22 | this.web3 = new Web3(window.web3.currentProvider); 23 | } 24 | 25 | init() { 26 | setInterval(() => this.getUserAddress(), 1000); 27 | } 28 | 29 | private getUserAddress() { 30 | 31 | if (!this.web3) { 32 | this.messagesService.sendErrorMessage('web3 server not found. Try MetaMask.'); 33 | return; 34 | } 35 | this.web3.eth.getAccounts() 36 | .then(accounts => { 37 | if (!accounts || accounts.length === 0) { 38 | this.messagesService.sendErrorMessage('No user accounts retrieved.'); 39 | return; 40 | } 41 | if (StorageUtil.getUserAddress() !== accounts[0].toLowerCase()) { 42 | StorageUtil.setUserAddress(accounts[0].toLowerCase()); 43 | console.log('Web3Service->accounts[0]', StorageUtil.getUserAddress()); 44 | this.messagesService.sendNewUserAddressMessage(StorageUtil.getUserAddress()); 45 | } 46 | this.getContractInstance().then().catch(error => { 47 | this.messagesService.sendErrorMessage(error); 48 | }); 49 | }).catch(error => { 50 | console.log(error); 51 | this.messagesService.sendErrorMessage('Ethereum accounts not found.'); 52 | }); 53 | } 54 | 55 | async getContractInstance(): Promise { 56 | 57 | if (!this.web3) { 58 | throw new Error('web3 server not found. Try MetaMask.'); 59 | } 60 | const ngoContract = contract(artifacts); 61 | ngoContract.setProvider(this.web3.currentProvider); 62 | try { 63 | const ngoInstance = await ngoContract.deployed(); 64 | return ngoInstance; 65 | } catch (error) { 66 | console.log(error); 67 | throw new Error('Contract has not been deployed to detected network.'); 68 | } 69 | } 70 | 71 | etherToWei(ether: string): string { 72 | 73 | return '' + this.web3.utils.toWei(ether, 'ether'); 74 | } 75 | 76 | weiToEther(wei: string): string { 77 | 78 | return '' + this.web3.utils.fromWei(wei, 'ether'); 79 | } 80 | 81 | isAddress(address: string): boolean { 82 | 83 | return this.web3.utils.isAddress(address); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/app/util/address.util.ts: -------------------------------------------------------------------------------- 1 | export class AddressUtil { 2 | 3 | static truncateAddress(address: string): string { 4 | if (!address) { 5 | return ''; 6 | } 7 | let newAddress = address; 8 | if (address.length > 6) { 9 | newAddress = address.substring(0, 5) + '...'; 10 | } 11 | if (address.length > 10) { 12 | newAddress = newAddress + address.substring(address.length - 5, address.length - 1); 13 | } 14 | return newAddress; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/app/util/storage.util.ts: -------------------------------------------------------------------------------- 1 | export class StorageUtil { 2 | 3 | private static _userAddress = 'userAddress'; 4 | 5 | static getUserAddress() { 6 | return this._getFromLocalStorage(this._userAddress); 7 | } 8 | 9 | static setUserAddress(userAddress: string) { 10 | this._setToLocalStorage(this._userAddress, userAddress); 11 | } 12 | 13 | 14 | private static _getFromLocalStorage(collectionName: string) { 15 | const data = localStorage.getItem(collectionName); 16 | if (data) { 17 | return JSON.parse(data); 18 | } 19 | return {}; 20 | } 21 | 22 | private static _setToLocalStorage(collectionName: string, data: any) { 23 | localStorage.setItem(collectionName, JSON.stringify(data)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/src/assets/.gitkeep -------------------------------------------------------------------------------- /src/assets/logo/logo-blanco-recortado.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/src/assets/logo/logo-blanco-recortado.png -------------------------------------------------------------------------------- /src/assets/logo/logo-blanco.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/src/assets/logo/logo-blanco.ico -------------------------------------------------------------------------------- /src/assets/logo/logo-blanco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/src/assets/logo/logo-blanco.png -------------------------------------------------------------------------------- /src/assets/logo/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/src/assets/logo/logo.ico -------------------------------------------------------------------------------- /src/assets/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/src/assets/logo/logo.png -------------------------------------------------------------------------------- /src/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * In development mode, to ignore zone related error stack frames such as 11 | * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can 12 | * import the following file, but please comment it out in production mode 13 | * because it will have performance impact when throw error 14 | */ 15 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 16 | -------------------------------------------------------------------------------- /src/favicon-blanco.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/src/favicon-blanco.ico -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asanzdiego/codemotion-charla-blockchain/ae870f365dda91d9dc1ed3ab9a13c09b46bb70ed/src/favicon.ico -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Non Governmental Organizations 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage'), 20 | reports: ['html', 'lcovonly'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | import 'hammerjs'; 8 | 9 | if (environment.production) { 10 | enableProdMode(); 11 | } 12 | 13 | platformBrowserDynamic().bootstrapModule(AppModule) 14 | .catch(err => console.log(err)); 15 | -------------------------------------------------------------------------------- /src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/ 22 | // import 'core-js/es6/symbol'; 23 | // import 'core-js/es6/object'; 24 | // import 'core-js/es6/function'; 25 | // import 'core-js/es6/parse-int'; 26 | // import 'core-js/es6/parse-float'; 27 | // import 'core-js/es6/number'; 28 | // import 'core-js/es6/math'; 29 | // import 'core-js/es6/string'; 30 | // import 'core-js/es6/date'; 31 | // import 'core-js/es6/array'; 32 | // import 'core-js/es6/regexp'; 33 | // import 'core-js/es6/map'; 34 | // import 'core-js/es6/weak-map'; 35 | // import 'core-js/es6/set'; 36 | 37 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 38 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 39 | 40 | /** IE10 and IE11 requires the following for the Reflect API. */ 41 | // import 'core-js/es6/reflect'; 42 | 43 | 44 | /** Evergreen browsers require these. **/ 45 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. 46 | import 'core-js/es7/reflect'; 47 | 48 | 49 | /** 50 | * Web Animations `@angular/platform-browser/animations` 51 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 52 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 53 | **/ 54 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 55 | 56 | /** 57 | * By default, zone.js will patch all possible macroTask and DomEvents 58 | * user can disable parts of macroTask/DomEvents patch by setting following flags 59 | */ 60 | 61 | // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 62 | // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 63 | // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 64 | 65 | /* 66 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 67 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 68 | */ 69 | // (window as any).__Zone_enable_cross_context_check = true; 70 | 71 | /*************************************************************************************************** 72 | * Zone JS is required by default for Angular itself. 73 | */ 74 | import 'zone.js/dist/zone'; // Included with Angular CLI. 75 | 76 | 77 | 78 | /*************************************************************************************************** 79 | * APPLICATION IMPORTS 80 | */ 81 | -------------------------------------------------------------------------------- /src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @import "~@angular/material/prebuilt-themes/indigo-pink.css"; 3 | 4 | .mat-form-field { 5 | width: 100%; 6 | } 7 | 8 | .app-flex-container { 9 | display: flex; 10 | justify-content: space-between 11 | } 12 | 13 | .app-primary { 14 | color: #3f51b5; 15 | } 16 | 17 | .app-accent { 18 | color: #ff4081; 19 | } 20 | 21 | .app-warn { 22 | color: #f44336; 23 | } 24 | 25 | table { 26 | width: 100%; 27 | } 28 | 29 | th.mat-sort-header-sorted { 30 | color: black; 31 | } 32 | 33 | .app-cursor { 34 | cursor: pointer; 35 | } -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/TestNonGovernmentalOrganizations.js: -------------------------------------------------------------------------------- 1 | var NonGovernmentalOrganizations = artifacts.require("NonGovernmentalOrganizations"); 2 | 3 | contract("NonGovernmentalOrganizations", async (accounts) => { 4 | 5 | it("addOrganization - ok", async () => { 6 | 7 | let instance = await NonGovernmentalOrganizations.deployed(); 8 | 9 | let expectedId = 1; 10 | let expectedOwner = accounts[0]; 11 | let expectedName = "Commit Conf"; 12 | let expectedLength = 2; 13 | 14 | let tx = await instance.addOrganization(expectedName, { from: expectedOwner }); 15 | assert.equal(tx.logs[0].event, "OrganizationCreated"); 16 | assert.equal(tx.logs[0].args.id, expectedId); 17 | assert.equal(tx.logs[0].args.owner, expectedOwner); 18 | assert.equal(tx.logs[0].args.name, expectedName); 19 | 20 | let result = await instance.organizations.call(expectedId); 21 | assert.equal(result[0], expectedId); 22 | assert.equal(result[1], expectedOwner); 23 | assert.equal(result[2], expectedName); 24 | 25 | let ownerId = await instance.ownerToOrganizationId(expectedOwner); 26 | assert.equal(ownerId, expectedId); 27 | 28 | let length = await instance.getOrganizationsLength(); 29 | assert.equal(length, expectedLength); 30 | }); 31 | 32 | it("addOrganization - throw suplied owner already have an organization", async () => { 33 | 34 | let instance = await NonGovernmentalOrganizations.deployed(); 35 | 36 | let expectedOwner = accounts[0]; 37 | let expectedName = "Commit Conf"; 38 | let expectedLength = 2; 39 | 40 | try { 41 | 42 | await instance.addOrganization(expectedName, { from: expectedOwner }) 43 | assert.fail("Expected throw suplied owner already have an organization"); 44 | 45 | } catch (error) { 46 | 47 | assert.equal(error.message, "VM Exception while processing transaction: revert suplied owner already have an organization"); 48 | 49 | let length = await instance.getOrganizationsLength(); 50 | assert.equal(length, expectedLength); 51 | } 52 | }); 53 | 54 | it("donation - ok", async () => { 55 | 56 | let instance = await NonGovernmentalOrganizations.deployed(); 57 | 58 | let value = 10; 59 | let organizationId = 1; 60 | let receiverAddress = accounts[0]; 61 | let senderAddress = accounts[1]; 62 | 63 | let receiverInitalBalance = web3.fromWei(web3.eth.getBalance(receiverAddress)); 64 | let senderInitalBalance = web3.fromWei(web3.eth.getBalance(senderAddress)); 65 | 66 | let tx = await instance.donation(organizationId, 67 | { value: web3.toWei(value, "ether"), gasPrice: 0, from: senderAddress }); 68 | assert.equal(tx.logs[0].event, "DonationSubmitted"); 69 | assert.equal(tx.logs[0].args.id, organizationId); 70 | assert.equal(tx.logs[0].args.owner, receiverAddress); 71 | assert.equal(tx.logs[0].args.sender, senderAddress); 72 | assert.equal(web3.fromWei(tx.logs[0].args.value).toNumber(), value); 73 | 74 | let receiverEndingBalance = web3.fromWei(web3.eth.getBalance(receiverAddress)); 75 | let senderEndingBalance = web3.fromWei(web3.eth.getBalance(senderAddress)); 76 | 77 | assert.equal(receiverInitalBalance.add(value).toNumber(), receiverEndingBalance.toNumber()); 78 | assert.equal(senderInitalBalance.minus(value).toNumber(), senderEndingBalance.toNumber()); 79 | }); 80 | 81 | it("donation - throw suplied organization doesn't have a correct owner address", async () => { 82 | 83 | let instance = await NonGovernmentalOrganizations.deployed(); 84 | 85 | let value = 10; 86 | let senderAddress = accounts[1]; 87 | 88 | try { 89 | let incorrectOrganizationId = 0; 90 | await instance.donation(incorrectOrganizationId, 91 | { value: web3.toWei(value, "ether"), gasPrice: 0, from: senderAddress }); 92 | assert.fail("Expected throw suplied organization doesn't have a correct owner address"); 93 | } catch (error) { 94 | assert.equal(error.message, "VM Exception while processing transaction: revert suplied organization ID doesn't have a correct owner address"); 95 | } 96 | }); 97 | 98 | it("donation - throw suplied organization doesn't exits", async () => { 99 | 100 | let instance = await NonGovernmentalOrganizations.deployed(); 101 | 102 | let value = 10; 103 | let senderAddress = accounts[1]; 104 | 105 | try { 106 | let unknownOrganizationId = 2; 107 | await instance.donation(unknownOrganizationId, 108 | { value: web3.toWei(value, "ether"), gasPrice: 0, from: senderAddress }); 109 | assert.fail("Expected throw suplied organization doesn't exits"); 110 | } catch (error) { 111 | assert.equal(error.message, "VM Exception while processing transaction: invalid opcode"); 112 | } 113 | }); 114 | }); -------------------------------------------------------------------------------- /truffle.js: -------------------------------------------------------------------------------- 1 | var HDWalletProvider = require("truffle-hdwallet-provider"); 2 | 3 | var path = process.cwd(); 4 | 5 | module.exports = { 6 | networks: { 7 | development: { 8 | host: "localhost", 9 | port: 8545, 10 | gas: 6900000, 11 | network_id: "*" // Match any network id 12 | }, 13 | rinkeby: { 14 | provider: function () { 15 | 16 | var fs = require('fs'); 17 | 18 | var walletMmnemonic = fs.readFileSync(path + "/private/wallet.mnemonic.rinkeby").toString(); 19 | //console.log(walletMmnemonic); 20 | 21 | var apiKey = fs.readFileSync(path + "/private/api.key").toString(); 22 | //console.log(apiKey); 23 | 24 | let provider = new HDWalletProvider( 25 | walletMmnemonic, 26 | "https://rinkeby.infura.io/v3/" + apiKey); 27 | provider.getAddress(); 28 | 29 | return provider; 30 | }, 31 | gas: 6900000, 32 | network_id: 4 33 | } 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": [ 3 | "node_modules/codelyzer" 4 | ], 5 | "rules": { 6 | "arrow-return-shorthand": true, 7 | "callable-types": true, 8 | "class-name": true, 9 | "comment-format": [ 10 | true, 11 | "check-space" 12 | ], 13 | "curly": true, 14 | "deprecation": { 15 | "severity": "warn" 16 | }, 17 | "eofline": true, 18 | "forin": true, 19 | "import-blacklist": [ 20 | true, 21 | "rxjs/Rx" 22 | ], 23 | "import-spacing": true, 24 | "indent": [ 25 | true, 26 | "spaces" 27 | ], 28 | "interface-over-type-literal": true, 29 | "label-position": true, 30 | "max-line-length": [ 31 | true, 32 | 140 33 | ], 34 | "member-access": false, 35 | "member-ordering": [ 36 | true, 37 | { 38 | "order": [ 39 | "static-field", 40 | "instance-field", 41 | "static-method", 42 | "instance-method" 43 | ] 44 | } 45 | ], 46 | "no-arg": true, 47 | "no-bitwise": true, 48 | "no-console": [ 49 | true, 50 | "debug", 51 | "info", 52 | "time", 53 | "timeEnd", 54 | "trace" 55 | ], 56 | "no-construct": true, 57 | "no-debugger": true, 58 | "no-duplicate-super": true, 59 | "no-empty": false, 60 | "no-empty-interface": true, 61 | "no-eval": true, 62 | "no-inferrable-types": [ 63 | true, 64 | "ignore-params" 65 | ], 66 | "no-misused-new": true, 67 | "no-non-null-assertion": true, 68 | "no-shadowed-variable": true, 69 | "no-string-literal": false, 70 | "no-string-throw": true, 71 | "no-switch-case-fall-through": true, 72 | "no-trailing-whitespace": true, 73 | "no-unnecessary-initializer": true, 74 | "no-unused-expression": true, 75 | "no-use-before-declare": true, 76 | "no-var-keyword": true, 77 | "object-literal-sort-keys": false, 78 | "one-line": [ 79 | true, 80 | "check-open-brace", 81 | "check-catch", 82 | "check-else", 83 | "check-whitespace" 84 | ], 85 | "prefer-const": true, 86 | "quotemark": [ 87 | true, 88 | "single" 89 | ], 90 | "radix": true, 91 | "semicolon": [ 92 | true, 93 | "always" 94 | ], 95 | "triple-equals": [ 96 | true, 97 | "allow-null-check" 98 | ], 99 | "typedef-whitespace": [ 100 | true, 101 | { 102 | "call-signature": "nospace", 103 | "index-signature": "nospace", 104 | "parameter": "nospace", 105 | "property-declaration": "nospace", 106 | "variable-declaration": "nospace" 107 | } 108 | ], 109 | "unified-signatures": true, 110 | "variable-name": false, 111 | "whitespace": [ 112 | true, 113 | "check-branch", 114 | "check-decl", 115 | "check-operator", 116 | "check-separator", 117 | "check-type" 118 | ], 119 | "no-output-on-prefix": true, 120 | "use-input-property-decorator": true, 121 | "use-output-property-decorator": true, 122 | "use-host-property-decorator": true, 123 | "no-input-rename": true, 124 | "no-output-rename": true, 125 | "use-life-cycle-interface": true, 126 | "use-pipe-transform-interface": true, 127 | "component-class-suffix": true, 128 | "directive-class-suffix": true 129 | } 130 | } 131 | --------------------------------------------------------------------------------