forked from g0v/reporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
323 lines (224 loc) · 7.86 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<!DOCTYPE html>
<html ng-app = "reporterApp">
<script src="javascripts/lib/jquery-1.10.2.js"></script>
<script src="javascripts/lib/jquery-ui.js"></script>
<script src="javascripts/lib/angular.min.js"></script>
<title>貼。印。前。當一位良心的公民記者。</title>
<meta charset=utf-8 />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://g0v.github.io/reporter/index.html" />
<meta property="og:title" content="貼。印。前。當一位良心的公民記者。" />
<meta property="og:image" content="https://fbexternal-a.akamaihd.net/safe_image.php?d=AQBESY-3V9fya5ke&w=398&h=208&url=https%3A%2F%2Fdchtm6r471mui.cloudfront.net%2Fhackpad.com_JqRmqeNceAT_p.66898_1395859056604_613-689.png&cfs=1&sx=0&sy=78&sw=601&sh=314" />
<meta name="description" content="貼。印。前。當一位良心的公民記者。">
<meta name="viewport" content="width=device-width,initial-scale=1">
<style type="text/css">
body { /* A4 */
width: 208mm;
font-family: Apple LiGothic Medium, "Microsoft JhengHei",微軟正黑體,Arial,Tahoma,Century gothic,sans-serif;
}
table#main {
width: 90%;
border-collapse: collapse;
}
#main td {
width: 50%;
text-align: center;
vertical-align: top;
}
#main td#r {
text-align: left;
vertical-align: middle;
padding: 5mm;
}
img.face {
width: 100%;
}
img.qr {
width: 20mm;
float: left;
}
#rt {
font-size: 120%;
}
#titleBar {
display: inline-block;
width: 102%;
color: #fff;
text-align: center;
font-size: 300%;
/*
-webkit-box-shadow: inset 0 0 0 1000px black, 0px 3mm 0px rgba(219,31,5,1);
-moz-box-shadow: inset 0 0 0 1000px black, 0px 3mm 0px rgba(219,31,5,1);
box-shadow: inset 0 0 0 1000px black, 0px 3mm 0px rgba(219,31,5,1);
padding-top: 6mm;
padding-bottom: 3.5mm;
*/
margin-top: -1mm;
margin-left: -5.5px;
margin-bottom: 6mm;
}
#titleBar span {
position: relative;
z-index: 99;
}
/*
#redBar {
display: inline-block;
width: 100%;
height: 2mm;
box-shadow: inset 0 0 0 1000px red;
} */
table#in td#left {
text-align: left;
}
table#in td#right {
font-size: 200%;
vertical-align: middle;
}
#foot {
font-size: 120%;
font-weight: bold;
}
a#doPrint {
position: fixed;
bottom: 20%;
left: 40%;
z-index: 31;
top: 50%;
left: 25%;
margin-top: -15%;
margin-left: -5%;
width: 50%;
height: 10%;
text-decoration: none;
color: rgba(255,255,255,0.5);
background-color: rgba(219,87,5,0.5);
font-family: 'Yanone Kaffeesatz';
font-weight: 700;
font-size: 200%;
line-height: 200%;
cursor: pointer;
display: block;
padding: 5px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
-webkit-box-shadow: 0px 9px 0px rgba(219,31,5,.5), 0px 9px 25px rgba(0,0,0,.4);
-moz-box-shadow: 0px 9px 0px rgba(219,31,5,.5), 0px 9px 25px rgba(0,0,0,.4);
box-shadow: 0px 9px 0px rgba(219,31,5,.5), 0px 9px 25px rgba(0,0,0,.4);
text-align: center;
-webkit-transition: all .1s ease;
-moz-transition: all .1s ease;
-ms-transition: all .1s ease;
-o-transition: all .1s ease;
transition: all .1s ease;
}
a#doPrint:hover {
color: rgba(255,255,255,1);
background-color: rgba(219,87,5,1);
-webkit-box-shadow: 0px 9px 0px rgba(219,31,5,1), 0px 9px 25px rgba(0,0,0,.7);
-moz-box-shadow: 0px 9px 0px rgba(219,31,5,1), 0px 9px 25px rgba(0,0,0,.7);
box-shadow: 0px 9px 0px rgba(219,31,5,1), 0px 9px 25px rgba(0,0,0,.7);
}
a#doPrint:active {
-webkit-box-shadow: 0px 3px 0px rgba(219,31,5,1), 0px 3px 6px rgba(0,0,0,.9);
-moz-box-shadow: 0px 3px 0px rgba(219,31,5,1), 0px 3px 6px rgba(0,0,0,.9);
box-shadow: 0px 3px 0px rgba(219,31,5,1), 0px 3px 6px rgba(0,0,0,.9);
}
</style>
</head>
<body ng-controller = "Ctrl" >
<table id = "main" border = "3px">
<tr>
<td>
<div id = "titleBar">
<!-- <span>記者證</span> -->
<span><img src="images/r2.png"></span>
</div>
<!-- <div id = "redBar">
</div> -->
<table id ="in">
<tr>
<td id ="left">
<img class = "face" src = "{{root.photo}}" ng-show = "root.photo" ng-click = "root.photo = ''" />
<span ng-hide = "root.photo">
<ol>
<li>「貼」您的照片
<li>「印」下您的公民記者證
<li>「前」往現場
</ol>
<input class="hidden" type="file" fileread="root.photo" accept="image/*" capture="camera" id="file-upload" />
</span>
</div>
</td>
<td id = "right">
<span ng-show = "root.name && !editing" ng-bind = "root.name">
</span>
<span ng-hide = "root.name && !editing">
請輸入您的名字:<input ng-model = "root.name" ng-focus = "editing = 1" ng-blur = "editing = 0"/ ng-keypress = "maybeDone($event)">
</span>
</td>
</tr>
</table>
</div>
<br><br>
<span id = "foot">
公民記者
</span>
</td>
<td id = "r">
<span id = "rt">憲法保障公民記者採訪自由</span>
<br><br>
司法院釋字第 613 號:
憲法第十一條所保障之言論自由,其內容包括通訊傳播自由,亦即經營或使用廣播、電視與其他通訊傳播網路等設施,以取得資訊及發表言論之自由。
<br><br>
司法院釋字第 689 號:
新聞自由所保障之新聞採訪自由並非僅保障隸屬於新聞機構之新聞記者之採訪行為,亦保障一般人為提供具新聞價值之資訊於眾,或為促進公共事務討論以監督政府,而從事之新聞採訪行為。
<br><br>
<a href = "http://www.judicial.gov.tw/constitutionalcourt/p03_01.asp?expno=689"><img class = "qr" src="http://chart.apis.google.com/chart?chs=200x200&cht=qr&chld=|1&chl=http://www.judicial.gov.tw/constitutionalcourt/p03_01.asp?expno=689"></a>
大法官解釋全文<br>
http://goo.gl/Rd1hXR
</td>
<a id = "doPrint" ng-show ="root.photo && root.name &&!editing" onclick = "$(this).hide(); window.print()"> 列印! </a>
</body>
<script type="text/javascript">
var reporterApp = angular.module('reporterApp', []);
reporterApp.directive("fileread", [function () {
return {
scope: {
fileread: "="
},
link: function (scope, element, attributes) {
element.bind("change", function (changeEvent) {
var reader = new FileReader();
reader.onload = function (loadEvent) {
scope.$apply(function () {
var f = loadEvent.target.result;
if (f.substr(0,1) == '{') {
f = JSON.parse(f);
}
scope.fileread = f;
});
}
if (attributes.filetype == 'json') {
reader.readAsText(changeEvent.target.files[0]);
} else {
var filesize = ((changeEvent.target.files[0].size/1024)/1024).toFixed(4)*1024; // KB
// if (filesize > 100) {
// alert("檔案超過100KB"); // limit: 100KB
// } else {
reader.readAsDataURL(changeEvent.target.files[0]);
// }
}
});
}
}
}]);
var Ctrl = function ($scope) {
$scope.root = {};
$scope.maybeDone = function(e){
if (e.keyCode == 13) $scope.editing = 0;
}
}
</script>
</html>