1 / 15

stuff we did and used in ilikeil

stuff we did and used in ilikeil. Client code. {% extends "main.html" %} {% block search %} < div id =" searchdiv " class =" searchdiv "> < form action ="/search" method ="get">

Download Presentation

stuff we did and used in ilikeil

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. stuff we did and used in ilikeil

  2. Client code • {% extends "main.html" %} • {% block search %} • <div id="searchdiv" class="searchdiv"> • <form action="/search" method="get"> • <input autocomplete="off" name="q" id="q" type="text" tabindex="1" value="{{query}}"/> • <script type="text/javascript" src="/static/slideshow/scripts.js"></script> • <script type="text/javascript"> • function showTopics(){ • document.getElementById('topics').style.visibility='visible'; • document.getElementById('random-topics').style.display='none'; • } • $(document).ready(function() { • $("#q").autocomplete( • [ {%for keyw in allkeywords%} • "{{keyw}}", • {%endfor%}''], • { • delay:1, • minChars:1, • matchSubset:1, • autoFill:true, • maxItemsToShow:10, • multiple:true, • multipleSeparator: " " • } • ); • });

  3. Client code • </script> • <input type="submit" value="Search" /> • </form> • <span class="hottopics"> • <span id="random-topics" class="keywords"> • Hot topics: • {%for keyw in hotkeywords|slice:"3"%} • <a href="?q={{keyw}}">{{keyw}}</a> • {%endfor%} • <a href="/" onclick="showTopics();">more...</a> • <br> • </span> • <!-- • <span id="topics" style="visibility:hidden" class="keywords"> • {%for keyw in hotkeywords|slice:"20"%} • <a href="?q={{keyw}}">{{keyw}}</a> • {%endfor%} • </span>--> • </span> • </div> • {% endblock %}

More Related