Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- columns = []
- carousel_column = BubbleContainer(
- body=BoxComponent(
- layout='vertical',
- contents=[
- ImageComponent(
- url="https://scdn.line-apps.com/n/channel_devcenter/img/flexsnapshot/clip/clip1.jpg",
- size='full',
- aspect_ratio='2:3',
- aspect_mode='cover',
- gravity='top',
- ),
- BoxComponent(
- layout='vertical',
- contents=[
- BoxComponent(
- layout='vertical',
- contents=[
- #titile
- TextComponent(text='test', weight='bold', color='#ffffff', size='md'),
- ],
- ),
- BoxComponent(
- layout='baseline',
- contents=[
- # info
- TextComponent(text='asdasda adsasd ass', color='#ebebeb', size='xs', gravity='bottom', flex=0),
- ],
- spacing='lg',
- ),
- BoxComponent(
- layout='vertical',
- contents=[
- FillerComponent(),
- BoxComponent(
- layout='baseline',
- contents=[
- FillerComponent(),
- IconComponent(
- url='https://scdn.line-apps.com/n/channel_devcenter/img/flexsnapshot/clip/clip14.png'
- ),
- TextComponent(text='Selengkapnya', color='#ffffff', flex=0, offset_top='-2px'),
- FillerComponent(),
- ],
- spacing='sm',
- ),
- FillerComponent(),
- ],
- border_width='1px',
- corner_radius='4px',
- spacing='sm',
- border_color='#ffffff',
- margin='xxl',
- height='40px',
- ),
- ],
- position= 'absolute',
- offset_bottom= '0px',
- offset_start= '0px',
- offset_end= '0px',
- background_color= '#03303Acc',
- padding_all= '20px',
- padding_top= '18px',
- ),
- BoxComponent(
- layout='vertical',
- contents=[
- TextComponent(text='SALE', align='center', color='#ffffff', size='xs', offset_top='3px'),
- ],
- position= 'absolute',
- corner_radius= '20px',
- offset_top= '18px',
- background_color= '#ff334b',
- offset_start= '18px',
- height= '25px',
- width= '53px',
- ),
- ],
- padding_all= '0px',
- )
- )
- columns.append(carousel_column)
- carousel_template = CarouselContainer(contents=columns)
- template_message = FlexSendMessage(
- alt_text='TEST', contents=carousel_template)
- line_bot_api.reply_message(
- event.reply_token, [
- template_message])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement