Skip to content

Commit

Permalink
Staging (#258) - Arweave Lesson 4
Browse files Browse the repository at this point in the history
* feat: arweave lesson 4 init

* feat: Arweave lesson 4 update

* feat: added some enhancements for the lesson 4 of arweave track

* Arweave lesson 4 (#257) - launch updates

* (feat) Add ArNS registration to Arweave 101 L4

* chore: updating tIO instructions

* fix: fixing secret code, updating Zealy URL and removing unused text

---------

Co-authored-by: K <kay-is@users.noreply.github.com>

---------

Co-authored-by: wolovim <3621728+wolovim@users.noreply.github.com>
Co-authored-by: K <kay-is@users.noreply.github.com>
Co-authored-by: Marcos Iglesias <markkos89@gmail.com>
  • Loading branch information
4 people authored Jun 28, 2024
1 parent d5ef8ba commit 27e42f1
Show file tree
Hide file tree
Showing 24 changed files with 931 additions and 17 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 6 additions & 8 deletions apps/academy/src/components/LessonLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// import AboutCourse from "@/components/AboutCourse";
import { useRouter } from "next/router";
// import { useRouter } from "next/router";

import CreatedBy from "@/components/CreatedBy";
import PageSeoLayout from "@/components/PageSeoLayout";
import { api } from "@/utils/api";
// import { api } from "@/utils/api";

interface LessonLayoutProps {
children: React.ReactNode;
Expand All @@ -26,14 +26,12 @@ export default function LessonLayout({
authorImage,
authorTwitter,
}: LessonLayoutProps) {
const router = useRouter();
// const router = useRouter();

console.log(router.pathname);
// const { data: lessonData } = api.lessons.getLessonsByLessonPath.useQuery({
// lessonPath: router.pathname,
// });

const { data: lessonData } = api.lessons.getLessonsByLessonPath.useQuery({
lessonPath: router.pathname,
});
console.log("poop", { lessonData });
return (
<PageSeoLayout
title={lessonTitle}
Expand Down
4 changes: 2 additions & 2 deletions apps/academy/src/components/TrackAuthor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default function TrackAuthor({
authorTwitter,
}: TrackAuthorProps) {
// mvp: if multiple authors, split by comma and map to multiple links
console.log("∆∆∆: ");
console.log(authorImage);
// console.log("∆∆∆: ");
// console.log(authorImage);
const handles = authorTwitter.split(", ");
const twitterLinks = handles.map((handle, idx) => (
<a
Expand Down
4 changes: 1 addition & 3 deletions apps/academy/src/components/mdx/QuizCompletedModals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface QuizProps {
actualLessonTitle: string;
quizCompleted: boolean;
successMessage?: { message: string }[];
successTitle?: string;
successTitle?: string | undefined;
currentLessonPath: string;
actionButton?: { href: string; text: string } | null;
}
Expand Down Expand Up @@ -60,8 +60,6 @@ const QuizCompletedModals = ({
setShowDialog(false);
};

console.log(actionButton);

return (
<>
<div className="w-full text-center">
Expand Down
2 changes: 1 addition & 1 deletion apps/academy/src/components/mdx/QuizStatusChecker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Quiz from "./Quiz";
export interface QuizStatusCheckerType {
quiz: string;
successMessage: { message: string }[];
successTitle: string;
successTitle?: string;
actionButton: any;
}

Expand Down
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-1/Q1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "What is the goal of Arweave?",
"options": [
{
"answer": "To provide the world with permanent, immutable storage.",
"correct": true
},
{
"answer": "To dethrone Bitcoin as the most valuable cryptocurrency."
},
{
"answer": "To save you from paying taxes."
}
]
}
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-1/Q2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "Does Arweave treat websites different from other data?",
"options": [
{
"answer": "Yes, if you add the correct tags, gateways will deliver the data as website to a browser.",
"correct": true
},
{
"answer": "No, Arweave forces all browsers to download them as files."
},
{
"answer": "Yes, Arweave uses React to render websites on the gateway."
}
]
}
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-1/Q3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "Why is a static website generator the perfect tool to create websites for Arweave?",
"options": [
{
"answer": "Arweave gateways can’t render HTML and build-time rendering solves this issue.",
"correct": true
},
{
"answer": "It isn’t well suited for Arweave, as the files are getting too big."
},
{
"answer": "Static websites revive the spirit of the early web."
}
]
}
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-2/Q1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "Does Eleventy need any special configuration to work with Arweave?",
"options": [
{
"answer": "Yes, it needs a filter to rewrite relative URLs, so they work with the TXID Arweave websites start with.",
"correct": true
},
{
"answer": "No, Eleventy works with Arweave out of the box."
},
{
"answer": "Yes, Eleventy needs advanced compression to fit the page on Arweave."
}
]
}
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-2/Q2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "How do you use the rel filter in a Eleventy template?",
"options": [
{
"answer": "{{ post.url | rel }}",
"correct": true
},
{
"answer": "rel(post.url)"
},
{
"answer": "{{ rel(post.url) }}"
}
]
}
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-2/Q3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "How can using relative URLs in your website lead to permanent links?",
"options": [
{
"answer": "While the URLs are relative to the TXID they belong to, this ID never changes.",
"correct": true
},
{
"answer": "It can’t. The moment the TXID changes, the relative links of your website are all broken."
},
{
"answer": "Eleventy automatically applies a <base> element to all of your links."
}
]
}
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-3/Q1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "Why can you deploy a website with a randomly generated wallet?",
"options": [
{
"answer": "Arweave bundling services subsidize uploads under 100 KiB.",
"correct": true
},
{
"answer": "They can’t, all uploads are in transactions that cost money to settle onchain."
},
{
"answer": "The first 10 files are free to upload."
}
]
}
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-3/Q2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "How does Arweave change the content of a TXID after you uploaded a new version of a file?",
"options": [
{
"answer": "It doesn’t, the new upload will get a new TXID.",
"correct": true
},
{
"answer": "It apppends the new version to the old file."
},
{
"answer": "You can’t upload multiple versions of one file."
}
]
}
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-3/Q3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "What enables users to access multiple files with one TXID?",
"options": [
{
"answer": "A JSON path manifest that maps paths to TXIDs.",
"correct": true
},
{
"answer": "ZIP archive uploads."
},
{
"answer": "An XML manifest that links TXIDs to URLs."
}
]
}
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-4/Q1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "Are ArNS names immutable?",
"options": [
{
"answer": "No, you can change their target TXIDs.",
"correct": true
},
{
"answer": "Yes, once you set a TXID, they will always point to that."
},
{
"answer": "No, they can change 5 times after registration."
}
]
}
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-4/Q2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "Are ArNS names linked to a gateway?",
"options": [
{
"answer": "No, you can access every ArNS name from every gateway.",
"correct": true
},
{
"answer": "Yes, you have to choose a gateway at registration."
},
{
"answer": "Yes, but only for the first month."
}
]
}
15 changes: 15 additions & 0 deletions apps/academy/src/data/questions/arweave-101/4/quiz-4/Q3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"question": "Where can you find the immutable TXID of an ArNS page?",
"options": [
{
"answer": "In the X-Arns-Resolved-Id header field.",
"correct": true
},
{
"answer": "In the Arweave-Txid header field."
},
{
"answer": "You can’t, the TXID is hidden from the client."
}
]
}
Loading

0 comments on commit 27e42f1

Please sign in to comment.