Commit 79e8953590958256d9e29f498a0c9bcf02a3a25f
added edit button to branch and new zines
Zach committed on 7/5/2018, 4:02:43 AMParent: 84e7089dcecb5f534a64c17d398045e5425f2550
Files changed
building/components/actionButtons.js | changed |
building/components/branchPlacard.js | changed |
zines/read-me.txt | changed |
zines/11-killer-app-ideas.txt | added |
zines/A-Guided-Meditation.txt | added |
building/components/actionButtons.js | ||
---|---|---|
@@ -1,7 +1,7 @@ | ||
1 | 1 … | const html = require('nanohtml') |
2 | 2 … | |
3 | -module.exports = { addZine, makeBranch } | |
3 … | +module.exports = { addZine, makeBranch, editDetails } | |
4 | 4 … | |
5 | 5 … | function addZine (state) { |
6 | 6 … | if (state.identity === 'librarian') { |
7 | 7 … | return html` |
@@ -15,8 +15,18 @@ | ||
15 | 15 … | <button id='branch-button' onclick=${toggleBranch}>Make A New Branch</button> |
16 | 16 … | ` |
17 | 17 … | } |
18 | 18 … | |
19 … | +function editDetails (id) { | |
20 … | + if (id === 'librarian') { | |
21 … | + console.log('librarian!') | |
22 … | + return html`<button>edit</button>` | |
23 … | + } else { | |
24 … | + console.log('hi friend') | |
25 … | + return html`<h1>fuck</h1>` | |
26 … | + } | |
27 … | +} | |
28 … | + | |
19 | 29 … | function toggleForm () { |
20 | 30 … | var addButton = document.getElementById('add-button') |
21 | 31 … | var form = document.getElementById('new-zine-form') |
22 | 32 … |
building/components/branchPlacard.js | ||
---|---|---|
@@ -11,12 +11,15 @@ | ||
11 | 11 … | var branch = state.branch |
12 | 12 … | console.log({branch}) |
13 | 13 … | return html` |
14 | 14 … | <section id='branch-placard'> |
15 | - <h1>${branch.title}</h1> | |
15 … | + <div id='visible-placard'> | |
16 … | + <h1>${branch.title} ${button.editDetails(state.identity)}</h1> | |
16 | 17 … | ${render(branch.description)} |
17 | 18 … | <p>Want to start your own zine library?<span> ${button.makeBranch()}</span></p> |
19 … | + </div> | |
18 | 20 … | </section> |
21 … | + | |
19 | 22 … | ` |
20 | 23 … | } else { |
21 | 24 … | return html`<h1>loading</h1>` |
22 | 25 … | } |
zines/read-me.txt | ||
---|---|---|
@@ -1,5 +1,5 @@ | ||
1 | 1 … | title: read me |
2 | 2 … | ---- |
3 | 3 … | url: dat://d0222b1bcf7833e0708aa65ba8376aadba3f13e3025a113b10f755342b4c14d1/ |
4 | 4 … | ---- |
5 | -notes: Found it on Scuttlebutt, looks to be good sci fi. | |
5 … | +notes: I made this! |
Built with git-ssb-web