contribute.tsx 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import { useTranslation } from 'react-i18next'
  5. import {
  6. RiHammerFill,
  7. } from '@remixicon/react'
  8. import { Heart02 } from '@/app/components/base/icons/src/vender/solid/education'
  9. import { BookOpen01 } from '@/app/components/base/icons/src/vender/line/education'
  10. import { ArrowUpRight } from '@/app/components/base/icons/src/vender/line/arrows'
  11. const Contribute: FC = () => {
  12. const { t } = useTranslation()
  13. return (
  14. <a
  15. href='https://github.com/langgenius/dify/blob/main/api/core/tools/README.md'
  16. target='_blank'
  17. rel='noopener noreferrer'
  18. className="group col-span-1 flex min-h-[160px] cursor-pointer flex-col rounded-xl border-2 border-solid border-transparent bg-white bg-[url('~@/app/components/tools/provider/grid_bg.svg')] bg-cover bg-no-repeat shadow-sm transition-all duration-200 ease-in-out hover:shadow-lg"
  19. >
  20. <div className='flex h-[66px] shrink-0 grow-0 items-center gap-3 px-[14px] pb-3 pt-[14px]'>
  21. <div className='relative flex shrink-0 items-center'>
  22. <div className='z-10 flex rounded-[10px] border-[0.5px] border-primary-100 bg-white p-3 shadow-md'><RiHammerFill className='h-4 w-4 text-primary-600'/></div>
  23. <div className='flex -translate-x-2 rounded-[10px] border-[0.5px] border-[#FCE7F6] bg-[#FEF6FB] p-3 shadow-md'><Heart02 className='h-4 w-4 text-[#EE46BC]'/></div>
  24. </div>
  25. </div>
  26. <div className='mb-3 px-[14px] text-[15px] font-semibold leading-5'>
  27. <div className='text-gradient'>{t('tools.contribute.line1')}</div>
  28. <div className='text-gradient'>{t('tools.contribute.line2')}</div>
  29. </div>
  30. <div className='flex items-center space-x-1 border-t-[0.5px] border-black/5 px-4 py-3 text-[#155EEF]'>
  31. <BookOpen01 className='h-3 w-3' />
  32. <div className='grow text-xs font-normal leading-[18px]'>{t('tools.contribute.viewGuide')}</div>
  33. <ArrowUpRight className='h-3 w-3' />
  34. </div>
  35. </a>
  36. )
  37. }
  38. export default React.memo(Contribute)