diff --git a/astro.config.mjs b/astro.config.mjs index f929c40..5cc954a 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,7 @@ import { legacyRedirects } from "./src/data/legacy-redirects.mjs"; export default defineConfig({ site: "https://news.hackclub.com", + server: { port: 4000 }, integrations: [mdx()], image: { domains: ["cdn.hackclub.com", "user-cdn.hackclub-assets.com"] diff --git a/src/pages/index.astro b/src/pages/index.astro index 2e58cea..1276d93 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -17,7 +17,7 @@ const overrideHeadline = site.headlineOverride ? posts.find((post) => post.slug === site.headlineOverride) : undefined; const headline = overrideHeadline ?? allNews[0]; -const headlineExcerpts = headline?.paragraphs.slice(0, headline?.leadingImage ? 1 : 2) ?? []; +const headlineExcerpts = headline?.paragraphs ?? []; const displayOpinion = posts.filter((post) => post.category === "opinion").slice(0, 3); diff --git a/src/styles/main.scss b/src/styles/main.scss index 398285c..358999f 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -187,11 +187,14 @@ a { } .block-excerpts { flex: 1; + min-height: 0; + max-height: calc(1.6em * 10); display: -webkit-box; -webkit-box-orient: vertical; - -webkit-line-clamp: 8; - line-clamp: 8; + -webkit-line-clamp: 10; + line-clamp: 10; overflow: hidden; + text-overflow: ellipsis; } .block-excerpt { font-size: 1rem;