Skip to content

Instantly share code, notes, and snippets.

@ModMaamari
Last active July 6, 2021 19:20
Show Gist options
  • Save ModMaamari/e55cbe26a1075e8c1f2ae286a868336e to your computer and use it in GitHub Desktop.
Save ModMaamari/e55cbe26a1075e8c1f2ae286a868336e to your computer and use it in GitHub Desktop.
Example front-end interface
<!DOCTYPE html>
<html>
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
<script src="{{ url_for('static', filename='JS/bootstrap-4-navbar.js') }}"></script>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css"
integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='CSS/main.css') }}">
<link href="{{ url_for('static', filename='CSS/bootstrap-4-navbar.css') }}" rel="stylesheet">
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='CSS/style.css') }}">
<title>Digit Recognizer</title>
</head>
<body>
<header class="site-header">
<nav class="navbar navbar-expand-md navbar-dark bg-steel fixed-top">
<div class="container">
<a class="navbar-brand mr-4" href="/">Digit Recognizer</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggle"
aria-controls="navbarToggle" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarToggle">
<div class="navbar-nav mr-auto">
</div>
</div>
</div>
</nav>
</header>
<main role="main" class="container">
</main>
<div class="row">
<div class="col-sm-6">
<body onload="pencil()">
<div class="d-flex justify-content-center">
<canvas id="paint" width="250" height="250" style="border: 5px solid #252525; border-radius: 25px;"></canvas>
</div>
<br>
<div class="d-flex justify-content-center">
<button type="button" class="btn btn-danger" onclick="reset()">Reset</button>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<div class="card-body">
<h2 id=result>Number : </h2>
{%for i in range(10)%}
<label for="p{{i}}">{{i}}</label>
<progress id="p{{i}}" value="0" max="1"></progress>
<br>
{%endfor%}
</div>
</div>
</div>
</div>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src=" {{ url_for('static', filename='JS/script.js') }}"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment