Basic web-gui
This commit is contained in:
16
templates/base.html
Normal file
16
templates/base.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=deivce-width,initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content = "ie=edge">
|
||||
<title> Scruffy Search Engine </title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}
|
||||
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
25
templates/index.html
Normal file
25
templates/index.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h1 align="center">Scruffy Search Engine<h1>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script>
|
||||
<div class="d-flex justify-content-center">
|
||||
<form method="post" action="/">
|
||||
|
||||
<button align="center" type="submit" value ="start" name="start-index" class="btn btn-outline-primary">Run Indexer</button>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<img src="https://theinfosphere.org/images/9/96/Scruffy_promo.jpg" class="img-fluid">
|
||||
|
||||
</div>
|
||||
<div class="d-flex justify-content-center input-group mb-3">
|
||||
<form method='POST' action=" {{ url_for('index') }} " enctype="multipart/form-data">
|
||||
<input type="text" class="form-control" placeholder="Search Query" aria-label="Search Query" aria-describedby="basic-addon1" name='search_query'>
|
||||
<button type="submit" name="start-index" class="btn btn-primary">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% for result in results %}
|
||||
<p>{{result[0]}} at <a href="{{result[1]}}">{{result[1]}}</a></p>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user