XF 2.3 Prevent fa icons from being duplicated

Hello, I recently updated to Xenforo 2.3.0 and I have a problem with fa icons.

I have made a notice to ask you to log in or register in my forum, the registration forms have fa icons, but by entering this code the widget icons are duplicated to share the page on Twitter, Facebook, etc... I would like Know how to avoid duplication. This is the warning code:

Code:
<html lang="es">
<head>
    <meta charset="UTF-8">
    <title>Bienvenida al Foro</title>
    <!-- Enlace a Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            margin-top: 50px;
        }
        .contenedor-botones {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 20px;
        }
        .boton {
            background-color: #333;
            color: white;
            border: none;
            padding: 10px 20px;
            cursor: pointer;
            font-size: 14px;
            border-radius: 5px;
            display: inline-flex;
            align-items: center;
            text-decoration: none;
            transition: background-color 0.3s;
        }
        .boton i {
            margin-right: 8px;
        }
        .boton:hover {
            background-color: #555;
        }
        .tabla-botones {
            display: inline-block;
        }
        p {
            font-size: 18px;
            max-width: 600px;
            margin: 20px auto;
            text-align: center;
        }
    </style>
</head>
<body>

    <p><strong>Bienvenido/a a forocrimenymisterio.com, es necesario iniciar sesión o registrarse para acceder a nuestro contenido.</strong></p>

    <div class="contenedor-botones">
        <div class="tabla-botones">
            <a href="/login/" class="boton" data-xf-click="overlay" data-follow-redirects="on">
                <i class="fas fa-key"></i> Acceder
            </a>
        </div>
        <div class="tabla-botones">
            <a href="/register/" class="boton" data-xf-click="overlay" data-follow-redirects="on">
                <i class="fas fa-plus"></i> Regístrate
            </a>
        </div>
    </div>

</body>
</html>

Thanks
 
Solution
Hello,
First, you don't need to call FA icons in your template, unless it's used outside the XenForo frame.
❌ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

Then, as you are now running XF 2.3, you should use the new syntax for FA icons
<xf:fa icon="fas fa-plus" /> Regístrate

Concerning the duplicate icons i don't really understand what you mean, can you provide a screenshot?
Hello,
First, you don't need to call FA icons in your template, unless it's used outside the XenForo frame.
❌ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

Then, as you are now running XF 2.3, you should use the new syntax for FA icons
<xf:fa icon="fas fa-plus" /> Regístrate

Concerning the duplicate icons i don't really understand what you mean, can you provide a screenshot?
 
Solution
@Old Nick Hello, I very much appreciate your response. I send a screenshot of the phone with what happens with the code from my previous message. Applying what you told me, the duplicate icons stop appearing, but the fa icons do not appear on the login and registration buttons either.

IMG_8801.webp
 
Back
Top Bottom