<template>
  <PageMeta
      title="Olivier Massot - Fullstack developer"
      description=""
  />

  <div class="banner">
    <h1>
      {{ $t('Fullstack developer') }}
    </h1>

    <h2>
      {{ $t('x_years_experience', { years: XP_YEARS }) }}
    </h2>

    <div class="introduction">
      <div>
        {{ $t('intro_part_1') }}
      </div>

      <div>
        {{ $t('intro_part_2') }}
      </div>

      <div>
        {{ $t('intro_part_3') }}
      </div>

      <div v-html="$t('intro_part_4')" />

      <div>
        {{ $t('intro_part_5') }}
      </div>

      <div class="logos mt-3">
        <BannerLogo
          href="https://github.com/olinox14"
          :img="theme.global.name.value === 'light' ? '/images/logos/github_large_light.png' : '/images/logos/github_large_dark.png'"
          :alt="i18n.t('Find me on Github')"
        />

        <BannerLogo
          href="https://stackoverflow.com/users/4279120/olinox14"
          img="/images/logos/stackoverflow.svg"
          :alt="i18n.t('Find me on Stackoverflow')"
          class="so-logo"
        />

        <BannerLogo
          href="https://www.linkedin.com/in/olivier-massot-60b87b181"
          img="/images/logos/linkedin.png"
          :alt="i18n.t('Find me on LinkedIn')"
        />

        <BannerLogo
          href="https://www.codingame.com/profile/75dcc329745def530c02ddb4485f22235683081"
          img="/images/logos/codingame.svg"
          :alt="i18n.t('Find me on Codingame')"
        />
      </div>
    </div>
  </div>

  <div class="badges">
    <h3>{{ $t("Competences") }}</h3>

    <v-container>
      <v-row>
        <v-col cols="4">
          <div class="badges-section">
            <h4>Languages</h4>

            <Badge
              title="Python"
              img="/images/logos/python.svg"
              :subtitle="$t('x_years', { years: 10 })"
              details="J'ai travaillé sur de très nombreux projets avec Python, depuis la version 2.7 jusqu'à la version 3.12: scripts variés, extensions QGis, projets web, librairies, utilitaires ou applications buraeautiques."
            />
            <Badge title="PHP" img="/images/logos/php.svg" :subtitle="$t('x_years', { years: 4 })" />
            <Badge title="Node.js" :img="theme.global.name.value === 'light' ? '/images/logos/nodejs_light.svg' : '/images/logos/nodejs_dark.svg'" :subtitle="$t('x_years', { years: 5 })" />
            <Badge title="C#" img="/images/logos/csharp.png" :subtitle="$t('x_years', { years: 2 })" />
          </div>

          <div class="badges-section">
            <h4>Frameworks</h4>

            <Badge title="Symfony" img="/images/logos/symfony.svg" :subtitle="$t('x_years', { years: 4 })" />
            <Badge title="Vue.js" img="/images/logos/vue.png" :subtitle="$t('x_years', { years: 3 })" />
            <Badge title="Nuxt.js" img="/images/logos/nuxt.svg" :subtitle="$t('x_years', { years: 3 })" />
            <Badge title="Django" :img="theme.global.name.value === 'light' ? '/images/logos/django-light.svg' : '/images/logos/django-dark.svg'" :subtitle="$t('x_years', { years: 3 })" />
            <Badge title=".Net" img="/images/logos/dotnet.svg" :subtitle="$t('x_years', { years: 2 })" />
            <Badge title="Jquery" :img="theme.global.name.value === 'light' ? '/images/logos/jquery.png' : '/images/logos/jquery_dark.png'" :subtitle="$t('x_years', { years: 4 })"/>
          </div>
        </v-col>

        <v-col cols="4">
          <div class="badges-section">
            <h4>DBs and search-engines</h4>

            <Badge title="Mysql" img="/images/logos/mysql.png" :subtitle="$t('x_years', { years: 6 })" />
            <Badge title="MariaDb" :img="theme.global.name.value === 'light' ? '/images/logos/mariadb.svg': '/images/logos/mariadb_dark.svg'" :subtitle="$t('x_years', { years: 6 })" />
            <Badge title="Postgresql" img="/images/logos/postgresql.svg" :subtitle="$t('x_years', { years: 5 })"/>
            <Badge title="SQL-Server" img="/images/logos/sql-server.svg" :subtitle="$t('x_years', { years: 6 })" />
            <Badge title="Sqlite" img="/images/logos/sqlite.svg" :subtitle="$t('x_years', { years: 5 })" />
            <Badge title="Solr" :img="theme.global.name.value === 'light' ? '/images/logos/solr_light.png' : '/images/logos/solr_dark.png'" :subtitle="$t('x_years', { years: 1 })" />
          </div>

          <div class="badges-section">
            <h4>Devops</h4>

            <Badge title="Docker" img="/images/logos/docker.svg" :subtitle="$t('x_years', { years: 5 })" />
            <Badge title="Gitlab CI" img="/images/logos/gitlab.svg" :subtitle="$t('x_years', { years: 8 })" />
            <Badge title="Github Actions" :img="theme.global.name.value === 'light' ? '/images/logos/github-light.svg' : '/images/logos/github-dark.svg'" :subtitle="$t('x_years', { years: 1 })" />
            <Badge title="Jenkins" img="/images/logos/jenkins.png" :subtitle="$t('x_years', { years: 4 })" />
          </div>
        </v-col>

        <v-col cols="4">
          <div class="badges-section">
            <h4>CMS</h4>

            <Badge title="Typo3" img="/images/logos/typo3.png" :subtitle="$t('x_years', { years: 4 })" />
            <Badge title="Wordpress" :img="theme.global.name.value === 'light' ? '/images/logos/wordpress.png' : '/images/logos/wordpress_dark.png'" :subtitle="$t('x_years', { years: 6 })"/>
          </div>

          <div class="badges-section">
            <h4>Other</h4>

            <Badge title="Mercure (SSE)" img="/images/logos/mercure_icon.png" :subtitle="$t('x_years', { years: 3 })" />
            <Badge title="Nextcloud" img="/images/logos/nextcloud.svg" :subtitle="$t('x_years', { years: 6 })" />
            <Badge title="Linux" img="/images/logos/linux.png" :subtitle="$t('x_years', { years: 10 })" />
          </div>

          <div class="badges-section">
            <h4>Management</h4>

            <Badge title="Management" img="/images/team-management.png" :subtitle="$t('x_years', { years: 10 })" />
            <Badge title="Continuous Improvement" img="/images/continuous-improvement.png" :subtitle="$t('x_years', { years: 9 })" />
            <Badge title="SCRUM" img="/images/scrum.png" :subtitle="$t('x_years', { years: 8 })" />
            <Badge title="Tutoring" img="/images/teacher.png" :subtitle="$t('x_years', { years: 6 })" />
          </div>

