Skip to content

Commit

Permalink
some style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
moinism committed Jul 6, 2017
1 parent d3d9a39 commit 2086886
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 105 deletions.
6 changes: 3 additions & 3 deletions build/botui.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* botui 0.2.1
* botui 0.2.2
* A JS library to build the UI for your bot
* https://botui.moin.im
* https://botui.org
*
* Copyright 2017, Moin Uddin (https://moin.im)
* Released under the MIT license.
Expand Down Expand Up @@ -99,7 +99,7 @@
}

var _botuiComponent = {
template: '<div class=\"botui botui-container\" v-botui-container><div class=\"botui-messages-container\"><div v-for=\"msg in messages\" v-botui-scroll><transition name=\"slide-fade\"><div class=\"botui-message\" v-if=\"msg.visible\" :class=\"msg.cssClass\"><div :class=\"[{human: msg.human, \'botui-message-content\': true}, msg.type]\"><span v-if=\"msg.type == \'text\'\" v-text=\"msg.content\" v-botui-markdown></span> <iframe v-if=\"msg.type == \'embed\'\" :src=\"msg.content\" frameborder=\"0\" allowfullscreen></iframe></div></div></transition></div></div><div class=\"botui-actions-container\"><transition name=\"slide-fade\"><div v-if=\"action.show\" v-botui-scroll><form v-if=\"action.type == \'text\'\" class=\"botui-actions-text\" @submit.prevent=\"handle_action_text()\" :class=\"action.cssClass\"><i v-if=\"action.text.icon\" class=\"botui-icon botui-action-text-icon fa\" :class=\"\'fa-\' + action.text.icon\"></i> <input type=\"text\" ref=\"input\" :type=\"action.text.sub_type\" v-model=\"action.text.value\" class=\"botui-actions-text-input\" :placeholder=\"action.text.placeholder\" :size=\"action.text.size\" :value=\"action.text.value\" :class=\"action.text.cssClass\" required v-focus/> <button v-if=\"isMobile\" class=\"botui-actions-text-submit\">Go</button></form><div v-if=\"action.type == \'button\'\" class=\"botui-actions-buttons\" :class=\"action.cssClass\"> <button type=\"button\" :class=\"button.cssClass\" class=\"botui-actions-buttons-button\" v-for=\"button in action.button.buttons\" @click=\"handle_action_button(button)\" autofocus><i v-if=\"button.icon\" class=\"botui-icon botui-action-button-icon fa\" :class=\"\'fa-\' + button.icon\"></i> {{button.text}}</button></div></div></transition></div></div>', // replaced by HTML template during build. see Gulpfile.js
template: '<div class=\"botui botui-container\" v-botui-container><div class=\"botui-messages-container\"><div v-for=\"msg in messages\" class=\"botui-message\" :class=\"msg.cssClass\" v-botui-scroll><transition name=\"slide-fade\"><div v-if=\"msg.visible\" :class=\"[{human: msg.human, \'botui-message-content\': true}, msg.type]\"><span v-if=\"msg.type == \'text\'\" v-text=\"msg.content\" v-botui-markdown></span> <iframe v-if=\"msg.type == \'embed\'\" :src=\"msg.content\" frameborder=\"0\" allowfullscreen></iframe></div></transition></div></div><div class=\"botui-actions-container\"><transition name=\"slide-fade\"><div v-if=\"action.show\" v-botui-scroll><form v-if=\"action.type == \'text\'\" class=\"botui-actions-text\" @submit.prevent=\"handle_action_text()\" :class=\"action.cssClass\"><i v-if=\"action.text.icon\" class=\"botui-icon botui-action-text-icon fa\" :class=\"\'fa-\' + action.text.icon\"></i> <input type=\"text\" ref=\"input\" :type=\"action.text.sub_type\" v-model=\"action.text.value\" class=\"botui-actions-text-input\" :placeholder=\"action.text.placeholder\" :size=\"action.text.size\" :value=\"action.text.value\" :class=\"action.text.cssClass\" required v-focus/> <button v-if=\"isMobile\" class=\"botui-actions-text-submit\">Go</button></form><div v-if=\"action.type == \'button\'\" class=\"botui-actions-buttons\" :class=\"action.cssClass\"> <button type=\"button\" :class=\"button.cssClass\" class=\"botui-actions-buttons-button\" v-for=\"button in action.button.buttons\" @click=\"handle_action_button(button)\" autofocus><i v-if=\"button.icon\" class=\"botui-icon botui-action-button-icon fa\" :class=\"\'fa-\' + button.icon\"></i> {{button.text}}</button></div></div></transition></div></div>', // replaced by HTML template during build. see Gulpfile.js
data: function () {
return {
action: {
Expand Down
8 changes: 4 additions & 4 deletions build/botui.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions build/botui.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "botui",
"version": "0.2.1",
"version": "0.2.2",
"description": "A JS library to build the UI for your bot",
"main": "build/botui.min.js",
"devDependencies": {
Expand Down Expand Up @@ -34,5 +34,5 @@
"bugs": {
"url": "https://github.com/moinism/botui/issues"
},
"homepage": "https://botui.moin.im"
"homepage": "https://botui.org"
}
12 changes: 5 additions & 7 deletions src/botui.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<div class="botui botui-container" v-botui-container>
<div class="botui-messages-container">
<div v-for="msg in messages" v-botui-scroll>
<div v-for="msg in messages" class="botui-message" :class="msg.cssClass" v-botui-scroll>
<transition name="slide-fade">
<div class="botui-message" v-if="msg.visible" :class="msg.cssClass">
<div :class="[{human: msg.human, 'botui-message-content': true}, msg.type]">
<span v-if="msg.type == 'text'" v-text="msg.content" v-botui-markdown></span>
<iframe v-if="msg.type == 'embed'" :src="msg.content" frameborder="0" allowfullscreen></iframe>
</div>
<div v-if="msg.visible" :class="[{human: msg.human, 'botui-message-content': true}, msg.type]">
<span v-if="msg.type == 'text'" v-text="msg.content" v-botui-markdown></span>
<iframe v-if="msg.type == 'embed'" :src="msg.content" frameborder="0" allowfullscreen></iframe>
</div>
</transition>
</div>
Expand All @@ -30,7 +28,7 @@
@click="handle_action_button(button)"
autofocus>
<i v-if="button.icon" class="botui-icon botui-action-button-icon fa" :class="'fa-' + button.icon"></i>
{{button.text}}
{{button.text}}
</button>
</div>
</div>
Expand Down

0 comments on commit 2086886

Please sign in to comment.