shikha-16 / Women-in-Technology

A collection of resources for women in tech, consisting of - courses, learning guides, amazing sites and repos, blogs, programs and events. scholarships, etc.
https://women-in-technology-wit.web.app/
MIT License
715 stars 159 forks source link

#142 Fixed links which where were not properly visible in dark mode #169

Closed sungod12 closed 2 years ago

sungod12 commented 2 years ago

Pull Request Template

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -Fixed links which where were not visible in dark mode by setting background color to lighter version of black. -Changed link color in other pages which were not properly visible due to dark colored background. -Justified text in scholarship component.

Fixes # 142

Type of change

Please delete options that are not relevant.

Checklist:

nehakalbande commented 2 years ago

Files are Conflicting, Please have a look over it

sungod12 commented 2 years ago

I have removed conflicts.

nehakalbande commented 2 years ago

Conflicting files website/src/components/Footer/Footer.js website/src/components/Header/Header.js website/src/components/Inspirational/Inspirational.js website/src/components/Resources/resourcesComponent.js website/src/components/Scholarships/ScholarshipComponent.js

nehakalbande commented 2 years ago

Please remove the ss of your changes from the documents folder and send them here.

sungod12 commented 2 years ago

Please remove the ss of your changes from the documents folder and send them here.

okay -Before changing background color before changing background color

-Before justifying text before justifying text

-After justifying text after justifying text

nehakalbande commented 2 years ago

Please remove the ss of your changes from the documents folder and send them here.

okay -Before changing background color before changing background color

  • After changing background color after changing background color

-Before justifying text before justifying text

-After justifying text after justifying text

Can you change the name and links of the scholarship any other color, Black doesn't seem good

sungod12 commented 2 years ago

Please remove the ss of your changes from the documents folder and send them here.

okay -Before changing background color before changing background color

  • After changing background color after changing background color

-Before justifying text before justifying text -After justifying text after justifying text

Can you change the name and links of the scholarship any other color, Black doesn't seem good

You want me to change the name as well as color of the links?

nehakalbande commented 2 years ago

Please remove the ss of your changes from the documents folder and send them here.

okay -Before changing background color before changing background color

  • After changing background color after changing background color

-Before justifying text before justifying text -After justifying text after justifying text

Can you change the name and links of the scholarship any other color, Black doesn't seem good

You want me to change the name as well as color of the links?

Yes

sungod12 commented 2 years ago

Well the name seems good, I can change the color. Is that okay?

Please remove the ss of your changes from the documents folder and send them here.

okay -Before changing background color before changing background color

  • After changing background color after changing background color

-Before justifying text before justifying text -After justifying text after justifying text

Can you change the name and links of the scholarship any other color, Black doesn't seem good

You want me to change the name as well as color of the links?

Yes

Well the name seems good, I can change the color. Is that okay?

sungod12 commented 2 years ago

Color in light mode. image

Color in dark Mode image

Is this color okay?

sungod12 commented 2 years ago

Also I have deleted the changes folder, so it will be commited to this. Thanks @shikha-16 @nehakalbande .

shikha-16 commented 2 years ago

wait what is happening

sungod12 commented 2 years ago

Hi @shikha-16 @nehakalbande ,I haven't yet commited the changed color.

sungod12 commented 2 years ago

Hi @shikha-16 @nehakalbande ,I haven't yet commited the changed color.

I was waiting for approval, hence didn't commit the change.

shikha-16 commented 2 years ago

Color in light mode. image

Color in dark Mode image

Is this color okay?

Hey, can you change the 'Generation Google Scholarship' color to white bold in dark mode and keep it black bold in light mode? Underline the text if it links to anywhere. Also, change the 'here' at the end of text as well.

sungod12 commented 2 years ago

Yeah, sorry i merged by mistake. So

Color in light mode. image Color in dark Mode image Is this color okay?

Hey, can you change the 'Generation Google Scholarship' color to white bold in dark mode and keep it black bold in light mode? Underline the text if it links to anywhere. Also, change the 'here' at the end of text as well.

It was previously but @nehakalbande told me to change color as black doesn't look good.

sungod12 commented 2 years ago

Yeah, sorry i merged by mistake. So

Color in light mode. image Color in dark Mode image Is this color okay?

