@silexlabs/silex 3.0.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/.dockerignore +5 -0
  2. package/.editorconfig +14 -0
  3. package/.eslintrc.json +43 -0
  4. package/.github/FUNDING.yml +13 -0
  5. package/.github/workflows/docker-hub-publish.yml +36 -0
  6. package/.github/workflows/npm-publish.yml +19 -0
  7. package/.github/workflows/test.yml +26 -0
  8. package/.nvmrc +1 -0
  9. package/.silex.js +19 -0
  10. package/CODE_OF_CONDUCT.md +128 -0
  11. package/CONTRIBUTING.md +108 -0
  12. package/Dockerfile +15 -0
  13. package/LICENSE +203 -0
  14. package/app.json +106 -0
  15. package/directus.silex.js +7 -0
  16. package/dist/client/css/admin.css +4350 -0
  17. package/dist/client/index.html +9 -0
  18. package/dist/client/js/main.js +282 -0
  19. package/dist/client/js/main.js.LICENSE.txt +52 -0
  20. package/dist/server/config.js +50 -0
  21. package/dist/server/events.js +5 -0
  22. package/dist/server/index.js +29 -0
  23. package/dist/server/start.js +18 -0
  24. package/jest.config.js +10 -0
  25. package/logos/logo_by_ceubri/silex-icon-2018@200px.png +0 -0
  26. package/logos/logo_by_ceubri/silex-icon-2018@4x.png +0 -0
  27. package/logos/logo_by_ceubri/silex-logo-2018-white-transp.pdf +0 -0
  28. package/logos/logo_by_ceubri/silex-logo-2018-white.jpg +0 -0
  29. package/logos/logo_by_ceubri/silex-logo-2018-white.pdf +0 -0
  30. package/logos/logo_by_ceubri/silex-logo-2018-white.png +0 -0
  31. package/logos/logo_by_ceubri/silex-logo-2018-white@0.5x.png +0 -0
  32. package/logos/logo_by_ceubri/silex-logo-2018-white@0.75x.png +0 -0
  33. package/logos/logo_by_ceubri/silex-logo-2018-white@4x.jpg +0 -0
  34. package/logos/logo_by_ceubri/silex-logo-2018-white@4x.png +0 -0
  35. package/logos/logo_by_ceubri/silex-logo-2018.ai +2520 -6
  36. package/logos/logo_by_ceubri/silex-logo-2018.jpg +0 -0
  37. package/logos/logo_by_ceubri/silex-logo-2018.pdf +0 -0
  38. package/logos/logo_by_ceubri/silex-logo-2018.png +0 -0
  39. package/logos/logo_by_ceubri/silex-logo-2018@0.5x.png +0 -0
  40. package/logos/logo_by_ceubri/silex-logo-2018@0.75x.png +0 -0
  41. package/logos/logo_by_ceubri/silex-logo-2018@4x.jpg +0 -0
  42. package/logos/logo_by_ceubri/silex-logo-2018@4x.png +0 -0
  43. package/logos/silexlabs.png +0 -0
  44. package/package.json +170 -0
  45. package/public/assets/container.png +0 -0
  46. package/public/assets/favicon.png +0 -0
  47. package/public/assets/logo-silex-small.png +0 -0
  48. package/public/example-config.js +31 -0
  49. package/public/robots.txt +2 -0
  50. package/readme.md +51 -0
  51. package/src/css/_mixins.scss +8 -0
  52. package/src/css/_variables.scss +33 -0
  53. package/src/css/dialog.scss +34 -0
  54. package/src/css/grapesjs.scss +44 -0
  55. package/src/css/index.scss +22 -0
  56. package/src/css/loader.scss +10 -0
  57. package/src/css/page-panel.scss +65 -0
  58. package/src/css/project-bar.scss +102 -0
  59. package/src/css/silex.scss +183 -0
  60. package/src/html/debug.pug +8 -0
  61. package/src/html/index.pug +39 -0
  62. package/src/html/templates/includes.pug +2 -0
  63. package/src/html/templates/workspace.pug +2 -0
  64. package/src/plugins/AuthPlugin.js +21 -0
  65. package/src/plugins/Cache.js +11 -0
  66. package/src/plugins/DefaultBackend.js +113 -0
  67. package/src/plugins/ExpressPlugin.js +30 -0
  68. package/src/plugins/HooksPlugin.js +58 -0
  69. package/src/plugins/PublishPlugin.js +69 -0
  70. package/src/plugins/SslPlugin.js +66 -0
  71. package/src/plugins/StaticPlugin.js +48 -0
  72. package/src/plugins/WebsitePlugin.js +149 -0
  73. package/src/ts/client/config.ts +21 -0
  74. package/src/ts/client/expose.ts +4 -0
  75. package/src/ts/client/grapesjs/blocks.ts +88 -0
  76. package/src/ts/client/grapesjs/eleventy.ts +21 -0
  77. package/src/ts/client/grapesjs/index.ts +255 -0
  78. package/src/ts/client/grapesjs/internal-links.test.ts +87 -0
  79. package/src/ts/client/grapesjs/internal-links.ts +210 -0
  80. package/src/ts/client/grapesjs/new-page-dialog.ts +73 -0
  81. package/src/ts/client/grapesjs/openImport.ts +59 -0
  82. package/src/ts/client/grapesjs/page-panel.ts +101 -0
  83. package/src/ts/client/grapesjs/project-bar.ts +92 -0
  84. package/src/ts/client/grapesjs/publish.ts +386 -0
  85. package/src/ts/client/grapesjs/rich-text.ts +16 -0
  86. package/src/ts/client/grapesjs/semantic.ts +96 -0
  87. package/src/ts/client/grapesjs/settings.ts +190 -0
  88. package/src/ts/client/grapesjs/symbolDialogs.ts +21 -0
  89. package/src/ts/client/grapesjs/template.ts +166 -0
  90. package/src/ts/client/index.ts +38 -0
  91. package/src/ts/client/utils.ts +9 -0
  92. package/src/ts/externs.ts +1 -0
  93. package/src/ts/page.ts +14 -0
  94. package/src/ts/server/cli.ts +23 -0
  95. package/src/ts/server/config.ts +62 -0
  96. package/src/ts/server/events.ts +2 -0
  97. package/src/ts/server/index.ts +35 -0
  98. package/src/ts/server/start.ts +18 -0
  99. package/src/ts/server/utils/BackwardCompat.ts +534 -0
  100. package/src/ts/types.ts +138 -0
  101. package/tsconfig-server-debug.json +20 -0
  102. package/tsconfig-server-release.json +19 -0
  103. package/tsconfig.jest.json +9 -0
  104. package/tsconfig.json +27 -0
  105. package/webpack.config.js +29 -0
  106. package/webpack.debug.config.js +8 -0
