@@ -176,21 +176,40 @@ def _box(boxtype, text_or_url, left, top, height, width, id, props_attr,
176
176
if boxtype == 'Text' :
177
177
children_list = text_or_url .split ('\n ' )
178
178
179
- props = {
180
- 'isQuote' : False ,
181
- 'listType' : None ,
182
- 'paragraphStyle' : paragraphStyle ,
183
- 'size' : 4 ,
184
- #'style': copy.deepcopy(paragraph_styles[paragraphStyle])
185
- 'style' : paragraph_styles [paragraphStyle ]
186
- }
187
-
188
- props ['style' ].update (
189
- {'height' : height ,
190
- 'left' : left ,
191
- 'top' : top ,
192
- 'width' : width }
193
- )
179
+ #props = {
180
+ # 'isQuote': False,
181
+ # 'listType': None,
182
+ # 'paragraphStyle': paragraphStyle,
183
+ # 'size': 4,
184
+ # 'style': copy.deepcopy(paragraph_styles[paragraphStyle])
185
+ # #'style': paragraph_styles[paragraphStyle]
186
+ #}
187
+
188
+ #props['style'].update(
189
+ # {'height': height,
190
+ # 'left': left,
191
+ # 'top': top,
192
+ # 'width': width}
193
+ #)
194
+
195
+ props = {'isQuote' : False ,
196
+ 'listType' : None ,
197
+ 'paragraphStyle' : 'Heading 1' ,
198
+ 'size' : 4 ,
199
+ 'style' : {'color' : '#3d3d3d' ,
200
+ 'fontFamily' : 'Open Sans' ,
201
+ 'fontSize' : 26 ,
202
+ 'fontStyle' : 'normal' ,
203
+ 'fontWeight' : 400 ,
204
+ 'height' : height ,
205
+ 'left' : 0.0 ,
206
+ 'lineHeight' : 'normal' ,
207
+ 'minWidth' : 20 ,
208
+ 'opacity' : 1 ,
209
+ 'textAlign' : 'center' ,
210
+ 'textDecoration' : 'none' ,
211
+ 'top' : 350.0 ,
212
+ 'width' : 1000.0 }}
194
213
195
214
elif boxtype == 'Image' :
196
215
props = {
@@ -249,10 +268,10 @@ def _box(boxtype, text_or_url, left, top, height, width, id, props_attr,
249
268
'type' : boxtype
250
269
}
251
270
252
- if boxtype == 'Text' :
253
- child ['defaultHeight' ] = 36
254
- child ['defaultWidth' ] = 52
255
- child ['resizeVertical' ] = False
271
+ # if boxtype == 'Text':
272
+ # child['defaultHeight'] = 36
273
+ # child['defaultWidth'] = 52
274
+ # child['resizeVertical'] = False
256
275
if boxtype == 'CodePane' :
257
276
child ['defaultText' ] = 'Code'
258
277
@@ -636,30 +655,7 @@ def _return_layout_specs(num_of_boxes, url_lines, title_lines, text_block,
636
655
margin = 18
637
656
code_theme = 'tomorrowNight'
638
657
639
- # set Headings styles
640
- paragraph_styles ['Heading 1' ].update (
641
- {'color' : '#000016' ,
642
- 'fontFamily' : 'Roboto' ,
643
- 'fontSize' : 55 ,
644
- 'fontWeight' : fontWeight_dict ['Black' ]['fontWeight' ]}
645
- )
646
-
647
- paragraph_styles ['Heading 2' ] = copy .deepcopy (
648
- paragraph_styles ['Heading 1' ]
649
- )
650
- paragraph_styles ['Heading 2' ].update ({'fontSize' : 36 })
651
- paragraph_styles ['Heading 3' ] = copy .deepcopy (
652
- paragraph_styles ['Heading 1' ]
653
- )
654
- paragraph_styles ['Heading 3' ].update ({'fontSize' : 30 })
655
-
656
- # set Body style
657
- paragraph_styles ['Body' ].update (
658
- {'color' : '#000016' ,
659
- 'fontFamily' : 'Roboto' ,
660
- 'fontSize' : 16 ,
661
- 'fontWeight' : fontWeight_dict ['Thin' ]['fontWeight' ]}
662
- )
658
+ # fill back
663
659
664
660
bkgd_color = '#FFFFFF'
665
661
title_font_color = None
@@ -1042,12 +1038,13 @@ def _markdown_to_presentation(self, markdown_string, style, imgStretch):
1042
1038
code_theme ) = _return_layout_specs (num_of_boxes , url_lines ,
1043
1039
title_lines , text_block , code_blocks , slide_num , style )
1044
1040
1041
+ print specs_for_title
1042
+
1045
1043
# background color
1046
1044
self ._color_background (bkgd_color , slide_num )
1047
1045
1048
1046
# insert title, text, code, and images
1049
1047
if len (title_lines ) > 0 :
1050
-
1051
1048
# clean titles
1052
1049
title = title_lines [0 ]
1053
1050
num_hashes = 0
@@ -1056,6 +1053,7 @@ def _markdown_to_presentation(self, markdown_string, style, imgStretch):
1056
1053
num_hashes += 1
1057
1054
title = _remove_extra_whitespace_from_line (title )
1058
1055
1056
+ print specs_for_title
1059
1057
self ._insert (
1060
1058
box = 'Text' , text_or_url = title ,
1061
1059
left = specs_for_title [0 ], top = specs_for_title [1 ],
@@ -1135,7 +1133,7 @@ def _add_missing_slides(self, slide):
1135
1133
self ._add_empty_slide ()
1136
1134
1137
1135
def _insert (self , box , text_or_url , left , top , height , width , slide = 0 ,
1138
- props_attr = {}, style_attr = {}, paragraphStyle = 'Body' ):
1136
+ props_attr = {}, style_attr = {}, paragraphStyle = None ):
1139
1137
self ._add_missing_slides (slide )
1140
1138
1141
1139
left , top , height , width = _return_box_position (left , top , height ,
0 commit comments