浏览代码

Added Web Builder

TC pushbot 5 4 年之前
父节点
当前提交
021ce1c422

二进制
documents/icon/prototype 1.kra


二进制
documents/icon/prototype 1.png


二进制
documents/icon/prototype 2.kra


二进制
documents/icon/prototype 2.kra~


二进制
documents/icon/prototype 2.png


+ 3 - 0
web/Blog/backend/hidePost.js

@@ -19,6 +19,9 @@ function hidePost(postObjectName, webroot){
         filelib.deleteFile(publishWebPosition);
     }
 
+    //Remove the file from the index list
+    removeTitleFromPostList(webroot, postObjectName);
+
     sendResp("OK");
 }
 

+ 20 - 0
web/Blog/backend/renderIndex.js

@@ -0,0 +1,20 @@
+/*
+    Rendering of the blog index
+
+    Require paramter:
+    title
+    subtitle
+    footer
+*/
+
+requirelib("filelib");
+requirelib("appdata");
+includes("config.js");
+includes("helper.js");
+
+function render(){
+    var indexTemplate = appdata.readFile("Blog/template/index.html");
+    
+}
+
+render();

+ 10 - 4
web/Blog/index.html

@@ -96,24 +96,30 @@
 						<a class="ts fluid small button blog main" href="editor.html"><i class="add icon"></i> New Post</a>
 						<button class="ts fluid small button blog green topPad"><i class="text file outline icon"></i> Update Post Renders</button>
 						<div class="ts divider"></div>
-						<button class="ts fluid small button blog" onclick="openBlog();"><i class="text file outline icon"></i> View Blog</button>
-						<button class="ts fluid small button blog topPad" onclick="openWebRoot();"><i class="folder open icon"></i> Open www</button>
-						<button class="ts fluid small button topPad" onclick="openPersonalPageTab();"><i class="setting icon"></i> Homepage Settings</button>
+						<button class="ts fluid basic small button blog" onclick="openBlog();"><i class="text file outline icon"></i> View Blog</button>
+						<button class="ts fluid basic small button blog topPad" onclick="openWebRoot();"><i class="folder open icon"></i> Open www</button>
+						<div class="ts divider"></div>
+						<button class="ts fluid basic small button topPad" onclick="openBlogSettings();"><i class="home icon"></i> Blog Settings</button>
+						<button class="ts fluid basic small button topPad" onclick="openPersonalPageTab();"><i class="setting icon"></i> Homepage Settings</button>
 					</div>
 				</div>
 			</div>
 			<br><br><br>
 		</div>
+		
 		<script>
 			var currentWebDeployRoot = "";
 
-
 			//Get the current web root path
 			getWebRoot(function(){
 				//List all the post stored in the system
 				listPost();
 			});
 
