From ab5208854b57e0f4b27f5bb77e4de696503d7d68 Mon Sep 17 00:00:00 2001 From: Bryan Braun Date: Sat, 7 Jan 2023 00:14:05 -0500 Subject: [PATCH] docs: clean up examples - remove grunticon example - tidy up styles on the CSS styling example --- docs/grunticon/grunticon.loader.js | 3 -- docs/grunticon/icons.data.png.css | 5 --- docs/grunticon/icons.data.svg.css | 5 --- docs/grunticon/icons.fallback.css | 5 --- docs/grunticon/png/grunticon-link.png | Bin 310 -> 0 bytes docs/grunticon/preview.html | 33 -------------------- docs/index.html | 42 +------------------------- docs/styles.css | 9 +++--- 8 files changed, 6 insertions(+), 96 deletions(-) delete mode 100755 docs/grunticon/grunticon.loader.js delete mode 100755 docs/grunticon/icons.data.png.css delete mode 100755 docs/grunticon/icons.data.svg.css delete mode 100755 docs/grunticon/icons.fallback.css delete mode 100755 docs/grunticon/png/grunticon-link.png delete mode 100755 docs/grunticon/preview.html diff --git a/docs/grunticon/grunticon.loader.js b/docs/grunticon/grunticon.loader.js deleted file mode 100755 index de17974..0000000 --- a/docs/grunticon/grunticon.loader.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! grunt-grunticon Stylesheet Loader - v2.1.2 | https://github.com/filamentgroup/grunticon | (c) 2015 Scott Jehl, Filament Group, Inc. | MIT license. */ - -(function(e){function t(t,n,r,o){"use strict";function a(){for(var e,n=0;u.length>n;n++)u[n].href&&u[n].href.indexOf(t)>-1&&(e=!0);e?i.media=r||"all":setTimeout(a)}var i=e.document.createElement("link"),l=n||e.document.getElementsByTagName("script")[0],u=e.document.styleSheets;return i.rel="stylesheet",i.href=t,i.media="only x",i.onload=o||null,l.parentNode.insertBefore(i,l),a(),i}var n=function(r,o){"use strict";if(r&&3===r.length){var a=e.navigator,i=e.Image,l=!(!document.createElementNS||!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect||!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")||e.opera&&-1===a.userAgent.indexOf("Chrome")||-1!==a.userAgent.indexOf("Series40")),u=new i;u.onerror=function(){n.method="png",n.href=r[2],t(r[2])},u.onload=function(){var e=1===u.width&&1===u.height,a=r[e&&l?0:e?1:2];n.method=e&&l?"svg":e?"datapng":"png",n.href=a,t(a,null,null,o)},u.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",document.documentElement.className+=" grunticon"}};n.loadCSS=t,e.grunticon=n})(this);(function(e,t){"use strict";var n=t.document,r="grunticon:",o=function(e){if(n.attachEvent?"complete"===n.readyState:"loading"!==n.readyState)e();else{var t=!1;n.addEventListener("readystatechange",function(){t||(t=!0,e())},!1)}},a=function(e){return t.document.querySelector('link[href$="'+e+'"]')},c=function(e){var t,n,o,a,c,i,u={};if(t=e.sheet,!t)return u;n=t.cssRules?t.cssRules:t.rules;for(var l=0;n.length>l;l++)o=n[l].cssText,a=r+n[l].selectorText,c=o.split(");")[0].match(/US\-ASCII\,([^"']+)/),c&&c[1]&&(i=decodeURIComponent(c[1]),u[a]=i);return u},i=function(e){var t,o,a;o="data-grunticon-embed";for(var c in e)if(a=c.slice(r.length),t=n.querySelectorAll(a+"["+o+"]"),t.length)for(var i=0;t.length>i;i++)t[i].innerHTML=e[c],t[i].style.backgroundImage="none",t[i].removeAttribute(o);return t},u=function(t){"svg"===e.method&&o(function(){i(c(a(e.href))),"function"==typeof t&&t()})};e.embedIcons=i,e.getCSS=a,e.getIcons=c,e.ready=o,e.svgLoadedCallback=u,e.embedSVG=u})(grunticon,this); \ No newline at end of file diff --git a/docs/grunticon/icons.data.png.css b/docs/grunticon/icons.data.png.css deleted file mode 100755 index f0bab86..0000000 --- a/docs/grunticon/icons.data.png.css +++ /dev/null @@ -1,5 +0,0 @@ - -.icon-grunticon-link { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABuklEQVQ4T52U4VnCMBiE71hAnECcgLCBblBYAJxANgAmEDfABWg3kA2IE6ATWBbo+XwplLaWguZnm765fncX4h9LkesC6DHxvv45/8JT5CIQLyB74TspBbFChgUTn9qjq4EauhXIMYA9pBWIFKId0IfkITwa9CpgARM+ID0c1QSRIzcHOIP0ythPLwLbYMdxaTjwgO4Y+9uLwKAicjaztKysPPtCZab7VqAi9wBSkPZNjp4UuiXIZ2RqVqiRm0KYgbR45Csf/FMdHCJE7EDuud72fiksufkFaIkMnyBM6QSSDm6G/B1g7yAdMg2Z+KQCbHUzcg4dbiwy5mYFJr0x9pNKDptgGrolgHFZ1S9lJVgBDA3oMEYtZzqpEogEQgLCQZiEttRgJ+Bo8Amgi0zWz1ChwguDktaMfunxHtCca29/UFkMs+jw+5j0c90Oau1Q62viN+f2GdCGvQW04NrPmzYebpcuE29/0rqCyxoNUkg7xn5Q333OzbMKA9DctKTnc1mU5mehzXPWYEATNFcY0s5NcRWZozav3M3utbBqDvMKzUMjgJvD6V/INLUGXJrd8X3j5XDpdmmD/wAyTxBSftthKwAAAABJRU5ErkJggg=='); - background-repeat: no-repeat; -} \ No newline at end of file diff --git a/docs/grunticon/icons.data.svg.css b/docs/grunticon/icons.data.svg.css deleted file mode 100755 index ea5bd00..0000000 --- a/docs/grunticon/icons.data.svg.css +++ /dev/null @@ -1,5 +0,0 @@ - -.icon-grunticon-link { - background-image: url('data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3C%21--%20Generated%20by%20IcoMoon.io%20--%3E%0A%3C%21DOCTYPE%20svg%20PUBLIC%20%22-//W3C//DTD%20SVG%201.1//EN%22%20%22http%3A//www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd%22%3E%0A%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%20768%20768%22%3E%0A%20%20%3Cg%20fill%3D%22%23FF5231%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22M544%2032q37.75%200%2072.875%2014.25t62.875%2042%2042%2062.875%2014.25%2072.875q0%2037.5-14.375%2072.875t-41.875%2062.875l-96%2096q-2.75%202.75-8.25%207.75-26.75%2023.75-59.75%2036.125t-67.75%2012.375q-43.75%200-82.75-18.75-29.25-13.75-53-37.5t-37.5-53q18.75-18.75%2045.25-18.75%209.25%200%2018.75%202.75%2016.25%2026.25%2042.5%2042.5%2030.75%2018.75%2066.75%2018.75%2025%200%2048.5-9.5t42-28l96-96q18.5-18.5%2028-42t9.5-48.5-9.5-48.5-28-42-42-28-48.5-9.5-48.5%209.5-42%2028l-67.25%2067.25q-32-8.75-66.25-8.75-5.5%200-15.5%200.5%205-5.5%207.75-8.25l96-96q27.5-27.5%2062.875-41.875t72.875-14.375zM320%20256q43.75%200%2082.75%2018.75%2029.25%2013.75%2053%2037.5t37.5%2053q-18.75%2018.75-45.25%2018.75-9.25%200-18.75-2.75-16.25-26.25-42.5-42.5-30.75-18.75-66.75-18.75-25%200-48.5%209.5t-42%2028l-96%2096q-18.5%2018.5-28%2042t-9.5%2048.5%209.5%2048.5%2028%2042%2042%2028%2048.5%209.5%2048.5-9.5%2042-28l67.25-67.25q32%208.75%2066.25%208.75%205.5%200%2015.5-0.5-5%205.5-7.75%208.25l-96%2096q-27.75%2027.75-62.875%2042t-72.875%2014.25q-37.5%200-72.875-14.375t-62.875-41.875q-27.75-27.75-42-62.875t-14.25-72.875%2014.25-72.875%2042-62.875l96-96q2.75-2.75%208.25-7.75%2026.75-23.75%2059.75-36.125t67.75-12.375z%22%3E%3C/path%3E%0A%20%20%3C/g%3E%0A%3C/svg%3E%0A'); - background-repeat: no-repeat; -} \ No newline at end of file diff --git a/docs/grunticon/icons.fallback.css b/docs/grunticon/icons.fallback.css deleted file mode 100755 index 832f36f..0000000 --- a/docs/grunticon/icons.fallback.css +++ /dev/null @@ -1,5 +0,0 @@ - -.icon-grunticon-link { - background-image: url('png/grunticon-link.png'); - background-repeat: no-repeat; -} \ No newline at end of file diff --git a/docs/grunticon/png/grunticon-link.png b/docs/grunticon/png/grunticon-link.png deleted file mode 100755 index 77d59c24b1d161f10ee6a3916faf37e6fe20a703..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc3?z4jzqJQaP60k4u0Z;KfB_T*8vGA3{0|}x zz$BavWol)m5pv0#so(ETZDy`uWXUli5SK5p8= zr+oN)LrOt-nRANeO0(xj8;|E?dpzrHeR=Nlt}xd8CrLA3RknXgG%b&gn0|MeSoHLn zbrN3_U;IhxR-3f%u5XO}gsqP}jN~@6mfJCZmvwJ^d|pB5bH>@s - - - Icons Preview! - - - - - - - - -

