-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
209 lines (190 loc) · 7.53 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
<!DOCTYPE html>
<html>
<head>
<script src="sockethub-client.min.js" type="text/javascript"></script>
<script src="remotestorage.js" type="text/javascript"></script>
<script src="profile-module.js" type="text/javascript"></script>
<script src="microblog-module.js" type="text/javascript"></script>
<script src="credentials-module.js" type="text/javascript"></script>
<script src="helpers.js" type="text/javascript"></script>
<script src="main.js" type="text/javascript"></script>
<script src="post.js" type="text/javascript"></script>
<!--<script src="rss.js" type="text/javascript"></script> -->
<script src="remote.js" type="text/javascript"></script>
<script src="syndicate.js" type="text/javascript"></script>
<!-- <script src="register.js" type="text/javascript"></script> -->
<link rel="stylesheet" href="microblogging.css">
<meta charset="UTF-8">
</head>
<body>
<div id="templates">
<div id="blogpost_template" class="blogpost">
<a>
<img class='avatar'></img>
<span class='fullname'> </span>
<span class='screenname'> </span>: :
<span class='created_at'> </span>
</a>
<pre class='text'> have fun </pre>
<div class="pannel remote">
<button class="button syndicate">
<img class="icon"
src="dove.png"/>
</button>
<button class="button delete" >
<img class="icon do"
src="trash.png"/>
<img class="icon redo" src="trash_crossed.png"/>
</button>
</div>
</div>
</div>
<div id="login" onclick="document.getElementById('help')
.style.display = 'none';
init_remotestorage();">
login
</div>
<div id="pannel">
<div id="sockethub-widget" class="widget remote offline">
<img class="icon" src="sockethub.ico" onclick="toggle(this.parentElement)">
<form class="expandable">
<p>
<label for="host">host</label> <input name="host"/>
<input type="checkbox" name="ssl"/> <label for="ssl">ssl</label>
</p>
<p>
<label for="port">port</label> <input name="port"/>
<label for="secret">secret</label> <input name="secret"/>
</p>
<p>
<button class="disconnected button"
onclick="event.preventDefault();
init_syndication(this.form);">
Connect
</button>
<button class="connected button"
onclick="event.preventDefault();
sockethubClient.disconnect()">
Disconnect
</button>
<button class="button"
onclick="event.preventDefault();
console.log('pressed_save',this.form);
store_sh_credentials( this.form );">
Save
</button>
</p>
</form>
</div>
<div id="dove-widget" class="widget remote offline">
<img class="icon"
src="dove.png"
onclick="toggle(this.parentElement)">
<!-- <img class="sync connected" src="sync.png"> -->
<form class="expandable">
<p>
<label for="consumer_key">consumer key</label> <input name="consumer_key"/>
</p>
<p>
<label for="access_token">access token</label> <input name="access_token"/>
</p>
<p>
<label for="consumer_secret">consumer secret</label> <input name="consumer_secret"/>
</p>
<p>
<label for="access_token_secret">access token secret</label> <input name="access_token_secret"/>
</p>
<p>
<button class="button" onclick="event.preventDefault();
store_twitter_credentials(this.form);">
Save
</button>
<button class="button connected" onclick="event.preventDefault();
fetch_tweets('user')">
Sync
</button>
</p>
</form>
</div>
<form id="micropost" class="remote">
<div class="rs">
<textarea name='text' placeholder="Post Something"></textarea>
<button onclick="event.preventDefault(); create_post()"> POST</button>
</div>
<div class="sh">
<button id="dove_it"
class="button dove disabled"
onclick="event.preventDefault();
this.dataset['yes'] =
this.classList.toggle('active');">
<img class="icon" src="dove.png"/>
</button>
<!-- <button id="book_it"
class="button book disabled"
onclick="event.preventDefault();
this.dataset['yes'] =
this.classList.toggle('active');">
<img class="icon" src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Peace_dove_icon.svg/120px-Peace_dove_icon.svg.png"/>
</button> -->
</div>
</form>
</div>
<div id="feed">
<div id="help">
<section>
<h3> Click Login Now </h3>
</section>
<section>
<h4> What is this? </h4>
<small>
<p> this is supposed to serve as your profile <p>
<p> you can put microposts on it and send the link to your profile to others, the homepage link in your profile provides that url until you set a homepage in your profile </p>
<p> it also syncs with twitter if desired, therefor you need a sockethub and your twitter credentials </p>
<p> it can grab profile information from your tweets if you do not have a profile yet </p>
</small>
</section>
<section>
<h4> GET OPTIONS : </h4>
<small>
after the url of the app, you can add those to trigger certain behaviour, the app will do so automatically
</small>
<p> base_url=https://host.domain/path/to/storage : the base url to your remoteStorage if only this is set it serves your posts and profile for viewing purpose </p>
<p> me=true : logs in with remotestorage </p>
<p> syndicate=true : atempts to connect to sockethub und send credentials </p>
<p> twitter={} || twitter credentials, will get stored into your remoteStorage and used</p>
<p> socckethub={} : sockethub credentials, will get stored into your remoteStorage and used</p>
</section>
<br>
</div>
</div>
<form id="profile" name="profile">
<img class="profile_img" src="//upload.wikimedia.org/wikipedia/commons/3/36/MRI_head_side.jpg"/>
<input name="profile_image_url" class="edit_profile">
<p>
<span class="screenname"></span>
<input name="screenname" class="edit_profile">
</p>
<p>
<span class="name"></span>
<input name="name" class="edit_profile">
</p>
<p>
<span class="label">bio:</span>
<span class="value description"></span>
<textarea name="description" class="edit_profile"></textarea>
</p>
<p>
<span class="label">location:</span>
<span class="value location"></span>
<input name="location" class="edit_profile">
</p>
<p>
<a class="homepage" href=""> homepage </a>
<input name="homepage" class="edit_profile">
</p>
<p>
<button class="remote button edit" > edit </button>
</p>
</form>
</body>
</html>