Logo center fix

This commit is contained in:
somebody
2022-11-23 14:10:41 -06:00
parent abc7624318
commit a13228e05b
3 changed files with 23 additions and 13 deletions

View File

@@ -616,13 +616,14 @@ class model_settings(settings):
self.oaiapikey = "" # API key to use for OpenAI API calls self.oaiapikey = "" # API key to use for OpenAI API calls
self.configname = None self.configname = None
self.online_model = '' self.online_model = ''
self.welcome_default = """ <img id='welcome-logo' src='static/Welcome_Logo.png' draggable='False'> self.welcome_default = """<style>#welcome_container { display: block; } #welcome_text { display: flex; height: 100%; } .welcome_text { align-self: flex-end; }</style>
<div class='welcome_text'> <div id='welcome-logo-container'><img id='welcome-logo' src='static/Welcome_Logo.png' draggable='False'></div>
<div id="welcome-text-content">Please load a model from the left.<br/> <div class='welcome_text'>
If you encounter any issues, please click the Download debug dump link in the Home tab on the left flyout and attach the downloaded file to your error report on <a href='https://github.com/ebolam/KoboldAI/issues'>Github</a>, <a href='https://www.reddit.com/r/KoboldAI/'>Reddit</a>, or <a href='https://discord.gg/XuQWadgU9k'>Discord</a>. <div id="welcome-text-content">Please load a model from the left.<br/>
A redacted version (without story text) is available. If you encounter any issues, please click the Download debug dump link in the Home tab on the left flyout and attach the downloaded file to your error report on <a href='https://github.com/ebolam/KoboldAI/issues'>Github</a>, <a href='https://www.reddit.com/r/KoboldAI/'>Reddit</a>, or <a href='https://discord.gg/XuQWadgU9k'>Discord</a>.
</div> A redacted version (without story text) is available.
</div>""" # Custom Welcome Text </div>
</div>""" # Custom Welcome Text
self.welcome = self.welcome_default self.welcome = self.welcome_default
self.koboldai_vars = koboldai_vars self.koboldai_vars = koboldai_vars

View File

@@ -1231,6 +1231,7 @@ body {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: calc((1em*var(--game_screen_font_size_adjustment)) + var(--font_size_adjustment)); font-size: calc((1em*var(--game_screen_font_size_adjustment)) + var(--font_size_adjustment));
line-height: 1.42857143; line-height: 1.42857143;
position: relative;
} }
#story_prompt[story_prompt_in_ai="true"] { #story_prompt[story_prompt_in_ai="true"] {
@@ -2433,16 +2434,20 @@ body {
} }
#welcome-logo { #welcome-logo {
position: absolute;
top: 50%;
margin-top: -50px;
left: 50%;
transform: translate(-50%, -50%);
width: 50%; width: 50%;
max-width: 720px; max-width: 720px;
filter: drop-shadow(5px 5px 5px #222); filter: drop-shadow(5px 5px 5px #222);
} }
#welcome-logo-container {
width: 100%;
height: 100%;
position: absolute;
display: flex;
justify-content: center;
align-items: center;
}
#welcome-text-content { #welcome-text-content {
display: inline-block; display: inline-block;
align-self: flex-end; align-self: flex-end;

View File

@@ -47,7 +47,11 @@
<!------------ Game Text Screen---------------------> <!------------ Game Text Screen--------------------->
<div class="gamescreen" id="gamescreen"> <div class="gamescreen" id="gamescreen">
<div id="disconnect_message"><center><h1>Disconnected</h1></center></div> <div id="disconnect_message"><center><h1>Disconnected</h1></center></div>
<div id="welcome_container" class="welcome_container"><div id="welcome_text" class="var_sync_model_welcome" draggable="False"></div></div>
<div id="welcome_container" class="welcome_container">
<div id="welcome_text" class="var_sync_model_welcome" draggable="False"></div>
</div>
<div class="gametext" id="Selected Text" contenteditable=false onblur="select_game_text(null);" onclick="select_game_text(null);" onkeyup="select_game_text(event);"> <div class="gametext" id="Selected Text" contenteditable=false onblur="select_game_text(null);" onclick="select_game_text(null);" onkeyup="select_game_text(event);">
<span id="story_prompt" class="var_sync_story_prompt var_sync_alt_story_prompt_in_ai rawtext hidden" chunk="-1"></span></div><!--don't move the /div down or it'll cause odd spacing issues in the UI---> <span id="story_prompt" class="var_sync_story_prompt var_sync_alt_story_prompt_in_ai rawtext hidden" chunk="-1"></span></div><!--don't move the /div down or it'll cause odd spacing issues in the UI--->
</div> </div>