Skip to content

Commit e11c30a

Browse files
committed
Merge remote-tracking branch 'origin/main' into joan/mobile-support
2 parents 2282ee7 + 42134c9 commit e11c30a

File tree

84 files changed

+1139
-215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1139
-215
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
- name: Setup
2626
uses: pnpm/action-setup@v4
2727
with:
28-
version: 8
28+
version: 8.15.6
2929
- name: Checkout
3030
uses: actions/checkout@v4
3131
- name: Install dependencies
3232
run: pnpm install
3333
- name: Lint
34-
run: pnpm prettier --check .
34+
run: pnpm lint
3535
- name: Build
3636
run: pnpm build
3737
- name: Test
@@ -44,7 +44,7 @@ jobs:
4444
- name: Setup
4545
uses: pnpm/action-setup@v4
4646
with:
47-
version: 8
47+
version: 8.15.6
4848
- name: Checkout
4949
uses: actions/checkout@v4
5050
- name: Install dependencies

docs/demo/src/content/tutorial/1-forms-css/1-introduction/1-welcome/_files/welcome.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
33
Hello, World!
44

docs/demo/src/content/tutorial/1-forms-css/1-introduction/1-welcome/content.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: Style up your forms!
44
slug: welcome
55
focus: /welcome.css
66
---
7+
78
:::info{noBorder=true title="Welcome!"}
89
This is a demo tutorial built with <a href="https://tutorialkit.dev" target="_blank">TutorialKit</a>. Although we use it for demonstration purposes, the lessons include actual CSS techniques, so we hope you'll enjoy them and learn something new!
910
:::
@@ -12,4 +13,4 @@ This is a demo tutorial built with <a href="https://tutorialkit.dev" target="_bl
1213

1314
Forms are an incredibly common set of HTML elements – they are a part of almost every web app – but styling them is often not as straightforward as styling a typical `div` or `section`.
1415

15-
This tutorial will let you learn and experiment with some practical techniques that will help elevate your form's CSS to the next level!
16+
This tutorial will let you learn and experiment with some practical techniques that will help elevate your form's CSS to the next level!

docs/demo/src/content/tutorial/1-forms-css/2-colors/1-accent-color/content.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ Such colors might not fit your brand, or the current theme of your application.
1515

1616
Thankfully, you can change them, and the good news is: you only need one CSS property to do that!
1717

18-
1918
Try setting `accent-color` for the whole document by adding the following code inside the `body` selector:
2019

21-
```css add={2}
20+
```css add={2}
2221
body {
23-
accent-color: #ff3399;
22+
accent-color: #ff3399;
2423
}
25-
```
24+
```

docs/demo/src/content/tutorial/1-forms-css/2-colors/2-progressbar/content.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Although `accent-color` that we've set in the previous step already impacts this
1414

1515
Let's start by setting removing the border from the element. As you do it, you will notice that it will also change other aspects of the default appearance, like the height and radius.
1616

17-
```css add={2}
17+
```css add={2}
1818
progress {
19-
border: none;
19+
border: none;
2020
}
21-
```
21+
```

docs/demo/src/content/tutorial/1-forms-css/2-colors/3-more-progressbar/content.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ template: default
88

99
## Styling the `<progress>`
1010

11-
Now that the default appearance is turned off, we can start customizing the element. Progress bar consists of two parts:
11+
Now that the default appearance is turned off, we can start customizing the element. Progress bar consists of two parts:
1212

1313
- `progress-bar`
1414
- `progress-value`
@@ -17,12 +17,12 @@ Note: this part is not a standardized CSS yet, so when creating these two select
1717

1818
```css
1919
progress::-webkit-progress-bar {
20-
/* ... */
20+
/* ... */
2121
}
2222

2323
progress::-webkit-progress-value {
24-
/* ... */
24+
/* ... */
2525
}
2626
```
2727

