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 templates page #36

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Karthik-315
Copy link
Contributor

  • Added styling for the templates page
  • The functionality of the favorites filter is yet to be implemented. Will do it soon.
  • I've added the pages to the UI (Hidden in the UI for now) and will add the functionality soon.

@netlify
Copy link

netlify bot commented Sep 5, 2022

Deploy Preview for template-bhai ready!

Name Link
🔨 Latest commit 3b3e2a6
🔍 Latest deploy log https://app.netlify.com/sites/template-bhai/deploys/6315b87d7de7ca00093917c7
😎 Deploy Preview https://deploy-preview-36--template-bhai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@@ -1,3 +1,14 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
body {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think it's needed.

Thanks for working on it btw. I'll check the whole PR asap when I'm free.

@apply h-full;
}

.template-action-button {
Copy link
Owner

Choose a reason for hiding this comment

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

This should be a component. All reusability in React should always be driven by components.

Copy link
Owner

@AndrejJurkin AndrejJurkin 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 on that PR @Karthik-315

I've noticed a couple repeating styles, let's catch that early and move those into components.

Otherwise, looks great!

</p>

<div className="my-4 flex justify-between gap-x-4 overflow-hidden p-px transition-[margin] duration-700 group-hover:mb-10">
<button className="template-action-button -translate-x-72 bg-zinc-50 text-zinc-800 md:translate-x-0 md:-translate-y-24">
Copy link
Owner

Choose a reason for hiding this comment

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

Not sure if these styles for buttons, paragraphs, links, etc repeat. But if you ever going to reuse it anywhere in the app, it should be a component.

You can get inspiration for components from MUI lib for example. Button, Typography, etc

</div>

<div className="mt-8">
<p className="relative text-xs text-zinc-300 before:absolute before:right-[55%] before:left-0 before:top-1/2 before:h-px before:bg-zinc-200/10 before:content-[''] after:absolute after:left-[55%] after:right-0 after:top-1/2 after:h-px after:bg-zinc-200/10 after:content-[''] md:text-base">
Copy link
Owner

Choose a reason for hiding this comment

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

Getting rid of before/after and puting those into markup would probably make things much more readable.

Before/After are just weird in TW imo, it would prolly be better to simply add those elements. It doesn't have any downside to it.

export default function Intro() {
return (
<>
<h2 className="text-left text-4xl font-medium xl:text-5xl">Templates</h2>
Copy link
Owner

Choose a reason for hiding this comment

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

H2 styles would probably be repeating in the app quite often, consider creating a Typography component, just like it is in MUI

<div className="container py-4">
{/* Change height of the div below to `h-96` after filters are enabled */}
<div
className={`relative z-10 -mx-4 overflow-hidden rounded-lg bg-zinc-700/50 backdrop-blur-lg transition-all duration-300 md:flex md:items-center md:justify-between md:bg-transparent md:p-4 lg:overflow-hidden ${
Copy link
Owner

Choose a reason for hiding this comment

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

Try "clsx" library for this, it's more readable than using conditions in string literals

import FilterList from "./FilterList";

export default function Filters() {
const frameworks = [
Copy link
Owner

Choose a reason for hiding this comment

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

I think Subho has created a data structure for this before, it should be probably exported from one central location.

@subhoghoshX I remember you did something similar before, somewhere

@Karthik-315
Copy link
Contributor Author

Thanks for your valuable feedback! I am currently visiting my sister but I'll do these changes as early as I can.

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.

3 participants