Skip to content

Commit bf31e64

Browse files
committed
making it work and getting actual slide notes
1 parent 769075b commit bf31e64

File tree

4 files changed

+41
-12
lines changed

4 files changed

+41
-12
lines changed

public/app.css

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
html{
2+
with:90%;
3+
font-family: Arial;
4+
font-size: 5em;
5+
}
6+
7+
ul.options{
8+
display: inline;
9+
}
10+
11+
ul.options li{
12+
color: white;
13+
display: block;
14+
padding: 15px 0 15px 0;
15+
margin: 0 auto;
16+
text-align: center;
17+
}
18+
19+
ul.options li.notes{
20+
background: green;
21+
}
22+
23+
ul.options li.direction{
24+
background: blue;
25+
}
26+
27+
div#notes_content{
28+
width: 90%;
29+
margin: 0 auto;
30+
word-wrap: break-word;
31+
}

remotr.rb

+3-5
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@
1515
end
1616

1717
get '/notes/current' do
18-
p "requesting notes"
19-
notes = %x[
18+
notes = %x{
2019
osascript -e 'tell application "Keynote"
2120
tell front slideshow
2221
get notes of current slide
2322
end tell
2423
end tell'
25-
]
26-
p $?.inspect
27-
notes = "Não foi possível carregar as notas desse slide." if $?.exitstatus != 0
24+
}
25+
notes || "Não foi possível carregar as notas desse slide."
2826
end

views/index.erb

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<html>
22
<head>
3+
<link rel="stylesheet" type="text/css" href="app.css">
34
</head>
45
<body>
5-
<h3>Remotr</h3>
6+
<!-- <h3>Remotr</h3> -->
7+
<ul class="options">
8+
<li class="direction" id="previous">Previous</li>
9+
<li class="notes" id="notes">Notes</li>
10+
<li class="direction" id="next">Next</li>
11+
</ul>
612
<div id="notes_content"></div>
7-
<p>
8-
<a id="previous" href="#" title="previous"> << </a>
9-
<a id="notes" href="#">notes</a>
10-
<a id="next" href="#"> >> </a>
11-
</p>
1213
</body>
1314

1415
<script type="text/javascript" src="chibi-min.js"></script>

views/layout.erb

-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77

88
<body>
99
<%= yield %>
10-
1110
</body>
1211
</html>

0 commit comments

Comments
 (0)