diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 00000000..e6721b4a --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,38 @@ +.footer { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + background-color: black; + color: white; + text-align: center; + display: block; + padding: 10px 0; + } + + #corner-btn { + position: absolute; + right: 15px; + top: 15px; + padding:2px 4px; + } + + .analyzed_text{ + font-size: 1.1rem; + font-family: 'Roboto', sans-serif; + white-space: pre-wrap; + } + + .aboutus{ + font-size: 1.1rem; + } + + .analyzed_text:hover, .analyzed_css:hover{ + color: red; +} + +img.aboutimg{ + width: 50vw; + margin:auto auto; + display: block; +} \ No newline at end of file diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 00000000..2b8f8e34 Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/img/about.png b/static/img/about.png new file mode 100644 index 00000000..8da4f0ef Binary files /dev/null and b/static/img/about.png differ diff --git a/static/img/error.jpg b/static/img/error.jpg new file mode 100644 index 00000000..bc8c80cf Binary files /dev/null and b/static/img/error.jpg differ diff --git a/static/img/time.jpg b/static/img/time.jpg new file mode 100644 index 00000000..61cdff97 Binary files /dev/null and b/static/img/time.jpg differ diff --git a/templates/about.html b/templates/about.html index fe320a7d..3b1c5257 100644 --- a/templates/about.html +++ b/templates/about.html @@ -1,68 +1,81 @@ +{% load static %} - - - - - - + + + + - Text Utils-Results - - - - - - -
-

THIS PAGE IS STILL IN DEVELOPEMENT STAGE

+ + + + Text Utils- {{place}} + + + + + + + + +
+

TEXT-UTILS

+ About TextUtils +
+

Text Utils is a Django based text utility app which can remove newlines, punctuations, numbers + and extra spaces. It can also transforms the given text into uppercase. It is completely free to use and you can too contribute to its codebase. +

+
- - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/templates/analyze.html b/templates/analyze.html index 4bb031ff..862fba3a 100644 --- a/templates/analyze.html +++ b/templates/analyze.html @@ -1,114 +1,116 @@ +{% load static %} - - - - - - - - - Text Utils-Results - - - - - - + + + + + + + + + + + + + + - + Text Utils- {{place}} + + + -
+ + -

Your Analyzed Text - {{ purpose }}

-
-

- -

{{ analyzed_text }}

-

-
-
- - - - - - - - - + + + + - - + + } + + + + \ No newline at end of file diff --git a/templates/contact.html b/templates/contact.html new file mode 100644 index 00000000..33d28174 --- /dev/null +++ b/templates/contact.html @@ -0,0 +1,97 @@ +{% load static %} + + + + + + + + + + + + + + + Text Utils- {{place}} + + + + + + + + + +
+

Fill the form to get in touch with us.

+
{% csrf_token %} +
+ +
+ +
+ +
+ +
+ +
+ +
+ + +
+ + + +
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/templates/error.html b/templates/error.html new file mode 100644 index 00000000..3ad197c9 --- /dev/null +++ b/templates/error.html @@ -0,0 +1,75 @@ +{% load static %} + + + + + + + + + + + + + + + Text Utils- {{place}} + + + + + + + + +
+

You did not provide any instruction!!

+ About TextUtils +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 10f597d1..068cac0d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,159 +1,161 @@ +{% load static %} - - - - - - - - - - - Text Utils - - - - - - - +
+
{% csrf_token %} -
- {% csrf_token %} +
+

+ -
-

+ +

+ 0 Characters + +

+
- exampleFormControlTextarea1.addEventListener("keyup",function(){ - var characters = exampleFormControlTextarea1.value.split(''); - wordCount.innerText = characters.length; - }); - -

-
+
+ + +
-
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
- + -
- -
- + +
+
+ + var typed = new Typed('#typed', { + strings: ["You can do anything with your text here!", "Enter your text here and let Text Utils do the magic!"], + backSpeed: 15, + smartBackspace: true, + backDelay: 1200, + startDelay: 1000, + typeSpeed: 25, + loop: false, + + }); + -
-
- © 2019 Textutils.in -
-
- - - - - - - + + + - + + } + + + \ No newline at end of file diff --git a/templates/thanks.html b/templates/thanks.html new file mode 100644 index 00000000..1276f8ea --- /dev/null +++ b/templates/thanks.html @@ -0,0 +1,75 @@ +{% load static %} + + + + + + + + + + + + + + + Text Utils- {{place}} + + + + + + + + +
+

