Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Feature/the ds styling #49

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a095c9f
added logo, moved current styling to first entry in the list of css c…
poef Jun 7, 2024
a00885c
div is=simply-component to simply-render
ylebre May 30, 2024
2f851c4
div is=simply-component to simply-render
ylebre May 30, 2024
9c7f704
set simply-storage to none
ylebre May 30, 2024
3df17fb
update from generated
ylebre Jun 11, 2024
70ec9bf
make component parts optional for full app
ylebre Oct 1, 2024
f260294
Remove file loaded from cdn.polyfill.io
Potherca Jul 7, 2024
d694be5
Add SH script to move relevant codemirror files from node_modules to …
Potherca Jul 7, 2024
c21ce1e
Add codemirror and post-install script to package.json.
Potherca Jul 7, 2024
38efab0
Add result of npm install.
Potherca Jul 7, 2024
d0d63be
Change codemirror/footHtml to use local CodeMirror files.
Potherca Jul 7, 2024
934afeb
Update generated code.
Potherca Jul 7, 2024
47fb24c
update index
ylebre Oct 1, 2024
becb4ec
cleanup default page frame (remove default header/nav)
ylebre Oct 1, 2024
2da9f74
update simply-edit
ylebre Oct 16, 2024
e4c5b43
rename .sb, --sb classes to simplycode
ylebre Jun 11, 2024
f9fcf1e
update from generated
ylebre Jun 11, 2024
c3a16ec
Update 000-default.conf
Hoxolotl Aug 23, 2024
6ccb233
move font import so it works
ylebre Oct 17, 2024
d747a60
update index.html, remove style files
ylebre Oct 17, 2024
299db2f
added hope
ylebre Oct 17, 2024
2243768
update index
ylebre Oct 17, 2024
f31ea83
remove unused files
ylebre Oct 17, 2024
4dfa741
install simplyedit
ylebre Oct 17, 2024
389d42c
update package lock and fix install
ylebre Nov 8, 2024
1a45024
update simply-edit
ylebre Nov 8, 2024
177ef87
skip postInstall when we are a dependancy
ylebre Nov 11, 2024
7f59958
updated toolbar, side menu, components list and add component form to…
poef Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 000-default.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Directory /opt/simplycode/www>
<Directory "/opt/simplycode/www">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Expand Down Expand Up @@ -29,4 +29,4 @@
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>
</IfModule>
58 changes: 58 additions & 0 deletions npm_post_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
current_pwd=`pwd`

if [[ ${INIT_CWD} != ${current_pwd} ]]; then
exit 0; # Skip posinstall when we are installed as a dependancy
fi

#if (process.cwd().includes('node_modules')) {
# return; # Skip postinstall when we are installed as a dependancy.
#}

installCodeMirror() {
sSourceDir="${npm_config_local_prefix}/node_modules"
sTargetDir="${npm_config_local_prefix}/www/js"

mkdir -p \
"${sTargetDir}/codemirror/lib/" \
"${sTargetDir}/codemirror/mode/css/" \
"${sTargetDir}/codemirror/mode/htmlmixed/" \
"${sTargetDir}/codemirror/mode/javascript/" \
"${sTargetDir}/codemirror/mode/xml/" \
"${sTargetDir}/codemirror/theme/"

cp -f "${sSourceDir}/codemirror/lib/codemirror.css" "${sTargetDir}/codemirror/lib/codemirror.css"
cp -f "${sSourceDir}/codemirror/lib/codemirror.js" "${sTargetDir}/codemirror/lib/codemirror.js"
cp -f "${sSourceDir}/codemirror/mode/css/css.js" "${sTargetDir}/codemirror/mode/css/css.js"
cp -f "${sSourceDir}/codemirror/mode/htmlmixed/htmlmixed.js" "${sTargetDir}/codemirror/mode/htmlmixed/htmlmixed.js"
cp -f "${sSourceDir}/codemirror/mode/javascript/javascript.js" "${sTargetDir}/codemirror/mode/javascript/javascript.js"
cp -f "${sSourceDir}/codemirror/mode/xml/xml.js" "${sTargetDir}/codemirror/mode/xml/xml.js"
cp -f "${sSourceDir}/codemirror/theme/base16-dark.css" "${sTargetDir}/codemirror/theme/base16-dark.css"
}

installSimplyEdit() {
local sSourceDir sTargetDir

readonly sSourceDir="${npm_config_local_prefix}/node_modules/simplyedit"
readonly sTargetDir="${npm_config_local_prefix}/www"

mkdir -p \
"${sTargetDir}/js/" \
"${sTargetDir}/hope/" \
"${sTargetDir}/simply/" \

cp -a "${sSourceDir}/js/"* "${sTargetDir}/js"
cp -a "${sSourceDir}/hope/"* "${sTargetDir}/hope"
cp -a "${sSourceDir}/simply/"* "${sTargetDir}/simply"
}

