minerva-juppiter-home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit dc16434804aa6dc15cea8d8d062ff3f923fd8b3f
parent 5ccab2f315f4ab5063c7490dcfb0ffe30cc26da1
Author: Minerva_juppiter <94231606+minerva-jupiter@users.noreply.github.com>
Date:   Tue, 25 Mar 2025 00:50:42 +0900

Dev (#7)

* import ssr

* limit of bootstrap

* some error is still here but push

* delete scss

* mobile branched on schedule

* remove bun.lockb

* remove bun

* git ignore

* indent fixed

* update and start dev linkcard

* v 0.1.0

* update import

* update dependences

* add br to blog

* fix unused linkcard

* deploy linkcard & make works page do work

* import container
Diffstat:
MREADME.md | 3+++
Mpackage.json | 34+++++++++++++++++-----------------
Msrc/Blog.tsx | 10----------
Msrc/LinkCard.tsx | 42++++++++++++++++++++++++------------------
Msrc/Works.tsx | 20++++++++++++++++----
Asrc/assets/works.d.ts | 9+++++++++
Asrc/assets/works.json | 15+++++++++++++++
Mtsconfig.json | 6+++++-
8 files changed, 89 insertions(+), 50 deletions(-)

diff --git a/README.md b/README.md @@ -48,3 +48,5 @@ export default tseslint.config({ }, }) ``` +各社、埋め込みにはそれなりに別のパスなりサブドメインなりが切ってあって、それ以外からは参照できないので、注意。 +https://zenn.dev/012/articles/537115a9d8020d79479e+ \ No newline at end of file diff --git a/package.json b/package.json @@ -10,24 +10,24 @@ "preview": "vite preview" }, "dependencies": { - "bootstrap": "^5.3.3", - "react": "^19.0.0", - "react-bootstrap": "^2.10.9", - "react-device-detect": "^2.2.3", - "react-dom": "^19.0.0", - "react-router-dom": "^7.1.5" + "bootstrap": "5.3.3", + "react": "19.0.0", + "react-bootstrap": "2.10.9", + "react-device-detect": "2.2.3", + "react-dom": "19.0.0", + "react-router-dom": "7.4.0" }, "devDependencies": { - "@eslint/js": "^9.20.0", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", - "@vitejs/plugin-react-swc": "^3.8.0", - "eslint": "^9.20.1", - "eslint-plugin-react-hooks": "^5.1.0", - "eslint-plugin-react-refresh": "^0.4.19", - "globals": "^15.14.0", - "typescript": "~5.7.3", - "typescript-eslint": "^8.24.0", - "vite": "^6.1.0" + "@eslint/js": "9.23.0", + "@types/react": "19.0.12", + "@types/react-dom": "19.0.4", + "@vitejs/plugin-react-swc": "3.8.1", + "eslint": "9.23.0", + "eslint-plugin-react-hooks": "5.2.0", + "eslint-plugin-react-refresh": "0.4.19", + "globals": "16.0.0", + "typescript": "5.8.2", + "typescript-eslint": "8.27.0", + "vite": "6.2.2" } } diff --git a/src/Blog.tsx b/src/Blog.tsx @@ -15,16 +15,6 @@ const Blog = () => { 島根大学ものづくり部が発行する、2024年度の部誌に「PCカバン設計のすゝめ」という記事を寄稿させていただきました。 </Card.Body> </Card> - <br /> - <Card> - <Card.Title> - 自分のウェブページを作ってみた - </Card.Title> - <Card.Body> - このページを作成したときのブログです。<br /> - Vite + Typescript + react + react-bootstrapでWebページを作ってみました。 - </Card.Body> - </Card> </Container> ) }; diff --git a/src/LinkCard.tsx b/src/LinkCard.tsx @@ -1,19 +1,26 @@ -import { Card } from "react-bootstrap" -const LinkCard = () => { - return( - <Card> - <Card.Title> - here will link card! - </Card.Title> - <Card.Img> - - </Card.Img> - <Card.Body> - here will be description for url - </Card.Body> - </Card> - ); -} +import { Card } from 'react-bootstrap'; +import { Link } from 'react-router-dom'; -export default LinkCard;- \ No newline at end of file + +const LinkCard = (target: {title:string,url:string,description:string,img:string}) => { + return ( + <Link to={target.url}> + <Card> + <Card.Img src={target.img}/> + <Card.Title> + <h2> + {target.title} + </h2> + </Card.Title> + <Card.Body> + <p> + {target.description} + </p> + </Card.Body> + </Card> + </Link> + ) +} + +export default LinkCard diff --git a/src/Works.tsx b/src/Works.tsx @@ -1,7 +1,20 @@ import 'bootstrap/dist/css/bootstrap.min.css'; -import { Container } from 'react-bootstrap'; -import UnderConstruction from './UnderConstruction'; +import works_json from './assets/works.json'; import LinkCard from './LinkCard'; +import { Container } from 'react-bootstrap'; + +console.log(works_json); +const Cards = () => { + return( + works_json.map(works => { + return( + <div> + <LinkCard title={works.title} img={works.img} url={works.url} description={works.body} /> + <br /> + </div> + )}) + ) +} const Works = () => { return( @@ -9,8 +22,7 @@ const Works = () => { <br /> <h1 style={{color:"white"}}>Works</h1> <br /> - <LinkCard/> - <UnderConstruction></UnderConstruction> + <Cards/> </Container> ) }; diff --git a/src/assets/works.d.ts b/src/assets/works.d.ts @@ -0,0 +1,8 @@ +interface WorkJson{ + title: string; + url: string; + body: string; +} + +declare const data: WorkJson[]; +export default data;+ \ No newline at end of file diff --git a/src/assets/works.json b/src/assets/works.json @@ -0,0 +1,14 @@ +[ + { + "title": "ドロップキャンディ", + "url": "https://www.nicovideo.jp/watch/sm41950516", + "img": "https://img.cdn.nimg.jp/s/nicovideo/thumbnails/41950516/41950516.71816605.original/r1280x720l?key=bca74046d23538e1e383be2fcedd8f3b9ad1a4dddfa6ba49fcc1ce0ee45b80bb", + "body": "ボカコレ2023春に出した曲です。" + }, + { + "title": "月と花", + "url": "https://www.nicovideo.jp/watch/sm41944025", + "img": "https://img.cdn.nimg.jp/s/nicovideo/thumbnails/41944025/41944025.55217099.original/r1280x720l?key=bf12a87d57f761ce5e8125f4dc6d1b03af25ebf781b68387d8a29441b918301a", + "body": "いつからか私の中にあった、昔話みたいなお伽話を文章化して、それに音楽を付けました。淋しい夜のお話です。カフカに敬愛を!" + } +]+ \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json @@ -3,5 +3,9 @@ "references": [ { "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" } - ] + ], + "compilerOptions": { + "moduleResolution": "node", + "resolveJsonModule": true + } }