+			function openBlogSettings(){
+				window.location.href = "setting.html";
+			}
+
 			function openPost(object){
 				//Parse the file object following ArozOS file descriptor protocol
 				var filepath = $(object).attr("filepath");

+ 127 - 0
web/Blog/setting.html

@@ -0,0 +1,127 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="UTF-8">
+		<meta name="apple-mobile-web-app-capable" content="yes" />
+		<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
+		<meta name="theme-color" content="#ff9224">
+		<link rel="stylesheet" href="../script/tocas/tocas.css">
+		<script src="../script/tocas/tocas.js"></script>
+		<script src="../script/jquery.min.js"></script>
+		<script src="../script/ao_module.js"></script>
+
+		<link rel="manifest" crossorigin="use-credentials" href="manifest.json">
+		<title>Blog</title>
+		<style>
+			body{
+				background-color: white;
+			}
+
+			.postControls{
+				position: absolute;
+				top: 0.5em;
+				right: 0.5em;
+			}
+
+			.blog.main{
+				background-color: #ff9224;
+				border: 1px solid #ff9224;
+				color: white;
+			}
+
+			.blog.main:hover{
+				background-color: #c7721c !important;
+				border: 1px solid #c7721c !important;
+				color: white !important;
+			}
+
+			.blog.green{
+				background-color: #47d191;
+				border: 1px solid #47d191;
+				color: white;
+			}
+
+			.blog.green:hover{
+				background-color: #38a170 !important;
+				border: 1px solid #38a170 !important;
+				color: white !important;
+			}
+
+			.blog.red{
+				background-color: #ff3d3d;
+				border: 1px solid #ff3d3d;
+				color: white;
+			}
+
+			.blog.red:hover{
+				background-color: #962d2d !important;
+				border: 1px solid #962d2d !important;
+				color: white !important;
+			}
+
+			.blog.blue{
+				background-color: #4287f5;
+				border: 1px solid #4287f5;
+				color: white;
+			}
+
+			.blog.blue:hover{
+				background-color: #336bc4 !important;
+				border: 1px solid #336bc4 !important;
+				color: white !important;
+			}
+
+
+			
+            .topPad{
+                margin-top: 4px;
+            }
+		</style>
+	</head>
+	<body>
+		<br><br>
+		<div class="ts container">
+			<a href="index.html">
+				<h4><img class="ts mini spaced image" src="img/module_icon.png" style="margin-right: 12px;">  Blog Writer</h4>
+            </a>
+			<div class="ts divider"></div>
+			<h3>Settings</h3>
+            <div class="ts segment">
+                <h4><i class="ts home icon"></i> Blog Homepage Settings</h4>
+                <p>Title Text</p>
+                <div class="ts fluid input">
+                    <input id="title" type="text" placeholder="Title">
+                </div>
+                <br>
+                <p>Subtitle Text</p>
+                <div class="ts fluid input">
+                    <input id="subtitle" type="text" placeholder="Subtitle">
+                </div>
+                <p>Footer Text</p>
+                <div class="ts fluid input">
+                    <input id="footer" type="text" placeholder="Footer">
+                </div>
+                <br><br>
+                <button class="ts button blog green" onclick="updateRender();"><i class="save icon"></i> Update Render</button>
+            </div>
+			<br><br><br>
+		</div>
+		
+		<script>
+
+            function updateRender(){
+                var title = $("#title").val();
+                var subtitle = $("#subtitle").val();
+                var footer = $("#footer").val();
+
+                ao_module_agirun("Blog/backend/renderIndex.html", {
+                    title: title,
+                    subtitle: subtitle,
+                    footer: footer
+                }, function(data){
+                    console.log(data);
+                })
+            }
+		</script>
+	</body>
+</html>

+ 57 - 22
web/Blog/template/index.html

@@ -8,7 +8,7 @@
 		<link rel="stylesheet" href="../../../script/semantic/semantic.min.css">
 		<script src="../../../script/semantic/semantic.min.js"></script>
 		<link rel="stylesheet" href="blog.css">
-		<title>托比的神奇蹦蹦部落格</title>
+		<title>{{blog_title}}</title>
 		<style>
 
 		</style>
@@ -18,49 +18,84 @@
 			<br><br>
 			<div class="ui container" >
 				<h1 class="ui header" style="color: white;">
-					托比的神奇蹦蹦部落格
-					<div class="sub header" style="color: white;">技術測試用的網站</div>
+					{{blog_title}}
+					<div class="sub header" style="color: white;">{{blog_subtitle}}</div>
 				</h1>
 			</div>
 			<br><br>
 		</div>
 		<br>
 		<div class="ui narrow container relaxed stackable grid">
-			<div class="twelve wide column">
+			<div class="sixteen wide column" id="postlist">
 				<!-- Post List -->
 				<div class="ui segment post">
-					<div class="ui blue ribbon label"> 2021-05-30</div>
+					<div class="ui teal ribbon label"> owo</div>
 					<h2 class="ui header">
-						<a href="" style="color: inherit;">洨洨安群居地</a> 
+						<a href="" style="color: inherit;">No Posts</a> 
 						<div class="sub header">
-							<div class="ui breadcrumb">
-								<a class="section">yami</a>
-								<span class="divider">,</span>
-								<a class="section">earlySpring</a>
-								<span class="divider">,</span>
-								<a class="section">teacat</a>
-						  </div>
+							There are no post in this blog
 						</div>
 					</h2>
 					<p>
-						沒有,2021 年始春還沒有到來…
+						The posts.json index file is not found on this server or there is no post listed in the index file. <br>
+						That is all we know.
 					</p>
 				</div>
 				
 			</div>
-			<div class="four wide column">
-				<div class="ui flatted  segment">
-					<h3>Hello World</h3>
-					<p>github.com/abc</p>
-				</div>
-			</div>
 		</div>
 		
 		<!-- footer -->
 		<div class="ui container">
 			<div class="ui divider"></div>
-			Template CopyRight ArozOS v1.114
+			{{footer}}
 		</div>
-		
+		<script>
+			loadPostList(0, 20);
+
+			function loadPostList(startIndex=0, renderPostNumber = 20){
+				
+				$.getJSON("posts.json", function(posts){
+					
+					if (posts.error != undefined || posts.length == 0){
+						//Error occured
+					}else{
+						$("#postlist").html(``);
+						posts.reverse(); //From latested to oldest
+						posts.forEach(post => {
+							//Generate tag index
+							var tags = post.summary[2];
+							var tagsHTML = ``;
+							for (var i = 0; i < tags.length; i++){
+								tags[i] = `<a class="section">${tags[i]}</a>`;
+							}
+							tagsHTML = tags.join(`<span class="divider">,</span>`);
+
+							//Generate contents 
+							let tmp = document.createElement("DIV");
+							tmp.innerHTML = post.summary[1];
+							let strippedContent = tmp.textContent || tmp.innerText || "";
+
+							$("#postlist").append(`<div class="ui segment post">
+							<div class="ui blue ribbon label"> 2021-05-30</div>
+							<h2 class="ui header">
+								<a href="./posts/${post.name}.html" style="color: inherit;">${post.summary[0]}</a> 
+								<div class="sub header">
+									<div class="ui breadcrumb">
+										${tagsHTML}
+									</div>
+								</div>
+							</h2>
+							<p>
+								${strippedContent}
+							</p>
+							<a href="./posts/${post.name}.html">Read More</a>
+						</div>`);
+						});
+						
+					}
+				});
+			}
+		</script>
 	</body>
 </html>

+ 50 - 0
web/Web Builder/backend/save.js

@@ -0,0 +1,50 @@
+/*
+    Save.js
+
+    This file save the web content to file
+    require paramter:
+    filepath
+    content
+
+    Optional:
+    template
+    title
+*/
+
+requirelib("filelib");
+requirelib("appdata");
+
+function saveFile(){
+    //Load templates
+    var templateContent = "";
+    if (typeof(template) == "undefined" || !filelib.fileExists(template)){
+        //Use default template
+        templateContent = appdata.readFile("Web Builder/template.html");
+        
+        //Custom CSS replacement in the content
+        content = content.split("<table>").join("<table class='ui celled table'>")
+
+        //Replace seperation lines
+        content = content.split("__se__solid").join("__se__ ui divider");
+        content = content.split("__se__dotted").join("__se__ ui dotted divider");
+        content = content.split("__se__dashed").join("__se__ ui dashed divider");
+
+    }else if (template != ""){
+        //Use user defined template
+        templateContent = filelib.readFile(template);
+    }
+
+    var defaultTitle = USERNAME + " Webpage";
+    if (typeof(title) != "undefined" && title != ""){
+        defaultTitle = title
+    }
+
+    //Apply the content to the template
+    templateContent = templateContent.split("{{title}}").join(defaultTitle);
+    templateContent = templateContent.split("{{content}}").join(content);
+   
+    filelib.writeFile(filepath, templateContent)
+    sendResp("OK");
+}
+
+saveFile();

+ 141 - 0
web/Web Builder/framedEditor.html

@@ -0,0 +1,141 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="UTF-8">
+		<meta name="apple-mobile-web-app-capable" content="yes" />
+		<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
+		<meta name="theme-color" content="#ff9224">
+		<script src="../script/jquery.min.js"></script>
+		
+		<!-- Editor -->
+		<link rel="stylesheet" href="../script/semantic/semantic.min.css">
+		<link href="script/suneditor/suneditor.min.css" rel="stylesheet">
+	
+		<script src="script/suneditor/suneditor.min.js"></script>
+
+		<script src="script/suneditor/en.js"></script>
+
+		<style>
+			body{
+				margin: 0px;
+			}
+			#editorWrapper{
+				position: fixed;
+				left: 0px;
+				top: 0px;
+				width: 100%;
+				height: 100%;
+			}
+
+			#maineditor{
+				width: calc(100% - 10px);
+				height: 300px;
+			}
+		</style>
+	</head>
+	<body>
+		<div id="editorWrapper">
+			<textarea id="maineditor"></textarea>
+		</div>
+		
+		<script>
+			//Start a new editor if there is no file ported in
+			var editor;
+			if (parent.inputFiles == null){
+				//New Editor
+				initEditor();
+				parent.handleWindowResize();
+			}else{
+				//Get the filepath and load it
+				var file = parent.inputFiles;
+				//Load the given file
+				$.ajax({
+					url: "../media?file=" + file.filepath, 
+					success: function(data){
+						var body = data.substring(data.indexOf("<body>")+6,data.indexOf("</body>"));
+
+						//Check if the html include title. If yes, grab it as well
+						if (data.includes("<title>") && data.includes("</title>")){
+							var title = data.substring(data.indexOf("<title>")+7,data.indexOf("</title>"));
+							parent.updateTitle(title);
+						}
+						
+						$("#maineditor").html(body);
+						parent.editingFile = file.filepath;
+						
+						initEditor();
+						parent.handleWindowResize();
+					}
+				});
+			}
+			
+			
+			function getContent(){
+				return editor.getContents();
+			}
+
+			function initEditor(){
+				editor = SUNEDITOR.create(document.getElementById('maineditor'),
+					{	
+						lang: SUNEDITOR_LANG['en'],
+						buttonList: [
+							['undo', 'redo', 'save',  'preview'],
+							['font', 'fontSize', 'formatBlock'],
+							['paragraphStyle', 'blockquote'],
+							['bold', 'underline', 'italic', 'strike', 'subscript', 'superscript'],
+							['fontColor', 'hiliteColor'],
+							['removeFormat'],
+							'/', // Line break
+							['outdent', 'indent'],
+							['align', 'horizontalRule', 'list', 'lineHeight'],
+							['table', 'link', 'image', 'video', 'audio' /** ,'math' */], // You must add the 'katex' library at options to use the 'math' plugin.
+							/** ['imageGallery'] */ // You must add the "imageGalleryUrl".
+							['showBlocks', 'codeView']
+						],
+						paragraphStyles : [
+							{
+								name: 'Segment',
+								class: '__se__ ui segment',
+							},
+							{
+								name: 'Red Segment',
+								class: '__se__ ui red segment',
+							},
+							{
+								name: 'Blue Segment',
+								class: '__se__ ui blue segment',
+							},
+							{
+								name: 'Green Segment',
+								class: '__se__ ui green segment',
+							},
+							{
+								name: 'Message',
+								class: '__se__ ui message',
+							},
+							{
+								name: 'Red Message',
+								class: '__se__ ui red message',
+							},
+							{
+								name: 'Blue Message',
+								class: '__se__ ui blue message',
+							},
+							{
+								name: 'Green Message',
+								class: '__se__ ui green message',
+							}
+						],
+						"resizingBar": false,
+						callBackSave : function (contents, isChanged) {
+							parent.handleSavefile(contents);
+							return false;
+						}
+					}
+				);
+				return editor;
+			}
+
+		</script>
+	</body>
+</html>

