-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstories.html
More file actions
177 lines (136 loc) · 4.97 KB
/
stories.html
File metadata and controls
177 lines (136 loc) · 4.97 KB
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
<template name="stories">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
{{> nav_bar}}
<div class="container">
<h1>Stories</h1>
<!-- Search -->
<div class="input-group col-lg-2 pull-right">
<input type="text" class="input-control pull-right-nopad" placeholder="Search Stories">
<span class="input-group-btn">
<a class="btn btn-default" href="{{ pathFor 'search_stories'}}"><i class="glyphicon glyphicon-search"></i></a>
</span>
</div><!-- /input-group -->
<!-- Tabs used for navagation -->
<ul class="nav nav-tabs">
<li class="active"><a href="#hotS" data-toggle="tab">Hot Stories</a></li>
<li><a href="#topic1" data-toggle="tab">By Topic</a></li>
<li><a href="#followed1" data-toggle="tab">Followed</a></li>
<li><a href="#myStory" data-toggle="tab">My Story</a></li>
<li><a href="#all1" data-toggle="tab">All Stories</a></li>
</ul>
<!-- Tab Pane Contents (from http://getbootstrap.com/javascript/#tabs) -->
<div class="tab-content">
<div class="tab-pane active" id="hotS">
<br>
<h1>Most Popular Stories</h1> <br>
<p>
{{#each popular}}
<table border="1" class="contentTable" style="width:900px" align="center">
<tr>
<td><b><a href="{{ pathFor 'storiesAllJill' }}">{{title}}</a></b> <br>
{{content}}</td>
<td class="hugs" >{{hugs}} hugs <div title="Give a hug!">
<button type="button" class="btn btn-default hugbtn">
<img src="img/hug.png" >
</button>
</div> <br><a href="{{ pathFor 'storiesAllJill' }}"> 2 Comments </a> <br> <br> <a href="{{ pathFor 'storiesAllJill' }}">Read More...</a></td>
</tr>
</table>
<br>
{{/each}}
</p>
</div>
<div class="tab-pane" id="topic1">
<br><h1>Topics </h1> <br>
<table border="1" class="contentTable" style="width:900px" align="center">
<tr>
<td>
<div class="topics">
<a href="{{ pathFor 'storiesAllJill' }}">Public Acceptance</a>
<br> <br>
<a href="{{ pathFor 'storiesAllEve' }}">Transition Process</a>
</div>
</td>
</tr>
</table>
</div>
<div class="tab-pane" id="followed1">
<br><h1>Followed Stories </h1>
<br>
{{#each popular}}
<table border="1" class="contentTable" style="width:900px" align="center">
<tr>
<td><b><a href="{{ pathFor 'storiesAllJill' }}">{{title}}</a></b> <br>
{{content}}</td>
<td class="hugs" >{{hugs}} hugs <div title="Give a hug!">
<button type="button" class="btn btn-default hugbtn">
<img src="img/hug.png" >
</button>
</div> <br><a href="{{ pathFor 'storiesAllJill' }}"> 2 Comments </a> <br> <br> <a href="{{ pathFor 'storiesAllJill' }}">Read More...</a></td>
</tr>
</table>
<br>
{{/each}}
</div>
<div class="tab-pane" id="myStory">
<br> <h1>Your Story</h1> <br>
<div id="update"><p> Edit the text below and click to save for next time</p></div>
<table border="1" class="contentTable" style="width:900px" align="center">
<tr>
<td><div id="edit" contenteditable="true">
I always knew I was a girl, but for years that life seemed an impossible dream. It was a difficult journey involving sex work, depression and a spell in a mental institution.
</div></td>
<td class="hugs" >50 hugs <div title="Give a hug!">
<button type="button" class="btn btn-default hugbtn">
<img src="img/hug.png" >
</button>
</div> <br> 0 Comments </td>
</tr>
</table>
<br>
<p align="center">
<button class="btn btn-primary btn-lg" type="edit my story" id="edit" value="save my edits" onclick="saveEdits()">Save</button>
</p>
</div>
<div class="tab-pane" id="all1">
<br> <h1>All Stories</h1> <br>
{{#each popular}}
<table border="1" class="contentTable" style="width:900px" align="center">
<tr>
<td><b><a href="{{ pathFor 'storiesAllJill' }}">{{title}}</a></b> <br>
{{content}}</td>
<td class="hugs" >{{hugs}} hugs <div title="Give a hug!">
<button type="button" class="btn btn-default hugbtn">
<img src="img/hug.png" >
</button>
</div> <br><a href="{{ pathFor 'storiesAllJill' }}"> 2 Comments </a> <br> <br> <a href="{{ pathFor 'storiesAllJill' }}">Read More...</a></td>
</tr>
</table>
<br>
{{/each}}
</div>
</div>
</div><!-- end container used for content -->
<script>
function saveEdits() {
//get the editable element
var editElem = document.getElementById("edit");
//get the edited element content
var userVersion = editElem.innerHTML;
//save the content to local storage
localStorage.userEdits = userVersion;
//write a confirmation to the user
document.getElementById("update").innerHTML="Edits saved!";
}
function checkEdits() {
//find out if the user has previously saved edits
if(localStorage.userEdits!=null)
document.getElementById("edit").innerHTML = localStorage.userEdits;
}
</script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
</template>