Now a simple re-frame app
This commit is contained in:
@@ -1,37 +1,331 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dropzone@5.2.0/dist/dropzone.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.1/css/bulma.css" />
|
||||
<style>.dz-error-mark { display:none} .dz-details {display:none}
|
||||
form { border: 3px solid lightgray; padding: 25px; width: 100%;}
|
||||
.dz-success-mark {display:none} </style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" class="container">
|
||||
<h1>Invoice Parsing Demo</h1>
|
||||
<form action="/pdf-upload" id="my-dropzone">
|
||||
<h3>Drop invoice pdfs here</h3>
|
||||
<input type="file" name="file" style="display:none"/>
|
||||
</form>
|
||||
<h2 style="display:none">Found invoices:</h2>
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Auto AP</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet">
|
||||
<script src="https://cdn.auth0.com/js/lock/10.24/lock.min.js"></script>
|
||||
<!-- Bulma Version 0.6.0 -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.0/css/bulma.min.css" integrity="sha256-HEtF7HLJZSC3Le1HcsWbz1hDYFPZCqDhZa9QsCgVUdw=" crossorigin="anonymous" />
|
||||
|
||||
<style>
|
||||
.dz-error-mark { display:none} .dz-details {display:none}
|
||||
.dz-success-mark {display:none}
|
||||
.dz-image {display:none}
|
||||
form { width: 100% }
|
||||
|
||||
html,body {
|
||||
font-family: 'Open Sans', serif;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
.left-nav {
|
||||
width: 300px;
|
||||
}
|
||||
.nav.is-dark {
|
||||
background-color: #232B2D;
|
||||
color: #F6F7F7;
|
||||
}
|
||||
.nav.is-dark .nav-item a, .nav.is-dark a.nav-item {
|
||||
color: #F6F7F7;
|
||||
}
|
||||
.nav.is-dark .nav-item a.button.is-default {
|
||||
color: #F6F7F7;
|
||||
background-color: transparent;
|
||||
border-width: 2px;
|
||||
}
|
||||
.nav.menu {
|
||||
border-bottom: 1px solid #e1e1e1;
|
||||
}
|
||||
.nav.menu .nav-item .icon-btn {
|
||||
border: 3px solid #B7C6C9;
|
||||
border-radius: 90px;
|
||||
padding: 5px 7px;
|
||||
color: #B7C6C9;
|
||||
}
|
||||
.nav.menu .nav-item.is-active .icon-btn {
|
||||
color: #2EB398;
|
||||
border: 3px solid #2EB398;
|
||||
}
|
||||
.nav.menu .nav-item .icon-btn .fa {
|
||||
font-size: 20px;
|
||||
color: #B7C6C9;
|
||||
}
|
||||
.nav.menu .nav-item.is-active .icon-btn .fa {
|
||||
color: #2EB398;
|
||||
}
|
||||
.aside {
|
||||
display:block;
|
||||
background-color: #F9F9F9;
|
||||
border-right: 1px solid #DEDEDE;
|
||||
}
|
||||
.messages {
|
||||
display:block;
|
||||
background-color: #fff;
|
||||
border-right: 1px solid #DEDEDE;
|
||||
}
|
||||
.message {
|
||||
display:block;
|
||||
background-color: #fff;
|
||||
}
|
||||
.aside .compose {
|
||||
height: 95px;
|
||||
margin:0 -10px;
|
||||
padding: 25px 30px;
|
||||
}
|
||||
.aside .compose .button {
|
||||
color: #F6F7F7;
|
||||
}
|
||||
.aside .compose .button .compose {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.aside .main {
|
||||
padding: 40px;
|
||||
color: #6F7B7E;
|
||||
}
|
||||
.aside .title {
|
||||
color: #6F7B7E;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.aside .main .item {
|
||||
display: block;
|
||||
padding: 10px 0;
|
||||
color: #6F7B7E;
|
||||
}
|
||||
.aside .main .item.active {
|
||||
background-color: #F1F1F1;
|
||||
margin: 0 -50px;
|
||||
padding-left: 50px;
|
||||
}
|
||||
.aside .main .item:active,.aside .main .item:hover {
|
||||
background-color: #F2F2F2;
|
||||
margin: 0 -50px;
|
||||
padding-left: 50px;
|
||||
}
|
||||
.aside .main .icon {
|
||||
font-size: 19px;
|
||||
padding-right: 30px;
|
||||
color: #A0A0A0;
|
||||
}
|
||||
.aside .main .name {
|
||||
font-size: 15px;
|
||||
color: #5D5D5D;
|
||||
font-weight: 500;
|
||||
}
|
||||
.messages {
|
||||
padding: 40px 20px;
|
||||
}
|
||||
.message {
|
||||
padding: 40px 20px;
|
||||
}
|
||||
.messages .action-buttons {
|
||||
padding: 0;
|
||||
margin-top: -20px;
|
||||
}
|
||||
.message .action-buttons {
|
||||
padding: 0;
|
||||
margin-top: -5px;
|
||||
}
|
||||
.action-buttons .control.is-grouped {
|
||||
display: inline-block;
|
||||
margin-right: 30px;
|
||||
}
|
||||
.action-buttons .control.is-grouped:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.action-buttons .control.is-grouped .button:first-child {
|
||||
border-radius: 5px 0 0 5px;
|
||||
}
|
||||
.action-buttons .control.is-grouped .button:last-child {
|
||||
border-radius: 0 5px 5px 0;
|
||||
}
|
||||
.action-buttons .control.is-grouped .button {
|
||||
margin-right: -5px;
|
||||
border-radius: 0;
|
||||
}
|
||||
.pg {
|
||||
display: inline-block;
|
||||
top:10px;
|
||||
}
|
||||
.action-buttons .pg .title {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
margin-bottom: 3px;
|
||||
font-size:12px;
|
||||
color: #AAAAA;
|
||||
}
|
||||
.action-buttons .pg a{
|
||||
font-size:12px;
|
||||
color: #AAAAAA;
|
||||
text-decoration: none;
|
||||
}
|
||||
.is-grouped .button {
|
||||
background-image: linear-gradient(#F8F8F8, #F1F1F1);
|
||||
}
|
||||
.is-grouped .button .fa {
|
||||
font-size: 15px;
|
||||
color: #AAAAAA;
|
||||
}
|
||||
.inbox-messages .card {
|
||||
width: 100%;
|
||||
}
|
||||
.inbox-messages strong {
|
||||
color: #5D5D5D;
|
||||
}
|
||||
.inbox-messages .msg-check {
|
||||
padding: 0 20px;
|
||||
}
|
||||
.inbox-messages .msg-subject {
|
||||
padding: 10px 0;
|
||||
color: #5D5D5D;
|
||||
}
|
||||
.inbox-messages .msg-attachment {
|
||||
float:right;
|
||||
}
|
||||
.inbox-messages .msg-snippet {
|
||||
padding: 5px 20px 0px 5px;
|
||||
}
|
||||
.inbox-messages .msg-subject .fa {
|
||||
font-size: 14px;
|
||||
padding:3px 0;
|
||||
}
|
||||
.inbox-messages .msg-timestamp {
|
||||
float: right;
|
||||
padding: 0 20px;
|
||||
color: #5D5D5D;
|
||||
}
|
||||
.message-preview .avatar {
|
||||
display: inline-block;
|
||||
}
|
||||
.message-preview .top .address {
|
||||
display: inline-block;
|
||||
padding: 0 20px;
|
||||
}
|
||||
.avatar img {
|
||||
width: 40px;
|
||||
border-radius: 50px;
|
||||
border: 2px solid #999;
|
||||
padding: 2px;
|
||||
}
|
||||
.address .name {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.address .email {
|
||||
font-weight: bold;
|
||||
color: #B6C7D1;
|
||||
}
|
||||
.card.active {
|
||||
background-color:#F5F5F5;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<nav class="navbar has-shadow">
|
||||
<div class="container">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item" href="../">
|
||||
<h1>Auto-ap</h1>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="has-text-centered hero is-fullheight is-vertically-centered" id="mail-app">
|
||||
<div class="is-vertically-centered">
|
||||
<h1 class="title"><i class="fa fa-spin fa-spinner"></i></h1>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
<strong>Auto-AP</strong>
|
||||
by <a href="https://github.com/">Integreat</a>.
|
||||
</p>
|
||||
<p>
|
||||
<a class="icon" href="https://github.com/dansup/bulma-templates">
|
||||
<i class="fa fa-github"></i>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.3/vue.min.js" integrity="sha256-5CEXP4Sh+bwJYBngjYYh2TEev9kTDwcjw60jZatTHtY=" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Faker/3.1.0/faker.min.js" integrity="sha256-QHdJObhDO++VITP6S4tMlDHRWMaUOk+s/xWIRgF/YY0=" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js" integrity="sha256-4PIvl58L9q7iwjT654TQJM+C/acEyoG738iL8B8nhXg=" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="http://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dropzone@5.2.0/dist/dropzone.min.js"></script>
|
||||
|
||||
<script>
|
||||
var myDropzone = new Dropzone("#my-dropzone");
|
||||
myDropzone.on("success", function(file, a) {
|
||||
$("h2").show();
|
||||
JSON.parse(a).map(function(x) {
|
||||
/*
|
||||
$(function() {
|
||||
var lock = new Auth0Lock(
|
||||
"twbXfoLvL0tKTR6GWORoM-ss51wM1zXZ",
|
||||
"app82488100.auth0.com",
|
||||
{
|
||||
rememberLastLogin: false,
|
||||
socialButtonStyle: "big",
|
||||
oidcConformant: true,
|
||||
auth: {
|
||||
audience: "https://app82488100.auth0.com/api/v2/",
|
||||
params: {scope: 'openid email profile'},
|
||||
responseType: "token",
|
||||
redirect: true,
|
||||
redirectUrl: "http://localhost:3000",
|
||||
},
|
||||
languageDictionary: {"title":"Auto AP"},
|
||||
language: "en",
|
||||
theme: {"primaryColor":"#3A99D8"}
|
||||
} );
|
||||
|
||||
$("ul").append($("<li>").text(x));
|
||||
$(".login").click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
lock.show();
|
||||
});
|
||||
|
||||
lock.on("authenticated", function(result, other) {
|
||||
console.log(result.accessToken, other);
|
||||
lock.getUserInfo(result.accessToken, function(err, profile) {
|
||||
|
||||
$(".login").text(profile.nickname);
|
||||
console.log(profile);
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
var myDropzone = new Dropzone("#my-dropzone");
|
||||
myDropzone.on("success", function(file, a) {
|
||||
$("h2").show();
|
||||
$(".found-invoices").show();
|
||||
JSON.parse(a).map(function(x) {
|
||||
console.log(x);
|
||||
var tr = $("<tr>");
|
||||
tr.append($("<td>").text(x['customer-identifier']));
|
||||
tr.append($("<td>").text(x['invoice-number']));
|
||||
tr.append($("<td>").text(x['date']));
|
||||
tr.append($("<td>").text(x['total']));
|
||||
$("tbody").append(tr);
|
||||
});
|
||||
});
|
||||
});
|
||||
*/
|
||||
</script>
|
||||
</body>
|
||||
</div>
|
||||
<script src="js/compiled/app.js"></script>
|
||||
<script>auto_ap.core.init();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user