2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-19 15:25:34 +00:00
Comrad/komrade/app/screens/feed/feed.kv

183 lines
4.0 KiB
Plaintext
Raw Normal View History

2020-08-10 16:37:42 +00:00
#:import FeedScreen screens.feed.feed.FeedScreen
2020-08-11 13:01:48 +00:00
#:import Window kivy.core.window.Window
2020-08-19 23:26:25 +00:00
#:import rgb main.rgb
#:import COLOR_CARD main.COLOR_CARD
#:import COLOR_TEXT main.COLOR_TEXT
#:import COLOR_CARD_BORDER main.COLOR_CARD_BORDER
2020-08-10 16:37:42 +00:00
<FeedScreen>:
name: 'feed'
#MyLabel:
# text: "The falcon cannot hear the falconer..."
Carousel:
id: post_carousel
direction: 'right'
2020-08-23 14:40:02 +00:00
loop: True
2020-08-10 16:37:42 +00:00
<PostTitle>:
id: post_title
text: ''
size_hint_y: None
height: self.texture_size[1]
font_style: 'H5'
halign: 'center'
height: '25'
size_hint_y: None
2020-08-11 13:01:48 +00:00
<PostImageLayout>:
id: image_layout
cols: 1
orientation: 'vertical'
size_hint: (1,None)
# md_bg_color: 1,1,0,1
pos_hint: {'center_x':0.5} #, 'y':0.5}
# height: '100dp' #self.minimum_height
# width: '100dp'
2020-08-21 13:12:13 +00:00
height: '300sp'
2020-08-11 13:01:48 +00:00
# spacing:'100dp'
# padding:'100dp'
2020-08-10 16:37:42 +00:00
<PostImage>:
# height: '25'
2020-08-11 13:01:48 +00:00
# size: self.norm_image_size
id: post_image
2020-08-11 13:01:48 +00:00
allow_stretch: True
# keep_ratio: True
2020-08-10 16:37:42 +00:00
size_hint_y: None
2020-08-11 13:01:48 +00:00
size_hint_x: None
pos_hint: {'center_x':0.5}
size: (self.height*self.image_ratio,self.height)
# width: self.parent.width
# height: self.parent.width/self.image_ratio
# height: self.height
# width: self.height*self.image_ratio
2020-08-21 07:27:27 +00:00
# canvas:
# Color:
# rgb: 0,0,0,1
# Line:
# width: 1
# rectangle: (self.x, self.y, self.width, self.height)
2020-08-11 13:01:48 +00:00
2020-08-10 16:37:42 +00:00
<PostGridLayout>:
cols: 1
size_hint: (1,None)
pos_hint: {'center_x':0.5, 'center_y':0}
md_bg_color: 1,1,0,1
2020-08-11 13:01:48 +00:00
# height: self.minimum_height
2020-08-10 16:37:42 +00:00
<PostAuthorLayout>:
cols: 2
orientation: 'horizontal'
size_hint: (1,None)
# size_hint:(None,None)
# pos_hint:(None,None)
pos_hint: {'center_x':0.5, 'center_y':0}
# md_bg_color: 1,1,0,1
2020-08-21 13:12:13 +00:00
height: '100sp' #self.minimum_height
2020-08-10 16:37:42 +00:00
# radius:[20,]
# border_radius:20
2020-08-21 13:12:13 +00:00
# height: self.minimum_height
2020-08-11 13:01:48 +00:00
2020-08-10 16:37:42 +00:00
<PostAuthorAvatar>:
size_hint:(None,None)
pos_hint:{'center_x':1,'x':1}
2020-08-21 13:12:13 +00:00
height:'100sp'
2020-08-10 16:37:42 +00:00
# padding:'10dp'
# canvas:
# Color:
2020-08-19 23:26:25 +00:00
# rgb: rgb(*COLOR_TEXT)
2020-08-10 16:37:42 +00:00
# Line:
# width: 1
# rectangle: (self.x, self.y, self.width, self.height)
<PostAuthorLabel>:
id: post_author_label
text: ''
pos_hint: {'center_y':0.5, 'center_x':0.5}
# font_size:'100dp'
# font_style:'H5'
# font_style: 'custom'
#font_name: "Strengthen"
# height: '400'
size_hint_y: None
# size_hint_x: 100
2020-08-19 23:26:25 +00:00
text_color:rgb(*COLOR_TEXT)
2020-08-10 16:37:42 +00:00
theme_text_color: 'Custom'
2020-08-21 07:38:09 +00:00
halign: 'left'
2020-08-10 16:37:42 +00:00
padding: ('10dp','0dp')
2020-08-21 07:27:27 +00:00
bold: True
2020-08-21 07:38:09 +00:00
markup: True
2020-08-21 13:12:13 +00:00
# font_size: '24sp'
2020-08-10 16:37:42 +00:00
2020-08-12 19:23:23 +00:00
<PostTimestampLabel>:
id: post_timestamp_label
text: ''
pos_hint: {'center_y':0.5, 'center_x':0.5}
# font_size:'100dp'
# font_style:'H5'
# font_style: 'custom'
#font_name: "Strengthen"
# height: '400'
size_hint_y: None
# size_hint_x: 100
2020-08-19 23:26:25 +00:00
text_color:rgb(*COLOR_TEXT)
2020-08-12 19:23:23 +00:00
theme_text_color: 'Custom'
halign: 'right'
padding: ('10dp','0dp')
2020-08-10 16:37:42 +00:00
<PostContent>:
id: post_content
text: ''
pos_hint: {'center_y':1}
2020-08-23 14:40:02 +00:00
font_size:'13sp'
2020-08-21 13:12:13 +00:00
# font_style:'H5'
2020-08-10 16:37:42 +00:00
#font_name: "Strengthen"
# height: '400'
2020-08-23 14:40:02 +00:00
#size_hint_y: 1
2020-08-19 23:26:25 +00:00
text_color:rgb(*COLOR_TEXT)
2020-08-10 16:37:42 +00:00
theme_text_color: 'Custom'
halign: 'left'
2020-08-21 13:12:13 +00:00
# adaptive_height: True
2020-08-11 13:01:48 +00:00
<PostScrollView>:
size_hint: (1,None)
# pos_hint: {'center_y':0.5}
#size: ('300dp',self.height)
2020-08-10 16:37:42 +00:00
<PostCard>:
id: post
orientation: "vertical"
padding: "20dp"
2020-08-21 13:12:13 +00:00
size_hint: (None, None)
2020-08-22 14:26:21 +00:00
size:('500sp','800sp')
2020-08-21 13:12:13 +00:00
# adaptive_height: True
2020-08-10 16:37:42 +00:00
pos_hint: {"center_x": .5, "center_y": .5}
2020-08-19 23:26:25 +00:00
md_bg_color: rgb(*COLOR_CARD)
2020-08-10 16:37:42 +00:00
height: self.minimum_height
radius:[20,]
border_radius:20
2020-08-13 17:41:31 +00:00
canvas:
Color:
2020-08-19 23:26:25 +00:00
rgba: rgb(*COLOR_CARD_BORDER,a=0.5)
2020-08-13 17:41:31 +00:00
Line:
width: 1
rounded_rectangle: (self.x, self.y, self.width, self.height, 20, 20, 20, 20)
2020-08-10 16:37:42 +00:00