~jadedctrl/jam-xwx-moe

~jadedctrl/jam-xwx-moe/pleroma-fe/paĝo.sh
 ..
0 #!/bin/sh
1 # Nomo: paĝo.sh
2 # Pri: Tiu ĉu skripto presas enhavon de HTML-paĝo legebla de donita »paĝo«.
3 # Dato: 2024-03-18
4
5
6 PAGHO="$1"
7 TITOLO="$(head -1 "$PAGHO" | sed 's%</.*%%' | sed 's%.*>%%')"
8 ENHAVO="$(tail +2 "$PAGHO")"
9
10
11 cat <<EOF
12 <body>
13 <div id=app>
14 <style>
15 body {
16 background-color: #B5E9EC;
17 font-family: sans-serif;
18 font-size: 14px;
19 color: black;
20 }
21
22
23 .our-panel {
24 box-shadow: 0px 0px 0px 1px rgba(98, 14, 140, 1) , 1px 1px 3px 1px rgba(0, 0, 0, 0.5);
25 overflow: hidden;
26 border-radius: 3px;
27 padding: 0;
28 background-color: #F7F7F7;
29 max-width: 1000px;
30 margin: auto;
31 margin-top: 3.0rem;
32 }
33
34
35 img {
36 bottom: 0;
37 display: table-cell;
38 vertical-align: bottom;
39 }
40
41
42 h1 {
43 text-align: center;
44 }
45
46
47 .our-panel-heading {
48 border-radius: 3px 3px 0 0;
49 align-items: stretch;
50 background-color: #E2C2F2;
51 box-shadow: 0px 0px 0px 1px rgba(98, 14, 140, 1) , 1px 1px 0px 0px rgba(255, 255, 255, 0.3) inset, -1px -1px 0px 0px rgba(0, 0, 0, 0.3) inset;
52 flex-direction: column;
53 padding: .5em;
54 position: relative;
55 text-align: left;
56 font-size: 1.3em;
57 }
58
59
60 .our-panel:after {
61 bottom: 0;
62 box-shadow: 1px 1px 4px rgba(0, 0, 0, .6);
63 box-shadow: 0px 0px 0px 1px rgba(98, 14, 140, 1) , 1px 1px 3px 1px rgba(0, 0, 0, 0.5);
64 content: "";
65 left: 0;
66 pointer-events: none;
67 position: absolute;
68 right: 0;
69 top: 0;
70 z-index: 5;
71 }
72
73
74 .our-panel-body p {
75 padding-left: 20px;
76 padding-right: 20px;
77 }
78
79
80 .our-panel-body:empty:before {
81 content: "¯\\_(ツ)_/¯";
82 display: block;
83 margin: 1em;
84 text-align: center;
85 }
86
87
88 .our-panel-body>p {
89 line-height: 1.3;
90 margin: 0;
91 padding: 1em;
92 }
93 nav {
94 width: 100%;
95 background-color: #B6E2FF;
96 box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.3) inset, 0px 0px 0px 1px rgba(98, 14, 140, 1) , 0px 0px 3px 1px rgba(0, 0, 0, 0.3);
97 color: hsla(240,1%,73%,.5);
98 color: var(--faint,hsla(240,1%,73%,.5));
99 height: 3.5rem;
100 text-align: center;
101 border-bottom: 3px;
102 border-bottom-color: rgba(98, 14, 140, 1);
103 margin: 0;
104 }
105 nav a {
106 margin: auto;
107 margin-top: 50%;
108 color: rgba(128, 108, 13, 1);
109 text-decoration: none;
110 }
111 </style>
112 <nav style="position: relative;"><a href="/">Mansardo Jamada</a></nav>
113 <div class="our-panel user-profile-placeholder">
114 <div class="our-panel-heading">
115 <div class="title">${TITOLO}</div>
116 </div>
117 <div class="our-panel-body">
118 $ENHAVO
119 </div>
120 </div>
121 </div>
122 <div id=modal></div>
123 <div id=popovers>
124 </body>
125 </html>
126 EOF