git ssb

0+

Zach! / dat-zine-library



Commit 79e8953590958256d9e29f498a0c9bcf02a3a25f

added edit button to branch and new zines

Zach committed on 7/5/2018, 4:02:43 AM
Parent: 84e7089dcecb5f534a64c17d398045e5425f2550

Files changed

building/components/actionButtons.jschanged
building/components/branchPlacard.jschanged
zines/read-me.txtchanged
zines/11-killer-app-ideas.txtadded
zines/A-Guided-Meditation.txtadded
building/components/actionButtons.jsView
@@ -1,7 +1,7 @@
11 const html = require('nanohtml')
22
3-module.exports = { addZine, makeBranch }
3 +module.exports = { addZine, makeBranch, editDetails }
44
55 function addZine (state) {
66 if (state.identity === 'librarian') {
77 return html`
@@ -15,8 +15,18 @@
1515 <button id='branch-button' onclick=${toggleBranch}>Make A New Branch</button>
1616 `
1717 }
1818
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 +
1929 function toggleForm () {
2030 var addButton = document.getElementById('add-button')
2131 var form = document.getElementById('new-zine-form')
2232
building/components/branchPlacard.jsView
@@ -11,12 +11,15 @@
1111 var branch = state.branch
1212 console.log({branch})
1313 return html`
1414 <section id='branch-placard'>
15- <h1>${branch.title}</h1>
15 + <div id='visible-placard'>
16 + <h1>${branch.title} ${button.editDetails(state.identity)}</h1>
1617 ${render(branch.description)}
1718 <p>Want to start your own zine library?<span> ${button.makeBranch()}</span></p>
19 + </div>
1820 </section>
21 +
1922 `
2023 } else {
2124 return html`<h1>loading</h1>`
2225 }
zines/read-me.txtView
@@ -1,5 +1,5 @@
11 title: read me
22 ----
33 url: dat://d0222b1bcf7833e0708aa65ba8376aadba3f13e3025a113b10f755342b4c14d1/
44 ----
5-notes: Found it on Scuttlebutt, looks to be good sci fi.
5 +notes: I made this!
zines/11-killer-app-ideas.txtView
@@ -1,0 +1,5 @@
1 +title: 11 killer app ideas
2 +----
3 +url: dat://86220354e57b0ac6dc3ef47ac9f8f75b62aebcd079d9688f2d7ede0af6abfba3/
4 +----
5 +notes: i made this one too.
zines/A-Guided-Meditation.txtView
@@ -1,0 +1,5 @@
1 +title: A Guided Meditation
2 +----
3 +url: dat://0256c7538c0431d2e6dba8f11369407b19c3875957c8557cda4db6bd588f7be9/
4 +----
5 +notes: My Friend Ryland's Audio Meditation Zine.

Built with git-ssb-web