docs: swizzle doc page to implement github auth access

Signed-off-by: slumbering <slumbering.pierrot@gmail.com>
This commit is contained in:
slumbering
2021-06-11 12:24:58 +02:00
parent 5a83804cc2
commit 38ee07e5f9
12 changed files with 488 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
import React from "react";
import { GithubLoginButton } from 'react-social-login-buttons';
import style from './DocAuthentication.module.css'
export default function DocAuthentication() {
return (
<div className={style.container}>
<h1 className={style.h1}>Welcome on Dagger documentation</h1>
<p>Please Sign in to Github in order to get access to the doc</p>
<GithubLoginButton className={style.btn__github} onClick={() => window.location.href = `//github.com/login/oauth/authorize?client_id=${process.env.REACT_APP_CLIENT_ID}&scope=user&allow_signup=false`} />
</div>
)
}

View File

@@ -0,0 +1,13 @@
.container {
background: url("/img/Dagger_Website_Space_Uranus.png") no-repeat;
background-size: cover;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.btn__github {
width: 240px !important;
}

View File

@@ -0,0 +1,8 @@
import React from 'react';
import styles from './Spinner.module.css';
export default function Spinner() {
return (
<div className={styles.ellipsis}><div></div><div></div><div></div><div></div></div>
)
}

View File

@@ -0,0 +1,64 @@
.ellipsis {
display: inline-block;
position: absolute;
top: 50vh;
z-index: 99999;
left: 50vw;
transform: translate(-50%, -50%);
width: 80px;
height: 80px;
}
.ellipsis div {
position: absolute;
top: 33px;
width: 13px;
height: 13px;
border-radius: 50%;
background: var(--ifm-color-primary-dark);
animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
html[data-theme="dark"] .ellipsis div {
background: var(--ifm-color-primary-light);
}
.ellipsis div:nth-child(1) {
left: 8px;
animation: lds-ellipsis1 0.6s infinite;
}
.ellipsis div:nth-child(2) {
left: 8px;
animation: lds-ellipsis2 0.6s infinite;
}
.ellipsis div:nth-child(3) {
left: 32px;
animation: lds-ellipsis2 0.6s infinite;
}
.ellipsis div:nth-child(4) {
left: 56px;
animation: lds-ellipsis3 0.6s infinite;
}
@keyframes lds-ellipsis1 {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@keyframes lds-ellipsis3 {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
@keyframes lds-ellipsis2 {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(24px, 0);
}
}