Skip to content

Commit

Permalink
Make it easier to create a script
Browse files Browse the repository at this point in the history
  • Loading branch information
gkoberger committed Sep 27, 2020
1 parent b18f095 commit bc3b949
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions public/javascripts/script.js
Expand Up @@ -9,6 +9,10 @@ $.page('index', function () {
$('body').addClass('is-tele');
}

$('#paper').keyup(function() {
$('#update').attr('disabled', !$(this).val().match(/paper/));
}).trigger('keyup');

$('.switch').click(function () {
state.setItem('tele', !$('body').hasClass('is-tele'));

Expand Down
2 changes: 1 addition & 1 deletion public/stylesheets/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions public/stylesheets/style.styl
Expand Up @@ -41,6 +41,10 @@ nav
background #eee
&:hover
background darken(@background, 10%)
&[disabled]
background #999
&:hover
background #999
.ipad
display none

Expand Down
9 changes: 6 additions & 3 deletions views/index.pug
Expand Up @@ -4,13 +4,16 @@ block content
nav
a.switch.btn(href="#") #[i.fas.fa-random] Teleprompter View #[span s]
form(method="POST" action="/" style="float:right;")
input(type="text" name="url" value=tele.url placeholder="Enter a Dropbox Paper URL")
input#paper(type="text" name="url" value=tele.url placeholder="Enter a Dropbox Paper URL")
|  
|  
button.btn(type="submit") Update
button#update.btn(type="submit") Update
|  
|  
a.btn.lite(href=tele.url target="_blank") Edit
if tele.url
a.btn.lite(href=tele.url target="_blank") Edit
else
a.btn.lite(href="https://paper.new" target="_blank") Create a Script
a.ipad.switch(href="#")
i.fas.fa-random

Expand Down

0 comments on commit bc3b949

Please sign in to comment.