Skip to content
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

🆕 Add Tutorial content type #768

Merged
merged 48 commits into from
Jul 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5edaa06
Add DB migration script
May 20, 2024
fcb3f46
Add development dataset switch
Snugug Jun 3, 2024
c5c9e50
Add I/O 2024 theme
Snugug Jun 3, 2024
9047035
Improve borders, especially on the home page
Snugug Jun 4, 2024
15aff31
Add archive build and serve options
Snugug Jun 4, 2024
57132e5
Remove unused codepaths from Sanity
Snugug Jun 4, 2024
2253634
WIP Tutorial content type
Snugug Jun 4, 2024
63541b7
Updated Tutorial schema
Jun 5, 2024
6ea5bb2
Add tutorial microcopy
Jun 12, 2024
2d9a925
Simplify tutorial content type
Jun 12, 2024
6b41b69
Add back and forward direction to generic CTAs
Jun 12, 2024
d6445d0
Add Software component
Jun 12, 2024
2728fee
Update CTA styling if icons are present
Jun 12, 2024
4621a91
Tutorial query and types
Jun 12, 2024
4cae728
Adapt doc layout to include generic content area, not just type conte…
Jun 12, 2024
30f1499
Add tutorial templates
Jun 12, 2024
b389b13
Clean up logging
Jun 13, 2024
deca8f5
Fix CLI build
Snugug Jun 13, 2024
793511f
Merge branch 'feature/tutorial' of github.com:chromeos/chromeos.dev i…
Snugug Jun 13, 2024
9f3a531
Fix Code filename
Jun 17, 2024
8cc56e1
Make cursor pointer for reinforcement
Jun 17, 2024
b85a73b
Fix canvas taking over page on load by only triggering if visible
Jun 17, 2024
1b54cb3
Only include file download/link if on intro
Jun 17, 2024
83d27b2
Fix prerequisite rendering
Jun 17, 2024
ddd33c7
Merge branch 'feature/tutorial' of github.com:chromeos/chromeos.dev i…
Jun 17, 2024
f03dcad
Remove unneeded log
Jun 17, 2024
85bbdf0
Remove broken ESLint rule
Jun 21, 2024
8ea2e2a
Make some Sanity queries reusable, for previews
Jun 21, 2024
36cdbde
Add views path to TSConfig
Jun 21, 2024
1408661
Add dark mode outline
Jun 21, 2024
420a46c
Export TOC title
Jun 21, 2024
0af4e4b
Fix dark mode color
Jun 21, 2024
33f05d1
Migrate preview-able content to Views
Jun 21, 2024
e0e1723
Add Preview route
Jun 21, 2024
0e690a1
Update Preview view to support final implementation
Jun 21, 2024
b3897b0
Include sanity API info for preview
Jun 21, 2024
1755517
Merge branch 'main' into feature/tutorial
Snugug Jun 21, 2024
caade11
Update for sharing overrides
Jun 21, 2024
e62e4bf
Add preview generation log
Jun 21, 2024
2d4e29c
Remove recommended
Jul 1, 2024
af9b7b4
Add Preview Key to env vars
Jul 1, 2024
db3637b
Fix linting
Jul 1, 2024
8e00742
Move slugify to proper dependency
Jul 1, 2024
a9e7cf2
More dependnecies moving up
Jul 1, 2024
bf9ca52
Swap Prism for Shiki
Jul 1, 2024
fa110ad
Update PNPM lock
Jul 1, 2024
bf73a18
Swap preview URL depending on mode, for working against localhost
Jul 1, 2024
f9093f5
Remove env logging
Jul 1, 2024
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
Prev Previous commit
Next Next commit
Add preview generation log
Sam Richard committed Jun 21, 2024
commit e62e4bfb6f7dd76d5ea3a952cacef57a3463fefb
8 changes: 5 additions & 3 deletions site/src/pages/preview.astro
Original file line number Diff line number Diff line change
@@ -59,6 +59,8 @@ if (item._type === 'tutorial') {
// console.log(microcopy);
pages = buildPages({ [item._lang]: microcopy })(item).map((p) => p.props);
}

console.log('Generating preview');
---

{
@@ -73,9 +75,9 @@ if (item._type === 'tutorial') {

{
item._type === 'tutorial' && pages.length > 0 && (
<div class="holder">
<div class='holder'>
{pages.map((p) => (
<div class="page">
<div class='page'>
<Tutorial
tutorial={item}
microcopy={microcopy}
@@ -92,7 +94,7 @@ if (item._type === 'tutorial') {

<!-- <p class='url'>https://chromeos.dev{item._path}</p> -->

<style lang="scss">
<style lang='scss'>
.holder {
--first: var(--red-500);
--second: var(--yellow-100);