-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds basic doge coponents landing page
- Loading branch information
1 parent
07fcae5
commit 06cf15a
Showing
8 changed files
with
169 additions
and
113 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,26 @@ | ||
#!/bin/bash | ||
|
||
# Find all component demo directories. | ||
DEMO_DIRS=$(find src/components -type d -name "demo") | ||
|
||
# Collect every component demo directory | ||
# Copy it to /dist/<component>/demo | ||
for demo_dir in $DEMO_DIRS | ||
do | ||
component_dirname=$(basename "$(dirname "$demo_dir")") | ||
echo "DEMO Dir: $component_dirname" | ||
mkdir -p "dist/$component_dirname" | ||
cp -R "src/components/$component_dirname/demo/." "dist/$component_dirname/." | ||
|
||
# Append component name to COMPONENTS_JSON | ||
COMPONENTS_JSON+="\"$component_dirname\": {}," | ||
done | ||
|
||
# Remove trailing comma from COMPONENTS_JSON | ||
COMPONENTS_JSON=${COMPONENTS_JSON%,} | ||
|
||
# Create the final JSON object | ||
COMPONENTS_JSON="{\"components\": {$COMPONENTS_JSON}}" | ||
|
||
# Write the JSON object to manifest.json | ||
echo "$COMPONENTS_JSON" > "dist/manifest.json" |
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
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,92 @@ | ||
html { font-family: sans-serif } | ||
* { | ||
box-sizing: border-box; | ||
} | ||
h1, h2, h3, h4, h5 { | ||
font-family: var(--doge-font-fancy); | ||
} | ||
.page { | ||
width: 600px; | ||
margin: 0px 0px; | ||
padding: 20px; | ||
} | ||
header { | ||
margin-bottom: 50px; | ||
} | ||
|
||
a.yellow { | ||
color: #de9a1e; | ||
} | ||
a.yellow:hover { | ||
color: #ffc107; | ||
} | ||
|
||
.mono { | ||
font-family: monospace; | ||
} | ||
|
||
.small { | ||
font-size: .8rem; | ||
} | ||
|
||
h1 { | ||
margin-bottom: 20px; | ||
} | ||
.sans { | ||
font-family: sans-serif; | ||
} | ||
.comic { | ||
font-family: var(--doge-font-fancy); | ||
} | ||
p { line-height: 1.2 } | ||
.soft { | ||
color: #ccc; | ||
} | ||
section { | ||
margin-bottom: 4em; | ||
} | ||
hr { | ||
transform: rotateZ(0.5deg); | ||
border-bottom: none; | ||
border-top: 1px solid #333; | ||
margin-top: 1em; | ||
} | ||
table { | ||
border-collapse: collapse; | ||
} | ||
table tr { | ||
border-bottom: 1px solid #ccc; | ||
} | ||
table tr th { | ||
font-family: var(--doge-font-fancy); | ||
font-size: 1.1rem; | ||
padding: 1rem 1rem; | ||
text-align: left; | ||
} | ||
table tr td { | ||
padding: 1rem 1rem; | ||
text-align: left; | ||
} | ||
code { | ||
display: inline-block; | ||
margin-top: 5px; | ||
margin-bottom: 5px; | ||
font-size: 0.9rem; | ||
background-color: #f3f3f4; | ||
} | ||
code.nowrap { | ||
white-space: nowrap; | ||
} | ||
table.props-list tr td:first-child code { | ||
font-family: monospace; | ||
background-color: #e6e6e7; | ||
} | ||
|
||
footer { | ||
margin: 0 auto; | ||
width: 100%; | ||
position: fixed; | ||
bottom: 0px; | ||
padding: 10px 20px; | ||
text-align: center; | ||
} |
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,10 +1,45 @@ | ||
<html> | ||
<head> | ||
<title id="title">Doge Components</title> | ||
</head> | ||
<body> | ||
<h1>Placeholder</h1> | ||
<h3>Landing page for fetch.dogecoin.org</h3> | ||
<p>The purpose of this static page is to introduce and promote the Doge Components and lead people to the docs for more info.</p> | ||
</body> | ||
<head> | ||
<title id="title">Doge Components</title> | ||
<link rel="stylesheet" href="index.css" /> | ||
<link rel="stylesheet" href="resources/css/doge-components.css" /> | ||
</head> | ||
<body> | ||
|
||
<div class="page"> | ||
<header> | ||
<h1><span class="sans"><doge> </span><span class="soft comic">components</span></h1> | ||
</header> | ||
|
||
<section> | ||
<h2>Purpose</h2> | ||
<hr /> | ||
<p>Reusable web components for Doge things.</p> | ||
</section> | ||
<section> | ||
<h2>Components</h2> | ||
<hr /> | ||
<ul></ul> | ||
</section> | ||
<script> | ||
fetch('manifest.json') | ||
.then(response => response.json()) | ||
.then(data => { | ||
const components = data.components; | ||
const ul = document.querySelector('ul'); | ||
|
||
for (const component in components) { | ||
const li = document.createElement('li'); | ||
const anchor = document.createElement('a'); | ||
anchor.href = component; | ||
anchor.innerText = component; | ||
li.appendChild(anchor); | ||
ul.appendChild(li); | ||
} | ||
}) | ||
.catch(error => { | ||
console.error(error); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
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 @@ | ||
{"components": {"doge-qr": {}}} |