Add identifiers to chat embed divs
This commit is contained in:
17
client/less/chat.less
Normal file
17
client/less/chat.less
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
.gitter-chat-embed {
|
||||||
|
z-index: 100;
|
||||||
|
position: fixed;
|
||||||
|
|
||||||
|
top: 0;
|
||||||
|
left: 60%;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
transition: transform 0.3s cubic-bezier(0.16, 0.22, 0.22, 1.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
.gitter-chat-embed.is-collapsed:not(.is-loading) {
|
||||||
|
transform: translateX(110%);
|
||||||
|
}
|
@ -1063,3 +1063,5 @@ code {
|
|||||||
transform: rotate(0deg);
|
transform: rotate(0deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@import "chat.less";
|
||||||
|
@ -21,9 +21,15 @@ main = (function(main) {
|
|||||||
main.chat.GitterChat = e.detail.Chat;
|
main.chat.GitterChat = e.detail.Chat;
|
||||||
|
|
||||||
main.chat.createHelpChat = function(room, helpChatBtnClass) {
|
main.chat.createHelpChat = function(room, helpChatBtnClass) {
|
||||||
|
|
||||||
|
$('body').append(
|
||||||
|
'<aside id="chat-embed-help" class="gitter-chat-embed is-collapsed" />'
|
||||||
|
);
|
||||||
|
|
||||||
main.chat.helpChat = new main.chat.GitterChat({
|
main.chat.helpChat = new main.chat.GitterChat({
|
||||||
room: room,
|
room: room,
|
||||||
activationElement: document.createElement('div')
|
activationElement: false,
|
||||||
|
targetElement: $('#chat-embed-help')
|
||||||
});
|
});
|
||||||
|
|
||||||
$(helpChatBtnClass).on('click', function() {
|
$(helpChatBtnClass).on('click', function() {
|
||||||
@ -31,13 +37,17 @@ main = (function(main) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$('body').append(
|
||||||
|
'<aside id="chat-embed-main" class="gitter-chat-embed is-collapsed" />'
|
||||||
|
);
|
||||||
|
|
||||||
main.chat.mainChat = new main.chat.GitterChat({
|
main.chat.mainChat = new main.chat.GitterChat({
|
||||||
room: 'freecodecamp/freecodecamp',
|
room: 'freecodecamp/freecodecamp',
|
||||||
activationElement: document.createElement('div')
|
activationElement: false,
|
||||||
|
targetElement: $('#chat-embed-main')
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#nav-chat-btn').on('click', function() {
|
$('#nav-chat-btn').on('click', function() {
|
||||||
console.log('Create');
|
|
||||||
if (!main.chat.isOpen) {
|
if (!main.chat.isOpen) {
|
||||||
|
|
||||||
main.chat.mainChat.toggleChat(true);
|
main.chat.mainChat.toggleChat(true);
|
||||||
|
@ -79,6 +79,7 @@ var paths = {
|
|||||||
],
|
],
|
||||||
|
|
||||||
less: './client/less/main.less',
|
less: './client/less/main.less',
|
||||||
|
lessFiles: './client/less/*.less',
|
||||||
|
|
||||||
manifest: 'server/manifests/',
|
manifest: 'server/manifests/',
|
||||||
|
|
||||||
@ -392,7 +393,7 @@ var watchDependents = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
gulp.task('watch', watchDependents, function() {
|
gulp.task('watch', watchDependents, function() {
|
||||||
gulp.watch(paths.less, ['less']);
|
gulp.watch(paths.lessFiles, ['less']);
|
||||||
gulp.watch(paths.js, ['js']);
|
gulp.watch(paths.js, ['js']);
|
||||||
gulp.watch(paths.challenges, ['test-challenges']);
|
gulp.watch(paths.challenges, ['test-challenges']);
|
||||||
gulp.watch(paths.js, ['js', 'dependents']);
|
gulp.watch(paths.js, ['js', 'dependents']);
|
||||||
|
Reference in New Issue
Block a user