ajout de commentaires au code.

This commit is contained in:
2022-08-10 01:59:10 -04:00
parent eca736bba6
commit 67f571860e
14 changed files with 306 additions and 30 deletions
+30 -1
View File
@@ -1,22 +1,51 @@
import templates
import ../code/web_utils
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : HTML title H2
# --==--==--==--==--==--==--==--==--==--==-- #
proc templ_title* (title: string): string = tmpli html"""
<h2>$title</h2>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : Status Joplin green icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc status_joplin_green* (): string = tmpli html"""
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="#3bed18" class="bi bi-caret-right-square-fill" viewBox="0 0 16 16">
<path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm5.5 10a.5.5 0 0 0 .832.374l4.5-4a.5.5 0 0 0 0-.748l-4.5-4A.5.5 0 0 0 5.5 4v8z"/>
</svg>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : Status Joplin red icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc status_joplin_red* (): string = tmpli html"""
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="#C9404D" class="bi bi-caret-right-square-fill" viewBox="0 0 16 16">
<path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm5.5 10a.5.5 0 0 0 .832.374l4.5-4a.5.5 0 0 0 0-.748l-4.5-4A.5.5 0 0 0 5.5 4v8z"/>
</svg>
"""
proc checkStatus_joplinSyncro* (): string = tmpli html"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : OK Joplin syncro icon
# [TODO] OK Joplin syncro icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc OK_joplinSyncro_icon* (): string = tmpli html"""
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : NEED Joplin syncro icon
# [TODO] NEED Joplin syncro icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc NEED_joplinSyncro_icon* (): string = tmpli html"""
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : In Progress Joplin syncro icon
# [TODO] In Progress Joplin syncro icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc InProgress_joplinSyncro_icon* (): string = tmpli html"""
"""
+30 -1
View File
@@ -1,5 +1,8 @@
import templates
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : Menu icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc Menu_icon* (): string = tmpli html"""
<svg class="menu-icon" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 297 297"
@@ -30,6 +33,9 @@ proc Menu_icon* (): string = tmpli html"""
</svg>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : New Note icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc NewNote_icon*(): string = tmpli html"""
<!-- <svg class="sidebar-icon" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" ><g ><path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"></path></g></svg> -->
<svg class="sidebar-icon" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg"
@@ -45,6 +51,9 @@ proc NewNote_icon*(): string = tmpli html"""
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : Search icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc Search_icon*(): string = tmpli html"""
<svg class="sidebar-icon" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" enable-background="new 0 0 512 512"
@@ -56,6 +65,9 @@ proc Search_icon*(): string = tmpli html"""
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : Shortcut icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc Shortcuts_icon*(): string = tmpli html"""
<svg class="sidebar-icon" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 73.357 73.357"
@@ -76,13 +88,18 @@ proc Shortcuts_icon*(): string = tmpli html"""
</svg>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : All notes icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc Notes_icon*(): string = tmpli html"""
<svg class="sidebar-icon" width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7 0h16v20H5V0h2zm14 18V2H7v16h14zM9 4h10v2H9V4zm10 4H9v2h10V8zM9 12h7v2H9v-2zm10 10H3V4H1v20h18v-2z"/>
</svg>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : All notebooks icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc Notebooks_icon*(): string = tmpli html"""
<svg class="sidebar-icon" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"
xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 512 512">
@@ -101,6 +118,9 @@ proc Notebooks_icon*(): string = tmpli html"""
</svg>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : All tags icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc Tags_icon*(): string = tmpli html"""
<svg class="sidebar-icon" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 511.999 511.999"
@@ -135,6 +155,9 @@ proc Tags_icon*(): string = tmpli html"""
</svg>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : Settings icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc Settings_icon*(): string = tmpli html"""
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="sidebar-icon">
<g>
@@ -145,6 +168,9 @@ proc Settings_icon*(): string = tmpli html"""
</svg>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : Logout icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc Logout_icon*(): string = tmpli html"""
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" class="sidebar-icon" viewBox="0 0 16 16">
<path fill-rule="evenodd"
@@ -154,6 +180,9 @@ proc Logout_icon*(): string = tmpli html"""
</svg>
"""
# --==--==--==--==--==--==--==--==--==--==-- #
# SVG : SendFeedback icon
# --==--==--==--==--==--==--==--==--==--==-- #
proc SendFeedback_icon*(): string = tmpli html"""
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="sidebar-icon">
<g>
+3
View File
@@ -1,5 +1,8 @@
#? stdtmpl | standard
#
# --==--==--==--==--==--==--==--==--==--==-- #
# proc genLogin : Login web page
# --==--==--==--==--==--==--==--==--==--==-- #
#proc genLogin(c: var TData, errorMsg = ""): string =
# result = ""
# if not c.loggedIn:
+4
View File
@@ -1,4 +1,8 @@
#? stdtmpl | standard
#
# --==--==--==--==--==--==--==--==--==--==-- #
# proc genMain : master web page once login
# --==--==--==--==--==--==--==--==--==--==-- #
#proc genMain(c: var TData): string =
# result = ""