squircle

Make all the squircles you need, in the browser. https://squircley.app/
git clone http://git.hanabi.in/repos/squircle.git
Log | Files | Refs | LICENSE

commit 21e906a19ecb8bdfa68b42d53b9b27c55eb0ee09
parent eecd555fd74b3cbaad4e33c84ba38c9f7a67bca6
Author: George Francis <georgedoescode@gmail.com>
Date:   Wed, 30 Sep 2020 12:49:11 +0100

Optimise ad placements

Diffstat:
Msrc/assets/styles/app.css | 18+++++++++++++++++-
Msrc/components/GeneratorExportOptions.vue | 10++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/src/assets/styles/app.css b/src/assets/styles/app.css @@ -143,9 +143,10 @@ body { } .app { - position: relative; + /* position: relative; */ } +/* Ads Stuff */ .carbon-wrapper { min-height: 125px; margin-top: var(--spacing-3); @@ -218,3 +219,18 @@ body { font-size: 9px; line-height: 1; } + +@media only screen and (min-width: 62rem) { + .carbon-wrapper { + min-height: 0; + margin-top: 0; + margin-bottom: 0; + } + + #carbonads { + position: fixed; + bottom: var(--spacing-3); + right: var(--spacing-3); + z-index: 100; + } +} diff --git a/src/components/GeneratorExportOptions.vue b/src/components/GeneratorExportOptions.vue @@ -13,6 +13,8 @@ export default { }, methods: { downloadSVG() { + this.refreshAd(); + const exportSVG = this.createSVG( document.querySelector('#squircleSVG path') ); @@ -23,6 +25,8 @@ export default { saveAs(blob, 'squircle.svg'); }, copySVGToClipBoard() { + this.refreshAd(); + const exportSVG = this.createSVG( document.querySelector('#squircleSVG path') ); @@ -54,6 +58,12 @@ export default { return svg.outerHTML; }, + refreshAd() { + if (!document.querySelectorAll('#carbonads')[0]) return; + + if (typeof window._carbonads !== 'undefined') + window._carbonads.refresh(); + }, }, }; </script>