Skip to content

Commit a770bcb

Browse files
authored
Improved News feed in the app and website (#66)
* Improved News feed in the app * added images to news feed
1 parent 4f7834d commit a770bcb

File tree

14 files changed

+1010
-13
lines changed

14 files changed

+1010
-13
lines changed

homepage/content/en/blog/how-to-run-llms-on-android.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "How to Run LLMs Offline on Android Using Kotlin"
33
date: 2026-02-11T00:00:00-05:00
44
description: "This article shows how to run LLMs offline on Android using Kotlin, with no servers, no API keys, and full user privacy-using Llamatik, a Kotlin-first wrapper around llama.cpp."
5+
image: "images/blog/how-to-llms-on-android-hero.png"
56
tags: ["Kotlin", "Multiplatform", "LLM", "llama.cpp", "Offline AI", "Android"]
67
showDate: true
78
draft: false

homepage/content/en/blog/llamatik-app-android-published.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "Introducing the Llamatik App an Offline AI Chat on Your Mobile Device"
33
date: 2025-11-25T09:00:00-05:00
44
description: "We are excited to announce the launch of the Llamatik App, a fully offline AI chatbot designed to showcase the power and versatility of the Llamatik Kotlin Multiplatform library. Whether you are a developer curious about on-device AI or a user who wants a private, fast, and modern chatbot experience, the Llamatik app brings the full potential of lightweight LLMs directly to your mobile device."
5+
image: "images/blog/llamatik_new_app_hero.png"
56
tags: ["Kotlin", "Multiplatform", "LLM", "llama.cpp", "Offline AI", "App"]
67
showDate: true
78
draft: false

homepage/content/en/blog/llamatik-introduction.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "Introducing Llamatik Offline LLMs for Kotlin Multiplatform"
33
date: 2025-07-22T09:00:00-05:00
44
description: "Meet Llamatik — a multiplatform Kotlin library to run llama.cpp locally on Android, iOS, and desktop, complete with an HTTP server."
5+
image: "images/blog/a-pair-of-llamas-in-a-field-with-clouds-and-mountain.svg"
56
tags: ["Kotlin", "Multiplatform", "LLM", "llama.cpp", "Offline AI"]
67
showDate: true
78
draft: false

homepage/layouts/blog/rss.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<link>{{ .Permalink }}</link>
2121
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</pubDate>
2222
<guid>{{ .Permalink }}</guid>
23-
23+
<image>{{ .Params.image }}</image>
2424
{{- $desc := .Params.description | default .Summary -}}
2525
<description>{{ $desc | plainify }}</description>
2626

homepage/layouts/blog/summary.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<article class="blog-card">
22
<a class="blog-card__link" href="{{ .RelPermalink }}">
3+
{{- with .Params.image }}
4+
<figure class="blog-card__image">
5+
<img src="{{ . | absURL }}" alt="{{ $.Title }}" loading="lazy" />
6+
</figure>
7+
{{- end }}
8+
39
<h2 class="blog-card__title">{{ .Title }}</h2>
410

511
<div class="blog-card__meta">

homepage/static/images/blog/a-pair-of-llamas-in-a-field-with-clouds-and-mountain.svg

Lines changed: 851 additions & 0 deletions
Loading
1.67 MB
Loading
1.79 MB
Loading

homepage/themes/hugo-serif-theme/assets/scss/components/_blog.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,18 @@
8484
transition: transform 0.15s ease;
8585
}
8686
}
87+
88+
.blog-card__image {
89+
width: 100%;
90+
aspect-ratio: 16 / 9; /* keeps consistent ratio */
91+
overflow: hidden;
92+
border-radius: 12px; /* optional, match card style */
93+
margin-bottom: 1rem;
94+
}
95+
96+
.blog-card__image img {
97+
width: 100%;
98+
height: 100%;
99+
object-fit: cover; /* fills & crops */
100+
display: block;
101+
}

shared/src/commonMain/kotlin/com/llamatik/app/feature/news/NewsFeedDetailScreen.kt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import com.llamatik.app.feature.news.viewmodel.FeedItemDetailScreenState
3333
import com.llamatik.app.feature.news.viewmodel.FeedItemDetailViewModel
3434
import com.llamatik.app.localization.Localization
3535
import com.llamatik.app.localization.getCurrentLocalization
36+
import com.llamatik.app.platform.formatRssPubDateToLocalDate
3637
import com.llamatik.app.resources.Res
3738
import com.llamatik.app.resources.llamatik_icon_logo
3839
import com.llamatik.app.ui.components.toRichHtmlString
@@ -94,8 +95,9 @@ class NewsFeedDetailScreen(private val link: String) : Screen {
9495
}
9596
) { paddingValues ->
9697
Column(
97-
modifier = Modifier.padding(paddingValues = paddingValues)
98-
.padding(bottom = 80.dp).verticalScroll(scrollState)
98+
modifier = Modifier
99+
.padding(paddingValues = paddingValues)
100+
.verticalScroll(scrollState)
99101
) {
100102
val imageHeight = 120.dp
101103
Image(
@@ -124,15 +126,17 @@ class NewsFeedDetailScreen(private val link: String) : Screen {
124126
start = 16.dp,
125127
end = 16.dp
126128
),
127-
text = state.feedItem.pubDate,
129+
text = state.feedItem.pubDate.formatRssPubDateToLocalDate(),
128130
style = Typography.get().bodySmall,
129131
)
130-
Text(
131-
modifier = Modifier.fillMaxWidth()
132-
.padding(top = 16.dp, start = 16.dp, end = 16.dp),
133-
text = state.feedItem.description.toRichHtmlString(),
134-
style = Typography.get().bodyMedium
135-
)
132+
state.feedItem.contentEncoded?.let {
133+
Text(
134+
modifier = Modifier.fillMaxWidth()
135+
.padding(16.dp),
136+
text = it.toRichHtmlString(),
137+
style = Typography.get().bodyMedium
138+
)
139+
}
136140
}
137141
}
138142
}

0 commit comments

Comments
 (0)