From d0af4a5eebd9d5f4838ecc2d4b1b036d0d8823da Mon Sep 17 00:00:00 2001 From: sageTheDM Date: Mon, 16 Sep 2024 16:08:00 +0200 Subject: [PATCH] Added a header to index --- py/static/img/logo.png | Bin 0 -> 6771 bytes py/static/styles.css | 42 ++++++++- py/templates/contact.html | 13 +++ py/templates/faq.html | 0 py/templates/index.html | 187 ++++++++++++++++++++------------------ py/voice_recognition.py | 1 - 6 files changed, 153 insertions(+), 90 deletions(-) create mode 100644 py/static/img/logo.png create mode 100644 py/templates/contact.html create mode 100644 py/templates/faq.html diff --git a/py/static/img/logo.png b/py/static/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..00332a49ebd7ca359e0d7098e30fa3603d814d13 GIT binary patch literal 6771 zcmZ8`Wl$7g7cNS(gdhzPQW8r_NJ%3gjl{yzu?k2_hjb$y0;F^l@c$uq!vEHP`Twu_U)ukW{|f(gzo;a6b(fLD z*GSJ8?|X^pg99a{i0^3I2OP@>5olXa1JRP@4;%^RlfG>ogoM!a(uK)6l#~~u?gOf(H<3l6#m7CET zcbJex&hAGRxZ?i)KK7Oy(!lSL(WsP*quTlB-nqDQ&Z8fgS$-NCxTKehOOy<>WC;3Y z*WUSCJ@DT?`9_;nxDn5TW^HLJkL<%@8;J?b#)VJNF5Fey2?w`cP798y#f=*mMWs-k z=9{eQH1-Nvmkk}q9nFYZSbqCL`z#;!INTdMy>S5ude2xh#qSJYgu_F6H`>{BnWIXh zj5I87U*!LL=@pt=jk^eOcH{|+?tM_Z!0!uA*n5VLvsP*QI&s{nNe0dp5$BfW2jTqL zJ==uA&uQ-A!by3O2!AP%?YFyO@cOOwN!9;R&+D-bdx8@goRU8($+l-%7G9O2Ca4K}Xg8aV{oMfNf5zX>y)@RDiT!#E&$l6_R z$A0_SEENH#n)uZwgJ)%MW)Bf2U#f(juX+1vKzTp8W9)t2JH7JxHRK7-=>1bREJ)vl z?-r;C#d*`li#Remy$aK%%nPWk#o5!wC%P;JCDakm@r(8E-?=MP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7 z_HT^m_h1!%nb)=e5hg-WK(t_TuWlY^-h=B}CT~^tdy5d>s{02^A*JBDd%)Ch{(Kl3 zRJ7<>pGk7Y>@1;$$;yr z8FV{!aFRC{ju(WANFT-sZ_xgXQ;!xj&mhOioSYFA;CD^QdF+Fb#cKN!cIl>C_}di> zhCNi`F9OfvWjblEYa(E^Ic0GL!Vj35G>B4@1hRvxgP&B2Z;?h{Vs;N5sMszE;{HBf zw0+dX-S=914M!b*oaQvNgKnp~PTht4EMz9vy!ILlSxC8rL2J8kSyI3L9UBA{q;0T= z<&o&-!o1qT3saucdzH(st+HvZiQBA+xVw@xG=-t8p+suj2+XskvnEB z$_o`)n`=X(hE(k0YTGe!LvQ@7gEUJ8-2|S~qJyr(k`D1twJk5Vy!~v%{>F-{-KvI% z-j*x*RScPlBpT+Evx7WVRv=(#>9A5AXy-@tN5_CFHf@9|K=*Uv$=i_a)3b!~-^d)Nw zA}znVQ^0)x$QBrU!EL;&QZ3F1`TD_)L<_c>hl`|lLs2&LX5AOCWWy?yi!;kCx4M_& z;!g;!O|%YT`X2Oe9*|oN{iQa3{HM5NNd4%-;S273uDsq#SgTI|f`{+6P%u|eCG$3H z_3w_t`8r~Vu5R$!*z-1NajwN-!`tF0==Nv=houhQyAHnS^k={84fL`|zICtN^qRdO Y3!mo02(t3-p9W7$T~Do6#WwQ)0I`SxYXATM literal 0 HcmV?d00001 diff --git a/py/static/styles.css b/py/static/styles.css index 399202a..42a29bc 100644 --- a/py/static/styles.css +++ b/py/static/styles.css @@ -1,6 +1,6 @@ /* Color Variables */ :root { - --background-color: black; + --background-color: white; --text-color: white; --font-family: Arial, sans-serif; --history-background-color: rgb(0, 0, 48); @@ -23,13 +23,14 @@ padding: 0; box-sizing: border-box; } -/* Disable Scrolling */ + html, body { height: 100vh; overflow: hidden; /* Prevent scrolling */ } /* Body Styling */ body { + margin-top: 1em; display: flex; justify-content: center; align-items: center; @@ -37,6 +38,41 @@ body { color: var(--text-color); font-family: var(--font-family); } + +header { + background-color: var(--background-color); /* Use the background color variable */ + color: black; /* Use the text color variable */ + width: 100%; + text-decoration: none; + position: fixed; + top: 0; + left: 0; + padding: 10px 20px; /* Add some padding for spacing */ + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */ + z-index: 1000; /* Ensure the header is above other content */ + font-family: var(--font-family); /* Use the font family variable */ +} + +header li { + display: inline-block; + margin: 0 15px; /* Add spacing between list items */ +} + +header img { + height: 2em; + vertical-align: middle; /* Align image with text */ +} + +header a { + color: black; /* Ensure links are white */ + text-decoration: none; /* Remove underline from links */ + transition: color 0.3s; /* Smooth transition for hover effect */ +} + +header a:hover { + color: var(--input-button-color); /* Change color on hover for better interaction */ +} + /* Container Grid Layout */ .container { display: grid; @@ -70,7 +106,7 @@ body { text-decoration: none; color: white; width: 100%; - padding: 5px; + padding: 5px; } .history ul li a:hover{ diff --git a/py/templates/contact.html b/py/templates/contact.html new file mode 100644 index 0000000..a323ebc --- /dev/null +++ b/py/templates/contact.html @@ -0,0 +1,13 @@ + + + + + + + + AI Assistant + + + + + \ No newline at end of file diff --git a/py/templates/faq.html b/py/templates/faq.html new file mode 100644 index 0000000..e69de29 diff --git a/py/templates/index.html b/py/templates/index.html index 3425d0a..38514f1 100644 --- a/py/templates/index.html +++ b/py/templates/index.html @@ -1,93 +1,108 @@ - - + + - - - - - AI Assistant - + + + + + AI Assistant + - - -
- - - - - -
-
-

Different AI models

-
-
- -
-

Code

-
-
-
-

Math

-
-
-
-

Language

-
-
-
-

Default

-
-
-
-

Custom

-
-
-
-
+ + +
- -
-
- {% for message in messages %} - {% if message.startswith('User:') %} -
{{ message }}
- {% else %} -
{{ message }}
- {% endif %} - {% endfor %} + + -
- - -
- - - -
-
- - + +
+
+

Different AI models

+
+
+ +
+

Code

+
+
+
+

Math

+
+
+
+

Language

+
+
+
+

Default

+
+
+
+

Custom

+
+
+
+
+ + +
+
+ {% for message in messages %} + {% if message.startswith('User:') %} +
{{ message }}
+ {% else %} +
{{ message }}
+ {% endif %} + {% endfor %} +
+
+ + +
+ + + +
+
+ + + diff --git a/py/voice_recognition.py b/py/voice_recognition.py index 0ee41d0..965082a 100644 --- a/py/voice_recognition.py +++ b/py/voice_recognition.py @@ -28,6 +28,5 @@ class Voice: except Exception as e: text = "ERROR" return text - print(listen()) -- 2.39.5