@documental-xyz/core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +424 -0
  2. package/integration.ts +113 -0
  3. package/package.json +83 -0
  4. package/src/admin/admin.astro +29 -0
  5. package/src/assets/scripts/App.js +70 -0
  6. package/src/assets/scripts/EnteringAnimations.js +34 -0
  7. package/src/assets/scripts/MapBoxHandler.js +680 -0
  8. package/src/assets/scripts/ScrollProgressionBar.js +24 -0
  9. package/src/assets/scripts/utils/ScrollObserver.js +166 -0
  10. package/src/assets/styles/config/_breakpoints.scss +37 -0
  11. package/src/assets/styles/config/_colors.scss +8 -0
  12. package/src/assets/styles/config/_config.scss +5 -0
  13. package/src/assets/styles/config/_functions.scss +90 -0
  14. package/src/assets/styles/config/_grrr.configs.scss +7 -0
  15. package/src/assets/styles/config/_mixins.scss +207 -0
  16. package/src/assets/styles/config/_type.scss +175 -0
  17. package/src/assets/styles/config/_vars.scss +16 -0
  18. package/src/assets/styles/globals/_content.scss +47 -0
  19. package/src/assets/styles/globals/_grrr.scss +18 -0
  20. package/src/assets/styles/globals/_html.scss +25 -0
  21. package/src/assets/styles/globals/_lists.scss +19 -0
  22. package/src/assets/styles/globals/_map-anchors.scss +32 -0
  23. package/src/assets/styles/globals/_reset.scss +240 -0
  24. package/src/assets/styles/globals/_reveal-animations.scss +104 -0
  25. package/src/assets/styles/globals/_root.scss +6 -0
  26. package/src/assets/styles/globals/_scroll-progression-bar.scss +8 -0
  27. package/src/assets/styles/main.scss +17 -0
  28. package/src/assets/styles/utils/.gitkeep +0 -0
  29. package/src/assets/styles/utils/grrr/_grrr.scss +433 -0
  30. package/src/assets/styles/utils/list-styles/_list-styles.scss +190 -0
  31. package/src/components/AnimationToggle.astro +19 -0
  32. package/src/components/BigNumbers.astro +83 -0
  33. package/src/components/Button.astro +49 -0
  34. package/src/components/Caption.astro +15 -0
  35. package/src/components/Card.astro +68 -0
  36. package/src/components/Cards.astro +66 -0
  37. package/src/components/CardsCall.astro +125 -0
  38. package/src/components/ChartBar.astro +217 -0
  39. package/src/components/ChartPercentage.astro +137 -0
  40. package/src/components/Column.astro +54 -0
  41. package/src/components/ColumnSticky.astro +129 -0
  42. package/src/components/Columns.astro +139 -0
  43. package/src/components/Compare.astro +266 -0
  44. package/src/components/Cta.astro +242 -0
  45. package/src/components/Gallery.astro +594 -0
  46. package/src/components/Group.astro +140 -0
  47. package/src/components/HtmlEmbed.astro +98 -0
  48. package/src/components/ImageBlock.astro +134 -0
  49. package/src/components/InnerColumns.astro +54 -0
  50. package/src/components/LogosGroup.astro +102 -0
  51. package/src/components/Map.astro +321 -0
  52. package/src/components/MapBox.astro +96 -0
  53. package/src/components/MapView.astro +30 -0
  54. package/src/components/Menu.astro +278 -0
  55. package/src/components/Pullquote.astro +46 -0
  56. package/src/components/Slider.astro +223 -0
  57. package/src/components/Spacer.astro +25 -0
  58. package/src/components/Text.astro +173 -0
  59. package/src/components/TextPlaceholder.astro +98 -0
  60. package/src/components/Timeline.astro +73 -0
  61. package/src/components/TimelineBullet.astro +67 -0
  62. package/src/components/VideoEmbed.astro +99 -0
  63. package/src/content/loader.ts +29 -0
  64. package/src/content/pages/alter-ameacada.md +80 -0
  65. package/src/content/pages/expulsions.md +1447 -0
  66. package/src/content/pages/home.md +346 -0
  67. package/src/content/pages/nhanderekoa-studio-autonoma.md +3113 -0
  68. package/src/content/pages/nhanderekoa-terra-ind/303/255gena-jaragu/303/241.md +3806 -0
  69. package/src/content/pages/nova-landing-page.md +546 -0
  70. package/src/content/pages/territ/303/263rios-de-exce/303/247/303/243o.md +2199 -0
  71. package/src/content/pages/teste-alter-do-chao.md +955 -0
  72. package/src/content/pages/teste-layout.md +1484 -0
  73. package/src/content/pages/thiago.md +93 -0
  74. package/src/content/schema/blog.ts +11 -0
  75. package/src/content/schema/geostorys.ts +13 -0
  76. package/src/content/schema/index.ts +3 -0
  77. package/src/content/schema/pages.ts +494 -0
  78. package/src/content.config.ts +49 -0
  79. package/src/env.d.ts +1 -0
  80. package/src/integration/override-aliases.ts +67 -0
  81. package/src/layouts/components/ButtonLayout.astro +8 -0
  82. package/src/layouts/components/CardLayout.astro +8 -0
  83. package/src/layouts/components/CardsCallLayout.astro +26 -0
  84. package/src/layouts/components/CardsLayout.astro +14 -0
  85. package/src/layouts/components/ChartBarLayout.astro +21 -0
  86. package/src/layouts/components/ChartPercentageLayout.astro +17 -0
  87. package/src/layouts/components/ColumnLayout.astro +11 -0
  88. package/src/layouts/components/ColumnStickyLayout.astro +10 -0
  89. package/src/layouts/components/ColumnsLayout.astro +13 -0
  90. package/src/layouts/components/CompareLayout.astro +22 -0
  91. package/src/layouts/components/CtaLayout.astro +91 -0
  92. package/src/layouts/components/GalleryLayout.astro +24 -0
  93. package/src/layouts/components/GroupLayout.astro +53 -0
  94. package/src/layouts/components/HtmlEmbedLayout.astro +18 -0
  95. package/src/layouts/components/ImageBlockLayout.astro +20 -0
  96. package/src/layouts/components/InnerColumnsLayout.astro +14 -0
  97. package/src/layouts/components/LogosGroupLayout.astro +22 -0
  98. package/src/layouts/components/MapLayout.astro +41 -0
  99. package/src/layouts/components/MapViewLayout.astro +8 -0
  100. package/src/layouts/components/MapboxLayout.astro +248 -0
  101. package/src/layouts/components/PullquoteLayout.astro +13 -0
  102. package/src/layouts/components/SliderLayout.astro +18 -0
  103. package/src/layouts/components/SpacerLayout.astro +8 -0
  104. package/src/layouts/components/TextLayout.astro +17 -0
  105. package/src/layouts/components/TextPlaceholderLayout.astro +7 -0
  106. package/src/layouts/components/TimelineBulletLayout.astro +14 -0
  107. package/src/layouts/components/TimelineLayout.astro +10 -0
  108. package/src/layouts/components/VideoEmbedLayout.astro +28 -0
  109. package/src/layouts/pages/Layout.astro +90 -0
  110. package/src/layouts/pages/PageLayout.astro +200 -0
  111. package/src/lib/collections.ts +1 -0
  112. package/src/routes/[slug].astro +17 -0
  113. package/src/routes/index.astro +5 -0
  114. package/src/vite/yaml-merge-plugin.ts +234 -0
