summaryrefslogtreecommitdiff
path: root/examples/hackernews/src/components/Comment.astro
blob: 07e55d19b953aee94e35bd8e42ac9187c9228163 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
import type { IComment } from '../types.js';
import For from './For.astro';
import Show from './Show.astro';
import Toggle from './Toggle.astro';

interface Props {
	comment: IComment;
}

const { comment } = Astro.props;
---

<li>
	<div class="by">
		<a href={`/users/${comment.user}`}>{comment.user}</a>{' '}
		{comment.time_ago}
	</div>
	<div class="text" set:html={comment.content} />
	<Show when={comment.comments.length}>
		<Toggle open>
			<For each={comment.comments}>{(comment: IComment) => <Astro.self comment={comment} />}</For>
		</Toggle>
	</Show>
</li>

<style>
	li {
		border-top: 1px solid #eee;
		position: relative;
	}

	.by,
	.text {
		font-size: 0.9em;
		margin: 1em 0;
	}

	.by {
		color: rgb(51 65 85);
	}

	.by a {
		color: rgb(51 65 85);
		text-decoration: underline;
	}

	.text {
		overflow-wrap: break-word;
	}

	.text :global(a:hover) {
		color: #335d92;
	}

	.text :global(pre) {
		white-space: pre-wrap;
	}
</style>
='13' height='13' alt='Gravatar' /> Erika 16-153/+150 2023-04-05[ci] formatGravatar bluwy 4-8/+2 2023-04-05Add `build.assetsPrefix` option for CDN support (#6714)Gravatar Bjorn Lu 35-62/+481 2023-04-05@astrojs/vercel: Fix vercel analytics id not being provided (#6751)Gravatar Nathaniel Blackburn 2-1/+6 2023-04-05Fix getViteConfig return type (#6753)Gravatar Bjorn Lu 2-1/+7 2023-04-05Fix lit integration nested component rendering (#6752)Gravatar Augustine Kim 3-1/+35 2023-04-04fix(node): Fix malformed URLs crashing the server in certain cases (#6746)Gravatar Erika 7-220/+97 2023-04-04Fix #6618: sitemap urls generated without slash (#6658)Gravatar André Alves 3-0/+39 2023-04-04ci: use correct issue number (#6745)Gravatar Emanuele Stoppa 1-1/+1 2023-04-04Fix broken links in TailwindCSS section (#6747)Gravatar Felix Frey 1-2/+2 2023-04-04[ci] formatGravatar Princesseuh 1-1/+1 2023-04-04fix(images): Simpler logic for collecting images in Markdown (#6744)Gravatar Erika 7-42/+54 2023-04-03[ci] formatGravatar Princesseuh 1-1/+2 2023-04-03feat(image): Export more types and utilities for users to use (#6739)Gravatar Erika 13-38/+57 2023-04-03fix(images): Return the proper content-type for the chosen format (#6741)Gravatar Erika 4-7/+16 2023-04-03[Markdoc] Fix: Support `render: null` (#6723)Gravatar Ben Holmes 9-60/+309 2023-04-03gitignore env.d.ts files in e2e tests (#6737)Gravatar Bjorn Lu 1-0/+1 2023-03-31[ci] formatGravatar matthewp 7-8/+17 2023-03-31Better errors for when response is already sent (#6719)Gravatar Matthew Phillips 12-3/+90 2023-03-31[ci] formatGravatar matthewp 2-8/+7 2023-03-31supporting top of await (#6671)Gravatar wulinsheng123 7-5/+63 2023-03-31[ci] release (#6694)astro@2.1.9@astrojs/rss@2.3.2@astrojs/react@2.1.1@astrojs/lit@2.0.0@astrojs/image@0.16.4Gravatar Houston (Bot) 59-143/+131 2023-03-31fix(check): Dynamically import check command (#6717)Gravatar Erika 2-1/+7 2023-03-31fix(errors): Add simplified message for MarkdownImageNotFound (#6718)Gravatar Erika 1-0/+2 2023-03-31[ci] formatGravatar Princesseuh 1-2/+2 2023-03-31Fix incorrect path in error overlay on Win (#6679)Gravatar Peter Timoshevsky 5-5/+43 2023-03-30Remove unnecessary image-related `.wasm` files inside build output when possi...Gravatar Erika 6-47/+45 2023-03-30Fix InferGetStaticParamsType and InferGetStaticPropsType not working with syn...Gravatar Erika 2-7/+16 2023-03-30Fix multiple images being generated for the same image (#6710)Gravatar Erika 6-15/+28 2023-03-30[RSS] Fix: update `RSSFeedItem` type to comply with `strictest` tsconfig (#6614)Gravatar Aivars Liepa 2-1/+6 2023-03-29Update lit-ssr dependency (#6681)Gravatar Elliott Marquez 13-82/+107 2023-03-29fix(images): Improve error handling around the new assets feature (#6649)Gravatar Erika 17-21/+290 2023-03-29Use debug option for debugDir (#6554)Gravatar Isaac 1-1/+1