This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf8"> | |
<title>IPNS Profile App</title> | |
<link rel="stylesheet" href="./style.css"> | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/solid.css" integrity="sha384-wnAC7ln+XN0UKdcPvJvtqIH3jOjs9pnKnq9qX68ImXvOGz2JuFoEiCjT8jyZQX2z" | |
crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/brands.css" integrity="sha384-nT8r1Kzllf71iZl81CdFzObMsaLOhqBU1JD2+XoAALbdtWaXDOlWOZTR4v1ktjPE" | |
crossorigin="anonymous"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body { | |
margin: 0; | |
height:100%; | |
position: relative; | |
font-family: Tahoma, Helvetica, Verdana, sans-serif; | |
} | |
h1 { | |
margin-top: 0px; | |
text-transform: uppercase; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<div id="loader" data-bind="visible: state.loading"></div> | |
<div id="main" data-bind="visible: !state.loading()"> | |
<div id="image" data-bind="style: { 'backgroundImage': `url(${pic.url()})` }"></div> | |
<div id="profile"> | |
<h1 id="name"> | |
<span id="first" data-bind="text: name.first"></span> | |
<span id="last" data-bind="text: name.last"></span> | |
</h1> | |
<div id="work" > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint no-undef: "error" */ | |
/* eslint-env browser */ | |
import 'babel-polyfill' | |
import qs from 'query-string' | |
import ko from 'knockout' | |
import 'knockout-mapping' | |
import getIpfs from './ipfs-promise' | |
import { defaultProfile } from './default-profile' | |
import $ from 'jQuery' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint no-undef: "error" */ | |
/* eslint-env browser */ | |
import 'babel-polyfill' | |
import getIpfs from './ipfs-promise' | |
import qs from 'query-string' | |
// setup is our async initializer function | |
const setup = async () => { | |
try { | |
// Get a reference to the running, or new, IPFS peer/node |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// defaultProfile is a simple user-profile JSON data model | |
const defaultProfile = { | |
name: { | |
first: 'first', | |
last: 'last', | |
other: [] | |
}, | |
bio: 'you should write something interesting here...', | |
pic: { | |
url: 'https://i.stack.imgur.com/l60Hf.png' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf8"> | |
<title>IPNS Profile App</title> | |
<link rel="stylesheet" href="./style.css"> | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/solid.css" integrity="sha384-wnAC7ln+XN0UKdcPvJvtqIH3jOjs9pnKnq9qX68ImXvOGz2JuFoEiCjT8jyZQX2z" | |
crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/brands.css" integrity="sha384-nT8r1Kzllf71iZl81CdFzObMsaLOhqBU1JD2+XoAALbdtWaXDOlWOZTR4v1ktjPE" | |
crossorigin="anonymous"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
"scripts": { | |
"setup": "yarn install", | |
"release": "npm version patch", | |
"postversion": "git push --follow-tags", | |
"build": "run-s build:*", | |
"build:copy": "run-p build:copy:*", | |
"build:copy:html": "shx mkdir -p dist && shx cp index.html dist/index.html", | |
"build:copy:images": "shx mkdir -p dist/img && shx cp img/* dist/img", | |
"build:copy:css": "shx mkdir -p dist/css && shx cp css/*.css dist/css", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'babel-polyfill' | |
import Room from 'ipfs-pubsub-room' | |
import IPFS from 'ipfs' | |
import ko from 'knockout' | |
import queryString from 'query-string' | |
// Global references for demo purposes | |
let ipfs | |
let viewModel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf8"> | |
<title>Chat ĐApp</title> | |
<link rel="stylesheet" href="./style.css"> | |
</head> | |
<body> | |
<div id="main"> | |
<div class="controls"> |