From df781fe9128802510f52441a5e7bd2fd91459f1e Mon Sep 17 00:00:00 2001 From: Martijn Vermaat <martijn@vermaat.name> Date: Mon, 8 Dec 2014 13:40:02 +0100 Subject: [PATCH] Clickable name checker box on homepage --- mutalyzer/website/templates/homepage.html | 7 +++++-- mutalyzer/website/templates/static/css/style.css | 6 ++++++ mutalyzer/website/templates/static/js/interface.js | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/mutalyzer/website/templates/homepage.html b/mutalyzer/website/templates/homepage.html index 2f1ae2ca..3039f827 100644 --- a/mutalyzer/website/templates/homepage.html +++ b/mutalyzer/website/templates/homepage.html @@ -14,9 +14,9 @@ nomenclature according to the <div class="row"> <div class="col-md-12"> - <div class="thumbnail thumb-home thumb-large"> + <div class="thumbnail clickbox thumb-home thumb-large"> <div class="caption"> - <h3>Name Checker</h3> + <h3><a href="{{ url_for('.name_checker') }}">Name Checker</a></h3> <p>The Name Checker takes the complete sequence variant description as input and checks whether it is correct.</p> <p>Example: <code class="example-input">AB026906.1:c.274G>T</code></p> @@ -127,6 +127,9 @@ This project is sponsored by <a href = "http://www.sun.com">SUN Microsystems</a> window.location=$(this).find("a").attr("href"); return false; }); + $(".clickbox input").click(function(e){ + e.stopPropagation(); + }); </script> {% endblock content %} diff --git a/mutalyzer/website/templates/static/css/style.css b/mutalyzer/website/templates/static/css/style.css index 4a0106f7..81552a68 100644 --- a/mutalyzer/website/templates/static/css/style.css +++ b/mutalyzer/website/templates/static/css/style.css @@ -225,6 +225,12 @@ header.main-header { height: 180px; } +.thumb-home:hover { + background-color: rgba(191, 191, 191, .6); + border-color: rgba(191, 191, 191, 1); +} + + .thumb-home > .caption > h3 { margin-top: auto; } diff --git a/mutalyzer/website/templates/static/js/interface.js b/mutalyzer/website/templates/static/js/interface.js index bc55ed80..44c4e8c2 100644 --- a/mutalyzer/website/templates/static/js/interface.js +++ b/mutalyzer/website/templates/static/js/interface.js @@ -61,8 +61,10 @@ function clearField(form, fieldName) { $(document).ready(function() { $('.example-input').on('click', function() { $('.example-target').val($(this).text()); + return false; }); $('.example-input-2').on('click', function() { $('.example-target-2').val($(this).text()); + return false; }); }) -- GitLab