.waving:before { content: attr(data-hover); font-size:84px; margin-top:150px; margin-right:150px; margin-left:150px; margin-bottom:150px; } .waving { animation-name: wave-animation; animation-duration: 3.0s; animation-iteration-count: infinite; transform-origin: 70% 70%; } @keyframes wave-animation { 0% { transform: rotate( 0.0deg) } 10% { tRansform: rotate(14.0deg) } 20% { trAnsform: rotate(-8.0deg) } 30% { traNsform: rotate(14.00deg) } 40% { tranSform: rotate(-4.0deg) } 50% { transForm: rotate(10.0deg) } 60% { transfOrm: rotate( 0.00deg) } 100% { transfoRm: rotate( 0.000deg) } } "; $precss=$cssstyle; function str_replace_once($needle, $replace, $haystack) { // thanks to https://stackoverflow.com/questions/1252693/using-str-replace-so-that-it-only-acts-on-the-first-match $newstring=$haystack; $pos = strpos($haystack, $needle); if ($pos !== false) { $newstring = substr_replace($haystack, $replace, $pos, strlen($needle)); } return $newstring; } function viacolon($instuff) { //21c // background: url("data:image/svg+xml,🎄🥎"); //. //13,14c //.box:after { // content: "Well I never"; //. //w $sprevln=""; $ldm=";"; $prevln=''; $inlns=explode("\n", $instuff); $lns=file('/tmp/emoji_animation.diff'); foreach ($lns as $line_num => $ln) { $lastinteresting=false; if (($ln == 'w' || $ln == "w\n") && strpos($prevln, "d") !== false && strlen($prevln) <= 10 && strpos(trim($prevln), ' ') === false && strpos($prevln, ",") !== false) { if (1 == 2) { $lastinteresting=true; } $fromi=explode(",", explode("d", $prevln)[0])[0]; $toi=explode(",", explode("d", $prevln)[0])[1]; for ($fromtoi=$fromi; $fromtoi<=$toi; $fromtoi++) { $instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + $fromtoi]), " ", $instuff); } } if (!$lastinteresting && $ln != '.' && $ln != 'w' && $ln != ".\n" && $ln != "w\n") { if (strpos($ln, ':') !== false && (strpos($ln, ';') !== false || strpos($ln, '{') !== false)) { if (strpos($ln, 'background:') === false) { $bg=explode(':', $ln); if (strpos($instuff, $bg[0] . ':') !== false) { $ldm=";"; if (strpos($bg[1], ";") === false && strpos($bg[1], "{") !== false) { $ldm="{"; } //if (strpos($bg[0], ".box") !== false) { file_put_contents('ax.ax', $instuff . "\n\n\n" . $bg[0] . ':' . explode($ldm, explode($bg[0] . ':', $instuff)[1])[0] . ':' . "\n\n\n" . $bg[0] . ':' . explode($ldm, explode($bg[0] . ':', file_get_contents('/tmp/emoji_animation.diff'))[1])[0] . "\n\n\n" . str_replace($bg[0] . ':' . explode($ldm, explode($bg[0] . ':', $instuff)[1])[0],$bg[0] . ':' . explode($ldm, explode($bg[0] . ':', file_get_contents('/tmp/emoji_animation.diff'))[1])[0],$instuff)); } $instuff=str_replace_once($bg[0] . ':' . explode($ldm, explode($bg[0] . ':', $instuff)[1])[0],$bg[0] . ':' . explode($ldm, explode($bg[0] . ':', file_get_contents('/tmp/emoji_animation.diff'))[1])[0],$instuff); } else if (strpos($prevln, "a") !== false) { $fromi=explode(",", explode("a", $prevln)[0])[0]; $toi=$fromi; $prefx=explode($inlns[-1 + explode("a", $prevln)[0]], $instuff)[0]; $instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + explode("a", $prevln)[0]]), str_replace("\n", "", $inlns[-1 + explode("a", $prevln)[0]]) . " " . $bg[0] . ':' . explode(';', explode($bg[0] . ':', file_get_contents('/tmp/emoji_animation.diff'))[1])[0] . '; ', $instuff); $inlns[-1 + explode("a", $prevln)[0]]=$inlns[-1 + explode("a", $prevln)[0]] . " " . $bg[0] . ':' . explode(';', explode($bg[0] . ':', file_get_contents('/tmp/emoji_animation.diff'))[1])[0] . '; '; if (('' . $toi) == '1') { //$instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + $toi + $fromi]), " ", $instuff); $sprevln=""; } else { $toi--; //$instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + $toi + $fromi]), " ", $instuff); $sprevln="" . $fromi . "a"; } } } } if (strlen($ln) <= 10 && str_replace("\n","", str_replace("d","", str_replace("c","", str_replace("a","", str_replace(",","", str_replace("0","", str_replace("1","", str_replace("2","", str_replace("3","", str_replace("4","", str_replace("5","", str_replace("6","", str_replace("7","", str_replace("8","", str_replace("9","",$ln))))))))))))))) == "") { if (str_replace("\n","", str_replace("c","", str_replace("a","", str_replace(",","", str_replace("0","", str_replace("1","", str_replace("2","", str_replace("3","", str_replace("4","", str_replace("5","", str_replace("6","", str_replace("7","", str_replace("8","", str_replace("9","",$ln)))))))))))))) != "") { $prevln=$ln; } } //if (strlen($ln) <= 10 && str_replace("\n","", str_replace("c","", str_replace("a","", str_replace(",","", str_replace("0","", str_replace("1","", str_replace("2","", str_replace("3","", str_replace("4","", str_replace("5","", str_replace("6","", str_replace("7","", str_replace("8","", str_replace("9","",$ln)))))))))))))) == "") { if (strlen($ln) <= 10 && str_replace("\n","", str_replace("d","", str_replace("c","", str_replace("A","", str_replace(",","", str_replace("0","", str_replace("1","", str_replace("2","", str_replace("3","", str_replace("4","", str_replace("5","", str_replace("6","", str_replace("7","", str_replace("8","", str_replace("9","",$ln))))))))))))))) == "") { $instuff=$instuff; } else if (strpos($prevln, "d") !== false && strlen($prevln) <= 10 && strpos(trim($prevln), ' ') === false && strpos($prevln, ",") === false) { $instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + explode("d", $prevln)[0]]), " ", $instuff); } else if (strpos($prevln, "a") !== false && strlen($prevln) <= 10 && strpos(trim($prevln), ' ') === false && strpos($prevln, ",") === false) { $fromi=explode(",", explode("a", $prevln)[0])[0]; $lnbig=""; $lni=(-1 + explode("a", $prevln)[0]); $toi=$fromi; $isok=true; while (('' . $toi) != '0' && $isok) { //$prefx=explode($inlns[-1 + explode("a", $prevln)[0]], $instuff)[0]; if ($ln == '.' || $ln == 'w' || $ln == ".\n" || $ln == "w\n") { $isok=false; $sprevln=$ln; //""; } else if ($ln != '.' && $ln != 'w' && $ln != ".\n" && $ln != "w\n") { //file_put_contents('/tmp/emoji_animation.zzz', $ln); //file_put_contents('/tmp/emoji_animation.yyy', $prevln); //$instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + explode("a", $prevln)[0]]), str_replace("\n", "", $inlns[-1 + explode("a", $prevln)[0]]) . " " . $ln, $instuff); //if (!file_exists('/tmp/emoji_animation.www')) { file_put_contents('/tmp/emoji_animation.www', $instuff); } $lnbig.=' ' . str_replace("\n", "", $ln) . ' '; //$inlns[-1 + explode("a", $prevln)[0]]=$inlns[-1 + explode("a", $prevln)[0]] . " " . $ln; } if (('' . $toi) == '1') { //$instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + $toi + $fromi]), " ", $instuff); //$instuff=str_replace_once(str_replace("\n", "", $ln), " ", $instuff); $sprevln=$ln; //""; $toi--; $ln=$lns[($fromi - $toi) + $line_num]; } else { $toi--; //$instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + $toi + $fromi]), " ", $instuff); //$instuff=str_replace_once(str_replace("\n", "", $ln), " ", $instuff); $sprevln="" . $fromi . "a"; $ln=$lns[($fromi - $toi) + $line_num]; } } $instuff=str_replace_once(str_replace("\n", "", $inlns[$lni]), str_replace("\n", "", $inlns[$lni]) . " " . $lnbig, $instuff); //$inlns[$lni]=$inlns[$lni] . " " . $lnbig; $sprevln=' '; } else if (strpos($prevln, "c") !== false && strlen($prevln) <= 10 && strpos(trim($prevln), ' ') === false && strpos($prevln, ",") === false) { $instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + explode("c", $prevln)[0]]), str_replace("\n", "", $ln), $instuff); } else if (strpos($prevln, "d") !== false && strlen($prevln) <= 10 && strpos(trim($prevln), ' ') === false && strpos($prevln, ",") !== false) { $fromi=explode(",", explode("d", $prevln)[0])[0]; $toi=explode(",", explode("d", $prevln)[0])[1]; for ($fromtoi=$fromi; $fromtoi<=$toi; $fromtoi++) { $instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + $fromtoi]), " ", $instuff); } //$instuff=str_replace(str_replace("\n", "", $inlns[-1 + $fromi]), " ", $instuff); //if ($fromi != $toi) { // $fromi++; // $sprevln="" . $fromi . "," . $toi . "d"; //} else { $sprevln=$ln; //} } else if (strpos($prevln, "c") !== false && strlen($prevln) <= 10 && strpos(trim($prevln), ' ') === false && strpos($prevln, ",") !== false) { $origln=$ln; $lnbig=''; $isokay=true; $fromi=explode(",", explode("c", $prevln)[0])[0]; $toi=explode(",", explode("c", $prevln)[0])[1]; $one=1; $ln=$lns[$one + $line_num]; while ($ln != '.' && $ln != 'w' && $ln != ".\n" && $ln != "w\n") { $lnbig.=' ' . str_replace("\n", "", $ln) . ' '; $one++; $ln=$lns[$one + $line_num]; } $instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + $fromi]), str_replace("\n", "", $origln) . $lnbig, $instuff); if ($fromi != $toi) { $fromi++; $sprevln="" . $fromi . "," . $toi . "c"; for ($fromtoi=$fromi; $fromtoi<=$toi; $fromtoi++) { $instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + $fromtoi]), " ", $instuff); } } else { $sprevln=$ln; } } if ($sprevln != "") { $prevln=$sprevln; $sprevln=""; } else { $prevln=$ln; } if (strpos($prevln, "d") !== false && strlen($prevln) <= 10 && strpos(trim($prevln), ' ') === false && strpos($prevln, ",") === false) { $instuff=str_replace_once(str_replace("\n", "", $inlns[-1 + explode("d", $prevln)[0]]), " ", $instuff); } } } return $instuff; } function command_exist($cmd) { $return = shell_exec(sprintf("which %s", escapeshellarg($cmd))); return !empty($return); } if (file_exists('/tmp/')) { if (!file_exists('/tmp/emoji_animation.before')) { file_put_contents('/tmp/emoji_animation.before', $cssstyle); } if (isset($_GET['reconstruct'])) { $emaila="  "; $smsa="  "; $onl=" onload=\" newwin(document.getElementById('box')); \""; $r=str_replace("+"," ",urldecode($_GET['reconstruct'])); if (strpos($r, "~!@") !== false) { $prewords=explode("~!@", $r)[0]; $r=substr($r, strlen($prewords . "~!@")); $words=str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace(" "," + ",str_replace("svg xml,","svg+xml,",$prewords))))); } file_put_contents('/tmp/emoji_animation.after', $precss); file_put_contents('/tmp/emoji_animation.diff', str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace(" "," + ",str_replace("svg xml,","svg+xml,",$r)))))); if (command_exist('ed')) { exec('ed - /tmp/emoji_animation.after < /tmp/emoji_animation.diff'); } else if (strpos($precss, 'background:') !== false && strpos(file_get_contents('/tmp/emoji_animation.diff'), 'background:') !== false) { file_put_contents('/tmp/emoji_animation.after', viacolon(str_replace('background:' . explode(';', explode('background:', $precss)[1])[0],'background:' . explode(';', explode('background:', file_get_contents('/tmp/emoji_animation.diff'))[1])[0],$precss))); } else { file_put_contents('/tmp/emoji_animation.after', viacolon($precss)); } $cssstyle=file_get_contents('/tmp/emoji_animation.after'); //unlink('/tmp/emoji_animation.after'); } } if (isset($_POST['email'])) { $myclick.="\n emis='" . str_replace('+',' ',urldecode($_POST['email'])) . "'; \n"; $myclick.="\n emailit(); /" . "/ document.getElementById('myemail').click(); \n"; } if (isset($_POST['sms'])) { $myclick.="\n smsis='" . str_replace('+',' ',urldecode($_POST['sms'])) . "'; \n"; $myclick.="\n smsit(); /" . "/ document.getElementById('mysms').click(); \n"; } if (isset($_GET['email'])) { $myclick.="\n emis='" . str_replace('+',' ',urldecode($_GET['email'])) . "'; \n"; $myclick.="\n emailit(); /" . "/ document.getElementById('myemail').click(); \n"; } if (isset($_GET['sms'])) { $myclick.="\n smsis='" . str_replace('+',' ',urldecode($_GET['sms'])) . "'; \n"; $myclick.="\n smsit(); /" . "/ document.getElementById('mysms').click(); \n"; } if (isset($_POST['css'])) { $was=$cssstyle; $cssstyle=str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace(" "," + ",str_replace("svg xml,","svg+xml,",str_replace("+"," ",urldecode($_POST['css']))))))); if (file_exists('/tmp/')) { if (file_exists('/tmp/emoji_animation.after')) { unlink('/tmp/emoji_animation.after'); } if (!file_exists('/tmp/emoji_animation.after')) { file_put_contents('/tmp/emoji_animation.after', $cssstyle); } if ($was == $cssstyle) { file_put_contents('/tmp/emoji_animation.diff', 'w'); $reconstruct=('?reconstruct=' . urlencode(file_get_contents('/tmp/emoji_animation.diff'))); } else { $emaila="  "; $smsa="  "; exec('diff --strip-trailing-cr -b -e /tmp/emoji_animation.before /tmp/emoji_animation.after > /tmp/emoji_animation.diff'); if (file_exists('/tmp/emoji_animation.diff')) { file_put_contents('/tmp/emoji_animation.diff', str_replace("\r","",file_get_contents('/tmp/emoji_animation.diff')) . "w\n"); $reconstruct=('?reconstruct=' . urlencode(file_get_contents('/tmp/emoji_animation.diff'))); } } } } else if (isset($_GET['css'])) { $was=$cssstyle; $cssstyle=str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace(" "," + ",str_replace("svg xml,","svg+xml,",str_replace("+"," ",urldecode($_GET['css']))))))); if (file_exists('/tmp/')) { if (file_exists('/tmp/emoji_animation.after')) { unlink('/tmp/emoji_animation.after'); } if (!file_exists('/tmp/emoji_animation.after')) { file_put_contents('/tmp/emoji_animation.after', $cssstyle); $reconstruct=('?reconstruct=' . urlencode(file_get_contents('/tmp/emoji_animation.diff'))); } if ($was == $cssstyle) { file_put_contents('/tmp/emoji_animation.diff', 'w'); } else { $emaila="  "; $smsa="  "; exec('diff --strip-trailing-cr -b -e /tmp/emoji_animation.before /tmp/emoji_animation.after > /tmp/emoji_animation.diff'); if (file_exists('/tmp/emoji_animation.diff')) { file_put_contents('/tmp/emoji_animation.diff', str_replace("\r","",file_get_contents('/tmp/emoji_animation.diff')) . "w\n"); $reconstruct=('?reconstruct=' . urlencode(file_get_contents('/tmp/emoji_animation.diff'))); } } } } if (isset($_POST['words'])) { $words=str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace(" "," + ",str_replace("svg xml,","svg+xml,",str_replace("+"," ",urldecode($_POST['words']))))))); if ($words != "Hi") { $reconstruct=str_replace(('?reconstruct='),('?reconstruct=') . urlencode($words . '~!@'), $reconstruct); $emaila="  "; $smsa="  "; } } else if (isset($_GET['words'])) { $words=str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace("\n + ","\n",str_replace(" "," + ",str_replace("svg xml,","svg+xml,",str_replace("+"," ",urldecode($_GET['words']))))))); if ($words != "Hi") { $reconstruct=str_replace(('?reconstruct='),('?reconstruct=') . urlencode($words . '~!@'), $reconstruct); $emaila="  "; $smsa="  "; } } else if (!isset($_GET['reconstruct'])) { if (file_exists('emoji_animation.htm')) { header('Location: ' . str_replace(":80/","/",str_replace(":443/","/","http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . "" . str_replace('.php','.htm',$_SERVER['REQUEST_URI'])))); exit; } } if ($reconstruct != '') { $emaila="  "; $smsa="  "; } if (1 == 2 && $myclick != "" && $reconstruct != "") { echo ""; } else { echo " Emoji Animation - RJM Programming - May, 2022 ... thanks to https://dev.to/anthonyjdella/how-to-animate-an-emoji-with-css-5eb9 " . $cssstyle . "
'); } this.innerHTML=isih; } \">" . str_replace("\n", "
", $words) . "

Emoji Animation Design" . $emaila . $smsa . "

RJM Programming - May, 2022

Thanks to How to Animate an Emoji with CSS

Words CSS
"; } ?>