Prepare for larger HTML/CSS rework.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 18 Oct 2010 04:39:42 +0000 (06:39 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 18 Oct 2010 04:39:42 +0000 (06:39 +0200)
src/main/resources/i18n/sone.en.properties
src/main/resources/static/css/sone.css
src/main/resources/static/images/sone.png [new file with mode: 0644]
src/main/resources/templates/include/head.html [new file with mode: 0644]
src/main/resources/templates/include/tail.html [new file with mode: 0644]
src/main/resources/templates/include/viewPost.html
src/main/resources/templates/index.html

index 9b95cb8..9bc974d 100644 (file)
@@ -118,5 +118,7 @@ Page.NoPermission.Text.NoPermission=You tried to do something that you do not ha
 
 Page.Logout.Title=Logout - Sone
 
+View.Head.ProfileLink.Text=Your Profile
+
 View.Post.DeleteLink=Delete Post
 View.Post.SendReply=Post Reply!
index 4b9928d..ab4d8a5 100644 (file)
@@ -1,16 +1,48 @@
 /* Sone Main CSS File */
 
-#sone h1 {
-       font-family: inherit;
-       font-size: 200%;
+#sone {
+       width: 50em;
+       margin: auto;
+}
+
+#sone a {
+       color: inherit;
+       text-decoration: none;
+}
+
+#sone a:visited {
+       color: inherit;
+}
+
+#sone #sidebar {
+       width: 200px;
+       position: absolute;
+}
+
+#sone .profile-link {
        font-weight: bold;
+       color: #23e;
 }
 
-#sone .error label {
-       color: red;
+#sone #profile .picture {
+       float: left;
+}
+
+#sone .nice-name {
        font-weight: bold;
 }
 
+#sone #main {
+       margin-left: 200px;
+       padding-left: 1em;
+}
+
+#sone .post {
+       padding: 1ex 0px;
+       border-bottom: solid 1px #ccc;
+       margin-bottom: 1ex;
+}
+
 #sone .post .author {
        display: inline;
        font-weight: bold;
        display: inline;
 }
 
+#sone .post .time {
+       color: #666;
+       float: left;
+       font-size: 85%;
+}
+
+#sone .post .delete {
+       float: right;
+}
+
+#sone .post .replies {
+       clear: both;
+}
+
+#sone .post .reply {
+       clear: both;
+       background-color: #eef;
+       font-size: 85%;
+       margin: 1ex 0px;
+       padding: 1ex;
+}
+
+#sone .post .reply div {
+       font-size: inherit; /* or else fproxy's css rules will fuck us. */
+}
+
+#sone .post .reply .time {
+       float: none;
+       color: #666;
+       font-size: inherit;
+}
+
+#sone .post .create-reply {
+       clear: both;
+}
+
+#sone h1 {
+       font-family: inherit;
+       font-size: 200%;
+       font-weight: bold;
+}
+
+#sone .error label {
+       color: red;
+       font-weight: bold;
+}
+
 #sone input.createpost.default {
        color: #888;
-}
+}
\ No newline at end of file
diff --git a/src/main/resources/static/images/sone.png b/src/main/resources/static/images/sone.png
new file mode 100644 (file)
index 0000000..e69aad1
Binary files /dev/null and b/src/main/resources/static/images/sone.png differ
diff --git a/src/main/resources/templates/include/head.html b/src/main/resources/templates/include/head.html
new file mode 100644 (file)
index 0000000..3e16982
--- /dev/null
@@ -0,0 +1,19 @@
+<div id="sone">
+
+       <script src="javascript/jquery-1.4.2.js" language="javascript"></script>
+       <script src="javascript/sone.js" language="javascript"></script>
+
+       <div id="sidebar">
+               
+               <div id="profile">
+                       <div class="picture"><img src="images/sone.png" width="76" height="53" alt="Sone Logo" /></div>
+                       <div class="nice-name profile-link"><a href="viewSone.html?sone=<% currentSone.id>"><% currentSone.niceName|html></a></div>
+                       <div><a href="editProfile.html"><%= View.Head.ProfileLink.Text|l10n|html></a></div>
+               </div>
+               
+               <div id="links">
+               </div>
+               
+       </div>
+       
+       <div id="main">
diff --git a/src/main/resources/templates/include/tail.html b/src/main/resources/templates/include/tail.html
new file mode 100644 (file)
index 0000000..0e7d491
--- /dev/null
@@ -0,0 +1,2 @@
+       </div>
+</div>
index 5d44274..e0d1e83 100644 (file)
@@ -1,21 +1,27 @@
 <div class="post">
-       <div class="author"><a href="viewSone.html?sone=<% post.sone.id>"><% post.sone.niceName|html></a></div>
-       <div class="text"><% post.text|html></div>
+       <div>
+               <div class="author profile-link"><a href="viewSone.html?sone=<% post.sone.id>"><% post.sone.niceName|html></a></div>
+               <div class="text"><% post.text|html></div>
+       </div>
        <div class="time"><a href="viewPost.html?post=<% post.id>"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></a></div>
        <%if post.sone.isCurrent><div class="delete"><a href="deletePost.html?post=<% post.id>"><%= View.Post.DeleteLink|l10n|html></a></div><%/if>
-</div>
-<%foreach post.replies reply>
-       <div class="reply">
-               <div class="author"><a href="viewSone.html?sone=<% reply.sone.id>"><% reply.sone.niceName|html></a></div>
-               <div class="text"><% reply.text|html></div>
-               <div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
+       <div class="replies">
+               <%foreach post.replies reply>
+                       <div class="reply">
+                               <div>
+                                       <div class="author profile-link"><a href="viewSone.html?sone=<% reply.sone.id>"><% reply.sone.niceName|html></a></div>
+                                       <div class="text"><% reply.text|html></div>
+                               </div>
+                               <div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
+                       </div>
+               <%/foreach>
+               <div class="create-reply">
+                       <form method="post" action="createReply.html">
+                               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+                               <input type="hidden" name="post" value="<% post.id>" />
+                               <input type="text" name="text" value="" />
+                               <button type="submit"><%= View.Post.SendReply|l10n|html></button>
+                       </form>
+               </div>
        </div>
-<%/foreach>
-<div class="create-reply">
-       <form method="post" action="createReply.html">
-               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
-               <input type="hidden" name="post" value="<% post.id>" />
-               <input type="text" name="text" value="" />
-               <button type="submit"><%= View.Post.SendReply|l10n|html></button>
-       </form>
 </div>
index 3db413d..3a5bb70 100644 (file)
@@ -1,7 +1,4 @@
-<div id="sone">
-
-       <script src="javascript/jquery-1.4.2.js" language="javascript"></script>
-       <script src="javascript/sone.js" language="javascript"></script>
+<%include include/head.html>
 
        <script language="javascript">
                /* register input field/textarea swap. */
@@ -43,4 +40,5 @@
                <input id="addsone" type="text" name="request-uri" />
                <button type="submit"><%= Page.Index.AddSone.Button.Add|l10n|html></button>
        </form>
-</div>
+
+<%include include/tail.html>