Skip to content

docs: add github icon on top of demo.tutorialkit.dev TopBar #338

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 6 commits into from
Sep 20, 2024

Conversation

Charan167
Copy link
Contributor

  • Add Github icon link on top of demo.tutorialkit.dev TopBar
Recording.2024-09-19.214117.mp4

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@AriPerkkio AriPerkkio changed the title feat(dev): add github icon on top of demo.tutorialkit.dev TopBar docs: add github icon on top of demo.tutorialkit.dev TopBar Sep 20, 2024
@AriPerkkio AriPerkkio linked an issue Sep 20, 2024 that may be closed by this pull request
Copy link
Member

@AriPerkkio AriPerkkio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @Charan167!

This PR should only make changes to docs/demo/** files. Couple of changes below:

  • move the Github.tsx to docs/demo/src/components/Github.tsx
  • add docs/demo/src/components/TopBar.tsx with following:
    ---
    import Github from "./Github";
    ---
    
    <nav
      class="bg-tk-elements-topBar-backgroundColor transition-theme border-b border-tk-elements-app-borderColor flex max-w-full items-center p-3 px-4 min-h-[56px]"
    >
      <div class="flex flex-1">
        <slot name="logo" />
      </div>
      <div class="mr-2">
        <slot name="open-in-stackblitz-link" />
      </div>
    
      <Github />
    
      <div>
        <slot name="theme-switch" />
      </div>
      <div>
        <slot name="login-button" />
      </div>
    </nav>
  • define components.TopBar in docs/demo/astro.config.ts like this: https://github.com/AriPerkkio/tutorial-vite-plugin/pull/7/files#diff-baf06eda15601b59413c77e1f18884403033204061e6c9408cd9a3bb5bc6e586R10-R12

Now you should see the icon when running pnpm dev in docs/demo directory.

Copy link
Contributor Author

@Charan167 Charan167 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Moved Github.tsx to docs/demo/src/components/Github.tsx
  • Defined components.TopBar in docs/demo/astro.config.ts

Copy link
Member

@AriPerkkio AriPerkkio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @Charan167! 🎉

If you want to work more on improving the demo site, good next task would be to add editPageLink there: https://tutorialkit.dev/reference/configuration/#editpagelink.

@AriPerkkio AriPerkkio merged commit fea3318 into stackblitz:main Sep 20, 2024
10 checks passed
@Charan167
Copy link
Contributor Author

@AriPerkkio Sure!!! I've made the changes by adding editpagelink in the lesson’s frontmatter block. Please confirm if it's supposed to work like this.

Recording.2024-09-20.215159.mp4

@AriPerkkio
Copy link
Member

Yes, that's the intention. But it looks like the link is not working. Maybe the URL is not correct?

Here's Tutorial that has correctly working edit page link: https://tutorial-vite-plugin.pages.dev

@Charan167
Copy link
Contributor Author

@AriPerkkio Thank you for your help!!! I missed the demo part again 😅. I've made the necessary changes and created a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Github icon link on top of demo.tutorialkit.dev TopBar
2 participants