|
|
@ -1,7 +1,6 @@
|
|
|
|
package com.example.veraxapplication.ui.article
|
|
|
|
package com.example.veraxapplication.ui.article
|
|
|
|
|
|
|
|
|
|
|
|
import VideoPlayer
|
|
|
|
import VideoPlayer
|
|
|
|
import android.util.Log
|
|
|
|
|
|
|
|
import androidx.compose.foundation.BorderStroke
|
|
|
|
import androidx.compose.foundation.BorderStroke
|
|
|
|
import androidx.compose.foundation.Image
|
|
|
|
import androidx.compose.foundation.Image
|
|
|
|
import androidx.compose.foundation.background
|
|
|
|
import androidx.compose.foundation.background
|
|
|
@ -51,17 +50,30 @@ fun AffichageUnArticleInfo(e : Article, goToArticle: (Article) -> Unit){
|
|
|
|
.padding(7.dp)
|
|
|
|
.padding(7.dp)
|
|
|
|
.border(width = 1.dp, color = Color.Black, shape = RoundedCornerShape(10.dp))
|
|
|
|
.border(width = 1.dp, color = Color.Black, shape = RoundedCornerShape(10.dp))
|
|
|
|
.padding(5.dp)) {
|
|
|
|
.padding(5.dp)) {
|
|
|
|
|
|
|
|
/*DisplayTitle(title = e.Title)
|
|
|
|
|
|
|
|
DisplayHeader(author = e.Author, description = e.Description, lectureTime = e.LectureTime)
|
|
|
|
|
|
|
|
DisplayImage(image = e.Image)
|
|
|
|
|
|
|
|
DisplayContentArticle(content = e.Content)*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Text(text = e.titre, fontFamily = FontFamily.Serif, fontSize = 30.sp)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var imageURl = e.note
|
|
|
|
Text(text = e.titre, fontFamily = FontFamily.Serif, fontSize = 30.sp)
|
|
|
|
Log.d("ImageLoad", "URL de l'image reçue de l'API : $imageURl")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Box(modifier = Modifier
|
|
|
|
|
|
|
|
.padding(15.dp)
|
|
|
|
|
|
|
|
.border(width = 1.dp, color = Color.Black, shape = RoundedCornerShape(10.dp))
|
|
|
|
|
|
|
|
.clip(RoundedCornerShape(10.dp))
|
|
|
|
|
|
|
|
.background(Salmon)
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
Column (modifier = Modifier.padding(15.dp)) {
|
|
|
|
|
|
|
|
Text(text = "Auteur : "+e.auteur, fontSize = 17.sp)
|
|
|
|
|
|
|
|
Text(text = "Description : "+e.description, fontSize = 17.sp)
|
|
|
|
|
|
|
|
Text(text = "Temps de lecture : "+e.temps+" minutes", fontSize = 17.sp)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
Image(
|
|
|
|
Image(
|
|
|
|
painter = rememberImagePainter(
|
|
|
|
painter = rememberImagePainter(
|
|
|
|
data = imageURl
|
|
|
|
data = e.imagePrincipale
|
|
|
|
),
|
|
|
|
),
|
|
|
|
contentScale = ContentScale.Crop,
|
|
|
|
contentScale = ContentScale.Crop,
|
|
|
|
contentDescription = null,
|
|
|
|
contentDescription = null,
|
|
|
@ -73,12 +85,12 @@ fun AffichageUnArticleInfo(e : Article, goToArticle: (Article) -> Unit){
|
|
|
|
|
|
|
|
|
|
|
|
Button(onClick = { goToArticle(e) },
|
|
|
|
Button(onClick = { goToArticle(e) },
|
|
|
|
colors = ButtonDefaults.buttonColors(
|
|
|
|
colors = ButtonDefaults.buttonColors(
|
|
|
|
containerColor = Salmon,
|
|
|
|
containerColor = Salmon,
|
|
|
|
contentColor = Color.Black
|
|
|
|
contentColor = Color.Black
|
|
|
|
),
|
|
|
|
),
|
|
|
|
border = BorderStroke(1.dp, Color.Black),
|
|
|
|
border = BorderStroke(1.dp, Color.Black),
|
|
|
|
modifier = Modifier
|
|
|
|
modifier = Modifier
|
|
|
|
.align(Alignment.CenterHorizontally)
|
|
|
|
.align(Alignment.CenterHorizontally)
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
Text(text = "Voir plus")
|
|
|
|
Text(text = "Voir plus")
|
|
|
|
}
|
|
|
|
}
|
|
|
|