Testing components module, updated deps, and fixed glossary sidebar

This commit is contained in:
ポール ウェッブ 2018-12-03 15:29:06 -06:00
parent 8609918d95
commit 9e0aa446cb
10 changed files with 64 additions and 317 deletions

View file

@ -49,7 +49,6 @@ if (typeof window !== "undefined") main();
// E X P O R T // E X P O R T
module.exports = exports = main; module.exports = exports = main;
// export default main();

View file

@ -72,7 +72,7 @@ function partialFinder(markdownBody) {
else { else {
const partialFunction = require(path.join(__dirname, "..", `./components/${filename}.js`)); const partialFunction = require(path.join(__dirname, "..", `./components/${filename}.js`));
if (filename === "glossary-toc") markdownBody = markdownBody.replace(partial, partialFunction); if (filename === "glossary-toc") markdownBody = markdownBody.replace(partial, partialFunction.default);
else markdownBody = markdownBody.replace(partial, `</div>${partialFunction.default()}<div class="page__markup">`); else markdownBody = markdownBody.replace(partial, `</div>${partialFunction.default()}<div class="page__markup">`);
} }
} }

View file

@ -51,6 +51,8 @@ h2,
h3, h3,
h4, h4,
h5 { h5 {
font-weight: 600;
.header-anchor { .header-anchor {
display: none; display: none;
} }

View file

@ -1,37 +1,32 @@
@charset "utf-8"; @charset "utf-8";
@import @import "@lbry/components/sass/";
"@lbry/color/lbry-color", @import "init/markdown";
@import "init/extends";
"init/base", @import "type/inter";
"init/mixins",
"init/markdown",
"init/extends",
"type/inter", @import "partials/animation";
@import "partials/ecosystem";
@import "partials/email-subscribe";
@import "partials/feature-links";
@import "partials/flash";
@import "partials/footer";
@import "partials/github-feed";
@import "partials/glossary";
@import "partials/link-grid";
@import "partials/navigation";
@import "partials/mission-statement";
@import "partials/modal";
@import "partials/pre";
"partials/animation", @import "layout";
"partials/ecosystem",
"partials/email-subscribe",
"partials/feature-links",
"partials/flash",
"partials/footer",
"partials/github-feed",
"partials/glossary",
"partials/link-grid",
"partials/navigation",
"partials/mission-statement",
"partials/modal",
"partials/pre",
"layout", @import "pages/api";
@import "pages/contributing";
@import "pages/documentation";
@import "pages/home";
@import "pages/page";
@import "pages/playground";
"pages/api", @import "plugins/prism";
"pages/contributing",
"pages/documentation",
"pages/home",
"pages/page",
"pages/playground",
"plugins/prism"
;

View file

@ -1,190 +0,0 @@
// sass-lint:disable no-important
html {
box-sizing: border-box;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
*,
*::before,
*::after {
margin: 0; padding: 0;
box-sizing: inherit;
outline: 0 !important;
}
a,
area,
button,
[role="button"],
input,
label,
select,
summary,
textarea {
touch-action: manipulation; // Remove touch delay on supported devices
}
a {
color: currentColor;
text-decoration: none;
}
*[readonly] {
cursor: not-allowed;
}
textarea {
&:not([disabled]) {
resize: vertical;
}
&[disabled] {
resize: none;
}
}
button {
&:not(:disabled) {
cursor: pointer;
}
}
button,
input,
select,
textarea {
border: none;
border-radius: 0;
font-family: inherit;
font-size: inherit;
-moz-appearance: none;
-webkit-appearance: none;
&:focus {
outline: none;
}
}
input,
select,
textarea {
background-color: transparent;
}
[type="button"],
[type="submit"] {
cursor: pointer;
}
iframe {
border: none;
}
img {
max-width: 100%;
font-size: 0;
&::after {
width: 100%; height: 100%;
background-color: $lbry-white;
background-image: url("/assets/media/images/missing.png");
background-size: cover;
box-shadow: 0 0 1px 0 rgba($lbry-black, 0.3);
content: "";
display: block;
}
}
@media print {
// Intelligent print styles
pre,
blockquote {
border: 1px solid #999 !important;
page-break-inside: avoid !important;
}
tr,
img {
page-break-inside: avoid !important;
}
img {
max-width: 100% !important;
}
@page {
margin: 0.5cm !important;
}
p,
h2,
h3 {
orphans: 3 !important;
widows: 3 !important;
}
h2,
h3 {
page-break-after: avoid !important;
}
thead {
display: table-header-group !important;
}
// Faster, more stable printing
* {
background: transparent !important;
color: #000 !important;
filter: none !important;
text-shadow: none !important;
}
p {
a {
&[href]::after { // Show hypertext data for links and abbreviations
content: " (" attr(href) ")" !important;
}
&[href^="javascript:"],
&[href^="#"] {
&::after {
content: "" !important;
}
}
}
abbr {
&[title]::after {
content: " (" attr(title) ")" !important;
}
}
a,
abbr {
text-decoration: underline !important;
word-wrap: break-word !important;
}
}
}
input::-moz-focus-inner,
button::-moz-focus-inner {
display: none;
}
// Get rid of yellow autofill background
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px $lbry-white inset !important;
&:focus {
outline: none;
}
}

View file

@ -160,12 +160,19 @@
} }
ol { ol {
padding-left: 0.1rem;
li {
list-style-type: lower-roman; list-style-type: lower-roman;
padding-left: 1.6rem; }
} }
ul { ul {
padding-left: 1.25rem; padding-left: 0.25rem;
li {
list-style-type: disc;
}
} }
img { img {

View file

@ -1,75 +0,0 @@
@mixin center {
align-items: center;
display: inline-flex;
justify-content: center;
}
@mixin clearfix {
clear: both;
content: "";
display: block;
}
@mixin ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@mixin font-mono {
font-family: "Input Mono", "Fira Mono", "Fira Code", "Courier New", monospace;
}
@mixin font-sans {
font-family: "Inter UI", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
@mixin font-serif {
font-family: Georgia, serif;
}
@mixin hide-text {
border: none;
color: transparent;
font: 0 / 0 a;
text-shadow: none;
}
@mixin no-user-select {
user-select: none;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}
@mixin selection($background-color, $text-color) {
&::selection {
background-color: $background-color;
color: $text-color;
text-shadow: none;
}
&::-moz-selection {
background-color: $background-color;
color: $text-color;
text-shadow: none;
}
}
@mixin underline($text-color: $lbry-black, $whitespace-color: #fff) {
@include selection($text-color, $whitespace-color);
background-image: linear-gradient($whitespace-color, $whitespace-color), linear-gradient($whitespace-color, $whitespace-color), linear-gradient($text-color, $text-color);
background-position: 0 88%, 100% 88%, 0 88%;
background-repeat: no-repeat, no-repeat, repeat-x;
background-size: 0.05rem 1px, 0.05rem 1px, 1px 1px;
box-decoration-break: clone;
display: inline;
text-decoration: none;
text-shadow: 0.03rem 0 $whitespace-color, -0.03rem 0 $whitespace-color, 0 0.03rem $whitespace-color, 0 -0.03rem $whitespace-color, 0.06rem 0 $whitespace-color, -0.06rem 0 $whitespace-color, 0.09rem 0 $whitespace-color, -0.09rem 0 $whitespace-color, 0.12rem 0 $whitespace-color, -0.12rem 0 $whitespace-color, 0.15rem 0 $whitespace-color, -0.15rem 0 $whitespace-color;
@-moz-document url-prefix() { // sass-lint:disable-line empty-args
background-position: 0 90%, 100% 90%, 0 90%;
}
}

View file

@ -315,7 +315,10 @@
select, select,
textarea { textarea {
width: 100%; width: 100%;
border-top: none;
border-right: none;
border-bottom: 2px solid; border-bottom: 2px solid;
border-left: none;
&:not(:hover):not(:active) { &:not(:hover):not(:active) {
border-color: $lbry-black; border-color: $lbry-black;

View file

@ -45,9 +45,14 @@ export default (state, emit) => { // eslint-disable-line
// below should be refactored into components // below should be refactored into components
let pageScript = ""; let pageScript = "";
if (partialPath === "glossary") pageScript = "<script>" + fs.readFileSync("./app/components/client/glossary-scripts.js", "utf-8") + "</script>"; if (partialPath === "glossary")
if (partialPath === "overview") pageScript = "<script>" + fs.readFileSync("./app/components/client/ecosystem-scripts.js", "utf-8") + "</script>"; pageScript = "<script>" + fs.readFileSync(`${process.cwd()}/app/components/client/glossary-scripts.js`, "utf-8") + "</script>";
if (partialPath === "playground") pageScript = "<script>" + fs.readFileSync("./app/components/client/playground-scripts.js", "utf-8") + "</script>";
if (partialPath === "overview")
pageScript = "<script>" + fs.readFileSync(`${process.cwd()}/app/components/client/ecosystem-scripts.js`, "utf-8") + "</script>";
if (partialPath === "playground")
pageScript = "<script>" + fs.readFileSync(`${process.cwd()}/app/components/client/playground-scripts.js`, "utf-8") + "</script>";
return html` return html`
<article class="page" itemtype="http://schema.org/BlogPosting"> <article class="page" itemtype="http://schema.org/BlogPosting">

View file

@ -42,23 +42,24 @@
}, },
"description": "Documentation for the LBRY protocol and associated projects", "description": "Documentation for the LBRY protocol and associated projects",
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.1.5", "@babel/cli": "^7.2.0",
"@babel/core": "^7.1.6", "@babel/core": "^7.2.0",
"@babel/plugin-external-helpers": "7.0.0", "@babel/plugin-external-helpers": "7.2.0",
"@babel/plugin-proposal-class-properties": "7.1.0", "@babel/plugin-proposal-class-properties": "7.2.0",
"@babel/plugin-proposal-decorators": "7.1.6", "@babel/plugin-proposal-decorators": "7.2.0",
"@babel/plugin-proposal-export-namespace-from": "7.0.0", "@babel/plugin-proposal-export-namespace-from": "7.2.0",
"@babel/plugin-proposal-function-sent": "7.1.0", "@babel/plugin-proposal-function-sent": "7.2.0",
"@babel/plugin-proposal-json-strings": "7.0.0", "@babel/plugin-proposal-json-strings": "7.2.0",
"@babel/plugin-proposal-numeric-separator": "7.0.0", "@babel/plugin-proposal-numeric-separator": "7.2.0",
"@babel/plugin-proposal-throw-expressions": "7.0.0", "@babel/plugin-proposal-throw-expressions": "7.2.0",
"@babel/plugin-syntax-dynamic-import": "7.0.0", "@babel/plugin-syntax-dynamic-import": "7.2.0",
"@babel/plugin-syntax-import-meta": "7.0.0", "@babel/plugin-syntax-import-meta": "7.2.0",
"@babel/preset-env": "^7.1.6", "@babel/preset-env": "^7.2.0",
"@babel/register": "^7.0.0", "@babel/register": "^7.0.0",
"@inc/eslint-config": "^1.1.2", "@inc/eslint-config": "^1.1.2",
"@inc/sasslint-config": "^1.1.2", "@inc/sasslint-config": "^1.1.2",
"@lbry/color": "^1.0.5", "@lbry/color": "^1.0.5",
"@lbry/components": "^1.3.1",
"eslint": "^5.9.0", "eslint": "^5.9.0",
"husky": "^1.2.0", "husky": "^1.2.0",
"nodemon": "^1.18.7", "nodemon": "^1.18.7",
@ -67,7 +68,7 @@
"sass-lint": "^1.12.1", "sass-lint": "^1.12.1",
"snazzy": "^8.0.0", "snazzy": "^8.0.0",
"standardx": "^3.0.1", "standardx": "^3.0.1",
"updates": "^5.4.2" "updates": "^5.4.3"
}, },
"engines": { "engines": {
"node": "10.2.x" "node": "10.2.x"