Finds RSS and/or Atom links on a page and inserts feed subscription links for use by aggregators
< Commentaires sur RSS+Atom Feed Subscribe Button Generator
Another version:
<!DOCTYPE html>
<html>
<head>
<title>Web Feed Icons</title>
<style>
#table * {
font-weight: bold;
font-family: system-ui;
/* border-radius: 8px; */
padding: 3px;
padding-right: 5px;
padding-left: 5px;
user-select: none;
color: white;
}
a {
text-decoration: none; }
.type {
border-top-left-radius: 8px;
border-bottom-left-radius: 8px; }
.grey {
background: grey;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px; }
#activitystream {
background: slateblue; }
#atom {
background: dimgrey; }
#json {
background: limegreen; }
#rdf {
background: orangered; }
#rss {
background: darkorange; }
</style>
</head>
<body>
<junkblocker id="table">
<a href>
<junkblocker id="activitystream" class="type">Activity</junkblocker><junkblocker class="grey">Stream</junkblocker>
</a>
<a href>
<junkblocker id="atom" class="type">Atom</junkblocker><junkblocker class="grey">Syndication</junkblocker>
</a>
<a href>
<junkblocker id="json" class="type">JSON</junkblocker><junkblocker class="grey">Feed</junkblocker>
</a>
<a href>
<junkblocker id="rdf" class="type">RDF</junkblocker><junkblocker class="grey">Vocabulary</junkblocker>
</a>
<a href>
<junkblocker id="rss" class="type">RSS</junkblocker><junkblocker class="grey">Subscribe</junkblocker>
</a>
</junkblocker>
</body>
</html>
Sorry for double or triple posting.
This is a version with XML and display: inline-block
, because I use two elements for eachdisplay: inline-flex
, because I use two elements for each and attempt to have a uniform width; See image preview below.
Notes:
.grey { text-align: center }
doesn't work.inline-block
or table-cell
would be better, provided uniform width doesn't matter.
<!DOCTYPE html>
<html>
<head>
<title>Web Feed Icons</title>
<style>
#table * {
display: inline-flex; /* table-cell */ /* inline-block */
font-weight: bold;
font-family: system-ui;
/* border-radius: 8px; */
padding: 3px;
padding-right: 5px;
padding-left: 5px;
user-select: none;
color: white;
}
a {
max-width: 190px;
text-decoration: none; }
.type {
width: fit-content;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px; }
.grey {
width: 150px; /* any value above 144px */
text-align: center; /* not working possible due to inline-flex */
background: grey;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px; }
#activitystream {
background: slateblue; }
#atom {
background: mediumpurple; } /* dimgrey */
#json {
background: limegreen; }
#rdf {
background: orangered; }
#rss {
background: darkorange; }
#xml {
background: purple; }
</style>
</head>
<body>
<junkblocker id="table">
<a href>
<junkblocker id="activitystream" class="type">Activity</junkblocker><junkblocker class="grey">Stream</junkblocker>
</a>
<a href>
<junkblocker id="atom" class="type">Atom</junkblocker><junkblocker class="grey">Syndication</junkblocker>
</a>
<a href>
<junkblocker id="json" class="type">JSON</junkblocker><junkblocker class="grey">Feed</junkblocker>
</a>
<a href>
<junkblocker id="rdf" class="type">RDF</junkblocker><junkblocker class="grey">Vocabulary</junkblocker>
</a>
<a href>
<junkblocker id="rss" class="type">RSS</junkblocker><junkblocker class="grey">Subscribe</junkblocker>
</a>
<a href>
<junkblocker id="xml" class="type">XML</junkblocker><junkblocker class="grey">Subscribe</junkblocker>
</a>
</junkblocker>
</body>
</html>
Last prototype version with monospace and pixelized look. See preview below.
<!DOCTYPE html>
<html>
<head>
<title>Web Feed Icons</title>
<style>
#table * {
display: inline-block;
font-weight: bold;
font-family: monospace;
padding: 3px;
user-select: none;
color: white;
}
a {
text-decoration: none; }
.type {
outline: black solid 1px;
white-space: pre; }
.grey {
outline: black solid 1px;
background: grey;
white-space: pre; }
#activitystream {
background: slateblue; }
#atom {
background: mediumpurple; } /* dimgrey */
#json {
background: limegreen; }
#rdf {
background: orangered; }
#rss {
background: darkorange; }
#xml {
background: purple; }
</style>
</head>
<body>
<junkblocker id="table">
<a href>
<junkblocker id="activitystream" class="type"> Activity </junkblocker><junkblocker class="grey"> Stream </junkblocker>
</a>
<a href>
<junkblocker id="atom" class="type"> Atom </junkblocker><junkblocker class="grey"> Syndication </junkblocker>
</a>
<a href>
<junkblocker id="json" class="type"> JSON </junkblocker><junkblocker class="grey"> Feed </junkblocker>
</a>
<a href>
<junkblocker id="rdf" class="type"> RDF </junkblocker><junkblocker class="grey"> Vocabulary </junkblocker>
</a>
<a href>
<junkblocker id="rss" class="type"> RSS </junkblocker><junkblocker class="grey"> Subscribe </junkblocker>
</a>
<a href>
<junkblocker id="xml" class="type"> XML </junkblocker><junkblocker class="grey"> Subscribe </junkblocker>
</a>
</junkblocker>
</body>
</html>
Alternatively, property all: unset;
can be used (at the start) and the rest of the porpertoes should be appllied without interference.
Style has:
margin: 50%;
height: 50%;
Apply all: unset;
as follows:
all: unset; /* reset everything */
margin: 50%; /* begin styling */
height: 50%;
I'm for the scalable buttons, yet it is not for me to decide.
SVGs
https://img.shields.io/badge/Activity-Stream-blue.svg?longCache=true&style=for-the-badge
https://img.shields.io/badge/XML-Subscribe-purple.svg?longCache=true&style=for-the-badge
https://img.shields.io/badge/RSS-Syndication-orange.svg?longCache=true&style=for-the-badge
https://img.shields.io/badge/JSON-Feed-green.svg?longCache=true&style=for-the-badge
Wow, some Modern Love for one of my most-favorite scripts! Thank you!
Also, thanks for offering option to have squared boxes - I despise rounded content, but I understand some prefer it.
A request: I prefer the black outline and teeny-tiny border white spaces within, re: -- any chance of having that also as an option? And custom (or that specific) image for Atom and maybe other formats?
Hey, it's nice to receive a feeback, Azazello.
Wow, some Modern Love for one of my most-favorite scripts! Thank you!
Perhaps, contemporary, so to speak.
Well, this is one of the most important programs in web browser history, IMHO.
I wanted to do it a long time ago, but I procrastinated it.
Also, thanks for offering option to have squared boxes - I despise rounded content, but I understand some prefer it.
You are welcome. And I think just like you on that matter!
A request: I prefer the black outline and teeny-tiny border white spaces within, re:  -- any chance of having that also as an option? And custom (or that specific) image for Atom and maybe other formats?
The samples above are just samples and I made them intentionally larger so it would be easier to see the structure.
If at all possible, and it probablt is, I'd like to preserve the original style of the current buttons.
I might be suggesting to add Nerd Fonts to compensate for graphics, though it might be too much, unless we add it as an external library or resource.
In order for me to continue, I'll be waiting for the opinion of the developer.
Thanks for the proposals and the passion around the script. I like the latest SVG variations! However, I've left this alone for a decade now and don't plan on investing any more time on it as my reading habits have changed and the script as it stands just works for me.
@schimon, if you want I can add you as an author here or you can equally well create/publish a new one.
Please tell me what you want and ow you want it and I'll send you "diff" code to approve (i.e. SVG with dimensions of x y and text sized z).
Scalable graphics
Replace raster graphics (bitmap-based) buttons by scalable HTML (CSS or SVG or both) buttons.
This would also be advantageous, because:
</junkblocker>
; andimg { /* styling rules */}
).Instead of using
:after
or:before
pseudo-element,user-select: none
has been added to achieve no selectability.