Skip to content

Commit

Permalink
Merge pull request #11 from dogeorg/doge-qr-enhancements
Browse files Browse the repository at this point in the history
<doge-qr> enhancements
  • Loading branch information
blendtwenty authored Feb 28, 2024
2 parents 629808b + 568ec8a commit da97238
Show file tree
Hide file tree
Showing 19 changed files with 526 additions and 49 deletions.
15 changes: 13 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ mkdir -p dist
# Find all JavaScript files within src/components directory
JS_FILES=$(find src/components -type f -name "doge-*.js")
CSS_FILES=$(find src/components -type f -name "*initial.css")
DEMO_DIRS==$(find src/components -type d -name "demo")

# For each JS file, copy it to the root for convenient
# consumption from fetch.dogecoin.org/<component>.js
for file in $JS_FILES
do
filename=$(basename "$file")
echo "File: $filename"
echo "JS File: $filename"
cp "$file" "dist/$filename"
done

Expand All @@ -22,11 +23,21 @@ done
# of their webpage, to reduce flash of unstyled content.
for file in $CSS_FILES
do
echo "File: $file"
echo "CSS File: $file"
cat "$file" >> "dist/initial.css"
echo >> "dist/initial.css" #Adds line
done

# 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/"
done

# Write CNAME file
echo "fetch.dogecoin.org" > dist/CNAME
echo "fetch.dogecoin.org" > CNAME
Expand Down
12 changes: 0 additions & 12 deletions example/index.html

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"author": "",
"license": "ISC",
"scripts": {
"dev": "web-dev-server --open example/ --node-resolve --watch",
"dev": "web-dev-server --open / --port 8080 --node-resolve --watch",
"serve": "web-dev-server --root-dir dist --port 9090 --node-resolve --watch --open /",
"test": "web-test-runner \"src/**/test.html\" --node-resolve --playwright --browsers firefox",
"test:watch": "web-test-runner src/**/test.html --node-resolve --watch",
"prepare": "husky"
Expand Down
3 changes: 3 additions & 0 deletions resources/blocks/prism/prism.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions resources/blocks/prism/prism.js

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file added resources/img/qr/much-dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed resources/img/qr/shiba-sm.png
Binary file not shown.
Binary file removed resources/img/qr/shiba-xs.png
Binary file not shown.
File renamed without changes
Binary file added resources/img/qr/such-doge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/img/qr/very-community.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/components/doge-qr/demo/arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/components/doge-qr/demo/dance.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
127 changes: 127 additions & 0 deletions src/components/doge-qr/demo/demo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
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;
}
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;
}

span.note {
display: block;
font-size: 1rem;
margin: 0.5em 0;
}
.container {
margin: 0px auto;
width: 660px;
background-color: #fff;
display: grid;
grid-template-columns: 220px 220px 220px;
grid-row: auto auto;
grid-column-gap: 40px;
grid-row-gap: 0px;

.box {
padding: 15px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: sans-serif;

span {
padding: 10px;
}

.customise-label {
display: inline-block;
margin: 0px;
padding: 0px;
transform: rotateZ(-10deg);
position: relative;
overflow: hidden;
top: 140px;
}
.customise-arrow {
transform: scaleX(-1) rotateZ(40deg);
height: 90px;
position: relative;
top: 160px;
left: 30px;
}
}
}

#CodeContainer .code-toolbar {
display: none;
}

#CodeContainer .code-toolbar:first-child {
display: block;
}

footer {
margin: 0 auto;
width: 100%;
position: fixed;
bottom: 0px;
padding: 10px 20px;
text-align: center;
}
Loading

0 comments on commit da97238

Please sign in to comment.