mirror of
https://gitlab.com/octtspacc/Friendiiverse
synced 2025-02-03 09:37:30 +01:00
Upd
This commit is contained in:
parent
841fe95450
commit
dee3883537
@ -66,10 +66,11 @@ ApiSchema.Channel = CopyObj(ApiSchema.__Account__);
|
||||
|
||||
var TransParsers = {
|
||||
Mastodon: {
|
||||
/*
|
||||
Account(Data) {
|
||||
return JsonTransformA(Data, TransSchemas.Mastodon.Author, TransSchemas.Mastodon);
|
||||
//return JsonTransformA(Data, TransSchemas.Mastodon.Author, TransSchemas.Mastodon);
|
||||
return JsonTransformB(Data, ApiSchema, ApiSchema.Author, 'Mastodon');
|
||||
},
|
||||
/*
|
||||
Instance(Data) {
|
||||
return JsonTransformA(Data, TransSchemas.Mastodon.Instance, TransSchemas.Mastodon);
|
||||
},
|
||||
|
@ -14,11 +14,13 @@ FakeApi.Friendiiverse.Featured.Featured.push({
|
||||
Banner: "https://picsum.photos/seed/Testing.Banner/320/180",
|
||||
Icon: "https://picsum.photos/seed/Testing.Icon/64",
|
||||
Name: "Testing Channel",
|
||||
Url: "https://lemmy.example.com/c/Testing",
|
||||
});
|
||||
FakeApi.Friendiiverse.Featured.Categories.push({
|
||||
Banner: "https://picsum.photos/seed/fediverse.Banner/320/180",
|
||||
Icon: "https://picsum.photos/seed/fediverse.Icon/64",
|
||||
Name: "#fediverse",
|
||||
Url: "https://mastodon.example.com/hashtag/fediverse",
|
||||
});
|
||||
|
||||
FakeApi.Mastodon.Account = {
|
||||
@ -27,6 +29,8 @@ FakeApi.Mastodon.Account = {
|
||||
header: "https://picsum.photos/seed/Tester.Banner/320/180",
|
||||
url: "https://mastodon.example.com/@Tester",
|
||||
};
|
||||
FakeApi.Friendiiverse.Featured.Featured.push(
|
||||
TransParsers.Mastodon.Account(FakeApi.Mastodon.Account));
|
||||
|
||||
FakeApi.Mastodon.Status = {
|
||||
account: FakeApi.Mastodon.Account,
|
||||
|
@ -108,20 +108,18 @@ function MakeWindow(Attrs) {
|
||||
};
|
||||
|
||||
function DisplayChannel(Channel) {
|
||||
//DoAsync(FetchMastodon, FillTimeline);
|
||||
ChannelView.innerHTML = `
|
||||
<div class="" style="display: inline-block;">
|
||||
<a href="${Channel.Url}">
|
||||
<div>
|
||||
<img class="" src="${Channel.Banner}"/>
|
||||
</div>
|
||||
<div>
|
||||
<img class="" src="${Channel.Icon}"/>
|
||||
${Channel.Name}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
var Window = MakeWindow({className: "Channel"});
|
||||
Window.innerHTML += `<div class="" style="display: inline-block;">
|
||||
<a href="${Channel.Url}">
|
||||
<div>
|
||||
<img class="" src="${Channel.Banner}"/>
|
||||
</div>
|
||||
<div>
|
||||
<img class="" src="${Channel.Icon}"/>
|
||||
${Channel.Name}
|
||||
</div>
|
||||
</a>
|
||||
</div>`;
|
||||
};
|
||||
|
||||
function FetchMastodon(Proc) {
|
||||
@ -163,7 +161,7 @@ function FillFeatured(Categories) {
|
||||
Object.values(Categories).forEach(function(Channels){
|
||||
Channels.forEach(function(Channel){
|
||||
Window.innerHTML += `<div data-data="${B64Obj(Channel)}">
|
||||
<a href="${Channel.Url}" onclick="DisplayChannel(UnB64Obj(this.parentNode.dataset.data).Author); return false;">
|
||||
<a href="${Channel.Url}" onclick="DisplayChannel(UnB64Obj(this.parentNode.dataset.data)); return false;">
|
||||
<div>
|
||||
<img src="${Channel.Banner}"/>
|
||||
</div>
|
||||
@ -201,4 +199,4 @@ PlazasView.innerHTML = `
|
||||
*/
|
||||
|
||||
DoAsync(FetchFeatured, FillFeatured);
|
||||
|
||||
CoverView.remove();
|
||||
|
@ -3,7 +3,7 @@ img, video {
|
||||
}
|
||||
|
||||
#Root {
|
||||
margin-bottom: 2em;
|
||||
/*margin-bottom: 2em;*/
|
||||
}
|
||||
|
||||
#Bottom {
|
||||
@ -20,6 +20,18 @@ img, video {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
|
||||
.Window {
|
||||
background: white;
|
||||
position: absolute;
|
||||
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-width: 100%;
|
||||
|
||||
min-height: calc(100% - 4em);
|
||||
padding-bottom: 2em;
|
||||
}
|
||||
|
||||
.View.Note {
|
||||
border: 4px solid purple;
|
||||
margin: 12px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user