From 6534001d101be92902a45fb4c98cbf67be639f1c Mon Sep 17 00:00:00 2001 From: Juan Martin Date: Wed, 1 Mar 2023 09:58:28 -0300 Subject: [PATCH] alpha bubbles stage (ABS) --- README.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++- index.css | 29 +++++++++++++++-------------- index.html | 21 ++++++++++----------- 3 files changed, 72 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index e77bf30..d344153 100644 --- a/README.md +++ b/README.md @@ -1 +1,47 @@ -# grid \ No newline at end of file +# grid + + +## LAYOUT + +### Radial Grid +- rows +- columns +- angles & distances +- span rows +- span cols +- initial angle +- diameter +- quadrants? +- geostationary/gyroscope +- responsiveness +- alignment + +## ELEMENTS + + +## COMPONENTS +- progress +- modals +- labels +- tooltips +- cards +- buttons +- forms + +## UTILITIES + + + +function getEllipsePoints(width, height, n) { + const a = width / 2; + const b = height / 2; + const points = []; + for (let i = 0; i < n; i++) { + const angle = (360 / n) * i; + const radians = angle * (Math.PI / 180); + const x = a * Math.cos(radians); + const y = b * Math.sin(radians); + points.push({ x, y }); + } + return points; +} diff --git a/index.css b/index.css index 8296f38..c0ea07e 100644 --- a/index.css +++ b/index.css @@ -8,6 +8,7 @@ --m: 60px; --l: 100px; --xl: 120px; + --item-number: 1; } @property --angle { @@ -18,13 +19,16 @@ @keyframes progress { 50% { - --angle: 160; + --angle: 130; } } + .item { animation: 16s progress infinite; } + + .item.box { border-radius: 0%; @@ -51,7 +55,7 @@ /* transform-style: preserve-3d; */ } .items-1 > .item { - --angle: calc(360 / 1); + --angle: calc(360 / 11); } .items-2 > .item { --angle: calc(360 / 2); @@ -65,6 +69,8 @@ .items-5 > .item { --angle: calc(360 / 5); } + + .level-1, .level-2 { @@ -86,14 +92,9 @@ justify-items: center; grid-area: 1/1/1/1; } - .orbit { - display: grid; - grid-template-columns: 1fr 1fr; - align-items: center; - justify-items: center; - } + .level-1 { - width: calc(var(--distance) * 2); + width: calc(var(--distance) * 2) + 100; height: calc(var(--distance) * 2); } .level-2 { @@ -136,10 +137,9 @@ translate(var(--distance), 0) rotate(calc(var(--angle) * var(--item-number) * 1deg * -1)); } - .item.orbit, .pepe.orbit, + .item.orbit, .item.level-1.orbit { - --p1: calc(var(--angle) * var(--item-number) * 1deg); - transform: rotate(var(--p1)) + transform: rotate(calc(var(--angle) * var(--item-number) * 1deg)) translate(var(--distance), 0); } @@ -148,6 +148,7 @@ translate(var(--distance2), 0) rotate(calc(var(--angle) * var(--item-number) * 1deg * -1)); } + .item.d50 { --distance: 50px; @@ -159,8 +160,8 @@ .item.d10 { --distance: 10px; } - .item.a10 { - --angle: 77; + .item.a45 { + --angle: -45; } .item.s, .item.sm { diff --git a/index.html b/index.html index f91c05d..7e78d46 100644 --- a/index.html +++ b/index.html @@ -11,21 +11,17 @@
-
-
One
+ one
-
-
- - -
- - +
+ +
+
text
4
5
-
6
+
@@ -41,7 +37,10 @@
e
- +