-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update README and optimise docs experience
- Loading branch information
Showing
14 changed files
with
194 additions
and
111 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
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,30 @@ | ||
.examples { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 2rem; | ||
} | ||
|
||
.app-container { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.5rem; | ||
} | ||
|
||
.window { | ||
width: 100%; | ||
height: 100%; | ||
aspect-ratio: 16/9; | ||
border-radius: 0.375rem; | ||
border: none; | ||
background: black; | ||
} | ||
|
||
.app button { | ||
outline: none; | ||
border: none; | ||
color: white; | ||
background: var(--gray-900); | ||
border-radius: 0.25rem; | ||
padding: 0.5rem 1rem; | ||
cursor: pointer; | ||
} |
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,42 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
a { | ||
color: blue; | ||
} | ||
|
||
:root { | ||
--gray-100: #f3f4f6; | ||
--gray-200: #f3f4f6; | ||
--gray-300: #d1d5db; | ||
--gray-400: #d1d5db; | ||
--gray-500: #6b7280; | ||
--gray-600: #4b5563; | ||
--gray-700: #374151; | ||
--gray-800: #1f2937; | ||
--gray-900: #111827; | ||
} | ||
|
||
body { | ||
font-family: monospace; | ||
font-size: 16px; | ||
|
||
min-height: 100vh; | ||
min-height: 100avh; | ||
|
||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 1rem; | ||
|
||
padding: 1rem; | ||
} | ||
|
||
@media (max-width: 600px) { | ||
body { | ||
padding: 0.5rem; | ||
} | ||
} |
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
File renamed without changes
File renamed without changes
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,50 @@ | ||
const apps = [ | ||
{ | ||
name: "youtube", | ||
style: "aspect-ratio: 16/9", | ||
url: "https://www.youtube.com/embed/EngW7tLk6R8", | ||
}, | ||
{ | ||
name: "bilibili", | ||
style: "aspect-ratio: 16/9", | ||
url: "https://player.bilibili.com/player.html?bvid=BV1uT4y1P7CX&danmaku=0", | ||
}, | ||
{ | ||
name: "codesandbox", | ||
style: "aspect-ratio: 16/9", | ||
url: "https://codesandbox.io/embed/ke8wx?&theme=dark", | ||
}, | ||
{ | ||
name: "stackblitz", | ||
style: "aspect-ratio: 16/9", | ||
url: "https://stackblitz.com/edit/vitejs-vite-y8mdxg?embed=1&theme=dark&view=preview", | ||
}, | ||
{ | ||
name: "codepen", | ||
style: "height: 600px;", | ||
url: "https://codepen.io/MR-Addict/embed/NWBOqKw?default-tab=result&theme-id=dark", | ||
}, | ||
]; | ||
|
||
const buttons = document.querySelectorAll(".app button"); | ||
buttons.forEach((button) => { | ||
button.addEventListener("click", () => { | ||
const container = button.parentNode; | ||
|
||
if (container.getAttribute("data-third-part") === null) container.querySelector("div").style = ""; | ||
else { | ||
// get app | ||
const app = apps.find((app) => app.name === container.getAttribute("data-app")); | ||
// create iframe | ||
const iframe = document.createElement("iframe"); | ||
iframe.src = app.url; | ||
iframe.allowFullscreen = true; | ||
iframe.style = app.style; | ||
iframe.classList.add("window"); | ||
// append iframe | ||
container.appendChild(iframe); | ||
} | ||
// remove button | ||
button.remove(); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<iframe | ||
allowfullscreen | ||
loading="lazy" | ||
name="Bilibili" | ||
name="bilibili" | ||
src="https://player.bilibili.com/player.html?bvid={id}&danmaku=0" | ||
style="width: 100%; height: 100%; border: none; aspect-ratio: 16/9; border-radius: 0.375rem" | ||
></iframe> |
Oops, something went wrong.