diff --git a/stashr/routes.py b/stashr/routes.py index a626717..4fc51e8 100644 --- a/stashr/routes.py +++ b/stashr/routes.py @@ -116,6 +116,10 @@ def index_page(): flash('First Run') return redirect(url_for('first_run_page')) + if not current_user.is_authenticated: + flash('Please Log IN', 'Info') + return redirect(url_for('login_page')) + return render_template( 'index_page.html', title='Home', @@ -156,28 +160,6 @@ def login_page(): ) -# REGISTER -@app.route('/register', methods=['GET', 'POST']) -def register_page(): - - if not stashrconfig['APP']['open_registration']: - flash('Registration Closed', 'error') - return redirect(url_for('login_page')) - - registration_form = forms.registration_form() - - if registration_form.validate_on_submit() and registration_form.register_button.data: - utils.register_new_user(registration_form) - return redirect(url_for('login_page')) - - return render_template( - 'register_page.html', - registration_form=registration_form, - title='Register', - open_registration=stashrconfig['APP']['open_registration'] - ) - - # FORGOT PASSWORD @app.route('/forgot', methods=['GET', 'POST']) def forgot_page(): @@ -211,7 +193,7 @@ def logout_page(): logout_user() # identity_changed.send(current_app._get_current_object(), identity=AnonymousIdentity()) flash('Logged Out', 'info') - return redirect(url_for('index_page')) + return redirect(url_for('login_page')) """ --- SETTINGS --- """ @@ -477,21 +459,21 @@ def settings_plugins_page(): # FIRST RUN @app.route('/firstrun', methods=['GET', 'POST']) def first_run_page(): - + if current_user.is_authenticated: flash('App Configured', 'info') - return redirect(url_for('index_page')) + return redirect(url_for('login_page')) if not stashrconfig['APP']['first_run']: flash('App Configured', 'info') - return redirect(url_for('index_page')) - + return redirect(url_for('login_page')) + first_run_form = forms.app_first_run_form() - if request.method == 'POST' and first_run_form.first_run_button.data: + if request.method == 'POST' and first_run_form.first_run_button.data and first_run_form.validate(): utils.complete_first_run(first_run_form) flash('Setup Complete', 'success') - return redirect(url_for('index_page')) + return redirect(url_for('login_page')) return render_template( 'first_run_page.html', @@ -709,6 +691,27 @@ def custom_image_static(foldername, filename): def custom_service_worker(): return app.send_static_file('js/service-worker.js') + +""" --- v TEST AREA v --- """ + +@app.route('/test_login') +def test_login(): + + login_form = forms.login_form() + + return render_template( + 'test_login.html', + login_form = login_form + ) + +@app.route('/test_base') +def test_base(): + return render_template( + 'test_base.html' + ) + +""" --- ^ TEST AREA ^ --- """ + """------------------------------------------------------------------------------------------- -- DEVELOPMENT -------------------------------------------------------------------------------------------""" diff --git a/stashr/static/css/stashr.css b/stashr/static/css/stashr.css index 34d4690..1c7ed61 100644 --- a/stashr/static/css/stashr.css +++ b/stashr/static/css/stashr.css @@ -1,72 +1,50 @@ -/* START NEW STASHR CLASSES */ - -body { background:#444444; } +body { display: flex; flex-wrap: nowrap; height: 100vh; height: -webkit-fill-available; overflow-x: auto; overflow-y: hidden; background-color:#2c2d35 !important; } ul { list-style-type: none; } -.center { text-align:center; } +.login { align-items: center !important; } -@media screen and (max-width: 800px) { - .stashr-cover_size {max-width:100px;min-width:20px;min-height:150px;} +@media screen and (max-width: 768px) { + .stashr-menu { margin-left:-280px; } + .stashr-item_container {max-width:100px;min-width:20px;min-height:150px;} } -@media screen and (min-width: 800px) { - .stashr-cover_size {max-width:160px;min-width:100px;min-height:150px;} +@media screen and (min-width: 768px) { + .stashr-menu { margin-left:0px; } + .stashr-item_container {max-width:160px;min-width:100px;min-height:150px;} } -#app {margin:0;padding:0;} - -body .stashrRead { margin:0;background-color:black; } - -.stashr-project_title { font-family: 'Grand Hotel', cursive;font-size:xx-large;line-height:40px;vertical-align: middle; } -.stashr-series_title { font-family: 'Oswald', sans-serif;font-weight:bold; } - -.stashr-series_info {min-width:30%;max-width:60%;} - -.stashr-poster_wrapper {position:relative;background-color:pink;z-index:5;} -.stashr-badge_tl {position:absolute;top:-5;left:-5;z-index:4;} -.stashr-badge_tr {position:absolute;top:-5;right:-5;z-index:4;} -.stashr-badge_bl {position:absolute;bottom:-5;left:-5;z-index:4;} -.stashr-badge_br {position:absolute;bottom:-5;right:-5;z-index:4;} -.stashr-poster_container {position:relative;overflow:hidden;} -.stashr-overlay_top {position:absolute;top:0;background-color:rgba(220,220,220,.9);z-index:5;} -.stashr-overlay_bottom {position:absolute;bottom:0;background-color:rgba(220,220,220,.9);z-index:5;} -.stashr-poster_background {z-index:0;} -.stashr-poster_link {position:absolute;top:0;left:0;width:100%;height:100%;} -.stashr-poster_image {margin: 0 auto;display: block;vertical-align: middle;} - -.stashr-test_display {position:relative;display:inline-block;vertical-align:middle;} -.stashr-test-image {margin:0 auto;display:block;vertical-align:middle;width:100%;} - -.swiper-container { width:100%;height:100%;padding:0px;margin:0px; } -.swiper-wrapper { padding:0px;margin:0px; } -.swiper-slide { width:100%;height:100%;background: black; } -.swiper-slide img { height:100%; } - +.bg-mine { background: #3e3e44; } + +.stashr-menu { transition: 0.5s; } +.stashr-footer { position:fixed; bottom:0; z-index:6; } +.stashr-item_container { overflow: hidden; } +.stashr-poster_container { position:relative; overflow: hidden; } +.stashr-poster_info { position:absolute; top:0; left:0; z-index:3; border-bottom-right-radius: 25%; } +.stashr-badge_top_left { position:absolute; top:0; left:0; z-index:3; border-bottom-right-radius: 25%; } +.stashr-badge_bottom_left { position:absolute; bottom:0; left:0; z-index:3; border-top-right-radius: 25%; } +.stashr-badge_top_right { position:absolute; top:0; right:0; z-index:3; border-bottom-left-radius: 25%; } +.stashr-badge_bottom_right { position:absolute; bottom:0; right:0; z-index:3; border-top-left-radius: 25%; } +.stashr-poster_tag { position: absolute; height:0; right:0; width:25%; padding-bottom:25%; transform: rotate(45deg); z-index:3; margin-top:-12.5%; margin-right:-12.5%; } +.stashr-poster { position:absolute; top:0; left:0; } +.stashr-overlay_top { position:absolute; top:0; background-color:rgba(220,220,220,.9); z-index:4; } +.stashr-overlay_bottom { position:absolute; bottom:0; background-color:rgba(220,220,220,.9); z-index:4; } +.stashr-progress_wrapper { position:absolute; bottom:0; z-index:3; } +.stashr-poster_wrapper { position:relative; overflow:hidden; } +.stashr-link { text-decoration: none; } .stashr-button_container {position:fixed;bottom:10;right:10;opacity:.7;z-index:999;} -.stashr-button_container_reader {position:fixed;bottom:0;right:0;opacity:.7;z-index:999;} -.stashr-button { display:table-cell;vertical-align:middle;width:60px;height:60px; } - -.stashr-check_box {position:absolute;top:0;right:0;z-index:5;} - -.btn-circle.btn-sm { - width: 30px; - height: 30px; - padding: 6px 0px; - border-radius: 15px; - font-size: 8px; - text-align: center; -} -.btn-circle.btn-md { - width: 50px; - height: 50px; - padding: 7px 10px; - border-radius: 25px; - font-size: 10px; - text-align: center; -} -.btn-circle.btn-xl { - width: 70px; - height: 70px; - padding: 10px 16px; - border-radius: 35px; - font-size: 12px; - text-align: center; -} \ No newline at end of file +.stashr-menu_button_container {position:fixed;bottom:10;left:10;opacity:.7;z-index:999;} +.stashr-reader { background:black; } +.new-stashr-button_container { opacity:.7; } + +.btn-circle.btn-sm { width: 30px; height: 30px; padding: 6px 0px; border-radius: 15px; font-size: 8px; text-align: center; margin:2px; } +.btn-circle.btn-md { width: 50px; height: 50px; padding: 7px 10px; border-radius: 25px; font-size: 10px; text-align: center; margin:2px; } +.btn-circle.btn-xl { width: 70px; height: 70px; padding: 10px 16px; border-radius: 35px; font-size: 12px; text-align: center; margin:2px; } + +.stashr-signin { width: 100%; max-width: 330px; padding: 15px; margin: auto; } +.stashr-signin .checkbox { font-weight: 400; } +.stashr-signin .form-floating:focus-within { z-index: 2; } +.stashr-signin input[type="username"] { margin-bottom: -1px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } +.stashr-signin input[type="password"] { margin-bottom: 10px; border-top-left-radius: 0; border-top-right-radius: 0; } +.stashr-logo { position:relative; top:-85px; width:170px; height:170px; border-radius: 50%; border: 10px solid #2c2d35; margin-bottom:-70px; } + +.stashr-firstrun { width: 100%; max-width: 330px; padding: 15px; margin: auto; } +.stashr-firstrun .form-floating:focus-within { z-index: 2; } +.stashr-firstrun input { margin-bottom: 5px; } \ No newline at end of file diff --git a/stashr/static/js/stashr.js b/stashr/static/js/stashr.js index 376d7c7..1632e9c 100644 --- a/stashr/static/js/stashr.js +++ b/stashr/static/js/stashr.js @@ -2,7 +2,17 @@ function stashrToast(message, type) { Vue.$toast.open({ message: message, type: type, - position: 'bottom-left', + position: 'bottom-right', dismissable: true }); +} + +function toggleMenu() { + console.log('Toggle MENU') + var margin = getComputedStyle(document.querySelector('#sideMenu')).marginLeft; + if(margin == '0px') { + document.getElementById('sideMenu').style.marginLeft = "-280px"; + } else { + document.getElementById('sideMenu').style.marginLeft = "0px" + } } \ No newline at end of file diff --git a/stashr/templates/all_collections_page.html b/stashr/templates/all_collections_page.html index 591f2ff..289eab1 100644 --- a/stashr/templates/all_collections_page.html +++ b/stashr/templates/all_collections_page.html @@ -30,8 +30,10 @@ Vue.component('collections', { props: ['collections'], template: `