Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2022-10-21 09:22:24 +02:00
Родитель 7260268447
Коммит 4859f9707d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4C614C6ED2CDE6DF
14 изменённых файлов: 9120 добавлений и 3425 удалений

Просмотреть файл

@ -1,7 +1,10 @@
all: build/editor.js
all: sass build/editor.js
sources=$(wildcard js/*.js) $(wildcard js/*/*.js) babel.config.js webpack.config.js
sass:
npm run sass
.PHONY: watch
watch: node_modules
node_modules/.bin/webpack --watch

Просмотреть файл

@ -0,0 +1,9 @@
@font-face {
font-family: "Droid Sans Mono";
src: url("DroidSansMono-webfont.eot");
src: url("DroidSansMono-webfont.eot?#iefix") format("embedded-opentype"), url("DroidSansMono-webfont.woff") format("woff"), url("DroidSansMono-webfont.ttf") format("truetype"), url("DroidSansMono-webfont.svg#DroidSansMonoRegular") format("svg");
font-weight: normal;
font-style: normal;
}
/*# sourceMappingURL=stylesheet.css.map */

Просмотреть файл

@ -0,0 +1 @@
{"version":3,"sourceRoot":"","sources":["stylesheet.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA;EAIA;EACA","file":"stylesheet.css"}

256
css/merged.css Normal file
Просмотреть файл

@ -0,0 +1,256 @@
@font-face {
font-family: "Droid Sans Mono";
src: url("DroidSansMono-webfont.eot");
src: url("DroidSansMono-webfont.eot?#iefix") format("embedded-opentype"), url("DroidSansMono-webfont.woff") format("woff"), url("DroidSansMono-webfont.ttf") format("truetype"), url("DroidSansMono-webfont.svg#DroidSansMonoRegular") format("svg");
font-weight: normal;
font-style: normal;
}
#editor_controls {
background-color: white;
height: 44px;
position: absolute;
top: 0;
width: 100%;
z-index: 3000; /* because the top navigation is 2000 */
transition: top 0.5s;
}
.ace-clouds .ace_marker-layer .ace_active-line {
background-color: #f8f8f8 !important;
}
#filestexteditor div.ace_gutter {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
opacity: 0.2;
background-color: transparent;
}
#filestexteditor {
display: block;
height: 100%;
width: 100%;
overflow: hidden;
}
#editor_wrap {
box-sizing: border-box;
padding-top: 46px;
position: absolute;
top: 0;
height: 100%;
width: 100%;
overflow: hidden;
transition: padding-top 0.5s;
}
#editor_container {
transition: width 0.5s, top 0.5s, height 0.5s, left 0.5s;
position: fixed;
top: 6%;
left: 15%;
width: 70%;
height: 88%;
z-index: 9999;
overflow: hidden;
background-color: #fff;
border-radius: var(--border-radius-large);
box-sizing: border-box;
}
#editor_container #filestexteditor,
#editor_container #preview_wrap {
transition: width 0.5s;
}
#editor_container.hasPreview {
transition: width 0.5s, top 0.5s, height 0.5s, left 0.5s;
width: 100%;
height: calc(100% - 45px);
top: 45px;
left: 0;
border: none;
border-radius: 0;
}
#editor_container.hasPreview #preview_wrap {
width: 50%;
}
#editor_container.hasPreview #filestexteditor {
width: 50%;
}
#editor_container.hasPreview.onlyPreview #filestexteditor {
width: 0;
}
#editor_container.hasPreview.onlyPreview #preview_wrap,
#editor_container.hasPreview.onlyPreview #preview {
width: 100vw;
}
#editor_container.hasPreview #editor_wrap {
padding-top: 46px; /** controls */
}
#preview_wrap {
box-sizing: border-box;
overflow: auto;
height: 100%;
width: 0;
right: 0;
position: absolute;
top: 0;
padding-top: 46px; /** controls */
}
#editor_container #preview {
transition: width 0.5s;
width: 50vw;
overflow: auto;
box-sizing: border-box;
padding: 0 15px 15px;
height: 100%;
color: #252525;
background-color: #f9f9f9;
}
@media (max-width: 768px) {
#editor_container {
width: 100%;
height: calc(100% - 45px);
top: 45px;
left: 0;
border: none;
border-radius: 0;
}
#editor_wrap {
padding-top: 46px; /** controls */
}
#editor_container.hasPreview:not(.onlyPreview) #preview_wrap {
width: 0;
}
#editor_container.hasPreview #filestexteditor {
width: 100%;
}
#preview_editor_controls button:nth-child(2) {
display: none;
}
#editor_container #preview {
width: 100vw;
}
}
#editor_close {
float: right;
width: 34px;
border: none;
background-color: transparent;
padding: 22px !important;
margin: 0 !important;
border-radius: 0;
right: 0;
opacity: 0.3;
}
#editor_close:hover {
background-color: #ddd;
}
#editorcontrols > button {
height: 30px !important;
margin-top: 7px;
}
#editor_controls small.filename {
float: left;
color: #555;
font-family: inherit;
font-size: 100%;
font-weight: bolder;
text-overflow: ellipsis;
padding: 12px 0 0 14px;
max-width: 218px;
overflow: hidden;
white-space: nowrap;
}
#editor_controls small.saving-message {
color: #ccc;
font-family: inherit;
font-size: 90%;
padding: 13px 0 13px 17px;
overflow: hidden;
display: inline-block;
padding: 13px 0 0 17px;
}
#editor_overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
z-index: 3001;
-moz-opacity: 0.85;
opacity: 0.85;
filter: alpha(opacity=85);
}
small.unsaved-star {
position: absolute;
padding: 9px 0 0 4px;
display: inline-block;
float: left;
}
#sidebar_editor .ace_gutter {
display: none;
}
#sidebar_editor .ace_scrollbar.ace_scrollbar-h {
display: none;
}
#preview_editor_controls {
float: right;
}
#preview_editor_controls button {
height: 42px;
width: 42px;
background-position: center center;
background-repeat: no-repeat;
background-size: 32px 32px;
margin: 0;
margin-top: 2px;
border-radius: 0;
border-left-width: 0;
}
#preview_editor_controls button:hover,
#preview_editor_controls button.active {
background-color: #eee;
border-left-width: 1px;
}
#preview_editor_controls button:first-child {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
border-left-width: 1px;
}
#preview_editor_controls button:last-child {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
@media only screen and (max-width: 768px) {
/* hide search function on mobile to prevent wrap of elements */
#editorsearchval,
#editor_save + label {
display: none !important;
}
}
/*# sourceMappingURL=merged.css.map */

