Skip to content

Commit

Permalink
Annotation style
Browse files Browse the repository at this point in the history
  • Loading branch information
pomber committed Aug 28, 2023
1 parent def3362 commit 8d78b4f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/core/app/posts/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { allPosts } from "contentlayer/generated"
// import { Slideshow } from "../../slideshow"
// import { Code } from "../../code"
import { PostClient } from "./post.client"
import "./styles.css"

export const generateStaticParams = async () =>
allPosts.map(post => ({ slug: post._raw.flattenedPath }))
Expand Down
3 changes: 3 additions & 0 deletions packages/core/app/posts/[slug]/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.mark {
background: #222299;
}
4 changes: 2 additions & 2 deletions packages/core/posts/post-01.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Scrollycoding } from "../app/scrollycoding"
import { Slideshow } from "../app/slideshow"
import { Code } from "../app/code"

## This is an h2 from ab
## This is an h2 from absss

And a paragraphs

Expand All @@ -29,7 +29,7 @@ ho
lets

```js
console.log("hello 3")
console.log(2, 0)
```

go
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/differ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ function replaceTokens(
): TokenWithIdOrGroup[] {
const result: TokenWithIdOrGroup[] = []

console.log("replaceTokens", { tokens, tokensWithId })
debugger
tokens.forEach(tokenOrGroup => {
if ("tokens" in tokenOrGroup) {
result.push({
Expand Down
6 changes: 2 additions & 4 deletions packages/core/src/flip-tokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ function useTokensWithIds(
prevRef.current = result
}, [result])

console.log({ result })

return result
}

Expand All @@ -53,15 +51,15 @@ function TokenOrGroup({
}) {
if ("tokens" in token) {
return (
<span>
<span className={token.name}>
{token.tokens.map((token, i) => (
<TokenOrGroup token={token} key={i} />
))}
</span>
)
}

return token.style ? (
return "id" in token ? (
<span
style={{
...token.style,
Expand Down

0 comments on commit 8d78b4f

Please sign in to comment.