8000
is_dark = data.get("is_dark", False) fill.fore_color.rgb = COLOR_NAVY if is_dark else COLOR_LIGHT_BG
if is_dark: txBox = slide.shapes.add_textbox(Inches(1.5), Inches(2.0), Inches(10.33), Inches(3.5)) tf = txBox.text_frame tf.word_wrap = True
p = tf.paragraphs[0] p.text = data["title"] p.alignment = PP_ALIGN.CENTER p.font.size = Pt(46) p.font.bold = True p.font.color.rgb = COLOR_GOLD p2 = tf.add_paragraph() p2.text = data.get("subtitle", "") p2.alignment = PP_ALIGN.CENTER p2.font.size = Pt(22) p2.font.color.rgb = COLOR_WHITE p2.space_before = Pt(24)
else: # شريط علوي صغير top_box = slide.shapes.add_textbox(Inches(1.0), Inches(0.4), Inches(11.33), Inches(0.4)) tf_top = top_box.text_frame p_top = tf_top.paragraphs[0] p_top.text = "بصيرة ✦ | مقترح رعاية مجمع الطاووس" p_top.alignment = PP_ALIGN.RIGHT p_top.font.size = Pt(12) p_top.font.color.rgb = COLOR_GRAY
# عنوان الشريحة title_box = slide.shapes.add_textbox(Inches(1.0), Inches(0.9), Inches(11.33), Inches(1.1)) tf_title = title_box.text_frame p_t = tf_title.paragraphs[0] p_t.text = data["title"] p_t.alignment = PP_ALIGN.RIGHT p_t.font.size = Pt(32) p_t.font.bold = True p_t.font.color.rgb = COLOR_NAVY # محتوى الشريحة content_box = slide.shapes.add_textbox(Inches(1.0), Inches(2.2), Inches(11.33), Inches(4.5)) tf_content = content_box.text_frame tf_content.word_wrap = True for pt in data.get("points", []): p = tf_content.add_paragraph() p.text = f"• {pt}" p.alignment = PP_ALIGN.RIGHT p.font.size = Pt(20) p.font.color.rgb = COLOR_TEXT_DARK p.space_after = Pt(16)
Activity