creer nim template et config avec "Access-Control-Allow-Origin"

This commit is contained in:
bruno 2022-08-02 21:39:10 -04:00
parent c3f97dc832
commit bef984678e
16 changed files with 619 additions and 264 deletions

View File

@ -0,0 +1,5 @@
# compile and run
```
nim c -d:release -r main.nim
```

View File

@ -1,7 +1,68 @@
import std/[asyncdispatch, httpclient] import std/[asyncdispatch, httpclient]
import std/json
import std/options
import strformat
import jester
proc get_joplin_notebooks*(): Future[string] {.async.} = type
joplin_tags* = object
id: seq[string]
parent_id: seq[string]
title: seq[string]
# Setup user data
type
joplin_notebooks* = object
id*, parent_id*, title*: seq[string]
req*: Request
proc get_joplin_notebooks*(token:string): Future[joplin_notebooks] {.async.} =
# Variables
var j_nb: joplin_notebooks
var has_more: bool = true
var page: int = 1
var url: string
var client = newAsyncHttpClient() var client = newAsyncHttpClient()
return await client.getContent("http://localhost:41184/folders?token=e5f6644fbf6a97ddc55648dae72b11caecda6c6642d8ce0d3b20129b89b196385737eb908923542c3343649ebbf865b55bda031ab4c3a16edc7723ef2ad77d8f")
# echo waitFor get_joplin_notebooks() # make sure to check all pages
while has_more == true:
# request joplin API for notebooks
url = fmt"http://localhost:41184/folders?page={page}&token={token}"
var json = await client.getContent(url)
# parse jason
let joplin_notebooks_Json = parseJson(json)
# valider qu'il n'y a plus de page
if not joplin_notebooks_Json["has_more"].getBool:
has_more = false
# store json info into an object
var count: int = 1
for nb in joplin_notebooks_Json["items"]:
j_nb.id.add(nb["id"].getstr)
j_nb.parent_id.add(nb["parent_id"].getstr)
j_nb.title.add(nb["title"].getstr)
count += 1
# aller à la page suivante
page += 1
return j_nb
proc get_joplin_tags*(): Future[joplin_tags] {.async.} =
var j_tags: joplin_tags
var count = 0
var client = newAsyncHttpClient()
var json = await client.getContent("http://localhost:41184/tags?token=e5f6644fbf6a97ddc55648dae72b11caecda6c6642d8ce0d3b20129b89b196385737eb908923542c3343649ebbf865b55bda031ab4c3a16edc7723ef2ad77d8f")
let joplin_tags_Json = parseJson(json)
for tag in joplin_tags_Json["items"]:
j_tags.id.add(tag["id"].getstr)
j_tags.parent_id.add(tag["parent_id"].getstr)
j_tags.title.add(tag["title"].getstr)
count += 1
return j_tags

View File

@ -8,5 +8,8 @@ pass = ""
[Server] [Server]
website = "https://myurl.org" website = "https://myurl.org"
title = "Joplin The New Web" title = "Joplin The New Web"
url = "127.0.0.1" url = "0.0.0.0"
port = "7000" port = "7000"
[Joplin]
token = "e5f6644fbf6a97ddc55648dae72b11caecda6c6642d8ce0d3b20129b89b196385737eb908923542c3343649ebbf865b55bda031ab4c3a16edc7723ef2ad77d8f"

View File

@ -1,4 +1,5 @@
# Copyright 2019 - Thomas T. Jarløv # Copyright 2019 - Thomas T. Jarløv
# [LINK] debug url : http://127.0.0.1:7000/
import db_sqlite # SQLite import db_sqlite # SQLite
import jester # Our webserver import jester # Our webserver
@ -9,6 +10,7 @@ import strutils # Basic functions
import times # Time and date import times # Time and date
import uri # We need to encode urls: encodeUrl() import uri # We need to encode urls: encodeUrl()
import code/database_utils # Utils used in the database import code/database_utils # Utils used in the database
import code/password_utils # Our file with password utils import code/password_utils # Our file with password utils
import code/joplin_utils import code/joplin_utils
@ -29,6 +31,7 @@ let mainURL = dict.getSectionValue("Server", "url")
let mainPort = parseInt dict.getSectionValue("Server", "port") let mainPort = parseInt dict.getSectionValue("Server", "port")
let mainWebsite = dict.getSectionValue("Server", "website") let mainWebsite = dict.getSectionValue("Server", "website")
let joplin_token = dict.getSectionValue("Joplin", "token")
# Database var # Database var
var db: DbConn var db: DbConn
@ -139,11 +142,6 @@ proc logout(c: var TData) =
const query = sql"DELETE FROM session WHERE ip = ? AND key = ?" const query = sql"DELETE FROM session WHERE ip = ? AND key = ?"
exec(db, query, c.req.ip, c.req.cookies["sid"]) exec(db, query, c.req.ip, c.req.cookies["sid"])
proc testproc(): string =
result = ""
result = "voici des infos de la proc testproc !"
# Do the check inside our routes # Do the check inside our routes
template createTFD() = template createTFD() =
## Check if logged in and assign data to user ## Check if logged in and assign data to user
@ -204,8 +202,11 @@ routes:
get "/secret": get "/secret":
createTFD() createTFD()
echo c.loggedIn
if c.loggedIn: if c.loggedIn:
resp genSecret(c) var all_notebooks: joplin_notebooks
all_notebooks = waitFor get_joplin_notebooks(joplin_token)
resp Http200, {"Access-Control-Allow-Origin": "http://192.168.1.251:7000"}, genSecret(c,all_notebooks)
get "/login": get "/login":
createTFD() createTFD()
@ -232,8 +233,11 @@ routes:
get "/test_notebooks": get "/test_notebooks":
createTFD() createTFD()
var all_notebooks = ""
all_notebooks = waitFor get_joplin_notebooks() var all_notebooks: joplin_notebooks
# info("route de test :") all_notebooks = waitFor get_joplin_notebooks(joplin_token)
for title in all_notebooks.title:
echo title
resp test_notebooks(c, all_notebooks) resp test_notebooks(c, all_notebooks)

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

