Skip to content

Commit

Permalink
chore: future self, please forgive me and don't hit me with the baseb…
Browse files Browse the repository at this point in the history
…all bat again!
  • Loading branch information
favna committed Dec 14, 2024
1 parent 520386d commit e906a76
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 1,008 deletions.
4 changes: 0 additions & 4 deletions templates/astro/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import lit from '@astrojs/lit';
import react from '@astrojs/react';
import { defineConfig } from 'astro/config';

export default defineConfig({
// Enable many frameworks to support all different kinds of components.
// No `include` is needed if you are only using a single JSX framework!
integrations: [
lit({
include: ['**/lit/*']
}),
react({
include: ['**/react/*']
})
Expand Down
2 changes: 0 additions & 2 deletions templates/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/lit": "^4.3.0",
"@astrojs/react": "^4.1.0",
"@skyra/discord-components-core": "^4.0.0-alpha.37",
"@skyra/discord-components-react": "^4.0.0-alpha.37",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^5.0.5",
"lit": "^3.2.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"typescript": "^5.7.2"
Expand Down
694 changes: 0 additions & 694 deletions templates/astro/src/lit/components/DiscordComponentsWrapper.ts

This file was deleted.

166 changes: 82 additions & 84 deletions templates/astro/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,97 +1,95 @@
---
import { DiscordComponentsWrapper } from '../lit/components/DiscordComponentsWrapper';
import Layout from '../layouts/Layout.astro';
import DiscordComponents from '../react/components/DiscordComponents';
---

<Layout>
<div>
<div>
<h1 class="logo">&#64;skyra/discord-components-core</h1>
<span
>[<a
title="GitHub repository"
class="link"
target="_blank"
rel="noopener noreferrer"
href="https://github.com/skyra-project/discord-components/">Github</a
>]</span
>
</div>
<h1 class="logo">&#64;skyra/discord-components-core</h1>
<span
>[<a
title="GitHub repository"
class="link"
target="_blank"
rel="noopener noreferrer"
href="https://github.com/skyra-project/discord-components/">Github</a
>]</span
>
</div>

<div>
<h2>Explanation</h2>
<div>
<h2>Explanation</h2>
<div>
This website contains various samples for
<a
title="GitHub repository"
class="link"
target="_blank"
rel="noopener noreferrer"
href="https://github.com/skyra-project/discord-components/">&#64;skyra/discord-components-core</a
>
which is a webcomponents library (powered by
<a title="Lit website" class="link" target="_blank" rel="noopener noreferrer" href="https://lit.dev">Lit</a>) to create Discord-like
messages with rich content. The always up-to-date version of this document can be found
<a
title="Demo index.html"
class="link"
target="_blank"
rel="noopener noreferrer"
href="https://github.com/skyra-project/discord-components-implementations/blob/main/templates/astro/src/pages/index.astro/">here</a
>.
</div>
<DiscordComponentsWrapper client:only="lit" />
This website contains various samples for
<a
title="GitHub repository"
class="link"
target="_blank"
rel="noopener noreferrer"
href="https://github.com/skyra-project/discord-components/">&#64;skyra/discord-components-core</a
>
which is a webcomponents library (powered by
<a title="Lit website" class="link" target="_blank" rel="noopener noreferrer" href="https://lit.dev">Lit</a>) to create Discord-like
messages with rich content. The always up-to-date version of this document can be found
<a
title="Demo index.html"
class="link"
target="_blank"
rel="noopener noreferrer"
href="https://github.com/skyra-project/discord-components-implementations/blob/main/templates/astro/src/pages/react.astro">here</a
>.
</div>
</div>
<DiscordComponents client:only="react" />
</Layout>

<script is:inline>
window.$discordMessage = {
profiles: {
maximillian: {
author: 'Maximillian Osborn',
avatar: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/avaone.png',
roleColor: '#f9d61b'
},
willard: {
author: 'Willard Walton',
avatar: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/avatwo.png',
roleColor: '#ffb12f'
},
skyra: {
author: 'Skyra',
avatar: 'https://github.com/NM-EEA-Y.png',
roleColor: '#1e88e5',
bot: true,
verified: true
},
favna: {
author: 'Favna',
avatar: 'https://github.com/favna.png',
roleColor: '#a155ab',
roleIcon: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/booster.png',
roleName: 'Booster'
},
discordjs: {
author: 'Discord.js Official #announcements',
avatar: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/discordjs.png',
roleColor: '#ffffff',
server: true
}
<script is:inline>
window.$discordMessage = {
profiles: {
maximillian: {
author: 'Maximillian Osborn',
avatar: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/avaone.png',
roleColor: '#f9d61b'
},
emojis: {
diamond: {
name: 'diamond',
url: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/diamond.png'
},
dragonite: {
name: 'dragonite',
url: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/dragonite.png'
},
sapphire: {
name: 'sapphire',
url: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/sapphire.png'
}
willard: {
author: 'Willard Walton',
avatar: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/avatwo.png',
roleColor: '#ffb12f'
},
skyra: {
author: 'Skyra',
avatar: 'https://github.com/NM-EEA-Y.png',
roleColor: '#1e88e5',
bot: true,
verified: true
},
favna: {
author: 'Favna',
avatar: 'https://github.com/favna.png',
roleColor: '#a155ab',
roleIcon: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/booster.png',
roleName: 'Booster'
},
discordjs: {
author: 'Discord.js Official #announcements',
avatar: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/discordjs.png',
roleColor: '#ffffff',
server: true
}
};
</script>
</Layout>
},
emojis: {
diamond: {
name: 'diamond',
url: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/diamond.png'
},
dragonite: {
name: 'dragonite',
url: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/dragonite.png'
},
sapphire: {
name: 'sapphire',
url: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/sapphire.png'
}
}
};
</script>
95 changes: 0 additions & 95 deletions templates/astro/src/pages/react.astro

This file was deleted.

2 changes: 1 addition & 1 deletion templates/qwik-vite-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"vite": "^6.0.3"
},
"dependencies": {
"@builder.io/qwik": "1.11.0",
"@builder.io/qwik": "1.5.2",
"@skyra/discord-components-core": "^4.0.0-alpha.37"
}
}
Loading

0 comments on commit e906a76

Please sign in to comment.