Hey, can you change the 'Generation Google Scholarship' color to white bold in dark mode and keep it black bold in light mode? Underline the text if it links to anywhere. Also, change the 'here' at the end of text as well.

It was previously but @nehakalbande told me to change color as black doesn't look good.

Just decide among yourselves and let me know then, I will make changes accordingly. Also if possible, could you notify me on discord about the final decision instead of github.

nehakalbande commented 2 years ago

Yeah, sorry i merged by mistake. So

Color in light mode. image Color in dark Mode image Is this color okay?

Hey, can you change the 'Generation Google Scholarship' color to white bold in dark mode and keep it black bold in light mode? Underline the text if it links to anywhere. Also, change the 'here' at the end of text as well.

It was previously but @nehakalbande told me to change color as black doesn't look good.

Told you for dark mode... Not for light mode

nehakalbande commented 2 years ago

Color in light mode. image Color in dark Mode image Is this color okay?

Hey, can you change the 'Generation Google Scholarship' color to white bold in dark mode and keep it black bold in light mode? Underline the text if it links to anywhere. Also, change the 'here' at the end of text as well.

@sungod12 Change it like this

sungod12 commented 2 years ago

Thats it,right?

nehakalbande commented 2 years ago

Thats it,right?

Yes, But do the same changes in other files as well organisations and other..

sungod12 commented 2 years ago

Thats it,right?

Yes, But do the same changes in other files as well organisations and other..

you mean other links in other pages.okay.

sungod12 commented 2 years ago

Thats it,right?

Yes, But do the same changes in other files as well organisations and other..

you mean other links in other pages.okay.

is this possible to add it as new issue because this was for particular page i.e, organization and now link color have to be changed for each and every page.

also as two of my commits got merged as one this could act as replacement for it.

update:I have changed the color using use effect hook and setinterval ,but there is slight flashing due to setinterval.If that is okay,i can merge or anybody wants to help they are free to do so.

shikha-16 commented 2 years ago

Thats it,right?

Yes, But do the same changes in other files as well organisations and other..

you mean other links in other pages.okay.

is this possible to add it as new issue because this was for particular page i.e, organization and now link color have to be changed for each and every page.

also as two of my commits got merged as one this could act as replacement for it.

update:I have changed the color using use effect hook and setinterval ,but there is slight flashing due to setinterval.If that is okay,i can merge or anybody wants to help they are free to do so.

@nehakalbande

nehakalbande commented 2 years ago

Thats it,right?

Yes, But do the same changes in other files as well organisations and other..

you mean other links in other pages.okay.

is this possible to add it as new issue because this was for particular page i.e, organization and now link color have to be changed for each and every page.

also as two of my commits got merged as one this could act as replacement for it.

update:I have changed the color using use effect hook and setinterval ,but there is slight flashing due to setinterval.If that is okay,i can merge or anybody wants to help they are free to do so.

Can you send the ss of the set interval code and the color change in the website

sungod12 commented 2 years ago

sure.I will send the gif along with code and short explanation.

sungod12 commented 2 years ago

sure.I will send the gif along with code and short explanation.

//Used a state for storing theme and changing it dynamically
const [theme, setTheme] = useState("light");
  useEffect(() => {
    const interval = setInterval(() => {
      const temptheme = localStorage.getItem("theme"); //fetches the theme
      setTheme(temptheme); //sets the theme
      const names = [                           //array which contains the id of tags which needs to be changed on switching theme
        "scholarship-name-1",
        "scholarship-name-2",
        "scholarship-name-3",
        "scholarship-name-4",
        "scholarship-name-5",
        "scholarship-name-6",
        "scholarship-name-7",
      ];
      if (theme === "dark") {             /*checks the theme and if it is dark add class "dark" to the classList thereby changing
        names.forEach((val) => {            color of links*/
          document.getElementById(`${val}`).classList.add("dark");
          document.getElementById(`${val}`).classList.remove("light");
        });
      } else {
        names.forEach((val) => {
          document.getElementById(`${val}`).classList.add("light");
          document.getElementById(`${val}`).classList.remove("dark");
        });
      }
      return;
    }, 500);                  //checks for theme change every 500ms
  }, [theme]);                  //runs on theme state change.

https://imgflip.com/gif/5p648y

sungod12 commented 2 years ago

This is what is occuring IF_2Tn

nehakalbande commented 2 years ago

