Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new examples section which holds all examples, tutorials and videos #1245

Merged
merged 20 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
styling the filters
  • Loading branch information
thisisjofrank committed Dec 10, 2024
commit fd759dc39120c5cc5d5be409edd2bce17a1a2ebe
1 change: 0 additions & 1 deletion examples/_components/ExampleIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export function ExampleIcon() {
return (
<svg
className="inline mr-2"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 328 258"
width="1rem"
Expand Down
4 changes: 2 additions & 2 deletions examples/_components/LearningList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export function LearningList(
<ul className="mb-8 examples-list">
{props.items.map((item) => (
<li
className="leading-7 learning-list-item"
className="learning-list-item"
data-category={item.type}
>
<a
className="homepage-link mb-1 runtime-link"
className="learn-link runtime-link"
href={item.id}
>
{item.type === "tutorial" && <TutorialIcon />}
Expand Down
1 change: 0 additions & 1 deletion examples/_components/TutorialIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export function TutorialIcon() {
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 502 384"
className="inline mr-2"
width="1rem"
>
<path
Expand Down
1 change: 0 additions & 1 deletion examples/_components/VideoIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export function VideoIcon() {
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 416 368"
className="inline mr-2"
width="1rem"
>
<rect
Expand Down
2 changes: 1 addition & 1 deletion examples/_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const sidebar = [
type: "example",
},
{
label: "Backward Compatibility with Node.js and npm",
label: "Compatibility with Node & npm",
id: "/examples/backward_compat_with_node_npm/",
externalURL:
"https://www.youtube.com/watch?v=QPLchkJ7eas&list=PLvvLnBDNuTEov9EBIp3MMfHlBxaKGRWTe&index=12",
Expand Down
23 changes: 15 additions & 8 deletions examples/_pages/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ export default function LandingPage() {
favorite tools.
</p>
</div>
<div className="flex flex-col gap-1 items-end">
<div className="flex flex-col gap-1 md:ml-4">
<h2 className="text-xs font-semibold mb-1">
Filter by type:
Filter by type
</h2>
<label for="example" className="flex items-center">
<ExampleIcon />Examples:
<label for="example" className="flex gap-2 items-center">
<span className="switch">
<input
type="checkbox"
Expand All @@ -48,10 +47,11 @@ export default function LandingPage() {
/>
<span className="slider"></span>
</span>
<ExampleIcon />
<span>Examples</span>
</label>

<label for="tutorial" className="flex items-center">
<TutorialIcon />Tutorials:
<label for="tutorial" className="flex gap-2 items-center">
<span className="switch">
<input
type="checkbox"
Expand All @@ -62,10 +62,13 @@ export default function LandingPage() {
/>
<span className="slider"></span>
</span>
<TutorialIcon />
<span>
Tutorials
</span>
</label>

<label for="video" className="flex items-center">
<VideoIcon />Videos:
<label for="video" className="flex gap-2 items-center">
<span className="switch">
<input
type="checkbox"
Expand All @@ -76,6 +79,10 @@ export default function LandingPage() {
/>
<span className="slider"></span>
</span>
<VideoIcon />
<span>
Videos
</span>
</label>
</div>
</div>
Expand Down
11 changes: 9 additions & 2 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,14 @@ body {
hover:!no-underline hover:bg-jsr-yellow-300;
}

.homepage-link, .learn-link {
.homepage-link {
@apply block font-normal underline underline-offset-4;
}

.learn-link {
@apply flex gap-2 items-center font-normal underline underline-offset-4;
}

.deploy-link {
@apply text-deploy-600 decoration-deploy-600/20 hover:decoration-deploy-600;
}
Expand Down Expand Up @@ -634,6 +638,10 @@ body {
@apply inline-block text-sm;
}

.learning-list-item {
@apply leading-7 mb-1;
}

input[type="search"] {
background-image: url("/img/search.svg");
background-repeat: no-repeat;
Expand All @@ -655,7 +663,6 @@ input[type="search"] {
width: 1.8rem;
height: 1rem;
display: block;
margin-left: 0.5rem;
}

.switch input {
Expand Down
Loading