@kitconcept/volto-light-theme 3.0.0-alpha.2 → 3.0.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.
package/src/index.js CHANGED
@@ -10,6 +10,7 @@ import { videoBlockSchemaEnhancer } from './components/Blocks/Video/schema';
10
10
  import { gridTeaserDisableStylingSchema } from '@plone/volto/components/manage/Blocks/Teaser/schema';
11
11
  import { gridImageDisableSizeAndPositionHandlersSchema } from '@plone/volto/components/manage/Blocks/Image/schema';
12
12
  import { disableBgColorSchema } from './components/Blocks/disableBgColorSchema';
13
+ import BlockSettingsSchema from '@plone/volto/components/manage/Blocks/Block/Schema';
13
14
 
14
15
  import ContainerQueriesPolyfill from './components/CQPolyfill';
15
16
  import Container from './components/Atoms/Container/Container';
@@ -27,10 +28,12 @@ import { searchBlockSchemaEnhancer } from './components/Blocks/Search/schema';
27
28
 
28
29
  import gridSVG from './icons/block_icn_grid.svg';
29
30
  import accordionSVG from './icons/block_icn_accordion.svg';
31
+ import descriptionSVG from '@plone/volto/icons/description.svg';
30
32
  import EventView from './components/Theme/EventView';
31
33
  import { tocBlockSchemaEnhancer } from './components/Blocks/Toc/schema';
32
34
  import { mapsBlockSchemaEnhancer } from './components/Blocks/Maps/schema';
33
35
  import { sliderBlockSchemaEnhancer } from './components/Blocks/Slider/schema';
36
+ import EventMetadataView from './components/Blocks/EventMetadata/View';
34
37
 
