home » zplus/freepost.git
ID: b4e8428fb0066715b4fc7ab4e48fd975c8a2f831
892 lines — 22K — View raw


  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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
* {
    margin:      0;
    padding:     0;
    font-family: sans-serif;

    -moz-box-sizing:     border-box;
    -webkit-box-sizing:  border-box;
    box-sizing:          border-box;
}

a, a:hover, a:visited {
    /*
    background:          transparent;
    color:               #337ab7;
    */
    text-decoration:     none;
}

@media (prefers-color-scheme: dark) {
    a, a:hover, a:visited {
        color: #ff0;
    }
}

blockquote {
    background-color:    #f8f8f8;
    border-left:         5px solid #e9e9e9;
    font-size:           .85em;
    margin:              1em 0;
    padding:             .5em 1em;
}

blockquote cite {
    color:       #999;
    display:     block;
    font-size:   .8em;
    margin-top:  1em;
}

blockquote cite:before {
    content: "\2014 \2009";
}

h3 {
    font-size:   1.5em;
    font-weight: normal;
    margin:      1em 0 .5em 0;
}

p {
    margin:  0 0 10px 0;
}

.bg-green {
    background-color:    #d9ffca;
    border-radius:       4px;
    padding:             .5em 1em;
}

.bg-red {
    background-color:    #f2dede;
    border-radius:       4px;
    padding:             .5em 1em;
}

.bg-blue {
    background-color:    #337ab7;
    border-radius:       4px;
    padding:             .5em 1em;
}

.bg-light-blue {
    background-color:    #d9edf7;
    border-radius:       4px;
    padding:             .5em 1em;
}

/* Some styles for buttons */
.button {
    border:              0px;
    border-radius:       4px;
    cursor:              pointer;
    display:             inline-block;
    padding:             .5em 1em;
    text-align:          center;
}

@media only screen and (max-width: 800px) {
    .button {
        font-size: 1.2rem;
        padding:   .5em 1em;
        width:     100%;
    }
}

.button_transparent,              /* Green */
.button_transparent:hover,
.button_transparent:visited {
    background-color: transparent;
    border: 0;
    color: black;
}

.button_ok,              /* Green */
.button_ok:hover,
.button_ok:visited {
    background-color:    #4caf50;
    color:               #fff;
}

.button_info,            /* Blue */
.button_info:hover,
.button_info:visited {
    background-color:    #008cba;
    color:               #fff;
}

.button_alert,           /* Red */
.button_alert:hover,
.button_alert:visited {
    background-color:    #f44336;
    color:               #fff;
}

.button_default,         /* Gray */
.button_default:hover,
.button_default:visited {
    background-color:    #e7e7e7;
    color:               #000;
}

.button_default1,       /* Black */
.button_default1:hover,
.button_default1:visited {
    background-color:    #555;
    color:               #fff;
}

img {
    /* Prevent images from taking up too much space in comments */
    max-width:   100%;
}

label {
    cursor:      pointer;
    font-weight: normal;
}

/* Add light blue shadow to form controls */
.form-control:focus {
    border-color:        #66afe9;
    outline:             0;
    -webkit-box-shadow:  inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
    box-shadow:          inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
}

.form-control {
    display:             block;
    padding:             .5em 1em;
    line-height:         1.42857143;
    color:               #555;
    border:              1px solid #ccc;
    border-radius:       4px;
    width:               100%;
    -webkit-box-shadow:  inset 0 1px 1px rgba(0,0,0,.075);
    box-shadow:          inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition:  border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
    -o-transition:       border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition:          border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}

.form-control-inline {
    display: inline;
    width: auto;
}

textarea.form-control {
    height: 8rem;
}

.pagination {}

    .pagination > form {
        display: inline-block;
    }

    .pagination > .page_number {
        font-size: .7rem;
        font-weight: bold;
        margin:    0 1rem;
    }

/* When users vote, this <iframe/> is used as target, such that
 * the page is not reloaded
 */
.vote_sink {
    height:      1px;
    left:        -10px;
    position:    fixed;
    top:         -10px;
    width:       1px;
}

html, body {
    background-color:    #fff;
    font-size:           1em;
    height:              100%;
    line-height:         1em;
    margin:              0;
    padding:             0;
    width:               100%;
}

@media (prefers-color-scheme: dark) {
    html, body {
        background-color: #333;
        color: #ddd;
    }
}

