Spaces:
Paused
Paused
File size: 29,558 Bytes
504df0f d8acd61 a4c7637 1b00758 504df0f a4c7637 d8acd61 a4c7637 504df0f 1b00758 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 e83166d a4c7637 4991915 a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 4991915 a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 504df0f a4c7637 4991915 a4c7637 4991915 a4c7637 504df0f a4c7637 4991915 a4c7637 504df0f a4c7637 504df0f a4c7637 4991915 a4c7637 4991915 a4c7637 504df0f a4c7637 4991915 a4c7637 4991915 a4c7637 695b180 ad080c9 504df0f d8acd61 a4c7637 d8acd61 a4c7637 3c4bd31 b2bc11b 3c4bd31 b2bc11b 3c4bd31 d8acd61 3c4bd31 d8acd61 504df0f d8acd61 1b00758 7f3b7e5 d8acd61 504df0f d8acd61 5c64dc0 695b180 d8acd61 a4c7637 504df0f d8acd61 d8529bc a4c7637 d8529bc a4c7637 d8529bc a4c7637 d8529bc a4c7637 d8529bc a4c7637 d8529bc a4c7637 d8529bc a4c7637 d8529bc a4c7637 d8529bc a4c7637 504df0f 7f3b7e5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Codingo - AI-Powered Recruitment Platform{% endblock %}</title>
<style>
:root {
--primary: #4361ee;
--secondary: #3a0ca3;
--accent: #4cc9f0;
--light: #f8f9fa;
--dark: #212529;
--success: #2ecc71;
--warning: #f39c12;
--danger: #e74c3c;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: var(--light);
color: var(--dark);
line-height: 1.6;
perspective: 1000px;
overflow-x: hidden;
}
header {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
padding: 1rem;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
}
.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
display: flex;
align-items: center;
font-size: 2rem;
font-weight: bold;
color: white;
text-decoration: none;
transition: transform 0.3s ease;
}
.logo:hover {
transform: scale(1.05);
}
.logo-part1 {
color: white;
}
.logo-part2 {
color: #FF8C42;
font-style: italic;
text-shadow: 0px 0px 10px rgba(255, 140, 66, 0.7);
animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
from {
text-shadow: 0 0 5px rgba(255, 140, 66, 0.7);
}
to {
text-shadow: 0 0 15px rgba(255, 140, 66, 1), 0 0 20px rgba(255, 140, 66, 0.8);
}
}
.logo-part3 {
color: var(--accent);
}
.login-buttons {
display: flex;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
}
/* Style for the welcome message */
.welcome-message {
color: white;
font-weight: 500;
display: flex;
align-items: center;
background-color: rgba(255, 255, 255, 0.1);
padding: 0.5rem 1rem;
border-radius: 5px;
transition: all 0.3s ease;
}
.welcome-message:before {
content: '👋 ';
margin-right: 0.5rem;
}
/* Enhanced logout button */
.btn-logout {
background-color: transparent;
border: 2px solid var(--accent);
color: var(--accent);
font-weight: 600;
padding: 0.5rem 1.5rem;
border-radius: 5px;
transition: all 0.3s ease;
}
.btn-logout:hover {
background-color: var(--accent);
color: var(--dark);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
}
.btn {
padding: 0.5rem 1.5rem;
border-radius: 5px;
border: none;
cursor: pointer;
font-weight: 500;
transition: all 0.3s ease;
text-decoration: none;
position: relative;
overflow: hidden;
z-index: 1;
}
.btn::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 0%;
height: 100%;
background-color: rgba(255, 255, 255, 0.1);
transition: all 0.3s ease;
z-index: -1;
}
.btn:hover::before {
width: 100%;
}
.btn-primary {
background-color: var(--accent);
color: var(--dark);
box-shadow: 0 4px 8px rgba(76, 201, 240, 0.3);
}
.btn-outline {
background-color: transparent;
border: 2px solid white;
color: white;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
/* Fixed chatbot button */
#chatbot-nav {
position: fixed;
bottom: 20px;
right: 20px;
width: 60px;
height: 60px;
background-color: var(--primary);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
z-index: 999;
transition: all 0.3s ease;
font-size: 24px;
}
#chatbot-nav:hover {
transform: scale(1.1);
background-color: var(--secondary);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
/* Chatbot box */
#chatbot-box {
position: fixed;
bottom: 100px;
right: 20px;
width: 350px;
height: 500px;
background-color: white;
border-radius: 10px;
box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
display: none;
flex-direction: column;
z-index: 998;
}
/* Responsive adjustments */
@media (max-width: 768px) {
#chatbot-nav {
bottom: 15px;
right: 15px;
width: 50px;
height: 50px;
font-size: 20px;
}
#chatbot-box {
width: calc(100vw - 40px);
max-width: 350px;
right: 20px;
bottom: 80px;
height: 400px;
}
.login-buttons {
justify-content: flex-end;
}
.welcome-message {
font-size: 0.9rem;
padding: 0.4rem 0.8rem;
}
.btn {
padding: 0.4rem 1rem;
font-size: 0.9rem;
}
}
@media (max-width: 480px) {
.nav-container {
flex-wrap: wrap;
gap: 1rem;
}
.login-buttons {
width: 100%;
justify-content: center;
}
.logo {
font-size: 1.5rem;
}
}
.hero {
background: linear-gradient(rgba(67, 97, 238, 0.8), rgba(58, 12, 163, 0.9)), url("/api/placeholder/1200/600") no-repeat center center/cover;
color: white;
text-align: center;
padding: 5rem 1rem;
position: relative;
overflow: hidden;
}
.hero::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%);
animation: rotate 30s linear infinite;
z-index: 1;
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.hero-content {
display: flex;
flex-direction: column;
align-items: center;
transform-style: preserve-3d;
transition: transform 0.3s ease;
position: relative;
z-index: 2;
}
.hero h1 {
font-size: 3rem;
margin-bottom: 1.5rem;
font-weight: 700;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
transform: translateZ(20px);
animation: fadeIn 1s ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px) translateZ(20px);
}
to {
opacity: 1;
transform: translateY(0) translateZ(20px);
}
}
.hero p {
font-size: 1.2rem;
max-width: 800px;
margin: 0 auto 2rem;
transform: translateZ(10px);
animation: fadeIn 1s ease-out 0.3s both;
}
.luna-avatar-container {
position: relative;
width: 250px;
height: 250px;
margin-bottom: 2rem;
perspective: 1000px;
}
.luna-avatar {
width: 100%;
height: 100%;
border-radius: 50%;
border: 4px solid var(--accent);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(76, 201, 240, 0.5);
overflow: hidden;
animation: float 4s ease-in-out infinite;
position: relative;
z-index: 2;
background: linear-gradient(135deg, rgba(76, 201, 240, 0.2), rgba(58, 12, 163, 0.2));
display: flex;
justify-content: center;
align-items: center;
}
.luna-glow {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
background: radial-gradient(circle, rgba(76, 201, 240, 0.8) 0%, rgba(76, 201, 240, 0) 70%);
filter: blur(15px);
opacity: 0.7;
z-index: 1;
animation: pulse 4s ease-in-out infinite alternate;
}
@keyframes pulse {
0% {
transform: scale(0.9);
opacity: 0.5;
}
100% {
transform: scale(1.1);
opacity: 0.7;
}
}
@keyframes float {
0% {
transform: translateY(0px) rotateY(0deg);
}
50% {
transform: translateY(-15px) rotateY(5deg);
}
100% {
transform: translateY(0px) rotateY(0deg);
}
}
.luna-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center -10px;
top: 0;
left: 0;
}
.luna-avatar video {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
}
.hero-buttons {
display: flex;
justify-content: center;
gap: 1.5rem;
flex-wrap: wrap;
transform: translateZ(15px);
animation: fadeIn 1s ease-out 0.6s both;
}
.features {
padding: 5rem 1rem;
background-color: white;
position: relative;
z-index: 1;
}
.section-title {
text-align: center;
margin-bottom: 3rem;
transform-style: preserve-3d;
transition: transform 0.3s ease;
}
.section-title h2 {
font-size: 2.5rem;
color: var(--primary);
margin-bottom: 1rem;
position: relative;
display: inline-block;
}
.section-title h2::after {
content: '';
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
width: 80px;
height: 3px;
background: linear-gradient(to right, var(--primary), var(--accent));
}
.section-title p {
max-width: 600px;
margin: 0 auto;
color: #666;
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
}
.feature-card {
background-color: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
transition: all 0.5s ease;
display: flex;
flex-direction: column;
height: 100%;
transform-style: preserve-3d;
perspective: 1000px;
}
.feature-card:hover {
transform: translateY(-10px) rotateX(5deg);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.feature-icon {
background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(76, 201, 240, 0.1));
padding: 2rem;
display: flex;
justify-content: center;
align-items: center;
font-size: 2.5rem;
color: var(--primary);
transition: all 0.3s ease;
}
.feature-card:hover .feature-icon {
transform: translateZ(20px);
color: var(--accent);
}
.feature-content {
padding: 1.5rem;
flex-grow: 1;
transform: translateZ(0);
transition: transform 0.3s ease;
}
.feature-card:hover .feature-content {
transform: translateZ(10px);
}
.feature-content h3 {
font-size : 1.5rem;
margin-bottom: 1rem;
color: var(--dark);
position: relative;
display: inline-block;
}
.feature-content h3::after {
content: '';
position: absolute;
bottom: -5px;
left: 0;
width: 40px;
height: 2px;
background: var(--primary);
transition: width 0.3s ease;
}
.feature-card:hover .feature-content h3::after {
width: 100%;
}
.content-section {
padding: 5rem 1rem;
background-color: white;
min-height: 50vh;
}
.cta {
background: linear-gradient(135deg, var(--secondary), var(--primary));
color: white;
padding: 5rem 1rem;
text-align: center;
position: relative;
overflow: hidden;
}
.cta::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%);
animation: rotate 20s linear infinite;
z-index: 1;
}
.cta .container {
position: relative;
z-index: 2;
}
.cta h2 {
font-size: 2.5rem;
margin-bottom: 1.5rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.cta p {
max-width: 600px;
margin: 0 auto 2rem;
font-size: 1.2rem;
}
footer {
background-color: var(--dark);
color: white;
padding: 3rem 1rem;
}
.footer-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 2rem;
}
.footer-col h3 {
font-size: 1.2rem;
margin-bottom: 1.5rem;
color: var(--accent);
position: relative;
display: inline-block;
}
.footer-col h3::after {
content: '';
position: absolute;
bottom: -8px;
left: 0;
width: 30px;
height: 2px;
background: var(--accent);
}
.social-links {
display: flex;
gap: 1rem;
margin-top: 1rem;
}
.social-links a {
color: white;
background-color: rgba(255, 255, 255, 0.1);
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
transition: all 0.3s ease;
}
.social-links a:hover {
background-color: var(--accent);
color: var(--dark);
transform: translateY(-3px);
}
.copyright {
margin-top: 2rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
padding-top: 1.5rem;
text-align: center;
color: #aaa;
}
.card {
background-color: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
transition: all 0.5s ease;
margin-bottom: 2rem;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.card-header {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
padding: 1.5rem;
}
.card-body {
padding: 1.5rem;
}
.job-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 2rem;
}
.job-card {
background-color: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
transition: all 0.5s ease;
height: 100%;
display: flex;
flex-direction: column;
}
.job-card:hover {
transform: translateY(-10px);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.job-header {
background: linear-gradient(135deg, rgba(67, 97, 238, 0.9), rgba(58, 12, 163, 0.9));
color: white;
padding: 1.5rem;
}
.job-header h3 {
font-size: 1.5rem;
}
/* Additional content styling omitted for brevity */
/*
* Flash message styling
*
* The flash message container appears just below the navigation bar and
* above the page content. These rules provide a consistent look and
* feel across different screen sizes without altering the underlying
* layout. Messages stack vertically with gentle spacing and use
* coloured left borders to indicate their severity (success, warning,
* danger or info). We leverage the existing colour palette defined
* in CSS variables (e.g. --success, --warning, --danger, --accent)
* while keeping backgrounds light and text readable.
*/
.flash-messages {
margin: 1rem 0;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.flash-messages .alert {
padding: 0.75rem 1rem;
border-radius: 5px;
font-weight: 500;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
}
.alert-success {
background-color: rgba(46, 204, 113, 0.15);
color: var(--success);
border-left: 4px solid var(--success);
}
.alert-warning {
background-color: rgba(243, 156, 18, 0.15);
color: var(--warning);
border-left: 4px solid var(--warning);
}
.alert-danger {
background-color: rgba(231, 76, 60, 0.15);
color: var(--danger);
border-left: 4px solid var(--danger);
}
.alert-info {
background-color: rgba(76, 201, 240, 0.15);
color: var(--accent);
border-left: 4px solid var(--accent);
}
/* ------------------------------------------------------------------
* Layout improvements for job cards
*
* The following rules standardise spacing and alignment within each
* job card. They ensure the header, body and footer areas align
* consistently regardless of how much text is present. The body
* uses flexbox to push the footer to the bottom of the card and
* provide equal padding on all sides. On small screens the same
* layout continues to work because the grid defined below flows
* the cards into a single column.
*/
.job-card {
display: flex;
flex-direction: column;
height: 100%;
}
.job-header {
padding: 1rem 1.5rem;
}
.job-info {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
font-size: 0.9rem;
margin-top: 0.5rem;
}
.job-body {
flex: 1;
padding: 1rem 1.5rem;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.job-body .job-description {
flex: 1;
margin-bottom: 0.75rem;
}
.job-body .job-description p {
margin: 0;
line-height: 1.4;
}
.job-footer {
padding: 1rem 1.5rem;
text-align: right;
}
/* ------------------------------------------------------------------
* Enhanced chatbot styling
*
* Improve readability of the floating chatbot by adding padding,
* setting overflow and styling the input area. Using box-sizing
* ensures the input field fits within the container without
* horizontal scrolling. The background colour of the messages
* area is subtly different from white for better contrast. The
* display property remains none by default and is toggled via
* JavaScript.
*/
#chatbot-box {
display: none;
flex-direction: column;
overflow: hidden;
}
#chatbot-box #chat-messages {
flex: 1;
padding: 1rem;
overflow-y: auto;
background-color: #fafafa;
}
#chatbot-box #chat-input {
border: none;
border-top: 1px solid #ddd;
padding: 0.75rem 1rem;
font-size: 1rem;
width: calc(100% - 2rem);
box-sizing: border-box;
}
#chatbot-box #chat-input:focus {
outline: none;
}
</style>
</head>
<body>
<header>
<div class="container nav-container">
<a href="{{ url_for('index') }}" class="logo">
<span class="logo-part1">Cod</span><span class="logo-part2">in</span><span class="logo-part3">go</span>
</a>
<div class="login-buttons">
{% if current_user.is_authenticated %}
{#
Display navigation options based on the authenticated user's role.
Job seekers (role: "unemployed") can view available jobs and their own applications.
Recruiters and admins can post new jobs, view the jobs list and access the recruiter dashboard.
#}
{% if current_user.role == 'unemployed' %}
<a href="{{ url_for('jobs') }}" class="btn btn-outline">Jobs</a>
<a href="{{ url_for('my_applications') }}" class="btn btn-outline">My Applications</a>
{% elif current_user.role in ('recruiter', 'admin') %}
<a href="{{ url_for('post_job') }}" class="btn btn-outline">Add Job</a>
<a href="{{ url_for('jobs') }}" class="btn btn-outline">View Jobs</a>
<a href="{{ url_for('dashboard') }}" class="btn btn-outline">Dashboard</a>
{% endif %}
<span class="welcome-message">Welcome, {{ current_user.username }}</span>
<a href="{{ url_for('auth.logout') }}" class="btn btn-logout">Logout</a>
{% else %}
<a href="{{ url_for('auth.login') }}" class="btn btn-outline">Log In</a>
<a href="{{ url_for('auth.signup') }}" class="btn btn-primary">Sign Up</a>
{% endif %}
</div>
</div>
</header>
<!-- Fixed chatbot button -->
<div id="chatbot-nav" onclick="toggleChatbot()">💬</div>
<!-- Chatbot box (hidden by default) -->
<div id="chatbot-box">
<div id="chat-messages"></div>
<input type="text" id="chat-input" onkeydown="sendChat(event)" placeholder="Type a message...">
</div>
{% block hero %}{% endblock %}
<main>
<div class="container">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="flash-messages">
{% for category, message in messages %}
<div class="alert alert-{{ category }}">{{ message }}</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</div>
<!-- Chatbot UI removed on the home page. -->
</main>
<footer>
<div class="container">
<div class="footer-grid">
<div class="footer-col">
<h3>Codingo</h3>
<p>AI-powered recruitment platform that revolutionizes how companies hire technical talent.</p>
<div class="social-links">
<a href="#"><span>f</span></a>
<a href="#"><span>t</span></a>
<a href="#"><span>in</span></a>
</div>
</div>
</div>
<div class="copyright">
<p>© 2025 Codingo. All rights reserved.</p>
</div>
</div>
</footer>
{# -------------------------------------------------------------------------
Chatbot UI scripts and styles
The following script powers the floating chatbot widget located at the
bottom right of every page. When the user clicks the 💬 button, the
widget toggles visibility. Pressing Enter in the input box sends the
message to the `/chatbot` endpoint defined in ``app.py``. Both user
and bot messages are appended to the conversation pane with simple
styling defined below. Jinja's ``url_for`` helper is used to
dynamically generate the correct path to the endpoint at render time.
#}
<script type="text/javascript">
function toggleChatbot() {
const box = document.getElementById('chatbot-box');
if (!box) return;
// Toggle between flex (visible) and none (hidden)
box.style.display = (box.style.display === 'flex') ? 'none' : 'flex';
}
function sendChat(event) {
if (event.key === 'Enter') {
event.preventDefault();
const input = document.getElementById('chat-input');
const message = input.value.trim();
if (!message) return;
appendChatMessage(message, 'user');
input.value = '';
fetch("{{ url_for('chatbot_endpoint') }}", {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message: message })
}).then(response => response.json())
.then(data => {
if (data.response) {
appendChatMessage(data.response, 'bot');
} else {
appendChatMessage(data.error || 'Error occurred.', 'bot');
}
}).catch(() => {
appendChatMessage('Network error.', 'bot');
});
}
}
function appendChatMessage(text, sender) {
const container = document.getElementById('chat-messages');
if (!container) return;
const wrapper = document.createElement('div');
wrapper.className = sender === 'user' ? 'user-message' : 'bot-message';
const bubble = document.createElement('div');
bubble.className = sender === 'user' ? 'user-bubble' : 'bot-bubble';
bubble.textContent = text;
wrapper.appendChild(bubble);
container.appendChild(wrapper);
container.scrollTop = container.scrollHeight;
}
</script>
<style>
/* Chat message styling for user and bot */
#chat-messages .user-message {
display: flex;
justify-content: flex-end;
margin-bottom: 8px;
}
#chat-messages .bot-message {
display: flex;
justify-content: flex-start;
margin-bottom: 8px;
}
#chat-messages .user-bubble {
background-color: #4caf50;
color: #ffffff;
padding: 8px 12px;
border-radius: 12px;
max-width: 80%;
word-wrap: break-word;
}
#chat-messages .bot-bubble {
background-color: #f1f0f0;
color: #000000;
padding: 8px 12px;
border-radius: 12px;
max-width: 80%;
word-wrap: break-word;
}
</style>
</body>
</html> |