Skip to content

Commit

Permalink
feat(tooling): section menu, links, blockquotes and content boxes (#1211
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hugomrdias authored Oct 15, 2020
1 parent 2ba3209 commit b3b926b
Show file tree
Hide file tree
Showing 34 changed files with 5,336 additions and 524 deletions.
33 changes: 2 additions & 31 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,13 @@
name: CI
name: CI

on: [push]

jobs:
deploy:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-go@v2
with:
go-version: '1.14'

- uses: actions/setup-node@v2-beta
with:
node-version: '12'

- run: npm install
- run: npm test
- run: npm run build

# Pin the built site to ipfs-cluster, output the cid as `steps.ipfs.outputs.cid`
# see: https://github.com/ipfs-shipyard/ipfs-github-action
- uses: ipfs-shipyard/[email protected]
id: ipfs
with:
path_to_add: public
cluster_host: /dnsaddr/cluster.ipfs.io
cluster_user: ${{ secrets.CLUSTER_USER }}
cluster_password: ${{ secrets.CLUSTER_PASSWORD }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: echo /ipfs/${{ steps.ipfs.outputs.cid }}

# Update the dnslink if changes to the current branch should go live
# see https://github.com/ipfs-shipyard/js-dnslink-dnsimple
- run: npx dnslink-dnsimple --domain spec.filecoin.io --link /ipfs/${{ steps.ipfs.outputs.cid }}
if: github.ref == 'refs/heads/master'
env:
DNSIMPLE_TOKEN: ${{ secrets.DNSIMPLE_TOKEN }}
14 changes: 7 additions & 7 deletions assets/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@
}

.bg-na {
background-color: var(--cl-gray);
background-color: var(--cl-gray) !important;
}
.bg-missing {
background-color: var(--cl-red);
background-color: var(--cl-red) !important;
}
.bg-incorrect {
background-color: var(--cl-orange);
background-color: var(--cl-orange) !important;
}
.bg-wip {
background-color: var(--cl-yellow);
background-color: var(--cl-yellow) !important;
}
.bg-done {
background-color: var(--cl-green);
background-color: var(--cl-green) !important;
}
.bg-reliable {
background-color: var(--cl-green);
background-color: var(--cl-green) !important;
}
.bg-stable {
background-color: var(--cl-blue);
background-color: var(--cl-blue) !important;
a {
color: black;
}
Expand Down
52 changes: 7 additions & 45 deletions assets/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
@import "plugins/meter";
@import "plugins/toc";
@import "plugins/table-sort";
@import "plugins/diagrams";
@import "colors";
@import "dashboard";
@import "katex";
@import "icons";
@import "code";
@import "utils-custom";

input.toggle {
height: 20px;
Expand All @@ -31,7 +33,11 @@ input.toggle {
h4,
h5,
h6 {
a {
display: flex;
align-items: center;
flex-wrap: nowrap;
a:first-child {
flex-grow: 2;
color: inherit;
text-decoration: none;
&:visited {
Expand Down Expand Up @@ -67,50 +73,6 @@ input.toggle {
}
}

// SVG Diagrams
.diagrams-container {
margin: 20px 0px;
border: 1px solid var(--gray-200);
border-radius: $border-radius;
}
.diagrams {
height: 400px;
overflow: hidden;
outline: none;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
}
.diagrams img {
max-height: 100%;
max-width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.diagrams:active {
cursor: grabbing;
}
.diagrams-caption {
border-top: 1px solid #e9ecef;
padding: 0.5rem;
font-size: 12px;
font-weight: 500;
.diagrams-link {
text-decoration: none !important;
float: right;
font-weight: 400;
}
}

.label {
font-size: 10px;
font-weight: 700;
display: block;
color: var(--gray-600);
}

// Tweaks
html {
scroll-behavior: auto;
Expand Down
47 changes: 41 additions & 6 deletions assets/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,42 @@
body {
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
}
/**
* Use the default user interface font in all browsers (opinionated).
*/

code {
font-family: "/*[[font-choice]]*/", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
html {
font-family:
system-ui,
/* macOS 10.11-10.12 */ -apple-system,
/* Windows 6+ */ "Segoe UI",
/* Android 4+ */ "Roboto",
/* Ubuntu 10.10+ */ "Ubuntu",
/* Gnome 3+ */ "Cantarell",
/* KDE Plasma 5+ */ "Noto Sans",
/* fallback */ sans-serif,
/* macOS emoji */ "Apple Color Emoji",
/* Windows emoji */ "Segoe UI Emoji",
/* Windows emoji */ "Segoe UI Symbol",
/* Linux emoji */ "Noto Color Emoji";
}

/**
* Use the default monospace user interface font in all browsers (opinionated).
*/

code,
kbd,
samp,
pre {
font-family:
/* macOS 10.10+ */ "Menlo",
/* Windows 6+ */ "Consolas",
/* Android 4+ */ "Roboto Mono",
/* Ubuntu 10.10+ */ "Ubuntu Monospace",
/* KDE Plasma 5+ */ "Noto Mono",
/* KDE Plasma 4+ */ "Oxygen Mono",
/* Linux/OpenOffice fallback */ "Liberation Mono",
/* fallback */ monospace,
/* macOS emoji */ "Apple Color Emoji",
/* Windows emoji */ "Segoe UI Emoji",
/* Windows emoji */ "Segoe UI Symbol",
/* Linux emoji */ "Noto Color Emoji";
}
31 changes: 18 additions & 13 deletions assets/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,55 @@
box-sizing: border-box;
position: relative;
display: block;
transform: scale(var(--ggs,1));
transform: scale(var(--ggs, 1));
width: 12px;
height: 12px;
box-shadow:
-2px 2px 0 0,
-4px -4px 0 -2px,
4px 4px 0 -2px;
box-shadow: -2px 2px 0 0, -4px -4px 0 -2px, 4px 4px 0 -2px;
margin-left: -2px;
margin-top: 1px
margin-top: 1px;
}
.gg-external::after,
.gg-external::before {
content: "";
display: block;
box-sizing: border-box;
position: absolute;
right: -4px
right: -4px;
}
.gg-external::before {
background: currentColor;
transform: rotate(-45deg);
width: 12px;
height: 2px;
top: 1px
top: 1px;
}
.gg-external::after {
width: 8px;
height: 8px;
border-right: 2px solid;
border-top: 2px solid;
top: -4px
top: -4px;
}


// Modifiers
.gg-s-half {
--ggs: 0.5
--ggs: 0.5;
}


.gg-inline {
display: inline-block;
}

.gg-middle {
vertical-align: middle;
}
}

.icon {
display: inline-block;
width: 1em;
height: 1em;
stroke-width: 0;
stroke: currentColor;
fill: currentColor;
vertical-align: middle;
}
3 changes: 3 additions & 0 deletions assets/_utils-custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.u-VaMiddle {
vertical-align: middle;
}
60 changes: 42 additions & 18 deletions assets/plugins/_bagdes.scss
Original file line number Diff line number Diff line change
@@ -1,24 +1,48 @@
.section-badges {
float: right;
margin-top:-2.5rem;
text-align: right;
font-size: 20px;
position: relative;
}
.state-badge {
font-size: 10px;
font-weight: 500;
.section-badges .toggle {
cursor: pointer;
padding: 8px 0 8px 16px;
}
.state-badge-link {
text-decoration: none !important;
color: white !important;
&:hover {
text-decoration: none;
}

.section-badges .dropdown {
position: absolute;
right: 0;
background-color: white;
border: 1px solid #e9ecef;
padding: 0.75rem 1rem;
list-style-type: none;
margin: 0;
z-index: 10;
display: none;
text-align: left;
font-size: 14px;
font-weight: initial;
line-height: 24px;
max-width: 400px;
}
.state-badge-key, .state-badge-value {
padding: 2px 5px;

.section-badges .dropdown li {
white-space: nowrap;
}
.state-badge-key {
background-color: #555;

.section-badges .dropdown code.label {
max-width: 200px;
white-space: nowrap;
overflow: auto;
display: inline-block;
}
.section-badges .dropdown code.label::-webkit-scrollbar {
width: 3px;
height: 3px;
}
.section-badges .dropdown code.label::-webkit-scrollbar-thumb {
border-radius: 12px;
}

.section-badges input.toggle:checked ~ .dropdown {
display: block;
}
.section-intro .state-badge {
display: none;
}
46 changes: 46 additions & 0 deletions assets/plugins/_diagrams.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

// SVG Diagrams
.diagrams-container {
margin: 20px 0px;
border: 1px solid var(--gray-200);
border-radius: $border-radius;
}
.diagrams {
height: 400px;
overflow: hidden;
outline: none;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
}
.diagrams img {
max-height: 100%;
max-width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.diagrams:active {
cursor: grabbing;
}
.diagrams-caption {
border-bottom: 1px solid #e9ecef;
padding: 0.5rem;
font-size: 12px;
font-weight: 500;
.diagrams-link {
text-decoration: none !important;
float: right;
font-weight: 400;
}
}
.diagrams-container .highlight pre {
margin: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
// margin: 0 -1px;
}
.diagrams-container .embed-comment {
margin: 0.5rem 1rem;
}
Loading

0 comments on commit b3b926b

Please sign in to comment.