-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from rmleg/tests
Some tests, beginning refactor, toe up toe calc fixed
- Loading branch information
Showing
15 changed files
with
348 additions
and
148 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import React from 'react'; | ||
import React from "react"; | ||
|
||
function HatAbbrevs(props) { | ||
return ( | ||
<div className="col-lg-4"> | ||
<h3>Abbreviations</h3> | ||
<p className="abbrList"> | ||
CO = cast on<br /> | ||
rep = repeat<br /> | ||
Rnd = round<br /> | ||
k = knit<br /> | ||
p = purl<br /> | ||
k2tog = knit two together<br /> | ||
st(s) = stitch(es)<br /> | ||
Stockinette stitch = knit all stitches | ||
</p> | ||
</div> | ||
); | ||
function HatAbbrevs() { | ||
return ( | ||
<div className="col-lg-4"> | ||
<h3>Abbreviations</h3> | ||
<ul className="abbrList"> | ||
<li>CO = cast on</li> | ||
<li>rep = repeat</li> | ||
<li>Rnd = round</li> | ||
<li>k = knit</li> | ||
<li>p = purl</li> | ||
<li>k2tog = knit two together</li> | ||
<li>st(s) = stitch(es)</li> | ||
<li>Stockinette stitch = knit all stitches</li> | ||
</ul> | ||
</div> | ||
); | ||
} | ||
|
||
export default HatAbbrevs; | ||
export default HatAbbrevs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from "react"; | ||
import { render, screen } from "@testing-library/react"; | ||
import HatAbbrevs from "./HatAbbrevs"; | ||
|
||
test("<HatAbbrevs />", () => { | ||
render(<HatAbbrevs />); | ||
expect(screen.queryByRole("list")).toBeTruthy(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import React from 'react' | ||
import React from "react"; | ||
|
||
function HeaderImage(props) { | ||
return ( | ||
<div className={props.colClass}> | ||
<img src={props.url} | ||
alt={props.alt} | ||
className="img-fluid shadow-lg" /> | ||
</div> | ||
) | ||
function HeaderImage({ colClass, url, alt }) { | ||
return ( | ||
<div className={colClass}> | ||
<img src={url} alt={alt} className="img-fluid shadow-lg" /> | ||
</div> | ||
); | ||
} | ||
|
||
export default HeaderImage | ||
export default HeaderImage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
import React from 'react'; | ||
import React from "react"; | ||
|
||
function CuffDownCuff(props) { | ||
return ( | ||
<div> | ||
<h3>Cuff and Leg</h3> | ||
<p>Cast on {props.state.fullStCount} sts loosely or with a stretchy cast-on. Join to work in the rnd, being careful not to twist.</p> | ||
<p>Rnd 1: *k2, p2; rep from * to end<br /> | ||
Rep rnd 1 until ribbing measures one inch, or until desired length.</p> | ||
<p>Knit every rnd until work measures 6 inches, or until desired length.</p> | ||
</div> | ||
) | ||
return ( | ||
<div> | ||
<h3>Cuff and Leg</h3> | ||
<p> | ||
Cast on {props.state.fullStCount} sts loosely or with a stretchy | ||
cast-on. Join to work in the rnd, being careful not to twist. | ||
</p> | ||
<p> | ||
Rnd 1: *k2, p2; rep from * to end | ||
<br /> | ||
Rep rnd 1 until ribbing measures one inch, or until desired length. | ||
</p> | ||
<p> | ||
Knit every rnd until work measures 6 inches, or until desired length. | ||
</p> | ||
</div> | ||
); | ||
} | ||
|
||
export default CuffDownCuff; | ||
export default CuffDownCuff; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,44 @@ | ||
import React from 'react'; | ||
import React from "react"; | ||
|
||
function CuffDownToe(props) { | ||
return( | ||
<div> | ||
<h3>Toe</h3> | ||
<p>Knit to the beginning of the instep sts, then begin the toe decreases as follows:</p> | ||
<p>Rnd 1, instep/needle 1: k1, ssk, k to last 3 sts of instep, k2tog, k1<br /> | ||
Rnd 1, sole/needle 2: k1, ssk, k to last 3 sts of sole, k2tog, k1<br /> | ||
Rnd 2: k around</p> | ||
<p>Rep rnds 1 and 2 until you have {props.state.fullStCount / 2} sts remaining. Then, rep rnd 1 twice more.</p> | ||
<p>At the end of your decreases, you should have { (props.state.fullStCount / 2) - 8 } sts remaining, { props.getMultiple((((props.state.fullStCount / 2) - 8) / 2), 2) } on the instep and { props.getMultiple((((props.state.fullStCount / 2) - 8) / 2), 2) } on the sole.</p> | ||
<p>Cut the yarn, leaving a tail long enough to graft the toe. Use the <a href="http://www.knitty.com/ISSUEsummer04/FEATtheresasum04.html" target="_blank" rel="noopener noreferrer">Kitchener stitch</a> to graft the toe closed.</p> | ||
</div> | ||
); | ||
return ( | ||
<div> | ||
<h3>Toe</h3> | ||
<p> | ||
Knit to the beginning of the instep sts, then begin the toe decreases as | ||
follows: | ||
</p> | ||
<p> | ||
Rnd 1, instep/needle 1: k1, ssk, k to last 3 sts of instep, k2tog, k1 | ||
<br /> | ||
Rnd 1, sole/needle 2: k1, ssk, k to last 3 sts of sole, k2tog, k1 | ||
<br /> | ||
Rnd 2: k around | ||
</p> | ||
<p> | ||
Rep rnds 1 and 2 until you have {props.state.fullStCount / 2} sts | ||
remaining. Then, rep rnd 1 twice more. | ||
</p> | ||
<p> | ||
At the end of your decreases, you should have{" "} | ||
{props.state.fullStCount / 2 - 8} sts remaining,{" "} | ||
{props.getMultiple((props.state.fullStCount / 2 - 8) / 2, 2)} on the | ||
instep and {props.getMultiple((props.state.fullStCount / 2 - 8) / 2, 2)}{" "} | ||
on the sole. | ||
</p> | ||
<p> | ||
Cut the yarn, leaving a tail long enough to graft the toe. Use the{" "} | ||
<a | ||
href="http://www.knitty.com/ISSUEsummer04/FEATtheresasum04.html" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Kitchener stitch | ||
</a>{" "} | ||
to graft the toe closed. | ||
</p> | ||
</div> | ||
); | ||
} | ||
|
||
export default CuffDownToe; | ||
export default CuffDownToe; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,52 @@ | ||
import React from 'react'; | ||
import React from "react"; | ||
|
||
function ShortRowHeel(props) { | ||
return ( | ||
<div id="shortRowHeel"> | ||
<h3>Heel</h3> | ||
<p>The short row heel is worked flat over the next {props.state.fullStCount / 2} sts, which are half your total sts. References to the first and last sts in these instructions refer to the first of this half and the last of this half of your sts, i.e. the heel sts.</p> | ||
return ( | ||
<div id="shortRowHeel"> | ||
<h3>Heel</h3> | ||
<p> | ||
The short row heel is worked flat over the next{" "} | ||
{props.state.fullStCount / 2} sts, which are half your total sts. | ||
References to the first and last sts in these instructions refer to the | ||
first of this half and the last of this half of your sts, i.e. the heel | ||
sts. | ||
</p> | ||
|
||
<h4>First half of the heel</h4> | ||
<p>Row 1 (RS): k across to last st, w&t<br /> | ||
Row 2 (WS): p back to first st, w&t<br /> | ||
Row 3 (RS): k to st before wrapped st, w&t<br /> | ||
Row 4 (WS): p to st before wrapped st, w&t</p> | ||
<h4>First half of the heel</h4> | ||
<p> | ||
Row 1 (RS): k across to last st, w&t | ||
<br /> | ||
Row 2 (WS): p back to first st, w&t | ||
<br /> | ||
Row 3 (RS): k to st before wrapped st, w&t | ||
<br /> | ||
Row 4 (WS): p to st before wrapped st, w&t | ||
</p> | ||
|
||
<p>Rep rows 3 and 4 until {props.getMultiple((props.state.fullStCount / 6), 2)} sts are left unwrapped, ending after a WS row.</p> | ||
<p> | ||
Rep rows 3 and 4 until{" "} | ||
{props.getMultiple(props.state.fullStCount / 6, 2)} sts are left | ||
unwrapped, ending after a WS row. | ||
</p> | ||
|
||
<h4>Second half of the heel</h4> | ||
<p>Row 1 (RS): k to first wrapped st, k the wrapped st while picking up the wrap, turn<br /> | ||
Row 2 (WS): sl1 wyif, p to first/next wrapped st, p the wrapped st while picking up the wrap, turn<br /> | ||
Row 3 (RS): sl1 wyib, k to next wrapped st, k the wrapped st while picking up the wrap, turn</p> | ||
<p>Rep rows 2 and 3 until all wraps have been picked up, ending with a RS row. You are now ready to continue in the rnd to work the rest of the sock.</p> | ||
</div> | ||
); | ||
<h4>Second half of the heel</h4> | ||
<p> | ||
Row 1 (RS): k to first wrapped st, k the wrapped st while picking up the | ||
wrap, turn | ||
<br /> | ||
Row 2 (WS): sl1 wyif, p to first/next wrapped st, p the wrapped st while | ||
picking up the wrap, turn | ||
<br /> | ||
Row 3 (RS): sl1 wyib, k to next wrapped st, k the wrapped st while | ||
picking up the wrap, turn | ||
</p> | ||
<p> | ||
Rep rows 2 and 3 until all wraps have been picked up, ending with a RS | ||
row. You are now ready to continue in the rnd to work the rest of the | ||
sock. | ||
</p> | ||
</div> | ||
); | ||
} | ||
|
||
export default ShortRowHeel; | ||
export default ShortRowHeel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,56 @@ | ||
import React from 'react'; | ||
import React from "react"; | ||
|
||
function SockAbbrevs(props) { | ||
return ( | ||
<div className="col-lg-4"> | ||
<p>These instructions are written for the magic loop or two circular needles methods, | ||
as they reference the first needle and second needle. To adapt for dpns, | ||
the first needle is dpn one and two and the second needle is dpn three and four.</p> | ||
<h3>Abbreviations</h3> | ||
<p className="abbrList"> | ||
BOR = beginning of round<br /> | ||
k = knit<br /> | ||
{props.direction === 'toeup' && | ||
<span> | ||
kfb = k in front and back of same st <br /> | ||
</span> | ||
} | ||
p = purl<br /> | ||
{props.heeltype === 'flap' && <span>p2tog = p two together<br /></span>} | ||
Rep = repeat<br /> | ||
Rnd(s) = round(s)<br /> | ||
RS = right side<br /> | ||
sl = slip (purlwise unless otherwise specified)<br /> | ||
{props.direction === 'cuffdown' && | ||
<span> | ||
ssk = <a href="https://www.lionbrand.com/faq/80.html?language=" | ||
target="_blank" rel="noopener noreferrer"> | ||
slip, slip, knit (left-leaning decrease) | ||
</a><br /> | ||
</span> | ||
} | ||
st(s) = stitch(es)<br /> | ||
WS = wrong side<br /> | ||
{props.heeltype === 'shortrow' && | ||
<span>w&t = <a href="http://www.purlsoho.com/create/2008/06/18/short-rows/" | ||
target="_blank" rel="noopener noreferrer">wrap and turn</a><br /></span> } | ||
wyib = with yarn in back<br /> | ||
wyif = with yarn in front | ||
</p> | ||
</div> | ||
); | ||
function SockAbbrevs({ direction, heeltype }) { | ||
return ( | ||
<div className="col-lg-4"> | ||
<p> | ||
These instructions are written for the magic loop or two circular | ||
needles methods, as they reference the first needle and second needle. | ||
To adapt for dpns, the first needle is dpn one and two and the second | ||
needle is dpn three and four. | ||
</p> | ||
<h3>Abbreviations</h3> | ||
<ul className="abbrList"> | ||
<li>BOR = beginning of round</li> | ||
<li>k = knit</li> | ||
{direction === "toeup" && <li>kfb = k in front and back of same st</li>} | ||
<li>p = purl</li> | ||
{heeltype === "flap" && <li>p2tog = p two together</li>} | ||
<li>Rep = repeat</li> | ||
<li>Rnd(s) = round(s)</li> | ||
<li>RS = right side</li> | ||
<li>sl = slip (purlwise unless otherwise specified)</li> | ||
{direction === "cuffdown" && ( | ||
<li> | ||
ssk ={" "} | ||
<a | ||
href="https://www.lionbrand.com/faq/80.html?language=" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
slip, slip, knit (left-leaning decrease) | ||
</a> | ||
</li> | ||
)} | ||
<li>st(s) = stitch(es)</li> | ||
<li>WS = wrong side</li> | ||
{heeltype === "shortrow" && ( | ||
<li> | ||
w&t ={" "} | ||
<a | ||
href="http://www.purlsoho.com/create/2008/06/18/short-rows/" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
wrap and turn | ||
</a> | ||
</li> | ||
)} | ||
<li>wyib = with yarn in back</li> | ||
<li>wyif = with yarn in front</li> | ||
</ul> | ||
</div> | ||
); | ||
} | ||
|
||
export default SockAbbrevs; | ||
export default SockAbbrevs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import React from 'react'; | ||
import ToeUpToe from './ToeUpToe'; | ||
import Foot from './Foot'; | ||
import ShortRowHeel from './ShortRowHeel'; | ||
import ToeUpCuff from './ToeUpCuff'; | ||
import React from "react"; | ||
import ToeUpToe from "./ToeUpToe"; | ||
import Foot from "./Foot"; | ||
import ShortRowHeel from "./ShortRowHeel"; | ||
import ToeUpCuff from "./ToeUpCuff"; | ||
|
||
function ToeUpPattern(props) { | ||
return( | ||
<div className="col-lg-8" id="toe-up-recipe"> | ||
<ToeUpToe state={props.state} /> | ||
<Foot state={props.state} /> | ||
<ShortRowHeel state={props.state} getMultiple={props.getMultiple} /> | ||
<ToeUpCuff state={props.state} /> | ||
</div> | ||
) | ||
return ( | ||
<div className="col-lg-8" id="toe-up-recipe"> | ||
<ToeUpToe fullStCount={props.state.fullStCount} /> | ||
<Foot state={props.state} /> | ||
<ShortRowHeel state={props.state} getMultiple={props.getMultiple} /> | ||
<ToeUpCuff state={props.state} /> | ||
</div> | ||
); | ||
} | ||
|
||
export default ToeUpPattern; | ||
export default ToeUpPattern; |
Oops, something went wrong.