Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joeychilson committed Dec 21, 2023
1 parent eb768a2 commit 7e73f67
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 54 deletions.
2 changes: 1 addition & 1 deletion pages/item.templ
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ templ Item(props types.ItemProps) {
<div class="mx-auto max-w-4xl">
<div class="bg-white p-4 mb-2 border-r border-b border-l border-gray-200">
<div class="mb-2">
<a href="{ArticleLink}" class="text-lg text-orange-500 hover:underline">
<a href={ templ.URL(props.Item.URL) } class="text-lg text-orange-500 hover:underline">
{ props.Item.Title }
</a>
</div>
Expand Down
63 changes: 36 additions & 27 deletions pages/item_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pages/user.templ
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ templ User(props types.UserProps) {
<div class="mx-auto max-w-4xl">
<div class="bg-white p-4 mb-2 border-r border-b border-l border-gray-200">
<div class="mb-2">
<a href="{ArticleLink}" class="text-lg text-orange-500 hover:underline">
<a href={ templ.URL(fmt.Sprintf("https://news.ycombinator.com/user?id=%s", props.User.ID)) } class="text-lg text-orange-500 hover:underline">
{ props.User.ID }
</a>
</div>
Expand All @@ -23,6 +23,9 @@ templ User(props types.UserProps) {
<span class="text-sm text-gray-600">| { time.Unix(int64(props.User.Created), 0).Format("2006-01-02 15:04:05") }</span>
<span class="text-sm text-gray-600">| { strconv.Itoa(len(props.User.Submitted)) } submitted</span>
</div>
<div class="mb-4">
<span class="text-sm text-gray-600">{ props.User.About }</span>
</div>
<div class="mt-2">
<a href={ templ.URL(fmt.Sprintf("/submitted?id=%v", props.User.ID)) } class="underline text-blue-600">submitted</a>
</div>
Expand Down
68 changes: 43 additions & 25 deletions pages/user_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7e73f67

Please sign in to comment.