404.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * The template for displaying 404 pages (not found).
  4. *
  5. * @link https://codex.wordpress.org/Creating_an_Error_404_Page
  6. *
  7. * @package Akina
  8. */
  9. ?>
  10. <html <?php language_attributes();
  11. add_action('wp_head',function(){
  12. wp_dequeue_style('wp-block-library');
  13. wp_dequeue_style('wp-block-library-theme');
  14. wp_dequeue_style('entry-content');
  15. },5);
  16. ?>>
  17. <head>
  18. <meta charset="<?php bloginfo('charset'); ?>">
  19. <meta name="viewport" content="width=device-width, initial-scale=1">
  20. <link rel="shortcut icon" href="<?php echo iro_opt('favicon_link', ''); ?>" />
  21. <link rel="stylesheet" href="<?= $shared_lib_basepath ?>/css/404_lib.css" type="text/css" media="all"/>
  22. <?php wp_head(); ?>
  23. <?php
  24. /* <script>
  25. var the_url=window.location.href;
  26. var the_dom="<?php echo str_replace("http://", "", str_replace("https://", "", get_site_url())); ?>";
  27. var no_report = false;
  28. if (the_dom!= '2heng.xin') {
  29. no_report = true;
  30. }
  31. var the_ua=navigator.userAgent;
  32. var the_ref=document.referrer;
  33. function httpGet(theUrl) {
  34. var xmlHttp = new XMLHttpRequest();
  35. xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
  36. xmlHttp.send( null );
  37. return xmlHttp.responseText;
  38. }
  39. var report_url = "https://api.mashiro.top/count/404/?" + "url="+the_url+"&ua="+the_ua+"&ref="+the_ref;
  40. if (!no_report) httpGet(report_url);
  41. </script> */
  42. ?>
  43. </head>
  44. <body <?php body_class(); ?>>
  45. <section class="error-404 not-found">
  46. <div class="error-img">
  47. <div class="anim-icon" id="404" style="height: 66%;"></div>
  48. </div>
  49. <div class="err-button back">
  50. <a id="golast" href=javascript:history.go(-1);><?php _e('return to previous page', 'sakurairo');/*返回上一页*/ ?></a>
  51. <a id="gohome" href="<?php bloginfo('url'); ?>"><?php _e('return to home page', 'sakurairo');/*返回主页*/ ?></a>
  52. </div>
  53. <div style="display:block; width:284px;margin: auto;">
  54. <p style="margin-bottom: 1em;margin-top: 1.5em;text-align: center;font-size: 15px;"><?php _e('Don\'t worry, search in site?', 'sakurairo');/*别急,试试站内搜索?*/ ?></p>
  55. <form class="s-search" method="get" action="/" role="search">
  56. <i class="iconfont icon-search" style="bottom: 9px;left: 15px;"></i>
  57. <input class="text-input" style="padding: 8px 20px 8px 46px;" type="search" name="s" placeholder="<?php _e('Search...', 'akina') ?>" required>
  58. </form>
  59. </div>
  60. </section>
  61. <script src="<?php echo $shared_lib_basepath . '/js/anf.js' ?>" type="text/javascript"></script>
  62. </body>