-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial addition of crossword player
this is a first pass, it needs work
- Loading branch information
Showing
18 changed files
with
967 additions
and
9 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -49,7 +49,7 @@ | |
"@guardian/identity-auth-frontend": "4.0.0", | ||
"@guardian/libs": "19.2.1", | ||
"@guardian/ophan-tracker-js": "2.2.5", | ||
"@guardian/react-crossword-next": "npm:@guardian/[email protected]20241128162754", | ||
"@guardian/react-crossword-next": "npm:@guardian/[email protected]20241209150926", | ||
"@guardian/shimport": "1.0.2", | ||
"@guardian/source": "8.0.0", | ||
"@guardian/source-development-kitchen": "12.0.0", | ||
|
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
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
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,6 @@ | ||
import { Crossword as ReactCrossword } from '@guardian/react-crossword-next'; | ||
import type { CrosswordProps } from '@guardian/react-crossword-next'; | ||
|
||
export const Crossword = ({ data }: CrosswordProps) => ( | ||
<ReactCrossword data={data} clueMinWidth={150} /> | ||
); |
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,28 @@ | ||
import { css } from '@emotion/react'; | ||
import { | ||
textEgyptian17, | ||
textEgyptianBold17, | ||
} from '@guardian/source/foundations'; | ||
|
||
const instructionsStyles = css` | ||
${textEgyptian17}; | ||
white-space: pre-line; | ||
`; | ||
|
||
const headerStyles = css` | ||
${textEgyptianBold17}; | ||
white-space: pre-line; | ||
`; | ||
|
||
export const CrosswordInstructions = ({ | ||
instructions, | ||
className, | ||
}: { | ||
instructions: string; | ||
className?: string; | ||
}) => ( | ||
<div css={instructionsStyles} className={className}> | ||
<strong css={headerStyles}>Special instructions: </strong> | ||
{instructions} | ||
</div> | ||
); |
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,34 @@ | ||
import { css } from '@emotion/react'; | ||
import { isUndefined } from '@guardian/libs'; | ||
import { textSans15 } from '@guardian/source/foundations'; | ||
import { palette } from '../palette'; | ||
|
||
const crosswordLinkStyles = css` | ||
${textSans15}; | ||
a { | ||
color: ${palette('--standfirst-link-text')}; | ||
text-decoration: none; | ||
:hover { | ||
border-bottom: 1px solid ${palette('--standfirst-link-border')}; | ||
} | ||
} | ||
`; | ||
|
||
export const CrosswordLinks = ({ | ||
crossword, | ||
className, | ||
}: { | ||
crossword: GuardianCrossword; | ||
className?: string; | ||
}) => { | ||
return ( | ||
isUndefined(crossword.pdf) || ( | ||
<span css={crosswordLinkStyles} className={className}> | ||
<a target="_blank" href={crossword.pdf} rel="noreferrer"> | ||
PDF version | ||
</a> | ||
</span> | ||
) | ||
); | ||
}; |
Oops, something went wrong.