mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-08 06:55:26 +02:00
use landing as iframe
This commit is contained in:
parent
73037056bc
commit
409fa1bd8d
14 changed files with 151 additions and 696 deletions
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"title": "Editor.js 🤩🧦🤨",
|
||||
"menu": [
|
||||
"Guides",
|
||||
"API",
|
||||
"Plugins",
|
||||
{"title": "Support Project", "uri": "/support"}
|
||||
]
|
||||
],
|
||||
"landingFrameSrc": "http://localhost:8080/editor?frame=1"
|
||||
}
|
||||
|
|
10
.codexdocsrc.sample
Normal file
10
.codexdocsrc.sample
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"title": "CodeX Docs",
|
||||
"menu": [
|
||||
"Guides",
|
||||
"API",
|
||||
"Plugins",
|
||||
{"title": "Support Project", "uri": "/support"}
|
||||
],
|
||||
"landingFrameSrc": "http://localhost:8080/editor"
|
||||
}
|
2
public/dist/main.css
vendored
2
public/dist/main.css
vendored
File diff suppressed because one or more lines are too long
|
@ -28,6 +28,8 @@
|
|||
}
|
||||
|
||||
li {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
margin-left: 20px;
|
||||
|
||||
|
|
|
@ -1,672 +1,30 @@
|
|||
/**
|
||||
* Editor landing page
|
||||
* Index page landing iframe
|
||||
*/
|
||||
.editor-landing {
|
||||
width: 100%;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&__logo {
|
||||
position: relative;
|
||||
content: '';
|
||||
width: 84px;
|
||||
height: 84px;
|
||||
margin: auto;
|
||||
|
||||
@media (--mobile) {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
&-main {
|
||||
position: absolute;
|
||||
animation: logoIn 1 500ms cubic-bezier(0.5, 1.05, 1, 1);
|
||||
animation-fill-mode: forwards;
|
||||
will-change: transform, filter;
|
||||
z-index: 2;
|
||||
left: 0;
|
||||
|
||||
@media (--mobile) {
|
||||
svg {
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-shadow {
|
||||
position: absolute;
|
||||
left: -38px;
|
||||
z-index: 1;
|
||||
animation: logoShadow 1 500ms cubic-bezier(0.5, 1.05, 1, 1);
|
||||
animation-fill-mode: forwards;
|
||||
will-change: transform, opacity;
|
||||
|
||||
@media (--mobile) {
|
||||
left: -21px;
|
||||
margin-top: -13px;
|
||||
|
||||
svg {
|
||||
width: 92px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor title and description block
|
||||
*/
|
||||
&__info {
|
||||
padding-top: 300px;
|
||||
padding-bottom: 70px;
|
||||
background-image: linear-gradient(0deg, #FFFFFF 0%, #EEF7FF 100%);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&__title {
|
||||
margin: 20px 0 0;
|
||||
line-height: 1.2em;
|
||||
font-size: 50px;
|
||||
letter-spacing: 0.23px;
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
|
||||
@media (--mobile) {
|
||||
margin-top: 25px;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
&__description {
|
||||
font-size: 17.3px;
|
||||
letter-spacing: 0.13px;
|
||||
line-height: 1.5em;
|
||||
color: #868DA1;
|
||||
margin-top: 20px;
|
||||
|
||||
@media (--mobile) {
|
||||
font-size: 15px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&__cta {
|
||||
display: inline-block;
|
||||
margin-top: 40px;
|
||||
padding: 13px 19px;
|
||||
border-radius: 30px;
|
||||
background: #388ffe;
|
||||
box-shadow: 0 9px 12px -6px rgba(11,132,242,0.78);
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
transition: all 150ms ease;
|
||||
will-change: background-color, box-shadow;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
background: #3684fe;
|
||||
box-shadow: 0 9px 16px -6px rgba(11,132,242,0.78);
|
||||
}
|
||||
}
|
||||
|
||||
&__menu {
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
position: fixed;
|
||||
right: 7vw;
|
||||
top: 150px;
|
||||
line-height: 1.5em;
|
||||
|
||||
@media (max-width: 1400px) {
|
||||
right: 4.5vw;
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 1330px) {
|
||||
position: absolute;
|
||||
padding: 20px;
|
||||
right: 45px;
|
||||
top: 55px;
|
||||
}
|
||||
|
||||
|
||||
@media (--mobile) {
|
||||
position: absolute;
|
||||
padding: 15px;
|
||||
left: 0;
|
||||
top: 100px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
display: inline-block;
|
||||
border-bottom: 1px solid rgba(93,100,134,0.20);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
&__version {
|
||||
display: inline-block;
|
||||
padding: 5px 8px;
|
||||
line-height: 1em;
|
||||
border-radius: 30px;
|
||||
background: #111111;
|
||||
font-size: 10px;
|
||||
color: #FFFFFF;
|
||||
margin-right: -70px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
&__demo {
|
||||
background: #eef5fa;
|
||||
border-radius: 100px;
|
||||
max-width: 950px;
|
||||
margin: 0 auto;
|
||||
padding: 70px 60px;
|
||||
|
||||
@media (max-width: 1550px) {
|
||||
max-width: 850px;
|
||||
}
|
||||
|
||||
@media (--mobile) {
|
||||
padding: 15px;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
&-inner {
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 24px 24px -18px rgba(69,104,129,0.33), 0 9px 45px 0 rgba(114,119,160,0.12);
|
||||
padding: 70px 50px;
|
||||
font-size: 16px;
|
||||
box-sizing: border-box;
|
||||
|
||||
@media (--mobile) {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
&-inner,
|
||||
.codex-editor__redactor {
|
||||
min-height: 450px;
|
||||
|
||||
@media (--mobile) {
|
||||
min-height: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__preview {
|
||||
max-width: var(--layout-width-main-col);
|
||||
margin: 0 auto;
|
||||
color: rgba(34, 78, 111, 0.75);
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 150px;
|
||||
background: linear-gradient(90deg, rgba(238, 245, 250, 0), #eef5fa);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
&-inner {
|
||||
overflow: auto;
|
||||
font-size: 14px;
|
||||
line-height: 1.5em;
|
||||
letter-spacing: 0.1px;
|
||||
}
|
||||
}
|
||||
|
||||
&__section-header {
|
||||
font-size: 16px;
|
||||
max-width: 375px;
|
||||
margin: 50px auto;
|
||||
line-height: 1.5em;
|
||||
text-align: center;
|
||||
color: #606578;
|
||||
|
||||
@media (--mobile) {
|
||||
font-size: 14px;
|
||||
max-width: 70vw;
|
||||
}
|
||||
|
||||
header {
|
||||
font-weight: 600;
|
||||
margin-bottom: 13px;
|
||||
|
||||
@media (--mobile) {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
&--big {
|
||||
margin: 130px auto;
|
||||
line-height: 24px;
|
||||
|
||||
@media (--mobile) {
|
||||
margin: 50px auto;
|
||||
}
|
||||
|
||||
header {
|
||||
font-size: 26px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
@media (--mobile) {
|
||||
font-size: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* JSON output code highlighting
|
||||
*/
|
||||
.sc_attr {
|
||||
color: #373742;
|
||||
}
|
||||
|
||||
.sc_toolname {
|
||||
color: #db1029;
|
||||
}
|
||||
|
||||
.sc_tag {
|
||||
color: rgb(4, 131, 216);
|
||||
}
|
||||
|
||||
.sc_key {
|
||||
color: #6e4998;
|
||||
}
|
||||
|
||||
.sc_bool {
|
||||
color: rgb(247, 60, 173);
|
||||
}
|
||||
|
||||
.sc_digit {
|
||||
color: #196ff8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loved by section
|
||||
*/
|
||||
&__loved-by {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 30px;
|
||||
|
||||
@media (--mobile) {
|
||||
margin-bottom: 80px;
|
||||
}
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
height: 30px;
|
||||
|
||||
&:not(:last-of-type)::after {
|
||||
content: '';
|
||||
width: 3px;
|
||||
height: 100%;
|
||||
margin-right: 27px;
|
||||
margin-left: 29px;
|
||||
background: #e0e0e0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Best plugins section
|
||||
*/
|
||||
&__plugins {
|
||||
max-width: 650px;
|
||||
margin: 0 auto;
|
||||
|
||||
@media (--mobile) {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
&-title {
|
||||
font-size: 24px;
|
||||
margin-bottom: 15px;
|
||||
|
||||
@media (--mobile) {
|
||||
font-size: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&-description {
|
||||
margin-bottom: 30px;
|
||||
font-size: 16px;
|
||||
line-height: 1.65em;
|
||||
color: #606578;
|
||||
|
||||
@media (--mobile) {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
&-filter {
|
||||
margin: 30px 0;
|
||||
|
||||
@media (--mobile) {
|
||||
margin: 15px 0 20px;
|
||||
}
|
||||
|
||||
&-button {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #343434;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
margin: -3px 6px 0 3px;
|
||||
}
|
||||
|
||||
&:not(:last-of-type) {
|
||||
margin-right: 17px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Links at the bottom of plugins list
|
||||
*/
|
||||
&__more-plugins,
|
||||
&__contribute {
|
||||
font-size: 15px;
|
||||
color: #7b7e89;
|
||||
cursor: pointer;
|
||||
|
||||
@media (--mobile) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
fill: currentColor;
|
||||
vertical-align: middle;
|
||||
|
||||
@media (--mobile) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__more-plugins {
|
||||
float: left;
|
||||
|
||||
@media (--mobile) {
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
&__contribute {
|
||||
float: right;
|
||||
|
||||
@media (--mobile) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
svg {
|
||||
margin: -3px 3px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override default editor's padding-bottom
|
||||
*/
|
||||
.codex-editor__redactor {
|
||||
padding-bottom: 120px;
|
||||
}
|
||||
|
||||
&__star {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-top: 60px;
|
||||
|
||||
&-line {
|
||||
position: absolute;
|
||||
width: 130px;
|
||||
height: 10px;
|
||||
left: 51.5%;
|
||||
top: 36%;
|
||||
z-index: -1;
|
||||
|
||||
&:nth-of-type(1){
|
||||
transform: translateX(-50%) rotate(-22deg);
|
||||
}
|
||||
|
||||
&:nth-of-type(2){
|
||||
transform: rotate(-90deg) ;
|
||||
left: -11px;
|
||||
top: 13px;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
&:nth-of-type(3){
|
||||
transform: translateX(-50%) rotate(22deg);
|
||||
}
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 15px;
|
||||
height: 10px;
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='15' height='10' viewBox='0 0 15 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 5.5H0v-1h6v-4L15 5 6 9.5z' fill='%23B6B9C0' fill-rule='nonzero'/%3E%3C/svg%3E");
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
&:before {
|
||||
left: 0;
|
||||
animation: arrow-moving-left infinite 1000ms ease;
|
||||
}
|
||||
|
||||
&:after{
|
||||
right: 0;
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='15' height='10' viewBox='0 0 15 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 4.5h6v1H9v4L0 5 9 .5v4z' fill='%23B6B9C0' fill-rule='nonzero'/%3E%3C/svg%3E");
|
||||
animation: arrow-moving-right infinite 1000ms ease;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes arrow-moving-left {
|
||||
50% {
|
||||
transform: translateX(-10px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes arrow-moving-right {
|
||||
50% {
|
||||
transform: translateX(10px);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin items styles
|
||||
*/
|
||||
.editor-plugin {
|
||||
position: relative;
|
||||
.landing-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 7px;
|
||||
box-shadow: 0 3px 11px rgba(125, 128, 147, 0.23);
|
||||
min-height: 90px;
|
||||
padding-right: 120px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@media (--mobile) {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.landing-loader {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
z-index: -1;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
&__title {
|
||||
font-size: 18px;
|
||||
color: #000;
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
margin-bottom: 4px;
|
||||
margin-right: 5px;
|
||||
|
||||
@media (--mobile) {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
&__label {
|
||||
display: inline-block;
|
||||
font-size: 18px;
|
||||
color: #606578;
|
||||
border-radius: 3px;
|
||||
font-weight: 500;
|
||||
opacity: 0.4;
|
||||
line-height: 1em;
|
||||
margin-top: -5px;
|
||||
|
||||
@media (--mobile) {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
&__description {
|
||||
font-size: 14px;
|
||||
color: #606578;
|
||||
}
|
||||
|
||||
&__contributors {
|
||||
display: flex;
|
||||
margin-top: auto;
|
||||
|
||||
@media (--mobile) {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
&-item {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
border-radius: 4px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&:not(:last-of-type) {
|
||||
margin-right: 6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__demo {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 15px;
|
||||
margin-left: 45px;
|
||||
|
||||
img,
|
||||
video {
|
||||
height: 90px;
|
||||
|
||||
@media (--mobile) {
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--your-own {
|
||||
^&__title {
|
||||
color: #7b7e89;
|
||||
}
|
||||
|
||||
^&__description {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
^&__demo {
|
||||
position: static;
|
||||
margin-left: 0;
|
||||
|
||||
pre {
|
||||
font-size: 12px;
|
||||
line-height: 2em;
|
||||
font-family: Menlo, Monaco, Consolas, Courier New, monospace;
|
||||
margin: 15px 0;
|
||||
font-weight: 500;
|
||||
color: #484554;
|
||||
|
||||
@media (--mobile) {
|
||||
font-size: 10px;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
^&__footer {
|
||||
margin-top: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
& > svg {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@keyframes logoIn {
|
||||
0% {
|
||||
transform: translateY(-80px) scale(1, 1.3 );
|
||||
filter: blur(4px);
|
||||
}
|
||||
|
||||
60% {
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
|
||||
70% {
|
||||
transform: translateY(5px) scale(1, 0.92);
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: translateY(0) scale(1)
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@keyframes logoShadow {
|
||||
0% {
|
||||
transform: scale(1.6, 0.9);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
70% {
|
||||
transform: scale(0.8, 0.8) translateY(-10px);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(-10px);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.landing-frame {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
transition: opacity 500ms ease;
|
||||
will-change: opacity;
|
||||
}
|
||||
|
|
60
src/frontend/svg/loader.svg
Normal file
60
src/frontend/svg/loader.svg
Normal file
|
@ -0,0 +1,60 @@
|
|||
<svg class="ldi-zbvw97" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 80 80" preserveAspectRatio="xMidYMid">
|
||||
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80" style="transform-origin:50px 50px 0">
|
||||
<g style="transform-origin:50px 50px 0">
|
||||
<g style="transform-origin:50px 50px 0;transform:scale(.6)">
|
||||
<g style="transform-origin:50px 50px 0">
|
||||
<style>
|
||||
.st3{fill:#dff0fc}
|
||||
.st5{fill:#69cdff}
|
||||
</style>
|
||||
<g style="transform-origin:50px 50px 0">
|
||||
<g class="ld ld-spin" style="transform-origin:50px 50px 0;animation-duration:1.4s;animation-delay:-1.346153846153846s;animation-direction:normal">
|
||||
<path class="st3" d="M69.4 28.7c-3-2.8-6.5-4.8-10.3-6-4.6-1.5-7.7-5.8-7.7-10.6V7.5c4.9.2 9.7 1.1 14.2 2.9 7.4 2.9 9.5 12.6 3.8 18.3z" fill="#dff0fc"/>
|
||||
</g>
|
||||
</g>
|
||||
<g style="transform-origin:50px 50px 0">
|
||||
<g class="ld ld-spin" style="transform-origin:50px 50px 0;animation-duration:1.4s;animation-delay:-1.2923076923076924s;animation-direction:normal">
|
||||
<path class="st5" d="M33 11c-4.4 1.9-8.5 4.6-12.1 8l3.2 3.2c3.4 3.4 8.6 4.2 12.9 2.1 3.6-1.8 7.5-2.8 11.6-3 0-8.1-8.2-13.5-15.6-10.3z" fill="#69cdff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g style="transform-origin:50px 50px 0">
|
||||
<g class="ld ld-spin" style="transform-origin:50px 50px 0;animation-duration:1.4s;animation-delay:-1.2384615384615383s;animation-direction:normal">
|
||||
<path class="st3" d="M10.4 34.4c-1.8 4.5-2.7 9.3-2.9 14.2H12c4.8 0 9.1-3.1 10.6-7.7 1.3-3.8 3.3-7.3 6.1-10.3-5.7-5.7-15.4-3.6-18.3 3.8z" fill="#dff0fc"/>
|
||||
</g>
|
||||
</g>
|
||||
<g style="transform-origin:50px 50px 0">
|
||||
<g class="ld ld-spin" style="transform-origin:50px 50px 0;animation-duration:1.4s;animation-delay:-1.1846153846153846s;animation-direction:normal">
|
||||
<path class="st5" d="M11 67c1.9 4.4 4.6 8.5 8 12.1l3.2-3.2c3.4-3.4 4.2-8.6 2.1-12.9-1.8-3.6-2.8-7.5-3-11.6-8.1 0-13.5 8.2-10.3 15.6z" fill="#69cdff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g style="transform-origin:50px 50px 0">
|
||||
<g class="ld ld-spin" style="transform-origin:50px 50px 0;animation-duration:1.4s;animation-delay:-1.1307692307692307s;animation-direction:normal">
|
||||
<path class="st5" d="M89 33c-1.9-4.4-4.6-8.5-8-12.1l-3.2 3.2c-3.4 3.4-4.2 8.6-2.1 12.9 1.8 3.6 2.8 7.5 3 11.6 8.1 0 13.5-8.2 10.3-15.6z" fill="#69cdff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g style="transform-origin:50px 50px 0">
|
||||
<g class="ld ld-spin" style="transform-origin:50px 50px 0;animation-duration:1.4s;animation-delay:-1.0769230769230769s;animation-direction:normal">
|
||||
<path class="st3" d="M89.6 65.6c1.8-4.5 2.7-9.3 2.9-14.2H88c-4.8 0-9.1 3.1-10.6 7.7-1.3 3.8-3.3 7.3-6.1 10.3 5.7 5.7 15.4 3.6 18.3-3.8z" fill="#dff0fc"/>
|
||||
</g>
|
||||
</g>
|
||||
<g style="transform-origin:50px 50px 0">
|
||||
<g class="ld ld-spin" style="transform-origin:50px 50px 0;animation-duration:1.4s;animation-delay:-1.023076923076923s;animation-direction:normal">
|
||||
<path class="st5" d="M67 89c4.4-1.9 8.5-4.6 12.1-8l-3.2-3.2c-3.4-3.4-8.6-4.2-12.9-2.1-3.6 1.8-7.5 2.8-11.6 3 0 8.1 8.2 13.5 15.6 10.3z" fill="#69cdff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g style="transform-origin:50px 50px 0">
|
||||
<g class="ld ld-spin" style="transform-origin:50px 50px 0;animation-duration:1.4s;animation-delay:-.9692307692307691s;animation-direction:normal">
|
||||
<path class="st3" d="M34.4 89.6c4.5 1.8 9.3 2.7 14.2 2.9V88c0-4.8-3.1-9.1-7.7-10.6-3.8-1.3-7.3-3.3-10.3-6.1-5.7 5.7-3.6 15.4 3.8 18.3z" fill="#dff0fc"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<style>
|
||||
.ld-spin {
|
||||
will-change: transform;
|
||||
}
|
||||
@keyframes ld-spin{0%{-webkit-transform:rotate(0);transform:rotate(0);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg);animation-timing-function:cubic-bezier(.215,.61,.355,1)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes ld-spin{0%{-webkit-transform:rotate(0);transform:rotate(0);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg);animation-timing-function:cubic-bezier(.215,.61,.355,1)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}path{stroke-width:0}.ld.ld-spin{-webkit-animation:ld-spin 1s infinite;animation:ld-spin 1s infinite}
|
||||
</style>
|
||||
</svg>
|
||||
</svg>
|
After Width: | Height: | Size: 4.6 KiB |
|
@ -1,4 +1,4 @@
|
|||
const {aliases: aliasesDb} = require('../utils/database/index');
|
||||
const { aliases: aliasesDb } = require('../utils/database/index');
|
||||
const binaryMD5 = require('../utils/crypto');
|
||||
|
||||
/**
|
||||
|
@ -40,10 +40,10 @@ class Alias {
|
|||
*/
|
||||
static async get(aliasName) {
|
||||
const hash = binaryMD5(aliasName);
|
||||
let data = await aliasesDb.findOne({hash: hash, deprecated: false});
|
||||
let data = await aliasesDb.findOne({ hash: hash, deprecated: false });
|
||||
|
||||
if (!data) {
|
||||
data = await aliasesDb.findOne({hash: hash});
|
||||
data = await aliasesDb.findOne({ hash: hash });
|
||||
}
|
||||
|
||||
return new Alias(data);
|
||||
|
@ -79,7 +79,7 @@ class Alias {
|
|||
|
||||
this._id = insertedRow._id;
|
||||
} else {
|
||||
await aliasesDb.update({_id: this._id}, this.data);
|
||||
await aliasesDb.update({ _id: this._id }, this.data);
|
||||
}
|
||||
|
||||
return this;
|
||||
|
@ -91,7 +91,7 @@ class Alias {
|
|||
* @param {AliasData} aliasData
|
||||
*/
|
||||
set data(aliasData) {
|
||||
const {id, type, hash, deprecated} = aliasData;
|
||||
const { id, type, hash, deprecated } = aliasData;
|
||||
|
||||
this.id = id || this.id;
|
||||
this.type = type || this.type;
|
||||
|
@ -131,7 +131,7 @@ class Alias {
|
|||
* @returns {Promise<Alias>}
|
||||
*/
|
||||
async destroy() {
|
||||
await aliasesDb.remove({_id: this._id});
|
||||
await aliasesDb.remove({ _id: this._id });
|
||||
|
||||
delete this._id;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const {pages: pagesDb} = require('../utils/database/index');
|
||||
const { pages: pagesDb } = require('../utils/database/index');
|
||||
const translateString = require('../utils/translation');
|
||||
|
||||
/**
|
||||
|
@ -27,7 +27,7 @@ class Page {
|
|||
* @returns {Promise<Page>}
|
||||
*/
|
||||
static async get(_id) {
|
||||
const data = await pagesDb.findOne({_id});
|
||||
const data = await pagesDb.findOne({ _id });
|
||||
|
||||
return new Page(data);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class Page {
|
|||
* @returns {Promise<Page>}
|
||||
*/
|
||||
static async getByUri(uri) {
|
||||
const data = await pagesDb.findOne({uri});
|
||||
const data = await pagesDb.findOne({ uri });
|
||||
|
||||
return new Page(data);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ class Page {
|
|||
* @param {PageData} pageData
|
||||
*/
|
||||
set data(pageData) {
|
||||
const {body, parent, uri} = pageData;
|
||||
const { body, parent, uri } = pageData;
|
||||
|
||||
this.body = body || this.body;
|
||||
this.title = this.extractTitleFromBody();
|
||||
|
@ -141,7 +141,7 @@ class Page {
|
|||
* @returns {Promise<Page>}
|
||||
*/
|
||||
get parent() {
|
||||
return pagesDb.findOne({_id: this._parent})
|
||||
return pagesDb.findOne({ _id: this._parent })
|
||||
.then(data => new Page(data));
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ class Page {
|
|||
* @returns {Promise<Page[]>}
|
||||
*/
|
||||
get children() {
|
||||
return pagesDb.find({parent: this._id})
|
||||
return pagesDb.find({ parent: this._id })
|
||||
.then(data => data.map(page => new Page(page)));
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ class Page {
|
|||
|
||||
this._id = insertedRow._id;
|
||||
} else {
|
||||
await pagesDb.update({_id: this._id}, this.data);
|
||||
await pagesDb.update({ _id: this._id }, this.data);
|
||||
}
|
||||
|
||||
return this;
|
||||
|
@ -180,7 +180,7 @@ class Page {
|
|||
* @returns {Promise<Page>}
|
||||
*/
|
||||
async destroy() {
|
||||
await pagesDb.remove({_id: this._id});
|
||||
await pagesDb.remove({ _id: this._id });
|
||||
|
||||
delete this._id;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const {pagesOrder: db} = require('../utils/database/index');
|
||||
const { pagesOrder: db } = require('../utils/database/index');
|
||||
|
||||
/**
|
||||
* @typedef {Object} PageOrderData
|
||||
|
@ -21,7 +21,7 @@ class PageOrder {
|
|||
* @returns {PageOrder}
|
||||
*/
|
||||
static async get(pageId) {
|
||||
const order = await db.findOne({page: pageId});
|
||||
const order = await db.findOne({ page: pageId });
|
||||
|
||||
let data = {};
|
||||
|
||||
|
@ -172,7 +172,7 @@ class PageOrder {
|
|||
|
||||
this._id = insertedRow._id;
|
||||
} else {
|
||||
await db.update({_id: this._id}, this.data);
|
||||
await db.update({ _id: this._id }, this.data);
|
||||
}
|
||||
|
||||
return this;
|
||||
|
@ -182,7 +182,7 @@ class PageOrder {
|
|||
* Remove page data from the database
|
||||
*/
|
||||
async destroy() {
|
||||
await db.remove({_id: this._id});
|
||||
await db.remove({ _id: this._id });
|
||||
|
||||
delete this._id;
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ router.get('/', function (req, res, next) {
|
|||
}
|
||||
];
|
||||
|
||||
res.render('index', {
|
||||
res.render('pages/index', {
|
||||
plugins
|
||||
});
|
||||
});
|
||||
|
|
|
@ -40,8 +40,8 @@ module.exports = class RCParser {
|
|||
return RCParser.DEFAULTS;
|
||||
}
|
||||
|
||||
const file = fs.readFileSync(rcPath, {encoding: 'UTF-8'});
|
||||
const rConfig = {};
|
||||
const file = fs.readFileSync(rcPath, { encoding: 'UTF-8' });
|
||||
const rConfig = RCParser.DEFAULTS;
|
||||
let userConfig;
|
||||
|
||||
try {
|
||||
|
@ -51,8 +51,11 @@ module.exports = class RCParser {
|
|||
return RCParser.DEFAULTS;
|
||||
}
|
||||
|
||||
rConfig.title = userConfig.title || RCParser.DEFAULTS.title;
|
||||
rConfig.menu = userConfig.menu || RCParser.DEFAULTS.menu;
|
||||
for (let option in userConfig) {
|
||||
if (userConfig.hasOwnProperty(option)) {
|
||||
rConfig[option] = userConfig[option] || RCParser.DEFAULTS[option] || undefined;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(rConfig.menu instanceof Array)) {
|
||||
console.log('Menu section in the rc file must be an array.');
|
||||
|
@ -70,7 +73,7 @@ module.exports = class RCParser {
|
|||
return false;
|
||||
}
|
||||
|
||||
const {title, uri} = option;
|
||||
const { title, uri } = option;
|
||||
|
||||
if (!title || typeof title !== 'string') {
|
||||
console.log(`Menu option #${i} title must be a string.`);
|
||||
|
|
16
src/views/pages/index.twig
Normal file
16
src/views/pages/index.twig
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html style="height: 100%">
|
||||
<head>
|
||||
<title>{{ config.title }}</title>
|
||||
<link rel="stylesheet" href="/dist/main.css" />
|
||||
<link rel="preload" href="{{ config.landingFrameSrc }}" as="document">
|
||||
</head>
|
||||
<body class="landing-body">
|
||||
{% include "components/header.twig" %}
|
||||
<div class="landing-loader" id="frame-loader">
|
||||
{{ svg('loader') }}
|
||||
</div>
|
||||
<iframe class="landing-frame" src="{{ config.landingFrameSrc }}" seamless frameborder="0" onload="this.style.opacity = 1; setTimeout(document.getElementById('frame-loader').remove(), 500)"></iframe>
|
||||
</body>
|
||||
</html>
|
||||
|
20
yarn.lock
20
yarn.lock
|
@ -2138,18 +2138,18 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1
|
|||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||
|
||||
"eslint-config-codex@github:codex-team/eslint-config":
|
||||
version "1.0.0"
|
||||
resolved "https://codeload.github.com/codex-team/eslint-config/tar.gz/9082652b6059d6ec4cc8213811826fdfaad899b0"
|
||||
version "1.1.0"
|
||||
resolved "https://codeload.github.com/codex-team/eslint-config/tar.gz/a38c446d70463a125a610732a3a8931abac2152c"
|
||||
dependencies:
|
||||
eslint-config-standard "^11.0.0"
|
||||
eslint-config-standard "^12.0.0"
|
||||
eslint-plugin-import "^2.14.0"
|
||||
eslint-plugin-node "^7.0.1"
|
||||
eslint-plugin-promise "^3.8.0"
|
||||
eslint-plugin-standard "^3.0.1"
|
||||
|
||||
eslint-config-standard@^11.0.0:
|
||||
version "11.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-11.0.0.tgz#87ee0d3c9d95382dc761958cbb23da9eea31e0ba"
|
||||
eslint-config-standard@^12.0.0:
|
||||
version "12.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz#638b4c65db0bd5a41319f96bba1f15ddad2107d9"
|
||||
|
||||
eslint-import-resolver-node@^0.3.1:
|
||||
version "0.3.2"
|
||||
|
@ -5251,12 +5251,18 @@ resolve-url@^0.2.1:
|
|||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
|
||||
|
||||
resolve@^1.3.2, resolve@^1.5.0, resolve@^1.6.0, resolve@^1.8.1:
|
||||
resolve@^1.3.2, resolve@^1.5.0, resolve@^1.6.0:
|
||||
version "1.9.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.9.0.tgz#a14c6fdfa8f92a7df1d996cb7105fa744658ea06"
|
||||
dependencies:
|
||||
path-parse "^1.0.6"
|
||||
|
||||
resolve@^1.8.1:
|
||||
version "1.10.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba"
|
||||
dependencies:
|
||||
path-parse "^1.0.6"
|
||||
|
||||
restore-cursor@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue