Exemplo n.º 1
0
from elsie import Slides, Arrow

# Let us our primary colors used in slides
COLOR1 = "#328cc1"
COLOR2 = "#d9b310"

# Top-level slide instances
slides = Slides()

# Modyfy global text styles
slides.update_style("default", color=COLOR1)  # Default font
slides.update_style("emph", color=COLOR2)  # Emphasis

# First slide #############################################

# Create a new slide, it actually returns instance of Box.
# We are going to create a lots of boxes
slide = slides.new_slide()

# Create text styles that are local for this slide
# Actually, any Box can have own styles that are inherited
# to any sub-boxes.
slide.new_style("header", size=35, color="white")
slide.new_style("header2", size=25, color=COLOR1)

# Create a box that fill the whole slide horizontaly
title_box1 = slide.box(width="fill", height=120)
title_box1.rect(bg_color=COLOR2)  # Draw a filled rectangle

# Create a sub-box in title_box1.
# "fbox" is shortcut for box(width="fill", height="fill")
Exemplo n.º 2
0
from elsie import Slides, TextStyle as s

from part1 import features
from part2 import performance
from part3 import memory_safety
from part4 import fearless_concurrency
from utils import slide_header

COLOR1 = "black"
COLOR2 = "#f74f00"

slides = Slides()

slides.update_style("default", s(font="Raleway-v4020", size=36, color=COLOR1))  # Default font
slides.update_style("emph", s(color=COLOR2))     # Emphasis
slides.set_style("code2", slides.get_style("code").compose(s(size=40, align="left")))


def intro(slides: Slides):
    slide = slides.new_slide()
    slide.set_style("title", s(size=60, bold=True))
    slide.set_style("name", s(size=30))

    slide.sbox(height="30%").image("imgs/logo.svg")
    slide.box(height=80)
    slide.box().text("Rust: Fast & Safe", "title")
    slide.box(height=20)
    slide.box().text("Jakub Beránek, Mathieu Fehr, Saurabh Raje", "name")

    slide = slides.new_slide()
    slide.box(width=500).image("imgs/meme-rust-meeting.jpg")