color: rgb(255, 172, 0);
}
-#sone #sidebar {
- width: 200px;
- position: absolute;
+#sone #profile {
+ height: 80px;
}
#sone .profile-link {
}
#sone #main {
- margin-left: 200px;
- padding-left: 1em;
+ padding: 1em;
}
#sone .post {
#sone .post .status-line {
clear: both;
+ margin-top: 0.5ex;
font-size: 85%;
}
font-weight: bold;
}
-#sone input.createpost.default, input.reply-input.default {
+#sone input.status-input.default, input.reply-input.default {
color: #888;
}
}
});
}
+
+/* hide all the “create reply” forms until a link is clicked. */
+function addCommentLinks() {
+ $("#sone .post").each(function() {
+ postId = $(this).attr("id");
+ commentElement = (function(postId) {
+ var commentElement = $("<div>Comment</div>").addClass("show-reply-form").click(function() {
+ replyElement = $("#sone .post#" + postId + " .create-reply");
+ replyElement.removeClass("hidden");
+ replyElement.removeClass("light");
+ (function(replyElement) {
+ replyElement.find("input.reply-input").blur(function() {
+ if ($(this).hasClass("default")) {
+ replyElement.addClass("light");
+ }
+ }).focus(function() {
+ replyElement.removeClass("light");
+ });
+ })(replyElement);
+ replyElement.find("input.reply-input").focus();
+ });
+ return commentElement;
+ })(postId);
+ $(this).find(".create-reply").addClass("hidden");
+ $(this).find(".status-line .time").each(function() {
+ $(this).after(commentElement.clone(true));
+ });
+ });
+}
<script src="javascript/jquery-1.4.2.js" language="javascript"></script>
<script src="javascript/sone.js" language="javascript"></script>
- <div id="sidebar">
+ <script language="javascript">
+ $(document).ready(function() {
+ registerInputTextareaSwap("#sone #update-status .status-input", "What are you doing?");
+ });
+ </script>
+
+ <div id="main">
<div id="profile" class="<%ifnull currentSone>offline<%else>online<%/if>">
<div class="picture"></div>
<div class="nice-name profile-link"><a href="viewSone.html?sone=<% currentSone.id>"><% currentSone.niceName|html></a></div>
<div class="edit-profile-link"><a href="editProfile.html"><%= View.Head.ProfileLink.Text|l10n|html></a></div>
+ <%ifnull ! currentSone>
+ <%include include/updateStatus.html>
+ <%/if>
</div>
-
- <div id="links">
- </div>
-
- </div>
-
- <div id="main">
--- /dev/null
+<div id="update-status">
+ <form action="createPost.html" method="post">
+ <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+ <label for="text"><%= Page.Index.Label.Text|l10n|html></label>
+ <input class="status-input" name="text" />
+ <button type="submit"><%= Page.Index.Button.Post|l10n|html></button>
+ </form>
+</div>
<script language="javascript">
/* register input field/textarea swap. */
$(document).ready(function() {
- registerInputTextareaSwap("#sone input.createpost", "What are you doing?");
registerInputTextareaSwap("#sone input.reply-input", "Write a Reply…");
-
- /* hide all the “create reply” forms until a link is clicked. */
- $("#sone .post").each(function() {
- postId = $(this).attr("id");
- commentElement = (function(postId) {
- var commentElement = $("<div>Comment</div>").addClass("show-reply-form").click(function() {
- replyElement = $("#sone .post#" + postId + " .create-reply");
- replyElement.removeClass("hidden");
- replyElement.removeClass("light");
- (function(replyElement) {
- replyElement.find("input.reply-input").blur(function() {
- if ($(this).hasClass("default")) {
- replyElement.addClass("light");
- }
- }).focus(function() {
- replyElement.removeClass("light");
- });
- })(replyElement);
- replyElement.find("input.reply-input").focus();
- });
- return commentElement;
- })(postId);
- $(this).find(".create-reply").addClass("hidden");
- $(this).find(".status-line .time").each(function() {
- $(this).after(commentElement.clone(true));
- });
- });
+ addCommentLinks();
});
</script>
- <h1><%= Page.Index.Page.Title|l10n|insert needle="{sone}" key=currentSone.name|html></h1>
-
- <div>
- <form action="createPost.html" method="post">
- <div>
- <label for="text"><%= Page.Index.Label.Text|l10n|html></label>
- <input class="createpost" name="text" />
- </div>
- <div>
- <button type="submit"><%= Page.Index.Button.Post|l10n|html></button>
- </div>
- </form>
- </div>
-
<h1><%= Page.Index.PostList.Title|l10n|html></h1>
<div id="posts">