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

Feat/templates #366

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
37844f5
chore: remove vercel analytics
GugaGongadze Mar 21, 2024
15c56dd
fix: replace useLayoutEffect with useEffect for burger icon
GugaGongadze Mar 21, 2024
6aac89c
fix: move meta tag to _app
GugaGongadze Mar 21, 2024
03a2c61
feat: template page ui
GugaGongadze Mar 22, 2024
6f2142c
feat: template details
GugaGongadze Apr 17, 2024
f2598c6
refactor: templates filter group
GugaGongadze Apr 17, 2024
ebb95e8
fix: templates details
GugaGongadze Apr 17, 2024
7b167d1
fix: template details responsive
GugaGongadze Apr 17, 2024
1ff2f72
fix: movile
GugaGongadze Apr 17, 2024
4447d99
fix: input outline
GugaGongadze Apr 17, 2024
647ea99
fix: fallback for missing path
GugaGongadze Apr 17, 2024
9da7477
fix: check for path existence
GugaGongadze Apr 17, 2024
e82f617
fix: check for starters existence
GugaGongadze Apr 17, 2024
9117cc3
fix: remove screen height
GugaGongadze Apr 17, 2024
cacc72b
fix: make whole card clickable
GugaGongadze Apr 18, 2024
7f173e1
fix: gradient glow bg
GugaGongadze Apr 18, 2024
e023a68
fix: tags and usecases filter logic
GugaGongadze Apr 18, 2024
a4a7a38
fix: launch button bgs
GugaGongadze Apr 18, 2024
f7f2eb2
refactor: template details components
GugaGongadze Apr 18, 2024
590e5b2
fix: reduce copy button size
GugaGongadze Apr 18, 2024
b621bd8
fix: scrollbar color
GugaGongadze Apr 18, 2024
de3f968
fix: svg prop names
GugaGongadze Apr 18, 2024
68e80a2
fix: display all templates
GugaGongadze Apr 18, 2024
3c02643
fix: template types
GugaGongadze Apr 18, 2024
5d0f5a6
fix: template officiality
GugaGongadze Apr 18, 2024
df030cf
feat: pagination
GugaGongadze Apr 18, 2024
7d2018f
fix:12 items per page
GugaGongadze Apr 18, 2024
535bf49
fix: static paths
GugaGongadze Apr 18, 2024
dff7edd
fix: pre overflow
GugaGongadze Apr 18, 2024
d479cf1
fix: use templates images
GugaGongadze Apr 19, 2024
8c71b4b
fix: hover effect on templates cards
GugaGongadze Apr 19, 2024
714b7dc
fix: checkboxes
GugaGongadze Apr 19, 2024
164e984
fix: logos type
GugaGongadze Apr 19, 2024
3808afe
fix: remove article button
GugaGongadze Apr 23, 2024
bd6ae5d
Templates Instructions
Senofy Sep 24, 2024
f68cd02
Template font and spacing fixes, plus added types filter
Senofy Sep 27, 2024
8b0d7da
Templates contribute launch update
Senofy Oct 1, 2024
b2fd598
added filters see more logic, updated copy, fixed contribute button, …
ivancernja Oct 15, 2024
5f66932
Update index.tsx
joshua-mo-143 Oct 24, 2024
901699b
Merge pull request #1 from joshua-mo-143/joshua-mo-143-patch-1
ivancernja Oct 24, 2024
11d5894
feat: fix command copies, readme text, h1 text size
joshua-mo-143 Oct 24, 2024
15e10bc
Merge pull request #2 from joshua-mo-143/fix-ivan-templates
ivancernja Oct 25, 2024
d77e75f
fix: bug fixes and changes
joshua-mo-143 Oct 28, 2024
8590c47
fix: markdown ord list formatting
joshua-mo-143 Oct 28, 2024
b50ee76
fix: add white bg to logos
joshua-mo-143 Oct 29, 2024
1b243a4
fix: search breaks on search query on second page
joshua-mo-143 Oct 30, 2024
26c9103
Merge pull request #3 from joshua-mo-143/fix/round-2-fixes-ivan-templ…
ivancernja Oct 31, 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
2 changes: 1 addition & 1 deletion components/elements/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function Markdown({ body }: { body: string }) {
<ReactMarkdown
remarkPlugins={[remarkGfm4]}
components={{
h1: ({ children }) => <h1 className='mb-3 text-sm text-body'>{children}</h1>,
h1: ({ children }) => <h1 className='mb-3 text-2xl text-head'>{children}</h1>,
h2: ({ children }) => <h2 className='mb-2 text-xl text-head'>{children}</h2>,
p: ({ children }) => <p className='mb-8 text-sm text-body'>{children}</p>,
li: ({ children }) => <li className='mb-1 ml-4 list-disc text-sm text-body'>{children}</li>,
Expand Down
10 changes: 7 additions & 3 deletions components/sections/Templates/TemplateInit.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CopyButton } from 'components/elements'

export default function TemplateInit({ path }: { path: string }) {
export default function TemplateInit({ path, template }: { path: string; template: string | null }) {
return (
<div className='mb-3 flex w-full items-center justify-between rounded-xl bg-[#121212] text-xs text-head'>
<pre
Expand All @@ -9,8 +9,12 @@ export default function TemplateInit({ path }: { path: string }) {
scrollbarWidth: 'thin',
}}
className='overflow-x-scroll p-4'
>{`cargo shuttle init --from ${path}`}</pre>
<CopyButton code={`cargo shuttle init --from ${path}`} width={16} height={16} />
>{`shuttle init ${template ? `--template ${template}` : `--from ${path}`}`}</pre>
<CopyButton
code={`shuttle init ${template ? `--template ${template}` : `--from ${path}`}`}
jonaro00 marked this conversation as resolved.
Show resolved Hide resolved
width={16}
height={16}
/>
</div>
)
}
2 changes: 0 additions & 2 deletions components/sections/Templates/TemplateReadme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ export default function TemplateReadme({ title, readme }: { title: string; readm
<div className='col-span-2 rounded-3xl border border-[#434343] p-8'>
<h1 className='mb-5 text-[36px] font-bold leading-10 text-[#D8D8D8]'>{title}</h1>

<p className='mb-8'>{'//README'}</p>
<Markdown body={readme} />
<p>{'//README'}</p>
</div>
)
}
6 changes: 3 additions & 3 deletions pages/templates/[templateKey]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ export default function TemplateDetails({ template }: InferGetStaticPropsType<ty
<div className=' flex w-full flex-col items-center'>
<TemplateLogo />

<TemplateInit path={template?.path} />
<TemplateInit path={template?.path} template={template?.template} />

{isModalOpen && (
<div className='my-5 flex w-full flex-col justify-start'>
<h3 className='font-gradual text-2xl font-bold text-head'>Instructions</h3>
<ol className='mt-1 text-head opacity-60'>
<li>Step 1. Start rust</li>
<li>Step 2. Copy cargo shuttle init command with info above</li>
<li>Step 1. Start Rust</li>
jonaro00 marked this conversation as resolved.
Show resolved Hide resolved
<li>Step 2. Copy shuttle init command with info above</li>

<li>Step 3. Login into dashboard</li>
</ol>
Expand Down