PREVIEW - you can change this in the previewTemplate option

- - -
.icon-grunticon-link:

- - - - diff --git a/docs/index.html b/docs/index.html index 08bd19c..a03d947 100644 --- a/docs/index.html +++ b/docs/index.html @@ -21,13 +21,6 @@ - - - @@ -554,7 +547,7 @@

Link w/CSS Styling

margin-top: 4px; margin-left: -1.4em !important; } -.anchorjs-link::before { +.anchorjs-link::after { margin-left: 7px; margin-top: -4px; display: block; @@ -664,32 +657,6 @@

Emoji

-
- -
-
// Assuming you have set up
-// grunticon and you have a
-// grunticon class named
-// 'icon-grunticon-link'...
-anchors.options = {
-  visible: 'always',
-  class: 'icon-grunticon-link'
-  icon: ''
-};
-anchors.add('h3');
-
.anchorjs-link {
-  display: inline-block;
-  margin-left: .375em;
-  width: .375em;
-  height: 20px;
-}
-
-
-

Hover examples

@@ -933,13 +900,6 @@

Tooltip

}); ex15.add('.examples .example:nth-child(15) p'); - var ex16 = new AnchorJS({ - visible: 'always', - class: 'icon-grunticon-link', - icon: '' - }); - ex16.add('.examples .example:nth-child(16) h3'); - var hovEx1 = new AnchorJS(); hovEx1.add('.hover-examples .example:nth-child(1) h3'); diff --git a/docs/styles.css b/docs/styles.css index 65eb968..7c9776a 100644 --- a/docs/styles.css +++ b/docs/styles.css @@ -341,20 +341,21 @@ pre > code { } .examples .example:nth-child(10) .anchorjs-link::after { - margin-left: 7px; - margin-top: -4px; - display: block; + position: absolute; + top: -5px; + left: 5px; } .examples .example:nth-child(10) .anchorjs-link { background-color: #ff5231; height: 32px; - width: 18px; + width: 32px; border-radius: 50%; display: inline-block; color: #fff; margin-top: 4px; margin-left: -1.4em !important; + padding: 0 !important; } .examples .example:nth-child(12) .anchorjs-link {