<!DOCTYPE html>
<html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>
            OmniSearch - {{query}}
        </title>
        <link rel="stylesheet" href="static/main.css">
        <link rel="search" 
        type="application/opensearchdescription+xml" 
        title="OmniSearch" href="/opensearch.xml">
    </head>
    
    <body class="results-view">
        <header>
            <h1>
                Omni<span>Search</span>
            </h1>
            <form action="/search" method="GET" class="search-form">
                <input name="q" type="text" class="search-box" autocomplete="off" placeholder="Search the web..."
                value="{{query}}">
            </form>
        </header>
        <nav class="nav-tabs">
            <div class="nav-container">
                <a href="/search?q={{query}}" class="active">
                    All
                </a>
                <a href="/images?q={{query}}">
                    Images
                </a>
            </div>
        </nav>
        <div class="content-layout">
            <aside class="sidebar-spacer">
            </aside>
            <main class="results-container">
                {{for result in results}}
                <div class="result">
                    <span class="url">
                        {{result[1]}}
                    </span>
                    <a href="{{result[0]}}">
                        {{result[2]}}
                    </a>
                    <p class="desc">
                        {{result[3]}}
                    </p>
                </div>
                {{endfor}}
            </main>
            <aside class="infobox-sidebar">
                {{for info in infoboxes}}
                <section class="infobox">
                    <div class="infobox-header">
                        <h2 class="infobox-title">
                            {{info[0]}}
                        </h2>
                    </div>
                    <div class="infobox-main">
                        <img src="{{info[1]}}" alt="{{info[0]}}" class="infobox-image">
                        <div class="infobox-content"> <p class="infobox-summary">
                                {{info[2]|safe}}
                            </p>
                            <a class="read-more" href="{{info[3]}}">
                                Read More
                            </a>
                        </div>
                    </div>
                </section>
                {{endfor}}
            </aside>
        </div>
    </body>

</html>
