From f7fa9273915ae4e06dce8d92e305029a736b8276 Mon Sep 17 00:00:00 2001 From: Codekpy <1942171924@qq.com> Date: Mon, 14 Nov 2022 10:21:53 +0800 Subject: [PATCH 1/2] css --- blockly/ini/blocks/get.js.js | 2 +- ide.html | 1920 ++++++++++++++++++++++------------ 2 files changed, 1271 insertions(+), 651 deletions(-) diff --git a/blockly/ini/blocks/get.js.js b/blockly/ini/blocks/get.js.js index a195b86..fece3e8 100644 --- a/blockly/ini/blocks/get.js.js +++ b/blockly/ini/blocks/get.js.js @@ -92,7 +92,7 @@ Blockly.PHP['mysql_close'] = function(block) { Blockly.PHP['css'] = function(block) { var statements_name = Blockly.PHP.statementToCode(block, 'NAME'); // TODO: Assemble PHP into code variable. - var code = '...;\n'; + var code = 'style="' + statements_name + '" '; return code; }; diff --git a/ide.html b/ide.html index a4b8c42..fdd5df3 100644 --- a/ide.html +++ b/ide.html @@ -1,654 +1,1274 @@ + + + PHP助手——让世界没有难写的网页后端 + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - -
- -
-
-
- - -
-
- +Blockly.Blocks['get_post'] = { + init: function() { + this.appendValueInput("post_key") + .setCheck("String") + .appendField("获取post信息 key"); + this.setInputsInline(true); + this.setOutput(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; +Blockly.Blocks['get_cookie'] = { + init: function() { + this.appendValueInput("cookie_key") + .setCheck("String") + .appendField("获取cookie值 Key:"); + this.setInputsInline(true); + this.setOutput(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['php_start'] = { + init: function() { + this.appendStatementInput("php-start") + .setCheck(null) + .appendField("PHP积木块"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['read'] = { + init: function() { + this.appendValueInput("name") + .setCheck(null) + .appendField("读取文件 文件名(路径):"); + this.appendDummyInput() + .appendField("存放进变量") + .appendField(new Blockly.FieldTextInput("myfile"), "bianname"); + this.appendValueInput("return_text") + .setCheck(null) + .appendField(" 读取失败后的返回文本"); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(135); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['write'] = { + init: function() { + this.appendValueInput("path") + .setCheck(null) + .appendField("写入文件 文件名:"); + this.appendDummyInput() + .appendField("用于操作的变量名") + .appendField(new Blockly.FieldTextInput("default"), "name"); + this.appendValueInput("write_text") + .setCheck(null) + .appendField(" 要写入的内容"); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['echo'] = { + init: function() { + this.appendValueInput("NAME") + .setCheck(null) + .appendField("echo输出"); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(165); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['print_r'] = { + init: function() { + this.appendValueInput("NAME") + .setCheck(null) + .appendField("print_r输出"); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(180); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['htmlspecialchars'] = { + init: function() { + this.appendValueInput("NAME") + .setCheck("String") + .appendField("把文本"); + this.appendDummyInput() + .appendField("转换为 HTML 实体"); + this.setOutput(true, null); + this.setColour(0); + this.setTooltip("转义"); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['mysql_connect'] = { + init: function() { + this.appendDummyInput() + .appendField("连接MySQL 数据库"); + this.appendValueInput("example") + .setCheck(null) + .appendField("对象名"); + this.appendValueInput("url") + .setCheck("String") + .appendField("连接的服务器:"); + this.appendValueInput("user_name") + .setCheck("String") + .appendField("用户名:"); + this.appendValueInput("key") + .setCheck("String") + .appendField("密码:"); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(230); + this.setTooltip("连接MySQL 数据库"); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['mail'] = { + init: function() { + this.appendDummyInput() + .appendField("发送邮件"); + this.appendValueInput("user") + .setCheck("String") + .appendField("接收者"); + this.appendValueInput("main") + .setCheck("String") + .appendField("主题"); + this.appendValueInput("text") + .setCheck("String") + .appendField("发送的消息"); + this.appendValueInput("h") + .setCheck("String") + .appendField("附加的标题"); + this.appendValueInput("NAME") + .setCheck("String") + .appendField("邮件发送程序规定额外的参数"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(230); + this.setTooltip("发送的消息应使用\\n来分隔各行,附加的标题应当使用\\r\\n分隔附加的标题"); + this.setHelpUrl("https://www.w3school.com.cn/php/php_ref_mail.asp"); + } +}; + +Blockly.Blocks['css'] = { + init: function() { + this.appendStatementInput("NAME") + .setCheck(null) + .appendField("style属性"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['html'] = { + init: function() { + this.appendDummyInput() + .appendField("一个网页"); + this.appendStatementInput("NAME") + .setCheck(null); + this.setPreviousStatement(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['diycode'] = { + init: function() { + this.appendDummyInput() + .appendField("在此输入任何代码(php、js、css......)") + .appendField(new Blockly.FieldTextInput("……"), "code"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(75); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['mysql_close'] = { + init: function() { + this.appendDummyInput() + .appendField("结束数据库连接"); + this.appendValueInput("example") + .setCheck(null) + .appendField("对象名"); + this.appendValueInput("name") + .setCheck("String") + .appendField("数据库名"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['head'] = { + init: function() { + this.appendDummyInput() + .appendField("头部"); + this.appendStatementInput("NAME") + .setCheck(null); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['body'] = { + init: function() { + this.appendDummyInput() + .appendField("身体"); + this.appendStatementInput("NAME") + .setCheck(null); + this.appendDummyInput() + .appendField("属性"); + this.appendStatementInput("attribute") + .setCheck(null); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['title'] = { + init: function() { + this.appendValueInput("NAME") + .setCheck("String") + .appendField("标题:"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(160); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['html5'] = { + init: function() { + this.appendDummyInput() + .appendField("HTML5标准网页声明"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['h_'] = { + init: function() { + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([["一级","h1"], ["二级","h2"], ["三级","h3"], ["四级","h4"], ["五级","h5"], ["六级","h6"]]), "test") + .appendField("文本"); + this.appendDummyInput() + .appendField("内容"); + this.appendStatementInput("NAME") + .setCheck(null); + this.appendDummyInput() + .appendField("属性"); + this.appendStatementInput("attribute") + .setCheck(null); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(65); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['p'] = { + init: function() { + this.appendDummyInput() + .appendField("段落标签"); + this.appendDummyInput() + .appendField("内容"); + this.appendStatementInput("NAME") + .setCheck(null); + this.appendDummyInput() + .appendField("属性"); + this.appendStatementInput("attribute") + .setCheck(null); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(65); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['img'] = { + init: function() { + this.appendDummyInput() + .appendField("图像") + .appendField(new Blockly.FieldTextInput("来源"), "src") + .appendField("宽") + .appendField(new Blockly.FieldNumber(100), "width") + .appendField("高") + .appendField(new Blockly.FieldNumber(100), "height"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(315); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['a'] = { + init: function() { + this.appendDummyInput() + .appendField("超链接") + .appendField(new Blockly.FieldTextInput("https://www.w3school.com.cn/html"), "link"); + this.appendDummyInput() + .appendField("内容"); + this.appendStatementInput("NAME") + .setCheck(null); + this.appendDummyInput() + .appendField("属性"); + this.appendStatementInput("attribute") + .setCheck(null); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(195); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['video'] = { + init: function() { + this.appendDummyInput() + .appendField("视频") + .appendField(new Blockly.FieldTextInput("来源"), "src") + .appendField("宽") + .appendField(new Blockly.FieldNumber(100), "width") + .appendField("高") + .appendField(new Blockly.FieldNumber(100), "height"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(315); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['br'] = { + init: function() { + this.appendDummyInput() + .appendField("换行"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(180); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; +Blockly.Blocks['shuxing'] = { + init: function() { + this.appendValueInput("value") + .setCheck("String") + .appendField("属性名") + .appendField(new Blockly.FieldTextInput("name"), "name") + .appendField("属性值"); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['diycode2'] = { + init: function() { + this.appendDummyInput() + .appendField("在此输入任何代码") + .appendField(new Blockly.FieldTextInput("……"), "code"); + this.setOutput(true, null); + this.setColour(75); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + +Blockly.Blocks['css'] = { + init: function() { + this.appendStatementInput("NAME") + .setCheck(null) + .appendField("CSS样式(属性)"); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(230); + this.setTooltip(""); + this.setHelpUrl(""); + } +}; + + +
+ +
+ + +
+ +
+ +
+ +
+ \ No newline at end of file -- Gitee From 8f5a9bbbb086763330a792eb9b4f56641c37c6c6 Mon Sep 17 00:00:00 2001 From: Codekpy <1942171924@qq.com> Date: Mon, 14 Nov 2022 11:11:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.php b/index.php index 1df94ce..ea67bd8 100644 --- a/index.php +++ b/index.php @@ -286,6 +286,10 @@ style="border: transparent solid 3px;border-radius: 100%;" src=".\blockly\ini\site\zbc.png">邹帛辰 +
诗岸单推人 +
-- Gitee