二进制
web/Web Builder/img/desktop_icon.png


二进制
web/Web Builder/img/desktop_icon.psd


二进制
web/Web Builder/img/module_icon.png


二进制
web/Web Builder/img/module_icon.psd


二进制
web/Web Builder/img/pwa/128.png


二进制
web/Web Builder/img/pwa/192.png


二进制
web/Web Builder/img/pwa/256.png


二进制
web/Web Builder/img/pwa/512.png


二进制
web/Web Builder/img/small_icon.png


二进制
web/Web Builder/img/small_icon.psd


+ 203 - 0
web/Web Builder/index.html

@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="UTF-8">
+		<meta name="apple-mobile-web-app-capable" content="yes" />
+		<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
+		<meta name="theme-color" content="#ff9224">
+		<script src="../script/jquery.min.js"></script>
+		<script src="../script/ao_module.js"></script>
+		<link rel="stylesheet" href="../script/semantic/semantic.min.css">
+		<script src="../script/semantic/semantic.min.js"></script>
+		<title>Web Builder</title>
+
+		<!-- <link rel="manifest" crossorigin="use-credentials" href="manifest.json"> -->
+		<style>
+			body {
+				background-color: white;
+			}
+
+			.blog.main{
+				background-color: #ff9224;
+				border: 1px solid #ff9224;
+				color: white;
+			}
+
+			.blog.main:hover{
+				background-color: #c7721c !important;
+				border: 1px solid #c7721c !important;
+				color: white !important;
+			}
+
+			.blog.green{
+				background-color: #47d191;
+				border: 1px solid #47d191;
+				color: white;
+			}
+
+			.blog.green:hover{
+				background-color: #38a170 !important;
+				border: 1px solid #38a170 !important;
+				color: white !important;
+			}
+
+			.blog.red{
+				background-color: #c4413d;
+				border: 1px solid #c4413d;
+				color: white;
+			}
+
+			.blog.red:hover{
+				background-color: #8c302d !important;
+				border: 1px solid #8c302d !important;
+				color: white !important;
+			}
+
+            .topPad{
+                margin-top: 4px;
+            }
+
+			#editorFrame{
+				width: 100%;
+				border: 0px solid transparent;
+				height: calc(100% - 10px);
+			}
+		</style>
+	</head>
+	<body>
+		<div class="ui compact mini top attached menu">
+			<div class="item" style="font-weight: bold;">
+				Web Builder (Basic)
+			</div>
+			<div class="item" id="currentTitle">
+				(Default Title)
+			</div>
+			<a class="item" onclick="setTitle();">
+			  Change Title
+			</a>
+			<!-- 
+			<a class="item">
+			  Select Template
+			</a>
+			-->
+			<a class="item" onclick="forceSavePost();">
+				Save
+			</a>
+		  </div>
+		<iframe id="editorFrame" src="framedEditor.html"></iframe>
+		<script>
+			var editingFile = "";
+			var inputFiles = ao_module_loadInputFiles();
+			var editorWindow = $("#editorFrame")[0].contentWindow;
+			var currentWebDeployRoot = "";
+			var savePendingContents = "";
+			var currentTitle = "";
+			var currentTemplate = "";
+			
+			if (inputFiles != null && inputFiles.length > 0){
+				//Edit  mode
+				inputFiles = inputFiles[0];
+				ao_module_setWindowTitle(inputFiles.filename + " - Web Builder");
+			}else{
+				//New post mode
+				ao_module_setWindowTitle("untitled.html " + "- Web Builder")
+			}
+
+			getWebRoot();
+
+			function newEditor(){
+				editorWindow.initEditor();
+			}
+
+			function setTitle(){
+				var newtitle = prompt("Webpage Title", currentTitle);
+				if (newtitle != null){
+					updateTitle(newtitle);
+				}
+			}
+
+			function updateTitle(newtitle){
+				$("#currentTitle").text(newtitle);
+				currentTitle = newtitle;
+			}
+
+			function handleWindowResize(){
+				$(editorWindow.document).find("#suneditor_maineditor").css("width", "100%");
+				var heightOverride = window.innerHeight - 45;
+				$(editorWindow.document).find("#suneditor_maineditor").css("height",  + "px");
+				$(editorWindow.document).find(".se-wrapper").css("height", heightOverride - 100 + "px");
+				$(editorWindow.document).find(".se-wrapper-inner").css("height", heightOverride - 100 + "px");
+
+				$("#editorFrame").css("height", heightOverride + "px");
+			}
+
+			
+			$(window).on("resize", function(){
+				handleWindowResize();
+			});
+
+			function handleSavefile(content){
+				savePost(content);
+				return false;
+			}
+
+			function forceSavePost(){
+				var editorContent = editorWindow.getContent();
+				savePost(editorContent);
+				console.log("Saved");
+			}
+
+			function saveFileSelected(filedata){
+				for (var i=0; i < filedata.length; i++){
+					var filename = filedata[i].filename;
+					var filepath = filedata[i].filepath;
+					editingFile = filepath;
+					ao_module_setWindowTitle(filename + " - Web Builder")
+				}
+
+				//savePost again
+				var contentToSave = savePendingContents;
+				savePendingContents = "";
+				savePost(contentToSave);
+			}
+
+			function savePost(postContent){
+				if (editingFile == ""){
+					savePendingContents = postContent;
+					ao_module_openFileSelector(saveFileSelected, currentWebDeployRoot || "user:/Desktop", "new",false, {
+						defaultName: "untitled.html"
+					});
+					return false;
+				}else{
+					//Create post
+					ao_module_agirun("Web Builder/backend/save.js", {
+						filepath: editingFile,
+						content: postContent,
+						title: currentTitle,
+					}, function(data){
+						if (data.error !== undefined){
+							alert(data.error);
+						}else{
+							
+							
+						}
+					});
+				}
+			}
+
+			function getWebRoot(callback = undefined){
+				$.get("../system/network/www/webRoot", function(data){
+					if (data == null || data == "" || data == undefined){
+						callback("");
+						return;
+					}
+					currentWebDeployRoot = data;
+					if (callback != undefined){
+						callback(data);
+					}
+					
+				});
+			}
+		</script>
+	</body>
+</html>

