Skip to content

Commit

Permalink
Some ui improvements with coloring and bold texts (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan authored Apr 15, 2024
1 parent 7667606 commit dd45c7c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion upsonic_on_prem/dash/app/api_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def transform_to_html_bold(text):
content = text[start_idx + 2:end_idx]

# Replace content with HTML <b> tags
text = text[:start_idx] + '<br><br><b>' + content + '</b><br>' + text[end_idx + 2:]
text = text[:start_idx] + '<br><br><b class="custom_code_highlight_green">' + content + '</b><br>' + text[end_idx + 2:]

# Find the next occurrence
start_idx = text.find('**', end_idx + 2)
Expand Down
6 changes: 2 additions & 4 deletions upsonic_on_prem/dash/app/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@

<div>
<div class="custom_page_header_top_bottom_margin">
<span class="custom_page_header_text">Connection Code</span>
<span class="custom_page_header_text"><span class="custom_page_header_text_bold">Connection</span> Code</span>
</div>


<div class="custom_code_block">
<div class="custom_code_block_code">
<div class="highlight"><pre class="chroma"><code class="language-html" data-lang="html">
{{the_connection_code}}
</code></pre></div>
<div class="highlight"><pre class="chroma"><code class="language-html" data-lang="html"><span class="">{{the_connection_code}}</span></code></pre></div>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@
<div class="highlight">
<pre class="chroma" style="text-wrap: wrap;">
<code class="language-html" data-lang="html">
<b>Importing:</b>
<b class="custom_code_highlight_green">Importing:</b>
{{code}}

{{readme|safe}}

<b>Content:</b>
<b class="custom_code_highlight_green">Content:</b>
{% for key,value in all_scopes%}
<b>{{key}}</b>: {{value|safe}}<br>
{% endfor %}
Expand Down
6 changes: 2 additions & 4 deletions upsonic_on_prem/dash/app/templates/libraries/libraries.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@

<div>
<div class="custom_page_header_bottom_margin">
<span class="custom_page_header_text">Connection Code</span>
<span class="custom_page_header_text"><span class="custom_page_header_text_bold">Connection</span> Code</span>
</div>


<div class="custom_code_block">
<div class="custom_code_block_code">
<div class="highlight"><pre class="chroma"><code class="language-html" data-lang="html">
{{the_connection_code}}
</code></pre></div>
<div class="highlight"><pre class="chroma"><code class="language-html" data-lang="html"><span class="">{{the_connection_code}}</span></code></pre></div>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion upsonic_on_prem/utils/ai/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def generate_readme(self, top_library, summary_list):

usage_aim = self.default_completion(prompt)

result = "<b>Explanation:</b><br>" + summary + "\n\n<b>Use Case:</b><br>" + usage_aim
result = '<b class="custom_code_highlight_green">Explanation:</b><br>' + summary + '\n\n<b class="custom_code_highlight_green">Use Case:</b><br>' + usage_aim

return result

Expand Down

0 comments on commit dd45c7c

Please sign in to comment.