Skip to content

Commit 4146ac4

Browse files
authored
Merge pull request oobabooga#266 from HideLord/main
Adding markdown support and slight refactoring.
2 parents 1413931 + 29b7c5a commit 4146ac4

File tree

9 files changed

+287
-302
lines changed

9 files changed

+287
-302
lines changed

css/chat.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.h-\[40vh\], .wrap.svelte-byatnx.svelte-byatnx.svelte-byatnx {
2+
height: 66.67vh
3+
}
4+
.gradio-container {
5+
max-width: 800px !important;
6+
margin-left: auto !important;
7+
margin-right: auto !important;
8+
}
9+
.w-screen {
10+
width: unset
11+
}
12+
div.svelte-362y77>*, div.svelte-362y77>.form>* {
13+
flex-wrap: nowrap
14+
}
15+
/* fixes the API documentation in chat mode */
16+
.api-docs.svelte-1iguv9h.svelte-1iguv9h.svelte-1iguv9h {
17+
display: grid;
18+
}
19+
.pending.svelte-1ed2p3z {
20+
opacity: 1;
21+
}
22+

css/html_4chan_style.css

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#parent #container {
2+
background-color: #eef2ff;
3+
padding: 17px;
4+
}
5+
#parent #container .reply {
6+
background-color: rgb(214, 218, 240);
7+
border-bottom-color: rgb(183, 197, 217);
8+
border-bottom-style: solid;
9+
border-bottom-width: 1px;
10+
border-image-outset: 0;
11+
border-image-repeat: stretch;
12+
border-image-slice: 100%;
13+
border-image-source: none;
14+
border-image-width: 1;
15+
border-left-color: rgb(0, 0, 0);
16+
border-left-style: none;
17+
border-left-width: 0px;
18+
border-right-color: rgb(183, 197, 217);
19+
border-right-style: solid;
20+
border-right-width: 1px;
21+
border-top-color: rgb(0, 0, 0);
22+
border-top-style: none;
23+
border-top-width: 0px;
24+
color: rgb(0, 0, 0);
25+
display: table;
26+
font-family: arial, helvetica, sans-serif;
27+
font-size: 13.3333px;
28+
margin-bottom: 4px;
29+
margin-left: 0px;
30+
margin-right: 0px;
31+
margin-top: 4px;
32+
overflow-x: hidden;
33+
overflow-y: hidden;
34+
padding-bottom: 4px;
35+
padding-left: 2px;
36+
padding-right: 2px;
37+
padding-top: 4px;
38+
}
39+
40+
#parent #container .number {
41+
color: rgb(0, 0, 0);
42+
font-family: arial, helvetica, sans-serif;
43+
font-size: 13.3333px;
44+
width: 342.65px;
45+
margin-right: 7px;
46+
}
47+
48+
#parent #container .op {
49+
color: rgb(0, 0, 0);
50+
font-family: arial, helvetica, sans-serif;
51+
font-size: 13.3333px;
52+
margin-bottom: 8px;
53+
margin-left: 0px;
54+
margin-right: 0px;
55+
margin-top: 4px;
56+
overflow-x: hidden;
57+
overflow-y: hidden;
58+
}
59+
60+
#parent #container .op blockquote {
61+
margin-left: 0px !important;
62+
}
63+
64+
#parent #container .name {
65+
color: rgb(17, 119, 67);
66+
font-family: arial, helvetica, sans-serif;
67+
font-size: 13.3333px;
68+
font-weight: 700;
69+
margin-left: 7px;
70+
}
71+
72+
#parent #container .quote {
73+
color: rgb(221, 0, 0);
74+
font-family: arial, helvetica, sans-serif;
75+
font-size: 13.3333px;
76+
text-decoration-color: rgb(221, 0, 0);
77+
text-decoration-line: underline;
78+
text-decoration-style: solid;
79+
text-decoration-thickness: auto;
80+
}
81+
82+
#parent #container .greentext {
83+
color: rgb(120, 153, 34);
84+
font-family: arial, helvetica, sans-serif;
85+
font-size: 13.3333px;
86+
}
87+
88+
#parent #container blockquote {
89+
margin: 0px !important;
90+
margin-block-start: 1em;
91+
margin-block-end: 1em;
92+
margin-inline-start: 40px;
93+
margin-inline-end: 40px;
94+
margin-top: 13.33px !important;
95+
margin-bottom: 13.33px !important;
96+
margin-left: 40px !important;
97+
margin-right: 40px !important;
98+
}
99+
100+
#parent #container .message {
101+
color: black;
102+
border: none;
103+
}

