<html><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
   
<title>Welcome To JJSR Search Engine!</title>
<link rel="stylesheet" href="{{url_for('static',filename='css/style.css')}}" />
</link>
</head><body>
<h1>Dhan Dhan Baba Deep Singh Ji</h1>
<h1>{{url_body}}</h1>
  <div id="search-container">
<form method="GET">
<input id='search-bar' type="text" name="search-query" placeholder=" Search JJSR" />
  <input id="submit" type="submit" name="is-submitted" value="Submit" />
</form>
</div>
<div id='results-container' class='results-container'>
{% for i in table %}

<div class="result-box">
<div class="url-icon">
<img class="logo" src="#" alt="logo"></img>
<p>{{i[0]}}</p>
</div>
<a class="box-heading" href="{{i[0]}}">{{i[1]}}</a>
<p class="box-description">{{i[2]}}</p>
</div>
{% endfor %}
</div>
<script>
function colorcode(n){
let a= ""+n;
let b="#";
for(let i=0;i<4;i++){
if(a.length<4){
a="0"+a;
}
}
return "#"+a;
}
//alert(colorcode(23));

function createElem(id,content,backcolor){
let elem = document.createElement("div");
elem.id=id;
elem.style.background=backcolor;
elem.style.width="100%";
elem.innerHTML=content;
document.body.appendChild(elem);
}
/*for(let i=0;i<=9999;i++){
createElem("elem-"+i,colorcode(i),colorcode(i));
}*/
</script>  
</body></html>
