-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
216 lines (155 loc) · 5.71 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Business Idea Collector</title>
<link rel="stylesheet" href="css/ideacollector.css"/>
</head>
<body>
<div id="narrative">
<section id="narrative-main">
<p>
</p>
</section>
</div>
<div id="ideacollectorapp">
<header>
<h1 id="projecttype">Business Idea Collector</h1>
<p>
Tech people often waste a lot of mental energy <em>thinking</em> about business ideas,
instead of <em>working</em> on them.
If you don't execute on idea it will stick around in your head like
<em><a href="http://youtu.be/0sHCQWjTrJ8?t=7s">brain crack</a></em>, as Ze Frank says.
</p>
<p>
Here is what I propose.
The script below will ask you some hard questions,
so that you can get that idea down quickly.
Don't have to worry about me stealing your ideas: everything is saved to <code>localStorage</code>.
</p>
</header>
<section id="main">
<!--
<h2>Project name</h2>
-->
<!-- current quesiton prompt -->
<div id="current-question">
<div class="prompt">
<span class="QAstyle">Q:</span> How will you make money?
</div>
<div class="response new">
<span class="QAstyle">A:</span>
<input id="new-response" type="text" placeholder="Enter your answer here... (you have 40 secs)" x-webkit-speech />
</div>
</div>
<!-- answered questions list will go here later -->
<ul id="questions-list"></ul>
</section>
<footer>
<a id="save-as" class="save-as">Export as markdown</a>
<a id="save-as-tex" class="save-as">Export as .tex</a>
<a id="clear-completed">Clear all</a>
</footer>
</div>
<!--
<div id="instructions">
Just answer the questions.
</div>
-->
<div id="credits">
<a href="https://github.com/ivanistheone/ideacollector">source</a>
</div>
<!-- Templates -->
<script type="text/template" id="question-template">
<div class="prompt">
<span class="QAstyle">Q:</span> <%- prompt %>
</div>
<div class="response view">
<span class="QAstyle">A:</span> <%- response %>
</div>
<div class="response edit">
<span class="QAstyle">A:</span>
<input type="text" value="<%- response %>" />
</div>
</script>
<script type="text/template" id="current-question-template">
<div class="prompt">
<span class="QAstyle">Q:</span> <%- prompt %>
</div>
<div class="response new">
<span class="QAstyle">A:</span>
<input id="new-response" type="text" placeholder="Enter your answer here... (you have 40 secs)" x-webkit-speech />
<span id="timer"></span>
</div>
</script>
<!-- Let's get things started and import the libs -->
<script src="js/vendor/jquery.js"></script>
<script src="js/vendor/underscore.js"></script>
<script src="js/vendor/backbone.js"></script>
<script src="js/vendor/backbone.localStorage.js"></script>
<script src="js/vendor/FileSaver.js"></script>
<script type="text/javascript">
// App namespace
App = { // really window.App
initialize: function(){
console.log("Application starting...");
var i,
prompt,
currqview,
questions_data;
console.log( window.location.hash );
// project type
questions_data = App.questions_data["business"];
if (window.location.hash === "#community") {
questions_data = App.questions_data["community"];
$("#projecttype").html("Community Project Idea Collector");
}
if (window.location.hash === "#bblock") {
questions_data = App.questions_data["bblock"];
$("#projecttype").html("Building Block Idea Collector");
}
if (window.location.hash === "#paper") {
questions_data = App.questions_data["paper"];
$("#projecttype").html("Research Paper Idea Collector");
}
//setup the current question view
App.currqview = currqview = new App.CurrentQuestionView({ prompt: "What is your business idea?",
list_of_questions: questions_data
});
App.currqview.nextQuestion();
currqview.render();
// setup the question list
App.questions = new App.QuestionsList();
App.questionsview = new App.QuestionsView();
},
initalized:"true"
};
// We will "fire" backbone events to coordinate between the views
_.extend(App, Backbone.Events);
// ex
// App.on("Qanswered", function(msg) {
// console.log("Triggered " + msg);
// });
// App.trigger("Qanswered", "an event");
</script>
<script src="js/ideacollector.js"></script>
<script src="js/questions.js"></script>
<script type="text/javascript">
// Load the application once the DOM is ready, using `jQuery.ready`:
$(function(){
App.initialize();
});
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-40271728-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>