diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-29 12:13:34 +0200 | 
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-29 18:30:05 +0200 | 
| commit | 7e16f500cb7bc0cfd8bafbf6bb1555704f771231 (patch) | |
| tree | bfc2b4a475cb06a787e2c4bdf284165644e82952 /src/components/ProjectPreview | |
| parent | 5324664e87bedfaa01ba62c0c847ef5b861e69b3 (diff) | |
chore: remove old pages, components, helpers and types
Since I'm using new components, I will also rewrite the GraphQL queries
so it is easier to start from scratch.
Diffstat (limited to 'src/components/ProjectPreview')
| -rw-r--r-- | src/components/ProjectPreview/ProjectPreview.module.scss | 98 | ||||
| -rw-r--r-- | src/components/ProjectPreview/ProjectPreview.tsx | 73 | 
2 files changed, 0 insertions, 171 deletions
| diff --git a/src/components/ProjectPreview/ProjectPreview.module.scss b/src/components/ProjectPreview/ProjectPreview.module.scss deleted file mode 100644 index 3bf56ec..0000000 --- a/src/components/ProjectPreview/ProjectPreview.module.scss +++ /dev/null @@ -1,98 +0,0 @@ -@use "@styles/abstracts/functions" as fun; - -.article { -  display: flex; -  flex-flow: column nowrap; -  height: 100%; -  padding: var(--spacing-md); -  text-align: center; -} - -.cover { -  height: fun.convert-px(150); -  position: relative; -} - -.title { -  flex: 1; -  margin: var(--spacing-xs) 0; -  background: none; -  text-decoration: underline solid transparent 0; -  text-shadow: none; -  transition: all 0.3s linear 0s; -} - -.body { -  margin: 0 0 var(--spacing-xs); -} - -.footer { -  margin-top: auto; -} - -.meta { -  display: block; - -  &__item { -    display: flex; -    flex-flow: row wrap; -    place-content: center; -    gap: var(--spacing-2xs); -  } -} - -.link { -  display: block; -  height: 100%; -  background: var(--color-bg); -  color: inherit; -  text-decoration: none; -  border: fun.convert-px(3) solid var(--color-primary); -  border-radius: fun.convert-px(5); -  box-shadow: fun.convert-px(1) fun.convert-px(1) fun.convert-px(1) -      var(--color-shadow), -    fun.convert-px(1) fun.convert-px(2) fun.convert-px(2) fun.convert-px(-2) -      var(--color-shadow), -    fun.convert-px(3) fun.convert-px(4) fun.convert-px(5) fun.convert-px(-4) -      var(--color-shadow); -  transition: all 0.3s ease-in-out 0s; - -  &:hover, -  &:focus, -  &:active { -    color: inherit; -  } - -  &:hover, -  &:focus { -    box-shadow: fun.convert-px(1) fun.convert-px(1) fun.convert-px(1) -        var(--color-shadow-light), -      fun.convert-px(1) fun.convert-px(2) fun.convert-px(2) fun.convert-px(-2) -        var(--color-shadow-light), -      fun.convert-px(3) fun.convert-px(4) fun.convert-px(5) fun.convert-px(-4) -        var(--color-shadow-light), -      fun.convert-px(7) fun.convert-px(10) fun.convert-px(12) fun.convert-px(-3) -        var(--color-shadow-light); -    transform: scale(1.05); -  } - -  &:focus { -    .title { -      text-decoration: underline solid var(--color-primary) 0.3ex; -    } -  } - -  &:active { -    box-shadow: 0 0 0 0 var(--color-shadow); -    transform: scale(0.95); - -    .title { -      text-decoration: none; -    } -  } -} - -.techno { -  padding: 0 var(--spacing-2xs); -  border: fun.convert-px(1) solid var(--color-primary-darker); -} diff --git a/src/components/ProjectPreview/ProjectPreview.tsx b/src/components/ProjectPreview/ProjectPreview.tsx deleted file mode 100644 index 1e1ced2..0000000 --- a/src/components/ProjectPreview/ProjectPreview.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { Project } from '@ts/types/app'; -import { slugify } from '@utils/helpers/slugify'; -import Image from 'next/image'; -import Link from 'next/link'; -import { useIntl } from 'react-intl'; -import styles from './ProjectPreview.module.scss'; - -const ProjectPreview = ({ project }: { project: Project }) => { -  const { id, meta, tagline, title } = project; -  const intl = useIntl(); - -  return ( -    <Link href={`/projet/${project.slug}`}> -      <a className={styles.link}> -        <article className={styles.article}> -          <header> -            {meta.hasCover && ( -              <div className={styles.cover}> -                <Image -                  src={`/projects/${id}.jpg`} -                  layout="fill" -                  objectFit="contain" -                  objectPosition="center" -                  alt={intl.formatMessage( -                    { -                      defaultMessage: '{title} picture', -                      description: 'ProjectPreview: cover alt text', -                      id: '2pykor', -                    }, -                    { title } -                  )} -                /> -              </div> -            )} -            <h2 className={styles.title}>{title}</h2> -          </header> -          {tagline && ( -            <div -              className={styles.body} -              dangerouslySetInnerHTML={{ __html: tagline }} -            ></div> -          )} -          <footer className={styles.footer}> -            <dl className={styles.meta}> -              {meta.technologies && ( -                <div className={styles.meta__item}> -                  <dt className="screen-reader-text"> -                    {intl.formatMessage( -                      { -                        defaultMessage: -                          '{count, plural, =0 {Technologies:} one {Technology:} other {Technologies:}}', -                        description: 'ProjectPreview: technologies list label', -                        id: 'okFrAO', -                      }, -                      { count: meta.technologies.length } -                    )} -                  </dt> -                  {meta.technologies.map((techno) => ( -                    <dd key={slugify(techno)} className={styles.techno}> -                      {techno} -                    </dd> -                  ))} -                </div> -              )} -            </dl> -          </footer> -        </article> -      </a> -    </Link> -  ); -}; - -export default ProjectPreview; | 
