mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Add cai-chat-square chat style
This commit is contained in:
parent
3d1c0f173d
commit
a3ecf3bb65
19
css/chat_style-cai-chat-square.css
Normal file
19
css/chat_style-cai-chat-square.css
Normal file
@ -0,0 +1,19 @@
|
||||
@import url("file/css/chat_style-cai-chat.css");
|
||||
|
||||
.circle-bot, .circle-you {
|
||||
height: 75px;
|
||||
border-radius: 8.333px;
|
||||
background-color: #656565;
|
||||
}
|
||||
|
||||
.circle-bot img, .circle-you img {
|
||||
border-radius: 8.333px;
|
||||
}
|
||||
|
||||
.circle-you {
|
||||
background-color: #656565;
|
||||
}
|
||||
|
||||
.message {
|
||||
padding-bottom: 30px;
|
||||
}
|
@ -51,6 +51,7 @@
|
||||
|
||||
.dark .message-body p em {
|
||||
color: rgb(138, 138, 138) !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.message-body p em {
|
||||
|
@ -25,6 +25,16 @@ chat_styles = {}
|
||||
for k in get_available_chat_styles():
|
||||
chat_styles[k] = open(Path(f'css/chat_style-{k}.css'), 'r').read()
|
||||
|
||||
# Handle styles that derive from other styles
|
||||
for k in chat_styles:
|
||||
lines = chat_styles[k].split('\n')
|
||||
input_string = lines[0]
|
||||
match = re.search(r'chat_style-([a-z\-]*)\.css', input_string)
|
||||
|
||||
if match:
|
||||
style = match.group(1)
|
||||
chat_styles[k] = chat_styles.get(style, '') + '\n\n' + '\n'.join(lines[1:])
|
||||
|
||||
|
||||
def fix_newlines(string):
|
||||
string = string.replace('\n', '\n\n')
|
||||
|
Loading…
Reference in New Issue
Block a user