Revert "doc/website: migrate to docusaurus v2 (#1382)" (#1383)

This reverts commit 21c3fa83fc.
This commit is contained in:
Ariel Mashraki
2021-03-24 21:18:44 +02:00
committed by GitHub
parent 21c3fa83fc
commit 3773738fd5
43 changed files with 654 additions and 768 deletions

View File

@@ -1,39 +0,0 @@
/* "Copy" code block button */
pre {
position: relative;
}
pre .btnIcon {
position: absolute;
top: 4px;
z-index: 2;
cursor: pointer;
border: 1px solid transparent;
padding: 0;
color: #fff;
background-color: transparent;
height: 30px;
transition: all .25s ease-out;
}
pre .btnIcon:hover {
text-decoration: none;
}
.btnIcon__body {
align-items: center;
display: flex;
}
.btnIcon svg {
fill: currentColor;
margin-right: .4em;
}
.btnIcon__label {
font-size: 11px;
}
.btnClipboard {
right: 10px;
}

View File

@@ -1,785 +0,0 @@
/*
Copyright 2019-present Facebook Inc. All rights reserved.
This source code is licensed under the Apache 2.0 license found
in the LICENSE file in the root directory of this source tree.
*/
@font-face {
font-family: 'Calibre Medium';
font-style: normal;
font-weight: normal;
src: local('Calibre Medium'), url('../font/CalibreMedium.woff') format('woff');
}
@font-face {
font-family: 'Calibre Light';
font-style: normal;
font-weight: normal;
src: local('Calibre Light'), url('../font/CalibreLight.woff') format('woff');
}
@font-face {
font-family: 'Calibre Regular';
font-style: normal;
font-weight: normal;
src: local('Calibre Regular'),
url('../font/CalibreRegular.woff') format('woff');
}
@font-face {
font-family: 'Calibre Thin';
font-style: normal;
font-weight: normal;
src: local('Calibre Thin'), url('../font/CalibreThin.woff') format('woff');
}
@font-face {
font-family: 'Calibre Thin Italic';
font-style: normal;
font-weight: normal;
src: local('Calibre Thin Italic'),
url('../font/CalibreThinItalic.woff') format('woff');
}
@font-face {
font-family: 'Calibre Light Italic';
font-style: normal;
font-weight: normal;
src: local('Calibre Light Italic'),
url('../font/CalibreLightItalic.woff') format('woff');
}
@font-face {
font-family: 'Calibre Semibold';
font-style: normal;
font-weight: normal;
src: local('Calibre Semibold'),
url('../font/CalibreSemibold.woff') format('woff');
}
@font-face {
font-family: 'Calibre Bold';
font-style: normal;
font-weight: normal;
src: local('Calibre Bold'), url('../font/CalibreBold.woff') format('woff');
}
@font-face {
font-family: 'Calibre Medium Italic';
font-style: normal;
font-weight: normal;
src: local('Calibre Medium Italic'),
url('../font/CalibreMediumItalic.woff') format('woff');
}
@font-face {
font-family: 'Calibre Regular Italic';
font-style: normal;
font-weight: normal;
src: local('Calibre Regular Italic'),
url('../font/CalibreRegularItalic.woff') format('woff');
}
@media only screen and (min-device-width: 360px) and (max-device-width: 736px) {
}
@media only screen and (min-width: 1024px) {
}
@media only screen and (max-width: 1023px) {
.docsNavContainer {
position: absolute;
}
.home-nav {
padding-top: 40px!important;
}
}
@media only screen and (min-width: 1400px) {
}
@media only screen and (max-width: 800px) {
.gopherGraph {
margin-top: 25px;
display: block!important;
}
.features {
margin: 60px auto 0 !important;
}
}
@media only screen and (max-width: 400px) {
.gopherGraph {
margin-top: 40px;
}
.features {
margin: 30px auto 0!important;
}
.home-nav {
padding-right: 5% !important;
}
}
@media only screen and (max-width: 320px) {
.gettingStartedText {
font-size: 22px!important;
}
}
.section_index {
background: #3d3e3f;
}
body.blog {
background: white;
}
.sideNavVisible {
background: white;
}
.fixedHeaderContainer {
background: #3d3e3f;
}
.blog .fixedHeaderContainer,
.sideNavVisible .fixedHeaderContainer {
background: white;
max-width: 1400px;
margin: 0 auto;
}
.blog .wrapper {
max-width: 1400px;
}
.sideNavVisible.navigationSlider .slidingNav ul {
background: white;
}
.blog .slidingNav ul li a,
.sideNavVisible .navigationSlider .slidingNav ul li a {
color: #3d3e3f !important;
}
.navigationSlider .slidingNav ul li > a:focus,
.navigationSlider .slidingNav ul li > a:hover,
.navigationSlider .slidingNav ul li.siteNavItemActive > a,
.navigationSlider .slidingNav ul li.siteNavGroupActive > a {
background-color: transparent;
}
.imageAlignTop .blockImage {
max-width: 100%;
}
.projectTitleContainer {
display: flex;
flex-direction: row;
justify-content: left;
}
.projectTitleContainer img {
width: 109px;
height: 44px;
}
.projectDesc {
font-family: 'Calibre Light Italic', sans-serif;
font-size: 26px;
line-height: 34px;
color: white;
text-align: left;
margin-left: 5px;
margin-bottom: 19px;
}
@media only screen and (min-width: 480px) {
.projectTitle {
margin: 0;
}
}
.features {
display: flex;
justify-content: space-between;
flex-direction: row;
margin: 100px auto 0;
}
.block {
width: 320px;
}
.navigationSlider .slidingNav ul li a {
height: 22px;
}
.block .blockTitle {
font-family: 'Calibre Light Italic', sans-serif;
line-height: 26px;
font-size: 23px;
color: #ffe800;
margin-bottom: 10px;
display: inline-block;
}
.blockContent {
font-family: 'Calibre Thin', sans-serif;
font-size: 22px;
line-height: 26px;
color: white;
}
.gettingStartedButton {
display: inline-block;
border-radius: 31px;
padding: 11px 15px 5px 22px;
background-image: linear-gradient(to right, #85c3e1, #29bbaf);
}
.gettingStartedText {
font-family: 'Calibre Regular', sans-serif;
letter-spacing: 0.03mm;
font-size: 27px;
color: white;
line-height: 35px;
}
.gettingStartedButtonArrow {
font-family: 'Calibre Medium', sans-serif;
line-height: 35px;
font-size: 35px;
color: white;
margin-top: 7px;
margin-left: 9px;
}
.homeContainer {
text-align: left;
}
.gettingStartedButtonText {
display: flex;
flex-direction: row;
align-items: center;
}
.projectTitle p {
display: inline-block;
color: white;
font-family: 'Calibre Medium', sans-serif;
font-size: 56px;
margin-left: 15px;
margin-bottom: 8px;
line-height: 1em;
}
.navigationSlider .slidingNav ul li {
min-width: 124px;
text-align: left;
display: flex;
justify-content: flex-start;
}
.navigationSlider .slidingNav ul li a {
color: white;
font-family: 'Calibre Thin', sans-serif;
font-size: 22px;
padding: 0;
}
.home-nav li a:hover {
text-decoration: none;
font-family: Calibre Light,sans-serif;
}
.navigationSlider .slidingNav ul li a:hover {
background-color: transparent;
font-family: 'Calibre Light', sans-serif;
}
.headerWrapper.wrapper {
padding: 0;
}
body .homeContainer .homeWrapper {
padding-left: 0;
padding-right: 0;
}
.button {
border: 1px solid #4d8eaa;
}
.button:hover {
background: #48849e;
}
.homeContainer .homeWrapper {
padding: 3em 10px 0 10px;
}
#er-linked-list,
#er-user-spouse,
#er-tree,
#er-following-followers,
#er-user-friends,
#er-city-streets {
height: 230px;
}
@media only screen and (max-width: 1500px) {
.gridBlock .twoByGridBlock img,
.gridBlock .threeByGridBlock img,
.gridBlock .fourByGridBlock img {
max-height: 136px;
}
}
@media only screen and (min-width: 1500px) {
.gridBlock .twoByGridBlock img,
.gridBlock .threeByGridBlock img,
.gridBlock .fourByGridBlock img {
max-height: 180px;
}
}
@media only screen and (max-width: 1126px) {
.gridBlock .twoByGridBlock img,
.gridBlock .threeByGridBlock img,
.gridBlock .fourByGridBlock img {
max-height: 122px;
}
}
@media only screen and (max-width: 1023px) {
.gridBlock .twoByGridBlock img,
.gridBlock .threeByGridBlock img,
.gridBlock .fourByGridBlock img {
max-height: 104px;
}
body .wrapper.homeWrapper {
display: flex;
justify-content: center;
}
.fixedHeaderContainer {
position: initial;
}
.headerWrapper.wrapper {
align-items: center;
justify-content: flex-start;
}
.navPusher {
padding-top: 0;
position: relative;
}
.features {
flex-direction: column;
}
.block {
margin-top: 20px;
width: 80%;
}
.projectTitleContainer {
flex-direction: column;
}
.projectTitle p {
margin-left: 0;
margin-top: 20px;
}
.homeContainer {
margin-bottom: 50px;
}
.fixedHeaderContainer {
margin-top: 0 !important;
overflow-x: hidden;
}
.blog .fixedHeaderContainer,
.sideNavVisible.separateOnPageNav .fixedHeaderContainer {
width: 100vw;
}
.home-nav li {
min-width: 100px!important;
}
.projectTitle {
line-height: 1.3em;
}
}
@media only screen and (max-width: 880px) {
.gridBlock .twoByGridBlock img,
.gridBlock .threeByGridBlock img,
.gridBlock .fourByGridBlock img {
max-height: 85px;
}
}
@media only screen and (max-width: 720px) {
.home-nav .header-godoc-link {
display: none;
}
.home-nav li {
min-width: 0!important;
padding-right: 25px;
}
}
@media only screen and (max-width: 500px) {
.blog .headerWrapper.wrapper header > a,
.sideNavVisible .headerWrapper.wrapper header > a {
display: none!important;
}
.navigationSlider .slidingNav ul li {
min-width: 0!important;
}
.navigationSlider .slidingNav ul li a {
padding-right: 30px!important;
}
.home-nav li {
min-width: 0!important;
padding-right: 25px;
}
}
@media only screen and (max-width: 996px) {
.row .col.col.col {
padding: 0 15% 20px;
}
}
body,
html {
margin: 0;
padding: 0;
width: 100%;
}
.gopherGraph {
display: flex;
justify-content: flex-end;
}
.wrapper.homeWrapper {
display: block !important;
}
/*
Home Page
*/
.fixedHeaderContainer a {
display: none;
}
.fixedHeaderContainer {
position: relative;
margin-top: 100px;
padding: 0 15%;
}
.navigationSlider .slidingNav {
position: relative;
}
header > .navigationSlider {
margin-left: 0;
font-size: 20px;
}
/*
Docs Page
*/
.blog > .navigationSlider,
.sideNavVisible header > .navigationSlider {
margin-left: 0;
}
.blog > .fixedHeaderContainer a,
.sideNavVisible .fixedHeaderContainer a {
display: flex !important;
}
.blog .navigationSlider .slidingNav,
.sideNavVisible .navigationSlider .slidingNav {
position: relative;
}
.blog .fixedHeaderContainer,
.sideNavVisible .fixedHeaderContainer {
display: flex;
align-items: center;
margin-top: 0;
padding: 0;
}
.blog .navigationWrapper.navigationSlider,
.sideNavVisible .navigationWrapper.navigationSlider {
align-self: flex-end;
align-items: center;
display: flex;
}
li.navSearchWrapper.reactNavSearchWrapper {
display: none!important;
}
@media only screen and (min-width: 1024px) {
.navigationSlider {
height: 12px;
}
/* show search in only in doc pages */
.sideNavVisible.separateOnPageNav li.navSearchWrapper.reactNavSearchWrapper {
display: inline-block!important;
}
.navSearchWrapper {
top: -10px;
}
.navigationSlider .slidingNav .navSearchWrapper .algolia-docsearch-footer a {
height: auto;
color: transparent!important;
right: 0;
position: absolute;
}
.algolia-docsearch-footer {
position: relative;
height: 20px;
}
}
.blog .headerWrapper.wrapper,
.sideNavVisible .headerWrapper.wrapper {
width: 100vw;
margin: 0 20px;
}
.fixedHeaderContainer header img {
margin-right: 10px;
padding: 10px 10px 10px 0;
max-width: none;
}
.navigationSlider .slidingNav ul {
background: transparent;
}
.blog .navigationSlider .slidingNav ul,
.sideNavVisible .navigationSlider .slidingNav ul {
background: white;
margin-top: 0;
}
header ul, ol {
margin-bottom: 0;
}
@media only screen and (min-width: 1425px) {
.homeContainer {
padding: 0 19% 0px;
}
.fixedHeaderContainer {
margin: 100px auto 0 auto;
width: 1100px;
padding: 0 0;
}
}
@media only screen and (min-width: 1000px) {
.blog .fixedHeaderContainer,
.sideNavVisible.separateOnPageNav .fixedHeaderContainer {
margin-top: 35px;
width: 100vw;
}
}
.blog .slidingNav ul li a,
.sideNavVisible .navigationSlider .slidingNav ul li a {
font-family: 'Calibre Light', sans-serif;
}
.yellowArrow {
display: inline-block;
font-family: 'Calibre Light', sans-serif;
height: 26px;
position: relative;
top: 4px;
left: 5px;
font-size: 30px;
color: #ffe800;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.yellowArrow:hover {
color: #ffe800;
-webkit-transform: translateX(5px);
-moz-transform: translateX(5px);
-ms-transform: translateX(5px);
-o-transform: translateX(5px);
transform: translateX(5px);
}
.blockTitleText {
display: inline;
color: #ffe800;
}
.footer .sitemap {
max-width: 1100px;
font-family: 'Calibre Light', sans-serif;
font-size: 18px;
}
.footer .copyright {
margin: 0 auto 10px;
}
input#search_input_react {
color: #3d3e3f;
background: white;
border: 1px solid #3d3e3f;
}
input#search_input_react:focus, input#search_input_react:active {
color: #3d3e3f;
}
input#search_input_react::placeholder {
color: #cccccc;
}
img#tutorial-todo-create {
width: 600px;
}
.footer {
background: #20232a;
}
.footer h4.footer__title {
color: #fff;
}
.section_index .navbar {
background: #3d3e3f;
}
.section_index .navbar__brand {
display: none;
}
.section_index .navbar__link {
color: #fff;
}
.section_index .DocSearch-Button {
display: none;
}
.footer__copyright {
color: hsla(0,0%,100%,.4);
}
.homeContainer {
padding: 0 15% 20px;
}
.home-nav {
background: #3d3e3f;
margin: 0;
padding: 0 15% 20px;
padding-top: 110px;
}
.home-nav li{
list-style: none;
float: left;
min-width: 125px;
}
.home-nav li a {
color: #fff;
font-family: Calibre Thin,sans-serif;
font-size: 22px;
padding: 0;
}
.gettingStartedButton a:hover, .features a:hover, .footer a:hover, .blog-wrapper h2 a {
text-decoration: none;
}
.footer__copyright {
font-size: 13px;
}
article iframe, article p img {
display: block;
margin-left: auto;
margin-right: auto;
max-width: 100%;
}
/* Override the default prism theme. */
span.token.keyword {
color: rgb(199, 146, 234);
}
span.token.punctuation {
color: rgb(191, 199, 213)!important;
}
.header-github-link:hover {
opacity: 0.6;
}
.header-github-link:before {
content: '';
width: 24px;
height: 24px;
display: flex;
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
no-repeat;
}
html[data-theme='dark'] .header-github-link:before {
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
no-repeat;
}
.header-twitter-link:before {
content: '';
width: 24px;
height: 24px;
display: flex;
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z'/%3E%3C/svg%3E")
no-repeat;
}
html[data-theme='dark'] .header-twitter-link:before {
content: '';
width: 24px;
height: 24px;
display: flex;
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z'/%3E%3C/svg%3E")
no-repeat;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -1,47 +0,0 @@
// Turn off ESLint for this file because it's sent down to users as-is.
/* eslint-disable */
window.addEventListener('load', function() {
function button(label, ariaLabel, icon, className) {
const btn = document.createElement('button');
btn.classList.add('btnIcon', className);
btn.setAttribute('type', 'button');
btn.setAttribute('aria-label', ariaLabel);
btn.innerHTML =
'<div class="btnIcon__body">' +
icon +
'<strong class="btnIcon__label">' +
label +
'</strong>' +
'</div>';
return btn;
}
function addButtons(codeBlockSelector, btn) {
document.querySelectorAll(codeBlockSelector).forEach(function(code) {
code.parentNode.appendChild(btn.cloneNode(true));
});
}
const copyIcon =
'<svg width="12" height="12" viewBox="340 364 14 15" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M342 375.974h4v.998h-4v-.998zm5-5.987h-5v.998h5v-.998zm2 2.994v-1.995l-3 2.993 3 2.994v-1.996h5v-1.995h-5zm-4.5-.997H342v.998h2.5v-.997zm-2.5 2.993h2.5v-.998H342v.998zm9 .998h1v1.996c-.016.28-.11.514-.297.702-.187.187-.422.28-.703.296h-10c-.547 0-1-.452-1-.998v-10.976c0-.546.453-.998 1-.998h3c0-1.107.89-1.996 2-1.996 1.11 0 2 .89 2 1.996h3c.547 0 1 .452 1 .998v4.99h-1v-2.995h-10v8.98h10v-1.996zm-9-7.983h8c0-.544-.453-.996-1-.996h-1c-.547 0-1-.453-1-.998 0-.546-.453-.998-1-.998-.547 0-1 .452-1 .998 0 .545-.453.998-1 .998h-1c-.547 0-1 .452-1 .997z" fill-rule="evenodd"/></svg>';
addButtons(
'.hljs',
button('Copy', 'Copy code to clipboard', copyIcon, 'btnClipboard'),
);
const clipboard = new ClipboardJS('.btnClipboard', {
target: function(trigger) {
return trigger.parentNode.querySelector('code');
},
});
clipboard.on('success', function(event) {
event.clearSelection();
const textEl = event.trigger.querySelector('.btnIcon__label');
textEl.textContent = 'Copied';
setTimeout(function() {
textEl.textContent = 'Copy';
}, 2000);
});
});

View File

@@ -1,17 +0,0 @@
/**
* Copyright 2019-present Facebook Inc. All rights reserved.
*
* This source code is licensed under the Apache 2.0 license found
* in the LICENSE file in the root directory of this source tree.
*
* @format
*/
/* eslint-disable */
window.addEventListener('load', function() {
// add an id tag for images based on their alt attribute.
document.querySelectorAll('.container img').forEach(function(el) {
el.id = el.alt;
});
});

View File

@@ -1,200 +0,0 @@
/**
* Copyright 2019-present Facebook Inc. All rights reserved.
*
* This source code is licensed under the Apache 2.0 license found
* in the LICENSE file in the root directory of this source tree.
*
* @format
*/
const React = require('react');
import LayoutProviders from '@theme/LayoutProviders';
import Footer from '@theme/Footer';
import Navbar from '@theme/Navbar';
const CompLibrary = {
Container: props => <div {...props}></div>,
GridBlock: props => <div {...props}></div>,
MarkdownBlock: props => <div {...props}></div>
};
import Layout from "@theme/Layout";
const MarkdownBlock = CompLibrary.MarkdownBlock;/* Used to read markdown */
const Container = CompLibrary.Container;
const GridBlock = CompLibrary.GridBlock;
const arrow = '\u2192';
const Block = props => (
<div className="block">
<div className="blockTitle">
<a href={props.link}>
<div className="blockTitleText">{props.title}</div>{' '}
</a>
<a className="yellowArrow" href={props.link}>{arrow}</a>
</div>
<div className="blockContent">{props.content}</div>
</div>
);
const Features = () => (
<div className="features">
<Block
title="Schema As Code"
content="Simple API for modeling any database schema as Go objects"
link="docs/schema-def"
/>
<Block
title="Easily Traverse Any Graph"
content="Run queries, aggregations and traverse any graph structure easily"
link="docs/traversals"
/>
<Block
title="Statically Typed And Explicit API"
content="100% statically typed and explicit API using code generation"
link="docs/code-gen"
/>
</div>
);
class HomeSplash extends React.Component {
render() {
const {siteConfig, language = ''} = this.props;
const {baseUrl, docsUrl} = siteConfig;
const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`;
const langPart = `${language ? `${language}/` : ''}`;
const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`;
const SplashContainer = props => (
<div className="homeContainer">
<div className="homeSplashFade">
<div className="wrapper homeWrapper">{props.children}</div>
</div>
</div>
);
const Logo = props => (
<div className="projectLogo">
<img src={props.img_src} alt="Project Logo" />
</div>
);
const ProjectTitle = () => (
<div>
<div className="projectTitleContainer">
<img src="https://entgo.io/assets/logo.png" />
<div className="projectTitle">
<p>{siteConfig.tagline}</p>
</div>
</div>
<p className="projectDesc">
Simple, yet powerful ORM for modeling and querying data.
</p>
</div>
);
const PromoSection = props => (
<div className="section promoSection">
<div className="promoRow">
<div className="pluginRowBlock">{props.children}</div>
</div>
</div>
);
const Button = props => (
<div className="pluginWrapper buttonWrapper">
<a className="button" href={props.href} target={props.target}>
{props.children}
</a>
</div>
);
return (
<SplashContainer>
{/*<Logo img_src={`${baseUrl}img/undraw_monitor.svg`} />*/}
<div className="inner">
<ProjectTitle siteConfig={siteConfig} />
<div className="gettingStartedButton">
<a href="./docs/">
<div className="gettingStartedButtonText">
<div className="gettingStartedText">{'Getting Started '}</div>
<div className="gettingStartedButtonArrow">{arrow}</div>
</div>
</a>
</div>
<div className="gopherGraph">
<img src="https://entgo.io/assets/gopher_graph.png" />
</div>
<Features />
</div>
</SplashContainer>
);
}
}
class HomeNav extends React.Component {
render() {
return <ul className="home-nav">
<li className=""><a href="/docs/getting-started" target="_self">Docs</a></li>
<li className=""><a href="/docs/tutorial-setup" target="_self">Tutorial</a></li>
<li className="header-godoc-link"><a href="https://pkg.go.dev/entgo.io/ent?tab=doc" target="_blank">GoDoc</a></li>
<li className=""><a href="https://github.com/ent/ent" target="_blank">Github</a></li>
<li className=""><a href="/blog/" target="_self">Blog</a></li>
</ul>
}
}
class Index extends React.Component {
render() {
const {config: siteConfig, language = ''} = this.props;
const {baseUrl} = siteConfig;
const Showcase = () => {
if ((siteConfig.users || []).length === 0) {
return null;
}
const showcase = siteConfig.users
.filter(user => user.pinned)
.map(user => (
<a href={user.infoLink} key={user.infoLink}>
<img src={user.image} alt={user.caption} title={user.caption} />
</a>
));
const pageUrl = page => baseUrl + (language ? `${language}/` : '') + page;
return (
<div className="productShowcaseSection paddingBottom">
<h2>Who is Using This?</h2>
<p>This project is used by all these people</p>
<div className="logos">{showcase}</div>
<div className="more-users">
<a className="button" href={pageUrl('users.html')}>
More {siteConfig.title} Users
</a>
</div>
</div>
);
};
return (
<div className={"home-splash-container section_index"}>
<HomeSplash siteConfig={siteConfig} language={language} />
</div>
);
}
}
export default function (props) {
return <LayoutProviders>
{/*<div className={"section_index"}>*/}
{/* <Navbar/>*/}
{/*</div>*/}
<HomeNav />
<Index {...props} />
<Footer/>
</LayoutProviders>;
};

View File

@@ -1,12 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="go-import" content="entgo.io/contrib git https://github.com/ent/contrib">
<meta name="go-source" content="entgo.io/contrib https://github.com/ent/contrib https://github.com/ent/contrib/tree/master{/dir} https://github.com/ent/contrib/blob/master{/dir}/{file}#L{line}">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/entgo.io/contrib">
</head>
<body>
Nothing to see here; <a href="https://pkg.go.dev/entgo.io/contrib">move along</a>.
</body>
</html>

View File

@@ -1,12 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="go-import" content="entgo.io/ent git https://github.com/ent/ent">
<meta name="go-source" content="entgo.io/ent https://github.com/ent/ent https://github.com/ent/ent/tree/master{/dir} https://github.com/ent/ent/blob/master{/dir}/{file}#L{line}">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/entgo.io/ent/cmd/ent">
</head>
<body>
Nothing to see here; <a href="https://pkg.go.dev/entgo.io/ent/cmd/ent">move along</a>.
</body>
</html>

View File

@@ -1,12 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="go-import" content="entgo.io/ent git https://github.com/ent/ent">
<meta name="go-source" content="entgo.io/ent https://github.com/ent/ent https://github.com/ent/ent/tree/master{/dir} https://github.com/ent/ent/blob/master{/dir}/{file}#L{line}">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/entgo.io/ent/entc/gen">
</head>
<body>
Nothing to see here; <a href="https://pkg.go.dev/entgo.io/ent/entc/gen">move along</a>.
</body>
</html>

View File

@@ -1,12 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="go-import" content="entgo.io/ent git https://github.com/ent/ent">
<meta name="go-source" content="entgo.io/ent https://github.com/ent/ent https://github.com/ent/ent/tree/master{/dir} https://github.com/ent/ent/blob/master{/dir}/{file}#L{line}">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/entgo.io/ent/entc">
</head>
<body>
Nothing to see here; <a href="https://pkg.go.dev/entgo.io/ent/entc">move along</a>.
</body>
</html>

View File

@@ -1,12 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="go-import" content="entgo.io/ent git https://github.com/ent/ent">
<meta name="go-source" content="entgo.io/ent https://github.com/ent/ent https://github.com/ent/ent/tree/master{/dir} https://github.com/ent/ent/blob/master{/dir}/{file}#L{line}">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/entgo.io/ent">
</head>
<body>
Nothing to see here; <a href="https://pkg.go.dev/entgo.io/ent">move along</a>.
</body>
</html>

View File

@@ -1,29 +0,0 @@
/**
* Copyright 2019-present Facebook Inc. All rights reserved.
*
* This source code is licensed under the Apache 2.0 license found
* in the LICENSE file in the root directory of this source tree.
*
* @format
*/
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
import siteConfig from '@generated/docusaurus.config';
const prismIncludeLanguages = (PrismObject) => {
if (ExecutionEnvironment.canUseDOM) {
const {
themeConfig: {prism: {additionalLanguages = []} = {}},
} = siteConfig;
window.Prism = PrismObject;
additionalLanguages.forEach((lang) => {
require(`prismjs/components/prism-${lang}`); // eslint-disable-line
});
delete window.Prism;
}
};
export default prismIncludeLanguages;

View File

@@ -1,37 +0,0 @@
/**
* Copyright 2019-present Facebook Inc. All rights reserved.
*
* This source code is licensed under the Apache 2.0 license found
* in the LICENSE file in the root directory of this source tree.
*
* @format
*/
export default function(Prism) {
Prism.languages.gotemplate = {
'comment': [
{
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
lookbehind: true,
greedy: true
},
{
pattern: /(^|[^\\:])\/\/.*/,
lookbehind: true,
greedy: true
},
/{{\/\*[\s\S]*\*\/}}/
],
'string': {
pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
greedy: true
},
'boolean': /\b(?:_|iota|nil|true|false)\b/,
'number': /(?:\b0x[a-f\d]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[-+]?\d+)?)i?/i,
'operator': /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,
'builtin': /\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/,
'keyword': /\b(?:break|default|func|interface|select|case|map|struct|chan|else|goto|package|switch|const|fallthrough|if|range|type|continue|for|import|return|var|go|defer|bool|byte|complex64|complex128|float32|float64|int8|int16|int32|int64|string|uint8|uint16|uint32|uint64|int|uint|uintptr|rune|with|define|block|end)\b/,
};
}