Skip to content

Commit cd843da

Browse files
authored
Merge pull request #23 from DefangLabs/linda-logo-styling
Add logo + styling
2 parents d4c7d78 + 7c2ab85 commit cd843da

File tree

4 files changed

+57
-5
lines changed

4 files changed

+57
-5
lines changed

app/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from flask import Flask, request, jsonify, render_template, Response, stream_with_context
22
from rag_system import rag_system
33
import subprocess
4-
app = Flask(__name__)
4+
app = Flask(__name__, static_folder='templates/images')
55

66
@app.route('/', methods=['GET', 'POST'])
77
def index():
Lines changed: 1 addition & 0 deletions
Loading
2.37 KB
Loading

app/templates/index.html

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>Ask Defang</title>
77
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/4.0.2/marked.min.js"></script>
8+
<style>
9+
@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100..900;1,100..900&display=swap');
10+
</style>
811
<style>
912
body {
10-
font-family: 'Helvetica Neue', Arial, sans-serif;
13+
font-family: 'Exo 2', 'Helvetica Neue', Arial, sans-serif;
1114
margin: 0;
1215
padding: 0;
1316
min-height: 100vh;
@@ -22,6 +25,10 @@
2225
box-sizing: border-box;
2326
}
2427

28+
input, button {
29+
font-family: 'Exo 2', 'Helvetica Neue', Arial, sans-serif;
30+
}
31+
2532
.chat-container {
2633
width: 100%;
2734
max-width: 600px;
@@ -32,9 +39,22 @@
3239
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
3340
}
3441

42+
.img-container {
43+
height: 2em;
44+
display: flex;
45+
justify-content: center;
46+
align-items: center;
47+
width: 100%;
48+
}
49+
50+
.icon {
51+
height: 2.5em;
52+
}
53+
3554
h2 {
3655
text-align: center;
3756
color: #fff;
57+
margin-top: 10px;
3858
margin-bottom: 20px;
3959
font-weight: 300;
4060
font-size: 1.5rem;
@@ -84,7 +104,7 @@
84104
.submit-btn {
85105
padding: 10px 20px;
86106
border: none;
87-
background-color: #636ded;
107+
background-color: #4491fd;
88108
color: white;
89109
cursor: pointer;
90110
border-radius: 5px;
@@ -98,10 +118,26 @@
98118
}
99119

100120
.submit-btn:hover {
101-
background-color: #5a66d6;
121+
background-color: #3b7edc;
102122
transform: translateY(-2px);
103123
}
104124

125+
.issue-container {
126+
display: flex;
127+
align-items: center;
128+
justify-content: center;
129+
padding-top: 10px;
130+
}
131+
132+
.issue-container p {
133+
margin: 10px;
134+
}
135+
136+
.issue-container a:visited, a:hover, a:active, a:focus {
137+
color: white;
138+
text-decoration: none !important;
139+
}
140+
105141
.loading-spinner {
106142
display: none;
107143
margin-left: 10px;
@@ -134,13 +170,28 @@
134170
</head>
135171
<body>
136172
<div class="chat-container">
173+
<div class="img-container">
174+
<a href="https://defang.io/" target="_parent">
175+
<img class="icon" src="{{ url_for('static', filename='defang_icon.svg') }}" alt="defang_icon"/>
176+
</a>
177+
</div>
137178
<h2>Ask Defang</h2>
138179
<div id="chat-box" class="chat-box"></div>
139-
<input type="text" id="query-input" class="input-box" placeholder="Ask a question...">
180+
<input type="text" autofocus="autofocus" id="query-input" class="input-box" placeholder="Ask a question...">
140181
<button id="send-button" class="submit-btn">
141182
Send
142183
<div id="loading-spinner" class="loading-spinner"></div>
143184
</button>
185+
<div class="issue-container">
186+
<a href="https://github.com/DefangLabs/docs-chatbot/issues" target="_blank">
187+
<img class="icon" style="height: 1.5em" src="{{ url_for('static', filename='github_icon.svg') }}" alt="github_icon"/>
188+
</a>
189+
<p>
190+
<a href="https://github.com/DefangLabs/docs-chatbot/issues" target="_blank">
191+
Report an issue
192+
</a>
193+
</p>
194+
</div>
144195
</div>
145196

146197
<script>

0 commit comments

Comments
 (0)