@@ -0,0 +1,433 @@
1
+ @use "sass:map";
2
+ @use "sass:math";
3
+ @use "sass:list";
4
+
5
+ @use '../../config/breakpoints' as *;
6
+ @use '../../config/grrr.configs' as *;
7
+ @use '../../config/mixins' as *;
8
+ @use '../../config/functions' as *;
9
+
10
+ @mixin grrr($type: 'board', $start: 'full', $end: 'full', $offset: true, $config: $grrr-config, $prefix: false) {
11
+
12
+ // defining sass vars
13
+ @if $prefix == false {
14
+ $prefix: map.get($config, 'name');
15
+ }
16
+ $breakpoints: map.get($map: $config, $key: 'breakpoints');
17
+ $board-max: map.get($map: $config, $key: 'board-max');
18
+ $last_item: list.nth(map.values($breakpoints), -1);
19
+ $board-max-w-margins: map.get($map: $last_item, $key: 'margin') * 2 + $board-max;
20
+
21
+ //defining breakpoint vars
22
+ @include grrr-bp-vars($type,$start,$end,$offset,$config,$prefix,$breakpoints);
23
+
24
+ //defining css vars
25
+ @include grrr-css-vars($type,$start,$end,$offset,$config,$prefix, $board-max, $board-max-w-margins);
26
+
27
+ & {
28
+ //default grid css properties
29
+ display: grid;
30
+ grid-auto-rows: -webkit-max-content;
31
+ grid-auto-rows: max-content;
32
+ grid-auto-flow: row;
33
+ column-gap: 0 !important;
34
+ @if $type =='board' {
35
+
36
+ @if $start =='full' and $end =='full' {
37
+ grid-column: full-start / full-end;
38
+ grid-template-columns: [full-start offset-start] minmax(var(--#{$prefix}-board-margin), var(--#{$prefix}-margin)) [offset-end board-full-start content-start board-start] minmax(0, 1fr) repeat(calc(var(--#{$prefix}-cols) - 1), [board-end gap-start] min(var(--#{$prefix}-gutter)) [gap-end board-start] minmax(0, 1fr)) [board-full-end content-end board-end offset-start] minmax(var(--#{$prefix}-board-margin), var(--#{$prefix}-margin)) [full-end offset-end];
39
+ }
40
+
41
+ @if $start =='full' and $end !='full' {
42
+ $end-cols: calc($end - 1);
43
+ --#{$prefix}-child-margin: calc(100% - (#{$end} * (var(--#{$prefix}-col-size) + var(--#{$prefix}-gutter))));
44
+ --#{$prefix}-child-margin-left: calc(var(--#{$prefix}-child-margin) + var(--#{$prefix}-gutter));
45
+
46
+ grid-column: full-start / board-end $end;
47
+ margin-right: calc(var(--#{$prefix}-out-left) * -1);
48
+ grid-template-columns: [full-start offset-start] minmax(var(--#{$prefix}-margin), var(--#{$prefix}-child-margin)) [offset-end board-full-start content-start board-start] minmax(0, 1fr) repeat($end-cols, [board-end gap-start] min(var(--#{$prefix}-gutter)) [gap-end board-start] minmax(0, 1fr)) [board-full-end content-end board-end full-end offset-start] var(--#{$prefix}-out-right) [offset-end];
49
+
50
+ @media (max-width: #{ $board-max-w-margins }) {
51
+ --#{$prefix}-child-margin: var(--#{$prefix}-margin);
52
+ --#{$prefix}-child-margin-left: var(--#{$prefix}-margin);
53
+ }
54
+ }
55
+
56
+ @if $start !='full' and $end =='full' {
57
+ $start-cols: calc(var(--#{$prefix}-cols) - #{$start});
58
+ --#{$prefix}-child-margin: calc(100% - ((#{$start-cols} + 1) * (var(--#{$prefix}-col-size) + var(--#{$prefix}-gutter))));
59
+ --#{$prefix}-child-margin-right: calc(var(--#{$prefix}-child-margin) + var(--#{$prefix}-gutter));
60
+
61
+ grid-column: board-start $start / full-end;
62
+ margin-left: calc(var(--#{$prefix}-out-left) * -1);
63
+ grid-template-columns: [offset-start] var(--#{$prefix}-out-left) [offset-end full-start board-full-start content-start board-start] minmax(0, 1fr) repeat($start-cols , [board-end gap-start] min(var(--#{$prefix}-gutter)) [gap-end board-start] minmax(0, 1fr)) [board-full-end content-end board-end offset-start] minmax(var(--#{$prefix}-margin), var(--#{$prefix}-child-margin)) [offset-end full-end];
64
+
65
+ @media (max-width: #{ $board-max-w-margins }) {
66
+ --#{$prefix}-child-margin: var(--#{$prefix}-margin);
67
+ --#{$prefix}-child-margin-right: var(--#{$prefix}-margin);
68
+ }
69
+ }
70
+
71
+ @if $start !='full' and $end !='full' {
72
+ $end-cols: calc($end - $start);
73
+
74
+ margin-inline: calc(var(--#{$prefix}-out-left) * -1) calc(var(--#{$prefix}-out-right) * -1);
75
+ grid-column: board-start $start / board-end $end;
76
+ grid-template-columns:
77
+ [offset-start] var(--#{$prefix}-out-left) [offset-end full-start board-full-start content-start board-start]
78
+ minmax(0, 1fr)
79
+ repeat($end-cols, [board-end gap-start] min(var(--#{$prefix}-gutter)) [gap-end board-start] minmax(0, 1fr))
80
+ [board-full-end content-end board-end full-end offset-start] var(--#{$prefix}-out-right) [offset-end];
81
+ }
82
+ }
83
+
84
+ @if $type =='fluid' {
85
+ --#{$prefix}-col-context-size: var(--#{$prefix}-col-responsive-size);
86
+
87
+ @if $start =='full' and $end =='full' {
88
+ grid-column: full-start / full-end;
89
+ grid-template-columns: [full-start offset-start] var(--#{$prefix}-margin) [board-full-start content-start board-start offset-end] minmax(0, 1fr) repeat(calc(var(--#{$prefix}-cols) - 1), [board-end gap-start] min(var(--#{$prefix}-gutter)) [gap-end board-start] minmax(0, 1fr)) [board-full-end content-end board-end offset-start] min(var(--#{$prefix}-margin)) [offset-end full-end];
90
+ }
91
+
92
+ @if $start =='full' and $end !='full' {
93
+ $end-cols: calc($end - 1);
94
+
95
+ grid-column: full-start / board-end $end;
96
+ margin-right: calc(var(--#{$prefix}-out-right) * -1);
97
+ grid-template-columns: [full-start offset-start] min(var(--#{$prefix}-margin)) [offset-end board-full-start content-start board-start] minmax(0, 1fr) repeat($end-cols, [board-end gap-start] min(var(--#{$prefix}-gutter)) [gap-end board-start] minmax(0, 1fr)) [board-full-end content-end board-end full-end offset-start] var(--#{$prefix}-out-right) [offset-end];
98
+ }
99
+
100
+ @if $start !='full' and $end =='full' {
101
+ $start-cols: calc(var(--#{$prefix}-cols) - #{$start});
102
+
103
+ grid-column: board-start $start / full-end;
104
+ margin-left: calc(var(--#{$prefix}-gutter) * -1);
105
+ grid-template-columns: [offset-start] var(--#{$prefix}-gutter) [offset-end full-start board-full-start content-start board-start] minmax(0, 1fr) repeat($start-cols , [board-end gap-start] min(var(--#{$prefix}-gutter)) [gap-end board-start] minmax(0, 1fr)) [board-full-end content-end board-end offset-start] min(var(--#{$prefix}-margin)) [offset-end full-end];
106
+ }
107
+
108
+ @if $start !='full' and $end !='full' {
109
+ $end-cols: calc($end - $start);
110
+
111
+ margin-inline: calc(var(--#{$prefix}-out-left) * -1) calc(var(--#{$prefix}-out-right) * -1);
112
+ grid-column: board-start $start / board-end $end;
113
+ grid-template-columns: [offset-start] var(--#{$prefix}-out-left) [offset-end full-start board-full-start content-start board-start] minmax(0, 1fr) repeat($end-cols, [board-end gap-start] min(var(--#{$prefix}-gutter)) [gap-end board-start] minmax(0, 1fr)) [board-full-end content-end board-end full-end offset-start] var(--#{$prefix}-out-right) [offset-end];
114
+
115
+ }
116
+
117
+ }
118
+ }
119
+
120
+
121
+ }
122
+
123
+ @mixin grrr-content($type: 'board', $content-start: 3, $content-end: 10, $config: $grrr-config, $prefix: false){
124
+
125
+ // defining sass vars
126
+ @if $prefix == false {
127
+ $prefix: map.get($config, 'name');
128
+ }
129
+ $breakpoints: map.get($map: $config, $key: 'breakpoints');
130
+ $board-max: map.get($map: $config, $key: 'board-max');
131
+ $last_item: list.nth(map.values($breakpoints), -1);
132
+ $board-max-w-margins: map.get($map: $last_item, $key: 'margin') * 2 + $board-max;
133
+
134
+ //calculate col for the highest breakpoint
135
+ $content-cols: $content-end - $content-start + 1 ;
136
+ $left-cols: $content-start - 1;
137
+ $right-cols: map.get($map: $last_item, $key: 'cols') - $left-cols - $content-cols;
138
+ $gutter: map.get($map: $last_item, $key: 'gutter');
139
+ $max-col-size: calc( ($board-max - ( map.get($map: $last_item, $key: 'gutter') * (map.get($map: $last_item, $key: 'cols') - 1) )) / map.get($map: $last_item, $key: 'cols') );
140
+ $content-size: ( $max-col-size * $content-cols ) + (map.get($map: $last_item, $key: 'gutter') * ($content-cols - 1)) + (map.get($map: $last_item, $key: 'margin') * 2);
141
+
142
+
143
+ //defining breakpoint vars
144
+ @include grrr-bp-vars($type,'full','full',true,$config,$prefix,$breakpoints);
145
+
146
+ //defining css vars
147
+ @include grrr-css-vars($type,'full','full',true,$config,$prefix, $board-max, $board-max-w-margins);
148
+
149
+ $grid-left: '';
150
+ @if( $left-cols == 0 ){
151
+ $grid-left: [offset-end board-full-start board-start content-start];
152
+ }@else{
153
+ $grid-left: [offset-end board-full-start board-start];
154
+ @for $x from 1 through $left-cols{
155
+ @if( $x == 1 ){
156
+ $grid-left: #{$grid-left} minmax(0, 1fr) [board-end gap-start] minmax(0,#{$gutter});
157
+ }@else{
158
+ $grid-left: #{$grid-left} [gap-end board-start] minmax(0, 1fr) [board-end gap-start] minmax(0,#{$gutter});
159
+ }
160
+ }
161
+ $grid-left: #{$grid-left} [gap-end board-start content-start];
162
+ }
163
+
164
+ $grid-right: '';
165
+ @if( $right-cols == 0 ){
166
+ $grid-right: [offset-start board-full-end board-end content-end]
167
+ }@else{
168
+ $grid-right: [board-end gap-start content-end];
169
+ @for $x from 1 through $right-cols {
170
+ @if( $x == 1 ){
171
+ $grid-right: #{$grid-right} minmax(0,#{$gutter}) [gap-end board-start] minmax(0, 1fr);
172
+ }@else{
173
+ $grid-right: #{$grid-right} [board-end gap-start] minmax(0,#{$gutter}) [gap-end board-start] minmax(0, 1fr);
174
+ }
175
+ }
176
+ $grid-right: #{$grid-right} [offset-start board-full-end board-end];
177
+ }
178
+
179
+ $grid-margins: null;
180
+ @if $type == 'fluid' {
181
+ $grid-margins: var(--#{$prefix}-margin);
182
+ } @else {
183
+ $grid-margins: minmax(var(--#{$prefix}-board-margin), var(--#{$prefix}-margin));
184
+ }
185
+
186
+ & {
187
+ display: grid;
188
+ grid-auto-rows: -webkit-max-content;
189
+ grid-auto-rows: max-content;
190
+ grid-auto-flow: row;
191
+ column-gap: 0 !important;
192
+ grid-column: full-start / full-end;
193
+ }
194
+
195
+
196
+
197
+ @if( $type == 'board'){
198
+ & {
199
+ grid-template-columns:
200
+ [full-start offset-start] #{$grid-margins}
201
+ #{$grid-left}
202
+ repeat( #{$content-cols - 1 }, #{$max-col-size} [board-end gap-start] #{$gutter} [gap-end board-start] )
203
+ #{$max-col-size}
204
+ #{$grid-right}
205
+ #{$grid-margins} [full-end offset-end];
206
+ }
207
+ }
208
+
209
+ @if( $type == 'fluid'){
210
+ & {
211
+ grid-template-columns:
212
+ [full-start offset-start] var(--#{$prefix}-margin)
213
+ #{$grid-left}
214
+ repeat( #{$content-cols - 1 }, #{$max-col-size} [board-end gap-start] #{$gutter} [gap-end board-start] )
215
+ #{$max-col-size}
216
+ #{$grid-right}
217
+ var(--#{$prefix}-margin)
218
+ [full-end offset-end];
219
+ }
220
+ }
221
+ }
222
+
223
+ @mixin grrr-css-vars($type,$start,$end,$offset,$config,$prefix,$board-max,$board-max-w-margins){
224
+ &{
225
+ @if $type == 'board' {
226
+ --#{$prefix}-board-size: #{$board-max};
227
+ } @else {
228
+ --#{$prefix}-board-size: calc(100% - 2 * var(--#{$prefix}-margin));
229
+ }
230
+ --#{$prefix}-board-margin: calc((100% - var(--#{$prefix}-board-size)) * .5);
231
+ --#{$prefix}-col-size: calc((var(--#{$prefix}-board-size) - var(--#{$prefix}-total-gutters)) / var(--#{$prefix}-cols));
232
+ --#{$prefix}-col-width: var(--#{$prefix}-col-size);
233
+ @if $type == 'board' {
234
+ --#{$prefix}-offset-out: var(--#{$prefix}-gutter);
235
+ } @else {
236
+ --#{$prefix}-offset-out: var(--#{$prefix}-margin);
237
+ }
238
+ --#{$prefix}-total-gutters: calc((var(--#{$prefix}-cols) - 1) * var(--#{$prefix}-gutter));
239
+ --#{$prefix}-col-responsive-size: calc((100vw - var(--scrollbar-interface-width, 0px) - (2 * var(--#{$prefix}-margin)) - ((var(--#{$prefix}-cols) - 1) * var(--#{$prefix}-gutter))) / var(--#{$prefix}-cols));
240
+
241
+ @media (max-width: #{$board-max-w-margins}) {
242
+ --#{$prefix}-col-width: var(--#{$prefix}-col-responsive-size);
243
+ --#{$prefix}-offset-out: var(--#{$prefix}-margin);
244
+ }
245
+ }
246
+ }
247
+
248
+ @mixin grrr-bp-vars($type,$start,$end,$offset,$config,$prefix,$breakpoints){
249
+ $prev-gutter: null;
250
+ $prev-margin: null;
251
+ $prev-cols: null;
252
+ @each $name, $props in $breakpoints {
253
+ $bppx: map.get($props, 'breakpoint');
254
+ $gutter: map.get($props, 'gutter');
255
+ $margin: map.get($props, 'margin');
256
+ $cols: map.get($props, 'cols');
257
+ $values-changed: $gutter != $prev-gutter or $margin != $prev-margin or $cols != $prev-cols;
258
+
259
+ @if( $values-changed ){
260
+ @if $bppx {
261
+ @include media-break-up( $name ) {
262
+ @if( $gutter != $prev-gutter ){
263
+ --#{$prefix}-gutter: #{$gutter};
264
+ }
265
+ @if( $margin != $prev-margin ){
266
+ --#{$prefix}-margin: #{$margin};
267
+ }
268
+ @if( $cols != $prev-cols ){
269
+ --#{$prefix}-cols: #{$cols};
270
+ @if $offset {
271
+ @if $start != 'full' and $start > 1 {
272
+ --#{$prefix}-out-left: var(--#{$prefix}-gutter);
273
+ } @else {
274
+ --#{$prefix}-out-left: var(--#{$prefix}-offset-out);
275
+ }
276
+ @if $end != 'full' and $cols > $end {
277
+ --#{$prefix}-out-right: var(--#{$prefix}-gutter);
278
+ } @else {
279
+ --#{$prefix}-out-right: var(--#{$prefix}-offset-out);
280
+ }
281
+ } @else {
282
+ --#{$prefix}-out-left: 0px;
283
+ --#{$prefix}-out-right: 0px;
284
+ }
285
+ }
286
+ }
287
+ }@else {
288
+ @if( $gutter != $prev-gutter ){
289
+ --#{$prefix}-gutter: #{$gutter};
290
+ }
291
+ @if( $margin != $prev-margin ){
292
+ --#{$prefix}-margin: #{$margin};
293
+ }
294
+ @if( $cols != $prev-cols ){
295
+ --#{$prefix}-cols: #{$cols};
296
+ @if $offset {
297
+ @if $start != 'full' and $start > 1 {
298
+ --#{$prefix}-out-left: var(--#{$prefix}-gutter);
299
+ } @else {
300
+ --#{$prefix}-out-left: var(--#{$prefix}-offset-out);
301
+ }
302
+ @if $end != 'full' and $cols > $end {
303
+ --#{$prefix}-out-right: var(--#{$prefix}-gutter);
304
+ } @else {
305
+ --#{$prefix}-out-right: var(--#{$prefix}-offset-out);
306
+ }
307
+ } @else {
308
+ --#{$prefix}-out-left: 0px;
309
+ --#{$prefix}-out-right: 0px;
310
+ }
311
+ }
312
+ }
313
+ $prev-gutter: $gutter;
314
+ $prev-margin: $margin;
315
+ $prev-cols: $cols;
316
+ }
317
+ }
318
+ }
319
+
320
+ @function grrr-cols-size($cols: 1, $extra-gutter: 0, $config: $grrr-config, $prefix: false) {
321
+ @if $prefix == false {
322
+ $prefix: map.get($config, 'name');
323
+ }
324
+
325
+ @return calc(var(--#{$prefix}-col-context-size, var(--#{$prefix}-col-width)) * #{$cols} + (var(--#{$prefix}-gutter) * ($cols - 1 + $extra-gutter) ));
326
+ }
327
+
328
+ @mixin media-grrr-down($breakcol, $with-margins: false, $config: $grrr-config) {
329
+ $board: map.get($config, 'board-max');
330
+ $breakpoints: map.get($config, "breakpoints");
331
+ $last_item: list.nth(map.values($breakpoints), -1);
332
+
333
+ $cols: map.get($map: $last_item, $key: 'cols');
334
+ $gap: map.get($map: $last_item, $key: 'gutter');
335
+ $margin: map.get($map: $last_item, $key: 'margin');
336
+
337
+ $gutter_total_size: calc($gap * ($cols - 1));
338
+ $col_size: calc(($board - $gutter_total_size) / $cols );
339
+ $group_size: $col_size * $breakcol;
340
+
341
+ $gutters_size: calc($gap * ($breakcol - 1));
342
+ $break-px: null;
343
+ @if $with-margins {
344
+ $break-px: #{math.ceil($group_size + $gutters_size + ($margin * 2))};
345
+ } @else {
346
+ $break-px: #{math.ceil($group_size + $gutters_size)};
347
+ }
348
+
349
+ @media (max-width: $break-px) {
350
+ @content;
351
+ }
352
+ }
353
+
354
+ @mixin media-grrr-up($breakcol, $with-margins: false, $config: $grrr-config) {
355
+ $board: map.get($config, 'board-max');
356
+ $breakpoints: map.get($config, "breakpoints");
357
+ $last_item: list.nth(map.values($breakpoints), -1);
358
+
359
+ $cols: map.get($map: $last_item, $key: 'cols');
360
+ $gap: map.get($map: $last_item, $key: 'gutter');
361
+ $margin: map.get($map: $last_item, $key: 'margin');
362
+
363
+ $gutter_total_size: calc($gap * ($cols - 1));
364
+ $col_size: calc(($board - $gutter_total_size) / $cols );
365
+ $group_size: $col_size * $breakcol;
366
+
367
+ $gutters_size: calc($gap * ($breakcol - 1));
368
+ $break-px: null;
369
+ @if $with-margins {
370
+ $break-px: #{math.ceil($group_size + $gutters_size + 1px + ($margin * 2))};
371
+ } @else {
372
+ $break-px: #{math.ceil($group_size + $gutters_size + 1px)};
373
+ }
374
+
375
+ @media (min-width: $break-px) {
376
+ @content;
377
+ }
378
+ }
379
+
380
+ @mixin media-grrr-between($breakcol-lower, $breakcol-upper, $with-margins: false, $config: $grrr-config) {
381
+ $board: map.get($config, 'board-max');
382
+ $breakpoints: map.get($config, "breakpoints");
383
+ $last_item: list.nth(map.values($breakpoints), -1);
384
+
385
+ $cols: map.get($map: $last_item, $key: 'cols');
386
+ $gap: map.get($map: $last_item, $key: 'gutter');
387
+ $margin: map.get($map: $last_item, $key: 'margin');
388
+
389
+ $gutter_total_size: calc($gap * ($cols - 1));
390
+ $col_size: calc(($board - $gutter_total_size) / $cols);
391
+
392
+ $group_size-lower: $col_size * $breakcol-lower;
393
+ $gutters_size-lower: calc($gap * ($breakcol-lower - 1));
394
+ $break-px-lower: null;
395
+ @if $with-margins {
396
+ $break-px-lower: #{math.ceil($group_size-lower + $gutters_size-lower + ($margin * 2))};
397
+ } @else {
398
+ $break-px-lower: #{math.ceil($group_size-lower + $gutters_size-lower)};
399
+ }
400
+
401
+ $group_size-upper: $col_size * $breakcol-upper;
402
+ $gutters_size-upper: calc($gap * ($breakcol-upper - 1));
403
+ $break-px-upper: null;
404
+ @if $with-margins {
405
+ $break-px-upper: #{math.ceil($group_size-upper + $gutters_size-upper + 1px + ($margin * 2))};
406
+ } @else {
407
+ $break-px-upper: #{math.ceil($group_size-upper + $gutters_size-upper + 1px)};
408
+ }
409
+
410
+ @media (min-width: $break-px-lower) and (max-width: $break-px-upper) {
411
+ @content;
412
+ }
413
+ }
414
+
415
+ @mixin grrr-inherit{
416
+ display: inherit;
417
+ grid-auto-rows: inherit;
418
+ grid-auto-flow: inherit;
419
+ column-gap: inherit;
420
+ grid-column: inherit;
421
+ grid-template-columns:inherit;
422
+ margin-inline: inherit;
423
+ }
424
+
425
+ @mixin grrr-unset{
426
+ display: unset;
427
+ grid-auto-rows: unset;
428
+ grid-auto-flow: unset;
429
+ column-gap: unset;
430
+ grid-column: unset;
431
+ grid-template-columns:unset;
432
+ margin-inline: unset;
433
+ }
@@ -0,0 +1,190 @@
1
+ @use "sass:string";
2
+
3
+ // basic styles.
4
+ .atnl-ul,
5
+ .atnl-ol,
6
+ .atnl-ul ul,
7
+ .atnl-ol ol {
8
+ --_li-left: var(--li-left, 2ch);
9
+ --_li-gutter: var(--li-gutter, .5ch);
10
+ --_li-marker-sep: var(--li-marker-sep, ".");
11
+ --_li-marker-sep-end: var(--li-marker-sep-end, "");
12
+ list-style: none;
13
+ list-style-type: none !important;
14
+ margin-inline: 0;
15
+ margin-bottom: 0;
16
+ padding: 0;
17
+
18
+ ul,
19
+ ol {
20
+ padding: 0px;
21
+ }
22
+
23
+ li {
24
+ position: relative;
25
+
26
+ > div.rich-text{
27
+ display: inline;
28
+ }
29
+ }
30
+ }
31
+
32
+ .atnl-ul,
33
+ .atnl-ul ul,
34
+ .atnl-ol ul {
35
+ li {
36
+ padding-left: calc( var(--_li-left) + var(--_li-gutter) );
37
+ }
38
+ }
39
+
40
+ //ul bullet
41
+ .atnl-ul > li,
42
+ .atnl-ul ul > li,
43
+ .atnl-ol ul > li{
44
+ &:before{
45
+ content: '';
46
+ background-color: currentColor;
47
+ position: absolute;
48
+ top: 0;
49
+ left: 0;
50
+
51
+ // use mask to be able to handle any figure.
52
+ mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"><circle cx="5" cy="5" r="4" fill="white"/></svg>');
53
+ mask-size: 100%;
54
+ mask-position: center;
55
+ mask-repeat: no-repeat;
56
+
57
+ width: 8px; //control the size of marker
58
+ height: 26px; //use line height
59
+ }
60
+ }
61
+
62
+
63
+ //ol basic nested style
64
+ .atnl-ol,
65
+ .atnl-ol ol {
66
+ list-style-type: none !important;
67
+ & > li {
68
+ display: table;
69
+ padding-left: 0;
70
+ &:before {
71
+ content: '';
72
+ min-width: calc( var(--_li-left) + var(--_li-gutter) );
73
+ padding-right: var(--_li-gutter);
74
+ display: table-cell;
75
+ }
76
+ }
77
+ }
78
+
79
+ // counter
80
+ @mixin nested-ol($max-level, $current-level: 1) {
81
+ $current-counter: string.unquote('sublistCounter' + ($current-level - 1));
82
+ ol {
83
+ counter-reset: #{$current-counter};
84
+ & > li {
85
+ counter-increment: #{$current-counter};
86
+ &::before {
87
+ content: #{generate-counter-string($current-level)}
88
+ }
89
+ @if $current-level < $max-level {
90
+ & > {
91
+ @include nested-ol($max-level, $current-level + 1);
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+
98
+ @function generate-counter-string($level) {
99
+ $counter-string: "counter(listCounter, var(--ol-counter-style, decimal))";
100
+ @for $i from 0 through $level - 1 {
101
+ $counter-string: $counter-string + ' var(--_li-marker-sep) counter(sublistCounter#{$i}, var(--ol-counter-style-sub,var(--ol-counter-style, decimal)))';
102
+ }
103
+ @return $counter-string + ' var(--_li-marker-sep-end)';
104
+ }
105
+
106
+ .atnl-ol {
107
+ //listCounter is a variabled defined to continue the list from a specific number
108
+ counter-reset: listCounter calc(var(--listCounter, 1) - 1);
109
+
110
+ &[reversed],
111
+ &.reversed {
112
+ counter-reset: listCounter calc(var(--listCounter, 1) + 1);
113
+
114
+ >li {
115
+ counter-increment: listCounter -1;
116
+ }
117
+ }
118
+
119
+ & > li {
120
+ counter-increment: listCounter;
121
+ &:before {
122
+ content: counter(listCounter, var(--ol-counter-style, decimal)) + ' var(--_li-marker-sep-end)';
123
+ }
124
+
125
+ @include nested-ol(6);
126
+ }
127
+
128
+ ul{
129
+ width: 100%;
130
+
131
+ & > li > ol {
132
+ counter-reset: listCounter calc(var(--listCounter, 1) - 1);
133
+ & > li {
134
+ @include nested-ol(6);
135
+
136
+ & {
137
+ counter-increment: listCounter;
138
+ }
139
+
140
+ &::before {
141
+ content: counter(listCounter, var(--ol-counter-style, decimal));
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+
148
+ // ol list styles
149
+ .atnl-ol{
150
+ &.upper-alpha,
151
+ &[style*='list-style-type:upper-alpha'],
152
+ &[style*='list-style-type: upper-alpha'] {
153
+ li:before {
154
+ --ol-counter-style: upper-alpha;
155
+ }
156
+ ol li:before{
157
+ --ol-counter-style-sub: lower-alpha;
158
+ }
159
+ }
160
+
161
+ &.lower-alpha,
162
+ &[style*='list-style-type:lower-alpha'],
163
+ &[style*='list-style-type: lower-alpha'] {
164
+ li:before {
165
+ --ol-counter-style: lower-alpha;
166
+ }
167
+ }
168
+
169
+ &.upper-roman,
170
+ &[style*='list-style-type:upper-roman'],
171
+ &[style*='list-style-type: upper-roman'] {
172
+ li:before {
173
+ --ol-counter-style: upper-roman;
174
+ }
175
+ ol li:before{
176
+ --ol-counter-style-sub: lower-alpha;
177
+ }
178
+ }
179
+
180
+ &.lower-roman,
181
+ &[style*='list-style-type:lower-roman'],
182
+ &[style*='list-style-type: lower-roman'] {
183
+ li:before {
184
+ --ol-counter-style: lower-roman;
185
+ }
186
+ ol li:before{
187
+ --ol-counter-style-sub: lower-alpha;
188
+ }
189
+ }
190
+ }
@@ -0,0 +1,19 @@
1
+ ---
2
+ const { disabled } = Astro.props;
3
+ ---
4
+
5
+ {
6
+ disabled ? (
7
+ <div class='animation-disabled'>
8
+ <slot />
9
+ </div>
10
+ ) : (
11
+ <slot />
12
+ )
13
+ }
14
+
15
+ <style>
16
+ .animation-disabled {
17
+ display: contents;
18
+ }
19
+ </style>