You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/web/repo
Nathaniel Sabanski fb1a2a13f0
Preview images for Issue cards in Project Board view (#22112)
Original Issue: https://github.com/go-gitea/gitea/issues/22102

This addition would be a big benefit for design and art teams using the
issue tracking.

The preview will be the latest "image type" attachments on an issue-
simple, and allows for automatic updates of the cover image as issue
progress is made!

This would make Gitea competitive with Trello... wouldn't it be amazing
to say goodbye to Atlassian products? Ha.

First image is the most recent, the SQL will fetch up to 5 latest images
(URL string).

All images supported by browsers plus upcoming formats: *.avif *.bmp
*.gif *.jpg *.jpeg *.jxl *.png *.svg *.webp

The CSS will try to center-align images until it cannot, then it will
left align with overflow hidden. Single images get to be slightly
larger!

Tested so far on: Chrome, Firefox, Android Chrome, Android Firefox.

Current revision with light and dark themes:

![image](https://user-images.githubusercontent.com/24665/207066878-58e6bf73-0c93-4caa-8d40-38f4432b3578.png)


![image](https://user-images.githubusercontent.com/24665/207066555-293f65c3-e706-4888-8516-de8ec632d638.png)

---------

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2 years ago
..
actions Fix improper HTMLURL usages in Go code (#22839) 2 years ago
activity.go Implement FSFE REUSE for golang files (#21840) 2 years ago
attachment.go Add API management for issue/pull and comment attachments (#21783) 2 years ago
blame.go Refactor git command package to improve security and maintainability (#22678) 2 years ago
branch.go Supports wildcard protected branch (#20825) 2 years ago
cherry_pick.go Rename almost all Ctx functions (#22071) 2 years ago
commit.go Use context parameter in models/git (#22367) 2 years ago
compare.go Refactor git command package to improve security and maintainability (#22678) 2 years ago
download.go Use context parameter in models/git (#22367) 2 years ago
editor.go Rename almost all Ctx functions (#22071) 2 years ago
editor_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
find.go Implement FSFE REUSE for golang files (#21840) 2 years ago
http.go Refactor legacy strange git operations (#22756) 2 years ago
http_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
issue_content_history.go Multiple improvements for comment edit diff (#21990) 2 years ago
issue_dependency.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
issue_label.go Map OIDC groups to Orgs/Teams (#21441) 2 years ago
issue_label_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue_lock.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
issue_stopwatch.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
issue_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue_timetrack.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
issue_watch.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
lfs.go Refactor git command package to improve security and maintainability (#22678) 2 years ago
main_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
middlewares.go Implement FSFE REUSE for golang files (#21840) 2 years ago
migrate.go Implement FSFE REUSE for golang files (#21840) 2 years ago
milestone.go Rename almost all Ctx functions (#22071) 2 years ago
packages.go Use dynamic package type list (#22263) 2 years ago
patch.go Rename almost all Ctx functions (#22071) 2 years ago
projects.go Preview images for Issue cards in Project Board view (#22112) 2 years ago
projects_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
pull.go Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 2 years ago
pull_review.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
release.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
release_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
render.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
runners.go Implement actions (#21937) 2 years ago
search.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
setting.go Map OIDC groups to Orgs/Teams (#21441) 2 years ago
setting_protected_branch.go Add main landmark to templates and adjust titles (#22670) 2 years ago
setting_secrets.go Add user secrets (#22191) 2 years ago
settings_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
tag.go Add main landmark to templates and adjust titles (#22670) 2 years ago
topic.go Implement FSFE REUSE for golang files (#21840) 2 years ago
treelist.go Implement FSFE REUSE for golang files (#21840) 2 years ago
view.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
view_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
webhook.go Support system hook API (#14537) 2 years ago
wiki.go Use context parameter in models/git (#22367) 2 years ago
wiki_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago