Author: michiel Date: 2010-05-15 12:34:24 +0200 (Sat, 15 May 2010) New Revision: 42155
Added: speeltuin/mihxil/simple/src/main/webapp/icons/mailto.gif Modified: speeltuin/mihxil/simple/src/main/webapp/addthis.jspx speeltuin/mihxil/simple/src/main/webapp/index.jspx speeltuin/mihxil/simple/src/main/webapp/script.js speeltuin/mihxil/simple/src/main/webapp/style.css.jsp speeltuin/mihxil/simple/wget/Makefile Log: various improvements Modified: speeltuin/mihxil/simple/src/main/webapp/addthis.jspx =================================================================== --- speeltuin/mihxil/simple/src/main/webapp/addthis.jspx 2010-05-14 23:41:31 UTC (rev 42154) +++ speeltuin/mihxil/simple/src/main/webapp/addthis.jspx 2010-05-15 10:34:24 UTC (rev 42155) @@ -3,30 +3,20 @@ xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0" xmlns:jsp="http://java.sun.com/JSP/Page"> <jsp:output omit-xml-declaration="true" /> - <!-- - <div class="addthis_toolbox addthis_default_style"> - <a class="addthis_button_facebook"></a> - <a class="addthis_button_hyves"></a> - <a class="addthis_button_twitter"></a> - <a class="addthis_button_favorites"></a> - </div> - --> - <mm:link absolute="true" id="I" write="false" /> - <mm:link page="http://www.facebook.com/sharer.php"> - <mm:param name="u"><mm:write escape="none" referid="I" /></mm:param> - <a href="${_}" title="facebook"> - <mm:link page="/icons/facebook.png"> - <img src="${_}" /> - </mm:link> - </a> - </mm:link> - <mm:link page="http://twitter.com/home"> - <mm:param name="status"><mm:write escape="none" referid="I" /></mm:param> - <a href="${_}" title="Twitter"> - <mm:link page="/icons/twitter.png"> - <img src="${_}" /> - </mm:link> - </a> - </mm:link> - + <jsp:directive.page session="false" /> + <a href="#facebook" title="facebook" class="facebook"> + <mm:link page="/icons/facebook.png"> + <img src="${_}" alt="facebook" /> + </mm:link> + </a> + <a href="#twitter" title="Twitter" class="twitter"> + <mm:link page="/icons/twitter.png"> + <img src="${_}" alt="twitter" /> + </mm:link> + </a> + <a href="#mailto" title="Mailto" class="mailto"> + <mm:link page="/icons/mailto.gif"> + <img src="${_}" alt="mail" /> + </mm:link> + </a> </div> \ No newline at end of file Added: speeltuin/mihxil/simple/src/main/webapp/icons/mailto.gif =================================================================== (Binary files differ) Property changes on: speeltuin/mihxil/simple/src/main/webapp/icons/mailto.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: speeltuin/mihxil/simple/src/main/webapp/index.jspx =================================================================== --- speeltuin/mihxil/simple/src/main/webapp/index.jspx 2010-05-14 23:41:31 UTC (rev 42154) +++ speeltuin/mihxil/simple/src/main/webapp/index.jspx 2010-05-15 10:34:24 UTC (rev 42155) @@ -50,6 +50,10 @@ <mm:link page="/mmbase/jquery/roundCorners.jQuery.js"> <script type="text/javascript" src="${_}"><jsp:text> </jsp:text></script> </mm:link> + <c:if test="${! empty initParam.google_analytics}"> + <script type="text/javascript" src="http://www.google-analytics.com/ga.js"><jsp:text> </jsp:text></script> + <meta content="${initParam.google_analytics}" name="com.google.urchin" /> + </c:if> <mm:link page="/script.js"> <script type="text/javascript" src="${_}"><jsp:text> </jsp:text></script> </mm:link> @@ -62,13 +66,6 @@ <mm:link page="/mmbase/kupu/mmbase"> <meta content="${_}" name="org.mmbase.portal.editordir" /> </mm:link> - <c:if test="${! empty initParam.google_analytics}"> - <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"><jsp:text> </jsp:text></script> - <script type="text/javascript"> - _uacct = "${initParam.google_analytics}"; - urchinTracker(); - </script> - </c:if> <!-- conflicts with corner scripts <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=mihxil"><jsp:text> </jsp:text></script> --> @@ -93,7 +90,7 @@ <mm:frameworkparam name="n" referid="_node" /> <li id="menu${_node}" - class="${n eq _node.number ? 'active' : ''} ${status.last ? 'last' :''}"> + class="${n eq _node.number ? 'active' : 'inactive'} ${status.last ? 'last' :''}"> <a href="${_}"><mm:field name="title" /></a> </li> </mm:link> @@ -109,7 +106,7 @@ </div> </mm:node> <div class="footer"> - <p>Copyright © <mm:time time="now" format="yyyy" /> - ${initParam.copyright}</p> + <p>© <mm:time time="now" format="yyyy" /> - ${initParam.copyright}</p> </div> </div> </body> Modified: speeltuin/mihxil/simple/src/main/webapp/script.js =================================================================== --- speeltuin/mihxil/simple/src/main/webapp/script.js 2010-05-14 23:41:31 UTC (rev 42154) +++ speeltuin/mihxil/simple/src/main/webapp/script.js 2010-05-15 10:34:24 UTC (rev 42155) @@ -1,8 +1,61 @@ +$(document).ready( + function() { + $("#menu li").mouseenter(function() { $(this).addClass("hover"); }); + $("#menu li").mouseleave(function() { $(this).removeClass("hover"); }); + $("#menu li").click( + function(ev) { + var li = this; + document.location.href = $(li).find("a").attr("href"); + ev.preventDefault(); + }); + + var open = function(u, title) { + var a = function() { + window.open(u, title,'toolbar=0,status=0,resizable=1,width=626,height=436'); + }; + if (/Firefox/.test(navigator.userAgent)){ + setTimeout(a, 0); + } else{ + a(); + } + }; + $("div.icons a.facebook").click( + function() { + var u = 'http://www.facebook.com/share.php?src=bm&v=4&i=1273642353&u=' + + encodeURIComponent(document.location.href)+'&t='+encodeURIComponent(document.title); + open(u, 'share on facebook'); + return false; + } + ); + $("div.icons a.twitter").click( + function() { + var u = 'http://twitter.com/home?status=' + encodeURIComponent(document.location.href); + open(u, 'share on twitter'); + return false; + } + ); + $("div.icons a.mailto").click( + function() { + var u = "mailto:?subject=" + encodeURIComponent(document.title) + "&body=" + encodeURIComponent(document.location.href); + open(u, 'mail'); + return false; + } + ); + + }); $(window).load( function() { + $(".intro").bg(20); + $("#menu").bg([20,20,0,0]); + // $(".content").bg([0,0,20,20]); + var resize = function() { - var height = $(window).height() - 15; + var height = $(window).height() - 17; + var minHeight = $(".intro").height() + $(".footer").height(); + if (height < minHeight) { + height = minHeight; + } $(".container").height(height); var maxWidth = $(".container").width(); $(".content").height(height - $("#menu").height() - $(".footer").height()); @@ -16,17 +69,13 @@ $(window).resize(resize); resize(); - $("#menu li").mouseenter(function() { $(this).addClass("hover"); }); - $("#menu li").mouseleave(function() { $(this).removeClass("hover"); }); - $("#menu li").click( - function(ev) { - var li = this; - document.location.href = $(li).find("a").attr("href"); - ev.preventDefault(); - }); - $(".intro").bg(20); - $("#menu").bg([20,20,0,0]); - // $(".content").bg([0,0,20,20]); + var urchin = $("head meta[name=com.google.urchin]").attr("content"); + try { + var pageTracker = _gat._getTracker(urchin); + pageTracker._trackPageview(); + } catch(err) { + } + }); \ No newline at end of file Modified: speeltuin/mihxil/simple/src/main/webapp/style.css.jsp =================================================================== --- speeltuin/mihxil/simple/src/main/webapp/style.css.jsp 2010-05-14 23:41:31 UTC (rev 42154) +++ speeltuin/mihxil/simple/src/main/webapp/style.css.jsp 2010-05-15 10:34:24 UTC (rev 42155) @@ -7,8 +7,9 @@ <mm:import id="menuitem_margintop" vartype="integer">40</mm:import> <mm:import id="intro_width" vartype="integer">200</mm:import> <mm:import id="margin_left" vartype="integer">100</mm:import> +<mm:import id="menumargin" vartype="integer">20</mm:import> <mm:import id="menuitem_margin" vartype="integer">20</mm:import> -<mm:import id="menuitem_width" vartype="integer">${(width - intro_width - margin_left / 2 - menuitem_margin * 4) / 4}</mm:import> +<mm:import id="menuitem_width" vartype="integer">${(width - intro_width - menumargin * 2 - menuitem_margin * 3) / 4}</mm:import> <mm:import id="radius" vartype="integer">20</mm:import> @@ -16,7 +17,7 @@ html { background-color: #ffa500; color: #333; - font-family: Verdana; + font-family: Arial; margin: 0; padding: 0; } @@ -43,7 +44,6 @@ background-color: white; overflow-y: auto; overflow-x: hidden; - font-family: Times; top: ${menuitem_height}px; /* -moz-border-radius-bottomleft: ${radius}px; @@ -59,6 +59,7 @@ margin-top: 60px; } div#menu { + font-family: Verdana; top: 0px; height: ${menuitem_height}px; /* @@ -78,7 +79,7 @@ padding-right: 1ex; } div.content img.image-left { - margin-left: -${margin_left}px; + margin-left: -${margin_left - menumargin}px; margin-right: 10px; } div.content h2 { @@ -86,7 +87,7 @@ } div#menu ul { - margin-left: ${margin_left / 2}px; + margin-left: ${menumargin}px; display: block; padding: 0; margin-top: ${menuitem_margintop}px; @@ -106,18 +107,18 @@ } div.intro .head { - margin-left: 15px; + font-family: Verdana; margin-top: ${menuitem_margintop}px; height: ${menuitem_height - menuitem_margintop}px; - width: ${intro_width - 30}px; + width: ${intro_width - 40}px; color: white; text-align: center; } div.intro > *, div.intro span.inner > * { /* from roundedCorner */ - margin-left: 15px; - margin-right: 15px; + margin-left: 20px; + margin-right: 20px; } <mm:node number="${initParam.startnode}"> @@ -130,9 +131,7 @@ margin: 0; padding: 0; position: relative; - width: ${intro_width - 30}px; - background-position: 0 -${menuitem_height - menuitem_margintop - 30}px; - background-image: url(<mm:image template="s(${intro_width - 30})+fill(white)+colorize(50%)" />); + width: ${intro_width - 40}px; height: 30px; top: ${menuitem_height - menuitem_margintop - 30}px; color: #000; @@ -142,7 +141,7 @@ } div.intro .head { - background-image: url(<mm:image template="s(${intro_width - 30})" />); + background-image: url(<mm:image template="f(png)+s(${intro_width - 40})+fill(rgba(255,255,255,0.8))+draw(rectangle 0,${menuitem_height - menuitem_margintop - 30},${intro_width-40},${menuitem_height - menuitem_margintop})" />); } </mm:relatednodes> </mm:relatednodescontainer> @@ -153,20 +152,14 @@ <mm:relatednodescontainer type="images" role="role"> <mm:constraint field="role.role" value="teaser" /> <mm:relatednodes> - li#menu${segment} { - background-image: url(<mm:image template="s(${menuitem_width})+blur(10, 3)" />); + li#menu${segment} { + background-image: url(<mm:image template="f(png)+s(${menuitem_width})+blur(10, 3)+fill(rgba(255,255,255,0.6))+draw(rectangle 0,${menuitem_height - menuitem_margintop - 30},${menuitem_width},${menuitem_height - menuitem_margintop})" />); } - li#menu${segment} a { - background-image: url(<mm:image template="s(${menuitem_width})+fill(white)+colorize(50%)+blur(10, 3)" />); - } + li#menu${segment}.active, li#menu${segment}.hover { - background-image: url(<mm:image template="s(${menuitem_width})" />); + background-image: url(<mm:image template="f(png)+s(${menuitem_width})+fill(rgba(255,255,255,0.6))+draw(rectangle 0,${menuitem_height - menuitem_margintop - 30},${menuitem_width},${menuitem_height - menuitem_margintop})" />); } - li#menu${segment}.active a, - li#menu${segment}.hover a { - background-image: url(<mm:image template="s(${menuitem_width})+fill(white)+colorize(50%)" />); - } </mm:relatednodes> </mm:relatednodescontainer> </mm:relatednodes> @@ -174,7 +167,6 @@ </mm:node> div#menu a { - background-position: 0px -${menuitem_height - menuitem_margintop - 30}px; text-transform: uppercase; width: ${menuitem_width}px; display: block; @@ -189,7 +181,6 @@ div#menu li.active a, div#menu li a:hover { - background-color: rgba(255, 255, 255, 0.8); color: #000; } Modified: speeltuin/mihxil/simple/wget/Makefile =================================================================== --- speeltuin/mihxil/simple/wget/Makefile 2010-05-14 23:41:31 UTC (rev 42154) +++ speeltuin/mihxil/simple/wget/Makefile 2010-05-15 10:34:24 UTC (rev 42155) @@ -1,9 +1,15 @@ +.PHONY: clean upload - simple-webapp/index.html: wget -r -k -nH --adjust-extension http://localhost:8080/simple-webapp/ bash -c 'for i in `find simple-webapp -name "*.html"`; do xmllint --nsclean Xb --format $$i > $$i.new ; mv $$i.new $$i ; done' +upload: simple-webapp/index.html + (cd simple-webapp ; tar zcf es.tgz *) + scp simple-webapp/es.tgz sepio:/var/www/es/ + ssh sepio "(cd /var/www/es; tar zxf es.tgz)" + + clean: rm -rf simple-webapp \ No newline at end of file _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs