Skip to content

Commit

Permalink
feat: namecard
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaabamboo committed Mar 2, 2024
1 parent a9b31e7 commit 0ca95cd
Show file tree
Hide file tree
Showing 10 changed files with 3,490 additions and 3,010 deletions.
16 changes: 8 additions & 8 deletions apps/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
"prepare": "panda codegen"
},
"dependencies": {
"@ark-ui/react": "^1.3.0",
"@astrojs/check": "^0.4.1",
"@astrojs/react": "^3.0.9",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"astro": "^4.2.1",
"@ark-ui/react": "^2.2.2",
"@astrojs/check": "^0.5.6",
"@astrojs/react": "^3.0.10",
"@types/react": "^18.2.61",
"@types/react-dom": "^18.2.19",
"astro": "^4.4.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3"
},
"devDependencies": {
"@pandacss/astro": "^0.25.0",
"@pandacss/dev": "^0.27.3",
"@park-ui/panda-preset": "^0.29.0"
"@pandacss/dev": "^0.33.0",
"@park-ui/panda-preset": "^0.36.0"
}
}
3 changes: 2 additions & 1 deletion apps/astro/panda.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ export default defineConfig({
// The output directory for your css system
outdir: 'styled-system',

emitPackage: true
emitPackage: true,
lightningCss: true
});
Binary file added apps/astro/src/assets/akarin-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/astro/src/assets/qr-code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/astro/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />
160 changes: 117 additions & 43 deletions apps/astro/src/pages/[lang]/contact/index.astro
Original file line number Diff line number Diff line change
@@ -1,77 +1,151 @@
---
import { Box, Center, Grid, HStack, Stack, styled } from 'styled-system/jsx';
import akarinLogo from "../../../assets/akarin-logo.png";
import qrCode from "../../../assets/qr-code.png";
import BaseLayout from '../../../layouts/BaseLayout.astro';
export async function getStaticPaths() {
return [{ params: { lang: 'en' } }, { params: { lang: 'ja' } }];
}
// <styled.p fontSize="xs" textAlign="center" fontStyle="italic">
// Pと書いてあるけどプロデューサーじゃないからね。
// <br /> ただただ「ぴー」の響きがいいだけ。
// </styled.p>
/* <styled.img
maxW="50px"
src={`https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${encodeURIComponent('https://ham-san.net/contact')}`}
/> */
//`https://api.qrserver.com/v1/create-qr-code/?size=500x500&color=${encodeURIComponent('#1F1F5A')}&data=${encodeURIComponent('https://ham-san.net/namecard')}`
https://qrcode-monkey.p.rapidapi.com/qr/custom?size=500&config=${encodeURIComponent(JSON.stringify({ bodyColor: '#1F1F5A', body: "dot", eye: "frame3", eyeball: "ball3"}))}&data=${encodeURIComponent('https://ham-san.net/namecard')}
// <Box width="64px" height="64px" objectPosition="0 -1350px" backgroundImage="url('https://kitoakari.com/wp/wp-content/themes/kitoakari/assets/images/common/sprite_loading.png')" backgroundPosition="0 -576px" backgroundSize="64px 640px" backgroundRepeat='no-repeat'/>
---

<BaseLayout>
<Center
h="100dvh"
h={{
base: '100dvh',
_print: 'full'
}}
w="full"
fontFamily={`"M PLUS 1p", "Yu Gothic Medium", "游ゴシック Medium", YuGothic, "游ゴシック体", "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", "メイリオ", "Meiryo", sans-serif`}
bgColor={{ base: 'gray.5', _print: 'none' }}
style={{ ['--main-color' as 'color']: '#1F1F5A' }}
>
<Grid
printColorAdjust="exact"
gridTemplateColumns="repeat(auto-fit, minmax(91mm, 1fr))"
justifyItems="center"
_print={{
gap: '0'
}}
w="full"
>
{
Array(8)
Array(1)
.fill(undefined)
.map(() => {
return (
<HStack
width="91mm"
height="55mm"
gap="4"
bgColor="white"
border={{ _print: '1px solid' }}
printColorAdjust={{ _print: 'exact' }}
style={{
WebkitPrintColorAdjust: 'exact'
}}
>
<Box width="5mm" h="full" bgColor="var(--main-color, #1F1F5A)" />
<Stack flex="1" gap="2" justifyContent="space-around" h="full" py="4">
<Stack gap="0" fontSize="sm">
<styled.p>Smiley Light Village</styled.p>
<styled.p>タイ支部🇹🇭</styled.p>
<>
<HStack
_print={{
pageBreakBefore: 'always',
// border: '1px solid',
printColorAdjust: 'exact'
}}
width="91mm"
height="55mm"
gap="0"
bgColor="white"
style={{
WebkitPrintColorAdjust: 'exact'
}}
>
<Box width="5mm" h="full" bgColor="var(--main-color, #1F1F5A)" />
<Stack
flex="1"
gap="2"
pl="4"
pr="2"
justifyContent="space-around"
h="full"
py="4"
>
<Stack gap="0" fontSize="xs">
<styled.p >Smiley Light Village</styled.p>
<styled.p >鬼頭明里の里民、タイ支部 🇹🇭</styled.p>

</Stack>
<styled.hr borderColor="var(--main-color)" />
<Stack gap="0">
<styled.h1 fontWeight="semibold" lineHeight="1.12" fontSize="4xl">
ハムP
</styled.pd.h1>
<styled.p fontSize="sm">はむぴー/HamP</styled.p>
</Stack>
<Stack gap="1">
<Stack gap="0" fontSize="xs">
<styled.p>สวัสดีครับ!(サワディーカー)</styled.p>
</Stack>
<Stack gap="0" fontSize="0.5rem" >
<styled.p>X (旧: Twitter): <b>@HamP_punipuni</b></styled.p>
<styled.p>Discord: <b>HamP</b></styled.p>
</Stack>
</Stack>
</Stack>
<styled.hr borderColor="var(--main-color)" />
<Stack gap="0">
<styled.h1 fontWeight="semibold" lineHeight="1.2" fontSize="5xl">
ハムP
</styled.h1>
<styled.p fontSize="sm">Pいらないからハムをよんで!</styled.p>
<Stack
justifyContent="space-between"
py="4"
pr="4"
h="full"
w="84px"
alignItems="flex-end"
>
<styled.img src={akarinLogo.src} />
<styled.img src="https://500ddaf7f3cefcd23a892c355a3d13d0.cdnext.stream.ne.jp/images/common/logo.svg" />
</Stack>
<Stack gap="0" fontSize="xs">
<styled.p>สวัสดีครับ!(サワディーカー)</styled.p>
<styled.p>X: @HamP_punipuni</styled.p>
</HStack>
<HStack
width="91mm"
height="55mm"
bgColor="white"
gap="0"
border={{ _print: '1px solid' }}
printColorAdjust={{ _print: 'exact' }}
style={{
WebkitPrintColorAdjust: 'exact'
}}
>
<Stack
flex="1"
gap="2"
justifyContent="space-evenly"
alignItems="center"
h="full"
p="4"
>
<Center>
<styled.img
maxW="100px"
src={qrCode.src}
/>
</Center>
<HStack alignItems="center">
<styled.blockquote fontSize="xs" textAlign="center" fontStyle="italic">
「…推しって<b>“応援する存在”</b>というよりも、
<br />
<b>“自分のモチベーションを高める存在”</b>…」</br>ー 鬼頭明里
</styled.blockquote>
</HStack>
</Stack>
</Stack>
<Stack justifyContent="space-between" py="4" pr="4" h="full" alignItems="flex-end">
<styled.img
maxW="50px"
src="https://500ddaf7f3cefcd23a892c355a3d13d0.cdnext.stream.ne.jp/images/common/sns_of.png"
/>
<styled.img
maxW="64px"
src="https://500ddaf7f3cefcd23a892c355a3d13d0.cdnext.stream.ne.jp/images/common/logo.svg"
/>
</Stack>
</HStack>
<Box width="5mm" h="full" bgColor="var(--main-color, #1F1F5A)" />
</HStack>
</>
);
})
}
</Grid>
</Center>
</BaseLayout>

<style>
@page {
margin: 0;
size: 91mm 55mm;
}
</style>
5 changes: 5 additions & 0 deletions apps/client/src/routes/namecard/+page.server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { redirect } from '@sveltejs/kit';

export function load() {
throw redirect(302, '/contact');
}
Empty file.
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,36 @@
},
"dependencies": {
"plugin-upload": "link:@strapi/plugin-upload",
"postcss-import": "^16.0.0",
"postcss-import": "^16.0.1",
"strapi-admin": "link:@strapi/plugin-content-type-builder/strapi-admin",
"tslib": "^2.6.2"
},
"devDependencies": {
"@nrwl/devkit": "17.2.8",
"@nrwl/linter": "17.2.8",
"@nx-tools/nx-container": "^5.1.0",
"@nx/eslint": "17.2.8",
"@nx/eslint-plugin": "17.2.8",
"@nx/jest": "17.2.8",
"@nx/js": "17.2.8",
"@nrwl/devkit": "18.0.6",
"@nrwl/linter": "18.0.6",
"@nx-tools/nx-container": "^5.2.0",
"@nx/eslint": "18.0.6",
"@nx/eslint-plugin": "18.0.6",
"@nx/jest": "18.0.6",
"@nx/js": "18.0.6",
"@nxext/sveltekit": "17.0.1",
"@swc-node/register": "~1.6.8",
"@swc/core": "~1.3.104",
"@types/jest": "^29.5.11",
"@types/node": "20.11.5",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"eslint": "~8.56.0",
"@swc-node/register": "~1.8.0",
"@swc/core": "~1.4.2",
"@types/jest": "^29.5.12",
"@types/node": "20.11.24",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"eslint": "~8.57.0",
"eslint-config-prettier": "^9.1.0",
"husky": "^8.0.3",
"husky": "^9.0.11",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"lerna": "^8.0.2",
"lint-staged": "^15.2.0",
"nx": "17.2.8",
"nx-cloud": "16.5.2",
"prettier": "^3.2.4",
"ts-jest": "^29.1.1",
"lerna": "^8.1.2",
"lint-staged": "^15.2.2",
"nx": "18.0.6",
"nx-cloud": "18.0.0",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"ts-node": "10.9.2",
"typescript": "~5.3.3"
},
Expand Down
Loading

0 comments on commit 0ca95cd

Please sign in to comment.