28-
In `style.css` you already see these selectors. Try styling them up: set `background` and `border-radius` to values you like!
28+
In `style.css` you already see these selectors. Try styling them up: set `background` and `border-radius` to values you like!

docs/demo/src/content/tutorial/1-forms-css/2-colors/4-handle-firefox/content.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ We should make sure only browsers that can support this kind of customization ap
1818
}
1919
```
2020

21-
In `style.css` you already see these selectors. Try styling them up: set `background` and `border-radius` to values you like!
21+
In `style.css` you already see these selectors. Try styling them up: set `background` and `border-radius` to values you like!

docs/demo/src/content/tutorial/1-forms-css/3-fieldset/1-fieldset-element/content.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ slug: fieldset-element
55
focus: /index.html
66
---
77

8-
The `<fieldset>` HTML element groups related form controls, such as buttons, inputs, textareas, and labels, within a web form.
8+
The `<fieldset>` HTML element groups related form controls, such as buttons, inputs, textareas, and labels, within a web form.
99

1010
This allows you to apply common styling and functional rules to the entire set of elements. Let's take a closer look at working with fieldsets!
1111

12-
The current forms includes 6 inputs and we will want each pair to be visually and logically grouped together.
12+
The current forms includes 6 inputs and we will want each pair to be visually and logically grouped together.
1313

1414
Create **3 fieldsets** by wrapping them around the markup responsible for displaing the form fields:
1515

@@ -24,4 +24,4 @@ Create **3 fieldsets** by wrapping them around the markup responsible for displa
2424
<input id="q_2" />
2525
</div>
2626
</fieldset>
27-
```
27+
```

docs/demo/src/content/tutorial/1-forms-css/3-fieldset/2-a-legend/content.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ slug: a-legend
55
focus: /index.html
66
---
77

8-
Even with the default styling `<fieldset>` already visually separates one group of form controls from another.
9-
It might be better to explain to a form user what each group represents. That's the purpose of a `<legend>` element.
8+
Even with the default styling `<fieldset>` already visually separates one group of form controls from another.
9+
It might be better to explain to a form user what each group represents. That's the purpose of a `<legend>` element.
1010

1111
Let's add a legend to each of our fieldsets:
1212

@@ -22,4 +22,4 @@ Let's add a legend to each of our fieldsets:
2222
<input id="q_2" />
2323
</div>
2424
</fieldset>
25-
```
25+
```

docs/demo/src/content/tutorial/1-forms-css/3-fieldset/3-fieldset-styling/content.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ slug: fieldset-styling
55
focus: /style.css
66
---
77

8-
Our HTML looks great, but the default styles leave a lot of room for improvements. Thankfully, the way `<fieldset>` and `<legend>` look like can be customized with a standard CSS.
8+
Our HTML looks great, but the default styles leave a lot of room for improvements. Thankfully, the way `<fieldset>` and `<legend>` look like can be customized with a standard CSS.
99

10-
Here some of these styles have already been applied (note the `border-style: solid` in line #3 – see what changes if you comment it out) but they still need some finishing touches!
10+
Here some of these styles have already been applied (note the `border-style: solid` in line #3 – see what changes if you comment it out) but they still need some finishing touches!
1111

1212
Try adjusting the properties of these elements to make each fieldset look like this:
1313

14-
<img src="/images/fieldset-styles.png" class="m-auto my-6 w-full max-w-120">
14+
<img src="/images/fieldset-styles.png" class="m-auto my-6 w-full max-w-120">

docs/demo/src/content/tutorial/1-forms-css/3-fieldset/5-focus-within/content.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Focus within
44
slug: focus-within
55
focus: /style.css
66
---
7-
A great way to give our visitors a pointer to where they are in the form is the `:focus` state. The most common way to apply it is by highlighting the currently focused form controls like buttons and inputs. But now that the fieldset provides us with a higher level of organization for the form, we can also highlight it to give even better visual guidance!
7+
A great way to give our visitors a pointer to where they are in the form is the `:focus` state. The most common way to apply it is by highlighting the currently focused form controls like buttons and inputs. But now that the fieldset provides us with a higher level of organization for the form, we can also highlight it to give even better visual guidance!
88

99
Although `<fieldset>` doesn't have its own `:focus` state, we can use a similar pseudo-selector, called `:focus-within`. It will match whenever a descendant of the targeted element gets focus. In the case of our form, we can add it on fieldset to make it apply style when an input inside focuses.
1010

@@ -18,4 +18,4 @@ fieldset:focus-within legend {
1818
color: #00a9;
1919
border-color: #00a6;
2020
}
21-
```
21+
```

docs/demo/src/content/tutorial/1-forms-css/3-fieldset/6-the-end/content.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ focus: /style.css
66
---
77
You've reached the end of this tutorial! We hope you've enjoyed it and learned something new about working with CSS and forms.
88

9-
This app was built using the TutorialKit framework and you can make a similiar learning resource for your team or open-source community yourself! TutorialKit provides all the necessary tooling, and UI out of the box, so that you can focus on the content.
9+
This app was built using the TutorialKit framework and you can make a similiar learning resource for your team or open-source community yourself! TutorialKit provides all the necessary tooling, and UI out of the box, so that you can focus on the content.
1010

11-
To learn more, visit <a href="https://tutorialkit.dev">tutorialkit.dev</a>.
11+
To learn more, visit <a href="https://tutorialkit.dev">tutorialkit.dev</a>.

docs/tutorialkit.dev/astro.config.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { defineConfig } from 'astro/config';
21
import react from '@astrojs/react';
32
import starlight from '@astrojs/starlight';
3+
import { defineConfig } from 'astro/config';
44
import starlightLinksValidator from 'starlight-links-validator';
55

66
// https://astro.build/config
@@ -24,7 +24,7 @@ export default defineConfig({
2424
{
2525
label: 'Guides',
2626
items: [
27-
// Each item here is one entry in the navigation menu.
27+
// each item here is one entry in the navigation menu
2828
{
2929
label: 'About',
3030
link: '/guides/about/',
@@ -52,9 +52,6 @@ export default defineConfig({
5252
],
5353
},
5454
],
55-
// social: {
56-
// github: 'https://github.com/withastro/starlight',
57-
// },
5855
tableOfContents: {
5956
maxHeadingLevel: 5,
6057
},

docs/tutorialkit.dev/src/components/Buttons/Button/Button.module.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
align-items: center;
88
justify-content: center;
99
height: 52px;
10-
// width: fit-content;
1110
padding: 1px 40px 0;
1211
border-radius: 26px;
1312
color: var(--custom-color-text-strong);
@@ -20,10 +19,12 @@
2019
backdrop-filter: blur(8px);
2120
transition: var(--transition-fast);
2221
transition-property: background-color, box-shadow, color;
22+
2323
[data-theme='light'] & {
2424
--outline-color-hsl: 0, 0%, 0%;
2525
background-color: hsla(224, 32%, 28%, 0.08);
2626
}
27+
2728
&:hover {
2829
--outline-opacity: 0.1;
2930
color: var(--custom-color-text-strong) !important; // !important for starlight override only
@@ -38,6 +39,7 @@
3839
color: #fff !important; // !important for starlight override only
3940
box-shadow: inset 0 1px 0 1px rgba(255, 255, 255, 0.16);
4041
background-color: #1488fc;
42+
4143
&:hover {
4244
background-color: #2793ff;
4345
}

docs/tutorialkit.dev/src/components/Layout/Head.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Default from '@astrojs/starlight/components/Head.astro';
77

88
{/* Google Tag Manager */}
99
<script is:inline async src="https://www.googletagmanager.com/gtag/js?id=G-64MFE82HG5"></script>
10+
1011
<script is:inline>
1112
window.dataLayer = window.dataLayer || [];
1213
function gtag() {

docs/tutorialkit.dev/src/content/docs/guides/about.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ TutorialKit is an open source tool that enables you to create interactive code t
77

88
TutorialKit enables you to spin spin up a live interactive tutorial site in minutes complete with:
99

10-
- Code editor with syntax highlighting
10+
- Code editor with syntax highlighting
1111
- Live dev server preview that updates as learners experiment with your tutorial code
1212
- Interactive terminal
1313
- User friendly “Show me the answer” capability
@@ -17,8 +17,8 @@ TutorialKit enables you to spin spin up a live interactive tutorial site in minu
1717

1818
## Getting started
1919

20-
This documentation will guide you through the steps to build your first interactive tutorial.
20+
This documentation will guide you through the steps to build your first interactive tutorial.
2121

2222
As the first step, see the [Installation](/guides/installation/) page to learn how to generate the project, and once you do, learn the basics of creating the content and corresponding code in [Creating a Lesson](/guides/creating-content/).
2323

24-
This will give you the basics needed to start compiling your training materials into an interactive onboarding experience. However, you'll likely want to customize that experience to fit your specific needs. For that, TutorialKit offers a range of configuration and theming options, which we have covered in the [Configuration](/guides/configuration) page.
24+
This will give you the basics needed to start compiling your training materials into an interactive onboarding experience. However, you'll likely want to customize that experience to fit your specific needs. For that, TutorialKit offers a range of configuration and theming options, which we have covered in the [Configuration](/guides/configuration) page.

docs/tutorialkit.dev/src/content/docs/guides/creating-content.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ title: Welcome to TutorialKit
4848
---
4949

5050
# Kitchen Sink [Heading 1]
51-
Lorem ipsum dolor
51+
Lorem ipsum dolor
5252
<!-- ... -->
5353
```
5454

