From 099d7b211c564573bac6a9c834b911b897ddedae Mon Sep 17 00:00:00 2001 From: Tommy Kammerer Date: Sat, 20 Jul 2024 22:30:06 +0200 Subject: [PATCH 1/5] Make imageName optional in DottedImageWithText component --- src/components/Layout/DottedImageWithText/index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/Layout/DottedImageWithText/index.js b/src/components/Layout/DottedImageWithText/index.js index 42f2846..78fbdae 100644 --- a/src/components/Layout/DottedImageWithText/index.js +++ b/src/components/Layout/DottedImageWithText/index.js @@ -10,8 +10,8 @@ import { parseMarkdownLikeText } from "@site/src/utils/textUtils"; // shows a dotted image and some text to the right, title is optional export default function DottedImageWithText({ imageName, title, text, headingDot }) { - // Construct the image URL using the imageName prop, we may want to handle image load errors in the future - const imageUrl = useBaseUrl(`/img/dotted-icons/${imageName}.svg`); + // Construct the image URL using the imageName prop (if there is one), we may want to handle image load errors in the future + const imageUrl = imageName ? useBaseUrl(`/img/dotted-icons/${imageName}.svg`) : null; // Function to render text content const renderTextContent = (content) => { @@ -49,9 +49,11 @@ export default function DottedImageWithText({ imageName, title, text, headingDot return (
-
- {imageName} -
+ {imageUrl && ( +
+ {imageName} +
+ )}
{title &&

{title}

} {renderTextContent(text)} From 9a4fd7d5c327738eb162fa6db6e5719cbee82f05 Mon Sep 17 00:00:00 2001 From: Tommy Kammerer Date: Tue, 23 Jul 2024 11:10:12 +0200 Subject: [PATCH 2/5] Add term explainer component and refactor --- .../GovernanceProposalsSection/index.js | 34 ---------- src/components/TermExplainer/index.js | 30 +++++++++ .../styles.module.css | 0 src/data/termsForTermExplainer.json | 64 +++++++++++++++++++ 4 files changed, 94 insertions(+), 34 deletions(-) delete mode 100644 src/components/GovernanceProposalsSection/index.js create mode 100644 src/components/TermExplainer/index.js rename src/components/{GovernanceProposalsSection => TermExplainer}/styles.module.css (100%) create mode 100644 src/data/termsForTermExplainer.json diff --git a/src/components/GovernanceProposalsSection/index.js b/src/components/GovernanceProposalsSection/index.js deleted file mode 100644 index 0f0dab1..0000000 --- a/src/components/GovernanceProposalsSection/index.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react"; -import styles from "./styles.module.css"; -import Divider from "@site/src/components/Layout/Divider"; -// -// Governance: Proposals -// FIXME: it's questionable if CIP was meant to be here -// FIXME: Funding Proposal seems to talk about Catalyst, consider in the future to talk about treasury withdraw proposal - -export default function GovernanceWithinCardanoSection({}) { - - return ( -
- -
-
-

Funding Proposal (FP)

-

- A formal request or proposal to build something that is not yet - covered by the Cardano protocol. -

-
- -
-

Cardano Improvement Proposal (CIP)

-

- A formally structured proposal touching the Cardano Ecosystem. CIPs - are publicly visible to the community for discussion, and are - located in the Cardano Foundation GitHub CIP repository. -

