diff --git a/app/main/views.py b/app/main/views.py index af29893..657fe70 100644 --- a/app/main/views.py +++ b/app/main/views.py @@ -48,6 +48,8 @@ def index(): if form.validate_on_submit(): soup = ripper.get_soup_obj(form.search.data, headers) download_comic_files(soup) - return render_template('success.html', title=ripper.get_title(soup)) + title = ripper.get_title(soup) + cover = title + ' 000.jpg' + return render_template('success.html', title=title, cover=cover) return render_template('index.html', form=form) \ No newline at end of file diff --git a/app/panelrip/zipper.py b/app/panelrip/zipper.py index 230c0c8..117b4fb 100644 --- a/app/panelrip/zipper.py +++ b/app/panelrip/zipper.py @@ -10,6 +10,7 @@ def create_comic_archive(title, folder): output = shutil.make_archive(title, 'zip', folder) os.rename(output, os.path.join(folder, title +'.cbr')) print('Performing folder cleanup...') + ignore = ('.cbr', '000.jpg') for img in os.listdir(folder): - if not img.endswith('.cbr'): + if not img.endswith(ignore): os.remove(os.path.join(folder, img)) \ No newline at end of file diff --git a/app/static/css/site.css b/app/static/css/site.css new file mode 100644 index 0000000..8e19db7 --- /dev/null +++ b/app/static/css/site.css @@ -0,0 +1,28 @@ +input::-webkit-input-placeholder, input::-moz-placeholder, :input-moz-placeholder, input:-ms-input-placeholder { + text-align: center; +} + +.jumbotron { + position: relative; + background: url(../esm-bg.jpg); + background-size: cover; + background-repeat: no-repeat; + height: 350px; +} + +.jumbo-info { + position: absolute; + top: 180px; + left: 0; + color: white; +} + + +.jumbo-info h1 { + font-weight: 900; +} + + +.cover { + height: 300px; +} \ No newline at end of file diff --git a/app/static/dp-bg.png b/app/static/dp-bg.png new file mode 100644 index 0000000..374b982 Binary files /dev/null and b/app/static/dp-bg.png differ diff --git a/app/templates/index.html b/app/templates/index.html index 73bfe2c..30012a6 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -1,11 +1,81 @@ -

Save All Comics!

-
-{{ form.hidden_tag() }} -

Please input a Readallcomics.com link

-{{ form.search(placeholder='Comic URL, eg: https://readallcomics.com/marauders-001-2019/') }} -{{ form.submit() }} -
-

About Saveallcomics

-

We hope you have enjoyed using Saveallcomics! We are a totally FREE project without profit.

+ + + + + + -

© 2019 Saveallcomics. Some rights reserved.

\ No newline at end of file + + + + + + + + + + Save All Comics! + + + + + +
+ + +
+

Save All Comics!

+
Save & Read online comics on your OWN time.
+
+
+ + +
+ +
+
+
+ {{ form.hidden_tag() }} +

Please input a Readallcomics.com link

+ {{ form.search(class="form-control", placeholder='Comic URL, eg: https://readallcomics.com/marauders-001-2019/') }} + {{ form.submit(class="btn btn-primary btn-lg mt-4") }} +
+
+
+ + + +
+ + + + + + + + \ No newline at end of file diff --git a/app/templates/success.html b/app/templates/success.html index 3b83f76..49d2405 100644 --- a/app/templates/success.html +++ b/app/templates/success.html @@ -1,5 +1,110 @@ -

Huzzah! It Worked!

-

Download {{ title }}

-{% set download = title + '/' + title + '.cbr' %} - -« Back to Home \ No newline at end of file + + + + + + + + + + + + + + + + + Save All Comics! + + + + + +
+ + +
+

Save All Comics!

+
Save & Read online comics on your OWN time.
+
+
+ + +
+ +
+
+ « Back Home +

Downloading {{ title }}

+ {% set img = title + '/' + cover %} + +
+
+

Thank you for using SaveAllComics! We are a totally FREE project without profit.

+ {% set download = title + '/' + title + '.cbr' %} + Download {{ title }} +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + Huzzah! It Worked! + + +
+ +
+ + + + + + + + \ No newline at end of file