-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Silverbeard00/Materialize
Materialize
- Loading branch information
Showing
3 changed files
with
113 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -344,11 +344,12 @@ | |
,@navbar | ||
(:div :class "container" | ||
(:div :class "section" | ||
,@body))) | ||
(:footer :class "page-footer red darken-4" | ||
,@body | ||
(:footer :class "page-footer" | ||
(:div :class "container" | ||
(:div :class "row" | ||
(:h5 :class "center white-text" "Made with Powerful Parenthesis"))))))) | ||
|
||
(:h5 :class "center white-text" "Made with Powerful Parenthesis")))))))))) | ||
|
||
|
||
(defmacro standard-three-nine-hook ((&key bodythree) &body bodynine) | ||
|
@@ -377,21 +378,24 @@ | |
(:input :type "text" | ||
:class "form-control" | ||
:name "username" | ||
:id "username") | ||
:id "username" | ||
:required "required") | ||
(:label :class "white-text" :for "username" "Username")) | ||
|
||
(:div :class "input-field col s6" | ||
(:input :type "password" | ||
:name "password" | ||
:class "form-control" | ||
:id "password") | ||
:id "password" | ||
:required "required") | ||
(:label :class "white-text" :for "password" "Password")) | ||
|
||
(:div :class "input-field col s6" | ||
(:input :type "password" | ||
:class "form-control" | ||
:name "password-repeat" | ||
:id "password-repeat") | ||
:id "password-repeat" | ||
:required "required") | ||
(:label :class "white-text" :for "password-repeat" "Repeat")) | ||
|
||
(:div :class "center" | ||
|
@@ -412,15 +416,17 @@ | |
(:input :type "text" | ||
:class "form-control" | ||
:name "username" | ||
:id "username") | ||
:id "username" | ||
:required "required") | ||
(:label :class "white-text" :for "username" "Username")) | ||
|
||
(:div :class "input-field col s12" | ||
|
||
(:input :type "password" | ||
:class "form-control" | ||
:name "password" | ||
:id "password") | ||
:id "password" | ||
:required "required") | ||
(:label :class "white-text" :for "password" "Password")) | ||
(:div :class "center" | ||
(:button :type "submit" | ||
|
@@ -519,22 +525,38 @@ | |
|
||
(:input :type "text" | ||
:id "input-item-description" | ||
:name "input-item-description")) | ||
:name "input-item-description" | ||
:required "required")) | ||
(:div :class "input-field col s12 l6 m6" | ||
|
||
(:label :for "inputPrice" :class "black-text" "Price") | ||
(:input :type "text" | ||
:id "input-item-price" | ||
:name "input-item-price")) | ||
:name "input-item-price" | ||
:required "required")) | ||
(:div :class "input-field col s12 m6 l6" | ||
|
||
(:label :for "inputQty" :class "black-text" "Quantity") | ||
(:input :type "text" | ||
:id "input-item-qty" | ||
:name "input-item-qty")) | ||
:name "input-item-qty" | ||
:required "required")) | ||
(:input :type "hidden" :id "image-data" :name "image-data" :value ,image) | ||
|
||
(:button :type "submit" :class "red darken-4 btn waves-effect waves-light" "Add") | ||
(:a :class "red dropdown-button darken-4 btn waves-effect waves-light" | ||
|
||
:href "#" | ||
:data-activates "dropdown1" | ||
:data-beloworigin "true" | ||
"Rotate") | ||
(:ul :id "dropdown1" :class "dropdown-content" | ||
(:li (:a :href (format nil "rotate-image?direction=~a&image=~a" | ||
"left" ,image) | ||
:class "red-text" (:i :class "material-icons" "rotate_left") "Rotate Left")) | ||
(:li (:a :href (format nil "rotate-image?direction=~a&image=~a" | ||
"right" ,image) | ||
:class "red-text" (:i :class "material-icons" "rotate_right") "Rotate Right"))) | ||
(:button :type "button" :class "red darken-4 btn waves-effect waves-light" | ||
:data-target "myModal" "Switch"))))))) | ||
|
||
|
@@ -549,7 +571,7 @@ | |
|
||
(dolist (img ,full-images) | ||
(htm | ||
(:div :class "col s12 m6 l6" | ||
(:div :class "col s12 m3 l3" | ||
(:form :action "/swapitemposition" | ||
:method "POST" | ||
(:input :type "hidden" :id "image-name" | ||
|
@@ -599,47 +621,52 @@ | |
(:div :class "chip black-text" (fmt "Contact: ~A" (escape-string (invoice-contact-name invoice)))) | ||
(:div :class "card-action" | ||
(:a :href (format nil "check-in-set-pre?showname=~a&setname=~a" (web-safep (show-name invoice)) (web-safep (invoice-set-name invoice))) | ||
:class "chip blue-grey" "Check-in") | ||
:class "btn-flat waves-effect red-text text-darken-4" "Check-in") | ||
(:a :href (format nil "pre-set-cookies?showname=~a&setname=~a" (web-safep (show-name invoice)) (web-safep (invoice-set-name invoice))) | ||
:class "chip blue-grey" "Invoice")))))))))) | ||
:class "btn-flat waves-effect red-text text-darken-4" "Invoice")))))))))) | ||
|
||
(defmacro standard-item-list-table (&key invoice) | ||
`(with-html-output (*standard-output* nil :indent t) | ||
(:div :class "row" | ||
(:div :class "input-field col s12 l6 m6" | ||
(:div :class "input-field col s12 l4 m4" | ||
(:label :for "myInput" :class "black-text" "Search") | ||
(:input :type "text" :id "myInput" :onkeyup "myFunction()" :class "black-text")) | ||
(:script :src "plugins/search.js") | ||
(:div :id "itemlist" | ||
(:ul :id "myUL" | ||
(dolist (item (invoice-item-list ,invoice)) | ||
(htm | ||
(:li | ||
(:div :class "col s12 m6 l6" | ||
(:div :class "card blue-grey" | ||
(:div :class "card-image" | ||
(:img :src (item-picture item) :width "25%" :height "25%" :class "materialboxed responsive-img") | ||
(:span :class "black card-title" (fmt "~A" (escape-string (item-description item))))) | ||
(:div :class "card-content" | ||
(:div :class "chip black-text" (fmt "Price: ~A" (escape-string (item-price item)))) | ||
(:div :class "chip black-text" (fmt "Quantity: ~A" (escape-string (item-quantity item))))) | ||
(:div :class "card-action" | ||
(:form :class "form-inline" | ||
:action "/removeitem" | ||
:method "POST" | ||
:id "item-table" | ||
(:input :type "hidden" :value (item-description item) | ||
:name "item" :id "item") | ||
(:input :type "hidden" :value (item-price item) | ||
:name "item-price" :id "item-price") | ||
(:input :type "hidden" :value (item-quantity item) | ||
:name "item-quantity" :id "item-quantity") | ||
(:input :type "hidden" :value ,invoice | ||
:name "invoice" :id "invoice") | ||
(if (string= (item-returned-on item) "") | ||
(htm (:button :type "submit" :class "red darken-4 btn btn-default btn-sm btn-danger" "Remove")) | ||
(htm (:button :type "submit" :class "btn btn-sm btn-danger disabled" :disabled "true" | ||
(fmt "RTN'D ~A" (escape-string (item-returned-on item)))))))))))))))))) | ||
(dolist (item (invoice-item-list ,invoice)) | ||
(htm | ||
(:li | ||
(:div :class "col s12 m4 l4" | ||
(:div :class "card blue-grey" | ||
(:div :class "card-image" | ||
(:img :src (item-picture item) :width "25%" :height "25%" :class "materialboxed responsive-img") | ||
(:span :class "card-title truncate" | ||
:style "font-size:20px; text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;" ;;;Set correct fontsize and give a blackoutline to help readability | ||
(fmt "~A" (escape-string (item-description item))))) | ||
(:div :class "card-content" | ||
|
||
(:span | ||
|
||
(:i :class "material-icons" "attach_money") (fmt " ~A  " (escape-string (item-price item))) | ||
(:a :href "#" :class "right black-text" (:i :class "material-icons" "all_inclusive") (fmt " ~A" (escape-string (item-quantity item)))))) | ||
(:div :class "card-action" | ||
(:form :class "form-inline" | ||
:action "/removeitem" | ||
:method "POST" | ||
:id "item-table" | ||
(:input :type "hidden" :value (item-description item) | ||
:name "item" :id "item") | ||
(:input :type "hidden" :value (item-price item) | ||
:name "item-price" :id "item-price") | ||
(:input :type "hidden" :value (item-quantity item) | ||
:name "item-quantity" :id "item-quantity") | ||
(:input :type "hidden" :value ,invoice | ||
:name "invoice" :id "invoice") | ||
(if (string= (item-returned-on item) "") | ||
(htm (:button :type "submit" :class "red darken-4 btn btn-default btn-sm btn-danger" "Remove")) | ||
(htm (:button :type "submit" :class "btn black-text disabled" :disabled "true" | ||
(fmt "RTN'D ~A" (escape-string (item-returned-on item)))))))))))))))))) | ||
;;;Force remove option may be necessary due to this | ||
|
||
|
||
|
@@ -648,24 +675,28 @@ | |
(defmacro standard-check-in (&key invoice) | ||
`(with-html-output (*standard-output* nil :indent t) | ||
(:div :class "row" | ||
(:div :class "input-field col s12 l6 m6" | ||
(:div :class "input-field col s12 l4 m4" | ||
(:label :for "myInput" :class "black-text" "Search") | ||
(:input :type "text" :id "myInput" :class "black-text" :onkeyup "myFunction()")) | ||
(:ul :id "myUL" | ||
(dolist (item (remove-returned (invoice-item-list ,invoice))) | ||
(htm | ||
(:li | ||
(:div :class "col s12 m6 l6" | ||
(:div :class "col s12 m4 l4" | ||
(:div :class "card blue-grey" | ||
(:div :class "card-image" | ||
(:img :src (item-picture item) :class "materialboxed responsive-img") | ||
(:span :class "card-title black" (fmt "~A" (escape-string (item-description item))))) | ||
(:span :class "card-title truncate" | ||
:style "font-size:20px; text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;" ;;;Set correct fontsize and give a blackoutline to help readability | ||
(fmt "~A" (escape-string (item-description item))))) | ||
|
||
(:div :class "card-content" | ||
(:span | ||
(:i :class "material-icons" "attach_money") (fmt "~A" (escape-string (item-price item))) | ||
(:a :href "#" :class "right black-text" (:i :class "material-icons" "all_inclusive") (fmt " ~A  " (escape-string (item-quantity item)))))) | ||
|
||
(:div :class "card-action" | ||
|
||
|
||
(:div :class "chip black-text" (fmt "Price: ~A" (escape-string (item-price item)))) | ||
(:div :class "chip black-text" (fmt "Quantity: ~A" (escape-string (item-quantity item)))) | ||
(:div :class "card-action" | ||
(:form | ||
:action "/check-in-item" | ||
:method "POST" | ||
|
@@ -677,8 +708,15 @@ | |
:value (item-description item)) | ||
(:input :type "hidden" :name "item-qty" :id "item-qty" | ||
:value (item-quantity item)) | ||
(:button :type "submit" :class "red darken-4 btn waves-effect waves-light" "Check in")))))))))) | ||
(:script :src "plugins/search.js")))) | ||
(:button :type "submit" :class "red darken-4 btn-floating waves-effect waves-light" (:i :class "material-icons" "check_circle")) | ||
|
||
(:a :class "right red darken-4 btn-floating activator" (:i :class "material-icons" "arrow_upward")))) | ||
|
||
(:div :class "card-reveal" | ||
(:span :class "card-title grey-text text-darken-4" | ||
"Hello World" (:i :class "material-icons right" "close")))))))))) | ||
|
||
(:script :src "plugins/search.js"))) | ||
|
||
|
||
|
||
|
@@ -1023,12 +1061,12 @@ | |
(defparameter begin-table "\\begin{invoiceTable}") | ||
(defparameter end-table "\\end{invoiceTable}") | ||
(defparameter unitrow "\\unitrow{") | ||
(defparameter begin-img-table "\\begin{pictureTable}") | ||
(defparameter end-img-table "\\end{pictureTable}") | ||
(defparameter end-document "\\end{document}") | ||
(defparameter begin-img-table "\\figureSeriesFloat{}{") | ||
(defparameter end-img-table "}") | ||
(defparameter end-document " \\end{document}") | ||
(defparameter begin-document "\\begin{document}") | ||
|
||
(defparameter picrow "\\picrow{") | ||
|
||
;;;Takes an invoice and root-dir | ||
|
||
(defparameter tail-conf " | ||
|
@@ -1037,7 +1075,7 @@ | |
{\\color{red} \\textsc{Signature}}\\hspace{0.5cm} \\makebox[3in]{\\hrulefill} \\hspace{0.5cm} \\textsc{Date}\\hspace{0.5cm} \\makebox[1in]{\\hrulefill} \\\\ | ||
\\textsc{Print}\\hspace{1.25cm} \\makebox[3in]{\\hrulefill} | ||
\\newpage ") | ||
") | ||
|
||
|
||
(defparameter document-conf "\\documentclass{invoice} % Use the custom invoice class (invoice.cls) | ||
|
@@ -1048,7 +1086,6 @@ | |
\\usepackage{courier} | ||
\\usepackage{setspace} | ||
\\usepackage{graphicx} | ||
\\usepackage{subfig} | ||
\\usepackage{pgffor} | ||
\\usepackage{caption} | ||
\\usepackage{expl3} | ||
|
@@ -1118,6 +1155,7 @@ Norfolk, Georgia 00000 \\hfill [email protected] | |
(princ tail-conf s) | ||
(princ begin-img-table s) | ||
(mapc (lambda (b) (princ (format-picture b) s) | ||
(fresh-line s) | ||
(fresh-line s)) | ||
(picture-list (invoice-item-list invoice))) | ||
(princ end-img-table s) | ||
|
@@ -1150,22 +1188,21 @@ Norfolk, Georgia 00000 \\hfill [email protected] | |
;;;I'll fix it in a little bit. | ||
|
||
(defun format-picture (b) | ||
(concatenate 'string picrow | ||
(if (null (first b)) | ||
"" | ||
(item-description (first b))) | ||
"}" | ||
"{"(subseq-img (first b)) "}{" | ||
(if (null (second b)) | ||
"" | ||
(item-description (second b))) | ||
"}{" | ||
(subseq-img (second b)) "}{" | ||
(if (null (third b)) | ||
"" | ||
(item-description (third b))) | ||
"}{" | ||
(subseq-img (third b)) "}")) | ||
(concatenate 'string | ||
"\\figureSeriesRow{ " | ||
(picrow-format (first b)) | ||
(picrow-format (second b)) | ||
(picrow-format (third b)) | ||
"}")) | ||
|
||
(defun picrow-format (a) | ||
(if (null a) | ||
"" | ||
(concatenate 'string "\\figureSeriesElement{" | ||
(item-description a) | ||
"}{\\resizebox{0.3\\linewidth}{5cm}{\\includegraphics{" | ||
(subseq-img a) | ||
"}}}"))) | ||
|
||
(defun picture-list (b) | ||
(cond | ||
|
Oops, something went wrong.