Иконка ресурса

Красивый виджет с полезными ссылками

Flopper

Проверенные
Сообщения
70
Решения
5
Реакции
35
Баллы
155
Flopper добавил(а) новый ресурс:

Красивый виджет с полезными ссылками - Красивый виджет с полезными ссылками, да такие темы вроде есть, но решил сделать все же


1. Заходите в панель управления и создаете HTML виджет.
2. Ключ виджета указываете какой придумаете, заголовок не обязателен.
3. Расположение указываете: "Список форумов: боковая панель"
4. Вставляете код ниже:
Код:
<div class="block svg-smb-widget" data-widget-id="43" data-widget-key="linktop" data-widget-definition="svg_smb_widget">
        <div class="block-container">
            <style>...

Узнать больше об этом ресурсе...
 
а вот это вроде для 2.3 версии не годится ?
Код:
font-family: 'Font Awesome 5 Brands';
 content: "\f392";

Так то он классненький. я подобный в др. месте взяла
 
а вот это вроде для 2.3 версии не годится ?
Код:
font-family: 'Font Awesome 5 Brands';
 content: "\f392";

Так то он классненький. я подобный в др. месте взяла
Все делалось на 2.4 изначально
 
У меня иконки появились только вот так:
Regular:
HTML:
<xf:fa icon="fa-иконка" aria-hidden="true"/>

Solid (fas):
HTML:
<xf:fa icon="fas fa-sparkles" aria-hidden="true"/>

Симпотненько выходит.

679.png
 
Последнее редактирование:
anastasiya, Ну не знаю, сейчас почти любая ИИ создаст вам виджет намного симпатичнее за пару секунд

2026-02-01_19-47-57.png
 
@anastasiya,ну я скрин тебе прислал то что сделано просто по запросу в deepseek

напиши js код виджета полезных ссылок, красивый современный на 5 ссылок

мне выдало код скрин выше, а там к нему ужедобавляете типа все отлично но нужны иконки и так далее под себя запросы делаете

Код:
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Виджет полезных ссылок</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', system-ui, sans-serif;
        }

        body {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            padding: 20px;
        }

        .widget-container {
            width: 100%;
            max-width: 420px;
            animation: fadeIn 0.5s ease-out;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .widget-header {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 16px 16px 0 0;
            padding: 24px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        }

        .widget-title {
            display: flex;
            align-items: center;
            gap: 12px;
            color: #2d3436;
            font-size: 22px;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .widget-title i {
            color: #6c5ce7;
            font-size: 24px;
        }

        .widget-subtitle {
            color: #636e72;
            font-size: 14px;
            font-weight: 500;
        }

        .links-container {
            background: rgba(255, 255, 255, 0.9);
            border-radius: 0 0 16px 16px;
            padding: 16px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
            backdrop-filter: blur(10px);
        }

        .link-item {
            display: flex;
            align-items: center;
            padding: 18px 16px;
            margin-bottom: 12px;
            border-radius: 12px;
            background: white;
            text-decoration: none;
            color: #2d3436;
            transition: all 0.3s ease;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
            position: relative;
            overflow: hidden;
            border-left: 4px solid transparent;
        }

        .link-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
            border-left-color: #6c5ce7;
        }

        .link-item:hover .link-icon {
            transform: scale(1.1);
        }

        .link-icon {
            width: 46px;
            height: 46px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 16px;
            font-size: 20px;
            color: white;
            transition: all 0.3s ease;
        }

        .link-content {
            flex: 1;
        }

        .link-title {
            font-weight: 600;
            font-size: 16px;
            margin-bottom: 4px;
        }

        .link-description {
            font-size: 13px;
            color: #636e72;
            line-height: 1.4;
        }

        .link-arrow {
            color: #b2bec3;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .link-item:hover .link-arrow {
            color: #6c5ce7;
            transform: translateX(4px);
        }

        .widget-footer {
            text-align: center;
            margin-top: 20px;
            color: rgba(255, 255, 255, 0.8);
            font-size: 13px;
        }

        /* Адаптивность */
        @media (max-width: 480px) {
            .widget-container {
                max-width: 100%;
            }
          
            .link-item {
                padding: 16px 14px;
            }
          
            .link-icon {
                width: 40px;
                height: 40px;
                font-size: 18px;
            }
        }

        /* Эффект пульсации при загрузке */
        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.4); }
            70% { box-shadow: 0 0 0 8px rgba(108, 92, 231, 0); }
            100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0); }
        }
    </style>
