mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Themes applied to editor & styling made more general
Some of the general styling moved from default theme to here (margin on HTML & body, plus selected, gutter, cursor & matching styles) Removed setting of theme here, done dynamically with existing functions
This commit is contained in:
29
editor.php
29
editor.php
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<html style="margin: 0px">
|
||||
<head>
|
||||
<title>CodeMirror 2: ICE Coders Editor of Choice</title>
|
||||
<?php include("lib/settings.php");?>
|
||||
@@ -15,30 +15,41 @@
|
||||
<script src="<?php echo $codeMirrorDir; ?>/lib/util/searchcursor.js"></script>
|
||||
<script src="<?php echo $codeMirrorDir; ?>/lib/util/match-highlighter.js"></script>
|
||||
<script src="<?php echo $codeMirrorDir; ?>/lib/util/foldcode.js"></script>
|
||||
<link rel="stylesheet" href="lib/editor.css">
|
||||
<?php
|
||||
if ($theme=="default") {
|
||||
echo '<link rel="stylesheet" href="lib/editor.css">';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" href="'.$codeMirrorDir.'/theme/'.$theme.'.css">';
|
||||
}
|
||||
?>
|
||||
<style type="text/css">
|
||||
.CodeMirror {position: absolute; width: 0px; background-color: #ffffff}
|
||||
.CodeMirror-scroll {width: 100px; height: 100px;}
|
||||
.cm-s-visible {display: block; top: 0px}
|
||||
.cm-s-hidden {display: none; top: 4000px}
|
||||
.cm-s-activeLine {background: #002 !important;}
|
||||
<?php if ($visibleTabs) {?>
|
||||
.cm-tab:after {position: relative; display: inline-block; width: 0px; left: -1.4em; overflow: visible; color: #aaa; content: "\21e5";}
|
||||
<?;};?>
|
||||
|
||||
.CodeMirror-selected {background: #037 !important;}
|
||||
.CodeMirror-gutter {background: #333; border-right: 1px solid #e8e8e8}
|
||||
.CodeMirror-gutter-text {color: #999; width: 35px; cursor: default}
|
||||
.CodeMirror-cursor {border-left: 1px solid white !important;}
|
||||
.CodeMirror-matchingbracket{border: 1px solid grey; color: black !important;}
|
||||
|
||||
span.CodeMirror-matchhighlight {background: #555555}
|
||||
.CodeMirror-focused span.CodeMirror-matchhighlight {color: #000000; background: #555555; !important}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onKeyDown="return top.ICEcoder.interceptKeys('content', event);" onKeyUp="top.ICEcoder.resetKeys(event);">
|
||||
<body style="margin: 0px" onKeyDown="return top.ICEcoder.interceptKeys('content', event);" onKeyUp="top.ICEcoder.resetKeys(event);">
|
||||
|
||||
<script>
|
||||
function createNewCMInstance(num) {
|
||||
var fileName = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
|
||||
var codeFold = CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder,'<span style=\"display: inline-block; width: 13px; height: 13px; background-color: #bb0000; color: #ffffff; text-align: center; cursor: pointer\"><span style="position: relative; top: -1px">+</span></span> %N%');
|
||||
var codeFold_JS_PHP_Ruby = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder,'<span style=\"display: inline-block; width: 13px; height: 13px; background-color: #bb0000; color: #ffffff; text-align: center; cursor: pointer\"><span style="position: relative; top: -1px">+</span></span> %N%');
|
||||
var codeFold = CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder,'<span style=\"display: inline-block; width: 13px; height: 13px; background-color: #bb0000; color: #ffffff; text-align: center; cursor: pointer\"><span style="position: relative; top: -1px">+</span></span> %N%');
|
||||
var codeFold_JS_PHP = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder,'<span style=\"display: inline-block; width: 13px; height: 13px; background-color: #bb0000; color: #ffffff; text-align: center; cursor: pointer\"><span style="position: relative; top: -1px">+</span></span> %N%');
|
||||
|
||||
window['cM'+num] = CodeMirror(document.body, {
|
||||
mode: "application/x-httpd-php",
|
||||
theme: "icecoder",
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
indentUnit: 4,
|
||||
|
||||
Reference in New Issue
Block a user