Giter Site home page Giter Site logo

qin_portfolio's Introduction

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

qin_portfolio's People

Contributors

yamashin01 avatar

Watchers

 avatar

Forkers

tocchi-739

qin_portfolio's Issues

hover:cursor-pointerについて

cursor-pointerは「ホバーした時にカーソルが指マークになるプロパティ」なので、Tailwindのhover:をつけなくても正常に効きます。
なのでhover:は不要です。

Buttonのリンクの方法

 <Button color={theme.colorScheme === 'dark' ? "gray" : "dark"} radius="xl" onClick={handleGoTwitter}>
          View on Twitter
        </Button>

このように書かれていますが、下の書き方の方が自然だと思います。

<Button
      component="a"
      target="_blank"
      rel="noopener noreferrer"
      href="https://twitter.com/mantinedev"
    >
      Follow on Twitter
    </Button>

mantineのドキュメントが参考になります。
https://mantine.dev/core/button/

StarアイコンとForkアイコンの整列

こちら、divクラスのclassNameにflexと、items-center を追加すると、Starとforkのアイコンが上下**になってきれいに整列されると思います!

<div className="mb-2 align-middle">
<FaRegStar />
<span className="ml-2 mr-4 text-xs items-center">{repositoryObj.basicData.stargazerCount}</span>
<IconGitFork />
<span className="ml-2 text-xs items-center">{repositoryObj.basicData.forkCount}</span>
</div>

Next.jsでの外部リンクの取り扱い

 <div className="mr-2 cursor-pointer">
            <Link href="https://twitter.com/yamashin0413">
              <>
                <FaTwitter />
              </>
            </Link>
          </div>
          <div className="mr-2 cursor-pointer">
            <Link href="https://www.facebook.com/syamada01">
              <>
                <FaFacebook />
              </>
            </Link>
          </div>

index.tsx内で上のように書かれていますが、nextのLinkは外部リンクには使えないので、以下の記事を参考に、aタグで書き換えましょう!
https://maku.blog/p/vgs4dnw/

githubのパーセンテージ

https://github.com/yamashin01/qin_portfolio/blob/main/src/components/Github.tsx

%の表示で小数点以下の桁数が異なるのが気になりました。好みもあるかと思いますが😅

現状

22行目(割合を算出)
const percentage = language.size / repositoryBasicData.languages.totalSize * 100;

68行目(有効桁数2桁に→0.の場合に0.xxとなってしまう)
<span className="text-gray-600 mr-4">{language.percentage.toPrecision(2)}%</span>

自分はこのようにしました。

const percentage = Math.round((language.size / repositoryBasicData.languages.totalSize )* 1000)/10;
<span className="text-gray-600 mr-4">{language.percentage}%</span>

*1000にした上で、Math.roundを使い小数点第一位で四捨五入
その後10で割ることで、xx.xの表示に

参考(Math.round MDN)
https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Math/round

markdownの表示方法

Blog記事の、markdownでの表示を見やすいように改善したい(現状のmicroCMSのmarkdown機能では不十分)。

  • <code> ~ </code> の表示
    記載されているプログラミング言語に応じて、色付けした出力にしたい
  • ページ内リンク
    目次からページ内の各項目に飛べるようにしたい

microCMSからのデータ取得

microCMS上のブログやポートフォリオのデータに更新があるたびに、リアルタイムで取得、出力できるようにする

Languageの表示

Languagesのパーセンテージバーのところですが、数字の大きいものから順に左側から表示させるのであれば、

languages(first: 100, orderBy: { field: SIZE, direction: DESC }) {
                totalCount...
                }

などとしてSIZEの大きいものから表示させると良いかなと思いました。

languages(first: 10) {
edges {
size
node {
id
color
name
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.