Devlog #2
I added an open article button which opens the random article on click. I learned how to implement this through Javascript by using article.content_urls.desktop.page; to get the article url and then open the article on click using window.open(url, "_blank");, and an event listener on the open article button.
I also added the current date at the top of the title using date.toLocaleDateString.
I styled the buttons to slightly glow on hover and sink into the screen (inset box-shadow) on click.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.