]> err.no Git - sope/commitdiff
derived a layout from Nat!'s blog
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 22 Aug 2005 17:14:01 +0000 (17:14 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 22 Aug 2005 17:14:01 +0000 (17:14 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1061 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/samples/CoreDataBlog/MonthPage.wo/MonthPage.html
sope-appserver/samples/CoreDataBlog/MonthPage.wo/MonthPage.wod

index f1fe8e9013cd5f611697fc24d7a4444c709a4d43..ce880446471bac33ea8489933b8f93bf9fc4f60a 100644 (file)
@@ -4,6 +4,7 @@
     <title>SOPE CoreData Test: MonthPage</title>
 
     <style>
+/*
       table.calendar {
         border-left:   1px solid #AAAAAA;
         border-top:    1px solid #AAAAAA;
         font-style: italic;
         color:      #888888;
       }
+*/
+
+      /* Nat! blog */
+
+      div#content {
+        position:    absolute;
+        margin-left: 225px;
+      }
+      div#links {
+        width:   200px;
+        padding: 15px;
+      }
+
+      .date {
+        font-family:   palatino, georgia, times new roman, serif;
+        font-size:     large;
+        color:         #333;
+        border-bottom: 1px solid #999;
+        margin-bottom: 10px;
+        font-weight:bold;
+      }        
+      .blogbody {
+        font-family: palatino, georgia, verdana, arial, sans-serif;
+        color:       #333;
+        font-size:   small;
+        font-weight: normal;
+       background:  white;
+        line-height: 150%;
+      }
+      .posted { 
+        font-family:   verdana, arial, sans-serif; 
+        font-size:     x-small;
+        color:         black; 
+        margin-bottom: 25px;
+      }
+      .title {
+        font-family: palatino, georgia, times new roman, serif;
+        font-size: medium;
+        color: #666;
+       margin-bottom:10px;
+      }                        
+
+      /* Calendar */
+      .calendar {
+        font-family: verdana, arial, sans-serif;
+        color:       #666666;
+        font-size:   x-small;
+        line-height: 140%;
+        padding:     2px;
+      }
+      caption.calendarhead { 
+        font-family: palatino, georgia, times new roman, serif;
+        color:       #666600;
+        font-size:   small;
+        padding:     2px;
+        letter-spacing: .3em;
+        text-transform:uppercase;
+      }       
+
+      .side {
+        font-family: verdana, arial, sans-serif;
+        color:       #333333;
+        font-size:   x-small;
+        line-height: 140%;
+        padding:     2px;                            
+      }       
+      .sidetitle {
+        font-family: palatino, georgia, times new roman, serif;
+        color:       #666600;
+        font-size:   small;
+        padding:     2px;
+        margin-top:  30px;
+        letter-spacing: .3em;
+        text-transform: uppercase;               
+      }               
     </style>
   </head>
 
   <body>
-    <table class="calendar">
-      <tr>
-        <td class="calendar-title" colspan="7"><#MonthName/></td>
-      </tr>
-      <#Weeks>
-        <tr>
-          <#Week>
-            <#IsSameMonth>
-              <td><#Day/></td>
-            </#IsSameMonth>
-            <#IsOtherMonth>
-              <td class="calendar-othermonth"><#Day/></td>
-            </#IsOtherMonth>
-          </#Week>
-        </tr>
-      </#Weeks>
-    </table>
-
-
-    <h3>Posts</h3>
-    <#Posts>
-      <h4><#PostTitle/></h4>
-      <p><#PostBody/></p>
-    </#Posts>
+    <div id="banner">
+      <img src="http://www.mulle-kybernetik.com/weblog/images/nat-weblog-collage.jpg"
+           height="110" width="752" align="" border="0" hspace="0" vspace="0"
+          alt="Banner" title="" longdesc="" /><br />
+    </div>
+
+
+    <div id="content">
+
+      <div class="blog">
+        <#Posts>
+          <h2 class="date"><#PostDate/></h2> <!-- Note: MT groups by date -->
+
+          <div class="blogbody">
+            <h3 class="title"><#PostTitle/></h3>
+            <#PostBody/>
+
+            <div class="posted">
+              Posted by <#PostAuthor/> at <#PostTime/>.
+            </div>
+          </div>
+        </#Posts>
+      </div>
+
+    </div>
+
+
+    <div id="links">
+
+      <div class="calendar">
+        <table width="100%">
+          <caption class="calendarhead"><#CalMonthName/></caption>
+          <tr class="calendar">
+            <th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th>
+            <th>Fri</th><th>Sat</th><th>Sun</th>
+          </tr>
+          <#Weeks>
+            <tr class="calendar">
+              <#Week>
+                <#IsSameMonth>
+                  <td><#Day/></td>
+                </#IsSameMonth>
+                <#IsOtherMonth>
+                  <td class="calendar-othermonth"><#Day/></td>
+                </#IsOtherMonth>
+              </#Week>
+            </tr>
+          </#Weeks>
+        </table>
+      </div>
+
+
+      <div class="sidetitle">Search</div>
+      <div class="side">
+        Search this site:
+        add a form here and bind
+        to query match
+      </div>
+
+
+      <div class="sidetitle">Archives</div>
+      <div class="side">
+        impossible in an efficient way?
+        August 2005<br />
+        Juli 2005
+      </div>
+
+
+      <div class="sidetitle">Recent Entries</div>
+      <div class="side">
+        DG with limit=10 here,<br />
+        order by date
+      </div>
+    </div>
 
   </body>
 </html>
index 93d8ca53e2be6e5e795cc103b5dec7ce5e03b278..c3b3c94df12f6bfa7fe5a5359b808778bb5507aa 100644 (file)
@@ -5,6 +5,18 @@ Posts: WORepetition {
   item = post;
 }
 
+PostDate: WOString {
+  value          = post.creationDate;
+  valueWhenEmpty = "[no date]";
+  dateformat     = "%d.%m.%y";
+}
+
+PostTime: WOString {
+  value          = post.creationDate;
+  valueWhenEmpty = "[no time]";
+  dateformat     = "%H:%M";
+}
+
 PostTitle: WOString {
   value          = post.title;
   valueWhenEmpty = "[no title]";
@@ -13,13 +25,16 @@ PostBody: WOString {
   value          = post.body;
   valueWhenEmpty = "[no body]";
 }
+PostAuthor: WOString {
+  value = post.author.name;
+}
 
 
 // Calendar
 
-MonthName: WOString {
+CalMonthName: WOString {
   value      = date;
-  dateformat = "%B";
+  dateformat = "%B %Y";
 }
 
 Weeks: WORepetition {