annotate src/chat.css @ 35:27c41f22d2a9

improve fixPosts
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 12 Nov 2024 17:17:59 -0700
parents 62d04ca486dd
children 4e82d8f4dfc2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 div[content] {
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 margin-bottom: 0;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 display: flex;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 height: calc(100vh - 32px);
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 }
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 div[chats] {
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 overflow-y: auto;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 }
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 div[chats] > div {
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 margin-top: 2px;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 margin-bottom: 2px;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 padding-top: 16px;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 padding-bottom: 16px;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 padding-left: 8px;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 padding-right: 8px;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18 border-radius: 4px;
11
563a5358f2ee add delete_chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 10
diff changeset
19 cursor: pointer;
10
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20 }
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22 div[chats] > div:hover,
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23 div[chats] > div[selected] {
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24 background-color: LightBlue;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25 }
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27 div[posts] {
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
28 width: 100%;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
29 display: flex;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
30 flex-direction: column;
34
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
31 justify-content: space-between;
10
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
32 }
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
33
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
34 div[posts] > * {
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
35 padding-right: 3vw;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
36 }
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
37
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
38 div[top] {
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
39 display: flex;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
40 justify-content: space-between;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
41 align-items: center;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
42 }
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
43
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
44 div[main] {
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
45 overflow-y: auto;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
46 }
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
47
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
48 div[post] {
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
49 margin-top: 16px;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
50 margin-bottom: 16px;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
51 }
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
52
34
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
53 [intro] {
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
54 text-align: center;
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
55 }
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
56
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
57 div[who] {
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
58 display: flex;
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
59 justify-content: space-between;
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
60 }
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
61
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
62 span[right] {
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
63 font-size: 12px;
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
64 color: grey;
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
65 }
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
66
22
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
67 span[pulldown] {
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
68 position: relative;
35
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
69 width: 16px;
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
70 display: inline-block;
22
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
71 }
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
72
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
73 span[pulldown] > div {
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
74 display: none;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
75 top: 0;
34
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
76 right: 100%;
22
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
77 z-index: 2;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
78 position: absolute;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
79 border: 1px solid #cccccc;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
80 border-radius: 4px;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
81 text-align: left;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
82 background-color: #eeeeee;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
83 padding: 5px 0;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
84 }
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
85
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
86 span[pulldown] > div > span {
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
87 white-space: nowrap;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
88 display: block;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
89 padding: 3px 16px;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
90 xcolor: #333333;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
91 cursor: pointer;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
92 }
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
93
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
94 span[pulldown] > div > span:hover {
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
95 color: #ffffff;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
96 background-color: #428bca;
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
97 }
949914955bfe add menu
Franklin Schmidt <fschmidt@gmail.com>
parents: 11
diff changeset
98
10
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
99 div[text] {
34
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
100 white-space: pre-wrap;
10
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
101 }
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
102
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
103 div[input] {
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
104 padding-top: 1em;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
105 padding-bottom: 1em;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
106 display: flex;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
107 gap: 8px;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
108 align-items: flex-end;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
109 }
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
110
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
111 div[input] textarea {
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
112 flex-grow: 1;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
113 max-height: 150px;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
114 resize: none;
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
115 }
24
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
116
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
117 dialog textarea {
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
118 width: 600px;
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
119 max-width: 80vw;
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 22
diff changeset
120 }
27
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
121
33
e2b7f6393dab add online
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
122 span[online] {
e2b7f6393dab add online
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
123 display: inline-block;
e2b7f6393dab add online
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
124 aspect-ratio: 1;
e2b7f6393dab add online
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
125 background-color: grey;
34
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
126 height: 0.6em;
33
e2b7f6393dab add online
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
127 border-radius: 50%;
e2b7f6393dab add online
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
128 margin-left: 4px;
e2b7f6393dab add online
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
129 }
e2b7f6393dab add online
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
130
27
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
131
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
132 @media (min-width: 700px) {
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
133 div[content] {
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
134 margin-left: calc(3% - 8px);
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
135 margin-right: 0;
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
136 }
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
137
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
138 div[chats] {
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
139 width: 250px;
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
140 padding-right: 8px;
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
141 flex-shrink: 0;
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
142 }
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
143
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
144 div[posts] {
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
145 padding-left: 8px;
34
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
146 border-left: 1px solid grey;
27
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
147 }
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
148
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
149 div[top] img {
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
150 display: none;
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
151 }
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
152 }
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
153
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
154 @media (max-width: 699px) {
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
155 div[content][show="chats"] div[posts],
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
156 div[content][show="posts"] div[chats] {
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
157 display: none;
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
158 }
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
159
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
160 div[chats] {
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
161 width: 100%;
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
162 }
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
163
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
164 div[content][show="posts"] {
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
165 margin-right: 0;
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
166 }
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
167
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
168 div[top] h3 {
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
169 display: flex;
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
170 gap: 6px;
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
171 }
809193524522 responsive
Franklin Schmidt <fschmidt@gmail.com>
parents: 24
diff changeset
172 }