mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2026-02-15 04:55:59 +00:00
Compare commits
9 Commits
feature/us
...
v1.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
157407c013 | ||
|
|
8fe3f73568 | ||
|
|
5cce60c3ad | ||
|
|
1ec92f4809 | ||
|
|
7a0c008bba | ||
|
|
d354d6314a | ||
|
|
121ad6b157 | ||
|
|
fc88bfbca5 | ||
|
|
0fea1e46a3 |
57
README.md
57
README.md
@@ -65,58 +65,8 @@ Stack Overflow: `https://i.stack.imgur.com/KnO3v.jpg?s=64&g=1` -> `https://rimgo
|
|||||||
To automatically redirect Imgur links, see [Redirection](https://rimgo.codeberg.page/docs/usage/redirection/).
|
To automatically redirect Imgur links, see [Redirection](https://rimgo.codeberg.page/docs/usage/redirection/).
|
||||||
|
|
||||||
## Instances
|
## Instances
|
||||||
Open an issue to have your instance listed here! See the rules for the instance list [here](https://rimgo.codeberg.page/docs/usage/instance-list-rules/).
|
|
||||||
|
|
||||||
> For more details on instance privacy, see https://rimgo.codeberg.page/docs/usage/instance-privacy/
|
Available at https://rimgo.codeberg.page/ or https://codeberg.org/rimgo/instances
|
||||||
|
|
||||||
### Clearnet
|
|
||||||
|
|
||||||
| URL | Country | Provider | Privacy | Notes |
|
|
||||||
| :------------------------------------------------------------ | :----------- | :----------------------- | :-------------------- | :---- |
|
|
||||||
| [rimgo.pussthecat.org](https://rimgo.pussthecat.org) | 🇩🇪 DE | Hetzner | ⚠️ Data collected | |
|
|
||||||
| [rimgo.totaldarkness.net](https://rimgo.totaldarkness.net) | 🇨🇦 CA | Vultr | ✅ Data not collected | |
|
|
||||||
| [rimgo.bus-hit.me](https://rimgo.bus-hit.me) | 🇨🇦 CA | Oracle | ⚠️ Data collected | |
|
|
||||||
| [imgur.artemislena.eu](https://imgur.artemislena.eu) | 🇩🇪 DE | Vodafone Deutschland | ✅ Data not collected | Self-hosted, provider is ISP |
|
|
||||||
| [rimgo.vern.cc](https://rimgo.vern.cc) | 🇺🇸 US | OVHCloud | ✅ Data not collected | [Edited theme](https://git.vern.cc/root/modifications/src/branch/master/rimgo) |
|
|
||||||
| [rim.odyssey346.dev](https://rim.odyssey346.dev/) | 🇫🇷️ FR | Trolling Solutions (OVH) | ✅ Data not collected | |
|
|
||||||
| [i.habedieeh.re](https://i.habedieeh.re/) | 🇨🇦️ CA | Oracle Cloud | ✅ Data not collected | |
|
|
||||||
| [rimgo.hostux.net](https://rimgo.hostux.net/) | 🇫🇷️ FR | Gandi | ⚠️ Data collected | |
|
|
||||||
| [ri.zzls.xyz](https://ri.zzls.xyz/) | 🇨🇱 CL | TELEFÓNICA CHILE | ✅ Data not collected | Self-hosted, provider is ISP |
|
|
||||||
| [rimgo.lunar.icu](https://rimgo.marcopisco.com/) | 🇩🇪 DE | Cloudflare | ✅ Data not collected | |
|
|
||||||
| [imgur.010032.xyz](https://imgur.010032.xyz/) | 🇰🇷 KR | Oracle Cloud | ✅ Data not collected | |
|
|
||||||
| [rimgo.kling.gg](https://rimgo.kling.gg/) | 🇳🇱 NL | RamNode | ✅ Data not collected | |
|
|
||||||
| [i.01r.xyz](https://i.01r.xyz/) | 🇺🇸 US | Cloudflare | ✅ Data not collected | |
|
|
||||||
| [rimgo.projectsegfau.lt](https://rimgo.projectsegfau.lt/) | 🇫🇷 FR, 🇺🇸 US, 🇮🇳 IN | See below | ✅ Data not collected | |
|
|
||||||
| [rimgo.eu.projectsegfau.lt](https://rimgo.eu.projectsegfau.lt/) | 🇫🇷 FR | Orange S.A. | ✅ Data not collected | |
|
|
||||||
| [rimgo.us.projectsegfau.lt](https://rimgo.us.projectsegfau.lt/) | 🇺🇸 US | Racknerd | ✅ Data not collected | |
|
|
||||||
| [rimgo.in.projectsegfau.lt](https://rimgo.in.projectsegfau.lt/) | 🇮🇳 IN | Airtel | ✅ Data not collected | |
|
|
||||||
| [rimgo.whateveritworks.org](https://rimgo.whateveritworks.org/) | 🇩🇪 DE | Cloudflare | ✅ Data not collected | |
|
|
||||||
| [rimgo.nohost.network](https://rimgo.nohost.network/) | 🇲🇽 MX | Telmex | ✅ Data not collected | |
|
|
||||||
| [rimgo.catsarch.com](https://rimgo.catsarch.com/) | 🇺🇸 US | Comcast | ✅ Data not collected | Self-hosted, provider is ISP |
|
|
||||||
| [rimgo.frontendfriendly.xyz](https://rimgo.frontendfriendly.xyz/) | 🇩🇪 DE | Hetzner | ⚠️ Data collected | |
|
|
||||||
|
|
||||||
### Tor
|
|
||||||
|
|
||||||
| URL | Privacy | Notes |
|
|
||||||
| :-- | :------ | :----------------------- |
|
|
||||||
| [rimgo.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion](http://rimgo.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion) | ✅ Data not collected | Onion of rimgo.vern.cc |
|
|
||||||
| [imgur.lpoaj7z2zkajuhgnlltpeqh3zyq7wk2iyeggqaduhgxhyajtdt2j7wad.onion](http://imgur.lpoaj7z2zkajuhgnlltpeqh3zyq7wk2iyeggqaduhgxhyajtdt2j7wad.onion) | ✅ Data not collected | Onion of imgur.artemislena.eu |
|
|
||||||
| [rim.odysfvr23q5wgt7i456o5t3trw2cw5dgn56vbjfbq2m7xsc5vqbqpcyd.onion](http://rim.odysfvr23q5wgt7i456o5t3trw2cw5dgn56vbjfbq2m7xsc5vqbqpcyd.onion) | ⚠️ Data collected | |
|
|
||||||
| [tdp6uqjtmok723suum5ms3jbquht6d7dssug4cgcxhfniatb25gcipad.onion](http://tdp6uqjtmok723suum5ms3jbquht6d7dssug4cgcxhfniatb25gcipad.onion) | ✅ Data not collected | Onion of rimgo.privacytools.io |
|
|
||||||
| [i.habeehrhadazsw3izbrbilqajalfyqqln54mrja3iwpqxgcuxnus7eid.onion](http://i.habeehrhadazsw3izbrbilqajalfyqqln54mrja3iwpqxgcuxnus7eid.onion/) | ✅ Data not collected | Onion of i.habedieeh.re |
|
|
||||||
| [rimgo.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion](http://rimgo.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion/) | ✅ Data not collected | Onion of ri.zzls.xyz |
|
|
||||||
| [tdn7zoxctmsopey77mp4eg2gazaudyhgbuyytf4zpk5u7lknlxlgbnid.onion/](http://tdn7zoxctmsopey77mp4eg2gazaudyhgbuyytf4zpk5u7lknlxlgbnid.onion/) | ✅ Data not collected | Onion of rimgo.kling.gg |
|
|
||||||
| [rimgo.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion](http://rimgo.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion/) | ✅ Data not collected | Onion of rimgo.eu.projectsegfau.lt |
|
|
||||||
|
|
||||||
### I2P
|
|
||||||
|
|
||||||
| URL | Privacy | Notes |
|
|
||||||
| :-- | :------ | :----------------------- |
|
|
||||||
| [rimgo.i2p](http://rimgo.i2p) | ✅ Data not collected | i.habedieeh.re on I2P |
|
|
||||||
| [rimgov7l2tqyrm5txrtvhtnfyrzkc5d7ipafofavchbnnyog4r3q.b32.i2p](http://rimgov7l2tqyrm5txrtvhtnfyrzkc5d7ipafofavchbnnyog4r3q.b32.i2p) | ✅ Data not collected | Same as rimgo.i2p |
|
|
||||||
| [rimgo.zzls.i2p](http://rimgo.zzls.i2p) | ✅ Data not collected | ri.zzls.xyz on I2P |
|
|
||||||
| [p57356k2xwhxrg2lxrjajcftkrptv4zejeeblzfgkcvpzuetkz2a.b32.i2p](http://p57356k2xwhxrg2lxrjajcftkrptv4zejeeblzfgkcvpzuetkz2a.b32.i2p) | ✅ Data not collected | Same as rimgo.zzls.i2p |
|
|
||||||
| [ovzamsts5czfx3jasbbhbccyyl2z7qmdngtlqxdh4oi7abhdz3ia.b32.i2p](http://ovzamsts5czfx3jasbbhbccyyl2z7qmdngtlqxdh4oi7abhdz3ia.b32.i2p) | ✅ Data not collected | rimgo.kling.gg on I2P |
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
@@ -127,7 +77,10 @@ See [Install](https://rimgo.codeberg.page/docs/getting-started/install/).
|
|||||||
See [Configuration](https://rimgo.codeberg.page/docs/usage/configuration/).
|
See [Configuration](https://rimgo.codeberg.page/docs/usage/configuration/).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
Pull requests are welcome! If you have any questions or bug reports, open an [issue](https://codeberg.org/rimgo/rimgo/issues/new).
|
Pull requests are welcome! If you have any questions or bug reports, open an [issue](https://codeberg.org/rimgo/rimgo/issues/new). Please remember to follow our [Code of Conduct](https://rimgo.codeberg.page/docs/code-of-conduct/)!
|
||||||
|
|
||||||
## License
|
## License
|
||||||
This software is released under the AGPL-3.0 license. If you make any modifications to the code and distribute it (including use on a network server), you must publicly distribute your changes and release them under the AGPL-3.0.
|
This software is released under the AGPL-3.0 license. If you make any modifications to the code and distribute it (including use on a network server), you must publicly distribute your changes and release them under the AGPL-3.0.
|
||||||
|
|
||||||
|
## Legal notice
|
||||||
|
rimgo does not allow uploads or host any content, media. All content on any rimgo instances is from Imgur™. Imgur is a trademark of Imgur, Inc. Any issues with content on rimgo should be be reported to Imgur.
|
||||||
53
api/user.go
53
api/user.go
@@ -70,7 +70,7 @@ func (client *Client) FetchUser(username string) (User, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (client *Client) FetchSubmissions(username string, sort string, page string) ([]Submission, error) {
|
func (client *Client) FetchSubmissions(username string, sort string, page string) ([]Submission, error) {
|
||||||
cacheData, found := client.Cache.Get(username + "-submissions")
|
cacheData, found := client.Cache.Get(username + "-submissions-" + sort + page)
|
||||||
if found {
|
if found {
|
||||||
return cacheData.([]Submission), nil
|
return cacheData.([]Submission), nil
|
||||||
}
|
}
|
||||||
@@ -98,7 +98,56 @@ func (client *Client) FetchSubmissions(username string, sort string, page string
|
|||||||
)
|
)
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
client.Cache.Set(username+"-submissions", submissions, 15*time.Minute)
|
client.Cache.Set(username+"-submissions-"+sort+page, submissions, 15*time.Minute)
|
||||||
|
return submissions, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (client *Client) FetchUserFavorites(username string, sort string, page string) ([]Submission, error) {
|
||||||
|
cacheData, found := client.Cache.Get(username + "-favorites-" + sort + page)
|
||||||
|
if found {
|
||||||
|
return cacheData.([]Submission), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
req, err := http.NewRequest("GET", "https://api.imgur.com/3/account/"+username+"/gallery_favorites/"+page+"/"+sort, nil)
|
||||||
|
if err != nil {
|
||||||
|
return []Submission{}, err
|
||||||
|
}
|
||||||
|
utils.SetReqHeaders(req)
|
||||||
|
q := req.URL.Query()
|
||||||
|
q.Add("client_id", client.ClientID)
|
||||||
|
req.URL.RawQuery = q.Encode()
|
||||||
|
|
||||||
|
res, err := http.DefaultClient.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return []Submission{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
body, err := io.ReadAll(res.Body)
|
||||||
|
if err != nil {
|
||||||
|
return []Submission{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
data := gjson.Parse(string(body))
|
||||||
|
|
||||||
|
submissions := []Submission{}
|
||||||
|
|
||||||
|
wg := sync.WaitGroup{}
|
||||||
|
data.Get("data").ForEach(
|
||||||
|
func(key, value gjson.Result) bool {
|
||||||
|
wg.Add(1)
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
defer wg.Done()
|
||||||
|
|
||||||
|
submissions = append(submissions, parseSubmission(value))
|
||||||
|
}()
|
||||||
|
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
)
|
||||||
|
wg.Wait()
|
||||||
|
|
||||||
|
client.Cache.Set(username+"-favorites-"+sort+page, submissions, 15*time.Minute)
|
||||||
return submissions, nil
|
return submissions, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -152,5 +152,12 @@
|
|||||||
"de"
|
"de"
|
||||||
],
|
],
|
||||||
"cloudflare": false
|
"cloudflare": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://rimgo.quantenzitrone.eu",
|
||||||
|
"countries": [
|
||||||
|
"cz"
|
||||||
|
],
|
||||||
|
"cloudflare": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
3
main.go
3
main.go
@@ -88,7 +88,7 @@ func main() {
|
|||||||
} else {
|
} else {
|
||||||
app.Use("/static", filesystem.New(filesystem.Config{
|
app.Use("/static", filesystem.New(filesystem.Config{
|
||||||
MaxAge: 2592000,
|
MaxAge: 2592000,
|
||||||
Root: http.FS(static.GetFiles()),
|
Root: http.FS(static.GetFiles()),
|
||||||
}))
|
}))
|
||||||
app.Use(cache.New(cache.Config{
|
app.Use(cache.New(cache.Config{
|
||||||
Expiration: 30 * time.Minute,
|
Expiration: 30 * time.Minute,
|
||||||
@@ -123,6 +123,7 @@ func main() {
|
|||||||
app.Get("/t/:tag/:postID", pages.HandlePost)
|
app.Get("/t/:tag/:postID", pages.HandlePost)
|
||||||
app.Get("/r/:sub/:postID", pages.HandlePost)
|
app.Get("/r/:sub/:postID", pages.HandlePost)
|
||||||
app.Get("/user/:userID", pages.HandleUser)
|
app.Get("/user/:userID", pages.HandleUser)
|
||||||
|
app.Get("/user/:userID/favorites", pages.HandleUserFavorites)
|
||||||
app.Get("/user/:userID/comments", pages.HandleUserComments)
|
app.Get("/user/:userID/comments", pages.HandleUserComments)
|
||||||
app.Get("/user/:userID/cover", pages.HandleUserCover)
|
app.Get("/user/:userID/cover", pages.HandleUserCover)
|
||||||
app.Get("/user/:userID/avatar", pages.HandleUserAvatar)
|
app.Get("/user/:userID/avatar", pages.HandleUserAvatar)
|
||||||
|
|||||||
@@ -29,11 +29,6 @@ func HandleSearch(c *fiber.Ctx) error {
|
|||||||
pageNumber = 0
|
pageNumber = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
displayPrevPage := true
|
|
||||||
if page == "0" {
|
|
||||||
displayPrevPage = false
|
|
||||||
}
|
|
||||||
|
|
||||||
results, err := ApiClient.Search(query, page)
|
results, err := ApiClient.Search(query, page)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -42,8 +37,7 @@ func HandleSearch(c *fiber.Ctx) error {
|
|||||||
return c.Render("search", fiber.Map{
|
return c.Render("search", fiber.Map{
|
||||||
"query": query,
|
"query": query,
|
||||||
"results": results,
|
"results": results,
|
||||||
"page": pageNumber + 1,
|
"page": pageNumber,
|
||||||
"displayPrev": displayPrevPage,
|
|
||||||
"nextPage": pageNumber + 1,
|
"nextPage": pageNumber + 1,
|
||||||
"prevPage": pageNumber - 1,
|
"prevPage": pageNumber - 1,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -23,11 +23,6 @@ func HandleTag(c *fiber.Ctx) error {
|
|||||||
pageNumber = 0
|
pageNumber = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
displayPrevPage := true
|
|
||||||
if page == "1" {
|
|
||||||
displayPrevPage = false
|
|
||||||
}
|
|
||||||
|
|
||||||
tag, err := ApiClient.FetchTag(c.Params("tag"), c.Query("sort"), page)
|
tag, err := ApiClient.FetchTag(c.Params("tag"), c.Query("sort"), page)
|
||||||
if err != nil && err.Error() == "ratelimited by imgur" {
|
if err != nil && err.Error() == "ratelimited by imgur" {
|
||||||
return c.Status(429).Render("errors/429", fiber.Map{
|
return c.Status(429).Render("errors/429", fiber.Map{
|
||||||
@@ -44,7 +39,6 @@ func HandleTag(c *fiber.Ctx) error {
|
|||||||
return c.Render("tag", fiber.Map{
|
return c.Render("tag", fiber.Map{
|
||||||
"tag": tag,
|
"tag": tag,
|
||||||
"page": page,
|
"page": page,
|
||||||
"displayPrev": displayPrevPage,
|
|
||||||
"nextPage": pageNumber + 1,
|
"nextPage": pageNumber + 1,
|
||||||
"prevPage": pageNumber - 1,
|
"prevPage": pageNumber - 1,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -36,11 +36,6 @@ func HandleTrending(c *fiber.Ctx) error {
|
|||||||
sort = "popular"
|
sort = "popular"
|
||||||
}
|
}
|
||||||
|
|
||||||
displayPrevPage := true
|
|
||||||
if page == "1" {
|
|
||||||
displayPrevPage = false
|
|
||||||
}
|
|
||||||
|
|
||||||
results, err := ApiClient.FetchTrending(section, sort, page)
|
results, err := ApiClient.FetchTrending(section, sort, page)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -51,7 +46,6 @@ func HandleTrending(c *fiber.Ctx) error {
|
|||||||
"section": section,
|
"section": section,
|
||||||
"sort": sort,
|
"sort": sort,
|
||||||
"page": pageNumber,
|
"page": pageNumber,
|
||||||
"displayPrev": displayPrevPage,
|
|
||||||
"nextPage": pageNumber + 1,
|
"nextPage": pageNumber + 1,
|
||||||
"prevPage": pageNumber - 1,
|
"prevPage": pageNumber - 1,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -91,3 +91,52 @@ func HandleUserComments(c *fiber.Ctx) error {
|
|||||||
"comments": comments,
|
"comments": comments,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func HandleUserFavorites(c *fiber.Ctx) error {
|
||||||
|
utils.SetHeaders(c)
|
||||||
|
c.Set("X-Frame-Options", "DENY")
|
||||||
|
c.Set("Cache-Control", "public,max-age=604800")
|
||||||
|
c.Set("Content-Security-Policy", "default-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'self'; media-src 'self'; style-src 'unsafe-inline' 'self'; img-src 'self'; manifest-src 'self'; block-all-mixed-content")
|
||||||
|
|
||||||
|
page := "0"
|
||||||
|
if c.Query("page") != "" {
|
||||||
|
page = c.Query("page")
|
||||||
|
}
|
||||||
|
|
||||||
|
pageNumber, err := strconv.Atoi(c.Query("page"))
|
||||||
|
if err != nil {
|
||||||
|
pageNumber = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
user, err := ApiClient.FetchUser(c.Params("userID"))
|
||||||
|
if err != nil && err.Error() == "ratelimited by imgur" {
|
||||||
|
return c.Status(429).Render("errors/429", fiber.Map{
|
||||||
|
"path": c.Path(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if user.Username == "" {
|
||||||
|
return c.Status(404).Render("errors/404", nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
favorites, err := ApiClient.FetchUserFavorites(c.Params("userID"), "newest", page)
|
||||||
|
if err != nil && err.Error() == "ratelimited by imgur" {
|
||||||
|
c.Status(429)
|
||||||
|
return c.Render("errors/429", fiber.Map{
|
||||||
|
"path": c.Path(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return c.Render("userFavorites", fiber.Map{
|
||||||
|
"user": user,
|
||||||
|
"favorites": favorites,
|
||||||
|
"page": page,
|
||||||
|
"nextPage": pageNumber + 1,
|
||||||
|
"prevPage": pageNumber - 1,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
rimgo is not affiliated with Imgur, all content is proxied from Imgur.
|
rimgo is not affiliated with Imgur, all content is proxied from Imgur.
|
||||||
</p>
|
</p>
|
||||||
<br/>
|
<br/>
|
||||||
<h3 class="font-bold text-xl">Notice</h3>
|
<h3 class="font-bold text-xl">Legal notice</h3>
|
||||||
<p>All images and media are from Imgur. rimgo does not allow uploads or comments. Any issues with content should be reported to Imgur.</p>
|
<p>rimgo does not allow uploads or host any content, media. All content on any rimgo instances is from Imgur™. Imgur is a trademark of Imgur, Inc. Any issues with content on rimgo should be be reported to Imgur.</p>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<h2 class="font-bold text-2xl">This instance</h2>
|
<h2 class="font-bold text-2xl">This instance</h2>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-center flex-col">
|
<div class="flex flex-center flex-col break-words">
|
||||||
{{#each post.Media}}
|
{{#each post.Media}}
|
||||||
{{#if this.Title}}
|
{{#if this.Title}}
|
||||||
<h4 class="font-bold">{{this.Title}}</h4>
|
<h4 class="font-bold">{{this.Title}}</h4>
|
||||||
|
|||||||
@@ -22,10 +22,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-between mt-4 font-bold">
|
<div class="flex justify-between mt-4 font-bold">
|
||||||
{{#if displayPrev}}
|
{{#noteq page "0"}}
|
||||||
<a href="/search?q={{query}}&page={{prevPage}}">Previous page</a>
|
<a href="/search?q={{query}}&page={{prevPage}}">Previous page</a>
|
||||||
{{/if}}
|
{{/noteq}}
|
||||||
<p>Page {{page}}</p>
|
<p>Page {{nextPage}}</p>
|
||||||
<a href="/search?q={{query}}&page={{nextPage}}">Next page</a>
|
<a href="/search?q={{query}}&page={{nextPage}}">Next page</a>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -45,10 +45,11 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4 font-bold">
|
<div class="flex justify-between mt-4 font-bold">
|
||||||
{{#if displayPrev}}
|
{{#noteq page "1"}}
|
||||||
<a href="{{channel.RelUrl}}?page={{prevPage}}">Previous page</a>
|
<a href="{{channel.RelUrl}}?page={{prevPage}}">Previous page</a>
|
||||||
{{/if}}
|
{{/noteq}}
|
||||||
|
<p>Page {{nextPage}}</p>
|
||||||
<a href="{{channel.RelUrl}}?page={{nextPage}}">Next page</a>
|
<a href="{{channel.RelUrl}}?page={{nextPage}}">Next page</a>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -65,9 +65,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-between mt-4 font-bold">
|
<div class="flex justify-between mt-4 font-bold">
|
||||||
{{#if displayPrev}}
|
{{#noteq page "1"}}
|
||||||
<a href="/trending?section={{section}}&sort={{sort}}&page={{prevPage}}">Previous page</a>
|
<a href="/trending?section={{section}}&sort={{sort}}&page={{prevPage}}">Previous page</a>
|
||||||
{{/if}}
|
{{/noteq}}
|
||||||
<p>Page {{page}}</p>
|
<p>Page {{page}}</p>
|
||||||
<a href="/trending?section={{section}}&sort={{sort}}&page={{nextPage}}">Next page</a>
|
<a href="/trending?section={{section}}&sort={{sort}}&page={{nextPage}}">Next page</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
<hr class="sm:border-0 flex-grow">
|
<hr class="sm:border-0 flex-grow">
|
||||||
<div class="flex flex-col items-center sm:items-end">
|
<div class="flex flex-col items-center sm:items-end">
|
||||||
<a href="/user/{{user.Username}}"><b>Submissions</b></a>
|
<a href="/user/{{user.Username}}"><b>Submissions</b></a>
|
||||||
|
<a href="/user/{{user.Username}}/favorites">Favorites</a>
|
||||||
<a href="/user/{{user.Username}}/comments">Comments</a>
|
<a href="/user/{{user.Username}}/comments">Comments</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
<hr class="sm:border-0 flex-grow">
|
<hr class="sm:border-0 flex-grow">
|
||||||
<div class="flex flex-col items-center sm:items-end">
|
<div class="flex flex-col items-center sm:items-end">
|
||||||
<a href="/user/{{user.Username}}">Submissions</a>
|
<a href="/user/{{user.Username}}">Submissions</a>
|
||||||
|
<a href="/user/{{user.Username}}/favorites">Favorites</a>
|
||||||
<a href="/user/{{user.Username}}/comments"><b>Comments</b></a>
|
<a href="/user/{{user.Username}}/comments"><b>Comments</b></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
52
views/userFavorites.hbs
Normal file
52
views/userFavorites.hbs
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>{{user.Username}}'s favorites - rimgo</title>
|
||||||
|
|
||||||
|
{{> partials/head }}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="font-sans text-lg bg-slate-800 text-white">
|
||||||
|
{{> partials/nav }}
|
||||||
|
|
||||||
|
<section class="my-4 w-full flex flex-col items-center">
|
||||||
|
{{> partials/searchBar }}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<header class="p-4 rounded-xl text-white mb-4" style="background-image: url('{{user.Cover}}');">
|
||||||
|
<div class="flex flex-col sm:flex-row items-center gap-2">
|
||||||
|
<img class="rounded-full" src="{{user.Avatar}}" width="72" height="72">
|
||||||
|
<div class="items-center sm:items-start text-center sm:text-left">
|
||||||
|
<h2 class="font-bold text-2xl">{{user.Username}}</h2>
|
||||||
|
<p>{{user.Points}} pts · {{user.CreatedAt}}</p>
|
||||||
|
</div>
|
||||||
|
<hr class="sm:border-0 flex-grow">
|
||||||
|
<div class="flex flex-col items-center sm:items-end">
|
||||||
|
<a href="/user/{{user.Username}}">Submissions</a>
|
||||||
|
<a href="/user/{{user.Username}}/favorites"><b>Favorites</b></a>
|
||||||
|
<a href="/user/{{user.Username}}/comments">Comments</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p class="mt-2">{{user.Bio}}</p>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="posts">
|
||||||
|
{{#each favorites}}
|
||||||
|
{{> partials/post }}
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex mt-4 font-bold justify-between">
|
||||||
|
{{#noteq page "0" }}
|
||||||
|
<a href="{{channel.RelUrl}}?page={{prevPage}}">Previous page</a>
|
||||||
|
{{/noteq}}
|
||||||
|
<a href="{{channel.RelUrl}}?page={{nextPage}}">Next page</a>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
{{> partials/footer }}
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user