Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added link support to all templates#598

Closed
thegecko wants to merge 3 commits into
badges:masterfrom
thegecko:master
Closed

Added link support to all templates#598
thegecko wants to merge 3 commits into
badges:masterfrom
thegecko:master

Conversation

@thegecko

Copy link
Copy Markdown

It's a shame the left/right links aren't supported on styles apart from the social one.

This PR adds support to the other styles.

@thegecko

Copy link
Copy Markdown
Author

Looks like the tests failed as the older templates were expected. If this is a valuable PR, I'll update the tests, too.

@ELLIOTTCABLE

Copy link
Copy Markdown

I'm curious why this hasn't been merged yet; I'd really like to see this added.

Specifically, I'm using Shields.io to replace StillMaintained.com in my projects, with badges like the following:

I'd really like to be able to able to link the word ‘feature frozen’ to a README section below, with something like ?link=%23feature-freeze.

@espadrine

Copy link
Copy Markdown
Member

@thegecko The tests fail. Uncoincidentally, the template fails to parse. I am not sure why, but it seems this patch as is cannot work.

@ELLIOTTCABLE In december, I became late on my PR reviews.

Comment thread templates/flat-template.svg Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be two: {{?}}.

@espadrine

Copy link
Copy Markdown
Member

Could you please indent the contents of {{?…}}…{{?}} please? It would gain in readability.

@thegecko

Copy link
Copy Markdown
Author

@espadrine This looks better

@espadrine

Copy link
Copy Markdown
Member

Chrome has a display bug for your code:
chrome-shields

The bug is filed at https://code.google.com/p/chromium/issues/detail?id=352912. It is seemingly inconsistent with Firefox and Safari. It relates to a lack of clarity in the SVG spec, which I have raised to W3C: https://lists.w3.org/Archives/Public/www-svg/2016Feb/0025.html.

As a result, a way to get cross-platform results is to put fill=#fff.

Sadly, SVGO correctly identifies this as a redundancy, breaking the fix. The Social badge only works by being already black.

The only redeeming solution I can find is to add <style type="text/css"><![CDATA[ svg a:visited {fill:inherit} ]]></style> (which also makes the extra fill=#fff unnecessary).

@thegecko

Copy link
Copy Markdown
Author

Do you want me to add the fill=#fff back in to match the social template or will it fail the tests? Perhaps The dirty fix should be implemented for all templates including the social one?

@espadrine

Copy link
Copy Markdown
Member

It would still be erased by SVGo. We simply need Google to fix their software, and when it's been released in the wild for a month, I'll merge this.

@olivierlacan

Copy link
Copy Markdown
Member

@thegecko @espadrine Any movement on SVGo or the current merge conflict?

@paulmelnikow paulmelnikow added the frontend The Docusaurus app serving the docs site label Apr 17, 2017
@paulmelnikow

Copy link
Copy Markdown
Member

As this can't be merged and the problem persists, let's track this via #1079.

@espadrine has rebased this work onto master in this working branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend The Docusaurus app serving the docs site

Development

Successfully merging this pull request may close these issues.

5 participants