mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
New Theme, Pix-art.
First commit
This commit is contained in:
parent
3ff269c84c
commit
d740e7384a
22 changed files with 1182 additions and 0 deletions
13
searx/templates/pix-art/result_templates/default.html
Normal file
13
searx/templates/pix-art/result_templates/default.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<a href="{{ result.url }}" title="{{ result.title | striptags }}">
|
||||
<canvas id="canvas-{{ pageno }}-{{ index }}" class="icon" width="16" height="16"></canvas>
|
||||
</a>
|
||||
<script type="text/javascript">
|
||||
var img{{ pageno }}_{{ index }} = new Image();
|
||||
img{{ pageno }}_{{ index }}.src = 'http://{{ result.url | extract_domain }}/favicon.ico';
|
||||
|
||||
img{{ pageno }}_{{ index }}.onload = function () {
|
||||
var can{{ pageno }}_{{ index }} = document.getElementById('canvas-{{ pageno }}-{{ index }}');
|
||||
var ctx = can{{ pageno }}_{{ index }}.getContext("2d");
|
||||
ctx.drawImage(img{{ pageno }}_{{ index }}, 0, 0, 16, 16);
|
||||
};
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue