Skip to content

Commit

Permalink
Icon components created.
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuel-Palestino committed Jan 10, 2024
1 parent c359c55 commit dfa90ca
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 27 deletions.
6 changes: 6 additions & 0 deletions app/icons/CheckIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const CheckIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="14" viewBox="0 0 448 512">
{/* !Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc. */}
<path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" />
</svg>
)
5 changes: 5 additions & 0 deletions app/icons/DocumentIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const DocumentIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" height="4em" viewBox="0 -960 960 960">
<path d="M264.615-120Q237-120 218.5-138.5 200-157 200-184.615v-590.77Q200-803 218.5-821.5 237-840 264.615-840h288.539q12.923 0 25.115 5.231 12.192 5.23 20.885 13.923l141.692 141.692q8.693 8.693 13.923 20.885Q760-646.077 760-633.154v448.539Q760-157 741.5-138.5 723-120 695.385-120h-430.77ZM560-672.307V-800H264.615q-9.23 0-16.923 7.692Q240-784.615 240-775.385v590.77q0 9.23 7.692 16.923Q255.385-160 264.615-160h430.77q9.23 0 16.923-7.692Q720-175.385 720-184.615V-640H592.307q-13.923 0-23.115-9.192Q560-658.384 560-672.307ZM240-800v160-160 640-640Z" />
</svg>
)
6 changes: 6 additions & 0 deletions app/icons/DownloadIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const DownloadIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="14" viewBox="0 0 448 512">
{/* !Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc. */}
<path d="M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V173.3c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32H64zm0 96c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V128zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z" />
</svg>
)
6 changes: 6 additions & 0 deletions app/icons/EmailIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const EmailIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 512 512">
{/* !Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc. */}
<path d="M256 64C150 64 64 150 64 256s86 192 192 192c17.7 0 32 14.3 32 32s-14.3 32-32 32C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256v32c0 53-43 96-96 96c-29.3 0-55.6-13.2-73.2-33.9C320 371.1 289.5 384 256 384c-70.7 0-128-57.3-128-128s57.3-128 128-128c27.9 0 53.7 8.9 74.7 24.1c5.7-5 13.1-8.1 21.3-8.1c17.7 0 32 14.3 32 32v80 32c0 17.7 14.3 32 32 32s32-14.3 32-32V256c0-106-86-192-192-192zm64 192a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z" />
</svg>
)
6 changes: 6 additions & 0 deletions app/icons/GitHubIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const GitHubIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="15.5" viewBox="0 0 496 512">
{/* !Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc. */}
<path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z" />
</svg>
)
5 changes: 5 additions & 0 deletions app/icons/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from './CheckIcon'
export * from './DocumentIcon'
export * from './DownloadIcon'
export * from './EmailIcon'
export * from './GitHubIcon'
14 changes: 6 additions & 8 deletions app/ui/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import Image from "next/image"
import Link from "next/link"
import { usePathname } from "next/navigation"
import { useEffect } from "react"
import { GitHubIcon, EmailIcon } from "@/app/icons"


const routerTitles: { [key: string]: string } = {
'/internship': 'Prácticas Profesionales',
Expand Down Expand Up @@ -39,19 +41,15 @@ export const Navigation = () => {
<NavbarContent className="flex gap-2 md:gap-6" justify="end">
<NavbarItem>
<UILink color="foreground" href="mailto:[email protected]" className="flex items-center gap-1">
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 512 512" className="">
<path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z" />
</svg>
<span className="hidden sm:block">Contacto</span>
<EmailIcon />
<span className="hidden sm:block h-[26px]">Contacto</span>
</UILink>
</NavbarItem>

<NavbarItem>
<UILink color="foreground" isExternal href="https://github.com/Emanuel-Palestino/utm-tools" className="flex items-center gap-1">
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="15.5" viewBox="0 0 496 512">
<path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z" />
</svg>
<span className="hidden sm:block">Contribuir</span>
<GitHubIcon />
<span className="hidden sm:block h-[26px]">Contribuir</span>
</UILink>
</NavbarItem>
</NavbarContent>
Expand Down
13 changes: 8 additions & 5 deletions app/ui/internship/Documents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { formatedDate } from "@/app/utils/format"
import { useForm } from "react-hook-form"
import { FinalReport } from "@/app/printingFormats/internship/FinalReport"
import { addDays, differenceInCalendarWeeks, eachWeekOfInterval } from "date-fns"
import { DownloadIcon, DocumentIcon } from "@/app/icons"


export const Documents = () => {
Expand Down Expand Up @@ -112,11 +113,11 @@ export const Documents = () => {
className="w-32 h-36"
>
<CardBody className="pb-0">
<svg xmlns="http://www.w3.org/2000/svg" height="4em" viewBox="0 -960 960 960">
<path d="M264.615-120Q237-120 218.5-138.5 200-157 200-184.615v-590.77Q200-803 218.5-821.5 237-840 264.615-840h288.539q12.923 0 25.115 5.231 12.192 5.23 20.885 13.923l141.692 141.692q8.693 8.693 13.923 20.885Q760-646.077 760-633.154v448.539Q760-157 741.5-138.5 723-120 695.385-120h-430.77ZM560-672.307V-800H264.615q-9.23 0-16.923 7.692Q240-784.615 240-775.385v590.77q0 9.23 7.692 16.923Q255.385-160 264.615-160h430.77q9.23 0 16.923-7.692Q720-175.385 720-184.615V-640H592.307q-13.923 0-23.115-9.192Q560-658.384 560-672.307ZM240-800v160-160 640-640Z" />
</svg>
<DocumentIcon />
{doc.stateKey !== 'none' && documentsDownloaded[doc.stateKey] && (
<span className="text-green-500 font-bold absolute right-3 top-1"></span>
<span className="fill-green-600 font-bold absolute right-3" >
<DownloadIcon />
</span>
)}
</CardBody>

Expand Down Expand Up @@ -177,7 +178,9 @@ export const Documents = () => {
value={i + 1}
endContent={
documentsDownloaded[`weekly-report-${i + 1}`] ?
<span className="text-green-500 font-bold absolute right-3 top-1 pr-4"></span>
<span className="text-green-600 font-bold absolute right-3 pr-4">
<DownloadIcon />
</span>
: <></>
}
>
Expand Down
9 changes: 5 additions & 4 deletions app/ui/internship/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { CompanyForm } from "./CompanyForm"
import { useEffect, useState } from "react"
import { Key } from "@react-types/shared"
import { useInternshipStore } from "@/app/store/internship"
import { CheckIcon } from "@/app/icons"


export const Form = () => {
Expand Down Expand Up @@ -37,7 +38,7 @@ export const Form = () => {
title={
<div className="flex items-center gap-2">
<span>Información Personal</span>
{completed.personaData && <span className="text-green-500 font-bold"></span>}
{completed.personaData && <span className="fill-green-600 font-bold"><CheckIcon /></span>}
</div>
}
>
Expand All @@ -49,7 +50,7 @@ export const Form = () => {
title={
<div className="flex items-center gap-2">
<span>Información Escolar</span>
{completed.studentData && <span className="text-green-500 font-bold"></span>}
{completed.studentData && <span className="fill-green-600 font-bold"><CheckIcon /></span>}
</div>
}
>
Expand All @@ -61,7 +62,7 @@ export const Form = () => {
title={
<div className="flex items-center gap-2">
<span>Información de la Empresa</span>
{completed.companyData && <span className="text-green-500 font-bold"></span>}
{completed.companyData && <span className="fill-green-600 font-bold"><CheckIcon /></span>}
</div>
}
>
Expand All @@ -73,7 +74,7 @@ export const Form = () => {
title={
<div className="flex items-center gap-2">
<span>Periodo y Prácticas</span>
{completed.periodData && <span className="text-green-500 font-bold"></span>}
{completed.periodData && <span className="fill-green-600 font-bold"><CheckIcon /></span>}
</div>
}
>
Expand Down
13 changes: 8 additions & 5 deletions app/ui/social_service/Documents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { FinalEvaluation } from "@/app/printingFormats/social_service/FinalEvalu
import { DocumentReception } from "@/app/printingFormats/social_service/DocumentReception"
import { Registration } from "@/app/printingFormats/social_service/Registration"
import { useSocialServiceStore } from "@/app/store/socialService"
import { DownloadIcon, DocumentIcon } from "@/app/icons"


export const Documents = () => {
Expand Down Expand Up @@ -101,11 +102,11 @@ export const Documents = () => {
className="w-32 h-36"
>
<CardBody className="pb-0">
<svg xmlns="http://www.w3.org/2000/svg" height="4em" viewBox="0 -960 960 960">
<path d="M264.615-120Q237-120 218.5-138.5 200-157 200-184.615v-590.77Q200-803 218.5-821.5 237-840 264.615-840h288.539q12.923 0 25.115 5.231 12.192 5.23 20.885 13.923l141.692 141.692q8.693 8.693 13.923 20.885Q760-646.077 760-633.154v448.539Q760-157 741.5-138.5 723-120 695.385-120h-430.77ZM560-672.307V-800H264.615q-9.23 0-16.923 7.692Q240-784.615 240-775.385v590.77q0 9.23 7.692 16.923Q255.385-160 264.615-160h430.77q9.23 0 16.923-7.692Q720-175.385 720-184.615V-640H592.307q-13.923 0-23.115-9.192Q560-658.384 560-672.307ZM240-800v160-160 640-640Z" />
</svg>
<DocumentIcon />
{doc.stateKey !== 'none' && documentsDownloaded[doc.stateKey] && (
<span className="text-green-500 font-bold absolute right-3 top-1"></span>
<span className="fill-green-600 font-bold absolute right-3">
<DownloadIcon />
</span>
)}
</CardBody>

Expand Down Expand Up @@ -144,7 +145,9 @@ export const Documents = () => {
value={i + 1}
endContent={
documentsDownloaded[`partial-report-${i + 1}`] ?
<span className="text-green-500 font-bold absolute right-3 top-1 pr-4"></span>
<span className="fill-green-600 font-bold absolute right-3 pr-4">
<DownloadIcon />
</span>
: <></>
}
>
Expand Down
11 changes: 6 additions & 5 deletions app/ui/social_service/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useEffect, useState } from "react"
import { Key } from "@react-types/shared"
import { ActivitiesForm } from "./ActivitiesForm"
import { useSocialServiceStore } from "@/app/store/socialService"
import { CheckIcon } from "@/app/icons"


export const Form = () => {
Expand Down Expand Up @@ -39,7 +40,7 @@ export const Form = () => {
title={
<div className="flex items-center gap-2">
<span>Información Personal</span>
{completed.personaData && <span className="text-green-500 font-bold"></span>}
{completed.personaData && <span className="fill-green-600 font-bold"><CheckIcon /></span>}
</div>
}
>
Expand All @@ -51,7 +52,7 @@ export const Form = () => {
title={
<div className="flex items-center gap-2">
<span>Información Escolar</span>
{completed.studentData && <span className="text-green-500 font-bold"></span>}
{completed.studentData && <span className="fill-green-600 font-bold"><CheckIcon /></span>}
</div>
}
>
Expand All @@ -63,7 +64,7 @@ export const Form = () => {
title={
<div className="flex items-center gap-2">
<span>Institución o Dependencia</span>
{completed.governmentAgencyData && <span className="text-green-500 font-bold"></span>}
{completed.governmentAgencyData && <span className="fill-green-600 font-bold"><CheckIcon /></span>}
</div>
}
>
Expand All @@ -75,7 +76,7 @@ export const Form = () => {
title={
<div className="flex items-center gap-2">
<span>Periodo y Proyecto</span>
{completed.periodData && <span className="text-green-500 font-bold"></span>}
{completed.periodData && <span className="fill-green-600 font-bold"><CheckIcon /></span>}
</div>
}
>
Expand All @@ -87,7 +88,7 @@ export const Form = () => {
title={
<div className="flex items-center gap-2">
<span>Actividades</span>
{completed.activitiesData && <span className="text-green-500 font-bold"></span>}
{completed.activitiesData && <span className="fill-green-600 font-bold"><CheckIcon /></span>}
</div>
}
>
Expand Down

0 comments on commit dfa90ca

Please sign in to comment.