3 changed files with 912 additions and 904 deletions
@ -1,108 +1,112 @@ |
|||||||
body { |
body { |
||||||
margin: 15px; |
margin: 15px; |
||||||
padding: 0; |
padding: 0; |
||||||
} |
} |
||||||
|
|
||||||
#kara { |
#kara { |
||||||
margin: 0; |
margin: 0; |
||||||
padding: 0; |
padding: 0; |
||||||
width: auto; |
width: auto; |
||||||
} |
} |
||||||
|
|
||||||
@media (min-width: 40em) { |
@media (min-width: 40em) { |
||||||
#kara, |
#kara, |
||||||
#kara-banner, |
#kara-banner, |
||||||
#chatbox-wrapper { |
#chatbox-wrapper { |
||||||
margin-left: auto; |
margin-left: auto; |
||||||
margin-right: auto; |
margin-right: auto; |
||||||
padding: 0; |
padding: 0; |
||||||
width: 40em; |
width: 40em; |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
.message { |
.message { |
||||||
color: black; |
color: black; |
||||||
padding: 10px; |
padding: 10px; |
||||||
margin-bottom: 5px; |
margin-bottom: 5px; |
||||||
min-width: 55%; |
min-width: 55%; |
||||||
max-width: 80%; |
max-width: 80%; |
||||||
} |
} |
||||||
|
|
||||||
img.message-image { |
img.message-image { |
||||||
max-width: 60%; |
max-width: 60%; |
||||||
border-radius: 0 15px 15px 15px; |
border-radius: 0 15px 15px 15px; |
||||||
|
|
||||||
margin-bottom: 5px; |
margin-bottom: 5px; |
||||||
clear: top; |
clear: top; |
||||||
} |
} |
||||||
|
|
||||||
.bot-message { |
.bot-message { |
||||||
border-radius: 0 15px 15px 15px; |
border-radius: 0 15px 15px 15px; |
||||||
background-color: lightgreen; |
background-color: lightgreen; |
||||||
} |
} |
||||||
|
|
||||||
.user-message { |
.user-message { |
||||||
border-radius: 15px 0 15px 15px; |
border-radius: 15px 0 15px 15px; |
||||||
background-color: lightblue; |
background-color: lightblue; |
||||||
} |
} |
||||||
|
|
||||||
#chat-box { |
#chat-box { |
||||||
margin-top: 4em; |
margin-top: 4em; |
||||||
overflow-y: scroll; |
overflow-y: scroll; |
||||||
height: 65vh; |
height: 65vh; |
||||||
padding-bottom: 2em; |
padding-bottom: 2em; |
||||||
} |
} |
||||||
|
|
||||||
#chatbox-wrapper { |
#chatbox-wrapper { |
||||||
position: fixed; |
position: fixed; |
||||||
padding: 1em; |
padding: 1em; |
||||||
bottom: 0; |
bottom: 0; |
||||||
left: 0; |
left: 0; |
||||||
right: 0; |
right: 0; |
||||||
} |
} |
||||||
|
|
||||||
#kara-banner { |
#kara-banner { |
||||||
position: fixed; |
position: fixed; |
||||||
height: 3.2em; |
height: 3.2em; |
||||||
top: 0; |
top: 0; |
||||||
left: 0; |
left: 0; |
||||||
right: 0; |
right: 0; |
||||||
text-align: center; |
text-align: center; |
||||||
padding: 0.7em; |
padding: 0.7em; |
||||||
} |
} |
||||||
|
|
||||||
#kara-banner .btn, .add-response-input-button { |
#kara-banner .btn, .add-response-input-button { |
||||||
margin-top: -0.3em; |
margin-top: -0.3em; |
||||||
} |
} |
||||||
|
|
||||||
.response-input { |
.response-input { |
||||||
margin-bottom: 3px; |
margin-bottom: 3px; |
||||||
} |
} |
||||||
|
|
||||||
.form-button { |
.form-button { |
||||||
width: 100%; |
width: 100%; |
||||||
} |
} |
||||||
|
|
||||||
.command-message { |
.command-message { |
||||||
color: grey; |
color: grey; |
||||||
} |
} |
||||||
|
|
||||||
.command-message::before { |
.command-message::before { |
||||||
content: '$: '; |
content: '$: '; |
||||||
} |
} |
||||||
|
|
||||||
.header-logo { |
.header-logo { |
||||||
max-height: 32px; |
max-height: 32px; |
||||||
max-width: 32px; |
max-width: 32px; |
||||||
width: 32px; |
width: 32px; |
||||||
height: 32px; |
height: 32px; |
||||||
margin-right: 5px; |
margin-right: 5px; |
||||||
} |
} |
||||||
|
|
||||||
.me-message { |
.me-message { |
||||||
background-color: orange; |
background-color: orange; |
||||||
} |
} |
||||||
|
|
||||||
#addForm { |
#addForm { |
||||||
margin-top: 60px; |
margin-top: 60px; |
||||||
|
} |
||||||
|
|
||||||
|
.fa-check-circle { |
||||||
|
color: green; |
||||||
} |
} |
@ -1,184 +1,188 @@ |
|||||||
<!DOCTYPE html> |
<!DOCTYPE html> |
||||||
<html lang="en"> |
<html lang="en"> |
||||||
<head> |
<head> |
||||||
<title> |
<title> |
||||||
Kara |
Kara |
||||||
</title> |
</title> |
||||||
<meta charset="utf8"> |
<meta charset="utf8"> |
||||||
<link rel="icon" href="/favicon.ico"> |
<link rel="icon" href="/favicon.ico"> |
||||||
<link rel="manifest" href="manifest/kara.json"> |
<link rel="manifest" href="manifest/kara.json"> |
||||||
<link href="https://bootswatch.com/4/slate/bootstrap.min.css" rel="stylesheet" type="text/css"/> |
<link href="https://bootswatch.com/4/slate/bootstrap.min.css" rel="stylesheet" type="text/css"/> |
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/css/alertify.min.css"/> |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/css/alertify.min.css"/> |
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/css/themes/default.min.css"/> |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/css/themes/default.min.css"/> |
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/css/themes/bootstrap.min.css"/> |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/css/themes/bootstrap.min.css"/> |
||||||
<link rel="stylesheet" href="css/lightbox.min.css"/> |
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/css/alertify.min.css"/> |
||||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no" name="viewport"> |
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/css/themes/default.min.css"/> |
||||||
</head> |
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/css/themes/semantic.min.css"/> |
||||||
<body> |
<link rel="stylesheet" href="css/lightbox.min.css"/> |
||||||
<div class="container-fluid" id="kara"> |
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no" name="viewport"> |
||||||
<div id="kara-banner" class="bg-dark text-light"> |
</head> |
||||||
<img src="/img/logo/luna/icon.ico" class="header-logo" alt="logo-header"/> |
<body> |
||||||
<div class="float-right"> |
<div class="container-fluid" id="kara"> |
||||||
<div class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#settingsModal"> |
<div id="kara-banner" class="bg-dark text-light"> |
||||||
<i class="fas fa-sliders-h"></i> |
<img src="/img/logo/luna/icon.ico" class="header-logo" alt="logo-header"/> |
||||||
</div> |
<div class="float-right"> |
||||||
<div class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#noteModal" v-if="notes.length > 0"> |
<div class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#settingsModal"> |
||||||
<i class="fas fa-clipboard"></i> |
<i class="fas fa-sliders-h"></i> |
||||||
</div> |
</div> |
||||||
<div class="btn btn-sm btn-secondary" @click="scrollDown()"> |
<div class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#todoModal" v-if="todos.length > 0"> |
||||||
<i class="fas fa-chevron-down"></i> |
<i class="fas fa-clipboard"></i> |
||||||
</div> |
</div> |
||||||
</div> |
<div class="btn btn-sm btn-secondary" @click="scrollDown()"> |
||||||
{{ this.name }} |
<i class="fas fa-chevron-down"></i> |
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
<div id="chat-box"> |
{{ this.name }} |
||||||
<template v-for="message in messages"> |
</div> |
||||||
<div :class="'message' + (message.bot === true ? ' bot-message float-left' : ' user-message float-right') + (message.command ? ' command-message' : '') + (message.me ? ' me-message' : '')" v-if="message.body"> |
|
||||||
<template v-if="message.src"> |
<div id="chat-box"> |
||||||
<a :href="message.src" :data-lightbox="message.body" :data-title="message.body"> |
<template v-for="message in messages"> |
||||||
<img :src="message.src" :alt="message.body" class="message-image"/><br/> |
<div :class="'message' + (message.bot === true ? ' bot-message float-left' : ' user-message float-right') + (message.command ? ' command-message' : '') + (message.me ? ' me-message' : '')" v-if="message.body"> |
||||||
</a> |
<template v-if="message.src"> |
||||||
</template> |
<a :href="message.src" :data-lightbox="message.body" :data-title="message.body"> |
||||||
{{ message.body }} |
<img :src="message.src" :alt="message.body" class="message-image"/><br/> |
||||||
</div> |
</a> |
||||||
</template> |
</template> |
||||||
<div class="message bot-message typing float-left" v-if="isTyping"> |
{{ message.body }} |
||||||
<div class="spinner-grow text-secondary" role="status"> |
</div> |
||||||
<span class="sr-only"> |
</template> |
||||||
Loading... |
<div class="message bot-message typing float-left" v-if="isTyping"> |
||||||
</span> |
<div class="spinner-grow text-secondary" role="status"> |
||||||
</div> |
<span class="sr-only"> |
||||||
<div class="spinner-grow text-secondary" role="status"> |
Loading... |
||||||
<span class="sr-only"> |
</span> |
||||||
Loading... |
</div> |
||||||
</span> |
<div class="spinner-grow text-secondary" role="status"> |
||||||
</div> |
<span class="sr-only"> |
||||||
<div class="spinner-grow text-secondary" role="status"> |
Loading... |
||||||
<span class="sr-only"> |
</span> |
||||||
Loading... |
</div> |
||||||
</span> |
<div class="spinner-grow text-secondary" role="status"> |
||||||
</div> |
<span class="sr-only"> |
||||||
</div> |
Loading... |
||||||
</div> |
</span> |
||||||
|
</div> |
||||||
<div id="chatbox-wrapper" class="bg-dark"> |
</div> |
||||||
<input class="form-control" |
</div> |
||||||
id="chatinput" |
|
||||||
type="text" |
<div id="chatbox-wrapper" class="bg-dark"> |
||||||
v-model="chatbox" |
<input class="form-control" |
||||||
v-on:keyup.enter="sendMessage()" |
id="chatinput" |
||||||
v-on:keyup.38="chatbox = lastMessage" |
type="text" |
||||||
v-on:keyup.40="chatbox = ''" |
v-model="chatbox" |
||||||
required autofocus> |
v-on:keyup.enter="sendMessage()" |
||||||
</div> |
v-on:keyup.38="chatbox = lastMessage" |
||||||
|
v-on:keyup.40="chatbox = ''" |
||||||
<div class="modal fade" id="noteModal" tabindex="-1" role="dialog" aria-labelledby="noteModal" aria-hidden="true"> |
required autofocus> |
||||||
<div class="modal-dialog" role="document"> |
</div> |
||||||
<div class="modal-content"> |
|
||||||
<div class="modal-header"> |
<div class="modal fade" id="todoModal" tabindex="-1" role="dialog" aria-labelledby="todoModal" aria-hidden="true"> |
||||||
<h5 class="modal-title">Notes</h5> |
<div class="modal-dialog" role="document"> |
||||||
<div class="float-right"> |
<div class="modal-content"> |
||||||
<button class="btn btn-sm btn-secondary" @click="clearNotes"> |
<div class="modal-header"> |
||||||
<i class="fas fa-trash"></i> |
<h5 class="modal-title">To-Do</h5> |
||||||
</button> |
<div class="float-right"> |
||||||
</div> |
<button class="btn btn-sm btn-secondary" @click="clearTodos"> |
||||||
</div> |
<i class="fas fa-trash"></i> |
||||||
<div class="modal-body" style="max-height: 800px; overflow-y: scroll"> |
</button> |
||||||
<ul class="list-group"> |
</div> |
||||||
<li class="list-group-item" v-for="note in notes" v-if="!note.checked"> |
</div> |
||||||
<span class="float-right"> |
<div class="modal-body" style="max-height: 800px; overflow-y: scroll"> |
||||||
<input type="checkbox" v-model="note.checked" @change="updateStorage()"/> |
<ul class="list-group"> |
||||||
</span> |
<li class="list-group-item" v-for="todo in todos" v-if="!todo.checked"> |
||||||
{{ note.body }} |
<span class="float-right"> |
||||||
</li> |
<input type="checkbox" v-model="todo.checked" @change="updateStorage()"/> |
||||||
</ul> |
</span> |
||||||
<hr/> |
{{ todo.body }} |
||||||
<ul class="list-group"> |
</li> |
||||||
<li class="list-group-item" v-for="note in notes" v-if="note.checked"> |
</ul> |
||||||
<span class="float-right"> |
<hr/> |
||||||
<input type="checkbox" v-model="note.checked" @change="updateStorage()"/> |
<ul class="list-group"> |
||||||
</span> |
<li class="list-group-item" v-for="todo in todos" v-if="todo.checked"> |
||||||
<span style="text-decoration: line-through;">{{ note.body }}</span> |
<span class="float-right"> |
||||||
</li> |
<input type="checkbox" v-model="todo.checked" @change="updateStorage()"/> |
||||||
</ul> |
</span> |
||||||
</div> |
<i class="fas fa-check-circle"></i> <span style="text-decoration: line-through;">{{ todo.body }}</span> |
||||||
<div class="modal-footer"> |
</li> |
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> |
</ul> |
||||||
</div> |
</div> |
||||||
</div> |
<div class="modal-footer"> |
||||||
</div> |
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> |
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
<div class="modal fade" id="settingsModal" tabindex="-1" role="dialog" aria-labelledby="settingsModal" aria-hidden="true"> |
</div> |
||||||
<div class="modal-dialog" role="document"> |
</div> |
||||||
<div class="modal-content"> |
|
||||||
<div class="modal-header"> |
<div class="modal fade" id="settingsModal" tabindex="-1" role="dialog" aria-labelledby="settingsModal" aria-hidden="true"> |
||||||
<h5 class="modal-title">Settings</h5> |
<div class="modal-dialog" role="document"> |
||||||
</div> |
<div class="modal-content"> |
||||||
<div class="modal-body"> |
<div class="modal-header"> |
||||||
<div class="form-group" v-if="features.changeName"> |
<h5 class="modal-title">Settings</h5> |
||||||
<label for="name">What's my name?</label> |
</div> |
||||||
<input type="text" class="form-control" id="name" v-model="settingsModal.name"> |
<div class="modal-body"> |
||||||
</div> |
<div class="form-group" v-if="features.changeName"> |
||||||
<div class="form-group" v-if="username !== null"> |
<label for="name">What's my name?</label> |
||||||
<label for="username">What's your name?</label> |
<input type="text" class="form-control" id="name" v-model="settingsModal.name"> |
||||||
<input type="text" class="form-control" id="username" v-model="settingsModal.username"> |
</div> |
||||||
</div> |
<div class="form-group" v-if="username !== null"> |
||||||
<div class="form-group"> |
<label for="username">What's your name?</label> |
||||||
<label for="location">What city do you live in? <small class="text-muted">(for weather-reports only)</small> </label> |
<input type="text" class="form-control" id="username" v-model="settingsModal.username"> |
||||||
<input type="text" class="form-control" id="location" v-model="settingsModal.location"> |
</div> |
||||||
</div> |
<div class="form-group"> |
||||||
<div class="form-group" v-if="features.themes"> |
<label for="location">What city do you live in? <small class="text-muted">(for weather-reports only)</small> </label> |
||||||
<label for="theme">Pick a theme</label> |
<input type="text" class="form-control" id="location" v-model="settingsModal.location"> |
||||||
<select name="theme" class="form-control" id="theme" v-model="activeTheme" @change="updateStorage()"> |
</div> |
||||||
<option v-for="theme in themes" :value="theme.name.toLowerCase()" v-text="theme.name"></option> |
<div class="form-group" v-if="features.themes"> |
||||||
</select> |
<label for="theme">Pick a theme</label> |
||||||
</div> |
<select name="theme" class="form-control" id="theme" v-model="activeTheme" @change="updateStorage()"> |
||||||
<div class="form-group"> |
<option v-for="theme in themes" :value="theme.name.toLowerCase()" v-text="theme.name"></option> |
||||||
<label>Data</label> |
</select> |
||||||
<div class="row"> |
</div> |
||||||
<div class="col-sm-6"> |
<div class="form-group"> |
||||||
<button @click="clearChat()" class="btn btn-warning form-button" data-dismiss="modal"> |
<label>Data</label> |
||||||
Delete chat |
<div class="row"> |
||||||
</button> |
<div class="col-sm-6"> |
||||||
</div> |
<button @click="clearChat()" class="btn btn-warning form-button" data-dismiss="modal"> |
||||||
<div class="col-sm-6"> |
Delete chat |
||||||
<button @click="clearStorage()" class="btn btn-warning form-button"> |
</button> |
||||||
Delete everything |
</div> |
||||||
</button> |
<div class="col-sm-6"> |
||||||
</div> |
<button @click="clearStorage()" class="btn btn-warning form-button"> |
||||||
</div> |
Delete everything |
||||||
</div> |
</button> |
||||||
<div class="form-group"> |
</div> |
||||||
<div class="float-right"> |
</div> |
||||||
<i class="fa fa-code" aria-hidden="true"></i> App by <a href="/">Luna Development</a> |
</div> |
||||||
</div> |
<div class="form-group"> |
||||||
</div> |
<div class="float-right"> |
||||||
</div> |
<i class="fa fa-code" aria-hidden="true"></i> App by <a href="/">Luna Development</a> |
||||||
<div class="modal-footer"> |
</div> |
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> |
</div> |
||||||
<button type="button" class="btn btn-primary" data-dismiss="modal" @click="saveSettings()">Save</button> |
</div> |
||||||
</div> |
<div class="modal-footer"> |
||||||
</div> |
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> |
||||||
</div> |
<button type="button" class="btn btn-primary" data-dismiss="modal" @click="saveSettings()">Save</button> |
||||||
</div> |
</div> |
||||||
<link rel="stylesheet" :href="'https://maxcdn.bootstrapcdn.com/bootswatch/4.3.1/' + activeTheme + '/bootstrap.min.css'"> |
</div> |
||||||
<link href="app.css" rel="stylesheet" type="text/css"/> |
</div> |
||||||
</div> |
</div> |
||||||
|
<link rel="stylesheet" :href="'https://maxcdn.bootstrapcdn.com/bootswatch/4.3.1/' + activeTheme + '/bootstrap.min.css'"> |
||||||
|
<link href="app.css" rel="stylesheet" type="text/css"/> |
||||||
<script src="https://kit.fontawesome.com/b54a4cceff.js" crossorigin="anonymous"></script> |
</div> |
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/moment.min.js" crossorigin="anonymous"></script> |
|
||||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" crossorigin="anonymous"></script> |
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" crossorigin="anonymous"></script> |
<script src="https://kit.fontawesome.com/b54a4cceff.js" crossorigin="anonymous"></script> |
||||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" crossorigin="anonymous"></script> |
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/moment.min.js" crossorigin="anonymous"></script> |
||||||
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> |
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" crossorigin="anonymous"></script> |
||||||
<script src="https://code.jquery.com/jquery-3.5.1.js"></script> |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" crossorigin="anonymous"></script> |
||||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> |
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" crossorigin="anonymous"></script> |
||||||
<script src="js/lightbox.min.js"></script> |
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> |
||||||
<script src="https://cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/alertify.min.js"></script> |
<script src="https://code.jquery.com/jquery-3.5.1.js"></script> |
||||||
<script src="app.js"> |
<script src="//cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/alertify.min.js"></script> |
||||||
</script> |
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> |
||||||
</body> |
<script src="js/lightbox.min.js"></script> |
||||||
</html> |
<script src="https://cdn.jsdelivr.net/npm/alertifyjs@1.13.1/build/alertify.min.js"></script> |
||||||
|
<script src="app.js"> |
||||||
|
</script> |
||||||
|
</body> |
||||||
|
</html> |
||||||
|
Loading…
Reference in new issue