月相挂件
评分: 0+x

用法:添加以下代码即可
[[=]]
[[iframe http://lambdacore.wikidot.com/moon-phase/code/1 style="none" width="100%" height="250" width="330" scrolling="no"]]
[[/=]]

<!-- © wdisseny -->
<div id="contain_moon" style="text-align:center;color:#ffb961;">
  <div style="font-weight:">The Moon Today</div>
  <div style="margin-bottom:-15px;padding:30px;filter:drop-shadow(0 0 15px rgb(0,25,90))"></div>
  <div></div>
  <div style="font-size:small;color:#ffb961;"></div>
</div>
<script type="text/javascript">
  (function() {
    var d = new Date().getDate();
    var m = document.querySelectorAll("#contain_moon div");
    var a = new XMLHttpRequest();
    var url = "https://www.icalendar37.net/lunar/api/?lang=en&month=" + (new Date().getMonth() + 1) + "&year=" + (new Date().getFullYear()) + "&size=100&lightColor=rgb(228,215,134)&shadeColor=rgb(17,17,17)&t&LDZ=" + new Date(new Date().getFullYear(), new Date().getMonth(), 1) / 1000 + "";
    m[1].style.height = "100px";
    a.onreadystatechange = function() {
      if (a.readyState == 4 && a.status == 200) {
        var b = JSON.parse(a.responseText);
        m[1].innerHTML = b.phase[d].svg;
        if (typeof moon_widget_loaded == "function") moon_widget_loaded(b);
        m[2].innerHTML = b.phase[d].npWidget;
        var str=b.nextFullMoon
        m[3].innerHTML = "Next Full Moon:"+str.substring(221)
      }
    };
    a.open("GET", url, true);
    a.send()
  })()
</script>
除非特别注明,本页内容采用以下授权方式: Creative Commons Attribution-ShareAlike 3.0 License