whyis-fediverse 0.4.3__py3-none-any.whl → 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- whyis_fediverse/static/js/comment.js +15 -14
- whyis_fediverse/static/js/discussion.js +5 -3
- whyis_fediverse/static/js/new_post.js +41 -34
- whyis_fediverse/static/js/post.js +31 -25
- whyis_fediverse/static/js/post_view.js +15 -19
- whyis_fediverse/static/js/selectable.js +5 -3
- whyis_fediverse/static/js/selections.js +5 -3
- whyis_fediverse/templates/all_discussion.html +44 -45
- whyis_fediverse/templates/discussion.html +44 -45
- whyis_fediverse/templates/embed_image.html +1 -1
- whyis_fediverse/templates/embed_resource.html +2 -2
- whyis_fediverse/templates/image_embed.html +1 -1
- whyis_fediverse/templates/object_view.html +7 -5
- {whyis_fediverse-0.4.3.dist-info → whyis_fediverse-1.0.0.dist-info}/METADATA +3 -3
- whyis_fediverse-1.0.0.dist-info/RECORD +31 -0
- {whyis_fediverse-0.4.3.dist-info → whyis_fediverse-1.0.0.dist-info}/WHEEL +1 -1
- whyis_fediverse/static/js/#new_post.js# +0 -237
- whyis_fediverse/static/js/selectable.js~ +0 -27
- whyis_fediverse/static/js/selections.js~ +0 -87
- whyis_fediverse/templates/__init__.py +0 -0
- whyis_fediverse/templates/all_discussion.html~ +0 -73
- whyis_fediverse/templates/embed_image.html~ +0 -1
- whyis_fediverse/templates/embed_object.html~ +0 -6
- whyis_fediverse/templates/embed_resource.html~ +0 -5
- whyis_fediverse/templates/embed_video.html~ +0 -6
- whyis_fediverse/templates/image_embed.svg +0 -3
- whyis_fediverse/test_example.trig +0 -115
- whyis_fediverse/test_example.ttl +0 -115
- whyis_fediverse/vocab.ttl +0 -93
- whyis_fediverse-0.4.3.dist-info/RECORD +0 -44
- {whyis_fediverse-0.4.3.dist-info → whyis_fediverse-1.0.0.dist-info}/entry_points.txt +0 -0
- {whyis_fediverse-0.4.3.dist-info → whyis_fediverse-1.0.0.dist-info/licenses}/LICENSE +0 -0
- {whyis_fediverse-0.4.3.dist-info → whyis_fediverse-1.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
whyis_fediverse/__init__.py,sha256=7sTTb0R55ywo-a3UnNWtrudKGhznV_bOM9XFwzOhH6M,22
|
|
2
|
+
whyis_fediverse/plugin.py,sha256=IFepgUVTRhhKNEm4-uiTJqYrEZ5HCkJ1vkc74O2mM8s,545
|
|
3
|
+
whyis_fediverse/static/js/comment.js,sha256=rBwNWDxZRVQg9ntjKoUGpXjHQSiWwsgtWW0MAihTmOY,3527
|
|
4
|
+
whyis_fediverse/static/js/discussion.js,sha256=zWoCg7p6eTjVzPuykWcwBKMGapp1M2uq_s6OZRewKzs,2997
|
|
5
|
+
whyis_fediverse/static/js/new_post.js,sha256=ACD4QGKRlgs5ZBTyUUDCzCzhrpF2azj2D7kyFBU2wTo,7068
|
|
6
|
+
whyis_fediverse/static/js/post.js,sha256=oI2WSJdoBA4-9rB-bvMeaapNSRvrQWRHW5zDk1OVaOI,3546
|
|
7
|
+
whyis_fediverse/static/js/post_view.js,sha256=FVkN-2iGZ551BKREhshrIF79sXOw18mNy2_8YQOY1Is,4023
|
|
8
|
+
whyis_fediverse/static/js/selectable.js,sha256=Rk3BSeKhs1WVwFZnEL1Z0xVegGbf7vdi--LVxxzAKng,1149
|
|
9
|
+
whyis_fediverse/static/js/selections.js,sha256=pf_O9tUsnlSg3-72wi8VrS1ZMalmWWHN0geTDlBIsnQ,757
|
|
10
|
+
whyis_fediverse/templates/all_discussion.html,sha256=NZNzpvqO74urXQEvh32q2RxQJWdavwC1OS5-rbHQYdI,2592
|
|
11
|
+
whyis_fediverse/templates/all_discussion.json,sha256=SA-t6wz2N6SL3DNFGvIzj1Xc3h9w0K6-4D2tpBYAp-o,820
|
|
12
|
+
whyis_fediverse/templates/discussion.html,sha256=HMvT6fqbAjjXwqimDZFXyj1kjmCIRaEW2taQ1u_a0wE,2625
|
|
13
|
+
whyis_fediverse/templates/discussion.json,sha256=6BE9ENbur_eiScePyk8_6Xs4RYIDQNenpMInMiry1ww,821
|
|
14
|
+
whyis_fediverse/templates/embed_image.html,sha256=8iaPMYoNPiUoMhZdX1296GxyC82A3N5Ge8F2gGsDMNE,107
|
|
15
|
+
whyis_fediverse/templates/embed_object.html,sha256=LR22aBlO2H11B1aOdZ1O3nmWUFfznlLupwsb7OmW9es,111
|
|
16
|
+
whyis_fediverse/templates/embed_resource.html,sha256=OYSIVJFFo5Fgfkv_7-ZcDa4p7om_w1Gu20tEuSjP7yU,265
|
|
17
|
+
whyis_fediverse/templates/embed_video.html,sha256=HBATiS9qYaefzAIAZjRp0fbJaOUYs6gKQwHjz88-qco,234
|
|
18
|
+
whyis_fediverse/templates/image_embed.html,sha256=Q6bDunGcC23VhP7I6RaF_oj_famPhNMdCUIq-AHiUVY,133
|
|
19
|
+
whyis_fediverse/templates/object_data.json,sha256=4KpglgRQvV2AUBmeMOrA3_GzzmhU83p1jODJMIFphBE,3204
|
|
20
|
+
whyis_fediverse/templates/object_replies.json,sha256=SudBbaV-g0hA4PIcKlNUw2HtHexRg3v78uH-m5OGBug,376
|
|
21
|
+
whyis_fediverse/templates/object_view.html,sha256=Omflnvw1l8Zw6AFHhHTl4GWd5261Z9wb1r46uKKYzOc,813
|
|
22
|
+
whyis_fediverse/templates/resource_get.json,sha256=qgKrV5c2IQGWfnv6EIXL_B3xte4UC7PQ1uv1VOO5v38,131
|
|
23
|
+
whyis_fediverse/templates/resource_search.json,sha256=BXOsOdM7rJ2MV1_7tMthXLuc_aye6Ig9_3jYXXSxiP0,230
|
|
24
|
+
whyis_fediverse/templates/space_get.json,sha256=QYxOUQjW7Asyvla-C0-Dv9mj0Tww1MdecxqUMuOH1mg,132
|
|
25
|
+
whyis_fediverse/templates/space_search.json,sha256=PMzIraMldZrb7jrCsBhJRbQ_vB76nxz24cS9Bcgx-gk,193
|
|
26
|
+
whyis_fediverse-1.0.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
27
|
+
whyis_fediverse-1.0.0.dist-info/METADATA,sha256=XpYk_RfUsq8sGX9DvJuDIXbtOxph9lKqme4bMsUMe6s,124
|
|
28
|
+
whyis_fediverse-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
29
|
+
whyis_fediverse-1.0.0.dist-info/entry_points.txt,sha256=e4XLi7wxdcBNLXdbeukTWuVWuprOpYUpFUkOJe4vPdY,58
|
|
30
|
+
whyis_fediverse-1.0.0.dist-info/top_level.txt,sha256=s0dGyAZlCNhS-O-Zoqlui3FKCkMAc8VqfK3o6DLsC10,16
|
|
31
|
+
whyis_fediverse-1.0.0.dist-info/RECORD,,
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import {Vue, axios, createApp} from '../../../dist/whyis.js';
|
|
2
|
-
|
|
3
|
-
import post from './selections.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function randomID() {
|
|
7
|
-
var result = Math.random().toString().replace('0.','');
|
|
8
|
-
console.log(result);
|
|
9
|
-
return result;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function newPost(uri) {
|
|
13
|
-
return {
|
|
14
|
-
"@context" : [
|
|
15
|
-
"https://www.w3.org/ns/activitystreams",
|
|
16
|
-
{
|
|
17
|
-
"np" : "http://www.nanopub.org/nschema#",
|
|
18
|
-
"schema" : "http://schema.org/"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"id" : uri,
|
|
22
|
-
"type" : "Note",
|
|
23
|
-
"attributedTo" : {
|
|
24
|
-
"id" : USER.uri,
|
|
25
|
-
"name" : USER.name
|
|
26
|
-
},
|
|
27
|
-
"to" : [],
|
|
28
|
-
"attachment" : [],
|
|
29
|
-
"content" : "",
|
|
30
|
-
"inReplyTo" : null,
|
|
31
|
-
"summary" : null,
|
|
32
|
-
"context" : null,
|
|
33
|
-
"published" : null,
|
|
34
|
-
"name" : null
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
async function uploadFiles(fileList, uri){
|
|
39
|
-
let distrData = new FormData();
|
|
40
|
-
let distrLDs = Array(fileList.length);
|
|
41
|
-
distrData.append('upload_type', 'http://purl.org/dc/dcmitype/Collection')
|
|
42
|
-
|
|
43
|
-
// append the files to FormData
|
|
44
|
-
Array
|
|
45
|
-
.from(Array(fileList.length).keys())
|
|
46
|
-
.map(function(x, idx) {
|
|
47
|
-
let new_file_name = (idx+1).toString();
|
|
48
|
-
let upload_name = fileList[x].name;
|
|
49
|
-
distrData.append(new_file_name, fileList[x], new_file_name);
|
|
50
|
-
distrLDs[x] = {
|
|
51
|
-
'id': `${uri}/${new_file_name}`,
|
|
52
|
-
"type": [],
|
|
53
|
-
'url': `${uri}/${new_file_name}`,
|
|
54
|
-
"mediaType": fileList[x].type,
|
|
55
|
-
'http://www.w3.org/2000/01/rdf-schema#label': fileList[x].name,
|
|
56
|
-
}
|
|
57
|
-
if (fileList[x].type.indexOf("image") > -1) {
|
|
58
|
-
distrLDs[x].type.push("Image");
|
|
59
|
-
distrLDs[x].type.push("schema:ImageObject");
|
|
60
|
-
} else if (fileList[x].type.indexOf("video") > -1) {
|
|
61
|
-
distrLDs[x].type.push("Video");
|
|
62
|
-
distrLDs[x].type.push("schema:VideoObject");
|
|
63
|
-
} else {
|
|
64
|
-
distrLDs[x].type.push("Document");
|
|
65
|
-
distrLDs[x].type.push("schema:DigitalDocument");
|
|
66
|
-
}
|
|
67
|
-
console.log(distrLDs[x]);
|
|
68
|
-
});
|
|
69
|
-
console.log(distrLDs);
|
|
70
|
-
|
|
71
|
-
const baseUrl = `${window.location.origin}/about?uri=${uri}`;
|
|
72
|
-
await axios.post( baseUrl,
|
|
73
|
-
distrData,
|
|
74
|
-
{
|
|
75
|
-
headers: {
|
|
76
|
-
'Content-Type': 'multipart/form-data',
|
|
77
|
-
},
|
|
78
|
-
}
|
|
79
|
-
)
|
|
80
|
-
return distrLDs;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export default Vue.component('fedi-new-post', {
|
|
84
|
-
name: "fedi-new-post",
|
|
85
|
-
props:{
|
|
86
|
-
entity: {
|
|
87
|
-
type: String,
|
|
88
|
-
require: false
|
|
89
|
-
},
|
|
90
|
-
inReplyTo: {
|
|
91
|
-
type: String,
|
|
92
|
-
require: false
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
inject : ['selection'],
|
|
96
|
-
data() {
|
|
97
|
-
let id = randomID();
|
|
98
|
-
let uri = `${LOD_PREFIX}/note/${id}`;
|
|
99
|
-
console.log(uri, id);
|
|
100
|
-
return {
|
|
101
|
-
user: USER,
|
|
102
|
-
otherArgs: null,
|
|
103
|
-
attachments: [],
|
|
104
|
-
embeds: {},
|
|
105
|
-
hovers: {},
|
|
106
|
-
id : id,
|
|
107
|
-
uri : uri,
|
|
108
|
-
post: newPost(uri),
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
template: `
|
|
112
|
-
<md-card>
|
|
113
|
-
<md-card-content>
|
|
114
|
-
<md-field>
|
|
115
|
-
<label>What's on your mind?</label>
|
|
116
|
-
<md-textarea v-on:keyup.enter.exact="sendPost()"
|
|
117
|
-
v-model="post.content"
|
|
118
|
-
md-autogrow>
|
|
119
|
-
</md-textarea>
|
|
120
|
-
<md-button class="md-icon-button" @click="sendPost()">
|
|
121
|
-
<md-icon md-size="small">send</md-icon>
|
|
122
|
-
</md-button>
|
|
123
|
-
</md-field>
|
|
124
|
-
<div style="position:relative"
|
|
125
|
-
v-for="item in selection"
|
|
126
|
-
v-bind:key="item"
|
|
127
|
-
v-on:mouseenter="hovers[item] = true"
|
|
128
|
-
v-on:mouseleave="hovers[item] = false" >
|
|
129
|
-
<div v-html="embeds[item]"></div>
|
|
130
|
-
<md-button style="position: absolute; right: 0; top: 0; "
|
|
131
|
-
class="md-icon-button md-raised md-mini"
|
|
132
|
-
v-on:click="unselect(item)">
|
|
133
|
-
<md-icon>delete</md-icon>
|
|
134
|
-
</md-button>
|
|
135
|
-
</div>
|
|
136
|
-
<md-field id="media_upload">
|
|
137
|
-
<label>Add media</label>
|
|
138
|
-
<md-file name="media_upload" ref="attachments" v-model="attachments" multiple />
|
|
139
|
-
</md-field>
|
|
140
|
-
</md-card-content>
|
|
141
|
-
</md-card>
|
|
142
|
-
`,
|
|
143
|
-
watch: {
|
|
144
|
-
selection: {
|
|
145
|
-
handler: function (val, oldVal) {
|
|
146
|
-
this.selection.forEach(this.getEmbed)
|
|
147
|
-
},
|
|
148
|
-
deep: true
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
components: {
|
|
152
|
-
},
|
|
153
|
-
methods: {
|
|
154
|
-
unselect : function (uri) {
|
|
155
|
-
if (this.selection.includes(uri)) {
|
|
156
|
-
var index = this.selection.indexOf(uri)
|
|
157
|
-
this.selection.splice(index, 1)
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
select : function (uri) {
|
|
161
|
-
if (!this.selection.includes(uri)) {
|
|
162
|
-
this.selection.push(uri)
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
async getEmbed(uri) {
|
|
166
|
-
console.log(uri)
|
|
167
|
-
if (this.embeds[uri] == null) {
|
|
168
|
-
this.embeds[uri] = "embeds_loading"
|
|
169
|
-
const result = await axios.get(`${ROOT_URL}about`,
|
|
170
|
-
{ params: {
|
|
171
|
-
view: "embed",
|
|
172
|
-
uri: uri,
|
|
173
|
-
}
|
|
174
|
-
})
|
|
175
|
-
this.embeds[uri] = result.data
|
|
176
|
-
this.$forceUpdate()
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
|
|
180
|
-
async loadPage() {
|
|
181
|
-
},
|
|
182
|
-
async scrollBottom () {
|
|
183
|
-
if (Math.ceil(window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
|
184
|
-
console.log(this.post);
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
async sendPost() {
|
|
188
|
-
console.log(this.post);
|
|
189
|
-
console.log(this)
|
|
190
|
-
if (this.inReplyTo != null) {
|
|
191
|
-
this.post.inReplyTo = this.inReplyTo;
|
|
192
|
-
}
|
|
193
|
-
let now = new Date();
|
|
194
|
-
this.post.published = now.toISOString();
|
|
195
|
-
this.post.context = this.selection;
|
|
196
|
-
|
|
197
|
-
let attachments = this.$refs.attachments.$refs.inputFile.files;
|
|
198
|
-
let old_id = this.id;
|
|
199
|
-
let post = this.post;
|
|
200
|
-
|
|
201
|
-
this.id = randomID();
|
|
202
|
-
this.uri = `${LOD_PREFIX}/note/${this.id}`;
|
|
203
|
-
this.post = newPost(this.uri);
|
|
204
|
-
this.attachments = null;
|
|
205
|
-
|
|
206
|
-
if (attachments.length >0) {
|
|
207
|
-
const collectionURI = `${LOD_PREFIX}/media/${old_id}`;
|
|
208
|
-
console.log(collectionURI);
|
|
209
|
-
post.attachment = await uploadFiles(attachments,
|
|
210
|
-
collectionURI);
|
|
211
|
-
}
|
|
212
|
-
console.log(post);
|
|
213
|
-
let metadata = JSON.stringify(post);
|
|
214
|
-
const baseUrl = `${window.location.origin}/pub`;
|
|
215
|
-
|
|
216
|
-
await axios.post( baseUrl, metadata, {
|
|
217
|
-
headers: {
|
|
218
|
-
'Content-Type': 'application/ld+json'
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
this.selection.length = 0;
|
|
222
|
-
if (this.inReplyTo == null) {
|
|
223
|
-
window.location.href = `${window.location.origin}/about?uri=${post.id}`;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
async mounted (){
|
|
228
|
-
if (this.entity != null && this.inReplyTo == null) {
|
|
229
|
-
this.select(this.entity)
|
|
230
|
-
}
|
|
231
|
-
this.selection.forEach(this.getEmbed)
|
|
232
|
-
},
|
|
233
|
-
async unmounted() {
|
|
234
|
-
},
|
|
235
|
-
created(){
|
|
236
|
-
}
|
|
237
|
-
})
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {Vue, axios, createApp} from '../../../dist/whyis.js';
|
|
2
|
-
export default Vue.component('selector', {
|
|
3
|
-
name: "selector",
|
|
4
|
-
props:{
|
|
5
|
-
},
|
|
6
|
-
data: {
|
|
7
|
-
selection: {
|
|
8
|
-
"selected" : []
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
provide() {
|
|
12
|
-
return {
|
|
13
|
-
selection: this.selection ,
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
template: `
|
|
17
|
-
<div><slot></slot></div>
|
|
18
|
-
`,
|
|
19
|
-
watch: {
|
|
20
|
-
},
|
|
21
|
-
components: {
|
|
22
|
-
},
|
|
23
|
-
computed: {
|
|
24
|
-
},
|
|
25
|
-
methods: {
|
|
26
|
-
},
|
|
27
|
-
})
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import dayjs from '//unpkg.com/dayjs@1.11.13/esm';
|
|
2
|
-
import relativeTime from '//unpkg.com/dayjs@1.11.13/esm/plugin/relativeTime';
|
|
3
|
-
dayjs.extend(relativeTime);
|
|
4
|
-
import {Vue, axios, createApp} from '../../../dist/whyis.js';
|
|
5
|
-
export default Vue.component('fedi-comment', {
|
|
6
|
-
name: "fedi-comment",
|
|
7
|
-
props:{
|
|
8
|
-
value: {
|
|
9
|
-
type: Object,
|
|
10
|
-
require: true
|
|
11
|
-
},
|
|
12
|
-
expanded: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
data() {
|
|
18
|
-
return {
|
|
19
|
-
replies: [],
|
|
20
|
-
loading: false,
|
|
21
|
-
loadError: false,
|
|
22
|
-
otherArgs: null,
|
|
23
|
-
pageSize: 20,
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
template: `
|
|
27
|
-
<md-content style="margin-top:1.5em">
|
|
28
|
-
<div v-if="value.attachment != null && value.attachment.length != 0">
|
|
29
|
-
<img style="" v-for="image in value.attachment" :src="image.url" :alt="image.url">
|
|
30
|
-
</div>
|
|
31
|
-
<div style="width:fit-content; margin-top:0.5em; border-radius:1em; padding-left:0.75em; padding-right:0.75em; background-color:lightgray">
|
|
32
|
-
<small>
|
|
33
|
-
<a :href="value.attributedTo.view">
|
|
34
|
-
<strong>{{value.attributedTo.name}}</strong>
|
|
35
|
-
(@{{value.attributedTo.id.split('/').pop()}})
|
|
36
|
-
{{published}}
|
|
37
|
-
</a>
|
|
38
|
-
</small>
|
|
39
|
-
<div v-html="value.content"></div>
|
|
40
|
-
</div>
|
|
41
|
-
</md-content>
|
|
42
|
-
`,
|
|
43
|
-
watch: {
|
|
44
|
-
},
|
|
45
|
-
components: {
|
|
46
|
-
},
|
|
47
|
-
computed: {
|
|
48
|
-
published: function() {
|
|
49
|
-
return dayjs(this.value.published).fromNow();
|
|
50
|
-
},
|
|
51
|
-
// a computed getter
|
|
52
|
-
images: function () {
|
|
53
|
-
console.log(this.value.attachment);
|
|
54
|
-
// `this` points to the vm instance
|
|
55
|
-
let result = this.value.attachment.filter(function(x) {x.type.indexOf('Image') >= 0});
|
|
56
|
-
console.log(result);
|
|
57
|
-
return result;
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
methods: {
|
|
61
|
-
async loadPage() {
|
|
62
|
-
// non-page sized results means we've reached the end.
|
|
63
|
-
if (this.results.length % this.pageSize > 0)
|
|
64
|
-
return
|
|
65
|
-
const result = await axios.get(`${ROOT_URL}about`,
|
|
66
|
-
{ params: {
|
|
67
|
-
view: "comments",
|
|
68
|
-
uri: this.entity,
|
|
69
|
-
limit: this.pageSize,
|
|
70
|
-
offset: this.results.length
|
|
71
|
-
}
|
|
72
|
-
})
|
|
73
|
-
this.results.push(...result.data)
|
|
74
|
-
},
|
|
75
|
-
async scrollBottom () {
|
|
76
|
-
if (Math.ceil(window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
|
77
|
-
await this.loadPage()
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
async mounted (){
|
|
82
|
-
},
|
|
83
|
-
async unmounted() {
|
|
84
|
-
},
|
|
85
|
-
created(){
|
|
86
|
-
}
|
|
87
|
-
})
|
|
File without changes
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
{% extends "base_vue.html" %}
|
|
2
|
-
{% from "elements/upload.html" import vue_upload_button_tab_modal %}
|
|
3
|
-
{% from "_macros.html" import render_resource_link, render_rdfa_resource_link, get_label, facts_panel, summary_panel, content %}
|
|
4
|
-
{% block title %}{{get_label(this.description())}}{% endblock %}
|
|
5
|
-
{% block styles %}
|
|
6
|
-
<style>
|
|
7
|
-
.hover {
|
|
8
|
-
filter: drop-shadow(gray 0 0 0.5rem);
|
|
9
|
-
}
|
|
10
|
-
.selected {
|
|
11
|
-
filter: drop-shadow(blue 0 0 0.5rem);
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
{% endblock %}
|
|
15
|
-
{% block scripts %}
|
|
16
|
-
<script type="module" src="{{ url_for('static',filename='plugins/fediverse/js/discussion.js')}}"></script>
|
|
17
|
-
|
|
18
|
-
{% endblock %}
|
|
19
|
-
{% block content %}
|
|
20
|
-
{% set attributes = this | include("attributes") | fromjson %}
|
|
21
|
-
|
|
22
|
-
<md-card-header>
|
|
23
|
-
<md-card-header-text>
|
|
24
|
-
<ul class="nav nav-tabs">
|
|
25
|
-
{% for v in this | get_views_list -%}
|
|
26
|
-
<li class="nav-item {% if v['view'].value == view %}active{% endif %}">
|
|
27
|
-
<a class="nav-link {% if v['view'].value == view %}active{% endif %}"
|
|
28
|
-
href="{{url_for('entity.view', uri=this.identifier, view=v['view'])}}">
|
|
29
|
-
{{v['label']}}
|
|
30
|
-
</a>
|
|
31
|
-
</li>
|
|
32
|
-
{%- endfor %}
|
|
33
|
-
{% if this.description().value(ns.whyis.hasFileID) %}
|
|
34
|
-
<li class="nav-item">
|
|
35
|
-
<a class="nav-link"
|
|
36
|
-
href="{{url_for('entity.view',uri=this.identifier)}}">
|
|
37
|
-
Download
|
|
38
|
-
</a>
|
|
39
|
-
</li>
|
|
40
|
-
{% endif %}
|
|
41
|
-
<li class="nav-item">
|
|
42
|
-
{{ vue_upload_button_tab_modal(this) }}
|
|
43
|
-
</li>
|
|
44
|
-
{% if not this.identifier.startswith(ns.local) %}
|
|
45
|
-
<li class="nav-item">
|
|
46
|
-
<a class="nav-link" href="{{this.identifier}}"
|
|
47
|
-
aria-label="Visit Page" title="Visit Page">
|
|
48
|
-
Visit
|
|
49
|
-
</a>
|
|
50
|
-
</li>
|
|
51
|
-
{% endif %}
|
|
52
|
-
</ul>
|
|
53
|
-
<div class="md-layout md-gutter md-alignment-center-left" style = "margin-top: 6px;">
|
|
54
|
-
<div class = "md-layout-item">
|
|
55
|
-
<div class="md-title">{{attributes.label}}</div>
|
|
56
|
-
{% if attributes.type | length > 0 %}<div class="md-subhead" style="max-width: fit-content;">
|
|
57
|
-
{% for type in attributes.type %}{{type.label}}{% if not loop.last %}, {% endif %} {% endfor %}
|
|
58
|
-
</div>{% endif %}
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</md-card-header-text>
|
|
62
|
-
{% if attributes.thumbnail %}<md-card-media md-big >
|
|
63
|
-
<img src="{{url_for('entity.view', uri=attributes.thumbnail)}}" alt="{{attributes.label}}"/>
|
|
64
|
-
</md-card-media>{% endif %}
|
|
65
|
-
</md-card-header>
|
|
66
|
-
<md-card-content>
|
|
67
|
-
<div class="md-layout md-gutter">
|
|
68
|
-
<div class="md-layout-item">
|
|
69
|
-
<fedi-discussion entity="{{this.identifier}}"></fedi-discussion>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
</md-card-content>
|
|
73
|
-
{% endblock %}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<img src="{{url_for('this.view', uri=this.identifier)}}", alt="{{g.get_label(this.identifier)}}">
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
## Metamodeling prefixes (models that describe models):
|
|
2
|
-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
3
|
-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
-
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
5
|
-
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
6
|
-
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
|
7
|
-
|
|
8
|
-
# The Knowledge Graph Map Ontology (KGMO) is a novel way to note relationships
|
|
9
|
-
# observationally and inductively and without triggering OWL semantics.
|
|
10
|
-
# Publication venue and date TBD.
|
|
11
|
-
@prefix kgmo: <http://purl.org/twc/kgmo/>.
|
|
12
|
-
|
|
13
|
-
## Whyis support prefixes:
|
|
14
|
-
@prefix np: <http://www.nanopub.org/nschema#>.
|
|
15
|
-
@prefix whyis: <http://vocab.rpi.edu/whyis/> .
|
|
16
|
-
@prefix prov: <http://www.w3.org/ns/prov#>.
|
|
17
|
-
@prefix mediatype: <https://www.iana.org/assignments/media-types/>.
|
|
18
|
-
@prefix dcterms: <http://purl.org/dc/terms/>.
|
|
19
|
-
# For pv:File:
|
|
20
|
-
@prefix pv: <http://purl.org/net/provenance/ns#>.
|
|
21
|
-
# For ov:hasContentType:
|
|
22
|
-
@prefix ov: <http://open.vocab.org/terms/> .
|
|
23
|
-
|
|
24
|
-
## Media-specifc prefixes:
|
|
25
|
-
# Note that ActivityStreams supercedes schema.org when available.
|
|
26
|
-
# properties for the as: namespace are recorded here:
|
|
27
|
-
# https://www.w3.org/TR/activitystreams-vocabulary
|
|
28
|
-
@prefix as: <https://www.w3.org/ns/activitystreams#> .
|
|
29
|
-
@prefix schema: <http://schema.org/> .
|
|
30
|
-
|
|
31
|
-
## Domain prefixes:
|
|
32
|
-
# Wikidata is for instances and classes:
|
|
33
|
-
@prefix wd: <http://www.wikidata.org/entity/> .
|
|
34
|
-
# SIO is for relationships between instances:
|
|
35
|
-
@prefix sio: <htttp://semanticscience.org/resource/>.
|
|
36
|
-
|
|
37
|
-
## ARCLIGHT-specific prefixes:
|
|
38
|
-
@prefix file: <http://purl.org/arclight/file/> .
|
|
39
|
-
@prefix user: <http://purl.org/whyis/local/user/> .
|
|
40
|
-
@prefix action: <http://purl.org/arclight/action/> .
|
|
41
|
-
@prefix entity: <http://purl.org/arclight/entity/> .
|
|
42
|
-
@prefix tool: <http://purl.org/arclight/tool/> .
|
|
43
|
-
@prefix image: <http://purl.org/arclight/image/> .
|
|
44
|
-
@prefix exif: <http://purl.org/arclight/exif/> .
|
|
45
|
-
|
|
46
|
-
# Ontology terms for things like models and activities.
|
|
47
|
-
@prefix ao: <http://purl.org/arclight/ontology/> .
|
|
48
|
-
|
|
49
|
-
# Nanopublication URIs live here:
|
|
50
|
-
@prefix pub: <http://purl.org/whyis/local/pub/> .
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
pub:test1 {
|
|
54
|
-
pub:test1 a np:Nanopublication;
|
|
55
|
-
np:hasAssertion pub:test1_assertion;
|
|
56
|
-
np:hasProvenance pub:test1_provenance;
|
|
57
|
-
np:hasPublicationInfo pub:test1_pubinfo.
|
|
58
|
-
|
|
59
|
-
pub:test1_assertion a np:Assertion.
|
|
60
|
-
pub:test1_provenance a np:Provenance.
|
|
61
|
-
pub:test1_pubinfo a np:PublicationInfo.
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
pub:test1_assertion {
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
pub:test1_pubinfo {
|
|
69
|
-
|
|
70
|
-
pub:test1 a as:Note.
|
|
71
|
-
|
|
72
|
-
pub:test1 as:content "Hello, World!!".
|
|
73
|
-
|
|
74
|
-
pub:test1
|
|
75
|
-
as:attributedTo user:mccusj2;
|
|
76
|
-
as:published "2023-10-30-21T12:34:56Z"^^xsd:dateTime.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
# Note that this would actually be recorded in a user profile,
|
|
80
|
-
# we don't need to repeat any of this in individual pubs.
|
|
81
|
-
user:mccusj2 a as:Person ;
|
|
82
|
-
as:name "Jamie McCusker" .
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
pub:test2 {
|
|
86
|
-
pub:test2 a np:Nanopublication;
|
|
87
|
-
np:hasAssertion pub:test2_assertion;
|
|
88
|
-
np:hasProvenance pub:test2_provenance;
|
|
89
|
-
np:hasPublicationInfo pub:test2_pubinfo.
|
|
90
|
-
|
|
91
|
-
pub:test2_assertion a np:Assertion.
|
|
92
|
-
pub:test2_provenance a np:Provenance.
|
|
93
|
-
pub:test2_pubinfo a np:PublicationInfo.
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
pub:test2_assertion {
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
pub:test2_pubinfo {
|
|
101
|
-
|
|
102
|
-
pub:test2 a as:Note.
|
|
103
|
-
|
|
104
|
-
pub:test2 as:content "And another thing!".
|
|
105
|
-
|
|
106
|
-
pub:test2
|
|
107
|
-
as:attributedTo user:mccusj2;
|
|
108
|
-
as:published "2024-06-30-21T12:34:56Z"^^xsd:dateTime.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
# Note that this would actually be recorded in a user profile,
|
|
112
|
-
# we don't need to repeat any of this in individual pubs.
|
|
113
|
-
user:mccusj2 a as:Person ;
|
|
114
|
-
as:name "Jamie McCusker" .
|
|
115
|
-
}
|