pre {
    background-color:    #efefef;
    font-family:         "Courier 10 Pitch", Courier, monospace;
    font-size:           95%;
    line-height:         140%;
    margin:              1rem 0;
    padding:             1rem;
    white-space:         pre;
    white-space:         pre-wrap;
    white-space:         -moz-pre-wrap;
    white-space:         -o-pre-wrap;
}

    pre code {
        font-family:         Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
        font-size:           95%;
        line-height:         140%;
        white-space:         pre;
        white-space:         pre-wrap;
        white-space:         -moz-pre-wrap;
        white-space:         -o-pre-wrap;
    }

/* Monospace <pre/> to write some nice ASCII art in frontpage */
pre.new_year {
    background-color:    transparent;
    color:               #BF0000;
    font-family:         monospace;
    font-size:           .8rem;
    font-webkit:         bold;
    margin:              0 0 2em 0;
    text-align:          center;
    white-space:         pre;
    white-space:         pre-wrap;
    white-space:         -moz-pre-wrap;
    white-space:         -o-pre-wrap;
}

/* Inline code */
:not(pre) > code {
        background-color:   #efefef;
        border-radius:      3px;
        display:            inline-block;
        font-family:        monospace, sans-serif;
        font-size:          85%;
        line-height:        140%;
        margin:             0 .2em;
        padding:            .2em;
        white-space:        pre;
        white-space:        pre-wrap;
        white-space:        -moz-pre-wrap;
        white-space:        -o-pre-wrap;
}

/* A <div> that respects \n without converting to <br> */
div.pre {
    white-space: pre;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
}

ul, ol {
    margin:              1.2em 2em;
}

/* Burger menu icon
 *
 * How to use:
 *     <div class="burger-icon">
 *         <div class="line1"></div>
 *         <div class="line2"></div>
 *         <div class="line3"></div>
 *     </div>
 */
.burger-icon {
    display:  inline-block;
    cursor:   pointer;
    position: relative;
}

    .burger-icon > .line1,
    .burger-icon > .line2,
    .burger-icon > .line3 {
        background-color: #000;
        height:           4px;
        margin:           4px 0;
        transition:       .5s;
        width:            36px;
    }

    @media (prefers-color-scheme: dark) {
        .burger-icon > .line1,
        .burger-icon > .line2,
        .burger-icon > .line3 {
            background-color: #fff;
        }
    }

    .burger-icon.open > .line1 {
        transform: rotate(-45deg) translate(-0px, 11px);
    }

    .burger-icon.open > .line2 {
        opacity:   0;
    }

    .burger-icon.open > .line3 {
            transform: rotate(45deg) translate(-0px, -11px);
    }

    .burger-icon.notify > .line1,
    .burger-icon.notify > .line2,
    .burger-icon.notify > .line3 {
            background-color: #f00;
    }
























/* A class used for displaying URLs domain (under post tile) */
.netloc {
    color:       #828282;
    font-size:   1rem;
    font-style:  italic;
}

@media (prefers-color-scheme: dark) {
    .netloc {
        color: #ccc;
    }
}

.monkey {
    height: 1.5em;
    margin: 0 1em;
    vertical-align: middle;
}

a.topic,
a.topic:hover,
a.topic:visited {
    color:            rgba(200,0,100,.8);
    font-size:        1rem;
    padding:          0 .2rem;
    text-decoration:  none;
}

/* Text icon near the title, to display the post content */
.text_preview {
    height:          .8rem;
    margin:          0 .5rem;
    vertical-align:  middle;
}

/* Logo text */
a.logo,
a.logo:hover,
a.logo:visited {
    color:           #000;
    font-weight:     bold;
    text-decoration: none;
}

@media (prefers-color-scheme: dark) {
    a.logo,
    a.logo:hover,
    a.logo:visited {
        color: #fff;
    }
}

/* List of posts, for example in the homepage */
.posts {}

    .posts > .menu {
        border-bottom: 0px transparent;
        font-size: .8rem;
        margin-bottom: 1rem;
    }

        .posts > .menu > a {
            padding: .2rem;
        }

    /* A singe post */
    .posts > .post {
        display: grid;
        grid-template-columns: min-content auto;
        grid-column-gap: 1.5rem;

        margin-bottom: 2rem;
    }

        /* Show numbered position in the list */
        .posts > .post > .position {
            color: #555;
            font-style: italic;
            line-height: 1.9rem;
            text-align: right;
        }

        @media (prefers-color-scheme: dark) {
            .posts > .post > .position {
                color: #ccc;
            }
        }

        .posts > .post > .info > .title > a {
            color: #000;
            font-size: 1.6rem;
        }

        @media (prefers-color-scheme: dark) {
            .posts > .post > .info > .title > a {
                color: #fff;
            }
        }

        /* Some post info showed below the title */
        .posts > .post > .info > .about {
            color:   #666;
            margin:  .5rem 0 0 0;
        }

        @media (prefers-color-scheme: dark) {
            .posts > .post > .info > .about {
                color: #ccc;
            }
        }

    .posts > .pagination > form {
        width: 100%;
    }