Thanks {{name}} for Contacting Us! We will get in touch soon...

+ Thanks for contacting us! +
+ + +
+
+ © 2019-{% now "Y" %} Textutils.in +
+
+ + + + + + + + + \ No newline at end of file diff --git a/textutils/settings.py b/textutils/settings.py index 2bf313b4..d1d73144 100644 --- a/textutils/settings.py +++ b/textutils/settings.py @@ -118,3 +118,6 @@ # https://docs.djangoproject.com/en/2.1/howto/static-files/ STATIC_URL = '/static/' +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, "static") +] \ No newline at end of file diff --git a/textutils/urls.py b/textutils/urls.py index 920f07ad..401bbc6a 100644 --- a/textutils/urls.py +++ b/textutils/urls.py @@ -21,6 +21,8 @@ path('admin/', admin.site.urls), path('', views.index, name='index'), path('analyze', views.analyze, name='analyze'), - path('about', views.about, name='about') - + path('about', views.about, name='about'), + path('contact', views.contact, name='contact'), + path('thanks', views.thanks, name='thanks'), + path('error', views.analyze, name='error') ] diff --git a/textutils/views.py b/textutils/views.py index 40cad6dd..afe59ea5 100644 --- a/textutils/views.py +++ b/textutils/views.py @@ -4,7 +4,8 @@ def index(request): - return render(request, 'index.html') + params = {'place': 'Home'} + return render(request, 'index.html', params) def analyze(request): @@ -26,7 +27,7 @@ def analyze(request): if char not in punctuations: analyzed = analyzed + char - params = {'purpose':'Removed Punctuations', 'analyzed_text': analyzed} + params = {'purpose':'Removed Punctuations', 'analyzed_text': analyzed, 'place': 'Analyzed Result'} djtext = analyzed if(fullcaps=="on"): @@ -34,7 +35,7 @@ def analyze(request): for char in djtext: analyzed = analyzed + char.upper() - params = {'purpose': 'Changed to Uppercase', 'analyzed_text': analyzed} + params = {'purpose': 'Changed to Uppercase', 'analyzed_text': analyzed, 'place': 'Analyzed Result'} djtext = analyzed if(extraspaceremover=="on"): @@ -48,7 +49,7 @@ def analyze(request): elif not(djtext[index] == " " and djtext[index+1]==" "): analyzed = analyzed + char - params = {'purpose': 'Removed NewLines', 'analyzed_text': analyzed} + params = {'purpose': 'Removed NewLines', 'analyzed_text': analyzed, 'place': 'Analyzed Result'} djtext = analyzed if (newlineremover == "on"): @@ -57,7 +58,7 @@ def analyze(request): if char != "\n" and char!="\r": analyzed = analyzed + char - params = {'purpose': 'Removed NewLines', 'analyzed_text': analyzed} + params = {'purpose': 'Removed NewLines', 'analyzed_text': analyzed, 'place': 'Analyzed Result'} if (numberremover == "on"): analyzed = "" @@ -67,14 +68,26 @@ def analyze(request): if char not in numbers: analyzed = analyzed + char - params = {'purpose': 'Removed NewLines', 'analyzed_text': analyzed} + params = {'purpose': 'Removed NewLines', 'analyzed_text': analyzed, 'place': 'Analyzed Result'} djtext = analyzed if(removepunc != "on" and newlineremover!="on" and extraspaceremover!="on" and fullcaps!="on" and numberremover != "on"): - return HttpResponse("please select any operation and try again") + return render(request, 'error.html') return render(request, 'analyze.html', params) def about(request): - return render(request, 'about.html') \ No newline at end of file + params={'place': 'About Us'} + return render(request, 'about.html', params) + +def contact(request): + params={'place': 'Contact Us'} + return render(request, 'contact.html', params) + +def thanks(request): + name = request.POST.get('name1', 'User') + name = name.capitalize() + + params = {'name': name, 'place': 'Thank You'} + return render(request, 'thanks.html', params) \ No newline at end of file