My Tribute Page - Blanca Canales

Hey everyone - I am just starting to do my series of projects. I wanted to share my tribute page to Blanca Canales - a Puerto Rican Nationalist. I experimented with a bit of Javascript, let me know what you think!

Click here for full site

Quick question - for Javascript (I know it’s not required but am testing something) - does anyone know of a script I could use that would transform my tab containers from English (en) to Spanish (es)? I have seen some java code on Google/some forums:
I.e. JavaScript/jQuery - Get text and translate it - Stack Overflow - what would be a simple way I could integrate a Javascript “translate” button for the tabs (i.e. someone can click “translate to spanish” and all of the content in the tabs go from English > Spanish and you can change it back)? Thank you.

I’ve loved seeing the projects and discussions so far - hope everyone is doing well.

4 Likes

I don’t know enough about JS (yet!) to help you, but good job on your page! I like your info tabs a lot. The photo (pencil drawing?) of the subject give a nice focal point as well.

Hey - thanks so much for your feedback. I tried to go for a simple look. I am going to experiment with these pages over the next week before fully submitting my projects. I appreciate your insight.

1 Like

Great site! I don’t know a JS solution for the translation, but please do share if you figure it out. :slight_smile:

1 Like

I have been learning Javascript for a while now. I will give it a shot.
I can’t promise anything and it may take a while.
This will give me a good project to work on.
One thing you can do if your interested is provide me the text you want to use. I don’t know Spanish so I would have to use an online translator. That may not be as accurate as your translation.

1 Like

I may have come up with a simple solution. Is it alright to download your code so I can work on it in VSCode? It will be easier to work on, then using CodePen.

1 Like

That would be perfectly fine - I appreciate the opportunity to learn so this is awesome. Thank you so much.

Thank you so much for your feedback!

Ok. I have already come up with a solution, I have to see if it will work with your code.

I have only done the first three tabs and the translate button needs work, but this is how it looks so far:
https://codepen.io/devgaragedt/pen/XWaZpxJ

It’s very rough.

Quick update: I have a javascript script that will translate the page with Google.
I will post later with the results.

I have checked out the website - what a wonderful learning opportunity. Thanks for teaching me this and taking the time to implement/write this code. I am looking forward to the end result. I appreciate your time.

Your welcome. This is good practice for me.

Here is an updated Codepen with the Google Translate plugin installed:
https://codepen.io/devgaragedt/pen/XWaZpxJ

The script tag at the bottom of the Body has the Javascript for the plugin, and there is a Div tag just inside the Main tag with the ID it needs to show up on the page. You can put the Div wherever you want. It translates the whole page and you can add other languages as well.

Thank you so much - the implementation of this plugin is impressive and super helpful. Taught me a great Javascript trick.

Something I did notice though during testing - it still does not translate the language from English to Spanish so unsure if the script is complete/or still needs additionally tinkering from my side (i.e. do I need to add any specific script tags to any of the content?)

It was acting strange for me in CodePen. I don’t know what the problem was. I worked fine running it in VSCode. I can put it up on my website and see how it works there. I will check it tomorrow.

It was the FreeCodeCamp page challenge checker. When I removed it it works ok.
Edit:
Still hit or miss.

This is a codeSandbox link:
https://ocqov.csb.app/

It works in here. Must be a CodePen issue.

1 Like

This is amazing! Wow - really thank you so much.

Your welcome. Give me a couple of days and will show you how to change the text like I did for the first three tabs. It doesn’t use Javascript. It is difficult to do with tabs.

1 Like

Awesome - really appreciate the learning opportunity, David.