View File

@ -43,6 +43,33 @@ body {
} }
/* Create two equal columns that floats next to each other */
.column {
float: left;
padding: 10px;
height: calc(100vh - var(--header-height));
/* flex: 50%; */
width: 100%;
}
.left {
width: 25%;
}
.right {
width: 75%;
}
.row {
display: flex;
width: 100%;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
.menu-icon-btn { .menu-icon-btn {
background: none; background: none;
border: none; border: none;

BIN
test/oop_example Executable file

Binary file not shown.

33
test/oop_example.nim Normal file
View File

@ -0,0 +1,33 @@
# type
# Notebook = object
# id: string
# title: string
# var notebooks = newSeq[Notebook]()
# notebooks.add(Notebook(id:"12345", title: "un notebook titre"))
# echo notebooks
type
Notebook2 = ref object of RootObj
id: seq[string]
title: seq[string]
Notebooks = ref object of Notebook2
nb_list: seq[int]
var nb: Notebooks
# nb.add(Notebook2(id:"123456", title: "mon titre"))
# nb.id.add("toto")
# nb.title.add("tata")
# nb.nb_list.add(0)
echo nb.id
echo nb.title
echo nb.nb_list

BIN
test/oop_example2 Executable file

Binary file not shown.

26
test/oop_example2.nim Normal file
View File

@ -0,0 +1,26 @@
type
Node = ref object of RootObj
value: string
active: bool
type
NumNode = ref object of Node
type
BinOp = ref object of Node
left, op, right: string
var numnum = NumNode(value: "3", active: true)
echo numnum[]
# > (value: "3", active: true)
var add = BinOp(
left: "7",
op: "+",
right: "9",
active: true
)
echo add[]
# > (left: "7", op: "+", right: "9", value: "", active: true))

BIN
test/testJson Executable file

Binary file not shown.

84
test/testJson.nim Normal file
View File

@ -0,0 +1,84 @@
import std/[asyncdispatch, httpclient]
import std/json
import std/options
import std/strformat
import jester
# type
# joplin_notebooks* = object
# id: seq[string]
# parent_id: seq[string]
# title: seq[string]
# proc get_joplin_notebooks*(): Future[joplin_notebooks] {.async.} =
# var j_nb: joplin_notebooks
# var count = 0
# var client = newAsyncHttpClient()
# var json = await client.getContent("http://localhost:41184/folders?token=e5f6644fbf6a97ddc55648dae72b11caecda6c6642d8ce0d3b20129b89b196385737eb908923542c3343649ebbf865b55bda031ab4c3a16edc7723ef2ad77d8f")
# let joplin_notebooks_Json = parseJson(json)
# for nb in joplin_notebooks_Json["items"]:
# j_nb.id.add(nb["id"].getstr)
# j_nb.parent_id.add(nb["parent_id"].getstr)
# j_nb.title.add(nb["title"].getstr)
# count += 1
# echo joplin_notebooks_Json["has_more"]
# return j_nb
# Setup user data
type
joplin_notebooks* = object
id*, parent_id*, title*: seq[string]
req*: Request
proc get_joplin_notebooks*(token:string): Future[joplin_notebooks] {.async.} =
# Variables
var j_nb: joplin_notebooks
var has_more: bool = true
var page: int = 1
var url: string
var client = newAsyncHttpClient()
# make sure to check all pages
while has_more == true:
# request joplin API for notebooks
url = fmt"http://localhost:41184/folders?page={page}&token={token}"
var json = await client.getContent(url)
# parse jason
let joplin_notebooks_Json = parseJson(json)
# valider qu'il n'y a plus de page
if not joplin_notebooks_Json["has_more"].getBool:
has_more = false
# store json info into an object
var count: int = 1
for nb in joplin_notebooks_Json["items"]:
j_nb.id.add(nb["id"].getstr)
j_nb.parent_id.add(nb["parent_id"].getstr)
j_nb.title.add(nb["title"].getstr)
count += 1
# aller à la page suivante
page += 1
return j_nb
# var all_notebooks = ""
var nb: joplin_notebooks
nb = waitFor get_joplin_notebooks("e5f6644fbf6a97ddc55648dae72b11caecda6c6642d8ce0d3b20129b89b196385737eb908923542c3343649ebbf865b55bda031ab4c3a16edc7723ef2ad77d8f")
# echo nb.title[1]
for i in nb.title:
echo i
echo nb.title

10
tmpl/snippet_html.nim Normal file
View File

@ -0,0 +1,10 @@
import templates
proc templ_title* (title: string): string = tmpli html"""
<h2>$title!</h2>
"""
# proc testPage (name: string): string = tmpli html"""
# <body>
# <h1>Hello $name!</h1>
# </body>
# """

274
tmpl/snippet_icons.nim Normal file
View File

@ -0,0 +1,274 @@
import templates
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"
style="enable-background:new 0 0 297 297;" xml:space="preserve">
<g>
<g id="XMLID_40_">
<g>
<polygon style="fill:#3498DB;" points="274.85,138.12 251.33,169.71 227.8,138.12 " />
<rect x="20.53" y="48.68" style="fill:#3498DB;" width="148.83" height="23.51" />
<rect x="20.53" y="136.75" style="fill:#2980B9;" width="148.83" height="23.5" />
<rect x="20.53" y="224.81" style="fill:#356272;" width="148.83" height="23.51" />
<path d="M294.98,128.02c1.35,2.7,2.02,5.61,2.02,8.5c0,3.98-1.27,7.94-3.76,11.28l-26.75,35.91c-3.6,4.84-9.13,7.62-15.16,7.62
c-6.04,0-11.56-2.78-15.17-7.62l-26.75-35.91c-4.29-5.77-4.96-13.35-1.73-19.78c3.23-6.43,9.7-10.43,16.9-10.43h53.5
C285.27,117.59,291.75,121.59,294.98,128.02z M251.33,169.71l23.52-31.59H227.8L251.33,169.71z" />
<path
d="M189.88,224.51v24.11c0,11.15-9.07,20.22-20.22,20.22H20.23C9.08,268.84,0,259.77,0,248.62v-24.11
c0-11.15,9.08-20.23,20.23-20.23h149.43C180.81,204.28,189.88,213.36,189.88,224.51z M169.36,248.32v-23.51H20.53v23.51H169.36z" />
<path
d="M189.88,136.44v24.12c0,11.15-9.07,20.22-20.22,20.22H20.23C9.08,180.78,0,171.71,0,160.56v-24.12
c0-11.15,9.08-20.22,20.23-20.22h149.43C180.81,116.22,189.88,125.29,189.88,136.44z M169.36,160.25v-23.5H20.53v23.5H169.36z" />
<path
d="M189.88,48.38v24.11c0,11.15-9.07,20.23-20.22,20.23H20.23C9.08,92.72,0,83.64,0,72.49V48.38
c0-11.15,9.08-20.22,20.23-20.22h149.43C180.81,28.16,189.88,37.23,189.88,48.38z M169.36,72.19V48.68H20.53v23.51H169.36z" />
</g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
"""
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" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" width="489px" height="489.001px" viewBox="0 0 489 489.001" style="enable-background:new 0 0 489 489.001;"
xml:space="preserve">
<g>
<path d="M355.768,0H86.218C53.33,0,26.577,26.753,26.577,59.636v369.729c0,32.883,26.752,59.636,59.641,59.636h316.566
c32.889-0.001,59.641-26.754,59.641-59.637V109.16L355.768,0z M402.784,446.479H86.218c-9.437,0-17.119-7.678-17.119-17.113V59.636
c0-9.437,7.683-17.114,17.119-17.114H334.86v47.604c0,21.043,17.109,38.162,38.152,38.375l46.891,0.477v300.388
C419.903,438.801,412.219,446.479,402.784,446.479z" />
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
"""
proc Search_icon*(): string = tmpli html"""
<!-- <svg viewBox="0 0 24 24" class="sidebar-icon" preserveAspectRatio="xMidYMid meet" focusable="false"><g><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8 12.5v-9l6 4.5-6 4.5z"></path></g></svg> -->
<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" xml:space="preserve">
<path d="M325.8,0C223,0,139.6,83.4,139.6,186.2c0,33.5,9,64.8,24.4,92L0,442.2l23.3,46.5L69.8,512l164-164
c27.1,15.5,58.5,24.4,92,24.4C428.6,372.4,512,289,512,186.2S428.6,0,325.8,0z M325.8,314.2c-70.7,0-128-57.3-128-128
c0-70.7,57.3-128,128-128s128,57.3,128,128C453.8,256.9,396.5,314.2,325.8,314.2z" />
</svg>
"""
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" style="enable-background:new 0 0 73.357 73.357;" xml:space="preserve">
<g>
<path d="M73.013,27.836c-0.882-2.73-3.306-4.631-6.172-4.84l-17.188-1.28l-6.47-15.898c-1.067-2.631-3.605-4.331-6.467-4.331
c-2.875,0-5.368,1.635-6.532,4.327l-6.473,15.901L6.455,23.001c-2.88,0.281-5.287,2.228-6.132,4.96
c-0.844,2.729-0.003,5.568,2.182,7.399l13.11,11.113l-4.068,16.676c-0.539,2.101-0.092,4.28,1.227,5.98
c1.331,1.717,3.407,2.741,5.553,2.741c0,0,0,0,0.001,0c1.308,0,2.602-0.379,3.722-1.083l14.632-9.035l14.632,9.035
c1.11,0.686,2.372,1.048,3.649,1.048c2.126,0,4.197-1.009,5.541-2.698c1.328-1.67,1.813-3.826,1.322-5.953l-4.077-16.71
l13.1-11.103C73.046,33.529,73.896,30.571,73.013,27.836z M66.982,30.784l-15.94,13.51l4.947,20.275
c0.026,0.116,0.108,0.47-0.181,0.832c-0.324,0.408-0.876,0.568-1.343,0.28L36.682,54.7L18.877,65.695
c-0.188,0.119-0.368,0.176-0.549,0.176c-0.301,0-0.613-0.16-0.813-0.419c-0.184-0.237-0.235-0.503-0.147-0.846l4.956-20.312
L6.371,30.773c-0.419-0.351-0.404-0.758-0.317-1.038c0.079-0.256,0.313-0.696,0.915-0.756l20.897-1.556l7.85-19.286
c0.244-0.565,0.731-0.649,1-0.649c0.306,0,0.71,0.102,0.909,0.589l7.874,19.347L66.4,28.981c0.573,0.042,0.808,0.404,0.903,0.7
C67.382,29.925,67.448,30.393,66.982,30.784z" />
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
"""
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>
"""
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">
<g>
<g>
<path
d="m157.1,254.1h187.8c11.3,0 20.5-9.1 20.5-20.4 0-11.3-9.2-20.4-20.5-20.4h-187.8c-11.3,0-20.5,9.1-20.5,20.4 0,11.3 9.2,20.4 20.5,20.4z" />
<g>
<path
d="m157.1,358.3h187.8c11.3,0 20.5-9.1 20.5-20.4 0-11.3-9.2-20.4-20.5-20.4h-187.8c-11.3,0-20.5,9.1-20.5,20.4 0,11.3 9.2,20.4 20.5,20.4z" />
<path
d="m429.9,460.1h-334.2c-17.4,0-13.7-11.4-13.7-24.8v-305.3c6.2,2.1 12.8,3.3 19.6,3.3h328.3v326.8zm-328.3-408.2h288.9c-7.6,11.5-7.6,29.3 2.7,40.6h-291.6c-10.8,0-19.6-8.9-19.6-20.3-0.1-11.4 8.7-20.3 19.6-20.3zm347.9,35.7c-0.4,0-6.1,0-6.3,0-9.6-0.4-17.2-8.2-17.2-17.8 0-9.2 7-16.8 15.9-17.7 0,0 5.9-0.1 5.9-0.1 11.3,0 20.5-9.1 20.5-20.4 0-11.3-9.2-20.4-20.5-20.4h-346.2c-33.4-0.2-60.6,26.9-60.6,60.2v363.9c0,36.2 14.4,65.6 54.7,65.6h354.5c11.2,0 20.4-9.1 20.5-20.3l.3-370.2c0-12.5-9.2-22.8-21.5-22.8z" />
</g>
</g>
</g>
</svg>
"""
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" style="enable-background:new 0 0 511.999 511.999;" xml:space="preserve">
<g>
<g>
<path d="M497.335,284.567L272.36,59.593c-3.135-3.135-7.386-4.897-11.82-4.897c-0.018,0-0.036,0-0.053,0l-117.811,0.379
c-4.414,0.014-8.645,1.774-11.766,4.897L107.261,83.62L28.537,4.896c-6.527-6.527-17.112-6.527-23.641,0s-6.528,17.112,0,23.641
L83.62,107.26l-23.648,23.649c-3.135,3.135-4.897,7.388-4.897,11.821l0.009,118.2c0,4.433,1.762,8.685,4.897,11.819
l224.586,224.586c9.776,9.776,22.619,14.665,35.462,14.665c12.843,0,25.685-4.889,35.461-14.665l141.845-141.845
C516.887,335.936,516.887,304.12,497.335,284.567z M473.694,331.848L331.849,473.693c-6.518,6.517-17.123,6.517-23.642,0
l-219.69-219.69L88.51,149.653l18.752-18.752l25.128,25.128c-14.998,25.333-11.942,58.981,10.333,81.256
c26.07,26.071,68.49,26.072,94.564,0c26.131-26.133,26.136-68.428,0-94.564c-22.197-22.199-55.836-25.383-81.256-10.333
l-25.128-25.128l18.774-18.774l103.962-0.335l220.055,220.056C480.211,314.726,480.211,325.33,473.694,331.848z M187.343,163.701
l-5.997-5.997c11.101-2.957,23.47-0.172,32.299,8.658c13.066,13.066,13.067,34.213,0,47.282
c-13.034,13.033-34.246,13.036-47.281,0c-8.79-8.791-11.629-21.143-8.658-32.3l5.997,5.997c6.528,6.528,17.112,6.528,23.641,0
C193.871,180.815,193.871,170.23,187.343,163.701z" />
</g>
</g>
<g>
<g>
<path d="M355.49,379.131l-94.564-94.564c-6.527-6.527-17.112-6.527-23.641,0s-6.528,17.112,0,23.641l94.564,94.564
c6.528,6.528,17.112,6.528,23.641,0C362.018,396.244,362.018,385.659,355.49,379.131z" />
</g>
</g>
<g>
<g>
<path d="M402.771,331.849l-94.564-94.564c-6.527-6.527-17.112-6.527-23.641,0c-6.528,6.527-6.528,17.112,0,23.641l94.564,94.564
c6.528,6.528,17.112,6.528,23.641,0C409.299,348.963,409.299,338.378,402.771,331.849z" />
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
"""
proc Settings_icon*(): string = tmpli html"""
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="sidebar-icon"><g><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z">
</path>
</g>
</svg>
"""
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" d="M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z"/>
<path fill-rule="evenodd" d="M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z"/>
</svg>
"""
proc SendFeedback_icon*(): string = tmpli html"""
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="sidebar-icon"><g><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z">
</path>
</g>
</svg>
"""

View File

@ -1,15 +1,26 @@
#? stdtmpl | standard #? stdtmpl | standard
# # import snippet_html
#proc test_notebooks(c: var TData, all_notebooks: var string): string = #proc test_notebooks(c: var TData, all_notebooks: var joplin_notebooks): string =
# result = "" # result = ""
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="styles.css">
<script src="script.js" defer></script>
</head>
<html>
<body> <body>
<!--<main class="content">Windows Info !! ${c.username} ${c.email}</main>--> # var title = templ_title("NOTEBOOKS")
<h3> <div> ${title} </div>
${all_notebooks} # for i in all_notebooks.title:
</h3> <h4> ${i} </h4>
</html> # end for
</body> </body>
</html>
#end proc #end proc

View File

@ -1,5 +1,4 @@
#? stdtmpl | standard #? stdtmpl | standard
#
#proc genMain(c: var TData): string = #proc genMain(c: var TData): string =
# result = "" # result = ""
@ -8,7 +7,9 @@
#end proc #end proc
# #
#proc genSecret(c: var TData): string = # import snippet_html
# import snippet_icons
#proc genSecret(c: var TData, all_notebooks: var joplin_notebooks): string =
# result = "" # result = ""
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -23,63 +24,10 @@
<body> <body>
<header class="header"> <header class="header">
<button class="menu-icon-btn" data-menu-icon-btn> <button class="menu-icon-btn" data-menu-icon-btn>
<!-- <svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="menu-icon"><g ><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path></g></svg> -->
<svg class="menu-icon" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" # var icon_menu = Menu_icon()
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 297 297" ${icon_menu}
style="enable-background:new 0 0 297 297;" xml:space="preserve">
<g>
<g id="XMLID_40_">
<g>
<polygon style="fill:#3498DB;" points="274.85,138.12 251.33,169.71 227.8,138.12 " />
<rect x="20.53" y="48.68" style="fill:#3498DB;" width="148.83" height="23.51" />
<rect x="20.53" y="136.75" style="fill:#2980B9;" width="148.83" height="23.5" />
<rect x="20.53" y="224.81" style="fill:#356272;" width="148.83" height="23.51" />
<path d="M294.98,128.02c1.35,2.7,2.02,5.61,2.02,8.5c0,3.98-1.27,7.94-3.76,11.28l-26.75,35.91c-3.6,4.84-9.13,7.62-15.16,7.62
c-6.04,0-11.56-2.78-15.17-7.62l-26.75-35.91c-4.29-5.77-4.96-13.35-1.73-19.78c3.23-6.43,9.7-10.43,16.9-10.43h53.5
C285.27,117.59,291.75,121.59,294.98,128.02z M251.33,169.71l23.52-31.59H227.8L251.33,169.71z" />
<path
d="M189.88,224.51v24.11c0,11.15-9.07,20.22-20.22,20.22H20.23C9.08,268.84,0,259.77,0,248.62v-24.11
c0-11.15,9.08-20.23,20.23-20.23h149.43C180.81,204.28,189.88,213.36,189.88,224.51z M169.36,248.32v-23.51H20.53v23.51H169.36z" />
<path
d="M189.88,136.44v24.12c0,11.15-9.07,20.22-20.22,20.22H20.23C9.08,180.78,0,171.71,0,160.56v-24.12
c0-11.15,9.08-20.22,20.23-20.22h149.43C180.81,116.22,189.88,125.29,189.88,136.44z M169.36,160.25v-23.5H20.53v23.5H169.36z" />
<path
d="M189.88,48.38v24.11c0,11.15-9.07,20.23-20.22,20.23H20.23C9.08,92.72,0,83.64,0,72.49V48.38
c0-11.15,9.08-20.22,20.23-20.22h149.43C180.81,28.16,189.88,37.23,189.88,48.38z M169.36,72.19V48.68H20.53v23.51H169.36z" />
</g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
</button> </button>
</header> </header>
<div class="container"> <div class="container">
@ -92,63 +40,22 @@
<div class="middle-sidebar"> <div class="middle-sidebar">
<ul class="sidebar-list"> <ul class="sidebar-list">
<li class="sidebar-list-item active"> <li class="sidebar-list-item active">
<!-- Nouvelle Note dans la bar de navigation --> <!-- Nouvelle Note dans la bar de navigation -->
<a href="#" class="sidebar-link"> <a href="#" class="sidebar-link">
<!-- <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" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" # var icon_newNote = NewNote_icon()
y="0px" width="489px" height="489.001px" viewBox="0 0 489 489.001" style="enable-background:new 0 0 489 489.001;" ${icon_newNote}
xml:space="preserve">
<g>
<path d="M355.768,0H86.218C53.33,0,26.577,26.753,26.577,59.636v369.729c0,32.883,26.752,59.636,59.641,59.636h316.566
c32.889-0.001,59.641-26.754,59.641-59.637V109.16L355.768,0z M402.784,446.479H86.218c-9.437,0-17.119-7.678-17.119-17.113V59.636
c0-9.437,7.683-17.114,17.119-17.114H334.86v47.604c0,21.043,17.109,38.162,38.152,38.375l46.891,0.477v300.388
C419.903,438.801,412.219,446.479,402.784,446.479z" />
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<div class="hidden-sidebar">New Note</div> <div class="hidden-sidebar">New Note</div>
</a> </a>
</li> </li>
<li class="sidebar-list-item"> <li class="sidebar-list-item">
<!-- Recherche dans la bar de navigation --> <!-- Recherche dans la bar de navigation -->
<a href="#" class="sidebar-link"> <a href="#" class="sidebar-link">
<!-- <svg viewBox="0 0 24 24" class="sidebar-icon" preserveAspectRatio="xMidYMid meet" focusable="false"><g><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8 12.5v-9l6 4.5-6 4.5z"></path></g></svg> -->
<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" # var icon_search = Search_icon()
y="0px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"> ${icon_search}
<path d="M325.8,0C223,0,139.6,83.4,139.6,186.2c0,33.5,9,64.8,24.4,92L0,442.2l23.3,46.5L69.8,512l164-164
c27.1,15.5,58.5,24.4,92,24.4C428.6,372.4,512,289,512,186.2S428.6,0,325.8,0z M325.8,314.2c-70.7,0-128-57.3-128-128
c0-70.7,57.3-128,128-128s128,57.3,128,128C453.8,256.9,396.5,314.2,325.8,314.2z" />
</svg>
<div class="hidden-sidebar">Search</div> <div class="hidden-sidebar">Search</div>
</a> </a>
</li> </li>
@ -156,52 +63,10 @@
<!--Favoris dans la bar de navigation --> <!--Favoris dans la bar de navigation -->
<li class="sidebar-list-item"> <li class="sidebar-list-item">
<a href="#" class="sidebar-link"> <a href="#" class="sidebar-link">
<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" style="enable-background:new 0 0 73.357 73.357;" xml:space="preserve"> # var icon_shortcuts = Shortcuts_icon()
<g> ${icon_shortcuts}
<path d="M73.013,27.836c-0.882-2.73-3.306-4.631-6.172-4.84l-17.188-1.28l-6.47-15.898c-1.067-2.631-3.605-4.331-6.467-4.331
c-2.875,0-5.368,1.635-6.532,4.327l-6.473,15.901L6.455,23.001c-2.88,0.281-5.287,2.228-6.132,4.96
c-0.844,2.729-0.003,5.568,2.182,7.399l13.11,11.113l-4.068,16.676c-0.539,2.101-0.092,4.28,1.227,5.98
c1.331,1.717,3.407,2.741,5.553,2.741c0,0,0,0,0.001,0c1.308,0,2.602-0.379,3.722-1.083l14.632-9.035l14.632,9.035
c1.11,0.686,2.372,1.048,3.649,1.048c2.126,0,4.197-1.009,5.541-2.698c1.328-1.67,1.813-3.826,1.322-5.953l-4.077-16.71
l13.1-11.103C73.046,33.529,73.896,30.571,73.013,27.836z M66.982,30.784l-15.94,13.51l4.947,20.275
c0.026,0.116,0.108,0.47-0.181,0.832c-0.324,0.408-0.876,0.568-1.343,0.28L36.682,54.7L18.877,65.695
c-0.188,0.119-0.368,0.176-0.549,0.176c-0.301,0-0.613-0.16-0.813-0.419c-0.184-0.237-0.235-0.503-0.147-0.846l4.956-20.312
L6.371,30.773c-0.419-0.351-0.404-0.758-0.317-1.038c0.079-0.256,0.313-0.696,0.915-0.756l20.897-1.556l7.85-19.286
c0.244-0.565,0.731-0.649,1-0.649c0.306,0,0.71,0.102,0.909,0.589l7.874,19.347L66.4,28.981c0.573,0.042,0.808,0.404,0.903,0.7
C67.382,29.925,67.448,30.393,66.982,30.784z" />
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<div class="hidden-sidebar">Shortcuts</div> <div class="hidden-sidebar">Shortcuts</div>
</a> </a>
</li> </li>
@ -209,9 +74,10 @@
<!--Notes dans la bar de navigation --> <!--Notes dans la bar de navigation -->
<li class="sidebar-list-item"> <li class="sidebar-list-item">
<a href="#" class="sidebar-link"> <a href="#" class="sidebar-link">
<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"/> # var icon_Notes = Notes_icon()
</svg> ${icon_Notes}
<div class="hidden-sidebar">Notes</div> <div class="hidden-sidebar">Notes</div>
</a> </a>
</li> </li>
@ -219,21 +85,10 @@
<!--Notebooks dans la bar de navigation --> <!--Notebooks dans la bar de navigation -->
<li class="sidebar-list-item"> <li class="sidebar-list-item">
<a href="#" class="sidebar-link"> <a href="#" class="sidebar-link">
<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"> # var icon_Notebooks = Notebooks_icon()
<g> ${icon_Notebooks}
<g>
<path
d="m157.1,254.1h187.8c11.3,0 20.5-9.1 20.5-20.4 0-11.3-9.2-20.4-20.5-20.4h-187.8c-11.3,0-20.5,9.1-20.5,20.4 0,11.3 9.2,20.4 20.5,20.4z" />
<g>
<path
d="m157.1,358.3h187.8c11.3,0 20.5-9.1 20.5-20.4 0-11.3-9.2-20.4-20.5-20.4h-187.8c-11.3,0-20.5,9.1-20.5,20.4 0,11.3 9.2,20.4 20.5,20.4z" />
<path
d="m429.9,460.1h-334.2c-17.4,0-13.7-11.4-13.7-24.8v-305.3c6.2,2.1 12.8,3.3 19.6,3.3h328.3v326.8zm-328.3-408.2h288.9c-7.6,11.5-7.6,29.3 2.7,40.6h-291.6c-10.8,0-19.6-8.9-19.6-20.3-0.1-11.4 8.7-20.3 19.6-20.3zm347.9,35.7c-0.4,0-6.1,0-6.3,0-9.6-0.4-17.2-8.2-17.2-17.8 0-9.2 7-16.8 15.9-17.7 0,0 5.9-0.1 5.9-0.1 11.3,0 20.5-9.1 20.5-20.4 0-11.3-9.2-20.4-20.5-20.4h-346.2c-33.4-0.2-60.6,26.9-60.6,60.2v363.9c0,36.2 14.4,65.6 54.7,65.6h354.5c11.2,0 20.4-9.1 20.5-20.3l.3-370.2c0-12.5-9.2-22.8-21.5-22.8z" />
</g>
</g>
</g>
</svg>
<div class="hidden-sidebar">Notebooks</div> <div class="hidden-sidebar">Notebooks</div>
</a> </a>
</li> </li>
@ -241,65 +96,10 @@
<!--Tags dans la bar de navigation --> <!--Tags dans la bar de navigation -->
<li class="sidebar-list-item"> <li class="sidebar-list-item">
<a href="#" class="sidebar-link"> <a href="#" class="sidebar-link">
<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" style="enable-background:new 0 0 511.999 511.999;" xml:space="preserve">
<g> # var icon_Tags = Tags_icon()
<g> ${icon_Tags}
<path d="M497.335,284.567L272.36,59.593c-3.135-3.135-7.386-4.897-11.82-4.897c-0.018,0-0.036,0-0.053,0l-117.811,0.379
c-4.414,0.014-8.645,1.774-11.766,4.897L107.261,83.62L28.537,4.896c-6.527-6.527-17.112-6.527-23.641,0s-6.528,17.112,0,23.641
L83.62,107.26l-23.648,23.649c-3.135,3.135-4.897,7.388-4.897,11.821l0.009,118.2c0,4.433,1.762,8.685,4.897,11.819
l224.586,224.586c9.776,9.776,22.619,14.665,35.462,14.665c12.843,0,25.685-4.889,35.461-14.665l141.845-141.845
C516.887,335.936,516.887,304.12,497.335,284.567z M473.694,331.848L331.849,473.693c-6.518,6.517-17.123,6.517-23.642,0
l-219.69-219.69L88.51,149.653l18.752-18.752l25.128,25.128c-14.998,25.333-11.942,58.981,10.333,81.256
c26.07,26.071,68.49,26.072,94.564,0c26.131-26.133,26.136-68.428,0-94.564c-22.197-22.199-55.836-25.383-81.256-10.333
l-25.128-25.128l18.774-18.774l103.962-0.335l220.055,220.056C480.211,314.726,480.211,325.33,473.694,331.848z M187.343,163.701
l-5.997-5.997c11.101-2.957,23.47-0.172,32.299,8.658c13.066,13.066,13.067,34.213,0,47.282
c-13.034,13.033-34.246,13.036-47.281,0c-8.79-8.791-11.629-21.143-8.658-32.3l5.997,5.997c6.528,6.528,17.112,6.528,23.641,0
C193.871,180.815,193.871,170.23,187.343,163.701z" />
</g>
</g>
<g>
<g>
<path d="M355.49,379.131l-94.564-94.564c-6.527-6.527-17.112-6.527-23.641,0s-6.528,17.112,0,23.641l94.564,94.564
c6.528,6.528,17.112,6.528,23.641,0C362.018,396.244,362.018,385.659,355.49,379.131z" />
</g>
</g>
<g>
<g>
<path d="M402.771,331.849l-94.564-94.564c-6.527-6.527-17.112-6.527-23.641,0c-6.528,6.527-6.528,17.112,0,23.641l94.564,94.564
c6.528,6.528,17.112,6.528,23.641,0C409.299,348.963,409.299,338.378,402.771,331.849z" />
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<div class="hidden-sidebar">Tags</div> <div class="hidden-sidebar">Tags</div>
</a> </a>
</li> </li>
@ -309,32 +109,49 @@
<ul class="sidebar-list"> <ul class="sidebar-list">
<li class="sidebar-list-item"> <li class="sidebar-list-item">
<a href="#" class="sidebar-link"> <a href="#" class="sidebar-link">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="sidebar-icon"><g><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"></path></g></svg>
# var icon_Settings = Settings_icon()
${icon_Tags}
<div class="hidden-sidebar">Settings</div> <div class="hidden-sidebar">Settings</div>
</a> </a>
</li> </li>
<li class="sidebar-list-item"> <li class="sidebar-list-item">
<a href="/logout" class="sidebar-link"> <a href="/logout" class="sidebar-link">
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" class="sidebar-icon" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z"/> # var icon_Logout = Logout_icon()
<path fill-rule="evenodd" d="M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z"/> ${icon_Logout}
</svg>
<div class="hidden-sidebar">Logout</div> <div class="hidden-sidebar">Logout</div>
</a> </a>
</li> </li>
<li class="sidebar-list-item"> <li class="sidebar-list-item">
<a href="#" class="sidebar-link"> <a href="#" class="sidebar-link">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="sidebar-icon"><g><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"></path></g></svg>
# var icon_SendFeedback = SendFeedback_icon()
${icon_SendFeedback}
<div class="hidden-sidebar">Send Feedback</div> <div class="hidden-sidebar">Send Feedback</div>
</a> </a>
</li> </li>
</ul> </ul>
</div> </div>
</aside> </aside>
<main class="content">Windows Info !!</main> <div class="row">
<div class="column left">
# var title = templ_title("NOTEBOOKS")
${title}
# for i in all_notebooks.title:
<p> ${i} </p>
# end for
</div>
<div class="column right" style="background-color:#bbb;">
<h2>Column 2</h2>
<p>Some text..</p>
</div>
</div>
</div> </div>
</body> </body>
</html> </html>