You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-32Lines changed: 32 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -452,17 +452,6 @@ The easiest way to separate these different app functionalities, is to separate
452
452
453
453
Another important step we need to do right now is to add the required dependencies. These are [rdflib.js](https://github.com/linkeddata/rdflib.js) and [Solid.js](https://github.com/solid/solid.js).
454
454
455
-
**Picking the vocabularies**
456
-
457
-
For this particular app, we can go with two very common vocabularies, `SIOC` and `Dublin Core Terms`. Using them is just a matter of defining the rdflib.js namespaces.
Next, we can define how we want to structure our bins. For example, a bin could have a title and body (content), but also a URI (useful later for updates).
@@ -476,14 +465,45 @@ var bin = {
476
465
};
477
466
```
478
467
479
-
**Default container for new bins**
468
+
**Picking the vocabularies**
469
+
470
+
For this particular app, we can go with two very common vocabularies, `SIOC` and `Dublin Core Terms`. Using them is just a matter of defining the rdflib.js namespaces.
To create bins we have to define a default container to which we POST the bin. For now we can create a global variable called `defaultContainer`. The value of this variable can be a `bins`container on your account, which you have created with Warp.
482
482
483
483
```Javascript
484
484
var defaultContainer ='https://user.databox.me/Public/bins/';
485
485
```
486
486
487
+
**UI/HTML**
488
+
489
+
The UI is quite minimalistic. A couple of divs, one for the viewer and one for the editor. The current example lacks CSS definitions for some classes (e.g. `hidden`), which you can get from the Github repo (link below).
<textareaid="edit-body"class="block"placeholder="Paste text here..."></textarea>
502
+
<br>
503
+
<buttonid="submit"class="btn">Publish</button>
504
+
</div>
505
+
```
506
+
487
507
Now let's prepare a few functions that make the bread and butter of our app.
488
508
489
509
**Creating new bins**
@@ -681,26 +701,6 @@ function init() {
681
701
682
702
This function will be called at the bottom of our app, after all the other functions have been defined.
683
703
684
-
**UI/HTML**
685
-
686
-
The UI is quite minimalistic. A couple of divs, one for the viewer and one for the editor. The current example lacks CSS definitions for some classes (e.g. `hidden`), which you can get from the Github repo (link below).
<textareaid="edit-body"class="block"placeholder="Paste text here..."></textarea>
699
-
<br>
700
-
<buttonid="submit"class="btn">Publish</button>
701
-
</div>
702
-
```
703
-
704
704
This is it, you're all set! You can use the following link for the source files of the full example app - [https://github.com/solid/solid-tutorial-pastebin/](https://github.com/solid/solid-tutorial-pastebin/)
705
705
706
706
See also ["user posts a note" example](https://github.com/solid/solid-spec#example).
0 commit comments