La lluna d'avui a la teva web

Veure en un altre color de fons
Configuració

Mida (pixels)

Matís
Claredat

Opcions:

Utilitza aquesta opció només per a configurar amb CSS. Veure un exemple a Codepen

Llegenda

Llenguatge del text

Codi per enganxar a la teva web

Notes:
  1. Si vols pots configurar el DIV contenidor de la lluna en el teu full d'estils.
    Per exemple:
    #contain_moon{ background-color:gray; color:white; font-family:Arial; }
  2. La lluna fa clic al calendari lunar del mes. (No manipulis aquest link)
  3. Aquest giny (widget) no carrega scripts aliens al teu lloc pel que tampoc genera cookies.
  4. Idiomes de sortida disponibles del giny: Català ; Deutsch ; English ; Español ; Française ; Italiano ; Polski ; Português ; русский ; 中国 ;
  5. Veure un exemple a Codepen
  6. Aquest widget et dóna més

    Crea la funcio 'moon_widget_loaded' per obtenir la Lluna de tot el mes.

    Exemple:

    Veure exemple

    <div id="ex_moon_1" style="text-align:center"><!-- row 1 --></div> <div id="ex_moon_2" style="text-align:center"><!-- row 2 --></div> <script> function moon_widget_loaded(moon){ /* row 1 */ var html='<div>'+moon.nameMonth[moon.month]+' '+moon.year+'</div>' for (i=1;i<=moon.daysMonth;i++){ if (moon.phase[i].isPhaseLimit){ html+='<div style="display:inline-block;border:1px solid #cccccc;text-align:center;margin:2px;padding:0px 5px;vertical-align:top">' html+= moon.nameDay[moon.phase[i].dayWeek] +" "+i html+='<div>'+moon.phase[i].svg+'</div>' html+="<div>"+moon.phase[i].phaseName + "</div>" html+="</div>" } } document.getElementById("ex_moon_1").innerHTML=html /* row 2 */ html=""; var days =[1,15,moon.daysMonth] for (day in days){ i=days[day] html+='<div style="display:inline-block;border:1px solid #cccccc;text-align:center;margin:2px;padding:0px 5px;vertical-align:top">' html+= moon.nameDay[moon.phase[i].dayWeek] +" "+i html+='<div>'+moon.phase[i].svg+'</div>' html+="<div>"+moon.phase[i].phaseName + "</div>" if (!moon.phase[i].isPhaseLimit)html+=Math.round(moon.phase[i].lighting)+"%" html+="</div>" } document.getElementById("ex_moon_2").innerHTML=html } </script>

     

    Object moon
    • moon.month : Number → 0 (Gener) - 11 (Desembre)
    • moon.year : Number
    • moon.firstDayMonth : Number → 1 (Dilluns) - 7 (Diumenge)
    • moon.daysMonth : Number → 28 - 31
    • moon.nameDay : Array → ['Dilluns', 'Dimarts' ...]
    • moon.nameMonth : Array → ['Gener', 'Febrer' ...]
    • moon.phase [1 - moon.daysMonth ] : Object →
      • .phaseName : String
      • .isPhaseLimit : Boolean
      • .lighting : Number %
      • .timeEvent : String h:m:s
      • .dayWeek : Number → 0 (Dilluns) - 6 (Diumenge)
      • .svg : String svg image