Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit 2e9d4fc

Browse files
committed
chore: Ported latest changes to dev
1 parent a90d417 commit 2e9d4fc

File tree

8 files changed

+113
-35
lines changed

8 files changed

+113
-35
lines changed

packages/freesewing.dev/components/navigation-buttons.js

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,32 @@ import Icon from '@/shared/components/icon'
33
import ThemeChooser from '@/shared/components/theme-chooser'
44
import NavLink, { classes, iconSize, Mini } from '@/shared/components/navigation/navlink'
55

6+
const l = (to, title, subtitle, icon) => (
7+
<NavLink href={to} title={title} subtitle={subtitle} icon={icon}/>
8+
)
9+
610
const ExtraNavs = props => {
711
const navs = {
812
theme: <ThemeChooser
913
block={props.menu}
1014
iconSize={iconSize}
1115
classes={classes}
12-
mini={<Mini>colors</Mini>}
16+
mini={<Mini>Your colors</Mini>}
1317
/>,
14-
home: <NavLink href='/' title='Home' subtitle='freesewing.dev' icon='freesewing' />,
15-
blog: <NavLink href='/blog' title='Blog' subtitle='for/by developers' icon='blog' />,
16-
discord: <NavLink href='https://discord.freesewing.org/' title='Chat' subtitle='on Discord' icon='discord' />,
17-
github: <NavLink href='https://github.com/freesewing/freesewing' title='Code' subtitle='on Github' icon='github' />,
18+
home: l('/', 'home', 'freesewing.dev', 'freesewing'),
19+
blog: l('/blog', 'blog', 'For/By Developers', 'blog'),
20+
join: l('/patrons/join', 'supportUs', 'becomeAPatron', 'community'),
21+
discord: l(
22+
'https://discord.freesewing.org/',
23+
'Or ask on Discord',
24+
'Come say hi',
25+
'discord'
26+
),
27+
github: l(
28+
'https://github.com/freesewing/freesewing', 'code',
29+
'On Github',
30+
'github'
31+
),
1832
search: (
1933
<button
2034
className={`${classes.btn} lg:w-auto`}
@@ -23,7 +37,7 @@ const ExtraNavs = props => {
2337
<div className={classes.btnWrap}>
2438
<Icon icon='search' size={iconSize} className="hidden lg:inline"/>
2539
<span className={classes.btnSpan}>
26-
Search
40+
Search for answers
2741
<Mini>[Ctrlk-k]</Mini>
2842
</span>
2943
</div>
@@ -47,18 +61,18 @@ const ExtraNavs = props => {
4761
: [navs.theme, navs.discord, navs.github]
4862
: (
4963
<>
50-
<div className="hidden lg:flex lg:flex-row lg:gap-4 items-start">
64+
<div className="hidden lg:flex lg:flex-row lg:gap-2 items-start">
5165
{navs.home}
5266
{navs.blog}
5367
{navs.search}
68+
{navs.discord}
5469
</div>
5570
<div className="lg:hidden flex flex-row flex-1 divide-x divide-base-300 py-1">
5671
<div className="w-1/2 px-1">{navs.search}</div>
5772
<div className="w-1/2 px-1">{navs.menu}</div>
5873
</div>
5974
<div className='hidden lg:flex lg:flex-row'>
6075
{navs.theme}
61-
{navs.discord}
6276
{navs.github}
6377
</div>
6478
</>
Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
import Link from 'next/link'
2-
import Icon from '@/shared/components/icon'
3-
4-
const SidebarWrap = props => (
5-
<>
6-
<div className="flex flex-row mb-4 justify-between pr-4">
7-
<Link href="/">
8-
<a href="/" onClick={() => props.setMenu(false)}>
9-
<h3 className="text-2xl font-bold hover:pointer">FreeSewing.dev</h3>
10-
</a>
11-
</Link>
12-
<Icon icon="freesewing" size={36} />
13-
</div>
14-
{props.children}
15-
</>
16-
)
1+
const SidebarWrap = props => props.children
172

183
export default SidebarWrap

packages/freesewing.dev/pages/blog/[post].js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { getStrapiStaticProps, getStrapiPaths } from '@/shared/content/strapi'
22
import { serialize } from 'next-mdx-remote/serialize'
33
import AppWrapper from '@/shared/components/wrappers/app'
4-
import PageTemplate from '@/shared/pages/blog/post'
4+
import PageTemplate from '@/shared/pages/post/post'
55
import config from '@/site/freesewing.config'
66

77
const PostPage = (props) => (
88
<AppWrapper title={props.post.title}>
9-
<PageTemplate {...props} config={config} post={props.post} />
9+
<PageTemplate {...props} config={config} post={props.post} type='blog'/>
1010
</AppWrapper>
1111
)
1212

packages/freesewing.dev/pages/blog/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import AppWrapper from '@/shared/components/wrappers/app'
2-
import PageTemplate from '@/shared/pages/blog/index'
2+
import PageTemplate from '@/shared/pages/post/index'
33
import Preview from '@/shared/components/strapi/preview'
44
import useBlogposts from '@/shared/hooks/useBlogposts'
55
import config from '@/site/freesewing.config'
@@ -12,7 +12,7 @@ const Page = props => {
1212
title='FreeSewing Developer Blog'
1313
crumbs={[]}
1414
>
15-
<PageTemplate {...props} posts={posts} />
15+
<PageTemplate {...props} posts={posts} type='blog'/>
1616
</AppWrapper>
1717
)
1818
}

packages/freesewing.shared/components/navigation/breadcrumbs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const getCrumbs = (pages, href) => {
1919
const defaultHome = <Icon icon='freesewing' size={24} className="inline" />
2020

2121
const Breadcrumbs = (props) => {
22-
const {path=false, tree, t, title='FIXME: No title'} = props
22+
const {path=false, tree, t=(x)=>x, title='FIXME: No title'} = props
2323
console.log(props)
2424
if (!path) return null
2525
const crumbs = []

packages/freesewing.shared/components/strapi/author.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import config from '@/site/freesewing.config'
22
import MDX from "@mdx-js/runtime";
33

4-
const Author = ({author, type, t}) => (
4+
const Author = ({author, type, t=false}) => (
55
<div id="author" className="shadow flex flex-col lg:flex-row rounded-xl border border-base-300 max-w-prose py-4 mx-auto lg:p-0">
66
<div
77
className={`
@@ -29,7 +29,10 @@ const Author = ({author, type, t}) => (
2929
<p className="text-xl mb-2">
3030
<span className="font-semibold"> {author.displayname}</span>
3131
<span className="text-base-300 text-sm pl-2">
32-
{t('xThis', {x: t(type === 'blog' ? 'wrote' : 'made')})}
32+
{t
33+
? t('xThis', {x: t(type === 'blog' ? 'wrote' : 'made')})
34+
: 'Wrote this'
35+
}
3336
</span>
3437
</p>
3538
<div className="prose">

packages/freesewing.shared/pages/post/post.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const PostPage = (props) => {
1010
<div className="flex flex-row justify-between text-sm mb-1 mt-2">
1111
<span><Timeago date={props.post.date} /> [{props.post.date}]</span>
1212
<span>
13-
{props.t('by')}&nbsp;
13+
{props.t ? props.t('by') : 'By'}&nbsp;
1414
<a
1515
href="#author"
1616
className="text-secondary hover:text-secondary-focus"
@@ -38,7 +38,7 @@ const PostPage = (props) => {
3838
/>
3939
</div>
4040
</article>
41-
<Author author={author} t={props.t} type={props.type}/>
41+
<Author author={author} type={props.type}/>
4242
</>
4343
)
4444
}

yarn.lock

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,6 +1348,13 @@
13481348
dependencies:
13491349
regenerator-runtime "^0.13.4"
13501350

1351+
"@babel/runtime@^7.12.0", "@babel/runtime@^7.13.17", "@babel/runtime@^7.14.5":
1352+
version "7.14.8"
1353+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.8.tgz#7119a56f421018852694290b9f9148097391b446"
1354+
integrity sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg==
1355+
dependencies:
1356+
regenerator-runtime "^0.13.4"
1357+
13511358
"@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.14.5", "@babel/template@^7.3.3":
13521359
version "7.14.5"
13531360
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4"
@@ -3899,6 +3906,13 @@
38993906
dependencies:
39003907
"@types/node" "*"
39013908

3909+
"@types/i18next-fs-backend@^1.0.0":
3910+
version "1.0.1"
3911+
resolved "https://registry.yarnpkg.com/@types/i18next-fs-backend/-/i18next-fs-backend-1.0.1.tgz#275950fa3c1c3366c829cb3728dfbc4ef2566ceb"
3912+
integrity sha512-zJDqz/xg3j2qJNr4t+fUgGEC30Xq/rqM8iF8sraN/nBVwIoItcpUwc/Wvwqs9pEgNpDgZ0PXRoWhoicwozSM3g==
3913+
dependencies:
3914+
i18next "^19.7.0"
3915+
39023916
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
39033917
version "2.0.3"
39043918
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762"
@@ -7235,7 +7249,7 @@ core-js@^2.4.0:
72357249
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
72367250
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
72377251

7238-
core-js@^3.15.0, core-js@^3.6.5:
7252+
core-js@^3, core-js@^3.15.0, core-js@^3.6.5:
72397253
version "3.15.2"
72407254
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.15.2.tgz#740660d2ff55ef34ce664d7e2455119c5bdd3d61"
72417255
integrity sha512-tKs41J7NJVuaya8DxIOCnl8QuPHx5/ZVbFo1oKgVl1qHFBBrDctzQGtuLjPpRdNTWmKPH6oEvgN/MUID+l485Q==
@@ -9856,6 +9870,15 @@ form-data@^3.0.0:
98569870
combined-stream "^1.0.8"
98579871
mime-types "^2.1.12"
98589872

9873+
form-data@^4.0.0:
9874+
version "4.0.0"
9875+
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
9876+
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
9877+
dependencies:
9878+
asynckit "^0.4.0"
9879+
combined-stream "^1.0.8"
9880+
mime-types "^2.1.12"
9881+
98599882
form-data@~2.3.2:
98609883
version "2.3.3"
98619884
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
@@ -10847,7 +10870,7 @@ hoist-non-react-statics@^1.0.0:
1084710870
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb"
1084810871
integrity sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs=
1084910872

10850-
hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
10873+
hoist-non-react-statics@^3.2.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
1085110874
version "3.3.2"
1085210875
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
1085310876
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
@@ -10938,6 +10961,13 @@ html-minifier-terser@^5.0.1:
1093810961
relateurl "^0.2.7"
1093910962
terser "^4.6.3"
1094010963

10964+
html-parse-stringify@^3.0.1:
10965+
version "3.0.1"
10966+
resolved "https://registry.yarnpkg.com/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz#dfc1017347ce9f77c8141a507f233040c59c55d2"
10967+
integrity sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==
10968+
dependencies:
10969+
void-elements "3.1.0"
10970+
1094110971
html-tags@^3.1.0:
1094210972
version "3.1.0"
1094310973
resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.1.0.tgz#7b5e6f7e665e9fb41f30007ed9e0d41e97fb2140"
@@ -11141,6 +11171,25 @@ hyphenate-style-name@^1.0.3:
1114111171
resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz#691879af8e220aea5750e8827db4ef62a54e361d"
1114211172
integrity sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==
1114311173

11174+
i18next-fs-backend@^1.0.7:
11175+
version "1.1.1"
11176+
resolved "https://registry.yarnpkg.com/i18next-fs-backend/-/i18next-fs-backend-1.1.1.tgz#1d8028926803f63784ffa0f2b1478fb369f92735"
11177+
integrity sha512-RFkfy10hNxJqc7MVAp5iAZq0Tum6msBCNebEe3OelOBvrROvzHUPaR8Qe10RQrOGokTm0W4vJGEJzruFkEt+hQ==
11178+
11179+
i18next@^19.7.0:
11180+
version "19.9.2"
11181+
resolved "https://registry.yarnpkg.com/i18next/-/i18next-19.9.2.tgz#ea5a124416e3c5ab85fddca2c8e3c3669a8da397"
11182+
integrity sha512-0i6cuo6ER6usEOtKajUUDj92zlG+KArFia0857xxiEHAQcUwh/RtOQocui1LPJwunSYT574Pk64aNva1kwtxZg==
11183+
dependencies:
11184+
"@babel/runtime" "^7.12.0"
11185+
11186+
i18next@^20.1.0:
11187+
version "20.3.5"
11188+
resolved "https://registry.yarnpkg.com/i18next/-/i18next-20.3.5.tgz#14308b79a3f1cafb24fdcd8e182d3673baf1e979"
11189+
integrity sha512-//MGeU6n4TencJmCgG+TCrpdgAD/NDEU/KfKQekYbJX6QV7sD/NjWQdVdBi+bkT0snegnSoB7QhjSeatrk3a0w==
11190+
dependencies:
11191+
"@babel/runtime" "^7.12.0"
11192+
1114411193
[email protected], iconv-lite@^0.4.24:
1114511194
version "0.4.24"
1114611195
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
@@ -14549,6 +14598,20 @@ netlify@^7.0.1:
1454914598
p-wait-for "^3.2.0"
1455014599
qs "^6.9.6"
1455114600

14601+
next-i18next@^8.5.5:
14602+
version "8.5.5"
14603+
resolved "https://registry.yarnpkg.com/next-i18next/-/next-i18next-8.5.5.tgz#d1a7476929236050986965eb59d6f44d7631d11a"
14604+
integrity sha512-zYXYToVB5W2qmDbWmuT/7j+PC/CqCysZsvMY2nmIyqpgaIBhMDKHYSi8+0nJ7SG1q7i9D+wQdJNd8KLdpe4/ng==
14605+
dependencies:
14606+
"@babel/runtime" "^7.13.17"
14607+
"@types/hoist-non-react-statics" "^3.3.1"
14608+
"@types/i18next-fs-backend" "^1.0.0"
14609+
core-js "^3"
14610+
hoist-non-react-statics "^3.2.0"
14611+
i18next "^20.1.0"
14612+
i18next-fs-backend "^1.0.7"
14613+
react-i18next "^11.8.13"
14614+
1455214615
next-mdx-remote@^3.0.2:
1455314616
version "3.0.2"
1455414617
resolved "https://registry.yarnpkg.com/next-mdx-remote/-/next-mdx-remote-3.0.2.tgz#7e1159b4eb8a6bdd4000c0b6e6631f94d8683f04"
@@ -17305,6 +17368,14 @@ react-hotkeys-hook@^3.3.2:
1730517368
dependencies:
1730617369
hotkeys-js "3.8.7"
1730717370

17371+
react-i18next@^11.8.13:
17372+
version "11.11.3"
17373+
resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.11.3.tgz#38d083bb079c3e6ee376b3321b0d6e409d798f68"
17374+
integrity sha512-upzG5/SpyOlYP5oSF4K8TZBvDWVhnCo38JNV+KnWjrg0+IaJCBltyh6lRGZDO5ovLyA4dU6Ip0bwbUCjb6Yyxw==
17375+
dependencies:
17376+
"@babel/runtime" "^7.14.5"
17377+
html-parse-stringify "^3.0.1"
17378+
1730817379
react-instantsearch-core@^6.12.0:
1730917380
version "6.12.0"
1731017381
resolved "https://registry.yarnpkg.com/react-instantsearch-core/-/react-instantsearch-core-6.12.0.tgz#f4bd044c0b5939d2129b95d3bf298e407a41a2b5"
@@ -20867,6 +20938,11 @@ [email protected], vm-browserify@^1.0.1:
2086720938
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
2086820939
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
2086920940

20941+
20942+
version "3.1.0"
20943+
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09"
20944+
integrity sha1-YU9/v42AHwu18GYfWy9XhXUOTwk=
20945+
2087020946
w3c-hr-time@^1.0.2:
2087120947
version "1.0.2"
2087220948
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd"

0 commit comments

Comments
 (0)