mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-27 15:14:35 +00:00
Show study slides as one column and fill in the empty lessons.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
10980f24b5
commit
3ffe01af1d
4 changed files with 175 additions and 91 deletions
|
|
@ -1034,8 +1034,30 @@ fun SlidesScreen(
|
|||
}
|
||||
}
|
||||
}
|
||||
slide.strs("lines").forEach { line ->
|
||||
Text(line, style = MaterialTheme.typography.bodyLarge, modifier = Modifier.padding(vertical = 6.dp))
|
||||
slide.strs("lines").forEachIndexed { index, line ->
|
||||
val numbered = Regex("""^(\d+)\.\s+(.*)$""").find(line)
|
||||
val badge = numbered?.groupValues?.get(1) ?: "${index + 1}"
|
||||
val text = numbered?.groupValues?.get(2) ?: line
|
||||
Row(
|
||||
Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 5.dp)
|
||||
.background(MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.45f), androidx.compose.foundation.shape.RoundedCornerShape(16.dp))
|
||||
.padding(horizontal = 14.dp, vertical = 12.dp),
|
||||
verticalAlignment = Alignment.Top,
|
||||
) {
|
||||
Box(
|
||||
Modifier
|
||||
.padding(top = 2.dp)
|
||||
.size(28.dp)
|
||||
.background(MaterialTheme.colorScheme.primary.copy(alpha = 0.14f), CircleShape),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Text(badge, style = MaterialTheme.typography.labelLarge, color = MaterialTheme.colorScheme.primary)
|
||||
}
|
||||
Spacer(Modifier.width(12.dp))
|
||||
Text(text, style = MaterialTheme.typography.bodyLarge, modifier = Modifier.weight(1f))
|
||||
}
|
||||
}
|
||||
Spacer(Modifier.height(24.dp))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue