|
@@ -0,0 +1,241 @@
|
|
|
+package com.example.neurea.views.screens
|
|
|
+
|
|
|
+import androidx.compose.foundation.background
|
|
|
+import androidx.compose.foundation.border
|
|
|
+import androidx.compose.foundation.horizontalScroll
|
|
|
+import androidx.compose.foundation.layout.Arrangement
|
|
|
+import androidx.compose.foundation.layout.Box
|
|
|
+import androidx.compose.foundation.layout.Column
|
|
|
+import androidx.compose.foundation.layout.Row
|
|
|
+import androidx.compose.foundation.layout.Spacer
|
|
|
+import androidx.compose.foundation.layout.fillMaxSize
|
|
|
+import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
+import androidx.compose.foundation.layout.height
|
|
|
+import androidx.compose.foundation.layout.padding
|
|
|
+import androidx.compose.foundation.layout.size
|
|
|
+import androidx.compose.foundation.layout.width
|
|
|
+import androidx.compose.foundation.rememberScrollState
|
|
|
+import androidx.compose.foundation.shape.RoundedCornerShape
|
|
|
+import androidx.compose.foundation.verticalScroll
|
|
|
+import androidx.compose.material3.Button
|
|
|
+import androidx.compose.material3.ButtonDefaults
|
|
|
+import androidx.compose.material3.ExperimentalMaterial3Api
|
|
|
+import androidx.compose.material3.HorizontalDivider
|
|
|
+import androidx.compose.material3.Icon
|
|
|
+import androidx.compose.material3.IconButton
|
|
|
+import androidx.compose.material3.MaterialTheme
|
|
|
+import androidx.compose.material3.Switch
|
|
|
+import androidx.compose.material3.SwitchDefaults
|
|
|
+import androidx.compose.material3.Text
|
|
|
+import androidx.compose.runtime.Composable
|
|
|
+import androidx.compose.runtime.getValue
|
|
|
+import androidx.compose.runtime.mutableStateOf
|
|
|
+import androidx.compose.runtime.remember
|
|
|
+import androidx.compose.runtime.setValue
|
|
|
+import androidx.compose.ui.Alignment
|
|
|
+import androidx.compose.ui.Modifier
|
|
|
+import androidx.compose.ui.draw.clip
|
|
|
+import androidx.compose.ui.graphics.Color
|
|
|
+import androidx.compose.ui.res.painterResource
|
|
|
+import androidx.compose.ui.text.font.FontWeight
|
|
|
+import androidx.compose.ui.tooling.preview.Preview
|
|
|
+import androidx.compose.ui.unit.dp
|
|
|
+import androidx.compose.ui.unit.sp
|
|
|
+import com.example.neurea.R
|
|
|
+import com.example.neurea.views.ui.theme.NeureaTheme
|
|
|
+
|
|
|
+
|
|
|
+@Preview()
|
|
|
+@OptIn(ExperimentalMaterial3Api::class)
|
|
|
+@Composable
|
|
|
+fun LibraryScreen() { // navController: NavController
|
|
|
+ NeureaTheme {
|
|
|
+ Column(
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxSize()
|
|
|
+ .background(color = MaterialTheme.colorScheme.surface)
|
|
|
+ ) {
|
|
|
+ Text("Время почитать!", color = MaterialTheme.colorScheme.primary, fontWeight = FontWeight.Bold, fontSize = 20.sp,
|
|
|
+ modifier = Modifier
|
|
|
+ .align(Alignment.CenterHorizontally)
|
|
|
+ .padding(vertical = 30.dp))
|
|
|
+ Column(
|
|
|
+ modifier = Modifier.verticalScroll(rememberScrollState())
|
|
|
+ .fillMaxSize()
|
|
|
+ .clip(RoundedCornerShape(45.dp, 45.dp))
|
|
|
+ .background(color = MaterialTheme.colorScheme.secondary)
|
|
|
+ ){
|
|
|
+
|
|
|
+ Text("Отложенные книги", fontWeight = FontWeight.Bold, fontSize = 18.sp, modifier = Modifier.padding(start = 25.dp, top = 30.dp) )
|
|
|
+ // Тут скорее всего будет LazyRow
|
|
|
+ Row(modifier = Modifier
|
|
|
+ .fillMaxWidth()
|
|
|
+ .padding(top = 22.dp, bottom = 22.dp, start = 24.dp)
|
|
|
+ .horizontalScroll(rememberScrollState()))
|
|
|
+ {
|
|
|
+ Column(modifier = Modifier
|
|
|
+ .height(216.dp)
|
|
|
+ .width(150.dp)
|
|
|
+
|
|
|
+ .clip(RoundedCornerShape(15.dp))
|
|
|
+
|
|
|
+ .background(MaterialTheme.colorScheme.surface)
|
|
|
+ ) {
|
|
|
+ Column(modifier = Modifier.padding(horizontal = 10.dp)) {
|
|
|
+ Column(modifier = Modifier.fillMaxWidth(), horizontalAlignment = Alignment.End) {
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .padding(top = 5.dp)
|
|
|
+ .size(7.dp)
|
|
|
+ .clip(RoundedCornerShape(8.dp))
|
|
|
+ .background(Color(0xFFD9D9D9)))
|
|
|
+ }
|
|
|
+
|
|
|
+ Column(modifier = Modifier
|
|
|
+ .height(130.dp)
|
|
|
+ .fillMaxWidth(),
|
|
|
+ horizontalAlignment = Alignment.CenterHorizontally){
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .background(Color.Gray)
|
|
|
+ .height(130.dp)
|
|
|
+ .width(80.dp), )
|
|
|
+
|
|
|
+ }
|
|
|
+ Text("Человек в высоком замке", fontSize = 15.sp, fontWeight = FontWeight.SemiBold)
|
|
|
+ Text("Филип Дик", fontSize = 15.sp)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Spacer(modifier = Modifier.width(15.dp))
|
|
|
+ Column(modifier = Modifier
|
|
|
+
|
|
|
+ .height(216.dp)
|
|
|
+ .width(150.dp)
|
|
|
+
|
|
|
+ .clip(RoundedCornerShape(15.dp))
|
|
|
+
|
|
|
+ .background(MaterialTheme.colorScheme.surface)
|
|
|
+ ) {
|
|
|
+ Column(modifier = Modifier.padding(horizontal = 10.dp)) {
|
|
|
+ Column(modifier = Modifier.fillMaxWidth(), horizontalAlignment = Alignment.End) {
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .padding(top = 5.dp)
|
|
|
+ .size(7.dp)
|
|
|
+ .clip(RoundedCornerShape(8.dp))
|
|
|
+ .background(Color(0xFFD9D9D9),))
|
|
|
+ }
|
|
|
+
|
|
|
+ Column(modifier = Modifier
|
|
|
+ .height(130.dp)
|
|
|
+ .fillMaxWidth(),
|
|
|
+ horizontalAlignment = Alignment.CenterHorizontally){
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .background(Color.Gray)
|
|
|
+ .height(130.dp)
|
|
|
+ .width(80.dp), )
|
|
|
+
|
|
|
+ }
|
|
|
+ Text("Человек в высоком замке", fontSize = 15.sp, fontWeight = FontWeight.SemiBold)
|
|
|
+ Text("Филип Дик", fontSize = 15.sp)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ HorizontalDivider(color= MaterialTheme.colorScheme.onSecondary, thickness = 0.5.dp, modifier = Modifier.padding(horizontal = 24.dp))
|
|
|
+ Button(
|
|
|
+ onClick = {
|
|
|
+ },
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxWidth()
|
|
|
+ .height(55.dp)
|
|
|
+ .padding(top = 10.dp, start = 20.dp, end = 30.dp)
|
|
|
+ .height(50.dp)
|
|
|
+
|
|
|
+ ,
|
|
|
+ shape = RoundedCornerShape(8.dp),
|
|
|
+ colors = ButtonDefaults.buttonColors(
|
|
|
+ containerColor = MaterialTheme.colorScheme.primary
|
|
|
+ ),
|
|
|
+
|
|
|
+ ) {
|
|
|
+ Text("Загрузить новую книгу", fontSize = 15.sp, color = MaterialTheme.colorScheme.secondary)
|
|
|
+
|
|
|
+ }
|
|
|
+ HorizontalDivider(color= MaterialTheme.colorScheme.onSecondary, thickness = 0.5.dp, modifier = Modifier.padding(horizontal = 24.dp))
|
|
|
+ Text("Читаете сейчас", fontWeight = FontWeight.Bold, fontSize = 18.sp, modifier = Modifier.padding(start = 25.dp, top = 30.dp) )
|
|
|
+ Column(modifier = Modifier, horizontalAlignment = Alignment.CenterHorizontally){
|
|
|
+ Row(modifier = Modifier
|
|
|
+ .fillMaxWidth()
|
|
|
+ .padding(top = 22.dp, bottom = 22.dp), horizontalArrangement = Arrangement.Center
|
|
|
+ )
|
|
|
+ {
|
|
|
+ Column(modifier = Modifier
|
|
|
+ .height(216.dp)
|
|
|
+ .width(150.dp)
|
|
|
+
|
|
|
+ .clip(RoundedCornerShape(15.dp))
|
|
|
+
|
|
|
+ .background(MaterialTheme.colorScheme.surface)
|
|
|
+ ) {
|
|
|
+ Column(modifier = Modifier.padding(horizontal = 10.dp)) {
|
|
|
+ Column(modifier = Modifier.fillMaxWidth(), horizontalAlignment = Alignment.End) {
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .padding(top = 5.dp)
|
|
|
+ .size(7.dp)
|
|
|
+ .clip(RoundedCornerShape(8.dp))
|
|
|
+ .background(Color(0xFFD9D9D9)))
|
|
|
+ }
|
|
|
+
|
|
|
+ Column(modifier = Modifier
|
|
|
+ .height(130.dp)
|
|
|
+ .fillMaxWidth(),
|
|
|
+ horizontalAlignment = Alignment.CenterHorizontally){
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .background(Color.Gray)
|
|
|
+ .height(130.dp)
|
|
|
+ .width(80.dp), )
|
|
|
+
|
|
|
+ }
|
|
|
+ Text("Человек в высоком замке", fontSize = 15.sp, fontWeight = FontWeight.SemiBold)
|
|
|
+ Text("Филип Дик", fontSize = 15.sp)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Spacer(modifier = Modifier.width(15.dp))
|
|
|
+ Column(modifier = Modifier
|
|
|
+
|
|
|
+ .height(216.dp)
|
|
|
+ .width(150.dp)
|
|
|
+
|
|
|
+ .clip(RoundedCornerShape(15.dp))
|
|
|
+
|
|
|
+ .background(MaterialTheme.colorScheme.surface)
|
|
|
+ ) {
|
|
|
+ Column(modifier = Modifier.padding(horizontal = 10.dp)) {
|
|
|
+ Column(modifier = Modifier.fillMaxWidth(), horizontalAlignment = Alignment.End) {
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .padding(top = 5.dp)
|
|
|
+ .size(7.dp)
|
|
|
+ .clip(RoundedCornerShape(8.dp))
|
|
|
+ .background(Color(0xFFD9D9D9),))
|
|
|
+ }
|
|
|
+
|
|
|
+ Column(modifier = Modifier
|
|
|
+ .height(130.dp)
|
|
|
+ .fillMaxWidth(),
|
|
|
+ horizontalAlignment = Alignment.CenterHorizontally){
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .background(Color.Gray)
|
|
|
+ .height(130.dp)
|
|
|
+ .width(80.dp), )
|
|
|
+
|
|
|
+ }
|
|
|
+ Text("Человек в высоком замке", fontSize = 15.sp, fontWeight = FontWeight.SemiBold)
|
|
|
+ Text("Филип Дик", fontSize = 15.sp)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|