35
38
  const BG_COLORS = [
36
39
  { name: 'transparent', label: 'Transparent' },
@@ -55,11 +58,26 @@ const applyConfig = (config) => {
55
58
  config.settings.slate.useLinkedHeadings = false;
56
59
  config.settings.contentMetadataTagsImageField = 'preview_image';
57
60
 
61
+ // Initial block for event content type
62
+ config.blocks.initialBlocks = {
63
+ Event: [
64
+ { '@type': 'title' },
65
+ { '@type': 'eventMetadata', fixed: true, required: true },
66
+ { '@type': 'slate' },
67
+ ],
68
+ };
69
+
70
+ config.settings.siteLabel = '';
71
+ config.settings.intranetHeader = false;
72
+
58
73
  // Remove Hero Block
59
74
  config.blocks.blocksConfig.hero.restricted = true;
60
75
 
61
76
  // No required blocks (eg. Title)
62
- config.blocks.requiredBlocks = [];
77
+ config.blocks.requiredBlocks = [
78
+ ...config.blocks.requiredBlocks,
79
+ 'eventMetadata',
80
+ ];
63
81
 
64
82
  // Register custom Container component
65
83
  config.registerComponent({
@@ -296,6 +314,20 @@ const applyConfig = (config) => {
296
314
  colors: BG_COLORS,
297
315
  };
298
316
 
317
+ config.blocks.blocksConfig.eventMetadata = {
318
+ id: 'eventMetadata',
319
+ title: 'EventMetadata',
320
+ icon: descriptionSVG,
321
+ group: 'common',
322
+ view: EventMetadataView,
323
+ edit: EventMetadataView,
324
+ schema: BlockSettingsSchema,
325
+ restricted: ({ properties, block }) =>
326
+ properties['@type'] === 'Event' ? false : true,
327
+ mostUsed: false,
328
+ sidebarTab: 0,
329
+ };
330
+
299
331
  // Check if the separator is present before enhancing it
300
332
  if (config.blocks.blocksConfig?.separator?.id) {
301
333
  config.blocks.blocksConfig.separator = {
@@ -96,6 +96,7 @@
96
96
  border: none;
97
97
  border-radius: 50%;
98
98
  background-color: transparent;
99
+ color: $black;
99
100
  transition:
100
101
  background-color 200ms ease-in-out,
101
102
  color 300ms ease-in-out;
@@ -220,8 +221,25 @@
220
221
  .tools-wrapper {
221
222
  display: flex;
222
223
  flex-direction: row-reverse;
224
+ justify-content: space-between;
223
225
  padding-top: 16px;
224
226
 
227
+ .intranet {
228
+ padding: 10px $spacing-small;
229
+ margin-top: -16px;
230
+ margin-left: 213px;
231
+ background-color: $secondary-grey;
232
+ @media only screen and (max-width: $narrow-container-width) {
233
+ margin-left: 0px;
234
+ }
235
+
236
+ p {
237
+ @include marginal-title();
238
+ font-weight: 400;
239
+ text-transform: capitalize;
240
+ }
241
+ }
242
+
225
243
  .language-selector {
226
244
  padding-left: 40px;
227
245
  }
@@ -265,6 +283,99 @@
265
283
  }
266
284
  }
267
285
 
286
+ // Intranet Header
287
+
288
+ .header-wrapper.intranet-header {
289
+ .header {
290
+ flex-direction: column;
291
+
292
+ .logo-nav-wrapper {
293
+ flex-wrap: wrap;
294
+ justify-content: flex-start;
295
+
296
+ .logo {
297
+ flex: 0 1 auto;
298
+ }
299
+
300
+ @media only screen and (max-width: $narrow-container-width) {
301
+ position: relative;
302
+ }
303
+
304
+ .mobile-nav.mobile.only {
305
+ @media only screen and (max-width: $narrow-container-width) {
306
+ position: absolute;
307
+ top: 19px;
308
+ right: 0;
309
+ }
310
+
311
+ .menu-drawer {
312
+ @media only screen and (max-width: $computer-breakpoint) {
313
+ top: 210px;
314
+ }
315
+ }
316
+ }
317
+ .navigation {
318
+ flex-basis: 100%;
319
+ margin: 29px auto 0 auto;
320
+ }
321
+ }
322
+
323
+ .search-wrapper {
324
+ flex: 0 1 auto;
325
+ align-self: center;
326
+ margin-left: 209px;
327
+ @media only screen and (max-width: $narrow-container-width) {
328
+ width: 100%;
329
+ margin-left: 0%;
330
+ }
331
+
332
+ .search {
333
+ width: 100%;
334
+ border-bottom: 2px solid $secondary-grey;
335
+ .field.searchbox {
336
+ border: none;
337
+
338
+ .ui.input input {
339
+ width: 500px;
340
+
341
+ &::placeholder {
342
+ color: #808080;
343
+ @include body-text();
344
+ }
345
+ @media only screen and (max-width: $narrow-container-width) {
346
+ width: 100%;
347
+ }
348
+ }
349
+
350
+ button {
351
+ @media only screen and (max-width: $narrow-container-width) {
352
+ padding-left: 9px;
353
+ }
354
+ &:hover {
355
+ background-color: transparent;
356
+ color: $black;
357
+ cursor: pointer;
358
+ }
359
+ }
360
+ }
361
+ }
362
+ }
363
+
364
+ .tools-wrapper {
365
+ justify-content: space-between;
366
+ @media only screen and (max-width: $narrow-container-width) {
367
+ flex-direction: row;
368
+ }
369
+
370
+ .tools {
371
+ @media only screen and (max-width: $narrow-container-width) {
372
+ display: none;
373
+ }
374
+ }
375
+ }
376
+ }
377
+ }
378
+
268
379
  /* we have to align the search hide with desktop naviation hide.
269
380
  And destktop navigation uses different breakpoint for different mode and it is coming
270
381
  from volto core */
@@ -409,6 +520,7 @@ body.has-toolbar.has-sidebar {
409
520
  color: $white;
410
521
 
411
522
  a {
523
+ padding-bottom: 0;
412
524
  font-size: 14px;
413
525
  font-weight: 400;
414
526
  line-height: 18px;
@@ -490,12 +602,7 @@ body.has-toolbar.has-sidebar {
490
602
  }
491
603
  }
492
604
 
493
- li {
494
- position: relative;
495
- padding-top: 0;
496
- }
497
-
498
- li a.current {
605
+ a.current {
499
606
  .left-arrow {
500
607
  visibility: visible;
501
608
  }
@@ -513,14 +620,13 @@ body.has-toolbar.has-sidebar {
513
620
  display: flex;
514
621
  }
515
622
 
516
- li {
517
- padding: 8px 0;
518
- }
519
-
520
- li a {
623
+ a {
624
+ position: relative;
521
625
  display: inline-flex;
522
626
  align-items: flex-start;
627
+ padding-bottom: 8px;
523
628
  color: $black;
629
+
524
630
  @include body-text-bold();
525
631
 
526
632
  span {
@@ -197,6 +197,7 @@ External link removal for all the blocks.
197
197
  & > .block.video.align.wide .video-inner,
198
198
  & > .block.maps.align.wide .maps-inner,
199
199
  & > .block.__button,
200
+ & > .block.eventMetadata .details-container,
200
201
  & > .block.listing .listing-item,
201
202
  & > .block.listing .emptyListing,
202
203
  & > .block.listing .image-gallery,
@@ -308,6 +309,7 @@ External link removal for all the blocks.
308
309
  .block-editor-search .searchBlock-container,
309
310
  .block-editor-separator.has--align--full .block.separator .line,
310
311
  .block.teaser.has--align--center,
312
+ .block.eventMetadata .details-container,
311
313
  .block-editor-teaser .teaser-item.default,
312
314
  .block-editor-slateTable .block.table,
313
315
  .block-editor-highlight .teaser-description-title,
@@ -0,0 +1,73 @@
1
+ .block.eventMetadata {
2
+ .details-container {
3
+ padding-top: $spacing-xlarge;
4
+ padding-bottom: $spacing-xlarge;
5
+ border-top: 1px solid $black;
6
+ border-bottom: 1px solid $black;
7
+ margin-top: 0px;
8
+ margin-bottom: $spacing-xlarge;
9
+ @container (max-width: #{$largest-mobile-screen} ) {
10
+ padding-top: $spacing-large;
11
+ padding-bottom: $spacing-large;
12
+ margin-bottom: $spacing-large;
13
+ }
14
+ .content-container {
15
+ display: flex;
16
+ justify-content: space-between;
17
+ .event-details {
18
+ flex: 1;
19
+
20
+ .event-title {
21
+ margin-bottom: 25px;
22
+ .event-heading {
23
+ @include headtitle2();
24
+ letter-spacing: 1px;
25
+ text-transform: uppercase;
26
+ }
27
+ .event-detail {
28
+ margin-top: 10px;
29
+ font-size: 24px;
30
+ font-weight: 300;
31
+ line-height: 33px;
32
+ p,
33
+ a {
34
+ margin-top: 10px;
35
+ margin-bottom: 10px;
36
+ font-size: 24px;
37
+ font-weight: 300;
38
+ line-height: 33px;
39
+ }
40
+ }
41
+ .separator {
42
+ width: 170px;
43
+ height: 30px;
44
+ border-right: none;
45
+ border-bottom: 1px solid #000;
46
+ }
47
+ }
48
+ }
49
+ }
50
+ .event-button {
51
+ padding-top: 50px;
52
+ a:after {
53
+ display: none !important;
54
+ }
55
+ .event-btn {
56
+ padding: 8px 20px;
57
+ border: 1px solid #000;
58
+ border-radius: 5px;
59
+ background-color: transparent;
60
+ color: #000;
61
+ font-size: 16px;
62
+ font-weight: $bolder;
63
+ line-height: 20px;
64
+ a {
65
+ color: #000;
66
+ font-size: 16px;
67
+ font-weight: $bolder;
68
+ line-height: 20px;
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
@@ -171,7 +171,7 @@ figcaption {
171
171
  }
172
172
 
173
173
  .description {
174
- div,
174
+ p,
175
175
  a {
176
176
  @include marginal-description();
177
177
  }
@@ -4,11 +4,11 @@
4
4
 
5
5
  .block.introduction {
6
6
  .block-container p,
7
- .block-container ul,
8
- .block-container ol,
7
+ .block-container ul li,
8
+ .block-container ol li,
9
9
  .slate-editor p,
10
- .slate-editor ul,
11
- .slate-editor ol {
10
+ .slate-editor ul li,
11
+ .slate-editor ol li {
12
12
  margin: 0;
13
13
  @include introduction();
14
14
  strong,
@@ -32,6 +32,7 @@
32
32
  @import 'blocks/table';
33
33
  @import 'blocks/maps';
34
34
  @import 'blocks-chooser';
35
+ @import 'blocks/eventMetadata';
35
36
 
36
37
  @import 'temp';
37
38