Skip to content

v0.7.0 #230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/bundle_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Cache node modules
uses: actions/cache@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Cache node modules
uses: actions/cache@v1
Expand Down
4 changes: 3 additions & 1 deletion examples/docusaurus/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
sidebar_position: 1
---

### Lorem ipsum
# Introduction

## Lorem ipsum

```python hello.py
# mark[22:30]
Expand Down
6 changes: 3 additions & 3 deletions examples/docusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
},
"dependencies": {
"@code-hike/mdx": "^0.6.2",
"@docusaurus/core": "2.0.0-beta.18",
"@docusaurus/preset-classic": "2.0.0-beta.18",
"@docusaurus/core": "2.0.0-rc.1",
"@docusaurus/preset-classic": "2.0.0-rc.1",
"@mdx-js/react": "^2.1.1",
"clsx": "^1.1.1",
"docusaurus-theme-mdx-v2": "^0.1.1",
"docusaurus-theme-mdx-v2": "^0.1.2",
"prism-react-renderer": "^1.3.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
Expand Down
3 changes: 3 additions & 0 deletions examples/nextjs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Next.js + Code Hike

See [this guide](https://codehike.org/docs/installation/nextjs) or try it on [Stackblitz](https://stackblitz.com/github/code-hike/codehike/tree/main/examples/nextjs).
6 changes: 5 additions & 1 deletion examples/nextjs/pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import "@code-hike/mdx/styles"

function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
return (
<article style={{ maxWidth: 768, margin: "0 auto" }}>
<Component {...pageProps} />
</article>
)
}

export default MyApp
9 changes: 0 additions & 9 deletions examples/nextjs/pages/index.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ print("Rendered with Code Hike")
```

Lorem ipsum dolor sit amet.

See also [Scrollycoding page](/scrollycoding).
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Scrollycoding with preview
# Scrollycoding

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel fringilla est ullamcorper eget. At imperdiet dui accumsan sit amet nulla facilities morbi tempus. Praesent elementum facilisis leo vel fringilla. Congue mauris rhoncus aenean vel. Egestas sed tempus urna et pharetra pharetra massa massa ultricies.

Consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel fringilla est ullamcorper eget. At imperdiet dui accumsan sit amet nulla facilities morbi tempus. Praesent elementum facilisis leo vel fringilla. Congue mauris rhoncus aenean vel. Egestas sed tempus urna et pharetra pharetra massa massa ultricies.

<CH.Scrollycoding preset="https://codesandbox.io/s/w5wfe">
<CH.Scrollycoding>

## Step 1

Expand All @@ -14,23 +14,35 @@ Lorem ipsum dolor sit amet, consectetur adipiscing something about points, sed d
> ad diffusa illis voluisti fidensque coniugiale laniata curam. Aras rivus
> eripuit, qua fistula haec partus; serpens, negat.

Consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel fringilla est ullamcorper eget.

Praesent elementum facilisis leo vel fringilla est ullamcorper eget. At imperdiet dui accumsan sit amet nulla facilities morbi tempus.

```jsx src/App.js
import { motion } from "framer-motion"

export default function App() {
const bg = "hsl(20, 100%, 50%)"
return (
<motion.div
className="swatch"
animate={{ backgroundColor: bg }}
transition={{ duration: 1 }}
/>
)
}
```js app.js focus=3:10
const { lorem, ipsum } = dolor({
sit: {
amet: 1,
consectetur: 2,
adipiscing: (elit) => ({
sed: elit,
}),
eiusmod: (tempor) => ({
incididunt: tempor,
}),
ut: (labore) => ({
et: labore,
dolore: labore + 1,
}),
magna: (aliqua) => ({
ut: aliqua,
}),
nostrud: (elit) => ({
exercitation: elit,
ullamco: elit,
}),
laboris: (elit) => ({
nisi: elit,
}),
},
})
```

---
Expand All @@ -45,19 +57,8 @@ Id aliquet risus feugiat in ante metus dictum at tempor. Sed blandit libero volu

Morbi quis commodo.

```jsx src/App.js focus=1,4,6:10
import { motion } from "framer-motion"

export default function App() {
const bg = "hsl(110, 100%, 50%)"
return (
<motion.div
className="swatch"
animate={{ backgroundColor: bg }}
transition={{ duration: 1 }}
/>
)
}
```js app.js focus=11:17

```

---
Expand All @@ -72,19 +73,30 @@ Id aliquet risus feugiat in ante metus dictum at tempor. Sed blandit libero volu

Ut consequat semper viverra. Fringilla ut morbi tincidunt augue interdum velit euismod.

```jsx src/App.js focus=1,4,6:10
import { motion } from "framer-motion"

export default function App() {
const bg = "hsl(200, 100%, 50%)"
return (
<motion.div
className="swatch"
animate={{ backgroundColor: bg }}
transition={{ duration: 1 }}
/>
)
}
```js app.js focus=11:14
const { lorem, ipsum } = dolor({
sit: {
amet: 1,
consectetur: 2,
adipiscing: (elit) => ({
sed: elit,
}),
eiusmod: (tempor) => ({
incididunt: tempor,
}),
ut: (labore) => ({
et: lorem(labore * ipsum),
dolore: lorem(labore + 1),
}),
nostrud: (elit) => ({
exercitation: elit,
ullamco: elit,
}),
laboris: (elit) => ({
nisi: elit,
}),
},
})
```

---
Expand All @@ -100,19 +112,8 @@ Sed blandit libero volutpat sed cras.

Gravida in fermentum et sollicitudin ac orci phasellus egestas tellus. Volutpat consequat mauris nunc congue nisi vitae.

```jsx src/App.js focus=1,4,6:10
import { motion } from "framer-motion"

export default function App() {
const bg = "hsl(290, 100%, 50%)"
return (
<motion.div
className="swatch"
animate={{ backgroundColor: bg }}
transition={{ duration: 1 }}
/>
)
}
```js app.js focus=15:21

```

---
Expand All @@ -132,19 +133,8 @@ Mi bibendum neque egestas congue quisque egestas diam in arcu. Nisi lacus sed vi

Morbi quis commodo.

```jsx src/App.js focus=1,4,6:10
import { motion } from "framer-motion"

export default function App() {
const bg = "hsl(10, 100%, 50%)"
return (
<motion.div
className="swatch"
animate={{ backgroundColor: bg }}
transition={{ duration: 1 }}
/>
)
}
```js app.js

```

</CH.Scrollycoding>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"scripts": {
"build": "lerna run --stream build",
"build:lib": "lerna run --stream --scope @*/mdx build",
"watch": "lerna run --stream --scope @*/mdx watch",
"build:playground": "lerna run --stream --scope playground build",
"test": "lerna run --stream test",
"dev": "lerna run --stream --scope @*/mdx dev",
Expand Down
Loading