mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-19 06:47:10 +01:00
Snippets display moved & now for info
Snippets display file now moved to lib folder Functionality removed from this file and now just used for info purposes Tidied up look and provided table of uses, plus note on Emmet's tab key
This commit is contained in:
28
lib/snippet-display.php
Normal file
28
lib/snippet-display.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php include("lib/settings.php");?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html style="margin: 0">
|
||||
<head>
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> snippet display</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<style type="text/css">
|
||||
body {font-family: arial; font-size: 10px; background: #ccc}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="margin: 5px">
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="500">
|
||||
<tr valign="top"><td style="padding-bottom: 5px; font-size: 11px"><b>abbreviation plus CTRL+space</td><td style="font-size: 11px"><b>produces</b></td></tr>
|
||||
<tr valign="top"><td>f name</td><td style="padding-bottom: 5px">function name() {...}</td></tr>
|
||||
<tr valign="top"><td>if</td><td style="padding-bottom: 5px">if () {...}</td></tr>
|
||||
<tr valign="top"><td>for</td><td style="padding-bottom: 5px">for (var i=0; i<; i++) {...}</td></tr>
|
||||
</table>
|
||||
<br><br>
|
||||
Tip: If you have Emmet installed, also try tab key after your abbreviation
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php include("lib/settings.php");?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html style="margin: 0">
|
||||
<head>
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> snippet display</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<style type="text/css">
|
||||
body {background: #fff}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<?php
|
||||
$snippets = array(
|
||||
array(
|
||||
"name" => "Function",
|
||||
"replace" => "f ",
|
||||
"with" => "function ::var::() {\\n\\t::|::\\n}"
|
||||
),
|
||||
array(
|
||||
"name" => "If",
|
||||
"replace" => "if",
|
||||
"with" => "if (::|::) {\\n\\t\\n}"
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<?php
|
||||
for ($i=0;$i<count($snippets);$i++) {
|
||||
echo '<div style="cursor: pointer" onClick="top.ICEcoder.doSnippet(\''.$snippets[$i]['replace'].'\',\''.$snippets[$i]['with'].'\')">'.$snippets[$i]['name'].'</div>';
|
||||
}
|
||||
;?>
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user