From: David ‘Bombe’ Roden Date: Sun, 19 Jun 2011 11:09:43 +0000 (+0200) Subject: Add Sone context menu when hovering over avatar. X-Git-Tag: 0.6.6^2~52^2~7 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=61ee54ddb663a3faf4a9c125a07d89dc3940e1f5;p=Sone.git Add Sone context menu when hovering over avatar. --- diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index 3610afc..53faca0 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -235,6 +235,7 @@ View.Sone.Status.Downloading=This Sone is currently being downloaded. View.Sone.Status.Inserting=This Sone is currently being inserted. View.Post.UnknownAuthor=(unknown) +View.Post.WebOfTrustLink=web of trust profile View.Post.Permalink=link post View.Post.PermalinkAuthor=link author View.Post.Bookmarks.PostIsBookmarked=Post is bookmarked, click to remove from bookmarks diff --git a/src/main/resources/static/css/sone.css b/src/main/resources/static/css/sone.css index 1cc26eb..bf09065 100644 --- a/src/main/resources/static/css/sone.css +++ b/src/main/resources/static/css/sone.css @@ -251,6 +251,29 @@ textarea { border-bottom: none; } +#sone .post .sone-post-menu { + position: absolute; + top: 0; + left: -1ex; + padding: 1ex 1ex; + margin: -1px -1px; + display: none; + background-color: rgb(255, 255, 224); + border: solid 1px rgb(0, 0, 0); + z-index: 1; +} + +#sone .post .sone-post-menu .avatar { + position: absolute; + margin-right: 1ex; +} + +#sone .post .sone-post-menu .inner-menu { + margin-left: 64px; + padding-left: 1ex; + min-height: 64px; +} + #sone .post > .avatar { position: absolute; } @@ -266,6 +289,10 @@ textarea { font-weight: bold; } +#sone .post .author-wot-link { + font-size: 90%; +} + #sone .post .text, #sone .post .raw-text { display: inline; white-space: pre-wrap; diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index d6c83ae..0e3df51 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -802,6 +802,14 @@ function ajaxifyPost(postElement) { /* hide reply input field. */ $(postElement).find(".create-reply").addClass("hidden"); + + /* show Sone menu when hovering over the avatar. */ + $(postElement).find(".avatar").mouseover(function() { + $(".sone-post-menu", postElement).mouseleave(function() { + $(this).fadeOut(); + }).fadeIn(); + return false; + }); } /** diff --git a/src/main/resources/templates/include/viewPost.html b/src/main/resources/templates/include/viewPost.html index b451f2b..d0005c9 100644 --- a/src/main/resources/templates/include/viewPost.html +++ b/src/main/resources/templates/include/viewPost.html @@ -3,6 +3,16 @@ +
+ + Avatar Image + +
<%if post.loaded> Avatar Image