55-
This is a Markdown file with a frontmatter block at the top (marked by a single `---` line at the beginning of the file and another `---` line to close the block).
55+
This is a Markdown file with a frontmatter block at the top (marked by a single `---` line at the beginning of the file and another `---` line to close the block).
5656

5757
The frontmatter block contains metadata about the lesson, such as the title, description, and other properties that will allow you to configure this specific lesson.
5858

@@ -79,9 +79,9 @@ This will change the URL of the lesson to `localhost:4321/1-basics/1-introductio
7979

8080
## A lesson code
8181

82-
Beside the `content.md` file in a lesson's directory, you will find two folders:
83-
- `_files`
84-
- `_solution`
82+
Beside the `content.md` file in a lesson's directory, you will find two folders:
83+
- `_files`
84+
- `_solution`
8585

8686
The `_files` folder contains any code files that are part of the lesson. For example, if the lesson revolves around React components, you might have a `Button.jsx` file there. The content of this file will be displayed in the tutorial app's code editor and will be run in its preview. You can place any number of files in this folder.
8787

@@ -95,17 +95,17 @@ The `_solution` folder contains the code for the lesson in its solved state. Thi
9595

9696
For the code to run in the preview, it must be an actual, working application, including a dev server and any necessary configuration files. Usually, it's not practical to include this kind of boilerplate files in a lesson content (and copy it for every further lesson!). Instead, you can use the `template` feature of TutorialKit to provide a base project that will be used for all lessons.
9797

98-
To display the code in the preview of a lesson, TutorialKit will use the template project and apply the content of the `_files` (or `_solution`) folder on top of it.
98+
To display the code in the preview of a lesson, TutorialKit will use the template project and apply the content of the `_files` (or `_solution`) folder on top of it.
9999

100-
You can find the default template in the `src/templates/default` directory. This is a Vite project which is a great starting point for a vanilla JavaScript app. Note, that when you navigate to that folder and run `npm run dev` inside, it will be a fully working Vite project.
100+
You can find the default template in the `src/templates/default` directory. This is a Vite project which is a great starting point for a vanilla JavaScript app. Note, that when you navigate to that folder and run `npm run dev` inside, it will be a fully working Vite project.
101101

102102
You can modify this template to fit your needs, or create a new one from scratch. You can also have multiple templates and switch between them for different parts of your tutorial. To do that, you need to specify the template name in the **lesson's**, **chapter's**, or **part's** front matter block:
103103

104104
```markdown {3}
105105
---
106106
title: Advanced Topics
107-
template: my-advanced-template
107+
template: my-advanced-template
108108
---
109109
```
110110

111-
This declaration will make TutorialKit use the `src/templates/my-advanced-template` directory as the base for the lesson.
111+
This declaration will make TutorialKit use the `src/templates/my-advanced-template` directory as the base for the lesson.

docs/tutorialkit.dev/src/content/docs/guides/deployment.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Deploying TutorialKit to production"
44
---
55
import PackageManagerTabs from '@components/Tabs/PackageManagerTabs.astro'
66

7-
Your TutorialKit project is a static site built using two key technologies: [Astro](https://astro.build/) and [WebContainers](https://webcontainers.io/). These two elements shape the details how you deploy TutorialKit to production.
7+
Your TutorialKit project is a static site built using two key technologies: [Astro](https://astro.build/) and [WebContainers](https://webcontainers.io/). These two elements shape the details how you deploy TutorialKit to production.
88

99
In the following sections you will learn more about the build process and the deployment configuration.
1010

@@ -30,7 +30,7 @@ To prepare the production build of your TutorialKit project, run the following c
3030
</Fragment>
3131
</PackageManagerTabs>
3232

33-
This will generate a `dist` directory containing the static files that make up your TutorialKit project.
33+
This will generate a `dist` directory containing the static files that make up your TutorialKit project.
3434

3535
You can learn more about the build process in the [Astro documentation](https://docs.astro.build/en/reference/cli-reference/#astro-build).
3636

@@ -107,4 +107,4 @@ You can configure headers your `vercel.json` file:
107107
}
108108
```
109109