.container {
    margin:      auto;
    max-width:   90%;
}


    /**************************************************************************
     * Page header
     *************************************************************************/


    .container > .header {
        margin-top: 1rem;
    }

    @media only screen and (max-width: 800px) {
        .container > .header {
            display: grid;
            grid-template-columns: auto;
        }

        .container > .header > .title-large {
            display: none;
        }

        .container > .header > .title-small {
            display: grid;
            grid-template-columns: auto max-content;
        }
    }

    @media only screen and (min-width: 800px) {
        .container > .header {
            display: grid;
            grid-template-columns: max-content auto;
        }

        .container > .header > .title-small {
            display: none;
        }
    }

    /* Menu under the logo */
    @media only screen and (max-width: 800px) {
        .burger-icon {
            display: inline-block;
        }

        .menu {
            border-bottom:  2px dashed #aaa;
            display:        none;
            padding:        1rem 0;
        }

        /* This class is toggled when the burger icon is clicked */
        .menu.visible {
            display: block;
        }

            /* Every menu item */
            .menu.visible a {
                border:          0;
                color:           #000;
                display:         block;
                margin:          0;
                padding:         .8rem 0;
                text-align:      left;
                text-decoration: none;
            }

            /* Highlight menu item of the current active page (Hot/New/Submit/...) */
            .menu.visible .active_page {
                font-weight:     bold;
                text-decoration: underline dotted;
                text-transform:  uppercase;
            }

            /* Highlight username if there are unread messages */
            .menu.visible .new_messages {
                background-color:  rgb(255, 175, 50);
                color:             #fff;
                font-weight:       bold;
                padding-left:      1rem;
            }
    }

    @media only screen and (min-width: 800px) {
        .burger-icon {
            display: none;
        }

        .menu {
            border-bottom:   1px solid transparent;
            display:         flex;
            flex-direction:  row;
            flex-wrap:       wrap;
            justify-content: flex-start;
            align-content:   flex-start;
            align-items:     flex-end;
        }

            .menu > .flex-item {
                flex:            0 1 auto;
                align-self:      auto;
                order:           0;

                border:          0;
                border-bottom:   3px solid transparent;
                color:           #000;
                margin:          0;
                padding:         0 .5rem .5rem .5rem;
            }

            @media (prefers-color-scheme: dark) {
                .menu > .flex-item {
                    color: #fff;
                }
            }

            /* Highlight menu item of the current active page (Hot/New/Submit/...) */
            .menu > .active_page {
                border-bottom:   3px solid #000;
            }

            @media (prefers-color-scheme: dark) {
                .menu > .active_page {
                    border-bottom:   3px solid #fff;
                }
            }

            /* Highlight username if there are unread messages */
            .menu .new_messages {
                background-color:    rgb(255, 175, 50);
                border:              0;
                border-radius:       4px;
                color:               #fff;
                font-weight:         bold;
                margin:              0;
                padding:             .5em .5em;
                text-decoration:     none;
            }
    }


    /**************************************************************************
     * Page content
     *************************************************************************/


    .container > .content {
        padding:     1em 0;
        line-height: 1.5em;
    }

        .container > .content .vote {
            margin:  0 1rem 0 0;
            padding: 0 .5rem;
        }

        .container > .content .vote > form {
            display: inline-block;
            margin:  0;
            padding: 0;
        }

            .container > .content .vote > form > button {
                background:      transparent;
                border:          0;
                cursor:          pointer;
                display:         inline-block;
                height:          1rem;
                margin:          0;
                overflow:        hidden;
                padding:         0;
                text-decoration: none;
                vertical-align:  middle;
                width:           1rem;
            }

        /* Votes counter */
        .container > .content .vote > .count {
            margin: 0 .5rem;
        }

        .container > .content .vote.upvoted {
            background-color: #d1ffd5;
            border:           1px dashed;
            border-color:     #00e313;
            border-radius:    .5rem;
            color:            #00a200;
            font-weight:      bolder;
        }

        .container > .content .vote.downvoted {
            background-color: #ffd9d9;
            border:           1px dashed;
            border-color:     #ff7171;
            border-radius:    .5rem;
            color:            #f00;
            font-weight:      bolder;
        }

        /* Community page */
        .container > .content > .community {

        }

            .container > .content > .community > .about {
                border-left: 1px solid #aaa;
                float: right;
                font-size: .9rem;
                margin: 0 0 5% 5%;
                padding: 0 5%;
                width: 40%;
            }

        /* New submission page */
        .container > .content > form.submit {
            width: 100%;
        }

        /* Page for a post */
        .container > .content > .post {
        }

            /* Style used to format Markdown tables */
            .container > .content > .post table {
                background:      #fff;
                border-collapse: collapse;
                text-align:      left;
            }

                .container > .content > .post table > th {
                    border-bottom:   2px solid #6678b1;
                    color:           #039;
                    font-weight:     normal;
                    padding:         0 1em;
                }

                .container > .content > .post table > td {
                    border-bottom:   1px solid #ccc;
                    color:           #669;
                    padding:         .5em 1em;
                }

            /* The post title */
            .container > .content > .post > .title {
                font-size: 1.5em;
            }

            /* Info below post title */
            .container > .content > .post > .info {
                margin: 1em 0;
            }

                .container > .content > .post > .info > .username {
                    margin-left: 1rem;
                }

            /* Post text */
            .container > .content > .post > .text {
                margin:      2rem 0;
                word-wrap:   break-word;
            }

            /* The "new comment" form for this post page */
            .container > .content > .post .new_comment > input[type=submit] {
                margin: 1em 0;
            }

            /* Comments tree for the Post page */
            .container > .content > .post > .comments {
                margin: 5em 0 0 0;
            }

                /* A single comment in the tree */
                .container > .content > .post > .comments > .comment {
                    margin:    0 0 1rem 0;
                    overflow:  hidden;
                }

                    /* Some info about this comment */
                    .container > .content > .post > .comments > .comment > .info {
                        display:   inline-block;
                        font-size: .9rem;
                    }

                        .container > .content > .post > .comments > .comment > .info > .username {
                            display: inline-block;
                            margin:  0 1rem;
                        }

                        .container > .content > .post > .comments > .comment .info a,
                        .container > .content > .post > .comments > .comment .info a:hover,
                        .container > .content > .post > .comments > .comment .info a:visited {
                            display: inline-block;
                            text-decoration: none;
                        }

                        .container > .content > .post > .comments > .comment > .info > .op {
                            background-color: rgb(255, 175, 50);
                            border-radius:    4px;
                            font-weight:      bold;
                            padding:          0 1rem;
                        }

                        .container > .content > .post > .comments > .comment > .info > .op a,
                        .container > .content > .post > .comments > .comment > .info > .op a:hover,
                        .container > .content > .post > .comments > .comment > .info > .op a:visited {
                            color: #fff;
                        }

                    /* The comment text */
                    .container > .content > .post > .comments > .comment > .text {
                        word-wrap:  break-word;
                    }

                /* Give the comment that's linked to in the URL location hash a lightyellow background color */
                .container > .content > .post > .comments > .comment:target {
                    background-color: lightyellow;
                }

        .container > .content > .search {
            margin-bottom: 3rem;
        }

        /* User home page */
        .container > .content > form > .user {
            display: grid;
            grid-column-gap: 3rem;
            grid-row-gap: 1rem;
            grid-template-columns max-content: auto;
        }

        /* User activity */
        .container > .content > .user_activity > * {
            margin: 0 0 2em 0;
        }

        /* Login page */
        .container > .content > .login {
            margin:      auto;
            max-width: fit-content;
        }

        .container > .content > .login form > div {
            margin: 1rem 0;
        }

        /* Page to edit a post or a comment */
        .container > .content > .edit
        {
        }

        /* Page to reply to a comment */
        .container > .content > .reply
        {
        }

        /* About page */
        .container > .content > .about {}

            .container > .content > .about > h3 {
                margin: 1em 0 .5em 0;
            }

            .container > .content > .about > p {
                line-height: 1.5em;
            }


    /**************************************************************************
     * Page footer
     *************************************************************************/


    .container > footer {
        margin:      0;
        padding:     2em 0;
        text-align:  center;
    }

        .container > footer img {
            height:          1.2em;
            margin:          0 .5em 0 0;
            vertical-align:  middle;
        }

        .container > footer > .monkey {
            height: auto;
            margin: 0 0 3rem 0;
            width: 3%;
        }

        .container > footer > ul {
            list-style:  none;
            margin:      auto;
            overflow:    hidden;
            padding:     0;
            width:       fit-content;
        }

            .container > footer > ul > li {
                float:   left;
                margin:  0 2em 0 0;

                @media only screen and (max-width: 1024px) {
                    float: none;
                    margin: 1rem 0;
                }
            }