1
0
Fork 0

[org] fix: Missing new measurements set link

This commit is contained in:
joostdecock 2025-04-03 17:58:15 +02:00
parent 880f738973
commit 7f39f319c6
6 changed files with 70 additions and 49 deletions

View file

@ -86,8 +86,6 @@ export const Sets = ({ Link = false }) => {
return (
<div className="tw-max-w-7xl xl:tw-pl-4">
{sets.length > 0 ? (
<>
<p className="tw-text-center md:tw-text-right">
<Link
className="tw-daisy-btn tw-daisy-btn-primary tw-daisy-btn-outline tw-capitalize tw-w-full md:tw-w-auto tw-mr-2 tw-mb-2 hover:tw-no-underline hover:tw-text-primary-content"
@ -127,18 +125,6 @@ export const Sets = ({ Link = false }) => {
<TrashIcon /> {selCount} Measurements Sets
</button>
</div>
</>
) : (
<Link
className="tw-daisy-btn tw-daisy-btn-primary tw-capitalize tw-w-full md:tw-w-auto tw-btn-lg hover:tw-no-underline hover:tw-text-primary-content"
bottom
primary
href="/new/set"
>
<PlusIcon />
Create a new Measurements Set
</Link>
)}
<div className="tw-grid tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-2">
{sets.map((set, i) => (
<div

View file

@ -0,0 +1,15 @@
---
title: Import Data
sidebar_class_name: tw-hidden
---
import { RoleBlock } from '@freesewing/react/components/Role'
import { Popout } from '@freesewing/react/components/Popout'
import Link from '@docusaurus/Link'
<RoleBlock user>
<Popout fixme title="Under construction">
<h4>This page is not ready yet</h4>
<p>Sorry, it's on our TODO list.</p>
</Popout>
</RoleBlock>

View file

@ -258,7 +258,7 @@ const config = {
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
respectPrefersColorScheme: false,
},
image: 'img/freesewing-social-card.png',
navbar: {

View file

@ -2,7 +2,7 @@
* This file is auto-generated.
* Any changes you make will be overwritten by the prebuild step.
*/
export const measurements = {"ankle":"Ankle circumference","biceps":"Biceps circumference","bustFront":"Bust front","bustPointToUnderbust":"Bust point to underbust","bustSpan":"Bust span","chest":"Chest circumference","crossSeam":"Cross seam","crossSeamFront":"Cross seam front","head":"Head circumference","heel":"Heel circumference","highBustFront":"High bust front","highBust":"High bust","hips":"Hips circumference","hpsToBust":"HPS to bust","hpsToWaistBack":"HPS to waist back","hpsToWaistFront":"HPS to waist front","inseam":"Inseam","knee":"Knee circumference","neck":"Neck circumference","seat":"Seat circumference","seatBack":"Seat back","crotchDepth":"Crotch depth","shoulderSlope":"Shoulder slope","shoulderToElbow":"Shoulder to elbow","shoulderToShoulder":"Shoulder to shoulder","shoulderToWrist":"Shoulder to wrist","underbust":"Underbust","upperLeg":"Upper leg circumference","waist":"Waist circumference","waistBack":"Waist back","waistToArmpit":"Waist to armpit","waistToFloor":"Waist to floor","waistToHips":"Waist to hips","waistToKnee":"Waist to knee","waistToSeat":"Waist to seat","waistToUnderbust":"Waist to underbust","waistToUpperLeg":"Waist to upper leg","wrist":"Wrist circumference"}
export const measurements = {"ankle":"Ankle circumference","biceps":"Biceps circumference","bustFront":"Bust front","bustPointToUnderbust":"Bust point to underbust","bustSpan":"Bust span","chest":"Chest circumference","crossSeam":"Cross seam","crossSeamFront":"Cross seam front","head":"Head circumference","heel":"Heel circumference","height":"Height","highBustFront":"High bust front","highBust":"High bust","hips":"Hips circumference","hpsToBust":"HPS to bust","hpsToWaistBack":"HPS to waist back","hpsToWaistFront":"HPS to waist front","inseam":"Inseam","knee":"Knee circumference","neck":"Neck circumference","seat":"Seat circumference","seatBack":"Seat back","crotchDepth":"Crotch depth","shoulderSlope":"Shoulder slope","shoulderToElbow":"Shoulder to elbow","shoulderToShoulder":"Shoulder to shoulder","shoulderToWrist":"Shoulder to wrist","underbust":"Underbust","upperLeg":"Upper leg circumference","waist":"Waist circumference","waistBack":"Waist back","waistToArmpit":"Waist to armpit","waistToFloor":"Waist to floor","waistToHips":"Waist to hips","waistToKnee":"Waist to knee","waistToSeat":"Waist to seat","waistToUnderbust":"Waist to underbust","waistToUpperLeg":"Waist to upper leg","wrist":"Wrist circumference"}
export const optiongroups = {"advanced":"Advanced","armhole":"Armhole","backPockets":"Back pockets","closure":"Closure","collar":"Collar","conditional":"Conditional Options","construction":"Construction","cuffs":"Cuffs","darts":"Darts","elastic":"Elastic","fit":"Fit","frontPockets":"Front pockets","length":"Length","pockets":"Pockets","style":"Style","sleevecap":"Sleevecap","test":"Test"}

View file

@ -53,6 +53,25 @@ const meta = {
}
export default function Home() {
useEffect(() => {
// Check initial state
console.log('Initial data-theme:', document.documentElement.getAttribute('data-theme'))
console.log('OS prefers dark:', window.matchMedia('(prefers-color-scheme: dark)').matches)
// Monitor for changes
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.attributeName === 'data-theme') {
console.log('data-theme changed to:', document.documentElement.getAttribute('data-theme'))
}
})
})
observer.observe(document.documentElement, { attributes: true })
return () => observer.disconnect()
}, [])
return (
<DocusaurusPage DocusaurusLayout={Layout} {...meta} Layout={false}>
<div className="tw-max-w-7xl tw-mx-auto tw-my-12 tw-px-4">

View file

@ -5,6 +5,7 @@ import daisyui from 'daisyui'
export default {
content: [
'./src/**/*.{js,mjs,mdx}',
'./docs/**/*.mdx',
'../../node_modules/daisyui/**/*.{js,mjs,ts,tsx}',
'../../packages/react/components/**/*.mjs',
'../../packages/react/context/**/*.mjs',