<!--          <div class="badges-section">-->
<!--            <h4>Languages</h4>-->

<!--            <Badge title="English" img="" :subtitle="$t('good')" />-->
<!--            <Badge title="French" img="" :subtitle="$t('native')" />-->
<!--            <Badge title="Spanish" img="" :subtitle="$t('basic')" />-->
<!--          </div>-->
        </v-col>
      </v-row>
    </v-container>
  </div>

  <div class="cursus">
    <h3>{{ $t("Cursus") }}</h3>

    <Cursus />
  </div>

  <div class="cursus">
    <h3>{{ $t("Contact") }}</h3>

    <Contact />
  </div>

</template>

<script setup lang="ts">

import { useTheme } from 'vuetify'

const i18n = useI18n()

const theme = useTheme()

const START_YEAR = 2011
const CURRENT_YEAR = new Date().getFullYear();

const XP_YEARS = CURRENT_YEAR - START_YEAR

</script>

<style scoped lang="scss">
.banner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;

  h2 {
    margin: 18px 0 36px 0;
    border-bottom: none;
  }

  .introduction {
    max-width: 800px;
    text-align: justify;
    padding: 36px 64px;
    border: solid 1px rgba(var(--v-theme-on-neutral), 0.4);
    border-radius: 16px;
    background: rgba(var(--v-theme-primary-alt), 0.1);

    > div {
      margin-bottom: 16px;
    }

    :deep(a) {
      color: rgb(var(--v-theme-on-neutral));
      font-weight: 700;
      text-decoration: none;
    }

    .logos {
      display: flex;
      flex-direction: row;

      .so-logo {
        background-color: white;
        border-radius: 6px;
      }
    }
  }
}

h3 {
  margin: 12px 0 24px 0;
}

.badges {
  .v-col {
    display: flex;
    flex-direction: column;
  }
}

.badges-section {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 12px 0;
  padding: 12px 6px;
  border: solid 1px rgba(var(--v-theme-primary-alt), 0.3);
  border-radius: 16px;
  flex: 1;

  h4 {
    font-size: 16px;
    margin: -24px 24px 6px 24px;
    padding: 0 12px;
    background: rgb(var(--v-theme-background));;
  }

  .v-card {
    margin: 6px 24px;
  }
}
</style>