Initial commit of Twilio Server Starter for Python
This commit is contained in:
35
static/notify/index.html
Normal file
35
static/notify/index.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Hello App! - Notify Quickstart</title>
|
||||
<link rel="shortcut icon" href="//www.twilio.com/marketing/bundles/marketing/img/favicons/favicon.ico">
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="notify.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a href="https://www.twilio.com/docs/api/notifications"
|
||||
target="_blank">
|
||||
Read the Twilio Notify guide
|
||||
<i class="fa fa-fw fa-external-link"></i>
|
||||
</a>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
<h1>Send Notification</h1>
|
||||
<input type="text" id="identityInput" size="30"/>
|
||||
<p/>
|
||||
<input type="submit" id="sendNotificationButton" value="Send Notification"/>
|
||||
|
||||
<div id="message">
|
||||
Welcome to Notify!
|
||||
</div>
|
||||
|
||||
<p>After you set up a notification binding, go ahead and send a notification to that identity!</p>
|
||||
</section>
|
||||
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script src="notify.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
40
static/notify/notify.css
Normal file
40
static/notify/notify.css
Normal file
@@ -0,0 +1,40 @@
|
||||
* {
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
html, body {
|
||||
padding:0;
|
||||
margin:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
color:#dedede;
|
||||
background-color: #849091;
|
||||
font-family: 'Helvetica Neue', Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
header {
|
||||
width:100%;
|
||||
position:absolute;
|
||||
text-align:center;
|
||||
bottom:20px;
|
||||
}
|
||||
|
||||
header a, header a:visited {
|
||||
font-size:18px;
|
||||
color:#dedede;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
header a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
section {
|
||||
background-color:#2B2B2A;
|
||||
text-align:center;
|
||||
padding:16px;
|
||||
}
|
||||
|
||||
#message {
|
||||
padding:6px;
|
||||
}
|
||||
12
static/notify/notify.js
Normal file
12
static/notify/notify.js
Normal file
@@ -0,0 +1,12 @@
|
||||
$(function() {
|
||||
|
||||
$('#sendNotificationButton').on('click', function() {
|
||||
$.post('/send-notification', {
|
||||
identity: $('#identityInput').val()
|
||||
}, function(response) {
|
||||
$('#identityInput').val('');
|
||||
$('#message').html(response.message);
|
||||
console.log(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user