diff --git a/css/chat_style-cai-chat-square.css b/css/chat_style-cai-chat-square.css new file mode 100644 index 00000000..0d64524e --- /dev/null +++ b/css/chat_style-cai-chat-square.css @@ -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; +} diff --git a/css/chat_style-cai-chat.css b/css/chat_style-cai-chat.css index a1f73b00..6aa088dc 100644 --- a/css/chat_style-cai-chat.css +++ b/css/chat_style-cai-chat.css @@ -51,6 +51,7 @@ .dark .message-body p em { color: rgb(138, 138, 138) !important; + font-weight: 500; } .message-body p em { diff --git a/modules/html_generator.py b/modules/html_generator.py index c2e622e7..f31bdcac 100644 --- a/modules/html_generator.py +++ b/modules/html_generator.py @@ -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')