p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

homepage - IE/Microsoft Edge detection link javascript bug

Open kjhollen opened this issue 6 years ago • 2 comments

(moving over from https://github.com/processing/p5.js/issues/2795, thanks @caswallon! I can't verify this one because I don't have a windows computer... please feel free to close if no longer an issue.)

On the P5.js website itself, there is a bug in the script that is intended to fix a CSS issue with the links on Microsoft IE/EDGE.

var EDGE_IE_REGEX = /(?:\b(MS)?IE\s+|\bTrident/7.0;.*\s+rv:|\bEdge/)(\d+)/; if (EDGE_IE_REGEX.test(navigator.userAgent)) { var links = document.getElementsByTagName('a'); for (var i=0, l=btns.length; i < l; i++) { links[i].style.display = 'inline-block'; } }

In the code snippet above, there is a reference to a variable btns that does not exist and should probably be referencing links based on context.

This appears to only apply to the homepage.

kjhollen avatar Jun 07 '18 01:06 kjhollen

Maybe a CSS only solution would be cleaner and easier to maintain?

Edge can be handled with:

@supports (-ms-ime-align:auto) {
	a {
		display: inline-block;
	}
}

and ie with:

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
	a {
		display: inline-block;
	}
}

brysonian avatar Jun 07 '18 04:06 brysonian

@kjhollen The bug is still there, specifically the for loop for (var i=0, l=btns.length; i < l; i++) { should be for (var i=0, l=links.length; i < l; i++) {

Although, I agree with @brysonian, a CSS solution would be better. Unfortunately, IE/Edge do require the display:inline-block; to get the hover effect to work correctly. However this also causes a jump due to the changing link height on hover. (Which while not ideal is at least manageable.)

bachmanetti avatar Jun 07 '18 06:06 bachmanetti

I just realized that some of the content in the design seems like it could be copy-complete. Is this the case? Is there a sign-off on the images as well? If so I can author the MDX files.

stalgiag avatar Apr 23 '24 01:04 stalgiag

Hi @stalgiag, we will make a small adjustment on the design that we will have around 10 people in the list with all same image hierarchy. Each person will have name, profile pic, title, and a short bio. Could you make a template in the 'People' mdx file, so I can add the content by Tuesday?

Qianqianye avatar Apr 23 '24 04:04 Qianqianye

Example content is here. The layout has already been coded so it should work as expected even after the final content is in without additional code updates.

stalgiag avatar Apr 23 '24 20:04 stalgiag

I will work on the people content today. In the 'About' page 'People' preview section, can we adjust the order of profiles?

Qianqianye avatar Apr 24 '24 17:04 Qianqianye

I have added some content for the people page in the PR #259.

We outlined the people page strucutre in this doc, where we include 4 chapters: Project Leads, Project Mentors, p5.js Alumni, and p5.js contributor. We are planning to have same treatment for Project Leads, Project Mentors, p5.js Alumni, which means including same-size image size bio. For the p5.js contributor, we are planning to get the name from the Contributors session.

Please let us know if you have the capacity to implement this. Thanks!

cc @stalgiag @outofambit

Qianqianye avatar Apr 25 '24 05:04 Qianqianye

Hi just to follow up on this. We'd like to add the content if you could provide the page structure with chapters (Project Leads, Project Mentors, p5.js Alumni, and Contributors), we can add content from our side.

@outofambit @stalgiag @ccanash

Qianqianye avatar Apr 30 '24 20:04 Qianqianye

@Qianqianye for now I think you can add everyone who is not a contributor as featured or alumni with the current schema. I can split featured into mentors and leads and adjust the styling. You would like the People page to have a header for each chapter and use the current styling for the leads for mentors, leads, and alumni within each of their respective chapters. Is that right?

outofambit avatar Apr 30 '24 20:04 outofambit

Yes, that's right. We also want to follow up with a previous comments in this thread that in the 'About' page 'People' preview section, the order of the profiles didn't follow the order in the 'People' page.

Qianqianye avatar Apr 30 '24 21:04 Qianqianye

@Qianqianye this is done and is currently deploying on main.

outofambit avatar Apr 30 '24 22:04 outofambit

Thanks @outofambit. I added the additional alumni info. We will keep this issue open until we add the contributor list. Does the Bocoup team has the capacity to add the Contributors list, as indicated in the final design?

Qianqianye avatar Apr 30 '24 23:04 Qianqianye

Thanks @outofambit. One last note about people content: The 'About' page' is currently showing all people content items (see screenshot below), and I believe we are only showing the first row according to the design. Is it something you can take a look? I can open an new issue if it's easier for organizational purpose. image

Qianqianye avatar May 08 '24 22:05 Qianqianye

hi @Qianqianye, i didn't realize that 6 was a hard limit and not just the number of alumni + leads together available in the assumed content. i've limited it to 6 in 0e42fcc141e01600e2d4a613594500445a28f6f9.

outofambit avatar May 09 '24 00:05 outofambit