Commits

hippyjim  committed 27f364e

added some more comments, plus neated up the demo page layout and added logo and favicon

  • Participants
  • Parent commits f9cab6b

Comments (0)

Files changed (7)

File src/favicon.ico

Added
New image

File src/index.php

 <!DOCTYPE html>
 <html lang="en">
   <head>
+    <link rel="shortcut icon" href="favicon.ico" >
     <meta charset="utf-8">
     <title>Kalendae Discordium - Example</title>
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <body>
   <div id="pageContainer">
       <h1>Kalendae Discordium - Example</h1>
-      <div id="pageBlurb">Below is an example usage for Kalendae Discordium and DiscDate. Feel free to use it in any way you see fit, as long as you include a link back to the BitBucket project for the original source. If you do anything interesting with it, please let me know via bitbucket.</div>
+      <div id="headerContainer">
+        <img src="webassets/discordipedia.png" width="135" height="136" />
+        <div id="pageBlurb">Below is an example usage for Kalendae Discordium and DiscDate. Feel free to use it in any way you see fit, as long as you include a link back to the BitBucket project for the original source. If you do anything interesting with it, please let me know via bitbucket.</div>
+      </div>
       <form id="kalForm">
             <div>
               <?php echo KalendaeDiscordium::monthPicker("thudMonth", "thudMonth", date('F')); ?>

File src/lib/DiscDate.php

         return $this->discWeekDay;
     }
 
+    /**
+     * Returns the discordian weekday number
+     * @return int
+     */
     public function getDiscWeekDayNum() {
         $weekdayNum = array_search($this->getDiscWeekDay(), self::$discWeekDays);
         return $weekdayNum;
         return self::$holydays;
     }
 
+    /**
+     * Returns the array of discordian weekdays
+     * @static
+     * @return array
+     */
     public static function getWeekdays() {
         return self::$discWeekDays;
     }
 
+    /**
+     * Returns the array of ordinal suffixes
+     * @static
+     * @return array
+     */
     public static function getOrdinals() {
         return self::$ordinals;
     }
 
+    /**
+     * Adds an ordinal suffix to the given number
+     * @static
+     * @param $number
+     * @return string
+     */
     public static function addOrdinal($number) {
         if (($number %100) >= 11 && ($number%100) <= 13) {
             $number.='th';

File src/lib/tmp.php

-<?php
-/**
- * Created by JetBrains PhpStorm.
- * User: jim
- * Date: 07/04/12
- * Time: 01:14
- */
-
-include('DiscDate.php');
-
-$discDate = DiscDate::createFromDisc(12, DiscDate::SEASON_CHAOS, 1167);
-echo $discDate->format('Y-m-d H:i:s') . " = " . $discDate->getThudYear() ."-" . $discDate->getThudMonth() . "-" . $discDate->getThudDay() . "\n";
-
-echo $discDate->getHolyDay()." " . $discDate->getDiscDay(true)."  " .$discDate->getDiscSeason()." (" . $discDate->getDiscSeasonNum() . ")" . $discDate->getDiscYear();
-echo "\n";
-echo $discDate->format('E q, R, X')."\n\n";
-

File src/webassets/discordipedia.png

Added
New image

File src/webassets/kalendaeDiscordiumLogo.png

Added
New image

File src/webassets/style.css

     margin: 0.5em;
 }
 
+#headerContainer {
+    padding: 10px
+}
+
+#headerContainer img {
+    left: 10px;
+    position: absolute;
+    top: 10px;
+}
+
 #pageBlurb {
-    margin: 1em;
     font-size: 0.8em;
+    margin: 1em 1em 1em 150px;
     text-align: left;
 }
 
     width: 100%;
 }
 
+#kalForm {
+    clear: both;
+}
+
 #chosenDate {
     text-align: center;
     margin: 10px;