diff --git a/Makefile b/Makefile index 73bc1a6..17860fe 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ BUILDDIR = ./build projs = grs info copyfiles = index.ls -main: copy +main: clean copy for f in $(projs); do make -C "$${f}" ; done copy: diff --git a/grs/Makefile b/grs/Makefile index f863ce4..7854ebc 100644 --- a/grs/Makefile +++ b/grs/Makefile @@ -1,10 +1,10 @@ BUILDDIR = ../build/grs -copyfiles = font-awesome.css fonts images showdown.min.js ubuntu-regular.css mainsite.css hermit-light.css +copyfiles = font-awesome.css fonts images showdown.min.js ubuntu-regular.css mainsite.css sendto.html main: - mkdir $(BUILDDIR) cp -rf $(copyfiles) $(BUILDDIR) - - cd $(BUILDDIR) && ln -s ../os/resources/themes/antos/fonts/ ./gfonts && ln -s ../os/scripts/ ./gscripts + - cd $(BUILDDIR) && ln -s ../os/resources ./resources && ln -s ../os/scripts/ ./gscripts clean: rm -rf $(BUILDDIR)/* \ No newline at end of file diff --git a/grs/font-awesome.css b/grs/font-awesome.css index c03263e..b14c52e 100644 --- a/grs/font-awesome.css +++ b/grs/font-awesome.css @@ -6,8 +6,8 @@ * -------------------------- */ @font-face { font-family: 'FontAwesome'; - src: url('gfonts/fontawesome-webfont.eot?v=4.7.0'); - src: url('gfonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('gfonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('gfonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('gfonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('gfonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); + src: url('resources/themes/antos/fonts//fontawesome-webfont.eot?v=4.7.0'); + src: url('resources/themes/antos/fonts//fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('resources/themes/antos/fonts//fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('resources/themes/antos/fonts//fontawesome-webfont.woff?v=4.7.0') format('woff'), url('resources/themes/antos/fonts//fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('resources/themes/antos/fonts//fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } diff --git a/grs/hermit-light.css b/grs/hermit-light.css deleted file mode 100755 index 439a0c1..0000000 --- a/grs/hermit-light.css +++ /dev/null @@ -1,12 +0,0 @@ -/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on August 6, 2017 */ - - - -@font-face { - font-family: 'HermitLight'; - src: url('gfonts/hermit-light-webfont.woff2') format('woff2'), - url('gfonts/hermit-light-webfont.woff') format('woff'); - font-weight: normal; - font-style: normal; - -} \ No newline at end of file diff --git a/grs/mainsite.css b/grs/mainsite.css index c79ed41..8cb3462 100644 --- a/grs/mainsite.css +++ b/grs/mainsite.css @@ -1,7 +1,16 @@ -#layout{ - width:100%; +html,body{ + margin: 0; + padding: 0; font-family: "Ubuntu"; font-size: 14px; + width: 100%; + height: 100%; + overflow: hidden; +} +#desktop{ + width:100%; + min-height:100%; + overflow:hidden; /*margin:0 auto; display: flex; flex-direction: row-reverse; @@ -81,4 +90,116 @@ line-height: 1.6; max-width: 500px; +} + +afx-app-window div.afx-window-wrapper{ + border:1px solid #a6a6a6; + /*box-shadow: 1px 1px 1px #cbcbcb;*/ + box-shadow: 1px 1px 1px #9f9F9F; + border-radius: 5px; + background-color:#dfdfdf; + padding:0; + display: flex; + flex-direction: column; + width: 100%; + height: 100%; +} +afx-app-window.unactive > div.afx-window-wrapper{ + background-color: #f6f6f6; +} + +afx-app-window ul.afx-window-top{ + margin: 0; + padding: 0; + width: 100%; + padding:0; + height: 20px; + border-bottom: 1px solid #a6a6a6; +} +afx-app-window ul.afx-window-top li{ + list-style: none; + margin-left: 3px; + margin-top:4px; + +} +afx-app-window ul.afx-window-top .afx-window-close,.afx-window-minimize,.afx-window-maximize{ + width: 11px; + height: 11px; + border-radius: 10px; +} +afx-app-window ul li.afx-window-close{ + background-color: #Fc605b; + float:left; +} +afx-app-window ul li.afx-window-minimize{ + background-color: #fec041; + float:left; +} +afx-app-window ul li.afx-window-maximize{ + background-color: #35cc4b; + float:left; +} + +afx-app-window ul li.afx-window-title{ + margin-top:1px; + float:none; + overflow: hidden; + padding-left: 5px; + padding-right: 5px; + text-align: center; +} + +afx-app-window div.afx-window-content +{ + overflow: hidden; + width: 100%; + background-color: white; + flex-grow: 1; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; +} + +afx-app-window div.afx-window-grip{ + height: 10px; + width: 10px; + background-color: transparent; +} +afx-hbox.inputbox{ + margin-left: 10px; + margin-right: 10px; + border-bottom: 1px solid #e5e5e5; +} + +textarea{ + margin-left: 10px; + margin-right: 10px; + border: 0; + font-family: "Ubuntu"; + font-size: 14px; + padding: 3px; +} +input { + outline: none; + border: 0; + padding: 0; + height: 17px; +} +div.label{ + color: #899aae; +} +button{ + outline: none; + background-color: #5fa6cf; + font-weight: bold; + color: white; + border: 0; + border-radius: 5px; + padding:3px; + margin-right: 10px; + box-shadow: 1px 1px 1px #9f9F9F; +} +#status{ + padding-left: 10px; + padding-top:5px; + color:#724841; } \ No newline at end of file diff --git a/grs/sendto.html b/grs/sendto.html new file mode 100644 index 0000000..0719f7d --- /dev/null +++ b/grs/sendto.html @@ -0,0 +1,27 @@ + + +
+ +
Name:
+ +
+
+ +
From:
+ +
+
+ +
Subject:
+ +
+
+ +
+ +
+ +
+
+
+
\ No newline at end of file diff --git a/grs/ubuntu-regular.css b/grs/ubuntu-regular.css index 5918d7d..5811a05 100755 --- a/grs/ubuntu-regular.css +++ b/grs/ubuntu-regular.css @@ -4,8 +4,8 @@ @font-face { font-family: 'Ubuntu'; - src: url('gfonts/ubuntu-regular-webfont.woff2') format('woff2'), - url('gfonts/ubuntu-regular-webfont.woff') format('woff'); + src: url('resources/themes/antos/fonts//ubuntu-regular-webfont.woff2') format('woff2'), + url('resources/themes/antos/fonts//ubuntu-regular-webfont.woff') format('woff'); font-weight: normal; font-style: normal; @@ -13,8 +13,8 @@ @font-face { font-family: 'Ubuntu'; - src: url('gfonts/ubuntu-bold-webfont.woff2') format('woff2'), - url('gfonts/ubuntu-bold-webfont.woff') format('woff'); + src: url('resources/themes/antos/fonts//ubuntu-bold-webfont.woff2') format('woff2'), + url('resources/themes/antos/fonts//ubuntu-bold-webfont.woff') format('woff'); font-weight: bold; font-style: normal; @@ -22,8 +22,8 @@ @font-face { font-family: 'Ubuntu'; - src: url('gfonts/ubuntu-bolditalic-webfont.woff2') format('woff2'), - url('gfonts/ubuntu-bolditalic-webfont.woff') format('woff'); + src: url('resources/themes/antos/fonts//ubuntu-bolditalic-webfont.woff2') format('woff2'), + url('resources/themes/antos/fonts//ubuntu-bolditalic-webfont.woff') format('woff'); font-weight: bold; font-style: italic; @@ -31,8 +31,8 @@ @font-face { font-family: 'Ubuntu'; - src: url('gfonts/ubuntu-italic-webfont.woff2') format('woff2'), - url('gfonts/ubuntu-italic-webfont.woff') format('woff'); + src: url('resources/themes/antos/fonts//ubuntu-italic-webfont.woff2') format('woff2'), + url('resources/themes/antos/fonts//ubuntu-italic-webfont.woff') format('woff'); font-weight: normal; font-style: italic; diff --git a/index.ls b/index.ls index 91e6e90..3e7508e 100644 --- a/index.ls +++ b/index.ls @@ -22,14 +22,70 @@ + + + + -
+
@@ -49,7 +105,7 @@
- Powered by antd, (c) 2017 - 2018 Xuan Sang LE + Powered by antd server, (c) 2017 - 2018 Xuan Sang LE
diff --git a/info/Makefile b/info/Makefile index 878ef7e..c899098 100644 --- a/info/Makefile +++ b/info/Makefile @@ -1,6 +1,6 @@ BUILDDIR = ../build/info -copyfiles = index.ls style.css +copyfiles = index.ls style.css sendmail.lua main: - mkdir $(BUILDDIR) diff --git a/info/sendmail.lua b/info/sendmail.lua new file mode 100644 index 0000000..5c819c9 --- /dev/null +++ b/info/sendmail.lua @@ -0,0 +1,20 @@ + +if not REQUEST.query.json then + fail("unknown request") +end +local rq = (JSON.decodeString(REQUEST.query.json)) +local to = "xsang.le@gmail.com" +local from = "From: "..rq.email.."\n" +local suject = "Subject: "..rq.subject.."\n" +local content = "Contact request from:"..rq.name.."\n Email:"..rq.email.."\n"..rq.content.."\n" + +local cmd = 'echo "'..utils.escape(from..suject..content)..'"| sendmail '..to + +print(cmd) +local r = os.execute(cmd) + +if r then + result(r) +else + fail("Cannot send email at the moment, the service may be down") +end \ No newline at end of file