sure.I will send the gif along with code and short explanation.

//Used a state for storing theme and changing it dynamically
const [theme, setTheme] = useState("light");
  useEffect(() => {
    const interval = setInterval(() => {
      const temptheme = localStorage.getItem("theme"); //fetches the theme
      setTheme(temptheme); //sets the theme
      const names = [                           //array which contains the id of tags which needs to be changed on switching theme
        "scholarship-name-1",
        "scholarship-name-2",
        "scholarship-name-3",
        "scholarship-name-4",
        "scholarship-name-5",
        "scholarship-name-6",
        "scholarship-name-7",
      ];
      if (theme === "dark") {                          /*checks the theme and if it is dark add class "dark" to the classList thereby changing
        names.forEach((val) => {                         color of links*/
          document.getElementById(`${val}`).classList.add("dark");
          document.getElementById(`${val}`).classList.remove("light");
        });
      } else {
        names.forEach((val) => {
          document.getElementById(`${val}`).classList.add("light");
          document.getElementById(`${val}`).classList.remove("dark");
        });
      }
      return;
    }, 500);                  //checks for theme change every 500ms
  }, [theme]);                  //runs on theme state change.

Please use setTimeout to resolve this issue

sungod12 commented 2 years ago

sure.I will send the gif along with code and short explanation.

//Used a state for storing theme and changing it dynamically
const [theme, setTheme] = useState("light");
  useEffect(() => {
    const interval = setInterval(() => {
      const temptheme = localStorage.getItem("theme"); //fetches the theme
      setTheme(temptheme); //sets the theme
      const names = [                           //array which contains the id of tags which needs to be changed on switching theme
        "scholarship-name-1",
        "scholarship-name-2",
        "scholarship-name-3",
        "scholarship-name-4",
        "scholarship-name-5",
        "scholarship-name-6",
        "scholarship-name-7",
      ];
      if (theme === "dark") {                          /*checks the theme and if it is dark add class "dark" to the classList thereby changing
        names.forEach((val) => {                         color of links*/
          document.getElementById(`${val}`).classList.add("dark");
          document.getElementById(`${val}`).classList.remove("light");
        });
      } else {
        names.forEach((val) => {
          document.getElementById(`${val}`).classList.add("light");
          document.getElementById(`${val}`).classList.remove("dark");
        });
      }
      return;
    }, 500);                  //checks for theme change every 500ms
  }, [theme]);                  //runs on theme state change.

Please use setTimeout to resolve this issue.

I had used setTimeout previously but it worked for first time and then didnt work ,I will try again.

sungod12 commented 2 years ago

ahhh i solved the issue. Damn it, it was due to just one css property and played around with it and got the solution. No js necessary.

sungod12 commented 2 years ago

Light Mode image

Dark Mode image

sungod12 commented 2 years ago

Should I go with this change?. Please review @nehakalbande @shikha-16

nehakalbande commented 2 years ago

@sungod12 Great Please make a PR, So that we can review the code

sungod12 commented 2 years ago

okay. I am making changes only in scholarship page, then make a pull request, in order to review and then do rest of pages or should I change it in other pages accordingly and then make a pull request?.

nehakalbande commented 2 years ago

okay. I am making changes only in scholarship page, then make a pull request, in order to review and then do rest of pages or should I change it in other pages accordingly and then make a pull request?.

Make changes in other pages as well,then make a PR

sungod12 commented 2 years ago

okay.

sungod12 commented 2 years ago

Pages I am not making change because they look okay in dark mode.

image

image

image

image

sungod12 commented 2 years ago

Changed pages-

Dark Mode- Scholarships image

Light Mode- Scholarships image

Dark Mode- Events/Programs image

Light Mode- Events/Programs image

Dark Mode- Inspirations image

Light Mode- Inspirations image

Dark Mode- Guidelines image

Light Mode- Guidelines image

nehakalbande commented 2 years ago

Changed pages-

Dark Mode- Scholarships image

Light Mode- Scholarships image

Dark Mode- Events/Programs image

Light Mode- Events/Programs image

Dark Mode- Inspirations image

Light Mode- Inspirations image

Dark Mode- Guidelines image

Light Mode- Guidelines image

Please remove the changes done in Events/Programs Page. Some other changes has been done on that page

sungod12 commented 2 years ago

okay. You should have told me previously.