From a11956e860b67948645011c02fc2128a847e8ccc Mon Sep 17 00:00:00 2001 From: Scott Tolksdorf Date: Tue, 12 Jan 2016 13:51:52 -0500 Subject: [PATCH] Adding in a preview and share id to admin --- client/admin/homebrewAdmin/homebrewAdmin.jsx | 9 +++++- client/admin/homebrewAdmin/homebrewAdmin.less | 29 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/client/admin/homebrewAdmin/homebrewAdmin.jsx b/client/admin/homebrewAdmin/homebrewAdmin.jsx index 0bb388c88..2ca9dd096 100644 --- a/client/admin/homebrewAdmin/homebrewAdmin.jsx +++ b/client/admin/homebrewAdmin/homebrewAdmin.jsx @@ -18,12 +18,18 @@ var HomebrewAdmin = React.createClass({ return {brew.editId} + {brew.shareId} {Moment(brew.createdAt).fromNow()} {Moment(brew.updatedAt).fromNow()} {Moment(brew.lastViewed).fromNow()} {brew.views} - view + + view +
+ {brew.text.slice(0, 500)} +
+ @@ -39,6 +45,7 @@ var HomebrewAdmin = React.createClass({ Edit Id + Share Id Created At Last Updated Last Viewed diff --git a/client/admin/homebrewAdmin/homebrewAdmin.less b/client/admin/homebrewAdmin/homebrewAdmin.less index 19239d846..4b58e0a11 100644 --- a/client/admin/homebrewAdmin/homebrewAdmin.less +++ b/client/admin/homebrewAdmin/homebrewAdmin.less @@ -18,6 +18,35 @@ min-width: 100px; text-align: center; padding: 10px; + + &.preview{ + position: relative; + + &:hover{ + .content{ + display: block; + } + } + + + .content{ + font-family: monospace; + text-align: left; + padding : 30px; + display: none; + position: absolute; + top : 100%; + left: 0px; + width : 300px; + max-height : 500px; + background-color: white; + z-index : 1000; + pointer-events: none; + } + + + + } } }