From 58635a65dfd39b70509ce16cbb77373cf4ce147b Mon Sep 17 00:00:00 2001
From: Ayham Al-Ali <20037329+AyhamAl-Ali@users.noreply.github.com>
Date: Wed, 15 Mar 2023 16:48:32 +0300
Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=9A=80=20Add=20Structures=20Template?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Changed event priority pattern to a note instead of showing in event patterns
- Fixed cookies styling -- placement still to be improved
- Fixed element IDs searching case sensitive
-
---
doc-templates/css/styles.css | 2 +-
doc-templates/js/main.js | 4 ++--
doc-templates/structures.html | 12 ++++++++++++
doc-templates/templates/desc_full.html | 13 +++++++++++++
doc-templates/templates/navbar.html | 1 +
5 files changed, 29 insertions(+), 3 deletions(-)
create mode 100644 doc-templates/structures.html
diff --git a/doc-templates/css/styles.css b/doc-templates/css/styles.css
index a13696ee29f..e078cf6dcb5 100644
--- a/doc-templates/css/styles.css
+++ b/doc-templates/css/styles.css
@@ -1168,7 +1168,7 @@ pre code { /* override styling for code blocks */
#cookies-bar {
position: sticky;
- margin: 0 -8vw;
+ margin: 0;
bottom: 0;
background-color: #353535;
color: white;
diff --git a/doc-templates/js/main.js b/doc-templates/js/main.js
index 0b48675990d..1793bd0f570 100644
--- a/doc-templates/js/main.js
+++ b/doc-templates/js/main.js
@@ -241,7 +241,7 @@ function searchNow(value = "") {
let regex = new RegExp(searchValue, "gi")
let name = document.querySelectorAll(`#${e.id} .item-title h1`)[0].textContent // Syntax Name
let desc = document.querySelectorAll(`#${e.id} .item-description`)[0].textContent // Syntax Desc
- let keywords = e.getAttribute("data-keywords")
+ let keywords = e.getAttribute("data-keywords")
let id = e.id // Syntax ID
let filtersFound = false;
@@ -285,7 +285,7 @@ function searchNow(value = "") {
filtersFound = true
if ((regex.test(pattern.textContent.replaceAll("[ ]", " ")) || regex.test(name) ||
- regex.test(desc) || regex.test(keywords) || "#" + id == searchValue || searchValue == "") && filtersFound) { // Replacing '[ ]' will improve some searching cases such as 'off[ ]hand'
+ regex.test(desc) || regex.test(keywords) || "#" + id.toLowerCase() == searchValue.toLowerCase() || searchValue == "") && filtersFound) { // Replacing '[ ]' will improve some searching cases such as 'off[ ]hand'
pass = true
break; // Performance
}
diff --git a/doc-templates/structures.html b/doc-templates/structures.html
new file mode 100644
index 00000000000..85a3179d1cc
--- /dev/null
+++ b/doc-templates/structures.html
@@ -0,0 +1,12 @@
+
+
+
Note:
+
+ You can specify the event priority after each event syntax using the following syntax [with priority (lowest|low|normal|high|highest|monitor)]
e.g. on spawn with priority lowest
.
+ Note that not all of the events support event priority and will throw an error.
+
+
+ ${generate structures desc_full.html}
+
\ No newline at end of file
diff --git a/doc-templates/templates/desc_full.html b/doc-templates/templates/desc_full.html
index 2a82c110f95..d68d5c97b4f 100644
--- a/doc-templates/templates/desc_full.html
+++ b/doc-templates/templates/desc_full.html
@@ -14,6 +14,19 @@