-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] user private gitter message iframe #13
Comments
little example var css2 = csjs`
.chatbox {
height: 400px;
width: 200px;
border: 1px dotted black;
}
.iframe {
height: 300px;
width: 200px;
transform: scale(0.7);
}
`
function makeGitterURL (username) {
return `https://gitter.im/${username}/~embed`
}
function makeGitterChatbox (profile) {
return bel`
<div class=${css2.chatbox}>
<h1> ${profile.name} </h1>
<iframe class=${css2.iframe} src=${makeGitterURL(profile.username)}></iframe>
</div>
`
}
var exampleProfile = {
name: 'nina',
username: 'ninabreznik'
}
var x = makeGitterChatbox(exampleProfile)
document.body.appendChild(x) |
There is gitter message iframe which i already combined some color idea from Lou |
sweet. so maybe this needs now another module that would combine it with the profile card or something, but i saw that you want to give the profile card a try. Do you have an idea how to combine them? Also - there might need to be additional styling in order to make the chat look more usable. It's not too important, we can improve this in the end, but yeah, would be sweet if it was a bit smaller so people could read more easily whats going on |
OK~I could try it |
I shrank the whole thing by changing the width&height. ( Because I failed to deal with problems with positioning of .chatbox { transform: scale(0.5); } , I tried another way by changing the width&height &found it could work )
I failed to move items from front side to back side** I also failed to create a area to put in the gitterChatBox
(A.) does a third component mean that add a new function to put in the code of profileCard?
or
|
Your link doesnt work for me, but the picture with front and back side looks good to me as a first iteration :-) The code how you use the "new module" could look like this var chatprofilecard = require('chat-profile-card')
var user = require('./userprofile.json')
var el = chatprofilecard(user)
document.body.appendChild(el) and you would define it like so: var bel = require('bel')
var csjs = require('csjs-inject')
var chatbox = require('chatbox')
var profilecard = require('profilecard')
module.export = chatprofilecard
var css = css`
.chatprofilecard { margin: 0; }
.frontside { color: red; }
.backside { color: blue; }
`
function chatprofilecard (json) {
var frontside = profilecard(json)
var backside = chatbox(json)
var isFrontside = true
var el = bel`
<div class=${css.chatprofilecard} onclick=${toggle}>
${frontside}
</div>`
return el
function toggle (event) {
isFrontside = !isFrontside
el.innerHTML = ''
el.appendChild(isFrontSide ? frontside : backside)
}
} |
...but the above one changes does that make sense? |
if the user profile card is expanded or flipped, there should be a way to send a private gitter message to the user, by embedding it in a small iframe in the user profile card.
https://gitter.im/{{username}}/~embed
example:
https://gitter.im/serapath/~embed
The text was updated successfully, but these errors were encountered: