emoji en css
This commit is contained in:
+18
-4
@@ -63,10 +63,22 @@ body > main {
|
|||||||
flex-grow: 2;
|
flex-grow: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reponse::before {
|
.accroche::before {
|
||||||
content: "😸 ";
|
content: "😸 ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.accroche:nth-of-type(10n+1)::before {
|
||||||
|
content: "😹 ";
|
||||||
|
}
|
||||||
|
|
||||||
|
.accroche:first-of-type::before {
|
||||||
|
content: "🐱 ";
|
||||||
|
}
|
||||||
|
|
||||||
|
.erreur::before {
|
||||||
|
content: "😿 ";
|
||||||
|
}
|
||||||
|
|
||||||
#bouton_reconnaissance_vocale {
|
#bouton_reconnaissance_vocale {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
@@ -100,7 +112,7 @@ body > main {
|
|||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main class="container" id="conversation">
|
<main class="container" id="conversation">
|
||||||
<p>🐱 Posez-moi toutes vos questions !</p>
|
<p class="accroche">Posez-moi toutes vos questions !</p>
|
||||||
</main>
|
</main>
|
||||||
<footer class="container">
|
<footer class="container">
|
||||||
<form id="formulaire" action="question.php" method="post" role="group">
|
<form id="formulaire" action="question.php" method="post" role="group">
|
||||||
@@ -206,7 +218,8 @@ formulaire.addEventListener('submit', async (e) => {
|
|||||||
paragraphe.setAttribute('aria-busy', 'false');
|
paragraphe.setAttribute('aria-busy', 'false');
|
||||||
|
|
||||||
paragraphe = document.createElement('p');
|
paragraphe = document.createElement('p');
|
||||||
paragraphe.innerHTML = "😿 Je ne suis pas disponible pour le moment. Merci de laisser un message !";
|
paragraphe.className = "erreur"
|
||||||
|
paragraphe.innerHTML = "Je ne suis pas disponible pour le moment. Merci de laisser un message !";
|
||||||
favicon.href = 'cat-tears.svg';
|
favicon.href = 'cat-tears.svg';
|
||||||
conversation.appendChild(paragraphe);
|
conversation.appendChild(paragraphe);
|
||||||
document.scrollingElement.scrollBy({top: window.visualViewport.height, behavior: 'smooth'});
|
document.scrollingElement.scrollBy({top: window.visualViewport.height, behavior: 'smooth'});
|
||||||
@@ -245,7 +258,8 @@ formulaire.addEventListener('submit', async (e) => {
|
|||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const paragraphe = document.createElement('p');
|
const paragraphe = document.createElement('p');
|
||||||
paragraphe.innerHTML = (nb_reponses % 5 ? '😸' : '😹') + ' Voulez-vous que je réponde à une autre question ?';
|
paragraphe.className = "accroche"
|
||||||
|
paragraphe.innerHTML = 'Voulez-vous que je réponde à une autre question ?';
|
||||||
favicon.href = (nb_reponses % 5 ? 'cat-troll.svg' : 'cat-lol.svg');
|
favicon.href = (nb_reponses % 5 ? 'cat-troll.svg' : 'cat-lol.svg');
|
||||||
conversation.appendChild(paragraphe);
|
conversation.appendChild(paragraphe);
|
||||||
document.scrollingElement.scrollBy({top: window.visualViewport.height, behavior: 'smooth'});
|
document.scrollingElement.scrollBy({top: window.visualViewport.height, behavior: 'smooth'});
|
||||||
|
|||||||
Reference in New Issue
Block a user