110-
Read more about [headers on Vercel](https://vercel.com/docs/concepts/projects/project-configuration#headers).
110+
Read more about [headers on Vercel](https://vercel.com/docs/concepts/projects/project-configuration#headers).

docs/tutorialkit.dev/src/content/docs/guides/installation.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ Run the following command in your terminal to start the install wizard:
2828
</Fragment>
2929
<Fragment slot="yarn">
3030
```shell
31-
# create a new project with Yarn
32-
31+
# create a new project with Yarn
3332
yarn create tutorial
3433
```
3534
</Fragment>

docs/tutorialkit.dev/src/content/docs/guides/ui.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ Code edits made by a user are automatically picked up by a Preview app's dev ser
3636

3737
### Preview
3838

39-
The preview displays the application which is a result of applying lesson files to the [code template](/guides/creating-content/#code-templates) and running that code.
39+
The preview displays the application which is a result of applying lesson files to the [code template](/guides/creating-content/#code-templates) and running that code.
4040

4141
<Image src={uiPreviewImage} alt="TutorialKit's Preview" />
4242

4343
Before your application template's dev server opens a port with something to be displayed, the preview shows the preparation steps such as "Installing dependencies", "Starting HTTP server" to indicate progress to the user. Note that you can customize these steps for each lesson, chapter or part of the tutorial (see: [prepareCommands](/guides/configuration/#preparecommands) reference).
4444

45-
The preview updates in real-time as the user makes changes to the code, chooses to see the solution or navigates between lessons.
45+
The preview updates in real-time as the user makes changes to the code, chooses to see the solution or navigates between lessons.
4646

4747
### Terminal
4848

4949
The terminal displays the output of your demo application's dev server.
5050

51-
<Image src={uiTerminalImage} alt="TutorialKit's Terminal" />
51+
<Image src={uiTerminalImage} alt="TutorialKit's Terminal" />

0 commit comments

Comments
 (0)