1
css/merged.css.map Normal file
Просмотреть файл

@ -0,0 +1 @@
{"version":3,"sourceRoot":"","sources":["DroidSansMono/stylesheet.scss","style.scss","mobile.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA;EAIA;EACA;;ACRJ;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACI;;;AAGJ;EACC;EACA;EACC;;;AAGF;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;AAAA;EAEC;;;AAGD;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAED;EACE;;;AAGF;AAAA;EAEC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;IACC;IACA;IACA;IACA;IACA;IACA;;EAGD;IACC;;EAGD;IACC;;EAGD;IACC;;EAGD;IACC;;EAGD;IACC;;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;AAAA;EAEC;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;EACA;;;ACnPD;AAGA;EACA;AAAA;IAEC","file":"merged.css"}

9
css/mobile.css Normal file
Просмотреть файл

@ -0,0 +1,9 @@
@media only screen and (max-width: 768px) {
/* hide search function on mobile to prevent wrap of elements */
#editorsearchval,
#editor_save + label {
display: none !important;
}
}
/*# sourceMappingURL=mobile.css.map */

1
css/mobile.css.map Normal file
Просмотреть файл

@ -0,0 +1 @@
{"version":3,"sourceRoot":"","sources":["mobile.scss"],"names":[],"mappings":"AAAA;AAGA;EACA;AAAA;IAEC","file":"mobile.css"}

82
css/public-share.css Normal file
Просмотреть файл

@ -0,0 +1,82 @@
.preview.formatted-text {
max-width: 810px;
padding: 0px 20px !important;
box-sizing: border-box;
font-size: 18px;
line-height: 1.6em;
min-height: 440px;
color: #333;
text-align: left;
margin-bottom: 170px !important;
}
.preview.formatted-text h1,
.preview.formatted-text h2,
.preview.formatted-text h3 {
margin-top: 1em;
word-wrap: break-word;
}
.preview.formatted-text h1 {
line-height: 1.1em;
margin-bottom: 1em;
text-align: center;
font-size: 3em;
}
.preview.formatted-text h2 {
line-height: 1.1em;
margin-bottom: 0.5em;
font-size: 2em;
}
.preview.formatted-text h3 {
line-height: 1.1em;
margin-bottom: 0.6em;
font-size: 1.4em;
}
.preview.formatted-text p,
.preview.formatted-text ul,
.preview.formatted-text ol,
.preview.formatted-text pre {
line-height: 1.45em;
}
.preview.formatted-text p,
.preview.formatted-text details {
margin-bottom: 17.6px;
}
.preview.formatted-text ul,
.preview.formatted-text ol {
padding-left: 25px;
}
.preview.formatted-text ul {
list-style-type: disc;
}
.preview.formatted-text ul ul {
list-style-type: circle;
}
.preview.formatted-text a {
color: #448ac9;
text-decoration: none;
}
.preview.formatted-text a:hover,
.preview.formatted-text a:focus,
.preview.formatted-text a:active {
text-decoration: underline;
}
.preview.formatted-text em {
opacity: 1;
font-style: italic;
}
.preview.formatted-text code {
background-color: rgb(242, 242, 242);
border-radius: 3px;
padding: 5px 12px;
display: block;
white-space: pre;
overflow: auto;
}
/* hide image preview during loading or if it renders fine */
.icon-loading .text-preview,
.preview .text-preview:not(.default-overridden) {
display: none !important;
}
/*# sourceMappingURL=public-share.css.map */

1
css/public-share.css.map Normal file
Просмотреть файл

@ -0,0 +1 @@
{"version":3,"sourceRoot":"","sources":["public-share.scss"],"names":[],"mappings":"AAAA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EAGC;EACA;;AAGD;EACC;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;AAAA;AAAA;AAAA;EAIC;;AAED;AAAA;EAEC;;AAED;AAAA;EAEC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;EACA;;AAED;AAAA;AAAA;EAGC;;AAGD;EACC;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;;;AAIF;AACA;AAAA;EAEC","file":"public-share.css"}

241
css/style.css Normal file
Просмотреть файл