-
-
-
- ); -} diff --git a/src/components/TermExplainer/index.js b/src/components/TermExplainer/index.js new file mode 100644 index 0000000..938781c --- /dev/null +++ b/src/components/TermExplainer/index.js @@ -0,0 +1,30 @@ +import React, { useEffect, useState } from "react"; +import styles from "./styles.module.css"; +import Divider from "@site/src/components/Layout/Divider"; +import termsData from "@site/src/data/termsForTermExplainer.json"; // Import all the terms + +export default function TermExplainer({ category }) { + const [terms, setTerms] = useState([]); + + useEffect(() => { + if (category && termsData.categories[category]) { + const categoryTerms = termsData.categories[category]; + const randomTerms = categoryTerms.sort(() => 0.5 - Math.random()).slice(0, 2); + setTerms(randomTerms); + } + }, [category]); + + return ( +
+ +
+ {terms.map((term, index) => ( +
+

{term.term}

+

{term.description}

+
+ ))} +
+
+ ); +} diff --git a/src/components/GovernanceProposalsSection/styles.module.css b/src/components/TermExplainer/styles.module.css similarity index 100% rename from src/components/GovernanceProposalsSection/styles.module.css rename to src/components/TermExplainer/styles.module.css diff --git a/src/data/termsForTermExplainer.json b/src/data/termsForTermExplainer.json new file mode 100644 index 0000000..bd579db --- /dev/null +++ b/src/data/termsForTermExplainer.json @@ -0,0 +1,64 @@ +{ + "categories": { + "staking": [ + { + "term": "Delegation", + "description": "Delegation is the process by which ada holders delegate the stake associated with their ada to a stake pool. It allows ada holders that do not have the skills or desire to run a node to participate in the network and be rewarded in proportion to the amount of stake delegated." + }, + { + "term": "Stake Pool", + "description": "A network node with a public address that ada holders can delegate to for earning rewards." + }, + { + "term": "Epoch", + "description": "A period of time in the Cardano network after which staking rewards are calculated and distributed. One epoch are 5 days." + }, + { + "term": "Staking", + "description": "Staking refers to the entire process of both delegating and setting up a pool. It is often confused with `delegating`." + } + ], + "catalyst": [ + { + "term": "Funding Proposal", + "description": "A formal request or proposal to build something that is not yet covered by the Cardano protocol." + }, + { + "term": "Voting Power", + "description": "The influence an ada holder has in Project Catalyst, determined by the amount of ada they hold." + }, + { + "term": "Evidence of milestone completion", + "description": "The evidence clearly and visibly shows that the milestone has been completed." + }, + { + "term": "Statement of Milestones (SoM)", + "description": "A list of milestones in the project created by Funded Project in the Milestone Module with the schedule, deliverables, milestone achievement dates, milestone funding amounts, and the expected PoA." + } + ], + "governance": [ + { + "term": "CIP-1694", + "description": "CIP-1694 introduces a new on-chain governance model for Cardano, aiming to give every ada holder a voice in governance. It proposes a tricameral system with three groups: stake pool operators (SPOs), Delegated Representatives (DReps), and a Constitutional Committee (CC), each with distinct roles." + }, + { + "term": "Constitution", + "description": "A constitution establishes rules for creating, managing, and interpreting laws, defining government structure, and outlining the powers of different branches. Historically, constitutions have structured governments and reduced decision-making costs. For Cardano, a community-led ecosystem, enacting a constitution is crucial for its benefit and protection. It will guide collective decision-making, define participants' rights and principles, and provide a foundation to address the evolving needs of the ecosystem." + }, + { + "term": "Governance Action", + "description": "A Governance Action is an on-chain proposal for voting, triggered by a transaction, with an expiration period after which it can’t be enacted. Any ada holder can submit a Governance Action, and voters then submit voting transactions. CIP-1694 describes seven types of Governance Actions: Motion of no-confidence, New constitutional committee or Quorum size, Updates to Constitution, Hard-Fork Initiation, Protocol Parameter Changes, Treasury Withdrawals, and Info." + } + ], + "cip": [ + { + "term": "Cardano Improvement Proposal (CIP)", + "description": "CIPs are a way of formally proposing ideas in an agreed-upon fashion. However, they are often used for more than just finding standards. They are not binding in any way. CIPs are publicly visible to the community for discussion, and are located in the Cardano Foundation GitHub CIP repository." + }, + { + "term": "CIP Editors", + "description": "CIP Editors safeguard the CIP process: they form a group enforcing the process described in this document and facilitating conversations between community actors. CIP editors should strive to keep up to date with general technical discussions and Cardano proposals." + } + ] + } +} \ No newline at end of file From c8d939c24a58a63fe4903d639dccb16cab595189 Mon Sep 17 00:00:00 2001 From: Tommy Kammerer Date: Thu, 25 Jul 2024 22:28:32 +0200 Subject: [PATCH 3/5] Add chang hard fork preview --- src/pages/hardforks.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/hardforks.js b/src/pages/hardforks.js index d818a09..ac83206 100644 --- a/src/pages/hardforks.js +++ b/src/pages/hardforks.js @@ -102,6 +102,16 @@ const timelineItems = [ "Transaction ID: a83f479c5635e1e563a19f6e72a1be59fb082bbf31de90cc176850ee799b08ac", ], }, + { + title: "Conway Era", + cardTitle: "August/September, depending on operators", + cardSubtitle: "Name: Chang 1", + cardDetailedText: [ + "Introducing the first batch of decentralized governance features of CIP-1694. Enabling only parameter changes and hard fork initiations.", + "Protocol Version: 9.0", + "Transaction ID: not yet available", + ], + }, ]; function HomepageHeader() { From d8eaf468cce9ec5377069262ea38661a77953ee0 Mon Sep 17 00:00:00 2001 From: Tommy Kammerer Date: Thu, 1 Aug 2024 23:28:19 +0200 Subject: [PATCH 4/5] Add where to get ada page --- docusaurus.config.js | 1 + src/components/HowToBuyAdaSection/index.js | 6 +- .../HowToBuyAdaSection/styles.module.css | 4 +- src/pages/where-to-get-ada.js | 153 ++++++++++++++++++ 4 files changed, 158 insertions(+), 6 deletions(-) create mode 100644 src/pages/where-to-get-ada.js diff --git a/docusaurus.config.js b/docusaurus.config.js index 2cc0876..0f89272 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -89,6 +89,7 @@ const config = { {to: '/discover-cardano', label: 'Discover Cardano'}, {to: '/what-is-ada', label: 'What is ada?'}, {to: '/what-is-ada#wallets', label: 'Find Cardano wallets'}, + {to: '/where-to-get-ada', label: 'Where to get ada?'}, {to: '/stake-pool-delegation', label: 'Delegate your stake'}, {to: '/stake-pool-operation', label: 'Operate a stake pool'}, {to: '/governance', label: 'Participate in governance'}, diff --git a/src/components/HowToBuyAdaSection/index.js b/src/components/HowToBuyAdaSection/index.js index 0eda2fe..d292978 100644 --- a/src/components/HowToBuyAdaSection/index.js +++ b/src/components/HowToBuyAdaSection/index.js @@ -16,10 +16,8 @@ export default function HowToBuyAdaSection() {

- You can buy or sell ada for fiat or other cryptocurrencies using - cryptocurrency exchanges. Visit{" "} - coinmarketcap to see - the list of exchanges that support ada. + There are many ways to obtain ada to use the Cardano blockchain. + Find out on where to get ada?

As an ada holder, it is important to keep your funds secure, and diff --git a/src/components/HowToBuyAdaSection/styles.module.css b/src/components/HowToBuyAdaSection/styles.module.css index a445217..bcd2ff5 100644 --- a/src/components/HowToBuyAdaSection/styles.module.css +++ b/src/components/HowToBuyAdaSection/styles.module.css @@ -26,8 +26,8 @@ background-size: cover; background-repeat: no-repeat; background-position: center; - width: 100%; - min-height: 45rem; + width: 90%; + min-height: 35rem; } /* FeaturedTitleWithText */ diff --git a/src/pages/where-to-get-ada.js b/src/pages/where-to-get-ada.js new file mode 100644 index 0000000..14be3d1 --- /dev/null +++ b/src/pages/where-to-get-ada.js @@ -0,0 +1,153 @@ +import Layout from "@theme/Layout"; +import SiteHero from "@site/src/components/Layout/SiteHero"; +import BoundaryBox from "@site/src/components/Layout/BoundaryBox"; +import OpenGraphImage from "@site/src/components/Layout/OpenGraphImage"; +import BackgroundWrapper from "@site/src/components/Layout/BackgroundWrapper"; +import TitleWithText from "@site/src/components/Layout/TitleWithText"; +import DottedImageWithText from "@site/src/components/Layout/DottedImageWithText"; +import Divider from "@site/src/components/Layout/Divider"; +import SpacerBox from "@site/src/components/Layout/SpacerBox"; + +function HomepageHeader() { + const { siteTitle } = "useDocusaurusContext()"; + return ( + + ); +} + +export default function Home() { + + return ( + + {/* FIXME */} + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + ); +} From 5bcf41f4255be5fa79c698b68d071b180f04a312 Mon Sep 17 00:00:00 2001 From: Tommy Kammerer Date: Fri, 2 Aug 2024 18:58:42 +0200 Subject: [PATCH 5/5] Update governance page --- .../GovernanceWhyVoltaireSection/index.js | 6 ++-- .../GovernanceWithinCardanoSection/index.js | 2 +- src/pages/governance.js | 28 ++++++++++++------- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/components/GovernanceWhyVoltaireSection/index.js b/src/components/GovernanceWhyVoltaireSection/index.js index 91163b6..ca38f2a 100644 --- a/src/components/GovernanceWhyVoltaireSection/index.js +++ b/src/components/GovernanceWhyVoltaireSection/index.js @@ -25,8 +25,8 @@ export default function GovernanceWhyVoltaireSection({}) {

Voltaire adds the ability for the Cardano community to make impactful decisions about software updates, technical improvements - and funding decisions. Known as Cardano Improvement Proposals (CIPs) - and Funding Proposals (FP's) together, these allow the future of + and funding decisions. Known as Governance Actions, + these allow the future of Cardano to be determined by its community and funded from the platform's treasury.

@@ -35,7 +35,7 @@ export default function GovernanceWhyVoltaireSection({}) { The era will also play host to a series of experiments, as we discuss topics such as decentralised governance, the dynamics of democracy and consent, evolving Voltaire from research to reality. - If Shelley is the foundation of a globally coordinated network + If Shelley was the foundation of a globally coordinated network without a central authority, then Voltaire will explore the apparatus for shared decision making: the language of decentralization. diff --git a/src/components/GovernanceWithinCardanoSection/index.js b/src/components/GovernanceWithinCardanoSection/index.js index 819af80..cfb833d 100644 --- a/src/components/GovernanceWithinCardanoSection/index.js +++ b/src/components/GovernanceWithinCardanoSection/index.js @@ -32,7 +32,7 @@ export default function GovernanceWithinCardanoSection({}) {
- - - - - - + - - + + + + + + + + + + + + + + - +