|
| 1 | +{% load bootstrap3 %} |
| 2 | + |
| 3 | +{% bootstrap_css %} |
| 4 | + |
| 5 | +<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> |
| 6 | + |
| 7 | +{% bootstrap_javascript %} |
| 8 | + |
| 9 | +<link href='http://fonts.googleapis.com/css?family=Roboto:300' rel='stylesheet' type='text/css'> |
| 10 | + |
| 11 | +<style> |
| 12 | + |
| 13 | +.ques { |
| 14 | + font-family: 'Roboto', sans-serif; |
| 15 | + font-size: 20px; |
| 16 | +} |
| 17 | + |
| 18 | +reward { |
| 19 | + font-size: 15px; |
| 20 | + color: #FF4444; |
| 21 | +} |
| 22 | + |
| 23 | +.ans { |
| 24 | + height: 40px; |
| 25 | + width: 75px; |
| 26 | + color:#500000; |
| 27 | + text-align: center; |
| 28 | + text-align: center; |
| 29 | + vertical-align: middle; |
| 30 | +} |
| 31 | + |
| 32 | +tag { |
| 33 | + background-color:#E0E0E0; |
| 34 | + color:#500000; |
| 35 | +} |
| 36 | + |
| 37 | + |
| 38 | +#search { |
| 39 | + position: fixed; |
| 40 | + top: 0px; |
| 41 | + left: 0px; |
| 42 | + width: 100%; |
| 43 | + height: 100%; |
| 44 | + background-color: rgba(0, 0, 0, 0.7); |
| 45 | + |
| 46 | + -webkit-transition: all 0.5s ease-in-out; |
| 47 | + -moz-transition: all 0.5s ease-in-out; |
| 48 | + -o-transition: all 0.5s ease-in-out; |
| 49 | + -ms-transition: all 0.5s ease-in-out; |
| 50 | + transition: all 0.5s ease-in-out; |
| 51 | + |
| 52 | + -webkit-transform: translate(0px, -100%) scale(0, 0); |
| 53 | + -moz-transform: translate(0px, -100%) scale(0, 0); |
| 54 | + -o-transform: translate(0px, -100%) scale(0, 0); |
| 55 | + -ms-transform: translate(0px, -100%) scale(0, 0); |
| 56 | + transform: translate(0px, -100%) scale(0, 0); |
| 57 | + |
| 58 | + opacity: 0; |
| 59 | +} |
| 60 | + |
| 61 | +#search.open { |
| 62 | + -webkit-transform: translate(0px, 0px) scale(1, 1); |
| 63 | + -moz-transform: translate(0px, 0px) scale(1, 1); |
| 64 | + -o-transform: translate(0px, 0px) scale(1, 1); |
| 65 | + -ms-transform: translate(0px, 0px) scale(1, 1); |
| 66 | + transform: translate(0px, 0px) scale(1, 1); |
| 67 | + opacity: 1; |
| 68 | +} |
| 69 | + |
| 70 | +#search input[type="search"] { |
| 71 | + position: absolute; |
| 72 | + top: 50%; |
| 73 | + width: 100%; |
| 74 | + color: rgb(255, 255, 255); |
| 75 | + background: rgba(0, 0, 0, 0); |
| 76 | + font-size: 60px; |
| 77 | + font-weight: 300; |
| 78 | + text-align: center; |
| 79 | + border: 0px; |
| 80 | + margin: 0px auto; |
| 81 | + margin-top: -51px; |
| 82 | + padding-left: 30px; |
| 83 | + padding-right: 30px; |
| 84 | + outline: none; |
| 85 | +} |
| 86 | +#search .btn { |
| 87 | + position: absolute; |
| 88 | + top: 50%; |
| 89 | + left: 50%; |
| 90 | + margin-top: 61px; |
| 91 | + margin-left: -45px; |
| 92 | +} |
| 93 | +#search .close { |
| 94 | + position: fixed; |
| 95 | + top: 15px; |
| 96 | + right: 15px; |
| 97 | + color: #fff; |
| 98 | + background-color: #428bca; |
| 99 | + border-color: #357ebd; |
| 100 | + opacity: 1; |
| 101 | + padding: 10px 17px; |
| 102 | + font-size: 27px; |
| 103 | +} |
| 104 | + |
| 105 | +</style> |
| 106 | +<script> |
| 107 | +$(function () { |
| 108 | + $('a[href="#search"]').on('click', function(event) { |
| 109 | + event.preventDefault(); |
| 110 | + $('#search').addClass('open'); |
| 111 | + $('#search > form > input[type="search"]').focus(); |
| 112 | + }); |
| 113 | + |
| 114 | + $('#search, #search button.close').on('click keyup', function(event) { |
| 115 | + if (event.target == this || event.target.className == 'close' || event.keyCode == 27) { |
| 116 | + $(this).removeClass('open'); |
| 117 | + } |
| 118 | + }); |
| 119 | + |
| 120 | +}); |
| 121 | +</script> |
| 122 | + |
| 123 | +<div class="page-header"> |
| 124 | + <a class="btn btn-lg btn-warning pull-right" href="#search"><span class="glyphicon glyphicon-search" aria-hidden="true"></span> Find</a><a class="btn btn-lg btn-danger pull-right" href="/add/"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ask Question</a><h1><a href="/"><img width="50px" src="http://icons.iconarchive.com/icons/seanau/flat-app/256/Questionmark-icon.png" />Simple QA </a><small>Open Questions</small></h1> |
| 125 | +</div> |
0 commit comments