Binary file
package/package.json ADDED
@@ -0,0 +1,170 @@
1
+ {
2
+ "name": "@silexlabs/silex",
3
+ "description": "Free and easy website builder for everyone.",
4
+ "version": "3.0.0-alpha.21",
5
+ "version:backwardcompat": "3.0.0",
6
+ "author": {
7
+ "name": "Alex Hoyau",
8
+ "url": "https://lexoyo.me/"
9
+ },
10
+ "main": "dist/server/index.js",
11
+ "bin": {
12
+ "silex": "./dist/server/cli.js"
13
+ },
14
+ "license": "GPL-3.0",
15
+ "engines": {
16
+ "node": ">=12"
17
+ },
18
+ "watch": {
19
+ "build:css:debug": {
20
+ "patterns": [
21
+ "src/css/"
22
+ ],
23
+ "extensions": "scss"
24
+ },
25
+ "build:html:debug": {
26
+ "patterns": [
27
+ "src/html/"
28
+ ],
29
+ "extensions": "pug"
30
+ },
31
+ "build:client:debug": {
32
+ "patterns": [
33
+ "src/ts/client/"
34
+ ],
35
+ "extensions": [
36
+ "ts",
37
+ "js"
38
+ ]
39
+ },
40
+ "build:server:debug": {
41
+ "patterns": [
42
+ "src/ts/server/",
43
+ "src/plugins/"
44
+ ],
45
+ "extensions": [
46
+ "ts",
47
+ "js"
48
+ ]
49
+ }
50
+ },
51
+ "scripts": {
52
+ "release": "",
53
+ "watch": "npm-watch",
54
+ "start": "node dist/server/index.js",
55
+ "start:debug": "cross-env SILEX_DEBUG=true nodemon --watch dist/server dist/server/index.js",
56
+ "prepublishOnly": "npm run lint && npm test && npm run build",
57
+ "preversion": "npm run prepublishOnly",
58
+ "build": "run-s build:css:release build:html build:client:release build:server:release",
59
+ "webpack": "webpack --config webpack.config.js",
60
+ "build:css:release": "sass --load-path ../../node_modules --load-path node_modules --no-source-map src/css/index.scss dist/client/css/admin.css",
61
+ "build:css:debug": "sass --load-path ../../node_modules --load-path node_modules src/css/index.scss dist/client/css/admin.css",
62
+ "build:html": "pug src/html/index.pug --out dist/client/ --no-debug",
63
+ "build:html:debug": "pug src/html/debug.pug --pretty --out dist/client/ && mv dist/client/debug.html dist/client/index.html",
64
+ "build:client:release": "webpack --config webpack.config.js",
65
+ "build:client:debug": "webpack --config webpack.debug.config.js",
66
+ "build:server:release": "tsc -p tsconfig-server-release.json",
67
+ "build:server:debug": "SILEX_DEBUG=true tsc -p tsconfig-server-debug.json",
68
+ "lint": "eslint 'src/ts/**/*.ts'",
69
+ "lint:fix": "npm run lint -- --fix",
70
+ "test": "node --experimental-vm-modules `node_modules jest`/jest/bin/jest.js",
71
+ "test:watch": "npm test -- --watch"
72
+ },
73
+ "dependencies": {
74
+ "@directus/sdk": "^10.3.3",
75
+ "@silexlabs/grapesjs-directus-storage": "1.0.15",
76
+ "@silexlabs/grapesjs-fonts": "1.0.12",
77
+ "@silexlabs/grapesjs-loading": "1.0.7",
78
+ "@silexlabs/grapesjs-symbols": "1.0.18",
79
+ "@silexlabs/grapesjs-ui-suggest-classes": "1.0.23",
80
+ "@silexlabs/silex-plugins": "^1.0.6",
81
+ "adm-zip": "0.5.10",
82
+ "body-parser": "1.20.2",
83
+ "cli": "^1.0.1",
84
+ "compression": "1.7.4",
85
+ "cookie-parser": "1.4.6",
86
+ "cookie-session": "2.0.0",
87
+ "cross-env": "7.0.3",
88
+ "express": "4.18.2",
89
+ "express-force-ssl": "0.3.2",
90
+ "formidable": "2.1.1",
91
+ "grapesjs": "0.21.1",
92
+ "grapesjs-blocks-basic": "1.0.1",
93
+ "grapesjs-custom-code": "1.0.1",
94
+ "grapesjs-plugin-forms": "2.0.5",
95
+ "grapesjs-style-filter": "1.0.1",
96
+ "html-minifier": "^4.0.0",
97
+ "lit-html": "2.7.2",
98
+ "mkdirp": "3.0.1",
99
+ "node_modules-path": "2.0.7",
100
+ "node-fetch": "^2.6.9",
101
+ "normalize.css": "8.0.1",
102
+ "object-path": "0.11.8",
103
+ "promise-sequential": "1.1.1",
104
+ "sass": "1.62.0",
105
+ "serve-static": "1.15.0"
106
+ },
107
+ "devDependencies": {
108
+ "@types/express": "4.17.17",
109
+ "@types/jest": "29.5.1",
110
+ "@types/node": "18.16.0",
111
+ "@typescript-eslint/eslint-plugin": "^5.59.1",
112
+ "@typescript-eslint/parser": "^5.59.1",
113
+ "css-loader": "6.7.3",
114
+ "eslint": "8.39.0",
115
+ "file-loader": "6.2.0",
116
+ "jest": "29.5.0",
117
+ "jest-environment-jsdom": "^29.5.0",
118
+ "livereload": "^0.9.3",
119
+ "nodemon": "2.0.22",
120
+ "npm-run-all": "4.1.5",
121
+ "npm-watch": "0.11.0",
122
+ "pug-cli": "1.0.0-alpha6",
123
+ "style-loader": "3.3.2",
124
+ "ts-jest": "^29.1.0",
125
+ "ts-loader": "9.4.2",
126
+ "typescript": "5.0.4",
127
+ "webpack": "5.80.0",
128
+ "webpack-cli": "5.0.2"
129
+ },
130
+ "repository": {
131
+ "type": "git",
132
+ "url": "https://github.com/silexlabs/Silex.git"
133
+ },
134
+ "keywords": [
135
+ "page builder",
136
+ "cloud",
137
+ "SaaS",
138
+ "template builder",
139
+ "web page editor",
140
+ "html5 editor",
141
+ "free",
142
+ "open source",
143
+ "online editor",
144
+ "silex website",
145
+ "free",
146
+ "website builder",
147
+ "online",
148
+ "silex website builder",
149
+ "silex.me",
150
+ "silex",
151
+ "html editor",
152
+ "free website builder",
153
+ "silex cms",
154
+ "online website builder open source",
155
+ "Create a free website",
156
+ "Wix.com open source alternative",
157
+ "designer",
158
+ "webdesigner",
159
+ "web master",
160
+ "webmaster",
161
+ "open source CMS",
162
+ "CSS3",
163
+ "HTML5",
164
+ "Javascript",
165
+ "WYSIWYG",
166
+ "github",
167
+ "silex",
168
+ "jekyll"
169
+ ]
170
+ }
Binary file
Binary file
@@ -0,0 +1,31 @@
1
+ export default async function(config, options) {
2
+ //await config.addPlugin('gjs-blocks-basic', 'https://unpkg.com/grapesjs-blocks-basic', {
3
+ // blocks: ['text', 'image', 'video', 'map'],
4
+ //})
5
+
6
+ // Optional plugins
7
+ await config.addPlugin([
8
+ '@silexlabs/grapesjs-directus-storage',
9
+ './plugins/@silexlabs/grapesjs-directus-storage/dist/index.js',
10
+ ], {
11
+ '@silexlabs/grapesjs-directus-storage': {
12
+ directusUrl: 'http://localhost:8055',
13
+ },
14
+ './plugins/@silexlabs/grapesjs-directus-storage/dist/index.js': {
15
+ directusUrl: 'http://localhost:8055',
16
+ },
17
+ })
18
+
19
+ // Return an object to override default config
20
+ return {
21
+ ...config,
22
+ ...options,
23
+ editor: {
24
+ ...config.editor,
25
+ storageManager: {
26
+ autoload: false,
27
+ type: 'directus',
28
+ },
29
+ },
30
+ }
31
+ }
@@ -0,0 +1,2 @@
1
+ User-agent: *
2
+ Disallow: /
package/readme.md ADDED
@@ -0,0 +1,51 @@
1
+ [![status of silex.me instance](https://monitoshi.lexoyo.me/badge/1525963562293-6552)](https://editor.silex.me) [![Join the chat at https://gitter.im/silex-website-builder/community](https://badges.gitter.im/silex-website-builder/community.svg)](https://gitter.im/silex-website-builder/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2
+
3
+ ![Silex UI](https://github.com/silexlabs/www.silex.me/raw/gh-pages/assets/silex-ui.gif)
4
+
5
+ ## About Silex, live web creation.
6
+
7
+ | :fire: Developers can test silex v3 with `npx silex-website-builder` |
8
+ |-------------------------------------------------------------------------------|
9
+
10
+ Silex, is a free and open source website builder in the cloud. Create websites directly in the browser without writing code. And it is suitable for professional designers to produce great websites without constraints. Silex is also known as the HTML5 editor.
11
+
12
+ Brought to you by Silex Labs team, promoting free software. Feel free to [use the free Silex instance](https://editor.silex.me/) provided by [Silex Labs foundation](https://www.silexlabs.org/).
13
+
14
+ Silex for makers and web designers who want a free alternative to Webflow or other closed source website builders:
15
+
16
+ * [Use Silex online for free](https://editor.silex.me)
17
+ * [Silex desktop app (works offline, with your local files)](https://github.com/silexlabs/silex-desktop/)
18
+ * [Silex official website](http://www.silex.me/)
19
+ * [Documentation wiki](https://github.com/silexlabs/Silex/wiki)
20
+ * [Silex forums](https://github.com/silexlabs/Silex/issues)
21
+ * [subscribe to Silex news by email (a few messages per year)](http://eepurl.com/F48q5) and follow us on [Facebook](http://www.facebook.com/silexlabs), [Twitter](https://twitter.com/silexlabs)
22
+
23
+
24
+ Silex for professionals, agencies and hosting companies:
25
+
26
+ * [Install Silex on your computer or server](https://github.com/silexlabs/Silex/wiki/How-to-Host-An-Instance-of-Silex#as-a-web-app-silex-web-version) (basically this is `npm install -g silex-website-builder && silex`)
27
+ * If you know HTML and CSS here is how to [add your own components to the "+" menu](https://github.com/silexlabs/Silex/wiki/Create-Silex-components)
28
+ * If you are a designer, here is how to [add your own templates to Silex](https://github.com/silexlabs/Silex/wiki/Create-templates-for-Silex)
29
+ * If you are a freelance designer and wants to create Silex website for clients, [please leave your email here](http://eepurl.com/gjYnib)
30
+ * If you are looking for a designer to help you create your website, [please leave your email here](http://eepurl.com/gjYnib)
31
+ * [Hire a contributor from this list](https://github.com/silexlabs/Silex/graphs/contributors) or [from one](https://github.com/silexlabs/unifile/graphs/contributors) [of these](https://github.com/silexlabs/CloudExplorer2/graphs/contributors) [other lists](https://github.com/silexlabs/drag-drop-stage-component/graphs/contributors)
32
+
33
+
34
+ Other links
35
+
36
+ * [Silex meta repository for Silex contribution](https://github.com/silexlabs/silex-meta)
37
+ * [Silex is dual licensed under GPL or MPL](http://www.silexlabs.org/silex/silex-licensing/)
38
+ * [Road map](https://github.com/silexlabs/Silex/milestones)
39
+ * [Change log](https://github.com/silexlabs/Silex/pulls?utf8=%E2%9C%93&q=is%3Apr)
40
+ * [Open positions, join the team](https://github.com/silexlabs/Silex/issues?q=is%3Aissue+is%3Aopen+label%3A%22open+position%22)
41
+ * [Become a core contributor with these issues to get started](https://github.com/silexlabs/Silex/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
42
+ * [Testers, docs and other help wanted annoucements](https://github.com/silexlabs/Silex/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
43
+
44
+ ## Dependencies
45
+
46
+ The upstream projects we use in Silex are all listed in [Silex meta package](https://github.com/silexlabs/silex-meta)
47
+
48
+ ## Github stars history
49
+
50
+ [![Star History Chart](https://api.star-history.com/svg?repos=silexlabs/Silex&type=Timeline)](https://star-history.com/#silexlabs/Silex&Timeline)
51
+
@@ -0,0 +1,8 @@
1
+ @mixin silex-ui-full {
2
+ position: absolute;
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ }
8
+
@@ -0,0 +1,33 @@
1
+ // $silexlightergrey: #ddd;
2
+ // $silexlightgrey: #535353;
3
+ // $silexmediumgrey: #444;
4
+ // $silexmediumdarkgrey: #393939;
5
+ // $silexdarkgrey: #2f2f2f;
6
+ // $silexdarkergrey: #2a2a2a;
7
+ // $silexlightblue: #7bc0ff;
8
+
9
+ $primaryColor: #444;
10
+ $secondaryColor: #ddd;
11
+ $tertiaryColor: #5e85a8;
12
+ $quaternaryColor: #7bc0ff;
13
+ $darkerPrimaryColor: #363636;
14
+ $lighterPrimaryColor: #575757;
15
+ $topBarHeight: 40px;
16
+ $projectBarWidth: 35px;
17
+ $projectPanelWidth: 13%;
18
+ $projectPanelMinWidth: 150px;
19
+ $transitionSpeedMedium: .35s;
20
+ $transitionSpeedSlow: .5s;
21
+ $prefix: 'gjs-';
22
+ $pn-prefix: '#{$prefix}pn-';
23
+ $cv-prefix: '#{$prefix}cv-';
24
+ $z-dialog-inline: 10;
25
+
26
+ :root {
27
+ --primaryColor: #444;
28
+ --secondaryColor: #ddd;
29
+ --tertiaryColor: #5e85a8;
30
+ --quaternaryColor: #7bc0ff;
31
+ --darkerPrimaryColor: #363636;
32
+ --lighterPrimaryColor: #575757;
33
+ }
@@ -0,0 +1,34 @@
1
+ @use "variables";
2
+ @use "mixins";
3
+
4
+ .silex-main {
5
+ transition: opacity variables.$transitionSpeedMedium .5s ease;
6
+ }
7
+ .silex-dialog {
8
+ transition: opacity variables.$transitionSpeedMedium ease;
9
+ }
10
+ .silex-dialog-hide {
11
+ opacity: 0;
12
+ visibility: hidden;
13
+ transition: opacity variables.$transitionSpeedMedium ease, visibility variables.$transitionSpeedSlow 1s ease;
14
+ }
15
+
16
+ .silex-dialog-inline {
17
+ position: absolute;
18
+ background-color: variables.$primaryColor;
19
+ z-index: variables.$z-dialog-inline;
20
+ border-radius: 3px;
21
+ display: flex;
22
+ flex-direction: column;
23
+ padding: 10px;
24
+ main {
25
+ flex-grow: 1;
26
+ }
27
+ footer {
28
+ padding: 5px;
29
+ text-align: right;
30
+ }
31
+ a {
32
+ color: variables.$quaternaryColor;
33
+ }
34
+ }
@@ -0,0 +1,44 @@
1
+ @use "variables" as *;
2
+
3
+ #gjs {
4
+ flex: 1 1 auto;
5
+ }
6
+
7
+
8
+ .#{$prefix} {
9
+ @each $cnum, $ccol in (one, $primaryColor), (two, $secondaryColor), (three, $tertiaryColor), (four, $quaternaryColor) {
10
+ &#{$cnum} {
11
+ &-bg {
12
+ background-color: $ccol;
13
+ }
14
+
15
+ &-color {
16
+ color: $ccol;
17
+
18
+ &-h:hover {
19
+ color: $ccol;
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
25
+ .#{$cv-prefix}canvas,
26
+ .#{$pn-prefix}panel,
27
+ .#{$pn-prefix}commands {
28
+ left: $projectBarWidth;
29
+ }
30
+ .#{$pn-prefix}project-bar-panel,
31
+ .#{$pn-prefix}views,
32
+ .#{$pn-prefix}options,
33
+ .#{$pn-prefix}views-container {
34
+ left: auto;
35
+ }
36
+ .#{$cv-prefix}canvas {
37
+ width: calc(85% - $projectBarWidth);
38
+ }
39
+ .#{$pn-prefix}devices-c {
40
+ .#{$prefix}device-label {
41
+ display: none;
42
+ }
43
+ }
44
+
@@ -0,0 +1,22 @@
1
+ /* Normalize css */
2
+ @use "normalize.css/normalize";
3
+ @use "grapesjs/src/styles/scss/main";
4
+
5
+ /* Silex styles imports */
6
+ @use "silex";
7
+ @use "loader";
8
+ @use "dialog";
9
+ @use "grapesjs";
10
+ @use "project-bar";
11
+ @use "page-panel";
12
+
13
+ .container-png::before {
14
+ content: " ";
15
+ background-image: url("../assets/container.png");
16
+ height: 30px;
17
+ width: 30px;
18
+ margin: auto;
19
+ background-position: center;
20
+ background-repeat: no-repeat;
21
+ }
22
+
@@ -0,0 +1,10 @@
1
+ @use "variables";
2
+ @use "mixins";
3
+
4
+ .silex-loader {
5
+ @include mixins.silex-ui-full;
6
+ display: flex;
7
+ color: variables.$secondaryColor;
8
+ justify-content: center;
9
+ align-items: center;
10
+ }
@@ -0,0 +1,65 @@
1
+ @use "variables" as *;
2
+
3
+ .page-panel-container {
4
+ .pages__wrapper {
5
+ height: inherit;
6
+ }
7
+ .pages {
8
+ height: 100%;
9
+ display: flex;
10
+ flex-direction: column;
11
+ .pages__main {
12
+ flex: 1; // take the available space in height
13
+ border: 1px solid $darkerPrimaryColor;
14
+ background-color: $primaryColor;
15
+ }
16
+ .pages__page {
17
+ display: flex;
18
+ align-items: center;
19
+ background-color: $darkerPrimaryColor;
20
+ border-bottom: 1px solid rgba(0, 0, 0, 0.25);
21
+ cursor: pointer;
22
+ &:hover {
23
+ background-color: $primaryColor;
24
+ .pages__page-name {
25
+ color: $quaternaryColor;
26
+ }
27
+ }
28
+ }
29
+ .pages__page-selected {
30
+ background-color: $lighterPrimaryColor;
31
+ cursor: default;
32
+ .pages__page-name {
33
+ color: $quaternaryColor;
34
+ }
35
+ }
36
+ .pages__main.pages__single-page .pages__remove-btn {
37
+ visibility: hidden;
38
+ }
39
+ .pages__page-name {
40
+ white-space: nowrap;
41
+ overflow: hidden;
42
+ text-overflow: ellipsis;
43
+ height: 13px;
44
+ font-size: initial;
45
+ text-transform: capitalize;
46
+ padding: 10px 6px;
47
+ flex: 1;
48
+ text-align: left;
49
+ }
50
+ .pages__icon {
51
+ padding: 10px 6px;
52
+ cursor: pointer;
53
+ }
54
+ .pages__icon:hover {
55
+ color: $quaternaryColor;
56
+ }
57
+ }
58
+ .#{$pn-prefix}buttons {
59
+ flex-direction: column;
60
+ .#{$pn-prefix}btn {
61
+ }
62
+ .#{$pn-prefix}btn:first-child {
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,102 @@
1
+ @use "variables" as *;
2
+
3
+ // squeeze the stage iframe when panel is open
4
+ iframe.enable-squeeze.gjs-frame {
5
+ transition: width $transitionSpeedMedium, height $transitionSpeedMedium, left $transitionSpeedMedium;
6
+ }
7
+ iframe.enable-squeeze.silex-squeeze-left {
8
+ --project-panel-width: max(150px, 15.7%); /* Why 16? Also sass vars do not work here */
9
+ left: var(--project-panel-width);
10
+ width: calc(100% - var(--project-panel-width));
11
+ }
12
+ // button bar
13
+ .#{$pn-prefix}project-bar-panel {
14
+ width: $projectBarWidth;
15
+ padding: 0;
16
+ .#{$pn-prefix}buttons {
17
+ flex-direction: column;
18
+ min-height: 100vh;
19
+ justify-content: flex-start;
20
+ .project-bar-spacer {
21
+ flex: 1;
22
+ }
23
+ .#{$pn-prefix}btn {
24
+ margin: 5px 0 0;
25
+ padding: 5px;
26
+ &.#{$pn-prefix}active {
27
+ background-color: $lighterPrimaryColor;
28
+ width: $projectBarWidth;
29
+ box-shadow: none;
30
+ }
31
+ }
32
+ }
33
+ .logo {
34
+ background-image: url('../assets/logo-silex-small.png');
35
+ background-repeat: no-repeat;
36
+ background-position: center center;
37
+ background-color: transparent;
38
+ }
39
+ }
40
+
41
+ // panels
42
+ .#{$pn-prefix}project-bar-container {
43
+ top: $topBarHeight;
44
+ width: $projectPanelWidth;
45
+ min-width: $projectPanelMinWidth;
46
+ height: calc(100% - $topBarHeight);
47
+ background-color: $lighterPrimaryColor;
48
+ &:not(.gjs-hidden) {
49
+ display: flex; // let the child take the whole height
50
+ flex-direction: column;
51
+ }
52
+ .project-bar__panel:not(.gjs-hidden) {
53
+ flex: 1;
54
+ display: flex; // let the child take the whole height
55
+ flex-direction: column;
56
+ background-color: $primaryColor;
57
+ overflow: auto;
58
+ .gjs-layer {
59
+ background-color: $primaryColor;
60
+ }
61
+ }
62
+ .project-bar__panel > *:not(header) {
63
+ flex: 1;
64
+ display: initial;
65
+ }
66
+ .project-bar__panel-header {
67
+ display: flex;
68
+ justify-content: center;
69
+ align-items: center;
70
+ padding: 5px;
71
+ border-bottom: 1px solid $lighterPrimaryColor;
72
+ .project-bar__panel-header-title {
73
+ flex: 1 1 auto;
74
+ overflow-x: hidden;
75
+ text-overflow: ellipsis;
76
+ white-space: nowrap;
77
+ padding: 3px 0;
78
+ margin: 0;
79
+ font-size: large;
80
+ font-weight: 600;
81
+ }
82
+ .project-bar__panel-header-button {
83
+ cursor: pointer;
84
+ font-size: large;
85
+ font-weight: 400;
86
+ span {
87
+ position: relative;
88
+ left: -6px;
89
+ top: 6px;
90
+ font-weight: bolder;
91
+ background-color: #444;
92
+ border-radius: 100%;
93
+ display: inline-block;
94
+ line-height: 13px;
95
+ }
96
+ }
97
+ .project-bar__panel-header-button:hover {
98
+ color: $quaternaryColor;
99
+ }
100
+ }
101
+ }
102
+