if [[ ${BASH_SOURCE[0]} != "${0}" ]]; then
export -f installSimplyEdit
export -f installCodeMirror
else
installSimplyEdit
installCodeMirror
exit $?
fi


25 changes: 25 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"author": "SimplyEdit",
"description": "Code editor in the SimplyEdit family",
"dependencies": {
"codemirror": "5.65.2",
"simplyedit": "github:simplyedit/simplyedit"
},
"keywords": [
"code",
"ide",
Expand All @@ -16,5 +20,8 @@
"repository": {
"type": "git",
"url": "git+https://github.com/SimplyEdit/simplycode.git"
},
"scripts": {
"postinstall": "./npm_post_install.sh"
}
}
1 change: 1 addition & 0 deletions www/api/data/assets/img/feather-sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
134 changes: 134 additions & 0 deletions www/api/data/assets/img/simplycode-narrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
function(el) {
var previewRunners = document.querySelectorAll("iframe.sb-full-preview");
var previewRunners = document.querySelectorAll("iframe.simplycode-full-preview");
previewRunners.forEach(function(previewRunner) {
previewRunner.contentWindow.document.previewRunner = previewRunner;
simplyApp.commands.resetPreview(previewRunner)
.then(function(previewRunner) {
previewRunner.contentWindow.document.open();
previewRunner.contentWindow.document.write(previewRunner.parentNode.querySelector(".sb-preview-code").innerText);
previewRunner.contentWindow.document.write(previewRunner.parentNode.querySelector(".simplycode-preview-code").innerText);
previewRunner.contentWindow.document.close();
});
});

var previewRunners = document.querySelectorAll("iframe.sb-component-preview");
var previewRunners = document.querySelectorAll("iframe.simplycode-component-preview");
previewRunners.forEach(function(previewRunner) {
previewRunner.contentWindow.document.previewRunner = previewRunner;
simplyApp.commands.resetPreview(previewRunner)
.then(function(previewRunner) {
previewRunner.contentWindow.document.open();
previewRunner.contentWindow.document.write(previewRunner.parentNode.querySelector(".sb-preview-code").innerText);
previewRunner.contentWindow.document.write(previewRunner.parentNode.querySelector(".simplycode-preview-code").innerText);
previewRunner.contentWindow.document.close();
previewRunner.contentWindow.addEventListener("simply-content-loaded", function() {
var previewData = previewRunner.parentNode.querySelector(".sb-preview-data").innerText;
var previewData = previewRunner.parentNode.querySelector(".simplycode-preview-data").innerText;
try {
previewData = JSON.parse(previewData);
} catch(e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function(el) {
var testRunners = document.querySelectorAll(".sb-component[open] iframe.qunit");
var testRunners = document.querySelectorAll(".simplycode-component[open] iframe.qunit");
testRunners.forEach(function(testRunner) {
testRunner.contentWindow.document.testRunner = testRunner;
testRunner.contentWindow.document.open();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function() {
var textareas = document.querySelectorAll(".sb-component[open] textarea[data-codemirror-mode]:not([style])");
var textareas = document.querySelectorAll(".simplycode-component[open] textarea[data-codemirror-mode]:not([style])");
textareas.forEach(function(textarea) {
var mode = "javascript";
if (textarea.hasAttribute("data-codemirror-mode")) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.js" integrity="sha512-xwrAU5yhWwdTvvmMNheFn9IyuDbl/Kyghz2J3wQRDR8tyNmT8ZIYOd0V3iPYY/g4XdNPy0n/g0NvqGu9f0fPJQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="js/codemirror/lib/codemirror.js"></script>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/css/css.min.js" integrity="sha512-2gAMyrBfWPuTJDA2ZNIWVrBBe9eN6/hOjyvewDd0bsk2Zg06sUla/nPPlqQs75MQMvJ+S5AmfKmq9q3+W2qeKw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/htmlmixed/htmlmixed.min.js" integrity="sha512-0IM15+FEzmvrcePHk/gDCLbZnmja9DhCDUrESXPYLM4r+eDtNadxDUa5Fd/tNQGCbCoxu75TaVuvJkdmq0uh/w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/javascript/javascript.min.js" integrity="sha512-IS1FyxQkiJHT1SAvLXBaJu1UTFSIw0GT/DuzxHl69djqyLoEwGmR2davcZUnB8M7ppi9nfTGZR/vdfqmWt+i6A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/xml/xml.min.js" integrity="sha512-UWfBe6aiZInvbBlm91IURVHHTwigTPtM3M4B73a8AykmxhDWq4EC/V2rgUNiLgmd/i0y0KWHolqmVQyJ35JsNA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="js/codemirror/mode/css/css.js"></script>
<script src="js/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<script src="js/codemirror/mode/javascript/javascript.js"></script>
<script src="js/codemirror/mode/xml/xml.js"></script>
Loading
Loading