mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-07-26 07:33 pm

[dw-nonfree] New logged-in homepage

[commit: http://hg.dwscoalition.org/dw-nonfree/rev/c5361052caba]

http://bugs.dwscoalition.org/show_bug.cgi?id=445

Dreamwidth.org portion of the new logged in homepage.

Patch by [personal profile] afuna.

Files modified:
  • htdocs/index.bml
  • htdocs/js/homepage_loggedin.js
  • htdocs/stc/tropo/purple.css
  • htdocs/stc/tropo/red.css
--------------------------------------------------------------------------------
diff -r 76dcf5ea7490 -r c5361052caba htdocs/index.bml
--- a/htdocs/index.bml	Sun Jul 26 19:00:47 2009 +0000
+++ b/htdocs/index.bml	Sun Jul 26 19:32:57 2009 +0000
@@ -21,11 +21,6 @@ body<=
     use strict;
     use vars qw( %GET %POST $title $windowtitle $headextra @errors @warnings );
 
-    use DW::InviteCodes;
-
-    LJ::need_res( "js/tropo/homepage.js" );
-    LJ::need_res( "stc/tropo/homepage.css" );
-
     $windowtitle = $LJ::SITENAME;
 
     my $remote = LJ::get_remote();
@@ -41,18 +36,30 @@ HEAD
 HEAD
 
     if ( $remote ) {
-        # logged-in homepage goes here
-        my $readpage = $remote->journal_base . "/read";
-        $ret .= <<HTML;
-<p>The logged-in homepage hasn't been created yet, but here are some links to use while you're waiting:</p>
-<ul>
-<li><a href="$LJ::SITEROOT/update">Update Journal</a></li>
-<li><a href="$readpage">Reading Page</a></li>
-</ul>
-HTML
+        # logged-in homepage
+
+        use DW::Panel;
+
+        LJ::set_active_resource_group( 'jquery' );
+        LJ::need_res( { group => 'jquery' }, 'js/homepage_loggedin.js' );
+
+        my $panels = DW::Panel->init( u => $remote );
+        $ret .= '<div id="primary">';
+        $ret .= $panels->render_primary;
+        $ret .= '</div>';
+
+        $ret .= '<div id="secondary">';
+        $ret .= $panels->render_secondary;
+        $ret .= '</div><div class="clear-floats"></div>';
     }
     else {
         # logged-out homepage
+
+        use DW::InviteCodes;
+
+        LJ::need_res( "js/tropo/homepage.js" );
+        LJ::need_res( "stc/tropo/homepage.css" );
+
         $headextra .= <<HEAD;
 <script type="text/javascript">
     var ml = new Object();
diff -r 76dcf5ea7490 -r c5361052caba htdocs/js/homepage_loggedin.js
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/htdocs/js/homepage_loggedin.js	Sun Jul 26 19:32:57 2009 +0000
@@ -0,0 +1,24 @@
+/*
+
+  homepage_loggedin.js
+
+  JS source for the logged in home page.
+
+  Authors:
+       Afuna <coder.dw@afunamatata.com>
+
+  Copyright (c) 2009 by Dreamwidth Studios, LLC.
+
+  This program is free software; you may redistribute it and/or modify it under
+  the same terms as Perl itself.  For a copy of the license, please reference
+  'perldoc perlartistic' or 'perldoc perlgpl'.
+
+*/
+
+
+DW.whenPageLoaded( function() {
+    /**
+     *  Add appwidget-first class to first widgets in each column
+     */
+    $("#content > div > .panel:first-child").addClass("panel-first");
+} );
diff -r 76dcf5ea7490 -r c5361052caba htdocs/stc/tropo/purple.css
--- a/htdocs/stc/tropo/purple.css	Sun Jul 26 19:00:47 2009 +0000
+++ b/htdocs/stc/tropo/purple.css	Sun Jul 26 19:32:57 2009 +0000
@@ -276,14 +276,14 @@ a:active,
 }
 /* 2 column wide right sidebar */
 .layout-wide-right-sidebar #primary {
-    width: 53.333333em;
+    width: 65%;
     margin-right: 1.25em;
     float: left;
     padding: 0;
 }
 .layout-wide-right-sidebar #secondary {
     float: right;
-    width: 25.416667em;
+    width: 30%;
     margin: 0;
     padding: 0;
     padding-top: 0.5em;
@@ -300,61 +300,55 @@ a:active,
     margin: 0 0 0.166667em 0;
     overflow: hidden;
 }
+#content .panel .sidebar,
+#content .panel .contents,
+#content .panel .item,
+#content .panel .actions {
+    border-color: #ccc;
+}
 #content #primary .panel h2 {
     color: #3a155a;
-    height: 2em;
     line-height: 2em;
