Design comparison
Solution retrospective
Finally implementing some script, first implementing the click function with addEventListener
, to then implementing the sharing function, which takes the live server url of this project, and automatically copy and pastes the url on that websites share page. Finally for fun, using some JS and CSS to add an animation to the .links
pop-up window.
building the .links
container, which was a bit of a challenge figuring out how to style and position it to overlap other elements. So far what I've worked with, elements are usually on the same level or layer and display around each other, so this was new. It was pretty easy to style once i discovered the z-index
property.
Any tips on the JS as far as more efficient ways to go about similar problems, whether a different function might work better in this context or something like that. Any notable tips whether helping with this problem specifically or any general "must-know" industry tips for using JS; very novice with JS so all is welcome.
Community feedback
- @Alex-Archer-IPosted 3 months ago
Hi!
I love that you though about dynamic addon to urls! If I can understand correctly, it's purpose to track from which page user came?
Also you did cool thing with animation! By the way, there are useful method which can helps with it.
Literally couple of suggestions:
var
is rarely used in JS now, it mostly replaces bylet
andconst
.- Guess you should add
cursor: pointer
and some hover effect to button for better UX
Hope that helps =)
Marked as helpful1@dquinn089Posted 3 months ago@Alex-Archer-I
So I actually realized when I read this comment that I forgot to replace my
currentUrl
variable placeholder with the live server url for the project. It seems to be working now(although the link worked in the share window I didn't actually share it, I don't use these websites lol).Also thank you for the other suggestions, I feel the designed feels much more complete now. Good advice as always!
1@Alex-Archer-IPosted 3 months ago@dquinn089
Oh, yeah, it's cos it's a share button! I didn't even think about it! Now I get why you need a dynamic url!
Haha, that's actually cool, that why I love this place, you look at someone's works and realized a huge gaps in you knowledge =)
And hey, you're welcome as always! Cool hover effect you did =)
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord