Team:NTNU Trondheim/Test
From 2012.igem.org
Line 140: | Line 140: | ||
<div class="comments-add-form"> | <div class="comments-add-form"> | ||
- | <h6 | + | <h6>Comments:</h6> |
+ | <!--<a href="#" onclick="$(this).parent().hide(); $('#comments_toggle').show(); return false;">Show comments</a>--> | ||
+ | </div> | ||
+ | <div id="comments_toggle"> | ||
+ | <script language="javascript" type="text/javascript"> | ||
+ | function comment_validate_post(){ | ||
+ | var error=false, required=''; | ||
+ | |||
+ | if(document.getElementById('comments-add-name') && document.getElementById('comments-add-name').value==''){ | ||
+ | error=true; | ||
+ | required += " 'Your Name' "; | ||
+ | } | ||
+ | |||
+ | |||
+ | if(document.getElementById('comments-add-email') && document.getElementById('comments-add-email').value==''){ | ||
+ | error=true; | ||
+ | required += " 'Your Email' "; | ||
+ | } | ||
+ | |||
+ | |||
+ | if(document.getElementById('comments-add-text') && document.getElementById('comments-add-text').value==''){ | ||
+ | error=true; | ||
+ | required += " 'Your Comment' "; | ||
+ | } | ||
+ | |||
+ | |||
+ | if(document.getElementById('comments-add-captcha_auth') && document.getElementById('comments-add-captcha_auth').value==''){ | ||
+ | error=true; | ||
+ | required += " 'Maths question' "; | ||
+ | } | ||
+ | |||
+ | if(error){ | ||
+ | alert('Please complete required fields: '+required); | ||
+ | return false; | ||
+ | }else{ | ||
+ | return true; | ||
+ | } | ||
+ | } | ||
+ | function comment_reply(comment_id,author,date){ | ||
+ | if(typeof(document.getElementById('parent_comment_id'))!="undefined"){ | ||
+ | document.getElementById('parent_comment_id').value=comment_id; | ||
+ | } | ||
+ | if(typeof(document.getElementById('comments-reply-info'))!="undefined"){ | ||
+ | document.getElementById('comments-reply-info').innerHTML = "Reply to <strong>"+author+"'s</strong> comment on "+date; | ||
+ | } | ||
+ | if(typeof(document.getElementById('comments-reply-cancel'))!="undefined"){ | ||
+ | document.getElementById('comments-reply-cancel').style.display = "block"; | ||
+ | } | ||
+ | } | ||
+ | function cancel_comment_reply(){ | ||
+ | if(typeof(document.getElementById('parent_comment_id'))!="undefined"){ | ||
+ | document.getElementById('parent_comment_id').value=''; | ||
+ | } | ||
+ | if(typeof(document.getElementById('comments-reply-info'))!="undefined"){ | ||
+ | document.getElementById('comments-reply-info').innerHTML = ""; | ||
+ | } | ||
+ | if(typeof(document.getElementById('comments-reply-cancel'))!="undefined"){ | ||
+ | document.getElementById('comments-reply-cancel').style.display = "none"; | ||
+ | } | ||
+ | } | ||
+ | </script> | ||
+ | <style type="text/css"> | ||
+ | |||
+ | .comments-outer{ | ||
+ | |||
+ | } | ||
+ | .comments-comment-wrap{ | ||
+ | margin:10px 0px; | ||
+ | } | ||
+ | .comments-header{ | ||
+ | |||
+ | } | ||
+ | .comments-header h6, | ||
+ | .comments-add-form h6{ | ||
+ | font-size:20px; | ||
+ | clear:both; | ||
+ | } | ||
+ | .comments-list{ | ||
+ | list-style:none; | ||
+ | margin:10px; | ||
+ | padding:0; | ||
+ | } | ||
+ | .comments-list li{ | ||
+ | list-style:none; | ||
+ | margin:0; | ||
+ | padding:9px 0 0 0; | ||
+ | clear:both; | ||
+ | border-top:1px solid #EFEFEF; | ||
+ | border-bottom:1px solid #EFEFEF; | ||
+ | } | ||
+ | .comments-list li.comments-last{ | ||
+ | border-bottom:0; | ||
+ | } | ||
+ | .comments-list li .comments-list{ | ||
+ | margin-left:20px !important; | ||
+ | } | ||
+ | .comments-author{ | ||
+ | float:left; | ||
+ | width:140px; | ||
+ | margin-right:30px; | ||
+ | clear:left; | ||
+ | text-align:right; | ||
+ | } | ||
+ | .comments-author p{ | ||
+ | margin:5px 0; | ||
+ | padding:0 !important; | ||
+ | line-height:normal !important; | ||
+ | } | ||
+ | .comments-author-icon{ | ||
+ | |||
+ | } | ||
+ | .comments-author-name{ | ||
+ | font-size:18px; | ||
+ | } | ||
+ | .comments-author-date{ | ||
+ | font-size:11px; | ||
+ | color:#CBCBCB; | ||
+ | } | ||
+ | .comments-approval{ | ||
+ | font-size:11px; | ||
+ | color:#FF0000; | ||
+ | font-style:italic; | ||
+ | } | ||
+ | .comments-admin{ | ||
+ | border:1px dashed #CCC; | ||
+ | } | ||
+ | .comments-clear{ | ||
+ | clear:both; | ||
+ | height:0; | ||
+ | visibility:hidden; | ||
+ | border:0; | ||
+ | padding:0; | ||
+ | margin:0; | ||
+ | } | ||
+ | .comments-text{ | ||
+ | float:left; | ||
+ | width:400px; | ||
+ | color:#5d5949; | ||
+ | padding:20px; | ||
+ | background-color:#fafafa; | ||
+ | border:1px solid #dadada; | ||
+ | font-size:13px; | ||
+ | line-height:15px; | ||
+ | padding-bottom:5px; | ||
+ | min-height:150px; | ||
+ | height:auto !important; | ||
+ | height:150px | ||
+ | } | ||
+ | .comments-list li.comments-even .comments-text{ | ||
+ | background-color:#EAEAEA; | ||
+ | margin-bottom:-2px; | ||
+ | position:relative; | ||
+ | top:-1px; | ||
+ | } | ||
+ | .comments-list li.comments-odd .comments-text{ | ||
+ | |||
+ | } | ||
+ | .comments-text p{ | ||
+ | |||
+ | } | ||
+ | .comments-btn{ | ||
+ | display:block; | ||
+ | margin:2px; | ||
+ | padding:3px; | ||
+ | background-color:#ff9437; | ||
+ | color:#FFFFFF; | ||
+ | font-size:11px; | ||
+ | width:70px; | ||
+ | float:left; | ||
+ | text-decoration:none; | ||
+ | } | ||
+ | .comments-btn:hover{ | ||
+ | text-decoration:underline; | ||
+ | } | ||
+ | .comments-add-form{ | ||
+ | margin:0; | ||
+ | clear:both; | ||
+ | } | ||
+ | .comments-add-form-wrap{ | ||
+ | margin:10px 0; | ||
+ | clear:both; | ||
+ | } | ||
+ | .comments-add-form label{ | ||
+ | clear:left; | ||
+ | display:block; | ||
+ | font-weight:normal; | ||
+ | } | ||
+ | .comments-add-form h6{ | ||
+ | |||
+ | } | ||
+ | .comments-input{ | ||
+ | border:1px solid #CCCCCC; | ||
+ | padding:5px; | ||
+ | font-family:arial; | ||
+ | font-size:14px; | ||
+ | } | ||
+ | .comments-add-err{ | ||
+ | border:2px solid #FF0000 !important; | ||
+ | } | ||
+ | .comments-add-form input.comments-input{ | ||
+ | width:200px; | ||
+ | } | ||
+ | .comments-add-form textarea.comments-input{ | ||
+ | width:300px; | ||
+ | height:100px; | ||
+ | } | ||
+ | |||
+ | </style> | ||
+ | <div class="comments-outer"> | ||
+ | <div class="comments-comment-wrap"> | ||
+ | <a name="comments"></a> | ||
+ | <div class="comments-header"> | ||
+ | <h6>Comments</h6> </div> | ||
+ | |||
+ | |||
+ | <ol class="comments-list"> | ||
+ | |||
+ | <li class="comments-odd comments-last" id="comments-0"> | ||
+ | <div class="comments-author"> | ||
+ | <a name="comment-0"></a> | ||
+ | <a title="Get your avatar from Gravatar!" class="comments-author-icon" href="http://www.gravatar.com/" target="_blank"> | ||
+ | <img src="http://www.gravatar.com/avatar.php? | ||
+ | gravatar_id=994eee8938dbad7eb0f30e132236048e&default=wavatar&size=60" alt="Gravatar" border="0"> | ||
+ | </a> | ||
+ | <p class="comments-author-name"> | ||
+ | |||
+ | <a href="http://www.sitefloat.com" target="_blank"> | ||
+ | |||
+ | mike | ||
+ | </a> | ||
+ | </p> | ||
+ | <p class="comments-author-date"> | ||
+ | <a href="http://dtbaker.com.au/random-bits/stick-the-menu-to-the-top-of-the-page-on-scroll-down.html#comment-0">March 17th, 2011</a> | ||
+ | </p> | ||
+ | <p class="comments-author-reply"> | ||
+ | <a href="#post-comment" onClick="comment_reply(0,'mike','March 17th, 2011'); ">Reply</a> | ||
+ | </p> | ||
+ | </div> | ||
+ | <div class="comments-text"> | ||
+ | |||
+ | |||
+ | <p> | ||
+ | awesome :) well done on the site guys!<br /> </p> | ||
+ | </div> | ||
+ | <hr class="comments-clear"> | ||
+ | </li> | ||
+ | </ol> | ||
+ | |||
+ | |||
+ | <hr class="comments-clear"> | ||
+ | <div class="comments-line"></div> | ||
+ | </div> | ||
+ | <div class="comments-add-form-wrap"> | ||
+ | <a name="post-comment"></a> | ||
+ | <form action="/widget-comments.php?post=gogo" method="post" class="comments-add-form" onSubmit="if(typeof(comment_validate_post)=='function')return comment_validate_post(); else return true;"> | ||
+ | |||
+ | <h6>Leave a Comment</h6> <div id="comments-reply-info"></div> | ||
+ | <div id="comments-reply-cancel" style="display:none;"><a href="#" onclick="cancel_comment_reply(); return false;">Cancel making reply</a></div> | ||
+ | |||
+ | <p> | ||
+ | <input type="hidden" name="captcha_auth" value="8f14e45fceea167a5a36dedd4bea2543"> | ||
+ | <label for="comments-add-name"> | ||
+ | Your Name </label> | ||
+ | <input type="text" name="comment_name" class="comments-input comments-add-name" id="comments-add-name" value=""> | ||
+ | |||
+ | <label for="comments-add-email"> | ||
+ | Your Email <small><em>(never published)</em></small> | ||
+ | </label> | ||
+ | <input type="text" name="comment_email" class="comments-input comments-add-email" id="comments-add-email" value=""> | ||
+ | |||
+ | <label for="comments-add-website"> | ||
+ | Your Website </label> | ||
+ | <input type="text" name="comment_website" class="comments-input comments-add-website" id="comments-add-website" value=""> | ||
+ | |||
+ | <label for="comments-add-text"> | ||
+ | Your Comment </label> | ||
+ | <textarea name="comment_text" class="comments-input comments-add-text" id="comments-add-text"></textarea> | ||
+ | |||
+ | <label for="comments-add-captcha_auth"> | ||
+ | SPAM Prevention Question: What is 1 + 6? </label> | ||
+ | <input type="text" name="comment_captcha_auth" class="comments-input comments-add-captcha_auth" id="comments-add-captcha_auth" value=""> | ||
+ | |||
+ | <label for="comments-add-comment_subscribe"> | ||
+ | Subscribe to updates? </label> | ||
+ | <input type="checkbox" name="comment_comment_subscribe" class="comments-add-comment_subscribe" id="comments-add-comment_subscribe" value="1" > <small>Yes, send me an email when a new comment is posted.</small> | ||
+ | </p> | ||
+ | <p> | ||
+ | <input type="submit" name="submit" value="Post Comment" border="0"> | ||
+ | </p> | ||
+ | <p> | ||
+ | <em>The avatars shown next to comments are Gravatars. | ||
+ | <a href="http://www.gravatar.com/" target="_blank">Click here to get a Gravatar account for free</a> | ||
+ | and any other site that supports it will show your avatar too!</em> | ||
+ | </p> | ||
+ | <input type="hidden" name="comment_block_uri" value="/random-bits/stick-the-menu-to-the-top-of-the-page-on-scroll-down.html"> | ||
+ | <input type="hidden" name="parent_comment_id" id="parent_comment_id" value=""> | ||
+ | |||
+ | </form> | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | </div> | ||
<div id="content_sidebar"> | <div id="content_sidebar"> | ||
<div class="column"> | <div class="column"> |
Revision as of 13:25, 9 August 2012
Comments: