adapt Blogger to the new api

This commit is contained in:
Xuan Sang LE
2020-05-23 20:09:01 +02:00
parent e810eb4a14
commit 7c70cf4d15
81 changed files with 1932 additions and 453 deletions

View File

@ -0,0 +1,4 @@
# Blogger
Blackend for my blog at
"katex/fonts",

View File

@ -0,0 +1,32 @@
<afx-app-window data-id = "blogger-cv-sec-win" apptitle="Porforlio section" width="450" height="400">
<afx-vbox >
<div data-height="5"></div>
<afx-hbox data-height = "30" >
<afx-label data-width= "70" text = "__(Title)"></afx-label>
<input type = "text" name="title" input-class = "user-input"/>
</afx-hbox>
<afx-hbox data-height = "30" >
<afx-label text = "__(Subtitle)" data-width= "70"></afx-label>
<input type = "text" name="subtitle" input-class = "user-input"/>
</afx-hbox>
<afx-hbox data-height = "30" >
<afx-label text = "__(Location)" data-width= "70"></afx-label>
<input type = "text" name="location" input-class = "user-input"/>
</afx-hbox>
<afx-hbox data-height = "30" >
<afx-label text = "__(From)" data-width= "70"></afx-label>
<input type = "text" name="start" input-class = "user-input"/>
<afx-label text = "To:" style="text-align:center;" data-width= "70"></afx-label>
<input type = "text" name="end" input-class = "user-input"/>
</afx-hbox>
<afx-label data-height = "30" text = "Content" style = "margin-left:5px;"></afx-label>
<div data-id="editor-container">
<textarea name="content" data-id = "contentarea" ></textarea>
</div>
<afx-hbox data-height = "35">
<div></div>
<afx-switch data-id = "section-publish" data-width="30"></afx-switch>
<afx-button iconclass = "fa fa-save" data-id = "bt-cv-sec-save" data-width="60" text = "__(Save)"></afx-button>
</afx-hbox>
</afx-vbox>
</afx-app-window>

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

View File

@ -0,0 +1 @@
u<EFBFBD>Z

1088
Blogger/build/debug/main.css Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,13 @@
{
"app":"Blogger",
"name":"Blogging application",
"description":"Backend manager for blogging",
"info":{
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.0.6-a",
"category":"Internet",
"iconclass":"fa fa-book",
"mimes":["none"]
}

View File

@ -0,0 +1,82 @@
<afx-app-window data-id = "blogger-win" apptitle="Blogger" width="600" height="500">
<afx-hbox >
<afx-tab-container data-id = "tabcontainer" dir = "row" tabbarwidth= "22">
<afx-hbox data-id="user-container" data-height="100%" iconclass="fa fa-user-circle">
<afx-vbox>
<afx-hbox data-height = "30">
<afx-label data-width= "70" text = "__(Full name)"></afx-label>
<input type = "text" name="fullname" input-class = "user-input"/>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Address)" data-width= "70"></afx-label>
<input type = "text" name="address" input-class = "user-input"/>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Phone)" data-width= "70"></afx-label>
<input type = "text" name="Phone" input-class = "user-input"/>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Email)" data-width= "70"></afx-label>
<input type = "text" name="email" input-class = "user-input"/>
</afx-hbox>
<afx-hbox data-height = "30">
<afx-label text = "__(Url)" data-width= "70"></afx-label>
<input type = "text" name="url" input-class = "user-input"/>
</afx-hbox>
<afx-label data-height = "30" text = "__(Short biblio)"></afx-label>
<textarea name="shortbiblio" input-class = "user-input"></textarea>
<afx-hbox data-height = "35">
<div></div>
<afx-button iconclass = "fa fa-save" data-id = "bt-user-save" data-width="60" text = "__(Save)"></afx-button>
</afx-hbox>
</afx-vbox>
</afx-hbox>
<afx-hbox data-id="cv-container" data-height="100%" iconclass="fa fa-info-circle">
<div data-width="5"></div>
<afx-vbox data-width="150" min-width="100">
<afx-label class="lbl-header" data-height = "23" text = "__(Categories)" iconclass = "fa fa-bars"></afx-label>
<afx-tree-view data-id = "cv-list" ></afx-tree-view>
<afx-hbox data-height="30" class = "cv-side-bar-btn">
<afx-button data-id = "cv-cat-add" data-width = "25" text = "" iconclass = "fa fa-plus-circle"></afx-button>
<afx-button data-id = "cv-cat-del" data-width = "25" text = "" iconclass = "fa fa-minus-circle"></afx-button>
<afx-button data-id = "cv-cat-edit" data-width = "25" text = "" iconclass = "fa fa-pencil-square-o"></afx-button>
</afx-hbox>
</afx-vbox>
<afx-resizer data-width = "2"></afx-resizer>
<afx-vbox>
<afx-list-view data-id = "cv-sec-list" ></afx-list-view>
<afx-hbox data-height="30" class = "cv-side-bar-btn">
<afx-label data-id = "cv-sec-status"></afx-label>
<afx-button data-id = "cv-sec-add" data-width = "25" text = "" iconclass = "fa fa-plus-circle"></afx-button>
<afx-button data-id = "cv-sec-edit" data-width = "25" text = "" iconclass = "fa fa-pencil-square-o"></afx-button>
<afx-button data-id = "cv-sec-move" data-width = "25" text = "" iconclass = "fa fa-exchange"></afx-button>
</afx-hbox>
</afx-vbox>
<div data-width="5"></div>
</afx-hbox>
<afx-hbox data-id = "blog-container" data-height="100%" iconclass="fa fa-book">
<afx-list-view data-id = "blog-list" min-width="100" data-width="200"></afx-list-view>
<afx-resizer data-width = "3"></afx-resizer>
<afx-vbox>
<div data-id = "editor-container">
<textarea data-id="markarea" ></textarea>
</div>
<afx-label text = "__(Tags)" style="font-weight:bold;" data-height="25" ></afx-label>
<afx-hbox data-height="25">
<input type = "text" data-id = "input-tags" />
<div data-width="5"></div>
<afx-switch data data-id = "blog-publish" data-width="30"></afx-switch>
<div data-width="5"></div>
</afx-hbox>
<div data-height="5"></div>
</afx-vbox>
</afx-hbox>
</afx-tab-container>
</afx-hbox>
</afx-app-window>

View File

@ -0,0 +1,20 @@
<afx-app-window data-id = "blogger-send-mail-win" apptitle="Send mail" width="500" height="400" resizable = "false">
<afx-hbox>
<afx-menu data-width="150" data-id="email-list"></afx-menu>
<afx-resizer data-width="3"></afx-resizer>
<div data-width="5"></div>
<afx-vbox >
<div data-height="5"></div>
<afx-label data-height="20" text = "__(Title)"></afx-label>
<input type = "text" data-height="20" name="title" data-id = "mail-title"/>
<afx-label data-height = "20" text = "Content" ></afx-label>
<textarea name="content" data-id = "contentarea" ></textarea>
<div data-height="5"></div>
<afx-hbox data-height = "30">
<div></div>
<afx-button iconclass = "fa fa-paper-plane" data-id = "bt-sendmail" data-width="60" text = "__(Send)"></afx-button>
</afx-hbox>
</afx-vbox>
<div data-width="5"></div>
</afx-hbox>
</afx-app-window>

View File

@ -0,0 +1,24 @@
local data = ...
-- print(data.content)
local error_msg = {}
local iserror = false
for k,v in pairs(data.to) do
print("sent to:"..v)
local to = v
local from = "From: xsang.le@gmail.com\n"
local suject = "Subject: " .. data.title .. "\n"
local content = data.content.."\n"
local cmd = 'echo "' .. utils.escape(from .. suject .. content) .. '"| sendmail ' .. to
--print(cmd)
local r = os.execute(cmd)
if not r then
iserror = true
table.insert(error_msg, v)
print("Unable to send mail to: "..v)
end
end
local result = {}
result.error = iserror
result.result = error_msg
return result