




{"id":877,"date":"2024-09-03T16:33:33","date_gmt":"2024-09-03T14:33:33","guid":{"rendered":"https:\/\/pacific-webtools.com\/web-extractor\/?p=877"},"modified":"2024-09-03T17:18:43","modified_gmt":"2024-09-03T15:18:43","slug":"generateur-de-bouton-like-personnalisable-en-html-css-js","status":"publish","type":"post","link":"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/","title":{"rendered":"G\u00e9n\u00e9rateur de Bouton \u00ab\u00a0Like\u00a0\u00bb Personnalisable en HTML, CSS, JS"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"877\" class=\"elementor elementor-877\" data-elementor-post-type=\"post\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a1c52ee e-con-full e-flex e-con e-parent\" data-id=\"a1c52ee\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-47eaa7e elementor-widget elementor-widget-html\" data-id=\"47eaa7e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<html><head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>G\u00e9n\u00e9rateur de Bouton \"Like\" Personnalisable<\/title>\n<link href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/6.4.0\/css\/all.min.css\" rel=\"stylesheet\">\n<style>\n    body, html {\n        margin: 0;\n        padding: 0;\n        font-family: Arial, sans-serif;\n        height: 100%;\n        overflow-x: hidden;\n        overflow-y: auto;\n    }\n    .container {\n        display: flex;\n        min-height: 100%;\n        flex-direction: row;\n        width: 100vw; \/* Assurez-vous que la largeur du conteneur occupe toute la largeur de la fen\u00eatre *\/\n            max-width: 100%; \/* D\u00e9sactive toute limitation de la largeur maximale *\/\n    }\n    .sidebar {\n        width: 350px;\n        background-color: #3295d4;\n        color: #fff;\n        padding: 20px;\n        overflow-y: auto;\n        flex: 0 0 auto;\n        transition: width 0.3s ease-in-out, margin-left 0.3s ease-in-out;\n        display: flex;\n        flex-direction: column;\n        height: 100vh;\n        position: sticky;\n        top: 0;\n    }\n    .sidebar-content {\n        flex-grow: 1;\n        overflow-y: auto;\n    }\n    .sidebar.collapsed {\n        width: 50px;\n        padding: 0;\n    }\n    .main-content {\n        flex: 1;\n        background-color: #f0f0f0;\n        position: relative;\n        overflow: hidden;\n        min-height: 100vh;\n        display: flex;\n        justify-content: center;\n        align-items: center;\n    }\n    .control-group {\n        margin-bottom: 15px;\n    }\n    label {\n        display: block;\n        margin-bottom: 5px;\n    }\n    select, input[type=\"range\"], input[type=\"color\"], input[type=\"text\"], input[type=\"number\"], input[type=\"checkbox\"], input[type=\"url\"] {\n        width: 100%;\n        margin-bottom: 10px;\n    }\n    .code-section {\n        background-color: #2980b9;\n        padding: 10px;\n        border-radius: 5px;\n        margin-top: 20px;\n    }\n    .code-section pre {\n        color: #fff;\n        margin: 0;\n        white-space: pre-wrap;\n        word-wrap: break-word;\n    }\n    @media (max-width: 767px) {\n        .container {\n            flex-direction: row;\n        }\n        .sidebar, .main-content {\n            width: 50%;\n            height: 100vh;\n            min-height: 100vh;\n            overflow-y: auto;\n        }\n        .sidebar {\n            position: static;\n        }\n        .main-content {\n            align-items: flex-start;\n            padding-top: 20px;\n        }\n    }\n    #toggleSidebar {\n        position: absolute;\n        top: 10px;\n        right: 10px;\n        z-index: 1000;\n        background-color: #2980b9;\n        color: #fff;\n        border: none;\n        padding: 10px;\n        cursor: pointer;\n        transition: transform 0.3s ease-in-out;\n    }\n    .sidebar.collapsed #toggleSidebar {\n        transform: rotate(180deg);\n    }\n    .sidebar-content {\n        transition: opacity 0.3s ease-in-out;\n    }\n    .sidebar.collapsed .sidebar-content {\n        opacity: 0;\n        pointer-events: none;\n    }\n    #codeEditor {\n        width: 100%;\n        height: 300px;\n        background-color: #2980b9;\n        color: #fff;\n        font-family: monospace;\n        font-size: 14px;\n        padding: 10px;\n        border: 1px solid #1c638f;\n        resize: vertical;\n    }\n    .notification {\n        position: fixed;\n        bottom: 20px;\n        right: 20px;\n        background-color: #4CAF50;\n        color: white;\n        padding: 15px;\n        border-radius: 5px;\n        display: none;\n        z-index: 1000;\n    }\n    .color-inputs {\n        display: flex;\n        flex-wrap: wrap;\n        gap: 10px;\n    }\n    .color-input {\n        display: flex;\n        align-items: center;\n    }\n    .color-input input[type=\"color\"] {\n        width: 50px;\n        height: 30px;\n        padding: 0;\n        border: none;\n    }\n    .advanced-options {\n        margin-top: 20px;\n        padding-top: 20px;\n        border-top: 1px solid #2980b9;\n    }\n    .preview-container {\n        display: flex;\n        justify-content: center;\n        align-items: center;\n        width: 100%;\n        height: 100%;\n        padding: 20px;\n        box-sizing: border-box;\n    }\n    #buttonPreview {\n        transition: all 0.3s ease;\n    }\n<\/style>\n<\/head>\n<body>\n<div class=\"container\">\n    <div id=\"sidebar\" class=\"sidebar\">\n        <button id=\"toggleSidebar\"><i class=\"fas fa-chevron-left\"><\/i><\/button>\n        <div class=\"sidebar-content\">\n            <div id=\"controls\">\n                <div class=\"control-group\">\n                    <label for=\"buttonText\">Texte du bouton:<\/label>\n                    <input type=\"text\" id=\"buttonText\" value=\"Like\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"buttonURL\">URL du bouton:<\/label>\n                    <input type=\"url\" id=\"buttonURL\" value=\"https:\/\/example.com\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"buttonShape\">Forme du bouton:<\/label>\n                    <select id=\"buttonShape\" onchange=\"updateButton()\">\n                        <option value=\"rectangle\">Rectangle<\/option>\n                        <option value=\"rounded\" selected>Arrondi<\/option>\n                        <option value=\"pill\">Pilule<\/option>\n                        <option value=\"circle\">Rond<\/option>\n                        <option value=\"square\">Carr\u00e9<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"buttonWidth\">Largeur du bouton:<\/label>\n                    <input type=\"range\" id=\"buttonWidth\" min=\"100\" max=\"300\" value=\"150\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"buttonHeight\">Hauteur du bouton:<\/label>\n                    <input type=\"range\" id=\"buttonHeight\" min=\"30\" max=\"100\" value=\"40\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"textColor\">Couleur du texte:<\/label>\n                    <input type=\"color\" id=\"textColor\" value=\"#000000\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"gradientStart\">Couleur de d\u00e9but du gradient:<\/label>\n                    <input type=\"color\" id=\"gradientStart\" value=\"#FFB3BA\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"gradientEnd\">Couleur de fin du gradient:<\/label>\n                    <input type=\"color\" id=\"gradientEnd\" value=\"#FFDFBA\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"gradientAngle\">Angle du gradient:<\/label>\n                    <input type=\"range\" id=\"gradientAngle\" min=\"0\" max=\"360\" value=\"45\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"borderColor\">Couleur de la bordure:<\/label>\n                    <input type=\"color\" id=\"borderColor\" value=\"#FF69B4\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"borderWidth\">\u00c9paisseur de la bordure:<\/label>\n                    <input type=\"range\" id=\"borderWidth\" min=\"0\" max=\"10\" value=\"2\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"fontFamily\">Police de caract\u00e8res:<\/label>\n                    <select id=\"fontFamily\" onchange=\"updateButton()\">\n                        <option value=\"Arial, sans-serif\">Arial<\/option>\n                        <option value=\"'Helvetica Neue', Helvetica, sans-serif\">Helvetica<\/option>\n                        <option value=\"'Times New Roman', Times, serif\">Times New Roman<\/option>\n                        <option value=\"Georgia, serif\">Georgia<\/option>\n                        <option value=\"'Courier New', Courier, monospace\">Courier New<\/option>\n                        <option value=\"Verdana, Geneva, sans-serif\">Verdana<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"fontSize\">Taille de la police:<\/label>\n                    <input type=\"range\" id=\"fontSize\" min=\"12\" max=\"36\" value=\"18\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"fontWeight\">\u00c9paisseur de la police:<\/label>\n                    <select id=\"fontWeight\" onchange=\"updateButton()\">\n                        <option value=\"normal\">Normal<\/option>\n                        <option value=\"bold\">Gras<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"fontStyle\">Style de la police:<\/label>\n                    <select id=\"fontStyle\" onchange=\"updateButton()\">\n                        <option value=\"normal\">Normal<\/option>\n                        <option value=\"italic\">Italique<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"fontEffect\">Effet de police:<\/label>\n                    <select id=\"fontEffect\" onchange=\"updateButton()\">\n                        <option value=\"none\">Par d\u00e9faut<\/option>\n                        <option value=\"raised\">Sur\u00e9lev\u00e9<\/option>\n                        <option value=\"neon\">N\u00e9on<\/option>\n                        <option value=\"shadow\">Ombre<\/option>\n                        <option value=\"outline\">Contour<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"fontEffectIntensity\">Intensit\u00e9 de l'effet de police:<\/label>\n                    <input type=\"range\" id=\"fontEffectIntensity\" min=\"1\" max=\"10\" value=\"5\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"textTransform\">Transformation du texte:<\/label>\n                    <select id=\"textTransform\" onchange=\"updateButton()\">\n                        <option value=\"none\">Aucune<\/option>\n                        <option value=\"uppercase\">Majuscules<\/option>\n                        <option value=\"lowercase\">Minuscules<\/option>\n                        <option value=\"capitalize\">Premi\u00e8re lettre en majuscule<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"letterSpacing\">Espacement des lettres:<\/label>\n                    <input type=\"range\" id=\"letterSpacing\" min=\"-2\" max=\"10\" value=\"0\" step=\"0.5\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"iconSelect\">Ic\u00f4ne:<\/label>\n                    <select id=\"iconSelect\" onchange=\"updateButton()\">\n                        <option value=\"\">Aucune ic\u00f4ne<\/option>\n                        <option value=\"fas fa-heart\">C\u0153ur<\/option>\n                        <option value=\"fas fa-thumbs-up\">Pouce en l'air<\/option>\n                        <option value=\"fas fa-star\">\u00c9toile<\/option>\n                        <option value=\"fas fa-smile\">Sourire<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"iconColor\">Couleur de l'ic\u00f4ne:<\/label>\n                    <input type=\"color\" id=\"iconColor\" value=\"#000000\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"iconPosition\">Position de l'ic\u00f4ne:<\/label>\n                    <select id=\"iconPosition\" onchange=\"updateButton()\">\n                        <option value=\"left\">Gauche<\/option>\n                        <option value=\"right\">Droite<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"smileySelect\">Smiley:<\/label>\n                    <select id=\"smileySelect\" onchange=\"updateButton()\">\n                        <option value=\"\">Aucun smiley<\/option>\n                        <option value=\"\ud83d\ude0a\">\ud83d\ude0a Sourire<\/option>\n                        <option value=\"\ud83d\ude0d\">\ud83d\ude0d Amour<\/option>\n                        <option value=\"\ud83d\udc4d\">\ud83d\udc4d Pouce en l'air<\/option>\n                        <option value=\"\ud83c\udf89\">\ud83c\udf89 F\u00eate<\/option>\n                        <option value=\"\u2764\ufe0f\">\u2764\ufe0f C\u0153ur<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"smileyPosition\">Position du smiley:<\/label>\n                    <select id=\"smileyPosition\" onchange=\"updateButton()\">\n                        <option value=\"left\">Gauche<\/option>\n                        <option value=\"right\">Droite<\/option>\n                    <\/select>\n                <\/div>\n                <!-- Nouveaux param\u00e8tres de personnalisation -->\n                <div class=\"control-group\">\n                    <label for=\"boxShadow\">Ombre du bouton:<\/label>\n                    <input type=\"checkbox\" id=\"boxShadow\" onchange=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"hoverEffect\">Effet au survol:<\/label>\n                    <select id=\"hoverEffect\" onchange=\"updateButton()\">\n                        <option value=\"none\">Aucun<\/option>\n                        <option value=\"scale\">Agrandissement<\/option>\n                        <option value=\"rotate\">Rotation<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"animationDuration\">Dur\u00e9e de l'animation (ms):<\/label>\n                    <input type=\"number\" id=\"animationDuration\" min=\"100\" max=\"2000\" value=\"300\" oninput=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"textShadow\">Ombre du texte:<\/label>\n                    <input type=\"checkbox\" id=\"textShadow\" onchange=\"updateButton()\">\n                <\/div>\n                <div class=\"control-group\">\n                    <label for=\"borderStyle\">Style de bordure:<\/label>\n                    <select id=\"borderStyle\" onchange=\"updateButton()\">\n                        <option value=\"solid\">Solide<\/option>\n                        <option value=\"dashed\">Tirets<\/option>\n                        <option value=\"dotted\">Pointill\u00e9s<\/option>\n                        <option value=\"double\">Double<\/option>\n                    <\/select>\n                <\/div>\n            <\/div>\n            <div class=\"code-section\">\n                <textarea id=\"codeEditor\" spellcheck=\"false\" onclick=\"copyCode()\"><\/textarea>\n            <\/div>\n        <\/div>\n    <\/div>\n    <div id=\"preview\" class=\"main-content\">\n        <div class=\"preview-container\">\n            <a id=\"buttonPreview\" href=\"#\"><i id=\"buttonIcon\"><\/i><span id=\"buttonSmiley\"><\/span><span id=\"buttonTextPreview\">Like<\/span><\/a>\n        <\/div>\n    <\/div>\n<\/div>\n<div id=\"notification\" class=\"notification\">Code copi\u00e9 dans le presse-papiers !<\/div>\n\n<script>\nlet sidebarCollapsed = false;\n\nfunction toggleSidebar() {\n    const sidebar = document.getElementById('sidebar');\n    const toggleButton = document.getElementById('toggleSidebar');\n    const mainContent = document.getElementById('preview');\n    sidebarCollapsed = !sidebarCollapsed;\n    \n    if (sidebarCollapsed) {\n        sidebar.classList.add('collapsed');\n        mainContent.style.width = 'calc(100% - 50px)';\n    } else {\n        sidebar.classList.remove('collapsed');\n        mainContent.style.width = '';\n    }\n}\n\ndocument.getElementById('toggleSidebar').addEventListener('click', toggleSidebar);\n\nfunction updateButton() {\n    const buttonText = document.getElementById('buttonText').value;\n    const buttonURL = document.getElementById('buttonURL').value;\n    const buttonShape = document.getElementById('buttonShape').value;\n    const buttonWidth = document.getElementById('buttonWidth').value;\n    const buttonHeight = document.getElementById('buttonHeight').value;\n    const textColor = document.getElementById('textColor').value;\n    const gradientStart = document.getElementById('gradientStart').value;\n    const gradientEnd = document.getElementById('gradientEnd').value;\n    const gradientAngle = document.getElementById('gradientAngle').value;\n    const borderColor = document.getElementById('borderColor').value;\n    const borderWidth = document.getElementById('borderWidth').value;\n    const fontFamily = document.getElementById('fontFamily').value;\n    const fontSize = document.getElementById('fontSize').value;\n    const fontWeight = document.getElementById('fontWeight').value;\n    const fontStyle = document.getElementById('fontStyle').value;\n    const fontEffect = document.getElementById('fontEffect').value;\n    const fontEffectIntensity = document.getElementById('fontEffectIntensity').value;\n    const textTransform = document.getElementById('textTransform').value;\n    const letterSpacing = document.getElementById('letterSpacing').value;\n    const iconClass = document.getElementById('iconSelect').value;\n    const iconColor = document.getElementById('iconColor').value;\n    const iconPosition = document.getElementById('iconPosition').value;\n    const smiley = document.getElementById('smileySelect').value;\n    const smileyPosition = document.getElementById('smileyPosition').value;\n    const boxShadow = document.getElementById('boxShadow').checked;\n    const hoverEffect = document.getElementById('hoverEffect').value;\n    const animationDuration = document.getElementById('animationDuration').value;\n    const textShadow = document.getElementById('textShadow').checked;\n    const borderStyle = document.getElementById('borderStyle').value;\n\n    const buttonPreview = document.getElementById('buttonPreview');\n    const buttonTextPreview = document.getElementById('buttonTextPreview');\n    const buttonIcon = document.getElementById('buttonIcon');\n    const buttonSmiley = document.getElementById('buttonSmiley');\n\n    buttonTextPreview.textContent = buttonText;\n    buttonPreview.href = buttonURL;\n    buttonPreview.style.width = `${buttonWidth}px`;\n    buttonPreview.style.height = `${buttonHeight}px`;\n    buttonPreview.style.color = textColor;\n    buttonPreview.style.background = `linear-gradient(${gradientAngle}deg, ${gradientStart}, ${gradientEnd})`;\n    buttonPreview.style.border = `${borderWidth}px ${borderStyle} ${borderColor}`;\n    buttonPreview.style.fontFamily = fontFamily;\n    buttonPreview.style.fontSize = `${fontSize}px`;\n    buttonPreview.style.fontWeight = fontWeight;\n    buttonPreview.style.fontStyle = fontStyle;\n    buttonPreview.style.textTransform = textTransform;\n    buttonPreview.style.letterSpacing = `${letterSpacing}px`;\n    buttonPreview.style.display = 'flex';\n    buttonPreview.style.alignItems = 'center';\n    buttonPreview.style.justifyContent = 'center';\n    buttonPreview.style.cursor = 'pointer';\n    buttonPreview.style.transition = `all ${animationDuration}ms ease`;\n    buttonPreview.style.textDecoration = 'none';\n\n    \/\/ Apply font effect with intensity\n    const intensity = fontEffectIntensity \/ 2;\n    switch(fontEffect) {\n        case 'raised':\n            buttonPreview.style.textShadow = `${intensity}px ${intensity}px 0 ${borderColor}, -${intensity}px -${intensity}px 0 ${borderColor}, ${intensity}px -${intensity}px 0 ${borderColor}, -${intensity}px ${intensity}px 0 ${borderColor}`;\n            break;\n        case 'neon':\n            buttonPreview.style.textShadow = `0 0 ${intensity}px ${textColor}, 0 0 ${intensity * 2}px ${textColor}, 0 0 ${intensity * 3}px ${textColor}, 0 0 ${intensity * 4}px ${textColor}`;\n            break;\n        case 'shadow':\n            buttonPreview.style.textShadow = `${intensity}px ${intensity}px ${intensity}px rgba(0,0,0,0.5)`;\n            break;\n        case 'outline':\n            buttonPreview.style.webkitTextStroke = `${intensity \/ 5}px ${borderColor}`;\n            buttonPreview.style.webkitTextFillColor = textColor;\n            break;\n        default:\n            buttonPreview.style.textShadow = 'none';\n            buttonPreview.style.webkitTextStroke = 'initial';\n            buttonPreview.style.webkitTextFillColor = 'initial';\n    }\n\n    \/\/ Apply box shadow\n    if (boxShadow) {\n        buttonPreview.style.boxShadow = '0 4px 8px rgba(0, 0, 0, 0.2)';\n    } else {\n        buttonPreview.style.boxShadow = 'none';\n    }\n\n    \/\/ Apply text shadow\n    if (textShadow) {\n        buttonPreview.style.textShadow = '2px 2px 4px rgba(0, 0, 0, 0.3)';\n    } else if (fontEffect === 'none') {\n        buttonPreview.style.textShadow = 'none';\n    }\n\n    \/\/ Apply hover effect\n    buttonPreview.onmouseenter = () => {\n        switch(hoverEffect) {\n            case 'scale':\n                buttonPreview.style.transform = 'scale(1.1)';\n                break;\n            case 'rotate':\n                buttonPreview.style.transform = 'rotate(5deg)';\n                break;\n        }\n    };\n    buttonPreview.onmouseleave = () => {\n        buttonPreview.style.transform = 'none';\n    };\n\n    switch(buttonShape) {\n        case 'rectangle':\n            buttonPreview.style.borderRadius = '0';\n            break;\n        case 'rounded':\n            buttonPreview.style.borderRadius = '10px';\n            break;\n        case 'pill':\n            buttonPreview.style.borderRadius = '50px';\n            break;\n        case 'circle':\n            buttonPreview.style.borderRadius = '50%';\n            buttonPreview.style.width = `${buttonHeight}px`;\n            break;\n        case 'square':\n            buttonPreview.style.borderRadius = '0';\n            buttonPreview.style.width = `${buttonHeight}px`;\n            break;\n    }\n\n    if (iconClass) {\n        buttonIcon.className = iconClass;\n        buttonIcon.style.marginRight = iconPosition === 'left' ? '10px' : '0';\n        buttonIcon.style.marginLeft = iconPosition === 'right' ? '10px' : '0';\n        buttonIcon.style.order = iconPosition === 'left' ? '-1' : '1';\n        buttonIcon.style.color = iconColor;\n    } else {\n        buttonIcon.className = '';\n        buttonIcon.style.margin = '0';\n    }\n\n    if (smiley) {\n        buttonSmiley.textContent = smiley;\n        buttonSmiley.style.marginRight = smileyPosition === 'left' ? '10px' : '0';\n        buttonSmiley.style.marginLeft = smileyPosition === 'right' ? '10px' : '0';\n        buttonSmiley.style.order = smileyPosition === 'left' ? '-1' : '1';\n    } else {\n        buttonSmiley.textContent = '';\n        buttonSmiley.style.margin = '0';\n    }\n\n    updateCodeEditor(buttonText, buttonURL, buttonShape, buttonWidth, buttonHeight, textColor, gradientStart, gradientEnd, gradientAngle, borderColor, borderWidth, fontFamily, fontSize, fontWeight, fontStyle, fontEffect, fontEffectIntensity, textTransform, letterSpacing, iconClass, iconColor, iconPosition, smiley, smileyPosition, boxShadow, hoverEffect, animationDuration, textShadow, borderStyle);\n}\n\nfunction updateCodeEditor(buttonText, buttonURL, buttonShape, buttonWidth, buttonHeight, textColor, gradientStart, gradientEnd, gradientAngle, borderColor, borderWidth, fontFamily, fontSize, fontWeight, fontStyle, fontEffect, fontEffectIntensity, textTransform, letterSpacing, iconClass, iconColor, iconPosition, smiley, smileyPosition, boxShadow, hoverEffect, animationDuration, textShadow, borderStyle) {\n    const iconHtml = iconClass ? `<i class=\"${iconClass}\" style=\"color: ${iconColor}; margin-${iconPosition === 'left' ? 'right' : 'left'}: 10px; order: ${iconPosition === 'left' ? -1 : 1};\"><\/i>` : '';\n    const smileyHtml = smiley ? `<span style=\"margin-${smileyPosition === 'left' ? 'right' : 'left'}: 10px; order: ${smileyPosition === 'left' ? -1 : 1};\">${smiley}<\/span>` : '';\n\n    let borderRadius = '0';\n    let buttonSize = '';\n    switch(buttonShape) {\n        case 'rounded':\n            borderRadius = '10px';\n            break;\n        case 'pill':\n            borderRadius = '50px';\n            break;\n        case 'circle':\n            borderRadius = '50%';\n            buttonSize = `width: ${buttonHeight}px; height: ${buttonHeight}px;`;\n            break;\n        case 'square':\n            borderRadius = '0';\n            buttonSize = `width: ${buttonHeight}px; height: ${buttonHeight}px;`;\n            break;\n        default:\n            buttonSize = `width: ${buttonWidth}px; height: ${buttonHeight}px;`;\n    }\n\n    const intensity = fontEffectIntensity \/ 2;\n    let fontEffectStyle = '';\n    switch(fontEffect) {\n        case 'raised':\n            fontEffectStyle = `text-shadow: ${intensity}px ${intensity}px 0 ${borderColor}, -${intensity}px -${intensity}px 0 ${borderColor}, ${intensity}px -${intensity}px 0 ${borderColor}, -${intensity}px ${intensity}px 0 ${borderColor};`;\n            break;\n        case 'neon':\n            fontEffectStyle = `text-shadow: 0 0 ${intensity}px ${textColor}, 0 0 ${intensity * 2}px ${textColor}, 0 0 ${intensity * 3}px ${textColor}, 0 0 ${intensity * 4}px ${textColor};`;\n            break;\n        case 'shadow':\n            fontEffectStyle = `text-shadow: ${intensity}px ${intensity}px ${intensity}px rgba(0,0,0,0.5);`;\n            break;\n        case 'outline':\n            fontEffectStyle = `-webkit-text-stroke: ${intensity \/ 5}px ${borderColor}; -webkit-text-fill-color: ${textColor};`;\n            break;\n    }\n\n    let boxShadowStyle = boxShadow ? 'box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);' : '';\n    let textShadowStyle = textShadow && fontEffect === 'none' ? 'text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);' : '';\n\n    let hoverEffectStyle = '';\n    switch(hoverEffect) {\n        case 'scale':\n            hoverEffectStyle = 'transform: scale(1.1);';\n            break;\n        case 'rotate':\n            hoverEffectStyle = 'transform: rotate(5deg);';\n            break;\n    }\n\n    const code = `\n<a href=\"${buttonURL}\" class=\"custom-like-button\">\n    ${iconPosition === 'left' ? iconHtml : ''}\n    ${smileyPosition === 'left' ? smileyHtml : ''}\n    <span>${buttonText}<\/span>\n    ${smileyPosition === 'right' ? smileyHtml : ''}\n    ${iconPosition === 'right' ? iconHtml : ''}\n<\/a>\n\n<style>\n.custom-like-button {\n    ${buttonSize}\n    color: ${textColor};\n    background: linear-gradient(${gradientAngle}deg, ${gradientStart}, ${gradientEnd});\n    border: ${borderWidth}px ${borderStyle} ${borderColor};\n    border-radius: ${borderRadius};\n    font-family: ${fontFamily};\n    font-size: ${fontSize}px;\n    font-weight: ${fontWeight};\n    font-style: ${fontStyle};\n    ${fontEffectStyle}\n    ${textShadowStyle}\n    text-transform: ${textTransform};\n    letter-spacing: ${letterSpacing}px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    cursor: pointer;\n    transition: all ${animationDuration}ms ease;\n    text-decoration: none;\n    ${boxShadowStyle}\n}\n\n.custom-like-button:hover {\n    opacity: 0.8;\n    ${hoverEffectStyle}\n}\n<\/style>\n`;\n\n    document.getElementById('codeEditor').value = code;\n}\n\nfunction copyCode() {\n    const codeEditor = document.getElementById('codeEditor');\n    codeEditor.select();\n    document.execCommand('copy');\n    \n    const notification = document.getElementById('notification');\n    notification.style.display = 'block';\n    setTimeout(() => {\n        notification.style.display = 'none';\n    }, 3000);\n}\n\nupdateButton();\n<\/script>\n<\/body><\/html>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>G\u00e9n\u00e9rateur de Bouton \u00ab\u00a0Like\u00a0\u00bb Personnalisable Texte du bouton: URL du bouton: Forme du bouton: RectangleArrondiPiluleRondCarr\u00e9 Largeur du bouton: Hauteur du bouton: Couleur du texte: Couleur de d\u00e9but du gradient: Couleur de fin du gradient: Angle du gradient: Couleur de la bordure: \u00c9paisseur de la bordure: Police de caract\u00e8res: ArialHelveticaTimes New RomanGeorgiaCourier NewVerdana Taille de la [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":879,"comment_status":"open","ping_status":"open","sticky":false,"template":"elementor_header_footer","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[],"class_list":["post-877","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bouton","category-html-css-js-generator"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>G\u00e9n\u00e9rateur de Bouton &quot;Like&quot; Personnalisable en HTML, CSS, JS - Web Extractor<\/title>\n<meta name=\"description\" content=\"Cr\u00e9ez des boutons &quot;Like&quot; uniques avec HTML, CSS et JavaScript. Personnalisez facilement les couleurs, formes et effets.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"G\u00e9n\u00e9rateur de Bouton &quot;Like&quot; Personnalisable en HTML, CSS, JS - Web Extractor\" \/>\n<meta property=\"og:description\" content=\"Cr\u00e9ez des boutons &quot;Like&quot; uniques avec HTML, CSS et JavaScript. Personnalisez facilement les couleurs, formes et effets.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Extractor\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-03T14:33:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-03T15:18:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pacific-webtools.com\/web-extractor\/wp-content\/uploads\/2024\/09\/bouton-like-generateur.png\" \/>\n\t<meta property=\"og:image:width\" content=\"334\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/\",\"url\":\"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/\",\"name\":\"G\u00e9n\u00e9rateur de Bouton \\\"Like\\\" Personnalisable en HTML, CSS, JS - Web Extractor\",\"isPartOf\":{\"@id\":\"https:\/\/pacific-webtools.com\/web-extractor\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/pacific-webtools.com\/web-extractor\/wp-content\/uploads\/2024\/09\/bouton-like-generateur.webp\",\"datePublished\":\"2024-09-03T14:33:33+00:00\",\"dateModified\":\"2024-09-03T15:18:43+00:00\",\"author\":{\"@id\":\"https:\/\/pacific-webtools.com\/web-extractor\/#\/schema\/person\/0f95670ed0b3b265a488dae146fdda48\"},\"description\":\"Cr\u00e9ez des boutons \\\"Like\\\" uniques avec HTML, CSS et JavaScript. Personnalisez facilement les couleurs, formes et effets.\",\"breadcrumb\":{\"@id\":\"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/#primaryimage\",\"url\":\"https:\/\/pacific-webtools.com\/web-extractor\/wp-content\/uploads\/2024\/09\/bouton-like-generateur.webp\",\"contentUrl\":\"https:\/\/pacific-webtools.com\/web-extractor\/wp-content\/uploads\/2024\/09\/bouton-like-generateur.webp\",\"width\":334,\"height\":260,\"caption\":\"Exemple de Bouton \\\"Like\\\" Personnalisable\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/pacific-webtools.com\/web-extractor\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"G\u00e9n\u00e9rateur de Bouton \u00ab\u00a0Like\u00a0\u00bb Personnalisable en HTML, CSS, JS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/pacific-webtools.com\/web-extractor\/#website\",\"url\":\"https:\/\/pacific-webtools.com\/web-extractor\/\",\"name\":\"Web Extractor\",\"description\":\"Extracteur de Code\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/pacific-webtools.com\/web-extractor\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/pacific-webtools.com\/web-extractor\/#\/schema\/person\/0f95670ed0b3b265a488dae146fdda48\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/pacific-webtools.com\/web-extractor\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/94a5a2d7ac834dce40e1e25743dcb576?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/94a5a2d7ac834dce40e1e25743dcb576?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/pacific-webtools.com\/web-extractor\"],\"url\":\"https:\/\/pacific-webtools.com\/web-extractor\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"G\u00e9n\u00e9rateur de Bouton \"Like\" Personnalisable en HTML, CSS, JS - Web Extractor","description":"Cr\u00e9ez des boutons \"Like\" uniques avec HTML, CSS et JavaScript. Personnalisez facilement les couleurs, formes et effets.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/","og_locale":"fr_FR","og_type":"article","og_title":"G\u00e9n\u00e9rateur de Bouton \"Like\" Personnalisable en HTML, CSS, JS - Web Extractor","og_description":"Cr\u00e9ez des boutons \"Like\" uniques avec HTML, CSS et JavaScript. Personnalisez facilement les couleurs, formes et effets.","og_url":"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/","og_site_name":"Web Extractor","article_published_time":"2024-09-03T14:33:33+00:00","article_modified_time":"2024-09-03T15:18:43+00:00","og_image":[{"width":334,"height":260,"url":"https:\/\/pacific-webtools.com\/web-extractor\/wp-content\/uploads\/2024\/09\/bouton-like-generateur.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"admin","Dur\u00e9e de lecture estim\u00e9e":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/","url":"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/","name":"G\u00e9n\u00e9rateur de Bouton \"Like\" Personnalisable en HTML, CSS, JS - Web Extractor","isPartOf":{"@id":"https:\/\/pacific-webtools.com\/web-extractor\/#website"},"primaryImageOfPage":{"@id":"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/#primaryimage"},"image":{"@id":"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/#primaryimage"},"thumbnailUrl":"https:\/\/pacific-webtools.com\/web-extractor\/wp-content\/uploads\/2024\/09\/bouton-like-generateur.webp","datePublished":"2024-09-03T14:33:33+00:00","dateModified":"2024-09-03T15:18:43+00:00","author":{"@id":"https:\/\/pacific-webtools.com\/web-extractor\/#\/schema\/person\/0f95670ed0b3b265a488dae146fdda48"},"description":"Cr\u00e9ez des boutons \"Like\" uniques avec HTML, CSS et JavaScript. Personnalisez facilement les couleurs, formes et effets.","breadcrumb":{"@id":"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/#primaryimage","url":"https:\/\/pacific-webtools.com\/web-extractor\/wp-content\/uploads\/2024\/09\/bouton-like-generateur.webp","contentUrl":"https:\/\/pacific-webtools.com\/web-extractor\/wp-content\/uploads\/2024\/09\/bouton-like-generateur.webp","width":334,"height":260,"caption":"Exemple de Bouton \"Like\" Personnalisable"},{"@type":"BreadcrumbList","@id":"https:\/\/pacific-webtools.com\/web-extractor\/generateur-de-bouton-like-personnalisable-en-html-css-js\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pacific-webtools.com\/web-extractor\/"},{"@type":"ListItem","position":2,"name":"G\u00e9n\u00e9rateur de Bouton \u00ab\u00a0Like\u00a0\u00bb Personnalisable en HTML, CSS, JS"}]},{"@type":"WebSite","@id":"https:\/\/pacific-webtools.com\/web-extractor\/#website","url":"https:\/\/pacific-webtools.com\/web-extractor\/","name":"Web Extractor","description":"Extracteur de Code","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pacific-webtools.com\/web-extractor\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Person","@id":"https:\/\/pacific-webtools.com\/web-extractor\/#\/schema\/person\/0f95670ed0b3b265a488dae146fdda48","name":"admin","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/pacific-webtools.com\/web-extractor\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/94a5a2d7ac834dce40e1e25743dcb576?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/94a5a2d7ac834dce40e1e25743dcb576?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/pacific-webtools.com\/web-extractor"],"url":"https:\/\/pacific-webtools.com\/web-extractor\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/pacific-webtools.com\/web-extractor\/wp-json\/wp\/v2\/posts\/877"}],"collection":[{"href":"https:\/\/pacific-webtools.com\/web-extractor\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pacific-webtools.com\/web-extractor\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pacific-webtools.com\/web-extractor\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pacific-webtools.com\/web-extractor\/wp-json\/wp\/v2\/comments?post=877"}],"version-history":[{"count":7,"href":"https:\/\/pacific-webtools.com\/web-extractor\/wp-json\/wp\/v2\/posts\/877\/revisions"}],"predecessor-version":[{"id":886,"href":"https:\/\/pacific-webtools.com\/web-extractor\/wp-json\/wp\/v2\/posts\/877\/revisions\/886"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pacific-webtools.com\/web-extractor\/wp-json\/wp\/v2\/media\/879"}],"wp:attachment":[{"href":"https:\/\/pacific-webtools.com\/web-extractor\/wp-json\/wp\/v2\/media?parent=877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pacific-webtools.com\/web-extractor\/wp-json\/wp\/v2\/categories?post=877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pacific-webtools.com\/web-extractor\/wp-json\/wp\/v2\/tags?post=877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}