+    border-style: none;
     border-bottom: 1px solid #ccc;
     font: bold 1.5em/2 Arial, sans-serif;
 }
 #content #primary .panel p {
     clear: both;
 }
-#content #secondary .panel h3 {
+#content #secondary .panel h2 {
     color: #3a155a;
-    height: 30px;
     line-height: 30px;
+    border-style: none;
     border-bottom: 1px solid #ccc;
     font: bold 1.166667em/2.142857 Arial, sans-serif;
+}
+#content .panel .sidebar ul {
+     list-style: none;
+     margin-left: 0;
+}
+#content .panel ul {
+    list-style: circle;
+    margin-left: 2em;
 }
 /**
  * Panels have different styles for different content layouts
  */
 .layout-wide-right-sidebar #primary .panel .sidebar {
     float: left;
-    width: 12.5em;
+    width: 22%;
 }
 .layout-wide-right-sidebar #primary .panel .contents {
     float: left;
     padding-top: 6px;
     padding-left: 14px;
-    border-left: 1px solid #F3D2FC;
-    width: 39.583333em;
+    border-left: 1px solid #ccc;
+    width: 75%;
     line-height: 1.8;
 }
 .layout-wide-right-sidebar #secondary .panel .contents {
     margin: 0.5em 0;
     line-height: 1.8;
-}
-/**
- * Panels have unique IDs for CSS hooks
- */
-#panel-quick-update .sidebar p {
-    height: 3em;
-    line-height: 3em;
-}
-#panel-quick-update .contents label {
-    display: block;
-    width: 100%;
-    color: #3a155a;
-    font-weight: bold;
-}
-#panel-quick-update .contents input,
-#panel-quick-update .contents textarea {
-    width: 95%;
-}
-#panel-quick-update .contents textarea {
-    height: 120px;
 }
 /* panel-first class is added through js */
 #content .panel-first {
diff -r 76dcf5ea7490 -r c5361052caba htdocs/stc/tropo/red.css
--- a/htdocs/stc/tropo/red.css	Sun Jul 26 19:00:47 2009 +0000
+++ b/htdocs/stc/tropo/red.css	Sun Jul 26 19:32:57 2009 +0000
@@ -272,14 +272,14 @@ a:active,
 }
 /* 2 column wide right sidebar */
 .layout-wide-right-sidebar #primary {
-    width: 53.333333em;
+    width: 65%;
     margin-right: 1.25em;
     float: left;
     padding: 0;
 }
 .layout-wide-right-sidebar #secondary {
     float: right;
-    width: 25.416667em;
+    width: 30%;
     margin: 0;
     padding: 0;
     padding-top: 0.5em;
@@ -296,61 +296,55 @@ a:active,
     margin: 0 0 0.166667em 0;
     overflow: hidden;
 }
+#content .panel .sidebar,
+#content .panel .contents,
+#content .panel .item,
+#content .panel .actions {
+    border-color: #ccc;
+}
 #content #primary .panel h2 {
     color: #c1272d;
-    height: 2em;
     line-height: 2em;
+    border-style: none;
     border-bottom: 1px solid #ccc;
     font: bold 1.5em/2 Arial, sans-serif;
 }
 #content #primary .panel p {
     clear: both;
 }
-#content #secondary .panel h3 {
+#content #secondary .panel h2 {
     color: #c1272d;
-    height: 30px;
     line-height: 30px;
+    border-style: none;
     border-bottom: 1px solid #ccc;
     font: bold 1.166667em/2.142857 Arial, sans-serif;
+}
+#content .panel .sidebar ul {
+     list-style: none;
+     margin-left: 0;
+}
+#content .panel ul {
+    list-style: circle;
+    margin-left: 2em;
 }
 /**
  * Panels have different styles for different content layouts
  */
 .layout-wide-right-sidebar #primary .panel .sidebar {
     float: left;
-    width: 12.5em;
+    width: 22%;
 }
 .layout-wide-right-sidebar #primary .panel .contents {
     float: left;
     padding-top: 6px;
     padding-left: 14px;
     border-left: 1px solid #ccc;
-    width: 39.583333em;
+    width: 75%;
     line-height: 1.8;
 }
 .layout-wide-right-sidebar #secondary .panel .contents {
     margin: 0.5em 0;
     line-height: 1.8;
-}
-/**
- * Panels have unique IDs for CSS hooks
- */
-#panel-quick-update .sidebar p {
-    height: 3em;
-    line-height: 3em;
-}
-#panel-quick-update .contents label {
-    display: block;
-    width: 100%;
-    color: #c1272d;
-    font-weight: bold;
-}
-#panel-quick-update .contents input,
-#panel-quick-update .contents textarea {
-    width: 95%;
-}
-#panel-quick-update .contents textarea {
-    height: 120px;
 }
 /* panel-first class is added through js */
 #content .panel-first {
--------------------------------------------------------------------------------