css/html_chat_style.css

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
.chat {
2+
margin-left: auto;
3+
margin-right: auto;
4+
max-width: 800px;
5+
height: 66.67vh;
6+
overflow-y: auto;
7+
padding-right: 20px;
8+
display: flex;
9+
flex-direction: column-reverse;
10+
}
11+
12+
.message {
13+
display: grid;
14+
grid-template-columns: 60px 1fr;
15+
padding-bottom: 25px;
16+
font-size: 15px;
17+
font-family: Helvetica, Arial, sans-serif;
18+
line-height: 1.428571429;
19+
}
20+
21+
.circle-you {
22+
width: 50px;
23+
height: 50px;
24+
background-color: rgb(238, 78, 59);
25+
border-radius: 50%;
26+
}
27+
28+
.circle-bot {
29+
width: 50px;
30+
height: 50px;
31+
background-color: rgb(59, 78, 244);
32+
border-radius: 50%;
33+
}
34+
35+
.circle-bot img,
36+
.circle-you img {
37+
border-radius: 50%;
38+
width: 100%;
39+
height: 100%;
40+
object-fit: cover;
41+
}
42+
43+
.text {}
44+
45+
.text p {
46+
margin-top: 5px;
47+
}
48+
49+
.username {
50+
font-weight: bold;
51+
}
52+
53+
.message-body {}
54+
55+
.message-body img {
56+
max-width: 300px;
57+
max-height: 300px;
58+
border-radius: 20px;
59+
}
60+
61+
.message-body p {
62+
margin-bottom: 0 !important;
63+
font-size: 15px !important;
64+
line-height: 1.428571429 !important;
65+
}
66+
67+
.dark .message-body p em {
68+
color: rgb(138, 138, 138) !important;
69+
}
70+
71+
.message-body p em {
72+
color: rgb(110, 110, 110) !important;
73+
}

css/html_readable_style.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.container {
2+
max-width: 600px;
3+
margin-left: auto;
4+
margin-right: auto;
5+
background-color: rgb(31, 41, 55);
6+
padding:3em;
7+
}
8+
9+
.container p {
10+
font-size: 16px !important;
11+
color: white !important;
12+
margin-bottom: 22px;
13+
line-height: 1.4 !important;
14+
}

css/main.css

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.tabs.svelte-710i53 {
2+
margin-top: 0
3+
}
4+
.py-6 {
5+
padding-top: 2.5rem
6+
}
7+
.dark #refresh-button {
8+
background-color: #ffffff1f;
9+
}
10+
#refresh-button {
11+
flex: none;
12+
margin: 0;
13+
padding: 0;
14+
min-width: 50px;
15+
border: none;
16+
box-shadow: none;
17+
border-radius: 10px;
18+
background-color: #0000000d;
19+
}
20+
#download-label, #upload-label {
21+
min-height: 0
22+
}
23+
#accordion {
24+
}
25+
.dark svg {
26+
fill: white;
27+
}
28+
svg {
29+
display: unset !important;
30+
vertical-align: middle !important;
31+
margin: 5px;
32+
}
33+
ol li p, ul li p {
34+
display: inline-block;
35+
}
36+
#main, #settings, #extensions, #chat-settings {
37+
border: 0;
38+
}
39+

css/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
document.getElementById("main").parentNode.childNodes[0].style = "border: none; background-color: #8080802b; margin-bottom: 40px"
2+
document.getElementById("main").parentNode.style = "padding: 0; margin: 0"
3+
document.getElementById("main").parentNode.parentNode.parentNode.style = "padding: 0"

0 commit comments

Comments
 (0)