Commit 60a26afe authored by Manoj Kumar's avatar Manoj Kumar

Merge branch 'amashi_dev' into 'master'

Basic Front-end UIs for the product & the code to display the created GIF

See merge request !35
parents 8978ec3e 3e28a91c
from reveng.processInput import checkCommon
from flask import Flask, render_template, request, redirect from flask import Flask, render_template, request, redirect
import json, sys, os import json
import sys
import os
# sys.path.append('../reveng') # sys.path.append('../reveng')
REVENG_DIR = os.path.dirname(os.path.abspath(__file__)) REVENG_DIR = os.path.dirname(os.path.abspath(__file__))
TEMPLATE = os.path.join(REVENG_DIR,"\\templates") TEMPLATE = os.path.join(REVENG_DIR, "\\templates")
STATIC = os.path.join(REVENG_DIR,"\\static") STATIC = os.path.join(REVENG_DIR, "\\static")
from reveng.test_json import printTest # from reveng.test_json import printTest
from reveng.processInput import checkCommon
app = Flask(__name__,template_folder=TEMPLATE,static_folder=STATIC) #app = Flask(__name__, template_folder=TEMPLATE, static_folder=STATIC)
app = Flask(__name__)
app.config["DEBUG"] = True app.config["DEBUG"] = True
@app.route('/test',methods =['GET'])
@app.route('/test', methods=['GET'])
def testApi(): def testApi():
return "<h1>The API is working</h1>" return "<h1>The API is working</h1>"
@app.route('/',methods =['GET'])
@app.route('/')
def welcomeApi(): def welcomeApi():
return "<h1>Welcome to EasyTalk API</h1>" return render_template('homePage.html')
# REVENG # REVENG
@app.route('/tts', methods=['GET'])
@app.route('/tts')
def textToSignLanguage(): def textToSignLanguage():
print(TEMPLATE) return render_template('index.html')
return render_template("index.html")
@app.route('/tts/response/', methods=['POST']) @app.route('/tts/response/', methods=['POST'])
def response(): def response():
message = request.get_json() message = request.get_json()
GIF = checkCommon(message['message']) # print(message['message'])
return GIF responseGIF = checkCommon(message['message'])
return responseGIF
# END REVENG # END REVENG
host = "localhost" host = "localhost"
app.run(host=host,port=3000) app.run(host=host, port=3000)
# if __name__=="__main__": if __name__ == "__main__":
# app.run(debug=True) app.run(debug=True)
# This file is for Frontends ###################33
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('homePage.html')
@app.route('/about')
def about():
return render_template('about.html')
@app.route('/signToText')
def signToTextEngine():
return render_template('signToText.html')
@app.route('/textToSign')
def textToSignEngine():
return render_template('textToSign.html')
@app.route('/contactUs')
def contactUs():
return render_template('contactUs.html')
if __name__ == "__main__":
app.run(debug=True)
from reveng.processInput import processInput #from reveng.processInput import processInput
from reveng.processSentence import processSentence from reveng.processSentence import processCommonSentence
from reveng.processWord import processWord from reveng.processWord import processWord
from reveng.getImages import getImagesCommonSentence from reveng.getImages import getImagesCommonSentence
from reveng.getImages import getImagesCommonWord from reveng.getImages import getImagesCommonWord
......
import json,os import json,os
from reveng.processWord import processWord from reveng.processWord import processWord
from reveng.processSentence import processSentence from reveng.processSentence import processCommonSentence
REVENG = os.path.dirname(os.path.abspath(__file__)) REVENG = os.path.dirname(os.path.abspath(__file__))
jsonPath = os.path.join(REVENG, 'common.json') jsonPath = os.path.join(REVENG, 'common.json')
...@@ -11,6 +11,8 @@ def checkInJson(message): ...@@ -11,6 +11,8 @@ def checkInJson(message):
with open(jsonPath) as jsonfile: with open(jsonPath) as jsonfile:
data = json.load(jsonfile) data = json.load(jsonfile)
sentences = data['sentences'] sentences = data['sentences']
common_sentences = sentences['common_sentences']
english_common_sentences = common_sentences['english']
words = data['words'] words = data['words']
common = words['common_words'] common = words['common_words']
englishwords = common['english'] englishwords = common['english']
...@@ -18,9 +20,10 @@ def checkInJson(message): ...@@ -18,9 +20,10 @@ def checkInJson(message):
english_alphabet = alphabets['english'] english_alphabet = alphabets['english']
if message in sentences: if message in sentences:
processSentence(message) somegif = processCommonSentence(message)
elif message in englishwords or message in english_alphabet: elif message in englishwords or message in english_alphabet:
processWord(message) somegif = processWord(message)
else: else:
somegif = "no gif"
print("Call Rare methods here...") print("Call Rare methods here...")
...@@ -79,13 +79,15 @@ def getImagesRareWord(message): ...@@ -79,13 +79,15 @@ def getImagesRareWord(message):
return sendingToGIF return sendingToGIF
#generateGIF(sendingToGIF) #generateGIF(sendingToGIF)
def getImagesCommonentence(sentence): def getImagesCommonSentence(sentence):
sendingToGIF =[] sendingToGIF =[]
imageRes = [] imageRes = []
images = store.child().list_files() images = store.child().list_files()
for word in sentence: for word in sentence:
for i in images: for i in images:
if i.name.startswith(word): if i.name.startswith(word) and len(i.name) > 5:
print(len(i.name))
print ("image name =" + i.name) print ("image name =" + i.name)
imageRes.append(i) imageRes.append(i)
......
########################## To display the created GIF to user #############################
import os
import urllib.request
from flask import flash, request, redirect, url_for, Flask, render_template
from werkzeug.utils import secure_filename
from reveng.gifDisplayMain import main
ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gif'])
def allowed_file(filename):
return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
app = Flask(__name__)
@app.route('/', methods=['POST'])
def upload_image():
if 'file' not in request.files:
flash('No file part')
return redirect(request.url)
file = request.files['file']
if file.filename == '':
flash('No image selected for uploading')
return redirect(request.url)
if file and allowed_file(file.filename):
filename = secure_filename(file.filename)
file.save(os.path.join(main.config['UPLOAD_FOLDER'], filename))
flash('Image successfully uploaded and displayed')
return render_template('upload.html', filename=filename)
else:
flash('Allowed image types are -> png, jpg, jpeg, gif')
return redirect(request.url)
@app.route('/display/<filename>')
def display_image(filename):
return redirect(url_for('static', filename='uploads/' + filename), code=301)
if __name__ == "__main__":
app.secret_key = "secret key"
app.run(debug=True)
########################## To display the created GIF to user #############################
from flask import Flask
main = Flask(__name__)
UPLOAD_FOLDER = 'static/uploads/'
main.secret_key = "secret key"
main.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
main.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024
# from reveng.processWord import processWord
from reveng.processWord import processWord # from reveng.processSentence import processSentence
from reveng.processSentence import processSentence
from reveng.checkCommon import checkInJson from reveng.checkCommon import checkInJson
def processInput(message): # def processInput(message):
msg_split = message.split(" ") # msg_split = message.split(" ")
print(msg_split) # print(msg_split)
if(len(msg_split) <= 1): # if(len(msg_split) <= 1):
print("This is a word") # print("This is a word")
processWord(message) # processWord(message)
return "Word" # return "Word"
else: # else:
print("This is a sentence") # print("This is a sentence")
processSentence(message) # processSentence(message)
return "Sentence" # return "Sentence"
def checkCommon(message): def checkCommon(message):
checkInJson(message) checkInJson(message)
\ No newline at end of file
...@@ -4,25 +4,13 @@ import json,os ...@@ -4,25 +4,13 @@ import json,os
from reveng.getImages import getImagesCommonSentence from reveng.getImages import getImagesCommonSentence
REVENG = os.path.dirname(os.path.abspath(__file__)) REVENG = os.path.dirname(os.path.abspath(__file__))
jsonPath = os.path.join(REVENG, 'common.json')
def processSentence(message):
message = message.lower()
with open(jsonPath) as jsonfile:
data = json.load(jsonfile)
sentences = data['sentences']
common = sentences['common_sentences']
english = common['english']
#checking a sentence in json file
def processCommonSentence(message):
if message in english: splitMessage = message.split(" ")
print('Sentence is in the json file') gif = getImagesCommonSentence(splitMessage)
splitMessage = message.split(" ")
getImagesCommonSentence(splitMessage) return gif
else:
print('sentence not in json file')
sentenceArr = []
for sentence in message:
lower_case_sentence = sentence.lower()
sentenceArr.append(lower_case_sentence)
print(sentenceArr)
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<button id="buttonInput" type="submit">TRANSLATE</button> <button id="buttonInput" type="submit">TRANSLATE</button>
</div> </div>
</form> </form>
<!--<p id="req"></p>--> <p id="req"></p>
<!-- <img src="{{ user_image }}" alt="User Image" /> --> <img src="{{ user_image }}" alt="User Image" />
</div> </div>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
......
<!--To display the created GIF to user -->
<!doctype html>
<html>
<head>
<title>Python Flask File Upload Example</title>
</head>
<body>
<h2>Select a file to upload</h2>
<p>
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class=flashes>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
</p>
{% if filename %}
<div>
<img src="{{ url_for('display_image', filename=filename) }}">
</div>
{% endif %}
<form method="post" action="/" enctype="multipart/form-data">
<dl>
<p>
<input type="file" name="file" autocomplete="off" required>
</p>
</dl>
<p>
<input type="submit" value="Submit">
</p>
</form>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
(function ($) {
'use strict';
// Preloader js
$(window).on('load', function () {
$('.preloader').fadeOut(700);
});
// Sticky Menu
$(window).scroll(function () {
var height = $('.top-header').innerHeight();
if ($('header').offset().top > 10) {
$('.top-header').addClass('hide');
$('.navigation').addClass('nav-bg');
$('.navigation').css('margin-top', '-' + height + 'px');
} else {
$('.top-header').removeClass('hide');
$('.navigation').removeClass('nav-bg');
$('.navigation').css('margin-top', '-' + 0 + 'px');
}
});
// Background-images
$('[data-background]').each(function () {
$(this).css({
'background-image': 'url(' + $(this).data('background') + ')'
});
});
//Hero Slider
$('.hero-slider').slick({
autoplay: true,
autoplaySpeed: 7500,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
arrows: true,
fade: true,
prevArrow: '<button type=\'button\' class=\'prevArrow\'><i class=\'ti-angle-left\'></i></button>',
nextArrow: '<button type=\'button\' class=\'nextArrow\'><i class=\'ti-angle-right\'></i></button>',
dots: true
});
$('.hero-slider').slickAnimation();
// venobox popup
$(document).ready(function () {
$('.venobox').venobox();
});
// filter
$(document).ready(function () {
var containerEl = document.querySelector('.filtr-container');
var filterizd;
if (containerEl) {
filterizd = $('.filtr-container').filterizr({});
}
//Active changer
$('.filter-controls li').on('click', function () {
$('.filter-controls li').removeClass('active');
$(this).addClass('active');
});
});
// Count Up
function counter() {
var oTop;
if ($('.count').length !== 0) {
oTop = $('.count').offset().top - window.innerHeight;
}
if ($(window).scrollTop() > oTop) {
$('.count').each(function () {
var $this = $(this),
countTo = $this.attr('data-count');
$({
countNum: $this.text()
}).animate({
countNum: countTo
}, {
duration: 1000,
easing: 'swing',
step: function () {
$this.text(Math.floor(this.countNum));
},
complete: function () {
$this.text(this.countNum);
}
});
});
}
}
$(window).on('scroll', function () {
counter();
});
})(jQuery);
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="utf-8">
<title>EasyTalk</title>
<!-- mobile responsive meta -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- ** Plugins Needed for the Project ** -->
<!-- Bootstrap -->
<link rel="stylesheet" href="static/plugins/bootstrap/bootstrap.min.css">
<!-- slick slider -->
<link rel="stylesheet" href="static/plugins/slick/slick.css">
<!-- themefy-icon -->
<link rel="stylesheet" href="static/plugins/themify-icons/themify-icons.css">
<!-- animation css -->
<link rel="stylesheet" href="static/plugins/animate/animate.css">
<!-- aos -->
<link rel="stylesheet" href="static/plugins/aos/aos.css">
<!-- venobox popup -->
<link rel="stylesheet" href="static/plugins/venobox/venobox.css">
<!-- Main Stylesheet -->
<link href="static/css/style.css" rel="stylesheet">
<!--Favicon-->
<link rel="shortcut icon" href="static/images/favicon.png" type="image/x-icon">
<link rel="icon" href="static/images/favicon.png" type="image/x-icon">
</head>
<body>
<!-- header -->
<header class="fixed-top">
<!-- navbar -->
<div class="navigation w-100">
<div class="container">
<nav class="navbar navbar-expand-lg navbar-dark p-0">
<a class="navbar-brand" href="/"><img src="static/images/EasyTalkLogo.png" alt="logo"></a>
<button class="navbar-toggler rounded-0" type="button" data-toggle="collapse" data-target="#navigation"
aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navigation">
<ul class="navbar-nav ml-auto text-center">
<li class="nav-item @@home">
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="about">About</a>
</li>
<li class="nav-item dropdown view">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Translators
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="signToText">SSL to English Translator</a>
<a class="dropdown-item" href="textToSign">English to SSL Translator</a>
</div>
</li>
<li class="nav-item @@contact">
<a class="nav-link" href="contactUs">Contact Us</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</header>
<!-- /header -->
<!-- page title -->
<section class="page-title-section overlay" data-background="static/images/backgrounds/page-title.jpg">
<div class="container">
<div class="row">
<div class="col-md-8">
<ul class="list-inline custom-breadcrumb">
<li class="list-inline-item"><a class="h2 text-primary font-secondary" href="about">About Us</a></li>
<li class="list-inline-item text-white h3 font-secondary @@nasted"></li>
</ul>
<p class="text-lighten">Our courses offer a good compromise between the continuous assessment favoured by some universities and the emphasis placed on final exams by others.</p>
</div>
</div>
</div>
</section>
<!-- /page title -->
<!-- about -->
<section class="section">
<div class="container">
<div class="row">
<div class="col-12">
<img class="img-fluid w-100 mb-4" src="static/images/about/about-page.jpg" alt="about image">
<h2 class="section-title">ABOUT OUR JOURNY</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et.dolore magna aliqua. Ut enim ad minim veniam, quis nostrud. Lorem ipsum dolor sit amet consectetur, adipisicing elit. Saepe ipsa illo quod veritatis, magni debitis fugiat dolore voluptates! Consequatur, aliquid. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quaerat perferendis sint optio similique. Et amet magni facilis vero corporis quos.</p>
<p>exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Lorem ipsum, dolor sit amet consectetur adipisicing elit. Ipsum a, facere fugit error accusamus est officiis vero in, nostrum laboriosam corrupti explicabo, cumque repudiandae deleniti perspiciatis quae consectetur enim. Laboriosam!</p>
</div>
</div>
</div>
</section>
<!-- /about -->
<!-- footer -->
<footer>
<!-- copyright -->
<div class="copyright py-4 bg-footer">
<div class="container">
<div class="row">
<div class="col-sm-7 text-sm-left text-center">
<p class="mb-0">Copyright
<script>
var CurrentYear = new Date().getFullYear()
document.write(CurrentYear)
</script>
© eventors-inc</p>
</div>
<div class="col-sm-5 text-sm-right text-center">
<ul class="list-inline">
<li class="list-inline-item"><a class="d-inline-block p-2" href="#"><i class="ti-facebook text-primary"></i></a></li>
<li class="list-inline-item"><a class="d-inline-block p-2" href="#"><i class="ti-twitter-alt text-primary"></i></a></li>
<li class="list-inline-item"><a class="d-inline-block p-2" href="#"><i class="ti-linkedin text-primary"></i></a></li>
<li class="list-inline-item"><a class="d-inline-block p-2" href="#"><i class="ti-instagram text-primary"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
</footer>
<!-- /footer -->
<!-- jQuery -->
<script src="static/plugins/jQuery/jquery.min.js"></script>
<!-- Bootstrap JS -->
<script src="static/plugins/bootstrap/bootstrap.min.js"></script>
<!-- slick slider -->
<script src="static/plugins/slick/slick.min.js"></script>
<!-- aos -->
<script src="static/plugins/aos/aos.js"></script>
<!-- venobox popup -->
<script src="static/plugins/venobox/venobox.min.js"></script>
<!-- filter -->
<script src="static/plugins/filterizr/jquery.filterizr.min.js"></script>
<!-- Main Script -->
<script src="static/js/script.js"></script>
</body>
</html>
\ No newline at end of file
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('homePage.html')
@app.route('/about')
def about():
return render_template('about.html')
@app.route('/signToText')
def signToTextEngine():
return render_template('signToText.html')
@app.route('/textToSign')
def textToSignEngine():
return render_template('textToSign.html')
@app.route('/contactUs')
def contactUs():
return render_template('contactUs.html')
if __name__ == "__main__":
app.run(debug=True)
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="utf-8">
<title>EasyTalk</title>
<!-- mobile responsive meta -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- ** Plugins Needed for the Project ** -->
<!-- Bootstrap -->
<link rel="stylesheet" href="static/plugins/bootstrap/bootstrap.min.css">
<!-- slick slider -->
<link rel="stylesheet" href="static/plugins/slick/slick.css">
<!-- themefy-icon -->
<link rel="stylesheet" href="static/plugins/themify-icons/themify-icons.css">
<!-- animation css -->
<link rel="stylesheet" href="static/plugins/animate/animate.css">
<!-- aos -->
<link rel="stylesheet" href="static/plugins/aos/aos.css">
<!-- venobox popup -->
<link rel="stylesheet" href="static/plugins/venobox/venobox.css">
<!-- Main Stylesheet -->
<link href="static/css/style.css" rel="stylesheet">
<!--Favicon-->
<link rel="shortcut icon" href="static/images/favicon.png" type="image/x-icon">
<link rel="icon" href="static/images/favicon.png" type="image/x-icon">
</head>
<body>
<!-- header -->
<header class="fixed-top">
<!-- navbar -->
<div class="navigation w-100">
<div class="container">
<nav class="navbar navbar-expand-lg navbar-dark p-0">
<a class="navbar-brand" href="/"><img src="static/images/EasyTalkLogo.png" alt="logo"></a>
<button class="navbar-toggler rounded-0" type="button" data-toggle="collapse" data-target="#navigation"
aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navigation">
<ul class="navbar-nav ml-auto text-center">
<li class="nav-item @@home">
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item @@about">
<a class="nav-link" href="about">About</a>
</li>
<li class="nav-item dropdown view">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Translators
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="signToText">SSL to English Translator</a>
<a class="dropdown-item" href="textToSign">English to SSL Translator</a>
</div>
</li>
<li class="nav-item active">
<a class="nav-link" href="contactUs">Contact Us</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</header>
<!-- /header -->
<!-- page title -->
<section class="page-title-section overlay" data-background="static/images/backgrounds/page-title.jpg">
<div class="container">
<div class="row">
<div class="col-md-8">
<ul class="list-inline custom-breadcrumb">
<li class="list-inline-item"><a class="h2 text-primary font-secondary" href="contactUs">Contact Us</a></li>
<li class="list-inline-item text-white h3 font-secondary @@nasted"></li>
</ul>
<p class="text-lighten">Do you have other questions? Don't worry, there aren't any dumb questions. Just fill out the form below and we'll get back to you as soon as possible.</p>
</div>
</div>
</div>
</section>
<!-- /page title -->
<!-- contact -->
<section class="section bg-gray">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2 class="section-title">Contact Us</h2>
</div>
</div>
<div class="row">
<div class="col-lg-7 mb-4 mb-lg-0">
<form action="#">
<input type="text" class="form-control mb-3" id="name" name="name" placeholder="Your Name">
<input type="email" class="form-control mb-3" id="mail" name="mail" placeholder="Your Email">
<input type="text" class="form-control mb-3" id="subject" name="subject" placeholder="Subject">
<textarea name="message" id="message" class="form-control mb-3" placeholder="Your Message"></textarea>
<button type="submit" value="send" class="btn btn-primary">SEND MESSAGE</button>
</form>
</div>
<div class="col-lg-5">
<p class="mb-5">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Velit recusandae voluptates doloremque veniam temporibus porro culpa ipsa, nisi soluta minima saepe laboriosam debitis nesciunt. Dolore, labore. Accusamus nulla sed cum aliquid exercitationem debitis error harum porro maxime quo iusto aliquam dicta modi earum fugiat, vel possimus commodi, deleniti et veniam, fuga ipsum praesentium. Odit unde optio nulla ipsum quae obcaecati! Quod esse natus quibusdam asperiores quam vel, tempore itaque architecto ducimus expedita</p>
<a href="tel:+8802057843248" class="text-color h5 d-block">+880 20 5784 3248</a>
<a href="mailto:yourmail@email.com" class="mb-5 text-color h5 d-block">yourmail@email.com</a>
<p>71 Shelton Street<br>London WC2H 9JQ England</p>
</div>
</div>
</div>
</section>
<!-- /contact -->
<!-- footer -->
<footer>
<!-- copyright -->
<div class="copyright py-4 bg-footer">
<div class="container">
<div class="row">
<div class="col-sm-7 text-sm-left text-center">
<p class="mb-0">Copyright
<script>
var CurrentYear = new Date().getFullYear()
document.write(CurrentYear)
</script>
© eventors-inc</p>
</div>
<div class="col-sm-5 text-sm-right text-center">
<ul class="list-inline">
<li class="list-inline-item"><a class="d-inline-block p-2" href="#"><i class="ti-facebook text-primary"></i></a></li>
<li class="list-inline-item"><a class="d-inline-block p-2" href="#"><i class="ti-twitter-alt text-primary"></i></a></li>
<li class="list-inline-item"><a class="d-inline-block p-2" href="#"><i class="ti-linkedin text-primary"></i></a></li>
<li class="list-inline-item"><a class="d-inline-block p-2" href="#"><i class="ti-instagram text-primary"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
</footer>
<!-- /footer -->
<!-- jQuery -->
<script src="static/plugins/jQuery/jquery.min.js"></script>
<!-- Bootstrap JS -->
<script src="static/plugins/bootstrap/bootstrap.min.js"></script>
<!-- slick slider -->
<script src="static/plugins/slick/slick.min.js"></script>
<!-- aos -->
<script src="static/plugins/aos/aos.js"></script>
<!-- venobox popup -->
<script src="static/plugins/venobox/venobox.min.js"></script>
<!-- filter -->
<script src="static/plugins/filterizr/jquery.filterizr.min.js"></script>
<!-- Main Script -->
<script src="static/js/script.js"></script>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="utf-8">
<title>EasyTalk</title>
<!-- mobile responsive meta -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- ** Plugins Needed for the Project ** -->
<!-- Bootstrap -->
<link rel="stylesheet" href="static/plugins/bootstrap/bootstrap.min.css">
<!-- slick slider -->
<link rel="stylesheet" href="static/plugins/slick/slick.css">
<!-- themefy-icon -->
<link rel="stylesheet" href="static/plugins/themify-icons/themify-icons.css">
<!-- animation css -->
<link rel="stylesheet" href="static/plugins/animate/animate.css">
<!-- aos -->
<link rel="stylesheet" href="static/plugins/aos/aos.css">
<!-- venobox popup -->
<link rel="stylesheet" href="static/plugins/venobox/venobox.css">
<!-- Main Stylesheet -->
<link href="static/css/style.css" rel="stylesheet">
<!--Favicon-->
<link rel="shortcut icon" href="static/images/favicon.png" type="image/x-icon">
<link rel="icon" href="static/images/favicon.png" type="image/x-icon">
</head>
<body>
<!-- header -->
<header class="fixed-top">
<!-- navbar -->
<div class="navigation w-100">
<div class="container">
<nav class="navbar navbar-expand-lg navbar-dark p-0">
<a class="navbar-brand" href="/"><img src="static/images/EasyTalkLogo.png" alt="logo"></a>
<button class="navbar-toggler rounded-0" type="button" data-toggle="collapse" data-target="#navigation"
aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navigation">
<ul class="navbar-nav ml-auto text-center">
<li class="nav-item @@home">
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item @@about">
<a class="nav-link" href="about">About</a>
</li>
<li class="nav-item dropdown view">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Translators
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="signToText">SSL to English Translator</a>
<a class="dropdown-item" href="textToSign">English to SSL Translator</a>
</div>
</li>
<li class="nav-item active">
<a class="nav-link" href="contactUs">Contact Us</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</header>
<!-- /header -->
<!-- hero slider -->
<section class="hero-section overlay bg-cover" data-background="static/images/banner/banner-1.jpg">
<div class="container">
<div class="hero-slider">
<!-- slider item -->
<div class="hero-slider-item">
<div class="row">
<div class="col-md-8">
<h1 class="text-white" data-animation-out="fadeOutRight" data-delay-out="5" data-duration-in=".3" data-animation-in="fadeInLeft" data-delay-in=".1">Your bright future is our mission</h1>
<p class="text-muted mb-4" data-animation-out="fadeOutRight" data-delay-out="5" data-duration-in=".3" data-animation-in="fadeInLeft" data-delay-in=".4">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor
incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exer</p>
<a href="contact.html" class="btn btn-primary" data-animation-out="fadeOutRight" data-delay-out="5" data-duration-in=".3" data-animation-in="fadeInLeft" data-delay-in=".7">Apply now</a>
</div>
</div>
</div>
<!-- slider item -->
<div class="hero-slider-item">
<div class="row">
<div class="col-md-8">
<h1 class="text-white" data-animation-out="fadeOutUp" data-delay-out="5" data-duration-in=".3" data-animation-in="fadeInDown" data-delay-in=".1">Your bright future is our mission</h1>
<p class="text-muted mb-4" data-animation-out="fadeOutUp" data-delay-out="5" data-duration-in=".3" data-animation-in="fadeInDown" data-delay-in=".4">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor
incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exer</p>
<a href="contact.html" class="btn btn-primary" data-animation-out="fadeOutUp" data-delay-out="5" data-duration-in=".3" data-animation-in="fadeInDown" data-delay-in=".7">Apply now</a>
</div>
</div>
</div>
<!-- slider item -->
<div class="hero-slider-item">
<div class="row">
<div class="col-md-8">
<h1 class="text-white" data-animation-out="fadeOutDown" data-delay-out="5" data-duration-in=".3" data-animation-in="fadeInUp" data-delay-in=".1">Your bright future is our mission</h1>
<p class="text-muted mb-4" data-animation-out="fadeOutDown" data-delay-out="5" data-duration-in=".3" data-animation-in="fadeInUp" data-delay-in=".4">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor
incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exer</p>
<a href="contact.html" class="btn btn-primary" data-animation-out="fadeOutDown" data-delay-out="5" data-duration-in=".3" data-animation-in="zoomIn" data-delay-in=".7">Apply now</a>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- /hero slider -->
<!-- jQuery -->
<script src="static/plugins/jQuery/jquery.min.js"></script>
<!-- Bootstrap JS -->
<script src="static/plugins/bootstrap/bootstrap.min.js"></script>
<!-- slick slider -->
<script src="static/plugins/slick/slick.min.js"></script>
<!-- aos -->
<script src="static/plugins/aos/aos.js"></script>
<!-- venobox popup -->
<script src="static/plugins/venobox/venobox.min.js"></script>
<!-- filter -->
<script src="static/plugins/filterizr/jquery.filterizr.min.js"></script>
<!-- Main Script -->
<script src="static/js/script.js"></script>
</body>
</html>
\ No newline at end of file
(function ($) {
'use strict';
// Preloader js
$(window).on('load', function () {
$('.preloader').fadeOut(700);
});
// Sticky Menu
$(window).scroll(function () {
var height = $('.top-header').innerHeight();
if ($('header').offset().top > 10) {
$('.top-header').addClass('hide');
$('.navigation').addClass('nav-bg');
$('.navigation').css('margin-top', '-' + height + 'px');
} else {
$('.top-header').removeClass('hide');
$('.navigation').removeClass('nav-bg');
$('.navigation').css('margin-top', '-' + 0 + 'px');
}
});
// Background-images
$('[data-background]').each(function () {
$(this).css({
'background-image': 'url(' + $(this).data('background') + ')'
});
});
//Hero Slider
$('.hero-slider').slick({
autoplay: true,
autoplaySpeed: 7500,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
arrows: true,
fade: true,
prevArrow: '<button type=\'button\' class=\'prevArrow\'><i class=\'ti-angle-left\'></i></button>',
nextArrow: '<button type=\'button\' class=\'nextArrow\'><i class=\'ti-angle-right\'></i></button>',
dots: true
});
$('.hero-slider').slickAnimation();
// venobox popup
$(document).ready(function () {
$('.venobox').venobox();
});
// filter
$(document).ready(function () {
var containerEl = document.querySelector('.filtr-container');
var filterizd;
if (containerEl) {
filterizd = $('.filtr-container').filterizr({});
}
//Active changer
$('.filter-controls li').on('click', function () {
$('.filter-controls li').removeClass('active');
$(this).addClass('active');
});
});
// Count Up
function counter() {
var oTop;
if ($('.count').length !== 0) {
oTop = $('.count').offset().top - window.innerHeight;
}
if ($(window).scrollTop() > oTop) {
$('.count').each(function () {
var $this = $(this),
countTo = $this.attr('data-count');
$({
countNum: $this.text()
}).animate({
countNum: countTo
}, {
duration: 1000,
easing: 'swing',
step: function () {
$this.text(Math.floor(this.countNum));
},
complete: function () {
$this.text(this.countNum);
}
});
});
}
}
$(window).on('scroll', function () {
counter();
});
})(jQuery);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
window.marker = null;
function initialize() {
var map;
var latitude = $('#map_canvas').attr('data-latitude');
var longitude = $('#map_canvas').attr('data-longitude');
var nottingham = new google.maps.LatLng(latitude, longitude);
var style = [{
"featureType": "landscape",
"stylers": [{
"hue": "#FFAD00"
},
{
"saturation": 50.2
},
{
"lightness": -34.8
},
{
"gamma": 1
}
]
},
{
"featureType": "road.highway",
"stylers": [{
"hue": "#FFAD00"
},
{
"saturation": -19.8
},
{
"lightness": -1.8
},
{
"gamma": 1
}
]
},
{
"featureType": "road.arterial",
"stylers": [{
"hue": "#FFAD00"
},
{
"saturation": 72.4
},
{
"lightness": -32.6
},
{
"gamma": 1
}
]
},
{
"featureType": "road.local",
"stylers": [{
"hue": "#FFAD00"
},
{
"saturation": 74.4
},
{
"lightness": -18
},
{
"gamma": 1
}
]
},
{
"featureType": "water",
"stylers": [{
"hue": "#00FFA6"
},
{
"saturation": -63.2
},
{
"lightness": 38
},
{
"gamma": 1
}
]
},
{
"featureType": "poi",
"stylers": [{
"hue": "#FFC300"
},
{
"saturation": 54.2
},
{
"lightness": -14.4
},
{
"gamma": 1
}
]
}
];
var mapOptions = {
center: nottingham,
mapTypeId: google.maps.MapTypeId.ROADMAP,
backgroundColor: "#000",
zoom: 15,
panControl: false,
zoomControl: true,
mapTypeControl: false,
scaleControl: false,
streetViewControl: false,
overviewMapControl: false,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.LARGE
}
}
map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
var mapType = new google.maps.StyledMapType(style, {
name: "Grayscale"
});
map.mapTypes.set('grey', mapType);
map.setMapTypeId('grey');
var marker_image = 'plugins/google-map/images/marker.png';
var pinIcon = new google.maps.MarkerImage(marker_image, null, null, null, new google.maps.Size(37, 55));
marker = new google.maps.Marker({
position: nottingham,
map: map,
icon: pinIcon,
title: 'Shoper'
});
}
var map = document.getElementById('map_canvas');
if (map != null) {
google.maps.event.addDomListener(window, 'load', initialize);
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by Fontastic.me</metadata>
<defs>
<font id="slick" horiz-adv-x="512">
<font-face font-family="slick" units-per-em="512" ascent="480" descent="-32"/>
<missing-glyph horiz-adv-x="512" />
<glyph unicode="&#8594;" d="M241 113l130 130c4 4 6 8 6 13 0 5-2 9-6 13l-130 130c-3 3-7 5-12 5-5 0-10-2-13-5l-29-30c-4-3-6-7-6-12 0-5 2-10 6-13l87-88-87-88c-4-3-6-8-6-13 0-5 2-9 6-12l29-30c3-3 8-5 13-5 5 0 9 2 12 5z m234 143c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
<glyph unicode="&#8592;" d="M296 113l29 30c4 3 6 7 6 12 0 5-2 10-6 13l-87 88 87 88c4 3 6 8 6 13 0 5-2 9-6 12l-29 30c-3 3-8 5-13 5-5 0-9-2-12-5l-130-130c-4-4-6-8-6-13 0-5 2-9 6-13l130-130c3-3 7-5 12-5 5 0 10 2 13 5z m179 143c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
<glyph unicode="&#8226;" d="M475 256c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
<glyph unicode="&#97;" d="M475 439l0-128c0-5-1-9-5-13-4-4-8-5-13-5l-128 0c-8 0-13 3-17 11-3 7-2 14 4 20l40 39c-28 26-62 39-100 39-20 0-39-4-57-11-18-8-33-18-46-32-14-13-24-28-32-46-7-18-11-37-11-57 0-20 4-39 11-57 8-18 18-33 32-46 13-14 28-24 46-32 18-7 37-11 57-11 23 0 44 5 64 15 20 9 38 23 51 42 2 1 4 3 7 3 3 0 5-1 7-3l39-39c2-2 3-3 3-6 0-2-1-4-2-6-21-25-46-45-76-59-29-14-60-20-93-20-30 0-58 5-85 17-27 12-51 27-70 47-20 19-35 43-47 70-12 27-17 55-17 85 0 30 5 58 17 85 12 27 27 51 47 70 19 20 43 35 70 47 27 12 55 17 85 17 28 0 55-5 81-15 26-11 50-26 70-45l37 37c6 6 12 7 20 4 8-4 11-9 11-17z"/>
</font></defs></svg>
/* Slider */
.slick-slider
{
position: relative;
display: block;
box-sizing: border-box;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-touch-callout: none;
-khtml-user-select: none;
-ms-touch-action: pan-y;
touch-action: pan-y;
-webkit-tap-highlight-color: transparent;
}
.slick-list
{
position: relative;
display: block;
overflow: hidden;
margin: 0;
padding: 0;
}
.slick-list:focus
{
outline: none;
}
.slick-list.dragging
{
cursor: pointer;
cursor: hand;
}
.slick-slider .slick-track,
.slick-slider .slick-list
{
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.slick-track
{
position: relative;
top: 0;
left: 0;
display: block;
margin-left: auto;
margin-right: auto;
}
.slick-track:before,
.slick-track:after
{
display: table;
content: '';
}
.slick-track:after
{
clear: both;
}
.slick-loading .slick-track
{
visibility: hidden;
}
.slick-slide
{
display: none;
float: left;
height: 100%;
min-height: 1px;
}
[dir='rtl'] .slick-slide
{
float: right;
}
.slick-slide img
{
display: block;
}
.slick-slide.slick-loading img
{
display: none;
}
.slick-slide.dragging img
{
pointer-events: none;
}
.slick-initialized .slick-slide
{
display: block;
}
.slick-loading .slick-slide
{
visibility: hidden;
}
.slick-vertical .slick-slide
{
display: block;
height: auto;
border: 1px solid transparent;
}
.slick-arrow.slick-hidden {
display: none;
}
This diff is collapsed.
This diff is collapsed.
################# This file use to display the created GIF in the UI ##########################
import os
import urllib.request
from flask import flash, request, redirect, url_for, Flask, render_template
from werkzeug.utils import secure_filename
from reveng.uploadGifMain import main
ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gif'])
def allowed_file(filename):
return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
app = Flask(__name__)
@app.route('/', methods=['POST'])
def upload_image():
if 'file' not in request.files:
flash('No file part')
return redirect(request.url)
file = request.files['file']
if file.filename == '':
flash('No image selected for uploading')
return redirect(request.url)
if file and allowed_file(file.filename):
filename = secure_filename(file.filename)
file.save(os.path.join(main.config['UPLOAD_FOLDER'], filename))
#print('upload_image filename: ' + filename)
flash('Image successfully uploaded and displayed')
return render_template('upload.html', filename=filename)
else:
flash('Allowed image types are -> png, jpg, jpeg, gif')
return redirect(request.url)
@app.route('/display/<filename>')
def display_image(filename):
#print('display_image filename: ' + filename)
return redirect(url_for('static', filename='uploads/' + filename), code=301)
if __name__ == "__main__":
app.secret_key = "secret key"
app.run(debug=True)
<!---- This file use to display the created GIF in the UI -->
<!doctype html>
<html>
<head>
<title>Python Flask File Upload Example</title>
</head>
<body>
<h2>Select a file to upload</h2>
<p>
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class=flashes>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
</p>
{% if filename %}
<div>
<img src="{{ url_for('display_image', filename=filename) }}">
</div>
{% endif %}
<form method="post" action="/" enctype="multipart/form-data">
<dl>
<p>
<input type="file" name="file" autocomplete="off" required>
</p>
</dl>
<p>
<input type="submit" value="Submit">
</p>
</form>
</body>
</html>
\ No newline at end of file
################# This file use to display the created GIF in the UI ##########################
from flask import Flask
main = Flask(__name__)
UPLOAD_FOLDER = 'static/uploads/'
main.secret_key = "secret key"
main.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
main.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024
This diff is collapsed.
This diff is collapsed.
@mixin mobile-xs{
@media(max-width:370px){
@content;
}
}
@mixin mobile{
@media(max-width:575px){
@content;
}
}
@mixin tablet{
@media(max-width:767px){
@content;
}
}
@mixin desktop{
@media(max-width:991px){
@content;
}
}
@mixin desktop-lg{
@media(max-width:1200px){
@content;
}
}
@mixin desktop-xl{
@media(max-width:1400px){
@content;
}
}
@mixin size($size){
width: $size; height: $size;
}
\ No newline at end of file
This diff is collapsed.
// Color Variables
$primary-color: #ffbc3b;
$secondary-color: #1a1a37;
$text-color: #5c5c77;
$text-color-light: #8585a4;
$text-color-dark: #1e1e4b;
$body-color: #fff;
$border-color: #ededf1;
$black: #000;
$white: #fff;
$light: #f8f9fe;
$gray: #f8f8f8;
// Font Variables
$primary-font: 'Poppins', sans-serif;
$secondary-font: 'futura-bold';
$icon-font: 'themify';
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment