Sank6 / Discord-Bot-List

Just another botlist for discord
GNU General Public License v3.0
212 stars 185 forks source link

Bug #363

Closed ririko5834 closed 3 years ago

ririko5834 commented 3 years ago

When i click on tag on /bots/:id page i am not redirected to the tag page, just color is changed. image image

ririko5834 commented 3 years ago

Another problem with like page image Its too big

ShootDot commented 3 years ago

@ririko5834 Replace this with src/dynamic/bots.pug

doctype html
include includes/head.pug
body
    include includes/nav.pug
    #content
        #img-holder
            if (bot.nsfw)
                img#bot-icon.nsfw(width='250px' height='250px' src=bot.logo)
                #botprefix
                    code.prefix #{bot.prefix}
            else
                img#bot-icon(width='250px' height='250px' src=bot.logo)
                #botprefix
                    code.prefix #{bot.prefix}
        .right
            h2(style='display: inline;')
                | #{bot.username}
                | !{discord_verified ? '<i class="fas fa-medal"></i>' : ""}
                a.likes(href=`/bots/like/${bot.botid}`)
                    i.far.fa-heart
                    | #{bot.likes || 0}
            if (servers)
                .servers #{`${servers} servers`}
            .sts(class=botUser.presence.status)
                i.fas.fa-circle
                span #{botUser.presence.status}
            .summary #{bot.description}
            .buttons-case
                a.bot-btns.button(target='_blank' href=bot.invite ? bot.invite : `https://discord.com/oauth2/authorize?client_id=${bot.botid}&scope=bot&permissions=0`)
                    | Invite
                a.bot-btns.button(target='_blank' href=`/api/embed/${bot.botid}`) Embed
            .bot-buttons
                if (bot.support)
                    a.small-link(target='_blank' href=`${bot.support}`) Support Server
                if (bot.website)
                    a.small-link(target='_blank' href=`${bot.website}`) Website
                if (bot.github)
                    a.small-link(target='_blank' href=`${bot.github}`) Github
            if (bot.tags)
                ul.tags
                    each tag in bot.tags
                        li
                            a.bot-tag(href=`/tag/${tag}`) #{tag}

        if (isUrl)
            #long.isurl !{desc}
        else
            #long
                span.markdown-body !{desc}

        #owners
            each person in owners
                a.owner(href=`/user/${person.id}`)
                    img(height='30px' src=person.tag !== 'Unknown User'  ? person.displayAvatarURL({format: "png", size: 256}) : '/assets/default-avatar.png')
                    span.navtext #{person.tag}
ShootDot commented 3 years ago

@Sank6 Edit Line Number 43 src/dynamic/bots.pug from

                            a.bot-tag #{tag}

to

                            a.bot-tag(href=`/tag/${tag}`) #{tag}
Sank6 commented 3 years ago

Fixed