noticesys 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7bb069a773fe862d9e4346943e7d16b73d6881c12d2066813c89ff84ef689d3
4
- data.tar.gz: f77a2c2f36a99784ad3833e3dfe596b29207dd15f00b1e0db6b4901ae920e62b
3
+ metadata.gz: bf9532117e42a35fa3b0196ff47210fa9cc2968beb42a5173252089a88b77cf7
4
+ data.tar.gz: eeecec25eca1dede7391080e7f9c7cc49bd0789c25e08638a71f3a12049dbe0e
5
5
  SHA512:
6
- metadata.gz: 0507f5603020be67c0560236b4e40872f956e89f750d3b01feefdc4e1cdb7ca1395fb92f0997e0948d239db2f0451a79ce88774c7d9fc654d56b030efc2147d5
7
- data.tar.gz: 49a821522ecd61f112211094ff8daf22180a886e270dacc1a86a1e6670c930a6927fc36f12646e24f88cc2c8d2668a95c423b47f56ea093cd5547b0283269f37
6
+ metadata.gz: d2deb98851a747c78efc17dbc85b5c58f5b99c87a13eb5f94d7e562196b84d148cfc34784a462198c3a835e24e553dc83978e737c5b0ab78350eaf645c3b0110
7
+ data.tar.gz: 775e5efb2b4c7cb45cc3bff671648dbd6e5504d812de11899453976a4f61a72085f72031b0eab29710c7b6dff46cb02d24c2a34fd506589d0f48750498ecd49b
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/data/css.txt ADDED
@@ -0,0 +1,490 @@
1
+ %main
2
+
3
+ #wrap {max-width: 1100px}
4
+
5
+ header {
6
+ background-color: transparent;
7
+ margin: 0.2em 0em;
8
+ padding: 0em;
9
+ color: #fff;
10
+ font-size: 1.0em;
11
+ /* overflow: hidden;*/
12
+ }
13
+
14
+ %user
15
+
16
+
17
+ .main header #banner {
18
+ background-color: #113;
19
+ /*background-image: url("www.yourwebsite.com/banner.jpg");*/
20
+ background-repeat: no-repeat, repeat;
21
+ background-position: center;
22
+
23
+ background-size: cover;
24
+ /*margin: 0.2em 0em;*/
25
+ margin: 0em;
26
+ padding: 1em;
27
+ color: #fff;
28
+ min-height: 140px;
29
+
30
+ }
31
+
32
+
33
+ header h1 {
34
+ background-color: transparent;
35
+ font-size: 1.7em; color: #fff; font-family: Monaco, Papyrus;
36
+ margin-top: 1.4em;
37
+ }
38
+
39
+ #search {
40
+ background-color: transparent; float: right; width: 150px; margin: 0.4em; padding: 0.9em;
41
+ margin-right: 2em;
42
+ }
43
+
44
+
45
+ .column {max-width: 600px;}
46
+ #ptop {background-color: transparent; font-size: 1.1em; font-family: Sans-serif, Arial, Verdana ; margin-top: -120px; }
47
+ #ptop img {background-color: transparent; width: 140px; margin: 0em; padding: 0em; border-radius: 50%;border: 4px solid white}
48
+ #ptop span {background-color: transparent; display: block}
49
+ #ptop #title {background-color: transparent; font-size: 1.2em; margin: 0.03em 0em; padding: 0.1em; font-weight: 600}
50
+ #ptop #user {background-color: transparent; font-size: 0.8em; margin: 0em 0.1em; padding: 0.04em 0.1em; color: #444}
51
+ #ptop p {background-color: transparent; font-size: 0.9em; margin: 0.3em 0.1em; padding: 0.5em 0.1em; color: #000}
52
+
53
+ hr {margin: 2em 0.5em}
54
+
55
+ %noticelist
56
+
57
+
58
+
59
+ .column:last-child {
60
+ background-color: #dfd;
61
+ border-radius: 18px;
62
+ margin: 1.1em 0.9em;
63
+ padding: 1em;
64
+ color: #141;
65
+ }
66
+
67
+
68
+ /* Clear floats after the columns */
69
+ .row:after {
70
+ content: "";
71
+ display: table;
72
+ clear: both;
73
+ }
74
+
75
+ .backarrow {background-color: #e888; width: 20px}
76
+
77
+
78
+ %footer
79
+
80
+ #footer {
81
+ background-color: #113;
82
+ color: #fff;
83
+ margin: 0.3em;
84
+ padding: 1em;
85
+ }
86
+ #footer h2 {font-size: 0.9em}
87
+ #footer ul {list-style-type: none}
88
+ #footer ul li a { text-decoration: none}
89
+ #footer ul li a:link { color: #ee3}
90
+ #footer ul li a:hover { text-decoration: underline; color: #4a0}
91
+ #footer ul li a:visited { color: #fee}
92
+
93
+ @media only screen and (min-width: 860px) {
94
+ .column {
95
+ float: left;
96
+ background-color: transparent;
97
+ }
98
+
99
+ .notice {background-color: transparent; min-width: 590px;}
100
+ }
101
+
102
+ @media only screen and (min-width: 9000px) {
103
+
104
+ .notice {background-color: transparent; min-width: 700px;}
105
+ }
106
+
107
+
108
+ %notice
109
+ .notice {
110
+ background-color: transparent;
111
+ max-width: 500px;
112
+ margin: 0em 0.5em;
113
+ padding: 0.8em 0.4em;
114
+ font-family: Arial, Helvetica, sans-serif;
115
+ font-size: 0.965em;
116
+ border: 0.002em solid rgba(80,80,150, 0.1);
117
+ border-bottom-style: 2em solid #e33;
118
+ min-height: 65px;
119
+
120
+ }
121
+
122
+ .notice {
123
+ background-color: transparent;
124
+ max-width: 500px;
125
+ margin: 0em 0.5em;
126
+ padding: 0.8em 0.4em;
127
+ font-family: Arial, Helvetica, sans-serif;
128
+ font-size: 0.965em;
129
+ border: 0.002em solid rgba(80,80,150, 0.1);
130
+ border-bottom-style: 2em solid #e33;
131
+ min-height: 65px;
132
+
133
+ }
134
+ .notice:hover {background-color: #ededfe}
135
+ .notice div#avatar {background-color: transparent; float: left; width: 72px; }
136
+ .notice .user {background-color: transparent}
137
+ .notice .user a:first-child {background-color: transparent; color: #000; font-weight: 600}
138
+ .notice .user .ellipsis {width: 17px; background-color: transparent; vertical-align: text-bottom; float: right; display: none}
139
+
140
+
141
+
142
+ .notice .card {background-color: transparent; max-width: 500px;}
143
+
144
+ .notice div#avatar img {
145
+ background-color: transparent;
146
+ width: 35px;
147
+ display: block;
148
+ margin: 0.2em 0.9em;
149
+ padding: 0.4em;
150
+ /*margin-top: 0.4em;
151
+ margin-right: 0.4em*/
152
+ }
153
+
154
+ .notice div#avatar img:hover {filter: brightness(90%);}
155
+
156
+ .profile {
157
+ position: relative;
158
+ display: inline-block;
159
+ }
160
+
161
+ #ucard {
162
+ visibility: hidden;
163
+ width: 276px;
164
+ height: 264px;
165
+ background-color: #fff;
166
+ color: #fff;
167
+ border-radius: 15px;
168
+ margin: 0.2em;
169
+ padding: 1em;
170
+
171
+ /* Position the tooltip */
172
+ position: absolute;
173
+ z-index: 1;
174
+ border: 1px solid #ccc;
175
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 3px 10px 0 rgba(0, 0, 0, 0.19);
176
+ }
177
+
178
+ #ucard div img {width: 90px}
179
+ #ucard .title {color: #000; display: block; font-weight: 600; margin: 0.1em; padding: 0.2em}
180
+ #ucard .username {color: #000; display: block; margin: 0.1em; padding: 0.2em; color: #333}
181
+ #ucard p {margin: 0.1em; padding: 0.2em; line-height: 1.3em}
182
+ .profile:hover #ucard {
183
+ visibility: visible;
184
+ transition: 0.5s;
185
+ transition-delay:0.9s;
186
+ opacity: 1;
187
+ animation-name: fadeInOpacity;
188
+ animation-iteration-count: 1;
189
+ animation-timing-function: ease-in;
190
+ animation-duration: 1.2s;
191
+ }
192
+
193
+
194
+ @keyframes fadeInOpacity {
195
+ 0% {
196
+ opacity: 0;
197
+ }
198
+ 100% {
199
+ opacity: 1;
200
+ }
201
+ }
202
+ .notice div2 span {font-weight: 600}
203
+ .notice div2 ~ div {background-color: transparent; min-width: 330px}
204
+ /*.notice:hover {background-color: rgba(244,244,255, 0.5); color: #000} */
205
+ .notice div a {text-decoration: none; color: #555}
206
+ .notice div:first-child a:hover {text-decoration: underline}
207
+ .notice p {background-color: transparent; color: #000; margin: 0.1em 0; padding: 0.3em 0; }
208
+ .notice p a {background-color: transparent; text-decoration: none}
209
+ .notice p a:link {background-color: transparent; color: #448}
210
+ .notice p a:visited {background-color: transparent; color: #774}
211
+ .notice p a:hover {background-color: transparent; text-decoration: underline}
212
+ .top-crop {
213
+ background-color: #422;
214
+ overflow: hidden;
215
+ border-radius: 15px;
216
+ max-height: 280px;
217
+ /*display: flex;*/
218
+ /*align-items: flex-end;*/
219
+ /*justify-content: center*/
220
+ /*align-items: center; */
221
+ }
222
+
223
+ .top-crop img {
224
+ max-width: initial;
225
+
226
+ }
227
+
228
+ .y10 img {
229
+ margin-top: -18%
230
+ }
231
+
232
+ .y20 img {
233
+ margin-top: -30%
234
+ }
235
+
236
+ .center {
237
+ display: flex;
238
+ justify-content: center;
239
+ align-items: center;
240
+ }
241
+
242
+ .bottom {
243
+ display: flex;
244
+ align-items: center;
245
+ align-items: flex-end;
246
+
247
+ }
248
+
249
+ .img1 {background-color: #000; max-width: 380px; border-radius: 15px;}
250
+
251
+ %cards
252
+ /* Twitter card */
253
+
254
+ .card { background-color: #e00; font-size: 0.8em; color: #f22; clear: both; border: 1px solid #ccc; border-radius: 15px; padding-bottom: 1em;}
255
+ /*.card:hover { background-color: #000}*/
256
+ .card img {width: 100%; border-radius: 15px 15px 0 0;}
257
+ .card a {text-decoration: none; color: #900}
258
+ .card a:hover {text-decoration: none; color: #900}
259
+ .card span {color: #000; font-size: 1.0em;}
260
+ .card .title {background-color: transparent; display: block; font-size: 1.18em; font-weight: 300; font-family: Verdana, Arial; margin: 0.8em 0.5em 0.4em 0.4em; padding: 0.1em 0.4em}
261
+ .card .desc {background-color: transparent; color: #555; display: block; font-size: 1.18em; font-weight: 500; margin: 0.1em 0.3em; padding: 0.1em 0.9em 0.3em 0.6em;}
262
+ .card .link { display: block}
263
+ .card .linkurl {color: #555; font-weight: 300; font-size: 1.18em; margin: 0.3em 0em; padding: 0.5em 0em }
264
+ .card .link svg {fill: #555; width: 15px; margin-left: 16px; vertical-align: text-bottom}
265
+ .card .top-crop {border-radius: 15px 15px 0 0;}
266
+
267
+
268
+ /* end of Twitter card */
269
+
270
+
271
+ /* start of summary card */
272
+ .card2 {background-color: transparent; overflow: hidden; border-radius: 15px; border: 1px solid #ccc}
273
+ /*.card2:hover {background-color: #ee2; }*/
274
+ .card2 img {width: 170px; height: 130px; object-fit: cover;}
275
+ #content {
276
+ background-color: transparent;
277
+ font-family: Arial, Verda;
278
+ font-size: 0.9em;
279
+ margin: 0.4em; padding: 0.8em;
280
+ }
281
+ #col1 {
282
+ background-color: transparent; float: left;
283
+ border-right: 1px solid #ccc; margin: 0; padding: 0; width: 130px; overflow: hidden
284
+ }
285
+
286
+ .card2 #col1 svg {background-color: transparent; width: 30px; fill: #556}
287
+
288
+ #col2 {
289
+ background-color: transparent;
290
+ margin: 0em; padding: 0em;
291
+ }
292
+ #col1, #col2 {
293
+ height: 130px;
294
+ display: flex;
295
+ justify-content: center;
296
+ align-items: center;
297
+ }
298
+ /* Clear floats after the columns */
299
+ #col2:after {
300
+ content: "";
301
+ clear: both;
302
+ }
303
+ .card2 a {text-decoration: none;}
304
+ .card2 span {color: #000; font-size: 1.1em;}
305
+ .card2 .title {background-color: transparent; display: block; font-weight: 300; font-family: Verdana, Arial; margin: 0.1em 0em; padding: 0.2em 0em; font-size: 1.0em;}
306
+ .card2 .desc {background-color: transparent; color: #555; display: block; margin: 0.1em 0em; padding: 0.2em 0em; line-height: 1.2em;}
307
+ .card2 .link { display: block}
308
+ .card2 .linkurl {color: #555; font-size: 1.0em;}
309
+ .card2 .link svg {color: #555; width: 15px}
310
+ .card2 .link svg {fill: #555; width: 15px; vertical-align: text-bottom}
311
+ /* end of summary card */
312
+
313
+ .notice .ncol2 {background-color: transparent; float: left; width: 508px }
314
+
315
+ .notice:after {
316
+ content: "";
317
+ display: table;
318
+ clear: both;
319
+ }
320
+
321
+ .notice #actions svg {width: 20px; display: none}
322
+
323
+
324
+ %status
325
+
326
+ header {
327
+ background-color: transparent;
328
+ margin: 0.1em 0.1em ;
329
+ padding: 0.1em 0.2em;
330
+ }
331
+ header div {
332
+ background-color: transparent;
333
+ margin: 0.1em 0.4em ;
334
+ padding: 0.2em 0.5em;
335
+ }
336
+ header div>div:first-child {
337
+ background-color: transparent;
338
+ float: left;
339
+ margin: 0.1em 0.4em ;
340
+ padding: 0.2em 0.5em;
341
+ width: 26px;
342
+ }
343
+ header div>div:last-child {
344
+ background-color: transparent;
345
+ margin: 0.1em 0.2em ;
346
+ padding: 0.2em 0.2em;
347
+ }
348
+ #back {
349
+ background-color; transparent
350
+ width: 23px; height: 34px;
351
+ margin-top: -0.2em;
352
+ display: block
353
+ }
354
+
355
+ #back:hover {
356
+
357
+ border-radius: 50%;
358
+ /*border: 1px solid;*/
359
+ background-color: #eee;
360
+ color: #000;
361
+
362
+ }
363
+
364
+ .backarrow {
365
+ background-color: transparent;
366
+ width: 21px;
367
+ margin: 0.1em;
368
+ margin-left: -0.05em;
369
+ padding: 0.2em;
370
+ }
371
+
372
+ h1 {}
373
+
374
+ h1 {
375
+ background-color: transparent;
376
+ font-family: Arial,sans-serif;
377
+ font-size: 1.12em;
378
+ margin: 0.9em 0.6em 0.3em 0.2em;
379
+ padding: 0.4em 0.4em;
380
+ display: inline
381
+ }
382
+
383
+ #notice {
384
+ background-color: transparent;
385
+ margin: 0.9em 0.9em;
386
+ padding: 0.6em 0.2em;
387
+ max-width: 590px;
388
+ font-family: Arial,sans-serif;
389
+ border: 1px solid rgba(150, 150, 200, 0.3)
390
+ }
391
+ #avatar {
392
+ background-color: transparent;
393
+ width: 54px;
394
+ float: left;
395
+ margin: 0.1em;
396
+ padding: 0.3em 0.2em;
397
+ }
398
+ #avatar img {
399
+ background-color: transparent;
400
+ width: 35px;
401
+ margin: 0.1em 0.5em;
402
+ margin-top: -0.7em;
403
+ padding: 0.5em 0.1em;
404
+ }
405
+
406
+ #title {
407
+ background-color: transparent;
408
+ font-size: 0.9em;
409
+ min-height: 48px
410
+ }
411
+
412
+ #title div:first-child {
413
+ background-color: transparent;
414
+ margin: 0 0.2em;
415
+ padding: 0.2em 0.5em;
416
+ font-weight: 700;
417
+ }
418
+
419
+ #title div a {color: #000; text-decoration: none}
420
+ #title div a:hover {text-decoration: underline}
421
+
422
+ #title div+div {
423
+ background-color: transparent;
424
+ margin: 0 0.2em;
425
+ padding: 0.1em 0.5em;
426
+ font-size: 1.0em;
427
+ color: #888;
428
+ font-weight: 500;
429
+ }
430
+
431
+ #desc {
432
+ background-color: transparent;
433
+ margin: 0.2em;
434
+ padding: 0.4em;
435
+ font-size: 1.4em;
436
+
437
+ }
438
+
439
+ #time {
440
+ background-color: transparent;
441
+ margin: 0.1em 0.3em;
442
+ padding: 0.3em 0.86em;
443
+ font-size: 0.9em;
444
+ color: #777;
445
+ }
446
+
447
+ #time a:link {
448
+ background-color: transparent;
449
+ color: #224;
450
+ text-decoration: none;
451
+ }
452
+ #time a:hover {
453
+ background-color: transparent;
454
+ text-decoration: underline
455
+ }
456
+
457
+ #time a:visited {
458
+ background-color: transparent;
459
+ color: #555;
460
+ text-decoration: none;
461
+ }
462
+
463
+ /* status/photo */
464
+
465
+ .photo img {width:50%; }
466
+ .img1 {max-width: 560px; border-radius: 15px;}
467
+
468
+ .top-crop {
469
+ background-color: #422;
470
+ overflow: hidden;
471
+ border-radius: 15px;
472
+ max-height: 280px;
473
+ /*display: flex;*/
474
+ /*align-items: flex-end;*/
475
+ /*justify-content: center*/
476
+ /*align-items: center; */
477
+ }
478
+
479
+ .top-crop img {
480
+ max-width: initial;
481
+
482
+ }
483
+
484
+
485
+ .center {
486
+ display: flex;
487
+ justify-content: center;
488
+ align-items: center;
489
+ }
490
+
data/lib/noticesys.rb CHANGED
@@ -18,6 +18,7 @@ require 'recordx_sqlite'
18
18
  # CardView - renders the HTML for a card; used within a status
19
19
  # HashtagQueryView - renders the HTML for the results for a hashtag search
20
20
  # SearchQueryView - renders the HTML for the results for a keyword search
21
+ # CssView - outputs the default CSS used by the microblog
21
22
 
22
23
  module NoticeSys
23
24
 
@@ -286,6 +287,42 @@ module NoticeSys
286
287
  end
287
288
 
288
289
  end
290
+
291
+ class CssView
292
+
293
+ def initialize(weblet_file)
294
+
295
+ @weblet_file = weblet_file
296
+
297
+ end
298
+
299
+ def noticelist_css()
300
+
301
+ w = Weblet.new(@weblet_file)
302
+
303
+ lines = []
304
+ lines << w.render(:main)
305
+ lines << w.render('main/user')
306
+ lines << w.render(:notice)
307
+ lines << w.render('notice/cards')
308
+ lines << w.render('main/noticelist')
309
+ lines << w.render('main/footer')
310
+ lines.join("\n")
311
+
312
+ end
313
+
314
+ def notice_css()
315
+
316
+ w = Weblet.new(@weblet_file)
317
+
318
+ lines = []
319
+ lines << w.render(:status)
320
+ lines << w.render(:cards)
321
+ lines.join("\n")
322
+
323
+ end
324
+
325
+ end
289
326
 
290
327
  class NoticeView
291
328
 
@@ -566,7 +603,7 @@ module NoticeSys
566
603
  class Main
567
604
 
568
605
  def initialize(basepath, xslfile, statuscss_url, statuslistcss_url,
569
- weblet_file, static_urlbase, urlbase)
606
+ weblet_file, static_urlbase, urlbase, weblet_cssfile)
570
607
 
571
608
  weblet = Weblet.new(weblet_file)
572
609
  @status = StatusView.new(basepath, xslfile, statuscss_url, weblet)
@@ -577,6 +614,16 @@ module NoticeSys
577
614
  @search = SearchQueryView.new(basepath, statuslistcss_url, weblet,
578
615
  static_urlbase, urlbase)
579
616
 
617
+ @css = CssView.new(weblet_cssfile)
618
+
619
+ end
620
+
621
+ def notice_css()
622
+ @css.notice_css()
623
+ end
624
+
625
+ def noticelist_css()
626
+ @css.noticelist_css()
580
627
  end
581
628
 
582
629
  def status(topic, rawid, referer)
@@ -593,7 +640,9 @@ module NoticeSys
593
640
 
594
641
  def search_query(s, referer)
595
642
  @search.render s, referer
596
- end
643
+ end
644
+
645
+
597
646
 
598
647
  end
599
648
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noticesys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  iGAgDWBQqM/kdjDslqjBGtyWyFyuYHzXMU1gO/P0aE3rh1enqahZ8BqY+gxXLGrR
36
36
  sU+WFV9qPqoqNOG0tOknOZXN
37
37
  -----END CERTIFICATE-----
38
- date: 2021-04-05 00:00:00.000000000 Z
38
+ date: 2021-04-06 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: down
@@ -163,6 +163,7 @@ executables: []
163
163
  extensions: []
164
164
  extra_rdoc_files: []
165
165
  files:
166
+ - data/css.txt
166
167
  - data/microblog.txt
167
168
  - lib/noticesys.rb
168
169
  homepage: https://github.com/jrobertson/noticesys
metadata.gz.sig CHANGED
Binary file