</head>
<body>
    <div class="widget-container">
        <div class="widget-header">
            <div class="widget-title">
                <i class="fas fa-rocket"></i>
                Полезные ресурсы
            </div>
            <div class="widget-subtitle">Быстрый доступ к важным ссылкам</div>
        </div>
      
        <div class="links-container" id="linksContainer">
            <!-- Ссылки будут добавлены через JS -->
        </div>
      
        <div class="widget-footer">
            Обновлено сегодня • 5 полезных ссылок
        </div>
    </div>

    <script>
        // Данные ссылок
        const links = [
            {
                id: 1,
                title: "Документация",
                description: "Официальная документация и руководства",
                url: "https://developer.mozilla.org",
                icon: "fas fa-book",
                iconColor: "#4CAF50"
            },
            {
                id: 2,
                title: "GitHub",
                description: "Исходный код и проекты",
                url: "https://github.com",
                icon: "fab fa-github",
                iconColor: "#333"
            },
            {
                id: 3,
                title: "Дизайн ресурсы",
                description: "Библиотеки UI и графики",
                url: "https://dribbble.com",
                icon: "fas fa-palette",
                iconColor: "#EA4C89"
            },
            {
                id: 4,
                title: "Обучение",
                description: "Онлайн курсы и тренинги",
                url: "https://www.freecodecamp.org",
                icon: "fas fa-graduation-cap",
                iconColor: "#FF6B6B"
            },
            {
                id: 5,
                title: "Сообщество",
                description: "Форум для разработчиков",
                url: "https://stackoverflow.com",
                icon: "fas fa-users",
                iconColor: "#F48024"
            }
        ];

        // Контейнер для ссылок
        const linksContainer = document.getElementById('linksContainer');

        // Функция для создания элемента ссылки
        function createLinkElement(link) {
            const linkElement = document.createElement('a');
            linkElement.href = link.url;
            linkElement.className = 'link-item';
            linkElement.target = '_blank';
            linkElement.rel = 'noopener noreferrer';
          
            // Добавляем небольшую задержку для анимации появления
            linkElement.style.animationDelay = `${link.id * 0.1}s`;
            linkElement.style.opacity = '0';
            linkElement.style.animation = 'fadeIn 0.5s forwards';
          
            linkElement.innerHTML = `
                <div class="link-icon" style="background: ${link.iconColor};">
                    <i class="${link.icon}"></i>
                </div>
                <div class="link-content">
                    <div class="link-title">${link.title}</div>
                    <div class="link-description">${link.description}</div>
                </div>
                <div class="link-arrow">
                    <i class="fas fa-chevron-right"></i>
                </div>
            `;
          
            return linkElement;
        }

        // Функция для отображения всех ссылок
        function renderLinks() {
            linksContainer.innerHTML = '';
          
            links.forEach(link => {
                const linkElement = createLinkElement(link);
                linksContainer.appendChild(linkElement);
            });
        }

        // Функция для обновления времени в футере
        function updateFooterTime() {
            const now = new Date();
            const options = { day: 'numeric', month: 'long', year: 'numeric' };
            const dateString = now.toLocaleDateString('ru-RU', options);
          
            const footer = document.querySelector('.widget-footer');
            footer.innerHTML = `Обновлено ${dateString} • ${links.length} полезных ссылок`;
        }

        // Инициализация виджета
        function initWidget() {
            renderLinks();
            updateFooterTime();
          
            // Добавляем пульсацию для первого элемента
            const firstLink = document.querySelector('.link-item');
            if (firstLink) {
                firstLink.style.animation = 'fadeIn 0.5s forwards, pulse 2s 1s 2';
            }
        }

        // Запускаем виджет при загрузке страницы
        document.addEventListener('DOMContentLoaded', initWidget);

        // Дополнительно: можно добавить обновление времени каждые 10 минут
        setInterval(updateFooterTime, 600000);
    </script>
</body>
</html>

ИИ для css делает все вроде более менее, это не серьезные плагины
 
Последнее редактирование:
мне выдало код скрин выше, а там к нему ужедобавляете типа все отлично но нужны иконки и так далее под себя запросы делаете
ИИшка тупая. Может ей нужно указывать что для XF 2.3 ?
В XenForo 2.3 мы разработали совершенно новый способ выбора значков Font Awesome, благодаря которому пользователям будут отображаться только те значки, которые фактически используются во всей вашей установке XenForo, и, что еще лучше, это происходит полностью автоматически!
она подтянула все иконки , да еще и FA - 6 ! ))))

А виджет классный, необычный. Зацепил меня )))

Ищу способ, как избежать вот этого:
<link rel="stylesheet" href=" ">

И добавить иконки другим способом в этом кусочке:

Код:
<script>
        // Данные ссылок
        const links = [
            {
                id: 1,
                title: "тра-та-та",
                description: "бла-бла-бла",
                url: "https://",
                icon: "fas fa-book",
                iconColor: "#4CAF50"
            }
 
Современный облачный хостинг провайдер | Aéza
Назад
Сверху Снизу