-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(app): correct sidebar placement * fix(app): responsive content centering * fix(app): responsive content centering * Update issue templates, Close #273 close #273 * Feat: add logos (#278) * fix #276 * feat: updated logo * Feat: upgrade to `2.9.2` (#280) * chore: update 2.9.2 * chore: apply fmt * fix: hide AA for upcoming fixes * fix: github edit link * fix: starknet book deadlink * fix #279 * small improvement: increase footer bottom padding * fix #275 * fix: minor * fix: remove print from cairo_cheatsheet * Update verify_cairo_programs.yml
- Loading branch information
Showing
101 changed files
with
904 additions
and
643 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Checklist:** | ||
- Using the correct tooling versions, from https://github.com/NethermindEth/StarknetByExample/blob/dev/.tool-versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea of example or concept to showcase | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the concept/idea you would like to see** | ||
|
||
**Is it a new example or a modification/extension of a current one** | ||
If you consider editing some content, explain exactly why and what. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
scarb 2.8.2 | ||
starknet-foundry 0.30.0 | ||
scarb 2.9.2 | ||
starknet-foundry 0.35.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { useEffect, useState } from "react"; | ||
import { useTheme } from "./useTheme"; | ||
|
||
export const ThemeImage = ({ | ||
light, | ||
dark, | ||
alt, | ||
...props | ||
}: { | ||
light: string; | ||
dark: string; | ||
alt: string; | ||
[key: string]: any; | ||
}) => { | ||
const [mounted, setMounted] = useState(false); | ||
const theme = useTheme(); | ||
|
||
useEffect(() => { | ||
setMounted(true); | ||
}, []); | ||
if (!mounted) { | ||
return <img src={light} alt={alt} {...props} />; | ||
} | ||
|
||
// Client-side rendering after hydrating | ||
return <img src={theme === "light" ? light : dark} alt={alt} {...props} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { useEffect, useState } from "react"; | ||
|
||
export function useTheme() { | ||
const [theme, setTheme] = useState<"dark" | "light">(() => { | ||
if (typeof window === "undefined") return "light"; | ||
return document.documentElement.classList.contains("dark") | ||
? "dark" | ||
: "light"; | ||
}); | ||
|
||
useEffect(() => { | ||
const handleThemeChange = () => { | ||
const newTheme = document.documentElement.classList.contains("dark") | ||
? "dark" | ||
: "light"; | ||
setTheme(newTheme); | ||
}; | ||
|
||
// Watch for class changes on documentElement | ||
const observer = new MutationObserver(handleThemeChange); | ||
observer.observe(document.documentElement, { | ||
attributes: true, | ||
attributeFilter: ["class"], | ||
}); | ||
|
||
return () => { | ||
observer.disconnect(); | ||
}; | ||
}, []); | ||
|
||
return theme; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.