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

added-blog-card-layout-responsive-added-color-theme-added-sample-markdown #14

Closed
wants to merge 50 commits into from

Conversation

Vishwas1687
Copy link

No description provided.

Copy link

netlify bot commented Feb 28, 2024

Deploy Preview for webclubnitk failed.

Name Link
🔨 Latest commit 06dc082
🔍 Latest deploy log https://app.netlify.com/sites/webclubnitk/deploys/663a08df986d6000088a9cfd

import React, { useEffect, useState } from 'react';

const page = () => {
const [modal,setModal]=useState(false)
Copy link
Contributor

Choose a reason for hiding this comment

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

Have separate page for each blog, rather than a modal which opens here itself. That way we can share individual blog links, and is also more readable.

<Markdown
children={blog.body}
className='mt-5 px-4'
remarkPlugins={[remarkMath, remarkGfm]}
Copy link
Contributor

Choose a reason for hiding this comment

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

Try out some better plugins, atleast for code & code-block.

  1. https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins
  2. https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#list-of-plugins

image
Something like this.This looks cleaner

Comment on lines +12 to +33
const adjustCardWidth=()=>{
const windowWidth=window.innerWidth
if(windowWidth>=768)
{
setCardWidth(windowWidth*0.42)
}
else if(windowWidth>=500)
{
setCardWidth(windowWidth*0.8)
}
else{
setCardWidth(windowWidth*0.7)
}
}
useEffect(()=>{
adjustCardWidth()
window.addEventListener('resize', adjustCardWidth);
return () => {
window.removeEventListener('resize', adjustCardWidth);
};

},[])
Copy link
Contributor

Choose a reason for hiding this comment

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

setting width/height like this has its own set of problems like padding/margin not adjusting properly.

I would suggest to do it the standard way:

<div className="h-[...px] md:h-[...px] sm:h-[...px] w-[...px] md:w-[...px] sm:w-[...px] ....... ">

Good use of Flexbox & Grid and defining dimension in the above 3 screens should do the job

<div className='grid grid-cols-1 gap-2 px-2 py-2 sm:grid-cols-2 sm:w-full justify-center items-center'>
<div>
<input type='search'
placeholder='Search 🔍'
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't use emojis. If required use icons from https://react-icons.github.io/react-icons/ OR https://tabler.io/docs/icons/react

Copy link
Contributor

@ahmedfahim21 ahmedfahim21 left a comment

Choose a reason for hiding this comment

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

Major change is the separate blog page rather than modal.

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.

None yet

5 participants