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.
forgejo/models/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>
1 year ago
..
archiver.go Implement FSFE REUSE for golang files (#21840) 2 years ago
attachment.go Preview images for Issue cards in Project Board view (#22112) 1 year ago
attachment_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
avatar.go Implement FSFE REUSE for golang files (#21840) 2 years ago
collaboration.go Always reuse transaction (#22362) 1 year ago
collaboration_test.go Rename almost all Ctx functions (#22071) 2 years ago
fork.go Implement FSFE REUSE for golang files (#21840) 2 years ago
fork_test.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
git.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue.go Rename almost all Ctx functions (#22071) 2 years ago
language_stats.go Round language stats percentage using largest remainder (#22026) 2 years ago
main_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
mirror.go Use ErrInvalidArgument in packages (#22268) 2 years ago
pushmirror.go Use ErrInvalidArgument in packages (#22268) 2 years ago
pushmirror_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
redirect.go Implement FSFE REUSE for golang files (#21840) 2 years ago
redirect_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
release.go Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
repo.go Fix improper HTMLURL usages in Go code (#22839) 1 year ago
repo_indexer.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo_list.go Remove ONLY_SHOW_RELEVANT_REPOS setting (#21962) 1 year ago
repo_list_test.go Add a simple test for external renderer (#20033) 2 years ago
repo_test.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
repo_unit.go Implement actions (#21937) 1 year ago
star.go Implement FSFE REUSE for golang files (#21840) 2 years ago
star_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
topic.go Implement FSFE REUSE for golang files (#21840) 2 years ago
topic_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
update.go Fix error when calculate the repository size (#22392) 1 year ago
upload.go Implement FSFE REUSE for golang files (#21840) 2 years ago
user_repo.go Implement FSFE REUSE for golang files (#21840) 2 years ago
user_repo_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
watch.go Implement FSFE REUSE for golang files (#21840) 2 years ago
watch_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
wiki.go Implement FSFE REUSE for golang files (#21840) 2 years ago
wiki_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago