mailman3.common-lisp.net
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
List overview
Download
bknr-cvs
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
bknr-cvs@common-lisp.net
1964 discussions
Start a n
N
ew thread
[bknr-cvs] hans changed trunk/projects/quickhoney/src/imageproc.lisp
by BKNR Commits
29 Aug '08
29 Aug '08
Revision: 3750 Author: hans URL:
http://bknr.net/trac/changeset/3750
Always use integer scale factor for pixel images when creating button. U trunk/projects/quickhoney/src/imageproc.lisp Modified: trunk/projects/quickhoney/src/imageproc.lisp =================================================================== --- trunk/projects/quickhoney/src/imageproc.lisp 2008-08-29 13:51:00 UTC (rev 3749) +++ trunk/projects/quickhoney/src/imageproc.lisp 2008-08-29 14:18:35 UTC (rev 3750) @@ -64,13 +64,12 @@ (button-height (parse-integer button-height)) (button-image (create-image button-width button-height t)) (category (bknr.utils:make-keyword-from-string category)) - (scale-factor (apply #'max - (if (> (/ (image-width input-image) (image-height input-image)) - (/ button-width button-height)) - (/ button-height (image-height input-image)) - (/ button-width (image-width input-image))) - (when (eq :pixel category) - (list 1)))) + (scale-factor (funcall (if (eq :pixel category) + #'ceiling #'identity) + (if (> (/ (image-width input-image) (image-height input-image)) + (/ button-width button-height)) + (/ button-height (image-height input-image)) + (/ button-width (image-width input-image))))) (cutout-width (floor (/ button-width scale-factor))) (cutout-height (floor (/ button-height scale-factor))) (radius (parse-integer radius)))
1
0
0
0
[bknr-cvs] hans changed trunk/projects/quickhoney/website/static/javascript.js
by BKNR Commits
29 Aug '08
29 Aug '08
Revision: 3749 Author: hans URL:
http://bknr.net/trac/changeset/3749
remove debug message U trunk/projects/quickhoney/website/static/javascript.js Modified: trunk/projects/quickhoney/website/static/javascript.js =================================================================== --- trunk/projects/quickhoney/website/static/javascript.js 2008-08-29 13:47:43 UTC (rev 3748) +++ trunk/projects/quickhoney/website/static/javascript.js 2008-08-29 13:51:00 UTC (rev 3749) @@ -1049,7 +1049,6 @@ $("edit_client").value = current_image.client; $("edit_keywords").value = current_image.spider_keywords; map(function(keyword) { - log("initialize edit keyword " + keyword); $('edit_' + keyword).checked = current_image.keywords[keyword] ? true : false; }, ['explicit', 'buy-file', 'buy-print', 'buy-t-shirt']); show_cms_window("edit_form");
1
0
0
0
[bknr-cvs] hans changed trunk/projects/quickhoney/
by BKNR Commits
29 Aug '08
29 Aug '08
Revision: 3748 Author: hans URL:
http://bknr.net/trac/changeset/3748
Update news layout. CSS tweaks to remove dotted focus indicator in Firefox. U trunk/projects/quickhoney/src/imageproc.lisp U trunk/projects/quickhoney/website/static/javascript.js U trunk/projects/quickhoney/website/static/styles.css U trunk/projects/quickhoney/website/templates/index.xml Modified: trunk/projects/quickhoney/src/imageproc.lisp =================================================================== --- trunk/projects/quickhoney/src/imageproc.lisp 2008-08-28 15:56:17 UTC (rev 3747) +++ trunk/projects/quickhoney/src/imageproc.lisp 2008-08-29 13:47:43 UTC (rev 3748) @@ -72,7 +72,8 @@ (when (eq :pixel category) (list 1)))) (cutout-width (floor (/ button-width scale-factor))) - (cutout-height (floor (/ button-height scale-factor)))) + (cutout-height (floor (/ button-height scale-factor))) + (radius (parse-integer radius))) (copy-image input-image button-image (floor (- (image-width input-image) cutout-width) 2) (if (eq :vector category) @@ -91,7 +92,8 @@ 0 0 0 0 (image-width type-image) (image-height type-image))))) - (corner-image :image button-image :radius (parse-integer radius)) + (unless (zerop radius) + (corner-image :image button-image :radius radius)) button-image)) (define-imageproc-handler center-thumbnail (input-image width height) Modified: trunk/projects/quickhoney/website/static/javascript.js =================================================================== --- trunk/projects/quickhoney/website/static/javascript.js 2008-08-28 15:56:17 UTC (rev 3747) +++ trunk/projects/quickhoney/website/static/javascript.js 2008-08-29 13:47:43 UTC (rev 3748) @@ -231,7 +231,7 @@ onclick: function () { jump_to(item.category + '/' + item.subcategory + '/' + item.name) } }; return DIV({ 'class': 'newsentry autonews news_' + item.category }, A(link_dest, - revealer.IMG({ src: "/image/" + item.name + '/cutout-button,,' + color + ',98,98,4,' + item.category, + revealer.IMG({ src: "/image/" + item.name + '/cutout-button,,' + color + ',98,98,0,' + item.category, style: 'visibility: hidden', width: 98, height: 98, onload: 'reveal_image(this)' })), @@ -1049,6 +1049,7 @@ $("edit_client").value = current_image.client; $("edit_keywords").value = current_image.spider_keywords; map(function(keyword) { + log("initialize edit keyword " + keyword); $('edit_' + keyword).checked = current_image.keywords[keyword] ? true : false; }, ['explicit', 'buy-file', 'buy-print', 'buy-t-shirt']); show_cms_window("edit_form"); Modified: trunk/projects/quickhoney/website/static/styles.css =================================================================== --- trunk/projects/quickhoney/website/static/styles.css 2008-08-28 15:56:17 UTC (rev 3747) +++ trunk/projects/quickhoney/website/static/styles.css 2008-08-29 13:47:43 UTC (rev 3748) @@ -7,6 +7,10 @@ font-size: 80%; } +/* remove dotted borders around links */ +a:active { outline: none } +a:focus { -moz-outline-style: none } + .page { display: none; border: 0px; @@ -146,8 +150,6 @@ #menu.contact a#m_contact img.selected { visibility: inherit; } #menu.contact a#m_contact img.unselected { visibility: hidden } -.autonews a { color: #30be01; } - #m_home { top: 30px; left: 36px; } #m_pixel { top: 36px; left: 250px; } #m_vector { top: 36px; left: 331px; } @@ -381,6 +383,8 @@ /* news styles */ +.autonews a { color: #30be01; } + #newsentries { width: 486px; } @@ -389,35 +393,48 @@ width: 486px; } -.autonews { - height: 108px; +.newsentry h1 { + margin: 5px 0px 2px 0px; + font-size: 120%; + font-weight: normal; + color: #30be01 } -.newsentry img { - margin-bottom: 8px; +.autonews { + height: 106px; + color: #000; border-width: 1px; border-style: solid } .autonews img { padding: 0px; + padding-right: 4px; float: left; - margin: 5px; + margin: 4px; } -.newsentry h1 { - margin: 0px 0px 2px 0px; - font-size: 120%; - font-weight: normal; - color: #30be01 -} +.news_pixel h1, .news_pixel a { color: #00ccff } +.news_vector h1, .news_vector a { color: #00ccff } -.autonews h1 { - color: white; -} - -.news_vector { background-color: #00ccff; } -.news_pixel { background-color: #ff00ff; } -.autonews a { color: white } +.news_vector { border-color: #00ccff } +.news_pixel { border-color: #ff00ff } div.news_sep { width: 486px; height: 17px; background-image: url(/image/news-sep); } +.archive { width: 162px } +.archive a.year { font-size: 1.2em; margin: 2px 0px 2px 0px} +.archive a.year.active { color: #000; } +.archive a.month.active { display: block; } +.archive a.month { display: none; margin-top: 2px; font-size: 1em; } +#archive-navigation.m1 a.m1 { color: #000; } +#archive-navigation.m2 a.m2 { color: #000; } +#archive-navigation.m3 a.m3 { color: #000; } +#archive-navigation.m4 a.m4 { color: #000; } +#archive-navigation.m5 a.m5 { color: #000; } +#archive-navigation.m6 a.m6 { color: #000; } +#archive-navigation.m7 a.m7 { color: #000; } +#archive-navigation.m8 a.m8 { color: #000; } +#archive-navigation.m9 a.m9 { color: #000; } +#archive-navigation.m10 a.m10 { color: #000; } +#archive-navigation.m11 a.m11 { color: #000; } +#archive-navigation.m12 a.m12 { color: #000; } /* cms styles */ @@ -596,21 +613,3 @@ left: 585px; visibility: hidden; } - -.archive a.year { font-size: 1.2em; margin: 2px 0px 2px 0px; } -.archive a.year.active { color: #000; } -.archive a.month.active { display: block; } -.archive a.month { display: none; padding: 0px 5px 2px 5px; margin-top: 2px; font-size: 0.8em; } -#archive-navigation.m1 a.m1 { color: #000; } -#archive-navigation.m2 a.m2 { color: #000; } -#archive-navigation.m3 a.m3 { color: #000; } -#archive-navigation.m4 a.m4 { color: #000; } -#archive-navigation.m5 a.m5 { color: #000; } -#archive-navigation.m6 a.m6 { color: #000; } -#archive-navigation.m7 a.m7 { color: #000; } -#archive-navigation.m8 a.m8 { color: #000; } -#archive-navigation.m9 a.m9 { color: #000; } -#archive-navigation.m10 a.m10 { color: #000; } -#archive-navigation.m11 a.m11 { color: #000; } -#archive-navigation.m12 a.m12 { color: #000; } -.archive { padding-left: 1em; } Modified: trunk/projects/quickhoney/website/templates/index.xml =================================================================== --- trunk/projects/quickhoney/website/templates/index.xml 2008-08-28 15:56:17 UTC (rev 3747) +++ trunk/projects/quickhoney/website/templates/index.xml 2008-08-29 13:47:43 UTC (rev 3748) @@ -150,7 +150,7 @@ <tr> <td valign="top" id="newsentries"> </td> - <td class="archive" id="archive-navigation" valign="top"> + <td class="archive" id="archive-navigation" valign="top" align="right"> </td> </tr> </tbody> @@ -278,9 +278,9 @@ Keywords:<br /> <input type="text" id="edit_keywords" name="spider-keywords" value="" /><br /> <input type="checkbox" id="edit_explicit" name="explicit" value="1" /> Explicit<br/> - <input type="checkbox" id="edit_buy_file" name="buy-file" value="1"/> Sell as file<br/> - <input type="checkbox" id="edit_buy_print" name="buy-print" value="1"/> Sell as print<br/> - <input type="checkbox" id="edit_buy_t_shirt" name="buy-t-shirt" value="1"/> Sell as t-shirt<br/> + <input type="checkbox" id="edit_buy-file" name="buy-file" value="1"/> Sell as file<br/> + <input type="checkbox" id="edit_buy-print" name="buy-print" value="1"/> Sell as print<br/> + <input type="checkbox" id="edit_buy-t-shirt" name="buy-t-shirt" value="1"/> Sell as t-shirt<br/> </p> <p class="cms"> <input type="submit" name="action" value="edit" />
1
0
0
0
[bknr-cvs] hans changed trunk/bknr/web/src/web/template-handler.lisp
by BKNR Commits
28 Aug '08
28 Aug '08
Revision: 3747 Author: hans URL:
http://bknr.net/trac/changeset/3747
oops, renamed special variable and forgot to save U trunk/bknr/web/src/web/template-handler.lisp Modified: trunk/bknr/web/src/web/template-handler.lisp =================================================================== --- trunk/bknr/web/src/web/template-handler.lisp 2008-08-28 15:54:05 UTC (rev 3746) +++ trunk/bknr/web/src/web/template-handler.lisp 2008-08-28 15:56:17 UTC (rev 3747) @@ -115,7 +115,7 @@ (destructuring-bind (name value) a (if (listp name) (destructuring-bind (local-name . namespace-uri) name - (let ((namespace-alias (gethash namespace-uri *nsuri-lname-map*))) + (let ((namespace-alias (gethash namespace-uri *nsuri-alias-map*))) (unless namespace-alias (error "cannot map namespace URI ~A to namespace-alias when making attribute ~A" namespace-uri a)) (sax:make-attribute :namespace-uri namespace-uri @@ -171,12 +171,9 @@ ;; be revised with newer cxml releases. (let* ((toplevel-attributes (cxml-xmls::compute-attributes/lnames toplevel t)) (*template-expander* expander) - (*nsuri-lname-map* (let ((map (make-hash-table :test #'equal))) + (*nsuri-alias-map* (let ((map (make-hash-table :test #'equal))) (dolist (attribute toplevel-attributes) (when (scan "^xmlns($|:)" (sax:attribute-qname attribute)) - (format t "mapping ~A => ~A~%" - (sax:attribute-namespace-uri attribute) - (sax:attribute-local-name attribute)) (setf (gethash (sax:attribute-value attribute) map) (sax:attribute-local-name attribute)))) map)))
1
0
0
0
[bknr-cvs] hans changed trunk/
by BKNR Commits
28 Aug '08
28 Aug '08
Revision: 3746 Author: hans URL:
http://bknr.net/trac/changeset/3746
XML output compatibility fixes. U trunk/bknr/web/src/web/template-handler.lisp U trunk/projects/quickhoney/website/templates/index.xml Modified: trunk/bknr/web/src/web/template-handler.lisp =================================================================== --- trunk/bknr/web/src/web/template-handler.lisp 2008-08-28 13:52:36 UTC (rev 3745) +++ trunk/bknr/web/src/web/template-handler.lisp 2008-08-28 15:54:05 UTC (rev 3746) @@ -107,15 +107,22 @@ (t (format nil "~A" val)))))) string)) +(defvar *nsuri-alias-map* nil + "Maps namespace URI to alias name as declared in the current document.") + (defun xmls-attributes-to-sax (fn attrs) (mapcar (lambda (a) (destructuring-bind (name value) a (if (listp name) - (destructuring-bind (qname . namespace-uri) name - (sax:make-attribute :namespace-uri namespace-uri - :qname qname - :value (funcall fn value) - :specified-p t)) + (destructuring-bind (local-name . namespace-uri) name + (let ((namespace-alias (gethash namespace-uri *nsuri-lname-map*))) + (unless namespace-alias + (error "cannot map namespace URI ~A to namespace-alias when making attribute ~A" namespace-uri a)) + (sax:make-attribute :namespace-uri namespace-uri + :qname (format nil "~A:~A" namespace-alias local-name) + :local-name local-name + :value (funcall fn value) + :specified-p t))) (sax:make-attribute :qname name :value (funcall fn value) :specified-p t)))) @@ -162,12 +169,22 @@ ;; In order to generate xmlns attributes, we use the internal ;; CXML-XMLS::COMPUTE-ATTRIBUTES/LNAMES function. This may need to ;; be revised with newer cxml releases. - (sax:start-element *html-sink* (node-ns toplevel) (node-name toplevel) (node-name toplevel) - (cxml-xmls::compute-attributes/lnames toplevel t)) - (let ((*template-expander* expander)) + (let* ((toplevel-attributes (cxml-xmls::compute-attributes/lnames toplevel t)) + (*template-expander* expander) + (*nsuri-lname-map* (let ((map (make-hash-table :test #'equal))) + (dolist (attribute toplevel-attributes) + (when (scan "^xmlns($|:)" (sax:attribute-qname attribute)) + (format t "mapping ~A => ~A~%" + (sax:attribute-namespace-uri attribute) + (sax:attribute-local-name attribute)) + (setf (gethash (sax:attribute-value attribute) map) + (sax:attribute-local-name attribute)))) + map))) + (sax:start-element *html-sink* (node-ns toplevel) (node-name toplevel) (node-name toplevel) + toplevel-attributes) (dolist (node (node-children toplevel)) - (emit-template-node expander node))) - (sax:end-element *html-sink* (node-ns toplevel) (node-name toplevel) (node-name toplevel))) + (emit-template-node expander node)) + (sax:end-element *html-sink* (node-ns toplevel) (node-name toplevel) (node-name toplevel)))) (defun find-template (dir components) (if (null components) Modified: trunk/projects/quickhoney/website/templates/index.xml =================================================================== --- trunk/projects/quickhoney/website/templates/index.xml 2008-08-28 13:52:36 UTC (rev 3745) +++ trunk/projects/quickhoney/website/templates/index.xml 2008-08-28 15:54:05 UTC (rev 3746) @@ -3,6 +3,7 @@ "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
"> <html xmlns="
http://www.w3.org/1999/xhtml
" + xmlns:xml="
http://www.w3.org/XML/1998/namespace
" xmlns:bknr="
http://bknr.net/
" xmlns:quickhoney="
http://quickhoney.com/
" >
1
0
0
0
[bknr-cvs] hans changed trunk/bknr/web/src/web/template-handler.lisp
by BKNR Commits
28 Aug '08
28 Aug '08
Revision: 3745 Author: hans URL:
http://bknr.net/trac/changeset/3745
Fix bug that caused top-level element of a template to be output two times. U trunk/bknr/web/src/web/template-handler.lisp Modified: trunk/bknr/web/src/web/template-handler.lisp =================================================================== --- trunk/bknr/web/src/web/template-handler.lisp 2008-08-27 23:57:40 UTC (rev 3744) +++ trunk/bknr/web/src/web/template-handler.lisp 2008-08-28 13:52:36 UTC (rev 3745) @@ -165,7 +165,8 @@ (sax:start-element *html-sink* (node-ns toplevel) (node-name toplevel) (node-name toplevel) (cxml-xmls::compute-attributes/lnames toplevel t)) (let ((*template-expander* expander)) - (emit-template-node expander toplevel)) + (dolist (node (node-children toplevel)) + (emit-template-node expander node))) (sax:end-element *html-sink* (node-ns toplevel) (node-name toplevel) (node-name toplevel))) (defun find-template (dir components)
1
0
0
0
[bknr-cvs] hans changed trunk/projects/quickhoney/
by BKNR Commits
28 Aug '08
28 Aug '08
Revision: 3744 Author: hans URL:
http://bknr.net/trac/changeset/3744
Reimplement login and logout, now a separate page is used to log in. U trunk/projects/quickhoney/src/handlers.lisp U trunk/projects/quickhoney/src/news.lisp U trunk/projects/quickhoney/src/tags.lisp U trunk/projects/quickhoney/src/webserver.lisp U trunk/projects/quickhoney/website/static/javascript.js A trunk/projects/quickhoney/website/static/login.css U trunk/projects/quickhoney/website/templates/index.xml A trunk/projects/quickhoney/website/templates/login.xml Modified: trunk/projects/quickhoney/src/handlers.lisp =================================================================== --- trunk/projects/quickhoney/src/handlers.lisp 2008-08-27 17:27:40 UTC (rev 3743) +++ trunk/projects/quickhoney/src/handlers.lisp 2008-08-27 23:57:40 UTC (rev 3744) @@ -92,8 +92,19 @@ (defmethod handle ((handler json-login-handler)) (with-json-response () (encode-object-element "admin" (admin-p (bknr-session-user))) + (when (and (anonymous-p (bknr-session-user)) + (query-param "__username")) + (encode-object-element "login_failed" t)) (encode-object-element "login" (user-login (bknr-session-user))))) +(defclass json-logout-handler (page-handler) + ()) + +(defmethod handle ((handler json-logout-handler)) + (setf (session-value 'bknr-session) nil) + (with-json-response () + (encode-object-element "logged_out" t))) + (defclass json-clients-handler (page-handler) ()) Modified: trunk/projects/quickhoney/src/news.lisp =================================================================== --- trunk/projects/quickhoney/src/news.lisp 2008-08-27 17:27:40 UTC (rev 3743) +++ trunk/projects/quickhoney/src/news.lisp 2008-08-27 23:57:40 UTC (rev 3744) @@ -13,10 +13,9 @@ (html-stream s ((:div :class (format nil "newsentry news_~(~A~)" category)) - ((:img :src (format nil "http://~A/image/~A/cutout-button,,~A,98,98,4" + ((:img :src (format nil "http://~A/image/~A" (website-host) - (store-object-id image) - (if is-vector "00ccff" "ff00ff"))) + (store-object-id image))) (:div (:h1 (:princ (store-image-name image))) (:princ (format nil "~A by ~A | " Modified: trunk/projects/quickhoney/src/tags.lisp =================================================================== --- trunk/projects/quickhoney/src/tags.lisp 2008-08-27 17:27:40 UTC (rev 3743) +++ trunk/projects/quickhoney/src/tags.lisp 2008-08-27 23:57:40 UTC (rev 3744) @@ -37,4 +37,14 @@ (define-bknr-tag first-image-link () (html ((:a :href #?"/image-browse/$((bknr.images:store-image-name (first (bknr.datastore:class-instances 'quickhoney-image))))") - (emit-tag-children)))) \ No newline at end of file + (emit-tag-children)))) + +(define-bknr-tag login-status () + (cond + ((bknr.web::admin-p (bknr-session-user)) + (redirect "/index")) + ((and (bknr.web::anonymous-p (bknr-session-user)) + (query-param "__username")) + (html (:h1 "Login failed, please try again"))) + (t + (html (:h1 "Please login"))))) \ No newline at end of file Modified: trunk/projects/quickhoney/src/webserver.lisp =================================================================== --- trunk/projects/quickhoney/src/webserver.lisp 2008-08-27 17:27:40 UTC (rev 3743) +++ trunk/projects/quickhoney/src/webserver.lisp 2008-08-27 23:57:40 UTC (rev 3744) @@ -23,6 +23,7 @@ ("/animation" animation-handler) ("/json-image-query" json-image-query-handler) ("/json-login" json-login-handler) + ("/json-logout" json-logout-handler) ("/json-clients" json-clients-handler) ("/json-buttons" json-buttons-handler) ("/json-edit-image" json-edit-image-handler) Modified: trunk/projects/quickhoney/website/static/javascript.js =================================================================== --- trunk/projects/quickhoney/website/static/javascript.js 2008-08-27 17:27:40 UTC (rev 3743) +++ trunk/projects/quickhoney/website/static/javascript.js 2008-08-27 23:57:40 UTC (rev 3744) @@ -59,21 +59,12 @@ debug('debug window cleared'); } -/* login */ +/* login status */ -function show_login() { - $("login_failure").style.visibility = 'hidden'; - $("login_form").style.visibility = 'visible'; -} +function login_status(json_result) { -function hide_status() { - $("login_status").style.visibility = 'hidden'; -} + log('login_status, admin: ' + json_result.admin + ' login: ' + json_result.login); -function login_complete(json_result) { - - log('login_complete, admin: ' + json_result.admin + ' login: ' + json_result.login); - logged_in = json_result.admin; if (logged_in) { @@ -96,6 +87,7 @@ var elements = $("cms").childNodes; if (logged_in) { + for (var i = 0; i < elements.length; i++) { if (elements[i].id) { elements[i].style.visibility = (elements[i].id == name) ? "visible" : "hidden"; @@ -103,13 +95,13 @@ } $("login_status").style.visibility = 'visible'; + } else { for (var i = 0; i < elements.length; i++) { if (elements[i].id) { elements[i].style.visibility = "hidden"; } } - $("login_form").style.visibility = 'visible'; } } @@ -121,10 +113,9 @@ function send_logout() { logged_in = false; - loadJSONDoc("/logout") + show_cms_window(); + loadJSONDoc("/json-logout") .addCallbacks(function () {}, alert); - - show_cms_window("login_form"); } /* image editing */ @@ -1170,7 +1161,7 @@ } load_button_images(); - loadJSONDoc("/json-login").addCallbacks(login_complete, alert); + loadJSONDoc("/json-login").addCallbacks(login_status, alert); loadJSONDoc('/json-news-archive/quickhoney').addCallbacks(initialize_news_archive, alert); if (!document.location.href.match(/#/)) { @@ -1489,4 +1480,20 @@ animator.attributes = { width: { to: 60 }, left: { to: 624 } }; animator.animate(); } -} \ No newline at end of file +} + +/* login stuff */ + +function init_login () { + $('username').focus(); + $('login_form').style.display = 'block'; +} + +function do_login () { + + $('login_form').style.display = 'none'; + $('logging-in').style.display = 'block'; + + return true; +} + Added: trunk/projects/quickhoney/website/static/login.css =================================================================== --- trunk/projects/quickhoney/website/static/login.css (rev 0) +++ trunk/projects/quickhoney/website/static/login.css 2008-08-27 23:57:40 UTC (rev 3744) @@ -0,0 +1,4 @@ +body { margin: 2em } +table { margin-bottom: 1em } +.label { padding-right: 1em } +h1 { margin: 1em 0em 2em 0em } \ No newline at end of file Modified: trunk/projects/quickhoney/website/templates/index.xml =================================================================== --- trunk/projects/quickhoney/website/templates/index.xml 2008-08-27 17:27:40 UTC (rev 3743) +++ trunk/projects/quickhoney/website/templates/index.xml 2008-08-27 23:57:40 UTC (rev 3744) @@ -358,23 +358,6 @@ </p> </div> - <div id="login_form" class="cms_form"> - <form method="post" name="login_form" onsubmit="return send_login();"> - <b>Login</b> <br /> - Username<br /> - <input type="text" name="username" /><br /> - Password<br /> - <input type="password" name="password" /><br /><br /> - <a href="#" onclick="send_login();" class="cmslink">login</a> - <input class="invisibleSubmit" type="submit" /> - </form> - </div> - - <div id="login_failure" class="cms_form"> - <b>Login failed</b> <br /> - Please check your user name and password. - </div> - <div id="login_status" class="cms_form"> <p>You are logged in as <b id="username"> </b></p> <p><a href="#" onclick="send_logout();" class="cmslink">logout</a></p> Added: trunk/projects/quickhoney/website/templates/login.xml =================================================================== --- trunk/projects/quickhoney/website/templates/login.xml (rev 0) +++ trunk/projects/quickhoney/website/templates/login.xml 2008-08-27 23:57:40 UTC (rev 3744) @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
"> +<html + xmlns="
http://www.w3.org/1999/xhtml
" + xmlns:bknr="
http://bknr.net/
" + xmlns:quickhoney="
http://quickhoney.com/
" + > + <head> + <link rel="stylesheet" href="/static/yui/reset-fonts/reset-fonts.css" /> + <link rel="stylesheet" href="/static/login.css" /> + <script src="/MochiKit/MochiKit.js" type="text/javascript"> </script> + <script src="/static/javascript.js" type="text/javascript"> </script> + <title>QuickHoney CMS Login</title> + </head> + + <body id="login"> + + <img id="logo" src="/image/quickhoney-black"/> + + <form method="POST" id="login_form" style="display: none" onsubmit="do_login()"> + + <quickhoney:login-status /> + + <table> + <tbody> + <tr> + <td class="label"><label for="username">Username:</label></td> + <td><input name="__username" id="username" /><br/></td> + </tr> + <tr> + <td class="label"><label for="password">Password:</label></td> + <td><input name="__password" id="password" type="password" /></td> + </tr> + </tbody> + </table> + <button name="login" type="submit">login</button> + </form> + + <h1 id="logging-in" style="display: none">Logging in...</h1> + + <script language="javascript" type="text/javascript"> + init_login(); + </script> + </body> +</html>
1
0
0
0
[bknr-cvs] hans changed trunk/projects/quickhoney/website/
by BKNR Commits
27 Aug '08
27 Aug '08
Revision: 3743 Author: hans URL:
http://bknr.net/trac/changeset/3743
implement drop shadows for overlay windows U trunk/projects/quickhoney/website/static/javascript.js A trunk/projects/quickhoney/website/static/shadow-grid.gif A trunk/projects/quickhoney/website/static/shadow.png A trunk/projects/quickhoney/website/static/ydsf.css U trunk/projects/quickhoney/website/templates/index.xml Modified: trunk/projects/quickhoney/website/static/javascript.js =================================================================== --- trunk/projects/quickhoney/website/static/javascript.js 2008-08-27 10:13:01 UTC (rev 3742) +++ trunk/projects/quickhoney/website/static/javascript.js 2008-08-27 17:27:40 UTC (rev 3743) @@ -1233,10 +1233,14 @@ var overlay = $('overlay'); overlay.style.top = '144px'; overlay.className = current_directory; + var inner = DIV({ 'class': 'inner', style: 'background: white'}, + H1(null, title), + IMG({ src: '/image/overlay-close/color,000000,' + pages[current_directory].link_color, + id: 'close', width: 13, height: 13}), + BR()); replaceChildNodes(overlay, - H1(null, title), - IMG({ src: '/image/overlay-close/color,000000,' + pages[current_directory].link_color, - id: 'close', width: 13, height: 13})); + DIV({ 'class': 'ydsf' }, + inner)); overlay.style.width = width + 'px'; $('close').style.left = (width - 23) + 'px'; $('close').onclick = overlay_remove; @@ -1244,7 +1248,7 @@ for (var i = 3; i < arguments.length; i++) { elements.push(arguments[i]); } - appendChildNodes(overlay, DIV({id: id}, elements)); + appendChildNodes(inner, DIV({id: id}, elements)); overlay.style.visibility = 'inherit'; } Added: trunk/projects/quickhoney/website/static/shadow-grid.gif =================================================================== (Binary files differ) Property changes on: trunk/projects/quickhoney/website/static/shadow-grid.gif ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: trunk/projects/quickhoney/website/static/shadow.png =================================================================== (Binary files differ) Property changes on: trunk/projects/quickhoney/website/static/shadow.png ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: trunk/projects/quickhoney/website/static/ydsf.css =================================================================== --- trunk/projects/quickhoney/website/static/ydsf.css (rev 0) +++ trunk/projects/quickhoney/website/static/ydsf.css 2008-08-27 17:27:40 UTC (rev 3743) @@ -0,0 +1,92 @@ +/* + yDSF (ydnar Drop-Shadow-Fu) + ydnar(a)sixapart.com -
http://www.sixapart.com
+*/ + +.ydsf { + display: block; + position: relative; + margin: 4px -4px -4px 4px; + background: url(shadow-grid.gif) repeat; +} + +/* ie6 ignores this selector */ +html>body .ydsf { + margin: 10px -10px -10px 10px; + background: url(shadow.png) right bottom no-repeat; +} + +/* shadow corners */ +.ydsf:before, +.ydsf:after { + content: " "; + display: block; + width: 10px; + height: 10px; + background: inherit; +} + +.ydsf:before { + position: absolute; + top: 0; + right: 0; + margin: -10px 0 0 auto; + background-position: right top; +} + +.ydsf:after { + margin: -10px 0 0 -10px; + background-position: left bottom; +} + +.ydsf .inner { + display: block; + position: relative; + overflow: hidden; /* prevents margin leakage from child elements */ + left: -4px; + top: -4px; +} + +/* ie6 ignores this selector */ +html>body .ydsf .inner { + left: -10px; + top: -10px; + margin: 0; +} + + +/* helper classes (not YDSF related) */ + +.demo-ydsf { + position: relative; + border: 1px solid #999; + padding: 10px; + background: #fff url(gradient.jpg) left top repeat-x; +} + +.clear { + clear: both; + overflow: hidden; + width: 1px; + height: 1px; + margin: 0 -1px -1px 0; + border: 0; + padding: 0; + font-size: 0; + line-height: 0; +} + +.left { + float: left; + display: inline; /* fixes ie double margin-left bug */ +} + +.right { float: right; } + +.note { + width: 200px; + border: 1px solid #666; + padding: 10px; + background: #ffc; + color: #333; +} Property changes on: trunk/projects/quickhoney/website/static/ydsf.css ___________________________________________________________________ Name: svn:executable + * Modified: trunk/projects/quickhoney/website/templates/index.xml =================================================================== --- trunk/projects/quickhoney/website/templates/index.xml 2008-08-27 10:13:01 UTC (rev 3742) +++ trunk/projects/quickhoney/website/templates/index.xml 2008-08-27 17:27:40 UTC (rev 3743) @@ -9,6 +9,7 @@ <head> <link rel="stylesheet" href="/static/yui/reset-fonts/reset-fonts.css" /> <link rel="stylesheet" href="/static/styles.css" /> + <link rel="stylesheet" href="/static/ydsf.css" /> <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="/rss/quickhoney" /> <script src="/static/detectplugins.js" type="text/javascript"> </script> <script src="/static/AC_QuickTime.js" type="text/javascript"> </script>
1
0
0
0
[bknr-cvs] edi changed trunk/thirdparty/drakma/request.lisp
by BKNR Commits
27 Aug '08
27 Aug '08
Revision: 3742 Author: edi URL:
http://bknr.net/trac/changeset/3742
Read content as binary if length is known Also, read trailers from the right stream U trunk/thirdparty/drakma/request.lisp Modified: trunk/thirdparty/drakma/request.lisp =================================================================== --- trunk/thirdparty/drakma/request.lisp 2008-08-27 02:40:48 UTC (rev 3741) +++ trunk/thirdparty/drakma/request.lisp 2008-08-27 10:13:01 UTC (rev 3742) @@ -143,34 +143,35 @@ #+:lispworks 'lw:simple-char #-:lispworks 'character 'octet)) (chunkedp (chunked-stream-input-chunking-p (flexi-stream-stream stream)))) - #+:clisp - (setf (flexi-stream-element-type stream) element-type) - (multiple-value-prog1 - (values (cond ((eql content-length 0) (if textp "" nil)) - (content-length - (when chunkedp - ;; see RFC 2616, section 4.4 - (error "Got Content-Length header although input chunking is on.")) - (let ((result (make-array content-length - :element-type element-type - :fill-pointer t))) - (setf (fill-pointer result) - (read-sequence result stream)) - result)) - ((or chunkedp must-close) - ;; no content length, read until EOF (or end of chunking) - (let ((buffer (make-array +buffer-size+ - :element-type element-type)) - (result (make-array 0 - :element-type element-type - :adjustable t))) - (loop for index = 0 then (+ index pos) - for pos = (read-sequence buffer stream) - do (adjust-array result (+ index pos)) - (replace result buffer :start1 index :end2 pos) - while (= pos +buffer-size+)) - result))) - (chunked-input-stream-trailers stream))))) + (values (cond ((eql content-length 0) nil) + (content-length + (when chunkedp + ;; see RFC 2616, section 4.4 + (error "Got Content-Length header although input chunking is on.")) + (setf (flexi-stream-element-type stream) 'octet) + (let ((result (make-array content-length :element-type 'octet))) + #+:clisp + (setf (flexi-stream-element-type stream) 'octet) + (read-sequence result stream) + (when textp + (setf result + (octets-to-string result :external-format (flexi-stream-external-format stream)) + #+:clisp #+:clisp + (flexi-stream-element-type stream) element-type)) + result)) + ((or chunkedp must-close) + ;; no content length, read until EOF (or end of chunking) + #+:clisp + (setf (flexi-stream-element-type stream) element-type) + (let ((buffer (make-array +buffer-size+ :element-type element-type)) + (result (make-array 0 :element-type element-type :adjustable t))) + (loop for index = 0 then (+ index pos) + for pos = (read-sequence buffer stream) + do (adjust-array result (+ index pos)) + (replace result buffer :start1 index :end2 pos) + while (= pos +buffer-size+)) + result))) + (chunked-input-stream-trailers (flexi-stream-stream stream))))) (defun http-request (uri &rest args &key (protocol :http/1.1)
1
0
0
0
[bknr-cvs] hans changed trunk/projects/quickhoney/website/static/styles.css
by BKNR Commits
27 Aug '08
27 Aug '08
Revision: 3741 Author: hans URL:
http://bknr.net/trac/changeset/3741
Update news layout, fix news archive navigation styling. U trunk/projects/quickhoney/website/static/styles.css Modified: trunk/projects/quickhoney/website/static/styles.css =================================================================== --- trunk/projects/quickhoney/website/static/styles.css 2008-08-27 02:38:29 UTC (rev 3740) +++ trunk/projects/quickhoney/website/static/styles.css 2008-08-27 02:40:48 UTC (rev 3741) @@ -597,8 +597,7 @@ visibility: hidden; } -.archive span.title { font-size: 1.2em; padding-bottom: 5px; } -.archive a.year { font-size: 1.2em; padding-bottom: 2em; } +.archive a.year { font-size: 1.2em; margin: 2px 0px 2px 0px; } .archive a.year.active { color: #000; } .archive a.month.active { display: block; } .archive a.month { display: none; padding: 0px 5px 2px 5px; margin-top: 2px; font-size: 0.8em; }
1
0
0
0
← Newer
1
...
88
89
90
91
92
93
94
...
197
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
Results per page:
10
25
50
100
200