docs: 🐛 fixe iframe width + bump docusaurus to the latest version

Signed-off-by: jffarge <jeanfrancois.farge@gmail.com>
This commit is contained in:
jffarge 2021-12-09 14:24:19 +01:00
parent d2af60d484
commit 3821d62115
6 changed files with 2335 additions and 3153 deletions

View File

@ -18,8 +18,8 @@
"ci": "start-server-and-test 'yarn start-server' '3000|3001' 'yarn run cypress run'" "ci": "start-server-and-test 'yarn start-server' '3000|3001' 'yarn run cypress run'"
}, },
"dependencies": { "dependencies": {
"@docusaurus/core": "^2.0.0-beta.6", "@docusaurus/core": "^2.0.0-beta.9",
"@docusaurus/preset-classic": "^2.0.0-beta.6", "@docusaurus/preset-classic": "^2.0.0-beta.9",
"@mdx-js/react": "^1.6.21", "@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0", "@svgr/webpack": "^5.5.0",
"amplitude-js": "^8.13.0", "amplitude-js": "^8.13.0",
@ -28,6 +28,7 @@
"docusaurus2-dotenv": "^1.4.0", "docusaurus2-dotenv": "^1.4.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"querystringify": "^2.2.0",
"react": "^17.0.1", "react": "^17.0.1",
"react-dom": "^17.0.1", "react-dom": "^17.0.1",
"react-social-login-buttons": "^3.6.0", "react-social-login-buttons": "^3.6.0",

View File

@ -241,8 +241,8 @@ h1[class^="h1Heading"] {
} }
/* navbar */ /* navbar */
.navbar__brand { .navbar__brand .navbar__logo {
height: 3rem; height: 5rem;
@include desktop { @include desktop {
height: var(--ifm-navbar-height); height: var(--ifm-navbar-height);
} }
@ -268,12 +268,6 @@ h1[class^="h1Heading"] {
padding: 1rem; padding: 1rem;
} }
.navbar__logo {
@include tablet {
height: auto;
}
}
.react-toggle { .react-toggle {
margin: 0 0.75rem; margin: 0 0.75rem;
} }
@ -339,7 +333,7 @@ a[class^="sidebarLogo"] {
main[class^="docMainContainer"] { main[class^="docMainContainer"] {
background: #ffffff; background: #ffffff;
padding: 2rem 2rem 2rem 4rem; padding: 2rem 2rem 2rem 5rem;
@include tablet { @include tablet {
padding: 2rem; padding: 2rem;
@ -349,11 +343,6 @@ main[class^="docMainContainer"] {
background: var(--ifm-color-primary-dark); background: var(--ifm-color-primary-dark);
color: var(--ifm-color-primary-light); color: var(--ifm-color-primary-light);
} }
.docItemContainer_node_modules-\@docusaurus-theme-classic-lib-next-theme-DocItem-styles-module {
max-width: 940px !important;
margin: auto;
}
} }
/* table-of-contents */ /* table-of-contents */
@ -427,6 +416,9 @@ button[class^="copyButton"] {
&:focus svg path + path { &:focus svg path + path {
fill: var(--ifm-color-primary-dark); fill: var(--ifm-color-primary-dark);
} }
&::before {
display: none;
}
} }
/* menu */ /* menu */
@ -484,6 +476,7 @@ button[class^="copyButton"] {
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
line-height: 1; line-height: 1;
position: relative;
} }
& + .menu__list & { & + .menu__list & {

View File

@ -4,8 +4,6 @@
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
/* eslint-disable jsx-a11y/anchor-has-content, jsx-a11y/anchor-is-valid */
import React from 'react'; import React from 'react';
import clsx from 'clsx'; import clsx from 'clsx';
import {translate} from '@docusaurus/Translate'; import {translate} from '@docusaurus/Translate';
@ -38,18 +36,16 @@ const createAnchorHeading = (Tag) =>
} }
return ( return (
<Tag {...props}> <Tag
<a {...props}
aria-hidden="true" className={clsx('anchor', {
tabIndex={-1}
className={clsx('anchor', `anchor__${Tag}`, {
[styles.anchorWithHideOnScrollNavbar]: hideOnScroll, [styles.anchorWithHideOnScrollNavbar]: hideOnScroll,
[styles.anchorWithStickyNavbar]: !hideOnScroll, [styles.anchorWithStickyNavbar]: !hideOnScroll,
})} })}
id={id} id={id}>
/>
{props.children} {props.children}
<a <a
aria-hidden="true"
className="hash-link" className="hash-link"
href={`#${id}`} href={`#${id}`}
title={translate({ title={translate({

View File

@ -5,18 +5,16 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
.anchor {
display: block;
position: relative;
top: -0.5rem;
}
.hash-link { .hash-link {
opacity: 0; opacity: 0;
padding-left: 0.5rem; padding-left: 0.5rem;
transition: opacity var(--ifm-transition-fast); transition: opacity var(--ifm-transition-fast);
} }
.hash-link:before {
content: '#';
}
.hash-link:focus, .hash-link:focus,
*:hover > .hash-link { *:hover > .hash-link {
opacity: 1; opacity: 1;

View File

@ -12,7 +12,6 @@ See https://twitter.com/JoshWComeau/status/1332015868725891076
*/ */
.anchorWithStickyNavbar { .anchorWithStickyNavbar {
scroll-margin-top: calc(var(--ifm-navbar-height) + 0.5rem); scroll-margin-top: calc(var(--ifm-navbar-height) + 0.5rem);
/* top: calc(var(--ifm-navbar-height) * -1 - 0.5rem); */
} }
.anchorWithHideOnScrollNavbar { .anchorWithHideOnScrollNavbar {

File diff suppressed because it is too large Load Diff