diff --git a/templates/projects/full-screen/README.md b/templates/projects/full-screen/README.md new file mode 100644 index 0000000..884a69e --- /dev/null +++ b/templates/projects/full-screen/README.md @@ -0,0 +1,8 @@ +# New CLOG Web project +### _Your Name _ + +This is a project to do ... something. + +## License + +Specify license here diff --git a/templates/projects/full-screen/foot.clog.lt b/templates/projects/full-screen/foot.clog.lt new file mode 100644 index 0000000..b5ed08d --- /dev/null +++ b/templates/projects/full-screen/foot.clog.lt @@ -0,0 +1 @@ +
(C) 2022
\ No newline at end of file diff --git a/templates/projects/full-screen/foot.lisp.lt b/templates/projects/full-screen/foot.lisp.lt new file mode 100644 index 0000000..4728baf --- /dev/null +++ b/templates/projects/full-screen/foot.lisp.lt @@ -0,0 +1,16 @@ + +(in-package :<%= (@ sys-name) %>) +(defclass foot-panel (clog:clog-panel) ((foot-bounds :reader foot-bounds))) +(defun create-foot-panel + (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t)) + (let ((panel + (change-class + (clog:create-div clog-obj :content + "
(C) 2022
" + :hidden hidden :class class :html-id html-id + :auto-place auto-place) + 'foot-panel))) + (setf (slot-value panel 'foot-bounds) + (attach-as-child clog-obj "CLOGB38697851771" :clog-type + 'clog:clog-div :new-id t)) + panel)) diff --git a/templates/projects/full-screen/left.clog.lt b/templates/projects/full-screen/left.clog.lt new file mode 100644 index 0000000..929ca7b --- /dev/null +++ b/templates/projects/full-screen/left.clog.lt @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/templates/projects/full-screen/left.lisp.lt b/templates/projects/full-screen/left.lisp.lt new file mode 100644 index 0000000..ee5bd2c --- /dev/null +++ b/templates/projects/full-screen/left.lisp.lt @@ -0,0 +1,36 @@ + +(in-package :<%= (@ sys-name) %>) +(defclass left-panel (clog:clog-panel) + ((left-button-2 :reader left-button-2) + (left-button-1 :reader left-button-1) (app-menu :reader app-menu) + (left-bounds :reader left-bounds))) +(defun create-left-panel + (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t)) + (let ((panel + (change-class + (clog:create-div clog-obj :content + "
" + :hidden hidden :class class :html-id html-id + :auto-place auto-place) + 'left-panel))) + (setf (slot-value panel 'left-button-2) + (attach-as-child clog-obj "CLOGB3869833764" :clog-type + 'clog:clog-button :new-id t)) + (setf (slot-value panel 'left-button-1) + (attach-as-child clog-obj "CLOGB3869833763" :clog-type + 'clog:clog-button :new-id t)) + (setf (slot-value panel 'app-menu) + (attach-as-child clog-obj "CLOGB3869833762" :clog-type + 'clog:clog-div :new-id t)) + (setf (slot-value panel 'left-bounds) + (attach-as-child clog-obj "CLOGB3869833761" :clog-type + 'clog:clog-div :new-id t)) + (clog:set-on-click (left-button-1 panel) + (lambda (target) + (declare (ignorable target)) + (replace-center (create-main-panel panel)))) + (clog:set-on-click (left-button-2 panel) + (lambda (target) + (declare (ignorable target)) + (replace-center (create-next-panel panel)))) + panel)) diff --git a/templates/projects/full-screen/main.clog.lt b/templates/projects/full-screen/main.clog.lt new file mode 100644 index 0000000..926e843 --- /dev/null +++ b/templates/projects/full-screen/main.clog.lt @@ -0,0 +1 @@ +
Hello World
\ No newline at end of file diff --git a/templates/projects/full-screen/main.lisp.lt b/templates/projects/full-screen/main.lisp.lt new file mode 100644 index 0000000..33f35c5 --- /dev/null +++ b/templates/projects/full-screen/main.lisp.lt @@ -0,0 +1,24 @@ +(in-package :<%= (@ sys-name) %>) +(defclass main-panel (clog:clog-panel) + ((next-button :reader next-button) + (main-container :reader main-container))) +(defun create-main-panel + (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t)) + (let ((panel + (change-class + (clog:create-div clog-obj :content + "
Hello World
" + :hidden hidden :class class :html-id html-id + :auto-place auto-place) + 'main-panel))) + (setf (slot-value panel 'next-button) + (attach-as-child clog-obj "CLOGB3869692797" :clog-type + 'clog:clog-button :new-id t)) + (setf (slot-value panel 'main-container) + (attach-as-child clog-obj "CLOGB3869692796" :clog-type + 'clog:clog-div :new-id t)) + (clog:set-on-click (next-button panel) + (lambda (target) + (declare (ignorable target)) + (replace-element panel (create-next-panel panel)))) + panel)) diff --git a/templates/projects/full-screen/next.clog.lt b/templates/projects/full-screen/next.clog.lt new file mode 100644 index 0000000..0b3837a --- /dev/null +++ b/templates/projects/full-screen/next.clog.lt @@ -0,0 +1 @@ +
Next Panel
\ No newline at end of file diff --git a/templates/projects/full-screen/next.lisp.lt b/templates/projects/full-screen/next.lisp.lt new file mode 100644 index 0000000..9baa4fa --- /dev/null +++ b/templates/projects/full-screen/next.lisp.lt @@ -0,0 +1,24 @@ +(in-package :<%= (@ sys-name) %>) +(defclass next-panel (clog:clog-panel) + ((next-button :reader next-button) + (next-container :reader next-container))) +(defun create-next-panel + (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t)) + (let ((panel + (change-class + (clog:create-div clog-obj :content + "
Next Panel
" + :hidden hidden :class class :html-id html-id + :auto-place auto-place) + 'next-panel))) + (setf (slot-value panel 'next-button) + (attach-as-child clog-obj "CLOGB3869692808" :clog-type + 'clog:clog-button :new-id t)) + (setf (slot-value panel 'next-container) + (attach-as-child clog-obj "CLOGB38696928071" :clog-type + 'clog:clog-div :new-id t)) + (clog:set-on-click (next-button panel) + (lambda (target) + (declare (ignorable target)) + (replace-element panel (create-main-panel panel)))) + panel)) diff --git a/templates/projects/full-screen/right.clog.lt b/templates/projects/full-screen/right.clog.lt new file mode 100644 index 0000000..543c6a3 --- /dev/null +++ b/templates/projects/full-screen/right.clog.lt @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/templates/projects/full-screen/right.lisp.lt b/templates/projects/full-screen/right.lisp.lt new file mode 100644 index 0000000..b32a550 --- /dev/null +++ b/templates/projects/full-screen/right.lisp.lt @@ -0,0 +1,16 @@ + +(in-package :<%= (@ sys-name) %>) +(defclass right-panel (clog:clog-panel) ((div-1 :reader div-1))) +(defun create-right-panel + (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t)) + (let ((panel + (change-class + (clog:create-div clog-obj :content + "
" + :hidden hidden :class class :html-id html-id + :auto-place auto-place) + 'right-panel))) + (setf (slot-value panel 'div-1) + (attach-as-child clog-obj "CLOGB38698129071" :clog-type + 'clog:clog-div :new-id t)) + panel)) diff --git a/templates/projects/full-screen/tmpl.asd.lt b/templates/projects/full-screen/tmpl.asd.lt new file mode 100644 index 0000000..9fe1220 --- /dev/null +++ b/templates/projects/full-screen/tmpl.asd.lt @@ -0,0 +1,26 @@ +(asdf:defsystem #:<%= (@ sys-name) %> + :description "New CLOG System" + :author "some@one.com" + :license "BSD" + :version "0.0.0" + :serial t + :entry-point "<%= (@ sys-name) %>:start-app" + :depends-on (#:clog) ; add clog plugins here as #:plugin for run time + :components ((:file "<%= (@ sys-name) %>") + (:file "main") + (:file "next") + (:file "top") + (:file "foot") + (:file "left") + (:file "right"))) + +(asdf:defsystem #:<%= (@ sys-name) %>/tools + :defsystem-depends-on (:clog) + :depends-on (#:<%= (@ sys-name) %> #:clog/tools) ; add clog plugins here as #:plugin/tools for design time + :components ((:clog-file "main") + (:clog-file "next") + (:clog-file "top") + (:clog-file "foot") + (:clog-file "left") + (:clog-file "right"))) + diff --git a/templates/projects/full-screen/tmpl.lisp.lt b/templates/projects/full-screen/tmpl.lisp.lt new file mode 100644 index 0000000..b51a31b --- /dev/null +++ b/templates/projects/full-screen/tmpl.lisp.lt @@ -0,0 +1,31 @@ +(defpackage #:<%= (@ sys-name) %> + (:use #:cl #:clog #:clog-web) + (:export start-app)) + +(in-package :<%= (@ sys-name) %>) + +(defun on-new-window (body) + (debug-mode body) + ;; Add the clog-web look and feel + (clog-web-initialize body) + (let ((layout (create-panel-box-layout body :top-height 0 + :left-width 0 + :bottom-height 0 + :right-width 0))) + (setf (connection-data-item body "layout") layout) + (create-top-panel (top-panel layout)) + (create-foot-panel (bottom-panel layout)) + (create-left-panel (left-panel layout)) + (create-right-panel (right-panel layout)) + (create-main-panel (center-panel layout)) + (fit-layout layout))) + +(defun replace-center (obj) + (let ((layout (connection-data-item obj "layout"))) + (replace-children (center-panel layout) obj))) + +(defun start-app () + (initialize 'on-new-window + :static-root (merge-pathnames "./www/" + (asdf:system-source-directory :<%= (@ sys-name) %>))) + (open-browser)) diff --git a/templates/projects/full-screen/top.clog.lt b/templates/projects/full-screen/top.clog.lt new file mode 100644 index 0000000..e2053b0 --- /dev/null +++ b/templates/projects/full-screen/top.clog.lt @@ -0,0 +1 @@ +
Add image url
My App
\ No newline at end of file diff --git a/templates/projects/full-screen/top.lisp.lt b/templates/projects/full-screen/top.lisp.lt new file mode 100644 index 0000000..0427555 --- /dev/null +++ b/templates/projects/full-screen/top.lisp.lt @@ -0,0 +1,27 @@ + +(in-package :<%= (@ sys-name) %>) +(defclass top-panel (clog:clog-panel) + ((app-title :reader app-title) (app-image :reader app-image) + (app-header :reader app-header) (top-bounds :reader top-bounds))) +(defun create-top-panel + (clog-obj &key (hidden nil) (class nil) (html-id nil) (auto-place t)) + (let ((panel + (change-class + (clog:create-div clog-obj :content + "
\"Add
My App
" + :hidden hidden :class class :html-id html-id + :auto-place auto-place) + 'top-panel))) + (setf (slot-value panel 'app-title) + (attach-as-child clog-obj "CLOGB3869784708" :clog-type + 'clog:clog-div :new-id t)) + (setf (slot-value panel 'app-image) + (attach-as-child clog-obj "CLOGB3869784707" :clog-type + 'clog:clog-img :new-id t)) + (setf (slot-value panel 'app-header) + (attach-as-child clog-obj "CLOGB3869784706" :clog-type + 'clog:clog-div :new-id t)) + (setf (slot-value panel 'top-bounds) + (attach-as-child clog-obj "CLOGB38697849925" :clog-type + 'clog:clog-div :new-id t)) + panel)) diff --git a/tools/clog-builder-settings.lisp b/tools/clog-builder-settings.lisp index b242a90..f4f5144 100644 --- a/tools/clog-builder-settings.lisp +++ b/tools/clog-builder-settings.lisp @@ -2270,36 +2270,41 @@ (list '(:name "CLOG Builder - Panel Projects" :code :group) - '(:name "New Builder Panel Project" + '(:name "Center Panel Project" :code "nbp" :type :system :www "templates/www/" :loc "templates/projects/clog-panel/") + '(:name "Full screen/browser Panel Project" + :code "nfp" + :type :system + :www "templates/www/" + :loc "templates/projects/full-screen/") '(:name "CLOG - General Projects" :code :group) - '(:name "New CLOG Basic HTML Project" + '(:name "Basic HTML Project" :code "ncp" :type :system :www "templates/www/" :loc "templates/projects/clog/") - '(:name "New CLOG-GUI Project" + '(:name "CLOG-GUI Project" :code "ncgp" :type :system :www "templates/www/" :loc "templates/projects/clog-gui/") - '(:name "New CLOG-WEB Project" + '(:name "CLOG-WEB Project" :code "ncwp" :type :system :www "templates/www/" :loc "templates/projects/clog-web/") - '(:name "New CLOG-WEB-SITE Project" + '(:name "CLOG-WEB-SITE Project" :code "ncws" :type :system :www "templates/www/" :loc "templates/projects/clog-web-site/") '(:name "CLOG/CLOG Builder - Extension Projects" :code :group) - '(:name "New CLOG/CLOG-Builder Plugin Project" + '(:name "CLOG/CLOG Builder Plugin Project" :code "ncplug" :type :system :www "templates/www/"