@ -0,0 +1,241 @@
#editor_controls {
background-color: white;
height: 44px;
position: absolute;
top: 0;
width: 100%;
z-index: 3000; /* because the top navigation is 2000 */
transition: top 0.5s;
}
.ace-clouds .ace_marker-layer .ace_active-line {
background-color: #f8f8f8 !important;
}
#filestexteditor div.ace_gutter {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
opacity: 0.2;
background-color: transparent;
}
#filestexteditor {
display: block;
height: 100%;
width: 100%;
overflow: hidden;
}
#editor_wrap {
box-sizing: border-box;
padding-top: 46px;
position: absolute;
top: 0;
height: 100%;
width: 100%;
overflow: hidden;
transition: padding-top 0.5s;
}
#editor_container {
transition: width 0.5s, top 0.5s, height 0.5s, left 0.5s;
position: fixed;
top: 6%;
left: 15%;
width: 70%;
height: 88%;
z-index: 9999;
overflow: hidden;
background-color: #fff;
border-radius: var(--border-radius-large);
box-sizing: border-box;
}
#editor_container #filestexteditor,
#editor_container #preview_wrap {
transition: width 0.5s;
}
#editor_container.hasPreview {
transition: width 0.5s, top 0.5s, height 0.5s, left 0.5s;
width: 100%;
height: calc(100% - 45px);
top: 45px;
left: 0;
border: none;
border-radius: 0;
}
#editor_container.hasPreview #preview_wrap {
width: 50%;
}
#editor_container.hasPreview #filestexteditor {
width: 50%;
}
#editor_container.hasPreview.onlyPreview #filestexteditor {
width: 0;
}
#editor_container.hasPreview.onlyPreview #preview_wrap,
#editor_container.hasPreview.onlyPreview #preview {
width: 100vw;
}
#editor_container.hasPreview #editor_wrap {
padding-top: 46px; /** controls */
}
#preview_wrap {
box-sizing: border-box;
overflow: auto;
height: 100%;
width: 0;
right: 0;
position: absolute;
top: 0;
padding-top: 46px; /** controls */
}
#editor_container #preview {
transition: width 0.5s;
width: 50vw;
overflow: auto;
box-sizing: border-box;
padding: 0 15px 15px;
height: 100%;
color: #252525;
background-color: #f9f9f9;
}
@media (max-width: 768px) {
#editor_container {
width: 100%;
height: calc(100% - 45px);
top: 45px;
left: 0;
border: none;
border-radius: 0;
}
#editor_wrap {
padding-top: 46px; /** controls */
}
#editor_container.hasPreview:not(.onlyPreview) #preview_wrap {
width: 0;
}
#editor_container.hasPreview #filestexteditor {
width: 100%;
}
#preview_editor_controls button:nth-child(2) {
display: none;
}
#editor_container #preview {
width: 100vw;
}
}
#editor_close {
float: right;
width: 34px;
border: none;
background-color: transparent;
padding: 22px !important;
margin: 0 !important;
border-radius: 0;
right: 0;
opacity: 0.3;
}
#editor_close:hover {
background-color: #ddd;
}
#editorcontrols > button {
height: 30px !important;
margin-top: 7px;
}
#editor_controls small.filename {
float: left;
color: #555;
font-family: inherit;
font-size: 100%;
font-weight: bolder;
text-overflow: ellipsis;
padding: 12px 0 0 14px;
max-width: 218px;
overflow: hidden;
white-space: nowrap;
}
#editor_controls small.saving-message {
color: #ccc;
font-family: inherit;
font-size: 90%;
padding: 13px 0 13px 17px;
overflow: hidden;
display: inline-block;
padding: 13px 0 0 17px;
}
#editor_overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
z-index: 3001;
-moz-opacity: 0.85;
opacity: 0.85;
filter: alpha(opacity=85);
}
small.unsaved-star {
position: absolute;
padding: 9px 0 0 4px;
display: inline-block;
float: left;
}
#sidebar_editor .ace_gutter {
display: none;
}
#sidebar_editor .ace_scrollbar.ace_scrollbar-h {
display: none;
}
#preview_editor_controls {
float: right;
}
#preview_editor_controls button {
height: 42px;
width: 42px;
background-position: center center;
background-repeat: no-repeat;
background-size: 32px 32px;
margin: 0;
margin-top: 2px;
border-radius: 0;
border-left-width: 0;
}
#preview_editor_controls button:hover,
#preview_editor_controls button.active {
background-color: #eee;
border-left-width: 1px;
}
#preview_editor_controls button:first-child {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
border-left-width: 1px;
}
#preview_editor_controls button:last-child {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
/*# sourceMappingURL=style.css.map */

1
css/style.css.map Normal file
Просмотреть файл

@ -0,0 +1 @@
{"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAAA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACI;;;AAGJ;EACC;EACA;EACC;;;AAGF;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;AAAA;EAEC;;;AAGD;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAED;EACE;;;AAGF;AAAA;EAEC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;IACC;IACA;IACA;IACA;IACA;IACA;;EAGD;IACC;;EAGD;IACC;;EAGD;IACC;;EAGD;IACC;;EAGD;IACC;;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;AAAA;EAEC;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;EACA","file":"style.css"}

Просмотреть файл

@ -1,4 +1,5 @@
import marked from 'marked'
import { marked } from 'marked';
// FIXME: Hack for single public file view since it is not attached to the fileslist
$(document).ready(function(){

11930
package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -5,7 +5,9 @@
"scripts": {
"dev": "NODE_ENV=development webpack",
"watch": "NODE_ENV=development webpack --progress --watch",
"build": "NODE_ENV=production webpack --progress"
"build": "NODE_ENV=production webpack --progress",
"sass": "sass --load-path css css/",
"sass:watch": "sass --watch --load-path css css/"
},
"browserslist": [
"extends @nextcloud/browserslist-config"
@ -25,6 +27,7 @@
"escape-html": "^1.0.3",
"file-loader": "^6.2.0",
"promise-loader": "^1.0.0",
"sass": "^1.55.0",
"style-loader": "^3.3.1",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",