heldercervantes Posted January 3, 2018 Share Posted January 3, 2018 Hi guys. It's not necessarily PW related, but I do feature a project made in PW in this article. It's a short read challenging companies to think about their websites more like tools: https://supertiny.agency/en/blog/make-a-site-for-existing-customers/ Enjoy. 4 Link to comment Share on other sites More sharing options...
pwired Posted January 3, 2018 Share Posted January 3, 2018 Good story. But I smell only coders can do something like that. Found a typo at the bottom: Give that some though and ponder. though misses a t How did you do the beautiful sliding in and out back to top button ? Same the social network buttons ? Link to comment Share on other sites More sharing options...
3fingers Posted January 3, 2018 Share Posted January 3, 2018 14 minutes ago, pwired said: How did you do the beautiful sliding in and out back to top button ? As far as I can tell he is adding/removing the "menu-collapsed" css class through js based on user scroll. I've tried to figure it out searching into "main.js" and around line 143 there's what I think it's the trigger of it (but I found really hard to grasp it since @heldercervantes named every var and functions like "a, b, c.." and so on Probably on purpouse?). 1 Link to comment Share on other sites More sharing options...
heldercervantes Posted January 3, 2018 Author Share Posted January 3, 2018 1 hour ago, pwired said: How did you do the beautiful sliding in and out back to top button ? Same the social network buttons ? Just like @3fingers found. Impressive how you've managed to find that on the compressed JS I don't actually name my vars a, b, c, but the scripts are all minified in the end and the names change. I have a script that listens to scrolling and when you go further than X pixels (don't remember the exact number) the "menu-collapsed" class is added to the document. That class will affect the menu, logo, and back to top button. The social sharing buttons are a plugin: http://tolgaergin.com/files/social/ 1 Link to comment Share on other sites More sharing options...
3fingers Posted January 3, 2018 Share Posted January 3, 2018 5 hours ago, heldercervantes said: Impressive how you've managed to find that on the compressed JS It's even more impressive if you click on the curly braces icon in the bottom left "source" panel of the Chrome dev tools 1 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now