|
557 | 557 | type: 'svg', |
558 | 558 | url: ICON_BASE_URL + 'maven.svg', |
559 | 559 | color: '#c71a36', |
560 | | - cls: 'maven-icon' |
| 560 | + cls: '' |
561 | 561 | }; |
562 | 562 | } |
563 | 563 | if (fileName === 'build.gradle' || fileName === 'build.gradle.kts' || fileName === 'settings.gradle' || fileName === 'settings.gradle.kts') { |
564 | 564 | return { |
565 | 565 | type: 'svg', |
566 | 566 | url: ICON_BASE_URL + 'gradle.svg', |
567 | 567 | color: '#02303a', |
568 | | - cls: 'gradle-icon' |
| 568 | + cls: '' |
569 | 569 | }; |
570 | 570 | } |
571 | 571 | if (fileName === 'application.properties' || fileName === 'application.yml' || fileName === 'application.yaml') { |
572 | 572 | return { |
573 | 573 | type: 'svg', |
574 | 574 | url: ICON_BASE_URL + 'spring.svg', |
575 | 575 | color: '#6db33f', |
576 | | - cls: 'spring-icon' |
| 576 | + cls: '' |
577 | 577 | }; |
578 | 578 | } |
579 | 579 | if (fileName.startsWith('application-') && (fileName.endsWith('.properties') || fileName.endsWith('.yml') || fileName.endsWith('.yaml'))) { |
580 | 580 | return { |
581 | 581 | type: 'svg', |
582 | 582 | url: ICON_BASE_URL + 'spring.svg', |
583 | 583 | color: '#6db33f', |
584 | | - cls: 'spring-icon' |
| 584 | + cls: '' |
585 | 585 | }; |
586 | 586 | } |
587 | 587 | // ======================================== |
|
592 | 592 | type: 'svg', |
593 | 593 | url: ICON_BASE_URL + 'python.svg', |
594 | 594 | color: '#3776ab', |
595 | | - cls: 'python-icon' |
| 595 | + cls: '' |
596 | 596 | }; |
597 | 597 | } |
598 | 598 | if (fileName === 'setup.py' || fileName === 'setup.cfg') { |
599 | 599 | return { |
600 | 600 | type: 'svg', |
601 | 601 | url: ICON_BASE_URL + 'python.svg', |
602 | 602 | color: '#3776ab', |
603 | | - cls: 'python-icon' |
| 603 | + cls: '' |
604 | 604 | }; |
605 | 605 | } |
606 | 606 | if (fileName === 'pipfile' || fileName === 'pipfile.lock') { |
607 | 607 | return { |
608 | 608 | type: 'svg', |
609 | 609 | url: ICON_BASE_URL + 'python.svg', |
610 | 610 | color: '#3776ab', |
611 | | - cls: 'python-icon' |
| 611 | + cls: '' |
612 | 612 | }; |
613 | 613 | } |
614 | 614 | if (fileName === 'pyproject.toml') { |
615 | 615 | return { |
616 | 616 | type: 'svg', |
617 | 617 | url: ICON_BASE_URL + 'python.svg', |
618 | 618 | color: '#3776ab', |
619 | | - cls: 'python-icon' |
| 619 | + cls: '' |
620 | 620 | }; |
621 | 621 | } |
622 | 622 | if (fileName === 'manage.py') { // Django |
623 | 623 | return { |
624 | 624 | type: 'svg', |
625 | 625 | url: ICON_BASE_URL + 'django.svg', |
626 | 626 | color: '#092e20', |
627 | | - cls: 'django-icon' |
| 627 | + cls: '' |
628 | 628 | }; |
629 | 629 | } |
630 | 630 | // ======================================== |
|
635 | 635 | type: 'svg', |
636 | 636 | url: ICON_BASE_URL + 'nodejs.svg', |
637 | 637 | color: '#8cc84b', |
638 | | - cls: 'nodejs-icon' |
| 638 | + cls: '' |
639 | 639 | }; |
640 | 640 | } |
641 | 641 | if (fileName === 'package-lock.json') { |
642 | 642 | return { |
643 | 643 | type: 'svg', |
644 | 644 | url: ICON_BASE_URL + 'npm.svg', |
645 | 645 | color: '#cb3837', |
646 | | - cls: 'npm-icon' |
| 646 | + cls: '' |
647 | 647 | }; |
648 | 648 | } |
649 | 649 | if (fileName === 'yarn.lock') { |
650 | 650 | return { |
651 | 651 | type: 'svg', |
652 | 652 | url: ICON_BASE_URL + 'yarn.svg', |
653 | 653 | color: '#2c8ebb', |
654 | | - cls: 'yarn-icon' |
| 654 | + cls: '' |
655 | 655 | }; |
656 | 656 | } |
657 | 657 | if (fileName === 'tsconfig.json') { |
658 | 658 | return { |
659 | 659 | type: 'svg', |
660 | 660 | url: ICON_BASE_URL + 'typescript-def.svg', |
661 | 661 | color: '#3178c6', |
662 | | - cls: 'typescript-icon' |
| 662 | + cls: '' |
663 | 663 | }; |
664 | 664 | } |
665 | 665 | if (fileName === 'webpack.config.js' || fileName === 'webpack.config.ts') { |
666 | 666 | return { |
667 | 667 | type: 'svg', |
668 | 668 | url: ICON_BASE_URL + 'webpack.svg', |
669 | 669 | color: '#8dd6f9', |
670 | | - cls: 'webpack-icon' |
| 670 | + cls: '' |
671 | 671 | }; |
672 | 672 | } |
673 | 673 | if (fileName === 'vite.config.js' || fileName === 'vite.config.ts') { |
674 | 674 | return { |
675 | 675 | type: 'svg', |
676 | 676 | url: ICON_BASE_URL + 'vite.svg', |
677 | 677 | color: '#646cff', |
678 | | - cls: 'vite-icon' |
| 678 | + cls: '' |
679 | 679 | }; |
680 | 680 | } |
681 | 681 | if (fileName === 'next.config.js' || fileName === 'next.config.ts') { |
682 | 682 | return { |
683 | 683 | type: 'svg', |
684 | 684 | url: ICON_BASE_URL + 'next.svg', |
685 | 685 | color: '#000000', |
686 | | - cls: 'next-icon' |
| 686 | + cls: '' |
687 | 687 | }; |
688 | 688 | } |
689 | 689 | // ======================================== |
|
694 | 694 | type: 'svg', |
695 | 695 | url: ICON_BASE_URL + 'git.svg', |
696 | 696 | color: '#f34f29', |
697 | | - cls: 'git-icon' |
| 697 | + cls: '' |
698 | 698 | }; |
699 | 699 | } |
700 | 700 | // ======================================== |
|
705 | 705 | type: 'svg', |
706 | 706 | url: ICON_BASE_URL + 'docker.svg', |
707 | 707 | color: '#0db7ed', |
708 | | - cls: 'docker-icon' |
| 708 | + cls: '' |
709 | 709 | }; |
710 | 710 | } |
711 | 711 | if (fileName === 'docker-compose.yml' || fileName === 'docker-compose.yaml') { |
712 | 712 | return { |
713 | 713 | type: 'svg', |
714 | 714 | url: ICON_BASE_URL + 'docker.svg', |
715 | 715 | color: '#0db7ed', |
716 | | - cls: 'docker-icon' |
| 716 | + cls: '' |
717 | 717 | }; |
718 | 718 | } |
719 | 719 | // ======================================== |
|
724 | 724 | type: 'svg', |
725 | 725 | url: ICON_BASE_URL + 'tune.svg', |
726 | 726 | color: '#e7c547', |
727 | | - cls: 'env-icon' |
| 727 | + cls: '' |
728 | 728 | }; |
729 | 729 | } |
730 | 730 | // ======================================== |
|
735 | 735 | type: 'svg', |
736 | 736 | url: ICON_BASE_URL + 'readme.svg', |
737 | 737 | color: '#4caf50', |
738 | | - cls: 'readme-icon' |
| 738 | + cls: '' |
739 | 739 | }; |
740 | 740 | } |
741 | 741 | // ======================================== |
|
746 | 746 | type: 'svg', |
747 | 747 | url: ICON_BASE_URL + 'license.svg', |
748 | 748 | color: '#cbcb41', |
749 | | - cls: 'license-icon' |
| 749 | + cls: '' |
750 | 750 | }; |
751 | 751 | } |
752 | 752 | // ======================================== |
753 | 753 | // GET BY EXTENSION (DEFAULT) |
754 | 754 | // ======================================== |
755 | 755 | const ext = name.split('.').pop().toLowerCase(); |
756 | 756 | const iconData = ICONS[ext] || ICONS['default']; |
757 | | - // Add specific class for better CSS targeting and visual effects |
758 | | - let specificClass = `${ext}-icon`; |
759 | | - // Group similar extensions for consistent styling |
760 | | - if (['jsx', 'tsx'].includes(ext)) specificClass += ' react-icon'; |
761 | | - if (['vue', 'svelte'].includes(ext)) specificClass += ' framework-icon'; |
762 | | - if (['scss', 'sass', 'less'].includes(ext)) specificClass += ' style-icon'; |
763 | 757 |
|
764 | 758 | return { |
765 | 759 | type: 'svg', |
766 | 760 | url: ICON_BASE_URL + iconData.icon, |
767 | 761 | color: iconData.color, |
768 | | - cls: specificClass |
| 762 | + cls: '' // No custom classes needed - icons are already colored |
769 | 763 | }; |
770 | 764 | }; |
771 | 765 | const esc = s => s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>'); |
|
0 commit comments