BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

[FEATURE] Customisable Profile Themes

Open Vyvy-vi opened this issue 4 years ago • 19 comments

Description

In light of the changes made in #513, I think it would be really great if this gradient config is an "optional" enhancement that people could use in their profiles. An option in the data config files for a hex code or a "trigger" string, which defines the background for the page would be really great. Maybe we can call it "theme"

/public/data/<file>.json

{
  "name": "J. Doe",
  "bio": "Lorem Ipsum",
  "avatar": "https://github.com/<name>.png",
  "theme": "gradient", // or "0xffff00" or "0xfc0bb8" or "default"
  "links": [
    {
      "name": "Follow me on GitHub",
      "url": "https://github.com/<name>",
      "icon": "github"
    },
    {
      "name": "Follow me on Twitter",
      "url": "https://twitter.com/<name>",
      "icon": "twitter"
    }
  ]
}

Screenshots

No response

Additional information

Stems from #513 and this is a feature that linktree and other projects also include.

Vyvy-vi avatar Oct 28 '21 18:10 Vyvy-vi

It's great having you contribute to this project

Welcome to the community :nerd_face:

If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.

github-actions[bot] avatar Oct 28 '21 18:10 github-actions[bot]

I would like to work on this, unless someone else wants to :)

Vyvy-vi avatar Oct 28 '21 21:10 Vyvy-vi

I would like to work on this, unless someone else wants to :)

I think you can work on it! 😄

Panquesito7 avatar Oct 28 '21 22:10 Panquesito7

@Vyvy-vi @Panquesito7 I am new to open source, can I work on this?

Tejas-Teju avatar Nov 23 '21 19:11 Tejas-Teju

@Vyvy-vi @Panquesito7 I am new to open source, can I work on this?

@Vyvy-vi, will you still work on this? 😅

Panquesito7 avatar Nov 23 '21 19:11 Panquesito7

If you want to work on this, go ahead! :)

Vyvy-vi avatar Nov 24 '21 00:11 Vyvy-vi

Should we add a button called theme and select the color or gradient from color picker? and then save the value to the .json file?

Tejas-Teju avatar Nov 24 '21 17:11 Tejas-Teju

Should we add a button called theme and select the color or gradient from color picker? and then save the value to the .json file?

that will be weird to integrate 😅 I think we can allow the user to add a gradient in the JSON directly...

gptkrsh avatar Nov 25 '21 03:11 gptkrsh

yes, I think for colours, we can have some default color text values(like 'red', 'blue', etc etc. or maybe 'classic', 'modern', 'xyz' and if those aren't present, it uses colour hashes)

Vyvy-vi avatar Nov 26 '21 13:11 Vyvy-vi

yes, I think for colours, we can have some default color text values(like 'red', 'blue', etc etc. or maybe 'classic', 'modern', 'xyz' and if those aren't present, it uses colour hashes)

looks cool, a gradient could be a linear-gradient property... opening support for custom hex codes as well

gptkrsh avatar Nov 26 '21 13:11 gptkrsh

looks cool, a gradient could be a linear-gradient property... opening support for custom hex codes as well

That can be neat! There's so much room to customise in here, once an MVP version of this is created.

Vyvy-vi avatar Nov 28 '21 19:11 Vyvy-vi

Can anyone help me understand it a bit more? any other platform to discuss more on this than GitHub?

Tejas-Teju avatar Nov 29 '21 01:11 Tejas-Teju

Can anyone help me understand it a bit more? any other platform to discuss more on this than GitHub?

Discord?

gptkrsh avatar Nov 29 '21 02:11 gptkrsh

looks cool, a gradient could be a linear-gradient property... opening support for custom hex codes as well

That can be neat! There's so much room to customise in here, once an MVP version of this is created.

so it would be styles={{ background: profile.background ?? '#fff' }} I believe.

gptkrsh avatar Nov 29 '21 02:11 gptkrsh

Can anyone help me understand it a bit more? any other platform to discuss more on this than GitHub?

I think it makes sense to discuss this in the issue itself so that we can maintain the context. But certainly, feel free to ask any questions on our discord server - http://discord.eddiehub.org/

Vyvy-vi avatar Nov 29 '21 10:11 Vyvy-vi

I am following below to customize the background, please let me know the right method:

  1. In public/data/.json file I am assuming there is a key called "theme" where the users will add background-color Note: At present there is no key called "theme" in the JSON files, but in case if it is present then add the customized theme else add default value i.e. White.
  2. Background should remain White in the Home.js page but when the user navigates to their respective ProfilePage.js then the background theme should apply

I tried 2 methods:

  1. Apply the background to the body using document object but the issue is it applies to the Home page as well

ProfilePage.js image

  1. Create a div tag and add background to it but it doesn't cover the whole body. This just wraps Profile and Link components but I am not sure how to apply this theme to the body for individual users I need help on this.

ProfilePage.js image image

Tejas-Teju avatar Dec 14 '21 07:12 Tejas-Teju

I think you'd want to modify the https://github.com/EddieHubCommunity/LinkFree/blob/main/src/Components/UserProfile/User.js file

Vyvy-vi avatar Dec 16 '21 15:12 Vyvy-vi

@Vyvy-vi, I made changes and created a PR-820 please review it.

Tejas-Teju avatar Dec 16 '21 17:12 Tejas-Teju

Stale issue message

github-actions[bot] avatar Feb 22 '22 02:02 github-actions[bot]

A new version of LinkFree got released. We have a lot more flexibility now

I will close this and a new issue can be created

eddiejaoude avatar Nov 05 '22 22:11 eddiejaoude