+ 21 - 0
web/Web Builder/init.agi

@@ -0,0 +1,21 @@
+/*
+	Web Builder initiation script
+*/
+
+//Setup the module information
+var moduleLaunchInfo = {
+    Name: "Web Builder",
+	Desc: "The basic Web builder for writing HTML code",
+	Group: "Office",
+	IconPath: "Web%20Builder/img/module_icon.png",
+	Version: "0.1.0",
+	StartDir: "Web%20Builder/index.html",
+	SupportFW: true,
+	LaunchFWDir: "Web%20Builder/index.html",
+	InitFWSize: [1080, 580],
+	SupportedExt: [".html",".htm"]
+}
+
+
+//Register the module
+registerModule(JSON.stringify(moduleLaunchInfo));

+ 186 - 0
web/Web Builder/script/suneditor/en.js

@@ -0,0 +1,186 @@
+/*
+ * wysiwyg web editor
+ *
+ * suneditor.js
+ * Copyright 2017 JiHong Lee.
+ * MIT license.
+ */
+'use strict';
+
+(function (global, factory) {
+    if (typeof module === 'object' && typeof module.exports === 'object') {
+        module.exports = global.document ?
+            factory(global, true) :
+            function (w) {
+                if (!w.document) {
+                    throw new Error('SUNEDITOR_LANG a window with a document');
+                }
+                return factory(w);
+            };
+    } else {
+        factory(global);
+    }
+}(typeof window !== 'undefined' ? window : this, function (window, noGlobal) {
+    const lang = {
+        code: 'en',
+        toolbar: {
+            default: 'Default',
+            save: 'Save',
+            font: 'Font',
+            formats: 'Formats',
+            fontSize: 'Size',
+            bold: 'Bold',
+            underline: 'Underline',
+            italic: 'Italic',
+            strike: 'Strike',
+            subscript: 'Subscript',
+            superscript: 'Superscript',
+            removeFormat: 'Remove Format',
+            fontColor: 'Font Color',
+            hiliteColor: 'Highlight Color',
+            indent: 'Indent',
+            outdent: 'Outdent',
+            align: 'Align',
+            alignLeft: 'Align left',
+            alignRight: 'Align right',
+            alignCenter: 'Align center',
+            alignJustify: 'Align justify',
+            list: 'List',
+            orderList: 'Ordered list',
+            unorderList: 'Unordered list',
+            horizontalRule: 'Horizontal line',
+            hr_solid: 'Solid',
+            hr_dotted: 'Dotted',
+            hr_dashed: 'Dashed',
+            table: 'Table',
+            link: 'Link',
+            math: 'Math',
+            image: 'Image',
+            video: 'Video',
+            audio: 'Audio',
+            fullScreen: 'Full screen',
+            showBlocks: 'Show blocks',
+            codeView: 'Code view',
+            undo: 'Undo',
+            redo: 'Redo',
+            preview: 'Preview',
+            print: 'print',
+            tag_p: 'Paragraph',
+            tag_div: 'Normal (DIV)',
+            tag_h: 'Header',
+            tag_blockquote: 'Quote',
+            tag_pre: 'Code',
+            template: 'Template',
+            lineHeight: 'Line height',
+            paragraphStyle: 'Paragraph style',
+            textStyle: 'Text style',
+            imageGallery: 'Image gallery',
+            mention: 'Mention'
+        },
+        dialogBox: {
+            linkBox: {
+                title: 'Insert Link',
+                url: 'URL to link',
+                text: 'Text to display',
+                newWindowCheck: 'Open in new window',
+                downloadLinkCheck: 'Download link',
+                bookmark: 'Bookmark'
+            },
+            mathBox: {
+                title: 'Math',
+                inputLabel: 'Mathematical Notation',
+                fontSizeLabel: 'Font Size',
+                previewLabel: 'Preview'
+            },
+            imageBox: {
+                title: 'Insert image',
+                file: 'Select from files',
+                url: 'Image URL',
+                altText: 'Alternative text'
+            },
+            videoBox: {
+                title: 'Insert Video',
+                file: 'Select from files',
+                url: 'Media embed URL, YouTube/Vimeo'
+            },
+            audioBox: {
+                title: 'Insert Audio',
+                file: 'Select from files',
+                url: 'Audio URL'
+            },
+            browser: {
+                tags: 'Tags',
+                search: 'Search',
+            },
+            caption: 'Insert description',
+            close: 'Close',
+            submitButton: 'Submit',
+            revertButton: 'Revert',
+            proportion: 'Constrain proportions',
+            basic: 'Basic',
+            left: 'Left',
+            right: 'Right',
+            center: 'Center',
+            width: 'Width',
+            height: 'Height',
+            size: 'Size',
+            ratio: 'Ratio'
+        },
+        controller: {
+            edit: 'Edit',
+            unlink: 'Unlink',
+            remove: 'Remove',
+            insertRowAbove: 'Insert row above',
+            insertRowBelow: 'Insert row below',
+            deleteRow: 'Delete row',
+            insertColumnBefore: 'Insert column before',
+            insertColumnAfter: 'Insert column after',
+            deleteColumn: 'Delete column',
+            fixedColumnWidth: 'Fixed column width',
+            resize100: 'Resize 100%',
+            resize75: 'Resize 75%',
+            resize50: 'Resize 50%',
+            resize25: 'Resize 25%',
+            autoSize: 'Auto size',
+            mirrorHorizontal: 'Mirror, Horizontal',
+            mirrorVertical: 'Mirror, Vertical',
+            rotateLeft: 'Rotate left',
+            rotateRight: 'Rotate right',
+            maxSize: 'Max size',
+            minSize: 'Min size',
+            tableHeader: 'Table header',
+            mergeCells: 'Merge cells',
+            splitCells: 'Split Cells',
+            HorizontalSplit: 'Horizontal split',
+            VerticalSplit: 'Vertical split'
+        },
+        menu: {
+            spaced: 'Spaced',
+            bordered: 'Bordered',
+            neon: 'Neon',
+            translucent: 'Translucent',
+            shadow: 'Shadow',
+            code: 'Code'
+        }
+    };
+
+    if (typeof noGlobal === typeof undefined) {
+        if (!window.SUNEDITOR_LANG) {
+            Object.defineProperty(window, 'SUNEDITOR_LANG', {
+                enumerable: true,
+                writable: false,
+                configurable: false,
+                value: {}
+            });
+        }
+
+        Object.defineProperty(window.SUNEDITOR_LANG, 'en', {
+            enumerable: true,
+            writable: true,
+            configurable: true,
+            value: lang
+        });
+    }
+
+    return lang;
+}));

