Compare commits
20 commits
main
...
astra/over
Author | SHA1 | Date | |
---|---|---|---|
4a3d55634d | |||
b9dca99d12 | |||
b314bebc6c | |||
58e12b6130 | |||
0c8eb83f5b | |||
36d286fba8 | |||
db7424e473 | |||
0e55f9060f | |||
7dd07d95c8 | |||
12f3586f74 | |||
04735a538d | |||
8e7f5fc0ab | |||
e75f41f7f1 | |||
fc8d61e1ef | |||
ec73af5618 | |||
cebae8c7ae | |||
0a6279823e | |||
e49ce63db9 | |||
4e1faff7e3 | |||
8eda5e6672 |
5 changed files with 21 additions and 38 deletions
11
README.md
11
README.md
|
@ -46,11 +46,16 @@ we use our own CI/CD workflow at [`.forgejo/workflows/deploy.yaml`](.forgejo/wor
|
||||||
|
|
||||||
## theming
|
## theming
|
||||||
|
|
||||||
themes are located in the `themes/` directory, you can create your own theme by copying one of the existing themes and modifying it to your liking.
|
the colors are designated in [`src/app.css`](src/app.css) as variables, go crazy with them
|
||||||
|
|
||||||
currently, the name of the theme is determined by the directory name, and the theme itself is defined in `theme.css` inside that directory.
|
the rest is done by editing the css files and style tags directly, good luck
|
||||||
|
|
||||||
you can switch themes by changing the `theme` property in `config.ts`.
|
relevant files:
|
||||||
|
|
||||||
|
- [`src/App.svelte`](src/App.svelte)
|
||||||
|
- [`src/app.css`](src/app.css)
|
||||||
|
- [`src/lib/AccountComponent.svelte`](src/lib/AccountComponent.svelte)
|
||||||
|
- [`src/lib/PostComponent.svelte`](src/lib/PostComponent.svelte)
|
||||||
|
|
||||||
the favicon is located at [`public/favicon.ico`](public/favicon.ico)
|
the favicon is located at [`public/favicon.ico`](public/favicon.ico)
|
||||||
|
|
||||||
|
|
|
@ -12,14 +12,10 @@
|
||||||
alt="avatar of {account.displayName}"
|
alt="avatar of {account.displayName}"
|
||||||
src="{Config.PDS_URL}/xrpc/com.atproto.sync.getBlob?did={account.did}&cid={account.avatarCid}"
|
src="{Config.PDS_URL}/xrpc/com.atproto.sync.getBlob?did={account.did}&cid={account.avatarCid}"
|
||||||
/>
|
/>
|
||||||
<div id="accountName">
|
|
||||||
{account.displayName || account.handle || account.did}
|
|
||||||
</div>
|
|
||||||
{:else}
|
|
||||||
<div id="accountName" class="no-avatar">
|
|
||||||
{account.displayName || account.handle || account.did}
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
<div id="accountName">
|
||||||
|
{account.displayName || account.handle || account.did}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -132,13 +132,7 @@ const getDidsFromPDS = async (): Promise<At.Did[]> => {
|
||||||
const getAccountMetadata = async (
|
const getAccountMetadata = async (
|
||||||
did: `did:${string}:${string}`,
|
did: `did:${string}:${string}`,
|
||||||
) => {
|
) => {
|
||||||
const account: AccountMetadata = {
|
// gonna assume self exists in the app.bsky.actor.profile
|
||||||
did: did,
|
|
||||||
handle: "", // Guaranteed to be filled out later
|
|
||||||
displayName: "",
|
|
||||||
avatarCid: null,
|
|
||||||
};
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { data } = await rpc.get("com.atproto.repo.getRecord", {
|
const { data } = await rpc.get("com.atproto.repo.getRecord", {
|
||||||
params: {
|
params: {
|
||||||
|
@ -148,22 +142,21 @@ const getAccountMetadata = async (
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const value = data.value as AppBskyActorProfile.Record;
|
const value = data.value as AppBskyActorProfile.Record;
|
||||||
account.displayName = value.displayName || "";
|
const handle = await blueskyHandleFromDid(did);
|
||||||
|
const account: AccountMetadata = {
|
||||||
|
did: did,
|
||||||
|
handle: handle,
|
||||||
|
displayName: value.displayName || "",
|
||||||
|
avatarCid: null,
|
||||||
|
};
|
||||||
if (value.avatar) {
|
if (value.avatar) {
|
||||||
account.avatarCid = value.avatar.ref["$link"];
|
account.avatarCid = value.avatar.ref["$link"];
|
||||||
}
|
}
|
||||||
|
return account;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn(`Error fetching profile for ${did}:`, e);
|
console.error(`Error fetching metadata for ${did}:`, e);
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
account.handle = await blueskyHandleFromDid(did);
|
|
||||||
} catch (e) {
|
|
||||||
console.error(`Error fetching handle for ${did}:`, e);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return account;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAllMetadataFromPds = async (): Promise<AccountMetadata[]> => {
|
const getAllMetadataFromPds = async (): Promise<AccountMetadata[]> => {
|
||||||
|
|
|
@ -237,7 +237,6 @@ a:hover {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
border: 4px solid var(--border-color);
|
border: 4px solid var(--border-color);
|
||||||
box-shadow: var(--border-color) 10px 10px;
|
box-shadow: var(--border-color) 10px 10px;
|
||||||
min-height: 30px;
|
|
||||||
}
|
}
|
||||||
#accountName {
|
#accountName {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
@ -250,10 +249,6 @@ a:hover {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-avatar {
|
|
||||||
margin-left: 40px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* App.Svelte */
|
/* App.Svelte */
|
||||||
/* desktop style */
|
/* desktop style */
|
||||||
|
|
||||||
|
|
|
@ -235,7 +235,6 @@ a:hover {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
min-height: 30px;
|
|
||||||
}
|
}
|
||||||
#accountName {
|
#accountName {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
@ -248,11 +247,6 @@ a:hover {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.no-avatar {
|
|
||||||
margin-left: 70px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* App.Svelte */
|
/* App.Svelte */
|
||||||
/* desktop style */
|
/* desktop style */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue