diff --git a/src/run.py b/src/run.py index 003d9c2..fd7f041 100644 --- a/src/run.py +++ b/src/run.py @@ -1,5 +1,4 @@ from flask import Flask, render_template, redirect, request, jsonify -import MySQLdb import os app = Flask(__name__) diff --git a/src/static/css/main.css b/src/static/css/main.css index f3c6d2e..b4b6e86 100644 --- a/src/static/css/main.css +++ b/src/static/css/main.css @@ -947,6 +947,154 @@ input:-ms-input-placeholder { color: #adadad;} +/*image board CSS================================================================*/ +.M_image_contents_container { + position: relative; + margin: auto; + margin-top: 20px; + margin-bottom: 20px; + width: 70%; + height: auto; + max-width: 800px; + padding-left: 5%; +} +@media screen and (min-width: 450px) { + .M_image_contents_container { + position: relative; + margin: auto; + margin-top: 20px; + margin-bottom: 20px; + width: 100%; + max-width: 800px; + height: auto; + } +} + +.M_user_profile_color { + display: inline-block; + width: 1%; + height: 28%; + background-color: mediumpurple; + border-radius: 20%; + margin-left: 2%; + margin-top: 1%; + float: left; +} + +.M_user_name { + display: inline-block; + margin-top: 1%; + margin-left: 1%; + float: left; + font-weight: bold; +} + +.M_time_info { + display: inline-block; + margin-top: 1%; + margin-left: 1%; + opacity: 0.6; +} + +.M_board_content_title { + display: block; + margin-top: 2%; + margin-left: 2%; + font-size: 130%; + font-weight: bold; +} + +.M_board_content_icon { + float: right; + opacity: 0.7; + margin-right: 1%; + margin-top: 0.5% +} + +.M_board_content_info { + float: right; + opacity: 0.7; + margin-right: 1%; +} +.M_image_content { + cursor: pointer; +} +.M_image_content_title { + position: fixed; + top: 100px; + left: 50px; + font-size: 40px; +} +@media screen and (max-width: 450px){ + .M_image_content_title { + position: fixed; + top: 70px; + left: 20px; + font-size: 40px; + } +} +.pseudo-scroller { + height: 3300px !important; +} +@media screen and (min-width: 1284px){ + .pseudo-scroller { + height: 2200px !important; + } +} + + + +/*image board CSS================================================================*/ +.M_image_contents_container { + position: relative; + margin: auto; + margin-top: 20px; + margin-bottom: 20px; + width: 70%; + height: auto; + max-width: 800px; + padding-left: 5%; +} +@media screen and (min-width: 450px) { + .M_image_contents_container { + position: relative; + margin: auto; + margin-top: 20px; + margin-bottom: 20px; + width: 100%; + max-width: 800px; + height: auto; + } +} +.M_image_content { + cursor: pointer; +} +.M_image_content_title { + position: fixed; + top: 100px; + left: 50px; + font-size: 40px; +} +@media screen and (max-width: 450px){ + .M_image_content_title { + position: fixed; + top: 70px; + left: 20px; + font-size: 40px; + } +} +.pseudo-scroller { + height: 3300px !important; +} +@media screen and (min-width: 1284px){ + .pseudo-scroller { + height: 2200px !important; + } +} +/*========== + + + /*image board CSS================================================================*/ .M_image_contents_container { position: relative; @@ -992,6 +1140,6 @@ input:-ms-input-placeholder { color: #adadad;} @media screen and (min-width: 1284px){ .pseudo-scroller { height: 2200px !important; - } + } } /*===============================================================================*/ \ No newline at end of file diff --git a/src/static/js/infinitescroll.js b/src/static/js/infinitescroll.js new file mode 100644 index 0000000..55d6564 --- /dev/null +++ b/src/static/js/infinitescroll.js @@ -0,0 +1,26 @@ +$(window).scroll(function() { + if ($(window).scrollTop() == $(document).height() - $(window).height()) { + let div_class = 'M_info_div M_board_content M_boxshadow M_board_content wow flipInX'; + if (localStorage.getItem('modakbul_theme') === 'dark') { + div_class += ' M_boxshadow_dark_shadow" style="' + + 'visibility: visible; background-color: rgb(73, 78, 82); color: rgb(245, 246, 250); border: 0px solid rgb(221, 221, 221);'; + } + + $(".M_board_contents_container") + .append( + '