Skip to content

Commit d0f9985

Browse files
docs: add project website screenshots to README.md
1 parent fb9273d commit d0f9985

File tree

6 files changed

+24
-6
lines changed

6 files changed

+24
-6
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,16 @@ First-time maintainers must learn multiple tools and concepts, e.g. [MyST], [Sem
4646
- [ ] **⚡ Full-text search** across **ALL** your content in your website — docs, blogs, tutorials, everything
4747
- [ ] **🤖 Embedded AI Chatbot** that answers questions directly using an in-browser LLM — at no cost
4848

49+
---
50+
## Project Website
51+
> The project website for `afterpython` is created using `afterpython` itself. See the [**website**](https://afterpython.afterpython.org).
52+
<picture>
53+
<source media="(prefers-color-scheme: dark)" srcset="afterpython/static/website-dark.png">
54+
<source media="(prefers-color-scheme: light)" srcset="afterpython/static/website-light.png">
55+
<img alt="Project Website" src="afterpython/static/website-light.png">
56+
</picture>
4957
58+
---
5059
## Installation
5160
```bash
5261
# install afterpython as a dev dependency

afterpython/_website/src/lib/components/Footer.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import GitHubIcon from '$components/GitHubIcon.svelte';
33
import { dev } from '$app/environment';
44
import { env } from '$env/dynamic/public';
5+
import { resolve } from '$app/paths';
56
67
type FooterProps = {
78
projectName?: string;
@@ -45,7 +46,7 @@
4546
<div>
4647
<h3 class="text-lg font-semibold text-tx50 mb-3">Resources</h3>
4748
<ul class="space-y-2 text-sm text-tx300">
48-
<li><a href={dev ? env.PUBLIC_DOC_URL : "/doc"} target="_blank" rel="external noopener noreferrer" class="hover:text-tx50 transition-colors">Documentation</a></li>
49+
<li><a href={dev ? env.PUBLIC_DOC_URL : resolve("/doc")} target="_blank" rel="external noopener noreferrer" class="hover:text-tx50 transition-colors">Documentation</a></li>
4950
<!-- <li><a href="/tutorials" class="hover:text-tx50 transition-colors">Tutorials</a></li>
5051
<li><a href="/examples" class="hover:text-tx50 transition-colors">Examples</a></li>
5152
<li><a href="/blog" class="hover:text-tx50 transition-colors">Blog</a></li> -->

afterpython/_website/src/routes/+layout.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import type { LayoutProps } from './$types';
44
import ThemeToggle from '$components/ThemeToggle.svelte';
55
import Logo from '$components/Logo.svelte';
6-
// import Footer from '$components/Footer.svelte';
6+
import Footer from '$components/Footer.svelte';
77
import { dev } from '$app/environment';
88
import { env } from '$env/dynamic/public';
99
import { resolve } from '$app/paths';
@@ -33,7 +33,7 @@
3333
Documentation
3434
</a>
3535
</li>
36-
<!-- <li>
36+
<li>
3737
<a href={'/tutorial'}>Tutorials</a>
3838
</li>
3939
<li>
@@ -44,7 +44,7 @@
4444
</li>
4545
<li>
4646
<a href={'/blog'}>Blog</a>
47-
</li> -->
47+
</li>
4848
<!-- <li>
4949
<a href={'/exercises'}>Exercises</a>
5050
</li>
@@ -61,5 +61,5 @@
6161

6262
{@render children()}
6363

64-
<!-- <Footer projectName={metadataJson.name} projectSummary={metadataJson.summary} {repositoryUrl} /> -->
64+
<Footer projectName={metadataJson.name} projectSummary={metadataJson.summary} {repositoryUrl} />
6565
</div>

afterpython/_website/src/routes/+page.svelte

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import type { PageProps } from './$types';
33
import MarkdownRenderer from '$components/MarkdownRenderer.svelte';
44
import StarIcon from '$components/StarIcon.svelte';
5+
import { dev } from '$app/environment';
6+
import { env } from '$env/dynamic/public';
7+
import { resolve } from '$app/paths';
58
69
const { data: metadataJson }: PageProps = $props();
710
@@ -67,7 +70,12 @@
6770
</a>
6871
{/if}
6972
<button class="px-6 py-3 bg-pm500 text-white rounded-lg font-medium hover:bg-pm600 transition-colors">
70-
Go to Playground
73+
<a
74+
href={dev ? env.PUBLIC_DOC_URL : resolve("/doc")}
75+
rel="external noopener noreferrer"
76+
>
77+
Go to Documentation
78+
</a>
7179
</button>
7280
</div>
7381

216 KB
Loading
226 KB
Loading

0 commit comments

Comments
 (0)