TitleSceneLayout.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. 'use strict';
  2. /**
  3. * Licensed Materials - Property of IBM
  4. * IBM Cognos Products: Storytelling (C) Copyright IBM Corp. 2018, 2019
  5. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6. */
  7. define(['storytelling/nls/StringResources', 'baglass/core-client/js/core-client/utils/UniqueId'], function (stringResources, UniqueId) {
  8. return {
  9. get: function get() {
  10. var _widgets;
  11. var titleId = UniqueId.get('title_');
  12. var subtitleId = UniqueId.get('subtitle_');
  13. return {
  14. layout: {
  15. type: 'container',
  16. templateName: 'Template1',
  17. items: [{
  18. type: 'genericPage',
  19. layoutPositioning: 'relative',
  20. css: 'templateBox aspectRatio_default',
  21. items: [{
  22. type: 'templateIndicator',
  23. style: {
  24. 'top': '0%',
  25. 'left': '0%',
  26. 'right': '0%',
  27. 'bottom': '0%'
  28. }
  29. }, {
  30. id: titleId,
  31. type: 'widget',
  32. style: {
  33. width: '79.33%',
  34. height: '23.52%',
  35. top: '26.42%',
  36. left: '10.27%'
  37. }
  38. }, {
  39. id: subtitleId,
  40. type: 'widget',
  41. style: {
  42. width: '62.54%',
  43. height: '13.68%',
  44. top: '52.40%',
  45. left: '18.63%'
  46. }
  47. }]
  48. }]
  49. },
  50. widgets: (_widgets = {}, _widgets[titleId] = {
  51. id: titleId,
  52. type: 'text',
  53. isResponsive: true,
  54. placeholder: {
  55. showIcon: false,
  56. text: stringResources.get('titleWidgetPlaceholderText')
  57. },
  58. content: '<div class="staticContent"><span class="textFitted responsiveColor responsiveFontSize responsiveFontFamily"><p style="text-align: center;"><br></p></span></div>',
  59. name: stringResources.get('titleWidgetPlaceholderText'),
  60. defaults: {
  61. justifyCenter: true
  62. }
  63. }, _widgets[subtitleId] = {
  64. id: subtitleId,
  65. type: 'text',
  66. isResponsive: true,
  67. placeholder: {
  68. showIcon: false,
  69. text: stringResources.get('subtitleWidgetPlaceholderText')
  70. },
  71. content: '<div class="staticContent"><span class="textFitted responsiveColor responsiveFontSize responsiveFontFamily"><p style="text-align: center;"><br></p></span></div>',
  72. name: stringResources.get('subtitleWidgetPlaceholderText'),
  73. defaults: {
  74. justifyCenter: true
  75. }
  76. }, _widgets)
  77. };
  78. }
  79. };
  80. });
  81. //# sourceMappingURL=TitleSceneLayout.js.map