文件差异内容过多而无法显示
+ 0 - 0
web/Web Builder/script/suneditor/suneditor.min.css


文件差异内容过多而无法显示
+ 0 - 0
web/Web Builder/script/suneditor/suneditor.min.js


+ 50 - 0
web/Web Builder/template.html

@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="UTF-8">
+		<meta name="apple-mobile-web-app-capable" content="yes" />
+		<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
+		<meta name="theme-color" content="#ff9224">
+		<script src="../../script/jquery.min.js"></script>
+		<script src="../../script/ao_module.js"></script>
+		<link rel="stylesheet" href="../../script/semantic/semantic.min.css">
+		<script src="../../script/semantic/semantic.min.js"></script>
+		<title>{{title}}</title>
+        <style>
+            blockquote {
+                display:block;
+                font-family:inherit;
+                font-size:inherit;
+                color:#999;
+                margin-block-start:1em;
+                margin-block-end:1em;
+                margin-inline-start:0;
+                margin-inline-end:0;
+                padding:0 5px 0 20px;
+                border:solid #b1b1b1;
+                border-width:0 0 0 5px
+            }
+
+            pre {
+                display:block;
+                padding:8px;
+                margin:0 0 10px;
+                font-family:monospace;
+                color:#666;
+                line-height:1.45;
+                background-color:#f9f9f9;
+                border:1px solid #e1e1e1;
+                border-radius:2px;
+                white-space:pre-wrap!important;
+                word-wrap:break-word;
+                overflow:visible
+            }
+        </style>
+    </head>
+    <body>
+        <div class="ui container">
+            {{content}}
+        </div>
+        
+    </body>
+</html>

部分文件因为文件数量过多而无法显示