summaryrefslogtreecommitdiff
path: root/docs/src/components/Examples/CardButtons.astro
diff options
context:
space:
mode:
authorGravatar aFuzzyBear <drgaud@hotmail.com> 2021-08-10 01:24:25 +0100
committerGravatar Fred K. Schott <fkschott@gmail.com> 2021-09-06 01:21:39 -0700
commitd321d8366b597e46ff8e3fc63d17622a9297505c (patch)
tree339775403be469fdc9c53c4f9484c8ba7c23811a /docs/src/components/Examples/CardButtons.astro
parente686c3c50469d18db93da7ce79ddcac8659c3166 (diff)
downloadastro-d321d8366b597e46ff8e3fc63d17622a9297505c.tar.gz
astro-d321d8366b597e46ff8e3fc63d17622a9297505c.tar.zst
astro-d321d8366b597e46ff8e3fc63d17622a9297505c.zip
Adds examples page
Diffstat (limited to 'docs/src/components/Examples/CardButtons.astro')
-rw-r--r--docs/src/components/Examples/CardButtons.astro37
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/src/components/Examples/CardButtons.astro b/docs/src/components/Examples/CardButtons.astro
new file mode 100644
index 000000000..f7393df42
--- /dev/null
+++ b/docs/src/components/Examples/CardButtons.astro
@@ -0,0 +1,37 @@
+---
+ export interface Props{
+ dir:string
+ }
+const {dir} = Astro.props
+const icons = [
+ <svg id="terminal" class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
+ </svg>,
+ <svg id="codeBrowser"xmlns="http://www.w3.org/2000/svg" viewBox="0 -25 424 424">
+ <defs/>
+ <path fill="currentColor" d="M167.3 272.1a7 7 0 01-4.5-1.6l-45.3-38.6a7 7 0 010-10.7l45.3-38.5a7 7 0 119 10.6l-39 33.3 39 33.2a7 7 0 01-4.5 12.3zm0 0"/>
+ <path fill="currentColor" d="M256.7 272.1c-2 0-4-.8-5.3-2.4a7 7 0 01.8-9.9l39-33.2-39-33.3a7 7 0 019-10.6l45.3 38.5a7 7 0 010 10.7l-45.3 38.6a7 7 0 01-4.5 1.6zm0 0M196 301h-1.5a7 7 0 01-5.4-8.4l28.2-134a7 7 0 0113.7 2.9l-28.2 134a7 7 0 01-6.8 5.6zm0 0"/>
+ <path fill="currentColor" d="M377 374H47c-26 0-47-21-47-47V47C0 21 21 0 47 0h330c26 0 47 21 47 47v280c0 26-21 47-47 47zM47 14a33 33 0 00-33 33v280a33 33 0 0033 33h330a33 33 0 0033-33V47a33 33 0 00-33-33zm0 0"/>
+ <path fill="currentColor" d="M417 112H7a7 7 0 110-14h410a7 7 0 010 14zm0 0M119.6 78.6a22.2 22.2 0 110-44.4 22.2 22.2 0 010 44.4zm0-30.3a8.2 8.2 0 100 16.3 8.2 8.2 0 000-16.3zm0 0M51.5 78.4a22.2 22.2 0 110-44.4 22.2 22.2 0 010 44.4zm0-30.3a8.2 8.2 0 100 16.3 8.2 8.2 0 000-16.3zm0 0M187.7 78.8a22.2 22.2 0 110-44.3 22.2 22.2 0 010 44.3zm0-30.3a8.2 8.2 0 100 16.3 8.2 8.2 0 000-16.3zm0 0"/>
+ </svg>,
+ <svg id="github" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
+ <defs/>
+ <path fill="currentColor" d="M12 .5C5.4.5 0 5.8 0 12.3c0 5.2 3.4 9.6 8.2 11.2.6 0 .8-.3.8-.6v-2c-3.3.7-4-1.6-4-1.6-.6-1.3-1.4-1.7-1.4-1.7-1-.7.1-.7.1-.7C5 16.9 5.6 18 5.6 18c1 1.8 2.8 1.3 3.5 1 0-.8.4-1.3.7-1.6-2.7-.3-5.5-1.3-5.5-5.8 0-1.3.5-2.4 1.3-3.2-.2-.3-.6-1.5 0-3.1 0 0 1-.3 3.4 1.2a11.7 11.7 0 016 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.6.2 2.8 0 3.1.9.8 1.3 1.9 1.3 3.2 0 4.5-2.8 5.5-5.5 5.8.5.3.9 1 .9 2.2v3.2c0 .3.1.7.8.6 4.8-1.6 8.2-6 8.2-11.2C24 5.8 18.6.5 12 .5z"/>
+ </svg>
+ ]
+---
+
+<div class="hotlinks">
+ <button class="hot-btn">
+ <a class="hot-link" href={`https://githubbox.com/snowpackjs/astro/tree/main${dir}`} title="Explore the Code" target="_blank" rel="noopener noreferrer"><i class="hot-icon">{icons[0]}</i></a>
+ </button>
+ <button class="hot-btn">
+ <a class="hot-link" href={`https://github.dev/snowpackjs/astro/tree/main${dir}`} title="View Online Demo" target="_blank" rel="noopener noreferrer"><i class="hot-icon">{icons[1]}</i></a>
+ </button>
+ <button class="hot-btn">
+ <a class="hot-link" href={`https://github.com/snowpackjs/astro/tree/main${dir}`} title={`Visit the Repo`} target="_blank" rel="noopener noreferrer"><i class="hot-icon">{icons[2]}</i></a>
+ </button>
+</div>
+<style lang="scss">
+ @import './card.scss';
+</style> \ No newline at end of file