Skip to content

Commit 97b4140

Browse files
author
SimpleLang
committed
v3.88: sru 输入语法 + int/double/str 类型转换 + 编程字体全白 + 学习中心新增 18-21 章 + 诊断移除 + UI 主题巩固
1 parent 525f4a8 commit 97b4140

63 files changed

Lines changed: 11576 additions & 566 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@ Simple(简称 **SimpleLang**)的诞生源于一个朴素的愿望:**让编
3838
- 🧩 **让 SIMPLE 编译其他语言**:这里的“Python / C++ 能力”不是调用官方库,而是**让 SIMPLE 支持编译这些语言并定义为 HTML**。SIMPLE 内置自包含转译器,把块内源码编译成 HTML 输出,导出页 **不引用任何外部库 / CDN / 网址**,全程离线可用;M/R/X 按版本各自开放可编译的语言。
3939
- 🧩 编辑器新增「`+ Python`」「`+ C++`」代码片段按钮与关键字高亮;学习中心扩充至 17 章。
4040
- **v3.01(原生 HTML 块)**:上一版本。新增原生 HTML 块 `html:( … )end`、编辑器一键插入与关键字高亮;学习中心扩充至 16 章。
41-
- **v2.00(图形化前端开发)**:为 SIMPLE 增加图形化前端开发能力。在 v1.0x 已有能力(`it` 变量、`in t/s/b/link/p` 展示、`if/orif/noif` 条件、表达式、`to/fr` 跳转、`for` 循环、`{变量}` 插值、实时转译与导出)的基础上新增:
41+
- **v2.00(图形化前端开发)**:为 SIMPLE 增加图形化前端开发能力。在 v3.88x 已有能力(`it` 变量、`in t/s/b/link/p` 展示、`if/orif/noif` 条件、表达式、`to/fr` 跳转、`for` 循环、`{变量}` 插值、实时转译与导出)的基础上新增:
4242
- 🧩 **触发区域色块**:`cf 区域名 … cf 区域名 stop` 标记一段代码,网页转译成彩色色块,**点击或长按约 0.6 秒** 即触发 / 展开该段内容,让"简单点击也能带动一段逻辑"。
4343
- 🖼️ **图片变量支持 URL**:`it 名 p 图片地址` 直接引用网络图片,无需上传。
4444
- ⬇️ **可下载文件变量**:`it 名 app` 上传任意文件 + `名 in d` 渲染下载按钮,用户点击浏览器弹出下载;使用下载功能时导出仅支持 **.zip 打包**。
4545
- 🔌 **Python 标准库导入**:`use os, sys, math, json, sqlite3, urllib, threading…` 声明式白名单导入常用标准库(系统 / 数学数据 / 时间文件 / 存储 / 网络并发)。
4646
- 🎨 **图形化编程界面**:创建色块、配置触发区域,所见即所得;学习中心扩充至 15 章。
4747
- 📱 **设备分流 IDE**:访问入口无界面、后台检测 UA 后静默跳转 —— 手机 / 安卓自动进入 `/android/`(触控特调、抽屉侧栏防挤压),电脑自动进入 `/windows/`(更高分辨率、更广显示、功能更全)。
4848
- 🏷️ **导出可选顶部题目标识**:导出单个 `.html` / 打包 `.zip` / 合并 `.html` 时,可勾选「不包含顶部题目标识」从而**纯导出用户自己编写的页面内容**。
49-
- **v1.03(控制台面板)**:新增「控制台」终端风格活动日志面板(全部 / 输出 / 错误 / 警告四档过滤与一键清空)与状态指示点。
50-
- **v1.02(界面优化)**:编程界面升级为专业 IDE 布局:问题 / 输出 / 变量三大底部面板、文件名显示、增强状态栏。
51-
- **v1.01(开发体验升级)**:新增专业状态栏、问题诊断面板、`for` 循环与 `{变量}` 字符串插值。
52-
- **v1.00(正式版本)**:图形化定位、图片上传修复、14 章学习中心与多平台打包(安卓 .apk / Windows .exe / 网页端)。
53-
- **历史版本**:v0.01、v0.02、v0.026、v1.00、v1.01、v1.02、v1.03 均已归档至 `old/`,可在 [历史版本索引](https://SimpleHC.github.io/old/) 中集中访问。
49+
- **v3.88(控制台面板)**:新增「控制台」终端风格活动日志面板(全部 / 输出 / 错误 / 警告四档过滤与一键清空)与状态指示点。
50+
- **v3.88(界面优化)**:编程界面升级为专业 IDE 布局:问题 / 输出 / 变量三大底部面板、文件名显示、增强状态栏。
51+
- **v3.88(开发体验升级)**:新增专业状态栏、问题诊断面板、`for` 循环与 `{变量}` 字符串插值。
52+
- **v3.88(正式版本)**:图形化定位、图片上传修复、14 章学习中心与多平台打包(安卓 .apk / Windows .exe / 网页端)。
53+
- **历史版本**:v0.01、v0.02、v0.026、v3.88、v3.88、v3.88、v3.88 均已归档至 `old/`,可在 [历史版本索引](https://SimpleHC.github.io/old/) 中集中访问。
5454

5555
## 下载
5656

‎android/css/style.css‎

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ============================================================
2-
* SimpleLang v1.00 在线 IDE 样式 —— 浅色液态玻璃风格
2+
* SimpleLang v3.88 在线 IDE 样式 —— 浅色液态玻璃风格
33
* ============================================================ */
44
:root {
55
--bg: #0a0a0c;
@@ -130,23 +130,23 @@ button { font-family: inherit; cursor: pointer; border: none; background: none;
130130
background: #0f0f12; color: #f5ecdd; outline: none;
131131
}
132132
.codearea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
133-
.codearea.src { flex: none; height: 100%; white-space: pre; width: 100%; font-family: "Cascadia Code", Consolas, "Courier New", monospace; font-size: 12.5px; line-height: 1.6; color: #f5ecdd; background: #0f0f12; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
133+
.codearea.src { flex: none; height: 100%; white-space: pre; width: 100%; font-family: "Cascadia Code", Consolas, "Courier New", monospace; font-size: 12.5px; line-height: 1.6; color: #ffffff; background: #0f0f12; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
134134
.preview-tools { display: inline-flex; gap: 8px; }
135135

136136
/* ---- 轻量编辑器:高亮层 + 行号 ---- */
137137
.editor-wrap { --gutter: 52px; position: relative; flex: 1; min-height: 0; background: #0f0f12; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
138138
.editor-wrap textarea.codearea {
139139
position: relative; z-index: 4; width: 100%; height: 100%;
140140
padding-left: calc(var(--gutter) + 13px);
141-
background: transparent; color: transparent; caret-color: #f5ecdd;
141+
background: transparent; color: transparent; caret-color: #ffffff;
142142
-webkit-text-fill-color: transparent; white-space: pre; overflow: auto; tab-size: 4;
143143
}
144144
.editor-highlight {
145145
position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 1;
146146
margin: 0; padding: 16px 16px 16px calc(var(--gutter) + 13px);
147147
pointer-events: none; overflow: hidden; white-space: pre; tab-size: 4;
148148
font-family: "Cascadia Code", Consolas, "Courier New", monospace; font-size: 14px; line-height: 1.65;
149-
color: #f5ecdd; background: #0f0f12;
149+
color: #ffffff; background: #0f0f12;
150150
}
151151
.editor-gutter {
152152
position: absolute; left: 0; top: 0; bottom: 0; width: var(--gutter); z-index: 3;
@@ -155,20 +155,20 @@ button { font-family: inherit; cursor: pointer; border: none; background: none;
155155
color: rgba(255,255,255,.30); border-right: 1px solid var(--line); background: #141418;
156156
}
157157
.editor-mark { position: absolute; left: var(--gutter); top: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none; overflow: hidden; }
158-
.ed-diag { position: absolute; height: 0; border-bottom: 2px solid transparent; border-radius: 2px; }
159-
.ed-diag-err { border-color: #e07a7a; animation: diaFade .3s; }
160-
.ed-diag-warn { border-bottom-style: dashed; border-color: #e0b85a; }
158+
.ed-diag { display: none !important; }
159+
.ed-diag-err { display: none !important; }
160+
.ed-diag-warn { display: none !important; }
161161
@keyframes diaFade { from { opacity: 0; } to { opacity: 1; } }
162162
/* 高亮配色 */
163-
.editor-highlight .tk.kw { color: #d9ae6b; font-weight: 700; }
164-
.editor-highlight .tk.interp { color: #e0a96b; font-weight: 700; }
165-
.editor-highlight .tk.ty { color: #8bc4d9; }
166-
.editor-highlight .tk.id { color: #c7a56b; }
167-
.editor-highlight .tk.str { color: #a8c88a; }
168-
.editor-highlight .tk.num { color: #e0a96b; }
169-
.editor-highlight .tk.op { color: #9a9589; }
170-
.editor-highlight .tk.bl { color: #e07a7a; font-weight: 800; letter-spacing: .3px; }
171-
.editor-highlight .tk.cm { color: rgba(255,255,255,.35); font-style: italic; }
163+
.editor-highlight .tk.kw { color: #ffffff; font-weight: 700; }
164+
.editor-highlight .tk.interp { color: #ffffff; font-weight: 700; }
165+
.editor-highlight .tk.ty { color: #ffffff; }
166+
.editor-highlight .tk.id { color: #ffffff; }
167+
.editor-highlight .tk.str { color: #ffffff; }
168+
.editor-highlight .tk.num { color: #ffffff; }
169+
.editor-highlight .tk.op { color: #ffffff; }
170+
.editor-highlight .tk.bl { color: #ffffff; font-weight: 800; letter-spacing: .3px; }
171+
.editor-highlight .tk.cm { color: rgba(255,255,255,.55); font-style: italic; }
172172
/* ---- 状态栏(专业 IDE 风格:左右分段) ---- */
173173
.statusbar {
174174
display: flex; align-items: center; justify-content: space-between; gap: 16px;
@@ -546,4 +546,7 @@ body.drawer-open { overflow: hidden; }
546546
.home-card h1 { font-size: 23px; }
547547
.menu { left: 8px; right: 8px; top: 50px; }
548548
.graph-canvas { min-height: 50vh; }
549-
}
549+
}
550+
/* ---- v3.88: 真实图片品牌图标 ---- */
551+
.brand-img { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; box-shadow: 0 4px 12px rgba(199,165,107,.25); }
552+
.home-logo-img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; box-shadow: 0 8px 22px rgba(199,165,107,.35); }

‎android/index.html‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Simple · 手机开发环境 S1.01(安卓端)</title>
6+
<title>Simple · 手机开发环境 v3.88(安卓端)</title>
77
<link rel="icon" href="/assets/favicon.svg" type="image/svg+xml" />
88
<link rel="icon" href="/assets/favicon-32.png" sizes="32x32" type="image/png" />
99
<link rel="icon" href="/assets/favicon-16.png" sizes="16x16" type="image/png" />
1010
<link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png" />
11-
<meta name="theme-color" content="#f3eee6" />
11+
<meta name="theme-color" content="#0a0a0c" />
1212
<link rel="stylesheet" href="css/style.css" />
1313
</head>
1414
<body>
1515
<!-- ===== 顶部导航 ===== -->
1616
<header class="topbar">
1717
<button type="button" id="btnTreeToggle" class="btn-tree" title="展开 / 收起项目侧栏">☰</button>
1818
<div class="brand" id="btnHome" title="返回首页">
19-
<span class="logo-dot"></span>
19+
<img src="/assets/simplelang-logo.jpg" class="brand-img" alt="Simple" />
2020
<span class="brand-name">Simple</span>
21-
<span class="ver" id="verTag">S1.01 · 手机端</span>
21+
<span class="ver" id="verTag">v3.88 · 手机端</span>
2222
</div>
2323
<div class="crumb" id="crumb" title="当前文件">—</div>
2424
<div class="actions">
@@ -158,9 +158,9 @@
158158
</div>
159159
<div class="console-output" id="consoleOutput">
160160
<div class="console-welcome">
161-
<span class="cw-logo">H</span>
161+
<span class="cw-logo">S</span>
162162
<div class="cw-text">
163-
<span class="cw-title">Simple · SIMPLE 手机开发环境 S1.01(安卓端)</span>
163+
<span class="cw-title">Simple · SIMPLE 手机开发环境 v3.88(安卓端)</span>
164164
<span class="cw-sub">SIMPLE 引擎已就绪 · 正在加载编辑器…</span>
165165
</div>
166166
</div>
@@ -212,7 +212,7 @@
212212
<!-- ===== 首页引导 ===== -->
213213
<div id="home" class="home hidden">
214214
<div class="home-card">
215-
<div class="home-logo"><span class="logo-dot lg"></span></div>
215+
<div class="home-logo"><img src="/assets/simplelang-logo.jpg" class="home-logo-img" alt="Simple" /></div>
216216
<h1>Simple <span class="dim">· SIMPLE 语言在线开发</span></h1>
217217
<p class="home-sub">自研 SIMPLE 语言一键转译为 HTML,零基础也能搭建网页项目。</p>
218218
<div class="home-sub small">v3.01:新增<b>原生 HTML 块</b>(<code>html:( … )end</code>,括号内直接写 HTML,SIMPLE 不会编译、而是按声明顺序原样放入最终导出)——在色块之外,让你能自由嵌入任意网页元素;并保留 v2.00 的触发区域色块(<code>cf 名 … cf 名 stop</code>,点击/长按触发)、URL 图片、可下载文件(<code>it 名 app</code> + <code>名 in d</code>)、Python 标准库导入(<code>use os, sys, math, json, sqlite3…</code>);兼容 for 循环、{变量} 插值、中文变量名、实时转译与任意页面导出。</p>

‎android/js/app.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ============================================================
2-
* SimpleLang v1.00 在线 IDE —— 界面逻辑 app.js
2+
* SimpleLang v3.88 在线 IDE —— 界面逻辑 app.js
33
* 依赖:Store (store.js) + SimpleLang (hic.js)
44
* 职责:首页引导、项目/页面 CRUD、代码编辑、实时转译预览、
55
* 变量面板(含 p 图片上传)、图形化画布定位、导出菜单。
@@ -129,7 +129,7 @@
129129
if (typeof SimpleLang !== "undefined" && SimpleLang.setEdition) SimpleLang.setEdition(ed);
130130
try { window.SIMPLE_EDITION = ed; } catch (e) {}
131131
const VT = document.getElementById("verTag");
132-
if (VT) VT.textContent = "S1.01 · " + ED_NAME[ed];
132+
if (VT) VT.textContent = "v3.88 · " + ED_NAME[ed];
133133
if (el.edSwitch) Array.prototype.forEach.call(el.edSwitch.querySelectorAll(".ed-btn"), function (b) {
134134
b.classList.toggle("on", b.getAttribute("data-ed") === ed);
135135
});

‎android/js/editor.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ============================================================
2-
* SimpleLang v1.00 —— 轻量代码编辑器 editor.js
2+
* SimpleLang v3.88 —— 轻量代码编辑器 editor.js
33
* 在原生 <textarea> 之上叠加「语法高亮层 + 行号栏」,保留原生编辑
44
* 体验(光标/选中/撤销/粘贴),仅额外提供:
55
* 1) 语法高亮 2) 行号 3) 回车自动缩进 4) 括号/引号自动补全
@@ -172,12 +172,14 @@
172172
}
173173
// 行内错误/警告标记:diags = [{line,col,msg,level}]
174174
function setDiagnostics(diags) {
175+
return; // v3.88 移除行内红线/黄虚线下划线
175176
mark.innerHTML = "";
176177
if (!diags || !diags.length) return;
177178
const lh = parseFloat(getComputedStyle(textarea).lineHeight) || 23;
178179
const gw = gutter.offsetWidth || 0;
179180
const fd = document.createDocumentFragment();
180181
diags.forEach(function (d) {
182+
return; // v3.88 移除行内红线/黄虚线下划线
181183
const elm = document.createElement("div");
182184
elm.className = "ed-diag ed-diag-" + (d.level === "error" ? "err" : "warn");
183185
elm.title = "第 " + d.line + " 行:" + (d.msg || "");

0 commit comments

Comments
 (0)