Skip to content

Commit

Permalink
Finalize the book and migrate from LeanPub to Gumroad
Browse files Browse the repository at this point in the history
  • Loading branch information
sapegin committed Oct 15, 2024
1 parent 0fa3918 commit b94db5e
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 14 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"Gollum",
"greppability",
"greppable",
"Gumroad",
"guten",
"hola",
"Hygraph",
Expand Down
Binary file modified public/images/book/spread.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 src/components/BookLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function BookLink({ book: { url, image, title, description } }: Props) {
</Box>
)}
<Stack direction="column" gap="s">
{url === '/book/' && <Text variant="flag">Just launched!</Text>}
<Text as="u" variant="large">
{title}
</Text>
Expand Down
3 changes: 2 additions & 1 deletion src/components/BookPostFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export function BookPostFooter() {
If you have any feedback, drop me a line at
</Feedback>
<Text>
<Link href="/book/">Preorder the book now</Link> with 20% discount!
<Link href="/book/">Get the book now</Link> with 50% launch
discount!
</Text>
</Stack>
<Link href="/book/">
Expand Down
4 changes: 3 additions & 1 deletion src/components/BookPostHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ export function BookPostHeader() {
<PostAddon>
<Stack direction="row" gap="m">
<Stack gap="m">
<Text variant="flag">Just launched!</Text>
<Text variant="intro">
You’re reading an excerpt of my upcoming book on clean code for
frontend developers, “Washing your code.”
</Text>
<Text>
<Link href="/book/">Preorder the book now</Link> with 20% discount!
<Link href="/book/">Get the book now</Link> with 50% launch
discount!
</Text>
</Stack>
<Link href="/book/">
Expand Down
10 changes: 10 additions & 0 deletions src/components/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ const text = cva({
lineHeight: 'base',
letterSpacing: 'base',
},
flag: {
fontFamily: 'body',
fontSize: 'base',
fontStyle: 'normal',
fontWeight: 'bold',
lineHeight: 'base',
letterSpacing: 'base',
textTransform: 'uppercase',
color: 'secondary',
},
},
},
});
Expand Down
36 changes: 24 additions & 12 deletions src/templates/BookPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const faq: FaqItem[] = [
{
question: 'Is the book complete?',
answer:
'Almost! I’m planning to finish the book by the end of summer 2024.',
'Yes! After five years of working on the book, it’s finally complete.',
},
{
question: 'Will the book be updated over time?',
Expand Down Expand Up @@ -106,19 +106,27 @@ const faq: FaqItem[] = [
question: 'Do you have a money-back guarantee policy?',
answer: (
<>
Yes, LeanPub has{' '}
<Link href="https://leanpub.com/refunds" target="_blank">
60-day money back
</Link>
.
Yes, I offer 30-day money back. Write me at{' '}
<Link href="mailto:[email protected]">[email protected]</Link> if you’re
unhappy with the book.
</>
),
},
{
question:
'I bought a book on LeanPub, can I get beautiful custom PDF and EPUB files?',
answer: (
<>
Absolutely, write me at{' '}
<Link href="mailto:[email protected]">[email protected]</Link>.
</>
),
},
{
question: 'Can I buy multiple copies for my team at a reduced price?',
answer: (
<>
Yes, write me at{' '}
Of course, write me at{' '}
<Link href="mailto:[email protected]">[email protected]</Link>.
</>
),
Expand All @@ -127,8 +135,8 @@ const faq: FaqItem[] = [
question: 'Do you offer purchasing power parity or student discounts?',
answer: (
<>
Write me at <Link href="mailto:[email protected]">[email protected]</Link>
, and we’ll think of something.
Gumroad offers purchasing power parity, for a student discount, write me
at <Link href="mailto:[email protected]">[email protected]</Link>.
</>
),
},
Expand All @@ -139,13 +147,13 @@ function TheButton() {
<Button
as="a"
variant="large"
href="http://leanpub.com/washingcode/c/blog-reader"
href="https://sapegin.gumroad.com/l/washingcode-book/rocket"
>
Preorder now!{' '}
Get the book!{' '}
<Box as="span" px="s" verticalAlign="middle" fontSize="s">
</Box>{' '}
<del>$20</del> $12
<del>20</del> €10
</Button>
);
}
Expand Down Expand Up @@ -383,6 +391,7 @@ export function BookPage({ url, chapters, patterns, antipatterns }: Props) {
<Page url={url}>
<Stack gap="xl">
<Stack gap="s">
<Text variant="flag">Just launched!</Text>
<Heading level={1}>Washing your code</Heading>
<Heading level={3} as="p">
A book on clean code for frontend developers
Expand Down Expand Up @@ -421,6 +430,9 @@ export function BookPage({ url, chapters, patterns, antipatterns }: Props) {
<Box>
<TheButton />
</Box>
<Text hidden>
<Link href="">Also available as a paperback on Amazon</Link>
</Text>
<Text>
<Link href="#toc">Or read selected chapters below</Link>
</Text>
Expand Down
2 changes: 2 additions & 0 deletions src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { type Config } from '@pandacss/dev';
export const colors = {
background: '#fff',
text: '#3a3d40',
secondary: '#75757c',
light: '#94949e',
border: '#3a3d40',
primary: '#577290',
Expand All @@ -23,6 +24,7 @@ export const colors = {
const colorsDark = {
background: '#2e3033',
text: '#e3e6e8',
secondary: '#94949e',
light: '#94949e',
border: '#dbe2e9',
primary: '#89abd2',
Expand Down

0 comments on commit b94db5e

Please sign in to comment.