Spaces:
Configuration error
Configuration error
Commit
·
5ac078a
1
Parent(s):
227007c
Frontend Changes Style 🔥
Browse files
frontend/src/components/Navagation/navbar.js
CHANGED
|
@@ -180,8 +180,9 @@ export default class Navbar extends Component{
|
|
| 180 |
}else{
|
| 181 |
//append new colours
|
| 182 |
for(var i =0; i < d; i++){
|
| 183 |
-
|
| 184 |
-
|
|
|
|
| 185 |
}
|
| 186 |
this.setState({open : this.state.open, menu : e, text: this.state.text, name: this.state.name, colour : [...this.state.colour, ...c], emoji : [...this.state.emoji, ...j], error : this.state.error, modal : this.state.modal })
|
| 187 |
}
|
|
@@ -191,7 +192,7 @@ export default class Navbar extends Component{
|
|
| 191 |
* Append a new colour, and emoji to the colour and emoji list with in the state of the component
|
| 192 |
*/
|
| 193 |
appendTabs = () => {
|
| 194 |
-
this.setState({open : this.state.open, menu : this.state.menu, text: this.state.text, name: this.state.name, colour : [...this.state.colour, random_colour] , emoji : [...this.state.emoji, random_emoji], error : this.state.error, modal : this.state.modal })
|
| 195 |
}
|
| 196 |
|
| 197 |
/**
|
|
@@ -221,10 +222,10 @@ export default class Navbar extends Component{
|
|
| 221 |
return(<>
|
| 222 |
<li key={`${item.name}-${item.port}`} onDragStart={(event) => this.onDragStart(event, 'custom', item, index)}
|
| 223 |
className={` text-white text-md flex text-center items-center cursor-grab shadow-lg
|
| 224 |
-
p-5 px-2 mt-4 rounded-md ${ this.state.open ? `hover:animate-pulse ${this.state.colour[index] === null ? "" : this.state.colour[index]} ` : `hidden`} `} draggable>
|
| 225 |
|
| 226 |
-
<span className="
|
| 227 |
-
<
|
| 228 |
|
| 229 |
</li >
|
| 230 |
|
|
@@ -287,6 +288,7 @@ export default class Navbar extends Component{
|
|
| 287 |
onChange={(e) => {
|
| 288 |
this.updateText(e, "name")
|
| 289 |
}}
|
|
|
|
| 290 |
/>
|
| 291 |
</label>
|
| 292 |
</div>
|
|
|
|
| 180 |
}else{
|
| 181 |
//append new colours
|
| 182 |
for(var i =0; i < d; i++){
|
| 183 |
+
c.push(random_colour(i === 0 ? null : c[i-1]));
|
| 184 |
+
j.push(random_emoji(i === 0 ? null : c[i-1]));
|
| 185 |
+
|
| 186 |
}
|
| 187 |
this.setState({open : this.state.open, menu : e, text: this.state.text, name: this.state.name, colour : [...this.state.colour, ...c], emoji : [...this.state.emoji, ...j], error : this.state.error, modal : this.state.modal })
|
| 188 |
}
|
|
|
|
| 192 |
* Append a new colour, and emoji to the colour and emoji list with in the state of the component
|
| 193 |
*/
|
| 194 |
appendTabs = () => {
|
| 195 |
+
this.setState({open : this.state.open, menu : this.state.menu, text: this.state.text, name: this.state.name, colour : [...this.state.colour, random_colour(this.state.colour[this.state.colour.length - 1] )] , emoji : [...this.state.emoji, random_emoji(this.state.emoji[this.state.emoji.length - 1] )], error : this.state.error, modal : this.state.modal })
|
| 196 |
}
|
| 197 |
|
| 198 |
/**
|
|
|
|
| 222 |
return(<>
|
| 223 |
<li key={`${item.name}-${item.port}`} onDragStart={(event) => this.onDragStart(event, 'custom', item, index)}
|
| 224 |
className={` text-white text-md flex text-center items-center cursor-grab shadow-lg
|
| 225 |
+
p-5 px-2 mt-4 rounded-md ${ this.state.open ? `hover:animate-pulse ${this.state.colour[index] === null ? "" : this.state.colour[index]} ` : `hidden`} break-all -z-20`} draggable>
|
| 226 |
|
| 227 |
+
<span className=" absolute text-4xl opacity-70 left-[39.15%] z-10">{`${this.state.emoji[index] === null ? "" : this.state.emoji[index]}`}</span>
|
| 228 |
+
<span className={` text-base flex-1 font-bold z-20 ${this.state.open ? "" : "hidden"}`}>{`${item.name}`}</span>
|
| 229 |
|
| 230 |
</li >
|
| 231 |
|
|
|
|
| 288 |
onChange={(e) => {
|
| 289 |
this.updateText(e, "name")
|
| 290 |
}}
|
| 291 |
+
autoComplete='off'
|
| 292 |
/>
|
| 293 |
</label>
|
| 294 |
</div>
|
frontend/src/css/dist/output.css
CHANGED
|
@@ -596,6 +596,10 @@ video {
|
|
| 596 |
bottom: 0px;
|
| 597 |
}
|
| 598 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 599 |
.-right-3 {
|
| 600 |
right: -0.75rem;
|
| 601 |
}
|
|
@@ -624,12 +628,16 @@ video {
|
|
| 624 |
right: 1.25rem;
|
| 625 |
}
|
| 626 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 627 |
.z-10 {
|
| 628 |
z-index: 10;
|
| 629 |
}
|
| 630 |
|
| 631 |
-
|
| 632 |
-
z-index:
|
| 633 |
}
|
| 634 |
|
| 635 |
.-z-10 {
|
|
@@ -692,10 +700,6 @@ video {
|
|
| 692 |
display: none;
|
| 693 |
}
|
| 694 |
|
| 695 |
-
.h-full {
|
| 696 |
-
height: 100%;
|
| 697 |
-
}
|
| 698 |
-
|
| 699 |
.h-screen {
|
| 700 |
height: 100vh;
|
| 701 |
}
|
|
@@ -712,12 +716,12 @@ video {
|
|
| 712 |
height: auto;
|
| 713 |
}
|
| 714 |
|
| 715 |
-
.h
|
| 716 |
-
height:
|
| 717 |
}
|
| 718 |
|
| 719 |
-
.
|
| 720 |
-
|
| 721 |
}
|
| 722 |
|
| 723 |
.w-10 {
|
|
@@ -815,6 +819,10 @@ video {
|
|
| 815 |
overflow: scroll;
|
| 816 |
}
|
| 817 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 818 |
.rounded-md {
|
| 819 |
border-radius: 0.375rem;
|
| 820 |
}
|
|
@@ -1017,6 +1025,12 @@ video {
|
|
| 1017 |
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
| 1018 |
}
|
| 1019 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1020 |
.via-purple-500 {
|
| 1021 |
--tw-gradient-to: rgb(168 85 247 / 0);
|
| 1022 |
--tw-gradient-stops: var(--tw-gradient-from), #a855f7, var(--tw-gradient-to);
|
|
@@ -1109,6 +1123,10 @@ video {
|
|
| 1109 |
--tw-gradient-to: #1565C0;
|
| 1110 |
}
|
| 1111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1112 |
.p-5 {
|
| 1113 |
padding: 1.25rem;
|
| 1114 |
}
|
|
@@ -1194,9 +1212,9 @@ video {
|
|
| 1194 |
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
| 1195 |
}
|
| 1196 |
|
| 1197 |
-
.text-
|
| 1198 |
-
font-size:
|
| 1199 |
-
line-height:
|
| 1200 |
}
|
| 1201 |
|
| 1202 |
.text-base {
|
|
@@ -1214,9 +1232,9 @@ video {
|
|
| 1214 |
line-height: 1.75rem;
|
| 1215 |
}
|
| 1216 |
|
| 1217 |
-
.text-
|
| 1218 |
-
font-size:
|
| 1219 |
-
line-height:
|
| 1220 |
}
|
| 1221 |
|
| 1222 |
.font-bold {
|
|
@@ -1242,14 +1260,6 @@ video {
|
|
| 1242 |
text-decoration-line: underline;
|
| 1243 |
}
|
| 1244 |
|
| 1245 |
-
.opacity-40 {
|
| 1246 |
-
opacity: 0.4;
|
| 1247 |
-
}
|
| 1248 |
-
|
| 1249 |
-
.opacity-60 {
|
| 1250 |
-
opacity: 0.6;
|
| 1251 |
-
}
|
| 1252 |
-
|
| 1253 |
.opacity-70 {
|
| 1254 |
opacity: 0.7;
|
| 1255 |
}
|
|
@@ -1399,6 +1409,24 @@ video {
|
|
| 1399 |
background-color: rgb(38 38 38 / var(--tw-bg-opacity));
|
| 1400 |
}
|
| 1401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1402 |
.dark .dark\:text-white {
|
| 1403 |
--tw-text-opacity: 1;
|
| 1404 |
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
|
|
| 596 |
bottom: 0px;
|
| 597 |
}
|
| 598 |
|
| 599 |
+
.left-\[39\.15\%\] {
|
| 600 |
+
left: 39.15%;
|
| 601 |
+
}
|
| 602 |
+
|
| 603 |
.-right-3 {
|
| 604 |
right: -0.75rem;
|
| 605 |
}
|
|
|
|
| 628 |
right: 1.25rem;
|
| 629 |
}
|
| 630 |
|
| 631 |
+
.-z-20 {
|
| 632 |
+
z-index: -20;
|
| 633 |
+
}
|
| 634 |
+
|
| 635 |
.z-10 {
|
| 636 |
z-index: 10;
|
| 637 |
}
|
| 638 |
|
| 639 |
+
.z-20 {
|
| 640 |
+
z-index: 20;
|
| 641 |
}
|
| 642 |
|
| 643 |
.-z-10 {
|
|
|
|
| 700 |
display: none;
|
| 701 |
}
|
| 702 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 703 |
.h-screen {
|
| 704 |
height: 100vh;
|
| 705 |
}
|
|
|
|
| 716 |
height: auto;
|
| 717 |
}
|
| 718 |
|
| 719 |
+
.h-full {
|
| 720 |
+
height: 100%;
|
| 721 |
}
|
| 722 |
|
| 723 |
+
.h-\[600px\] {
|
| 724 |
+
height: 600px;
|
| 725 |
}
|
| 726 |
|
| 727 |
.w-10 {
|
|
|
|
| 819 |
overflow: scroll;
|
| 820 |
}
|
| 821 |
|
| 822 |
+
.break-all {
|
| 823 |
+
word-break: break-all;
|
| 824 |
+
}
|
| 825 |
+
|
| 826 |
.rounded-md {
|
| 827 |
border-radius: 0.375rem;
|
| 828 |
}
|
|
|
|
| 1025 |
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
| 1026 |
}
|
| 1027 |
|
| 1028 |
+
.from-Entrepreneurial-Lies-Gray {
|
| 1029 |
+
--tw-gradient-from: #8693AB;
|
| 1030 |
+
--tw-gradient-to: rgb(134 147 171 / 0);
|
| 1031 |
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
| 1032 |
+
}
|
| 1033 |
+
|
| 1034 |
.via-purple-500 {
|
| 1035 |
--tw-gradient-to: rgb(168 85 247 / 0);
|
| 1036 |
--tw-gradient-stops: var(--tw-gradient-from), #a855f7, var(--tw-gradient-to);
|
|
|
|
| 1123 |
--tw-gradient-to: #1565C0;
|
| 1124 |
}
|
| 1125 |
|
| 1126 |
+
.to-Entrepreneurial-Lies-Gray {
|
| 1127 |
+
--tw-gradient-to: #8693AB;
|
| 1128 |
+
}
|
| 1129 |
+
|
| 1130 |
.p-5 {
|
| 1131 |
padding: 1.25rem;
|
| 1132 |
}
|
|
|
|
| 1212 |
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
| 1213 |
}
|
| 1214 |
|
| 1215 |
+
.text-4xl {
|
| 1216 |
+
font-size: 2.25rem;
|
| 1217 |
+
line-height: 2.5rem;
|
| 1218 |
}
|
| 1219 |
|
| 1220 |
.text-base {
|
|
|
|
| 1232 |
line-height: 1.75rem;
|
| 1233 |
}
|
| 1234 |
|
| 1235 |
+
.text-2xl {
|
| 1236 |
+
font-size: 1.5rem;
|
| 1237 |
+
line-height: 2rem;
|
| 1238 |
}
|
| 1239 |
|
| 1240 |
.font-bold {
|
|
|
|
| 1260 |
text-decoration-line: underline;
|
| 1261 |
}
|
| 1262 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1263 |
.opacity-70 {
|
| 1264 |
opacity: 0.7;
|
| 1265 |
}
|
|
|
|
| 1409 |
background-color: rgb(38 38 38 / var(--tw-bg-opacity));
|
| 1410 |
}
|
| 1411 |
|
| 1412 |
+
.dark .dark\:bg-gradient-to-bl {
|
| 1413 |
+
background-image: linear-gradient(to bottom left, var(--tw-gradient-stops));
|
| 1414 |
+
}
|
| 1415 |
+
|
| 1416 |
+
.dark .dark\:from-Entrepreneurial-Lies-Gray {
|
| 1417 |
+
--tw-gradient-from: #8693AB;
|
| 1418 |
+
--tw-gradient-to: rgb(134 147 171 / 0);
|
| 1419 |
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
| 1420 |
+
}
|
| 1421 |
+
|
| 1422 |
+
.dark .dark\:to-Entrepreneurial-Lies-Gray {
|
| 1423 |
+
--tw-gradient-to: #8693AB;
|
| 1424 |
+
}
|
| 1425 |
+
|
| 1426 |
+
.dark .dark\:to-Entrepreneurial-Lies-White {
|
| 1427 |
+
--tw-gradient-to: #BDD4E7;
|
| 1428 |
+
}
|
| 1429 |
+
|
| 1430 |
.dark .dark\:text-white {
|
| 1431 |
--tw-text-opacity: 1;
|
| 1432 |
color: rgb(255 255 255 / var(--tw-text-opacity));
|
frontend/src/helper/visual.js
CHANGED
|
@@ -15,7 +15,7 @@ const colour_map = [
|
|
| 15 |
'bg-gradient-to-bl from-Green-Black via-Green-Forest to-Green-Emerald',
|
| 16 |
'bg-gradient-to-bl from-Amethyst-Light to-Amethyst-Dark',
|
| 17 |
'bg-gradient-to-bl from-Peach-Red to-Peach-Yello',
|
| 18 |
-
'bg-gradient-to-bl from-Deep-Space-Black to-Deep-Space-Gray',
|
| 19 |
'bg-gradient-to-bl from-Sunshine-Red to-Sunshine-Blue'
|
| 20 |
]
|
| 21 |
|
|
@@ -23,16 +23,24 @@ const colour_map = [
|
|
| 23 |
* Get a random emoji from emote array
|
| 24 |
* @returns random emoji from emote array
|
| 25 |
*/
|
| 26 |
-
export const random_emoji = () =>{
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
}
|
| 29 |
|
| 30 |
/**
|
| 31 |
* Get a random color string from colour_map array
|
| 32 |
* @returns random color css string
|
| 33 |
*/
|
| 34 |
-
export const random_colour = () => {
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
|
|
|
|
| 15 |
'bg-gradient-to-bl from-Green-Black via-Green-Forest to-Green-Emerald',
|
| 16 |
'bg-gradient-to-bl from-Amethyst-Light to-Amethyst-Dark',
|
| 17 |
'bg-gradient-to-bl from-Peach-Red to-Peach-Yello',
|
| 18 |
+
'bg-gradient-to-bl from-Deep-Space-Black to-Deep-Space-Gray dark:bg-gradient-to-bl dark:from-Entrepreneurial-Lies-Gray dark:to-Entrepreneurial-Lies-White ',
|
| 19 |
'bg-gradient-to-bl from-Sunshine-Red to-Sunshine-Blue'
|
| 20 |
]
|
| 21 |
|
|
|
|
| 23 |
* Get a random emoji from emote array
|
| 24 |
* @returns random emoji from emote array
|
| 25 |
*/
|
| 26 |
+
export const random_emoji = (prev) =>{
|
| 27 |
+
var e = emote[Math.floor(Math.random() * emote.length)]
|
| 28 |
+
while(e === prev){
|
| 29 |
+
e = emote[Math.floor(Math.random() * emote.length)]
|
| 30 |
+
}
|
| 31 |
+
return e
|
| 32 |
}
|
| 33 |
|
| 34 |
/**
|
| 35 |
* Get a random color string from colour_map array
|
| 36 |
* @returns random color css string
|
| 37 |
*/
|
| 38 |
+
export const random_colour = (prev) => {
|
| 39 |
+
var c = colour_map[Math.floor(Math.random() * colour_map.length)]
|
| 40 |
+
while(c === prev){
|
| 41 |
+
c = colour_map[Math.floor(Math.random() * colour_map.length)]
|
| 42 |
+
}
|
| 43 |
+
return c
|
| 44 |
}
|
| 45 |
|
| 46 |
|
frontend/tailwind.config.js
CHANGED
|
@@ -7,6 +7,8 @@ module.exports = {
|
|
| 7 |
extend: {
|
| 8 |
|
| 9 |
colors : {
|
|
|
|
|
|
|
| 10 |
"Amethyst-Light" : "#9D50BB",
|
| 11 |
"Amethyst-Dark" : "#6E48AA",
|
| 12 |
"Peach-Red" : "#ED4264",
|
|
|
|
| 7 |
extend: {
|
| 8 |
|
| 9 |
colors : {
|
| 10 |
+
"Entrepreneurial-Lies-Gray" : "#8693AB",
|
| 11 |
+
"Entrepreneurial-Lies-White" : "#BDD4E7",
|
| 12 |
"Amethyst-Light" : "#9D50BB",
|
| 13 |
"Amethyst-Dark" : "#6E48AA",
|
| 14 |
"Peach-Red" : "#ED4264",
|