lbry-android-sdk/app/src/styles/discover.js

111 lines
2.3 KiB
JavaScript
Raw Normal View History

import { Dimensions, StyleSheet } from 'react-native';
2018-06-19 22:58:26 +02:00
import Colors from './colors';
const screenDimension = Dimensions.get('window');
const screenWidth = screenDimension.width;
const screenHeight = screenDimension.height;
// calculate thumbnail width and height based on device's aspect ratio
const horizontalMargin = 48; // left and right margins (24 + 24)
const verticalMargin = (screenWidth / screenHeight) * horizontalMargin;
const mediaWidth = screenWidth - horizontalMargin;
const mediaHeight = (screenWidth / (screenHeight - verticalMargin)) * mediaWidth;
const discoverStyle = StyleSheet.create({
container: {
2018-05-25 00:47:55 +02:00
flex: 1
},
scrollContainer: {
flex: 1,
2018-06-05 20:52:10 +02:00
marginBottom: 60,
paddingTop: 12
},
trendingContainer: {
flex: 1,
marginBottom: 60,
paddingTop: 30
},
2018-05-25 00:47:55 +02:00
busyContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row'
},
title: {
fontFamily: 'Metropolis-Regular',
fontSize: 20,
textAlign: 'center',
2018-05-25 00:47:55 +02:00
marginLeft: 10
},
categoryName: {
2018-06-19 22:58:26 +02:00
fontFamily: 'Metropolis-SemiBold',
fontSize: 20,
marginLeft: 24,
marginTop: 16,
marginBottom: 16,
2018-06-19 22:58:26 +02:00
color: Colors.Black
},
fileItem: {
marginLeft: 24,
marginRight: 24,
marginBottom: 48
},
fileItemMedia: {
width: mediaWidth,
height: mediaHeight
},
fileItemName: {
fontFamily: 'Metropolis-Bold',
marginTop: 8,
fontSize: 18
},
channelName: {
fontFamily: 'Metropolis-SemiBold',
fontSize: 16,
marginTop: 4,
2018-06-19 22:58:26 +02:00
color: Colors.LbryGreen
},
filePriceContainer: {
backgroundColor: '#61fcd8',
justifyContent: 'center',
position: 'absolute',
right: 16,
top: 16,
width: 56,
height: 24,
2018-06-19 22:58:26 +02:00
borderRadius: 4
},
filePriceText: {
fontFamily: 'Metropolis-Bold',
fontSize: 12,
textAlign: 'center',
color: '#0c604b'
},
drawerHamburger: {
marginLeft: 16
},
rightHeaderIcon: {
marginRight: 16
},
overlay: {
flex: 1,
opacity: 1,
backgroundColor: '#222222',
alignItems: 'center',
justifyContent: 'center',
padding: 32,
position: 'absolute',
left: 0,
top: 0,
width: '100%',
height: '100%'
},
overlayText: {
color: '#ffffff',
fontSize: 14,
textAlign: 'center',
fontFamily: 'Metropolis-Regular'
}
});
export default discoverStyle;