├── apps ├── tests.py ├── __init__.py ├── migrations │ ├── __init__.py │ ├── 0002_alter_post_created_at.py │ ├── 0004_alter_comment_created_at_alter_post_created_at.py │ ├── 0003_alter_comment_author_alter_comment_blog.py │ └── 0001_initial.py ├── static │ ├── images │ │ ├── img-01.png │ │ └── icons │ │ │ └── favicon.ico │ ├── assets │ │ ├── fonts │ │ │ ├── ElegantIcons.eot │ │ │ ├── ElegantIcons.ttf │ │ │ └── ElegantIcons.woff │ │ ├── sass │ │ │ ├── base │ │ │ │ ├── _utils.scss │ │ │ │ ├── _align.scss │ │ │ │ ├── _typography.scss │ │ │ │ ├── _player_color.scss │ │ │ │ └── _reset.scss │ │ │ ├── components │ │ │ │ ├── _tag.scss │ │ │ │ ├── _social_block.scss │ │ │ │ ├── _quantity_controller.scss │ │ │ │ ├── _blog_sidebar.scss │ │ │ │ ├── _breadcrumb.scss │ │ │ │ ├── _pagination.scss │ │ │ │ ├── _tab.scss │ │ │ │ ├── _button.scss │ │ │ │ ├── _subcribe_bar.scss │ │ │ │ ├── _author.scss │ │ │ │ ├── _footer.scss │ │ │ │ ├── _search.scss │ │ │ │ ├── _instagrams.scss │ │ │ │ ├── _checkbox_customed.scss │ │ │ │ ├── _product.scss │ │ │ │ ├── _subcribe_box.scss │ │ │ │ ├── _trending_post.scss │ │ │ │ ├── _video_block.scss │ │ │ │ ├── _category.scss │ │ │ │ └── _news_block.scss │ │ │ ├── layout │ │ │ │ ├── _content.scss │ │ │ │ ├── _load.scss │ │ │ │ ├── _about.scss │ │ │ │ ├── _404.scss │ │ │ │ ├── _contact.scss │ │ │ │ ├── _category.scss │ │ │ │ └── _checkout.scss │ │ │ ├── abstracts │ │ │ │ ├── _function.scss │ │ │ │ └── _variable.scss │ │ │ ├── custom_bootstrap.scss │ │ │ └── style.scss │ │ ├── css │ │ │ └── slick.css │ │ └── js │ │ │ └── imagesloaded.pkgd.min.js │ ├── fonts │ │ ├── poppins │ │ │ ├── Poppins-Bold.ttf │ │ │ ├── Poppins-Thin.ttf │ │ │ ├── Poppins-Black.ttf │ │ │ ├── Poppins-Italic.ttf │ │ │ ├── Poppins-Light.ttf │ │ │ ├── Poppins-Medium.ttf │ │ │ ├── Poppins-Regular.ttf │ │ │ ├── Poppins-ExtraBold.ttf │ │ │ ├── Poppins-SemiBold.ttf │ │ │ ├── Poppins-BlackItalic.ttf │ │ │ ├── Poppins-BoldItalic.ttf │ │ │ ├── Poppins-ExtraLight.ttf │ │ │ ├── Poppins-LightItalic.ttf │ │ │ ├── Poppins-MediumItalic.ttf │ │ │ ├── Poppins-ThinItalic.ttf │ │ │ ├── Poppins-SemiBoldItalic.ttf │ │ │ ├── Poppins-ExtraBoldItalic.ttf │ │ │ └── Poppins-ExtraLightItalic.ttf │ │ ├── montserrat │ │ │ ├── Montserrat-Black.ttf │ │ │ ├── Montserrat-Bold.ttf │ │ │ ├── Montserrat-Italic.ttf │ │ │ ├── Montserrat-Light.ttf │ │ │ ├── Montserrat-Medium.ttf │ │ │ ├── Montserrat-Thin.ttf │ │ │ ├── Montserrat-Regular.ttf │ │ │ ├── Montserrat-SemiBold.ttf │ │ │ ├── Montserrat-BlackItalic.ttf │ │ │ ├── Montserrat-BoldItalic.ttf │ │ │ ├── Montserrat-ExtraBold.ttf │ │ │ ├── Montserrat-ExtraLight.ttf │ │ │ ├── Montserrat-LightItalic.ttf │ │ │ ├── Montserrat-ThinItalic.ttf │ │ │ ├── Montserrat-MediumItalic.ttf │ │ │ ├── Montserrat-ExtraBoldItalic.ttf │ │ │ ├── Montserrat-ExtraLightItalic.ttf │ │ │ ├── Montserrat-SemiBoldItalic.ttf │ │ │ └── OFL.txt │ │ └── font-awesome-4.7.0 │ │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ │ ├── less │ │ │ ├── screen-reader.less │ │ │ ├── fixed-width.less │ │ │ ├── larger.less │ │ │ ├── list.less │ │ │ ├── core.less │ │ │ ├── stacked.less │ │ │ ├── font-awesome.less │ │ │ ├── bordered-pulled.less │ │ │ ├── rotated-flipped.less │ │ │ ├── path.less │ │ │ ├── animated.less │ │ │ └── mixins.less │ │ │ ├── scss │ │ │ ├── _fixed-width.scss │ │ │ ├── _screen-reader.scss │ │ │ ├── _larger.scss │ │ │ ├── _list.scss │ │ │ ├── _core.scss │ │ │ ├── font-awesome.scss │ │ │ ├── _stacked.scss │ │ │ ├── _bordered-pulled.scss │ │ │ ├── _rotated-flipped.scss │ │ │ ├── _path.scss │ │ │ ├── _animated.scss │ │ │ └── _mixins.scss │ │ │ └── HELP-US-OUT.txt │ ├── css │ │ └── 404_css.css │ ├── js │ │ ├── main.js │ │ └── jquery.maskedinput.min.js │ └── vendor │ │ ├── bootstrap │ │ └── css │ │ │ ├── bootstrap-reboot.min.css │ │ │ └── bootstrap-reboot.css │ │ └── tilt │ │ └── tilt.jquery.min.js ├── apps.py ├── utils │ ├── __init__.py │ ├── token.py │ ├── cron.py │ ├── pdf.py │ ├── send_sms_to_phone.py │ ├── context_protsessor.py │ └── tasks.py ├── token.py ├── context_processors.py ├── urls.py ├── admin.py └── forms.py ├── Makefile ├── root ├── __init__.py ├── celery.py ├── asgi.py ├── wsgi.py └── urls.py ├── templates ├── apps │ ├── auth │ │ ├── activation_account.html │ │ ├── base.html │ │ ├── settings.html │ │ ├── login.html │ │ ├── email │ │ │ └── reset_email_password.html │ │ ├── change_password.html │ │ └── signup.html │ ├── parts │ │ ├── header.html │ │ ├── trending.html │ │ ├── base.html │ │ └── footer.html │ ├── about.html │ ├── contact.html │ ├── blog-category.html │ └── add-post.html ├── admin │ ├── custom │ │ ├── change_message_form.html │ │ ├── change_form.html │ │ ├── submit_line.html │ │ └── email.html │ ├── change_form.html │ └── base_site.html └── pdf.html ├── hjj.py ├── manage.py ├── requirements.txt ├── README.md └── .gitignore /apps/tests.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | mig: 2 | python3 manage.py makemigrations 3 | python3 manage.py migrate -------------------------------------------------------------------------------- /root/__init__.py: -------------------------------------------------------------------------------- 1 | from .celery import app as celery_app 2 | 3 | __all__ = ('celery_app',) -------------------------------------------------------------------------------- /apps/static/images/img-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/images/img-01.png -------------------------------------------------------------------------------- /apps/static/images/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/images/icons/favicon.ico -------------------------------------------------------------------------------- /apps/static/assets/fonts/ElegantIcons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/assets/fonts/ElegantIcons.eot -------------------------------------------------------------------------------- /apps/static/assets/fonts/ElegantIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/assets/fonts/ElegantIcons.ttf -------------------------------------------------------------------------------- /apps/static/assets/fonts/ElegantIcons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/assets/fonts/ElegantIcons.woff -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-Bold.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-Thin.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-Black.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-Italic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-Light.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-Medium.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-Regular.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-ExtraBold.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-SemiBold.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-Black.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-Italic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-Light.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-Medium.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-Thin.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-BlackItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-BoldItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-ExtraLight.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-LightItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-MediumItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-ThinItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-SemiBold.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-BlackItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-BoldItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-ExtraBold.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-ExtraLight.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-LightItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-ThinItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/poppins/Poppins-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/poppins/Poppins-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-MediumItalic.ttf -------------------------------------------------------------------------------- /apps/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'apps' 7 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/font-awesome-4.7.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/Montserrat-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/montserrat/Montserrat-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /apps/utils/__init__.py: -------------------------------------------------------------------------------- 1 | from apps.utils.pdf import render_to_pdf 2 | from apps.utils.tasks import send_to_gmail, send_to_contact 3 | from apps.utils.token import one_time_token -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javlondevv/django_blog/HEAD/apps/static/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only(); } 5 | .sr-only-focusable { @include sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /apps/static/assets/sass/base/_utils.scss: -------------------------------------------------------------------------------- 1 | @mixin spaceTrim { 2 | &:first-child { 3 | margin-left: 0; 4 | padding-left: 0; 5 | } 6 | &:last-child { 7 | margin-right: 0; 8 | padding-right: 0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /templates/apps/auth/activation_account.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Hi {{ user.username }}, 3 | 4 | Please click on the link below to confirm your registration: 5 | 6 | http://{{ domain }}/activate/{{ uid }}/{{ token }} 7 | {% endautoescape %} -------------------------------------------------------------------------------- /root/celery.py: -------------------------------------------------------------------------------- 1 | import os 2 | from celery import Celery 3 | 4 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'root.settings') 5 | 6 | app = Celery('root') 7 | 8 | app.config_from_object('django.conf:settings', namespace='CELERY') 9 | 10 | app.autodiscover_tasks() 11 | 12 | -------------------------------------------------------------------------------- /templates/admin/custom/change_message_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'admin/change_form.html' %} 2 | 3 | {% block after_related_objects %} 4 | {{ block.super }} 5 | {% if not original.status %} 6 | 7 | {% endif %} 8 | {% endblock %} -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_tag.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Tag 3 | ***************************/ 4 | .tag-btn { 5 | @include button($fw: 400, $pd: 15px, $color: setColor(subTitle)); 6 | display: inline-block; 7 | margin-right: 15px; 8 | margin-bottom: 15px; 9 | } 10 | -------------------------------------------------------------------------------- /apps/static/assets/sass/layout/_content.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Content 3 | ***************************/ 4 | #content { 5 | padding-top: remCal(180); 6 | &.no-pd { 7 | padding-top: remCal(70); 8 | } 9 | &.breadcrumb-pd { 10 | padding-top: remCal(140); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /templates/admin/custom/change_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'admin/change_form.html' %} 2 | 3 | {% block after_related_objects %} 4 | {{ block.super }} 5 | 6 | 7 | 8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /templates/admin/change_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'admin/change_form.html' %} 2 | 3 | {% block after_related_objects %} 4 | {{ block.super }} 5 | 6 | 7 | 8 | 9 | {% endblock %} -------------------------------------------------------------------------------- /apps/utils/token.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.tokens import PasswordResetTokenGenerator 2 | import six 3 | class OneTimeTokenGenerator(PasswordResetTokenGenerator): 4 | def _make_hash_value(self, user, timestamp): 5 | return ( 6 | six.text_type(user.pk) + six.text_type(timestamp) + six.text_type(user.is_active) 7 | ) 8 | 9 | 10 | 11 | one_time_token = OneTimeTokenGenerator() -------------------------------------------------------------------------------- /templates/admin/custom/submit_line.html: -------------------------------------------------------------------------------- 1 | {% extends 'admin/submit_line.html' %} 2 | {% load i18n admin_urls %} 3 | 4 | {% block submit-row %} 5 | 8 | 9 | {{ block.super }} 10 | {% endblock %} -------------------------------------------------------------------------------- /apps/token.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.tokens import PasswordResetTokenGenerator 2 | import six 3 | 4 | 5 | class OneTimeToken(PasswordResetTokenGenerator): 6 | def _make_hash_value(self, user, timestamp): 7 | return ( 8 | six.text_type(user.pk) + six.text_type(timestamp) + 9 | six.text_type(user.is_active) 10 | ) 11 | 12 | 13 | one_time_token = OneTimeToken() 14 | -------------------------------------------------------------------------------- /apps/static/assets/sass/base/_align.scss: -------------------------------------------------------------------------------- 1 | @mixin imgCenter($height: 100%, $width: 100%) { 2 | height: $height; 3 | width: $width; 4 | object-fit: cover; 5 | } 6 | 7 | @mixin flexAlign($vertical: center, $horizontal: center, $direction: row) { 8 | display: flex; 9 | flex-direction: $direction; 10 | align-items: $vertical; 11 | justify-content: $horizontal; 12 | } 13 | 14 | .center { 15 | text-align: center; 16 | } 17 | -------------------------------------------------------------------------------- /root/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for root project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'root.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /root/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for root project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'root.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /apps/context_processors.py: -------------------------------------------------------------------------------- 1 | from apps.models import Post, Category, Info 2 | from root import settings 3 | 4 | 5 | def custom_posts(request): 6 | return { 7 | "custom_posts": Post.objects.order_by('-created_at') 8 | } 9 | 10 | 11 | def custom_categories(request): 12 | return { 13 | "custom_categories": Category.objects.all() 14 | } 15 | 16 | 17 | def site_info(request): 18 | return { 19 | "info": Info.objects.first() 20 | } 21 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /apps/migrations/0002_alter_post_created_at.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.3 on 2022-12-10 10:26 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('apps', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='post', 15 | name='created_at', 16 | field=models.DateField(auto_now_add=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /apps/static/assets/sass/layout/_load.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Load 3 | ***************************/ 4 | #load { 5 | position: fixed; 6 | top: 0; 7 | left: 0; 8 | right: 0; 9 | bottom: 0; 10 | background-color: #fff; 11 | z-index: 1000; 12 | display: flex; 13 | align-items: center; 14 | justify-content: center; 15 | .load__content { 16 | .load__icon { 17 | img { 18 | height: 80px; 19 | width: 80px; 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /templates/admin/base_site.html: -------------------------------------------------------------------------------- 1 | {% extends 'admin/base.html' %} 2 | {% load static %} 3 | {% block branding %} 4 | 5 | {% block extrastyle %} 6 | 7 | 8 | 9 | {% endblock %} 10 | 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_social_block.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Social block 3 | ***************************/ 4 | .social-block { 5 | a { 6 | @include button( 7 | $color: setColor(title), 8 | $bg: setColor(lightOverlay), 9 | $lh: emCal(15, 50), 10 | $pd: 0, 11 | $br: 999px 12 | ); 13 | display: inline-block; 14 | height: emCal(15, 50); 15 | width: emCal(15, 50); 16 | margin-right: emCal(15, 15); 17 | @include spaceTrim(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/utils/cron.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import django 4 | from django.db.models import Q 5 | 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "root.settings") 7 | django.setup() 8 | 9 | from apps.models import Post 10 | import datetime 11 | 12 | 13 | def cron_job(): 14 | date = datetime.date.today() 15 | date_delta = datetime.timedelta(7) 16 | # Post.objects.filter(Q(created_at__lt=date - date_delta), Q(status=Post.Status.CANCEL)).delete() 17 | s = Post.objects.get(pk=2) 18 | s.title = 'ssss' 19 | s.save() -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /apps/utils/pdf.py: -------------------------------------------------------------------------------- 1 | from io import BytesIO 2 | from django.http import HttpResponse 3 | from django.template.loader import get_template 4 | 5 | from xhtml2pdf import pisa 6 | 7 | 8 | def render_to_pdf(template_src, context_dict): 9 | template = get_template(template_src) 10 | html = template.render(context_dict) 11 | result = BytesIO() 12 | pdf = pisa.pisaDocument(BytesIO(html.encode("utf-8")), result) 13 | if not pdf.err: 14 | return HttpResponse(result.getvalue(), content_type='application/pdf') 15 | return None 16 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_quantity_controller.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Quantity controller 3 | ***************************/ 4 | .quantity-controller { 5 | padding: 0 emCal(16, 20); 6 | border: 1px solid setColor(yellow); 7 | display: flex; 8 | align-items: center; 9 | margin-right: emCal(16, 10); 10 | height: emCal(16, 50); 11 | input { 12 | border: 0; 13 | text-align: center; 14 | max-width: emCal(16, 60); 15 | @include typo($fsz: emCal(16, 15), $fw: 600); 16 | } 17 | a { 18 | @include link(setColor(title), setColor(yellow), $fsz: emCal(16, 16)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /hjj.py: -------------------------------------------------------------------------------- 1 | # costs = [1, 3, 2, 4, 1] 2 | # coins = 7 3 | # 4 | # 5 | # class Solution: 6 | # def maxIceCream(self, costs: list[int], coins: int) -> int: 7 | # result = res = 0 8 | # for i in sorted(costs): 9 | # result += i 10 | # res += 1 11 | # if result == coins: 12 | # return res 13 | # elif result >= coins: 14 | # return res 15 | # 16 | # 17 | # a = Solution() 18 | # print(a.maxIceCream([1, 6, 3, 1, 2, 5], 20)) 19 | 20 | 21 | version1 = "0.1" 22 | version2 = "1.1" 23 | if version1.count('.') == 2: 24 | print(0) 25 | elif version2.count('.') == 2: 26 | print(0) 27 | else: 28 | print(int(float(version1)-float(version2))) -------------------------------------------------------------------------------- /apps/utils/send_sms_to_phone.py: -------------------------------------------------------------------------------- 1 | # from twilio.rest import Client 2 | # from twilio.base.exceptions import TwilioRestException 3 | # 4 | # from root.settings import TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_VERIFY_SERVICE_SID 5 | # 6 | # client = Client(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN) 7 | # verify = client.verify.services(TWILIO_VERIFY_SERVICE_SID) 8 | # 9 | # 10 | # def send(phone): 11 | # verify.verifications.create(to=phone, channel='sms') 12 | # 13 | # 14 | # def check(phone, code): 15 | # try: 16 | # result = verify.verification_checks.create(to=phone, code=code) 17 | # except TwilioRestException: 18 | # print('no') 19 | # return False 20 | # return result.status == 'approved' 21 | -------------------------------------------------------------------------------- /apps/migrations/0004_alter_comment_created_at_alter_post_created_at.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.3 on 2022-12-12 09:56 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('apps', '0003_alter_comment_author_alter_comment_blog'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='comment', 15 | name='created_at', 16 | field=models.DateTimeField(auto_now_add=True), 17 | ), 18 | migrations.AlterField( 19 | model_name='post', 20 | name='created_at', 21 | field=models.DateTimeField(auto_now_add=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'root.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_blog_sidebar.scss: -------------------------------------------------------------------------------- 1 | .blog-sidebar { 2 | font-size: 16px; 3 | padding-left: emCal(16, 30); 4 | @include mq(lg) { 5 | padding-left: 0; 6 | } 7 | @include mq(md) { 8 | margin-bottom: emCal(16, 50); 9 | } 10 | @include mq(sm) { 11 | font-size: 15px; 12 | } 13 | .blog-sidebar-section { 14 | margin-bottom: remCal(60); 15 | &.-category { 16 | .category { 17 | margin-bottom: emCal(16, 15); 18 | &:last-child { 19 | margin-bottom: 0; 20 | } 21 | } 22 | } 23 | &.-trending-post { 24 | .trending-post { 25 | margin-bottom: emCal(16, 30); 26 | &:last-child { 27 | margin-bottom: 0; 28 | } 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | padding: remCal(50) 0 remCal(70); 3 | ul { 4 | & > li { 5 | display: inline-block; 6 | & > a { 7 | @include link(setColor(title), setColor(title), $fsz: emCal(16, 15)); 8 | i { 9 | margin-right: emCal(16, 10); 10 | } 11 | &:after { 12 | content: ">"; 13 | padding: 0 emCal(15, 10); 14 | } 15 | } 16 | &.active { 17 | & > a { 18 | @include link( 19 | setColor(regular), 20 | setColor(title), 21 | $fsz: emCal(16, 15) 22 | ); 23 | &:after { 24 | display: none; 25 | } 26 | } 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_pagination.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Pagination 3 | ***************************/ 4 | .pagination { 5 | ul { 6 | li { 7 | display: inline-block; 8 | margin-right: 5px; 9 | @include spaceTrim(); 10 | &.active { 11 | a { 12 | background-color: #000; 13 | color: #fff; 14 | &:hover { 15 | background-color: #000; 16 | color: #fff; 17 | } 18 | } 19 | } 20 | a { 21 | @include button( 22 | $fw: 400, 23 | $pd: 0, 24 | $color: setColor(subTitle), 25 | $br: 999px 26 | ); 27 | height: 40px; 28 | width: 40px; 29 | line-height: 40px; 30 | display: block; 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /apps/static/assets/sass/layout/_about.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | About us 3 | ***************************/ 4 | .about-us { 5 | font-size: 16; 6 | margin-bottom: remCal(70); 7 | &__image { 8 | width: 100%; 9 | padding-right: emCal(16, 30); 10 | @include mq(md) { 11 | margin-bottom: emCal(16, 30); 12 | padding-right: 0; 13 | } 14 | img { 15 | @include imgCenter; 16 | } 17 | } 18 | &__content { 19 | h3 { 20 | @include typo($fsz: emCal(16, 30), $fw: 700); 21 | margin-bottom: emCal(30, 35); 22 | } 23 | p { 24 | @include typo($fsz: emCal(16, 15), $lh: emCal(15, 27), $fw: 400); 25 | margin-bottom: emCal(15, 30); 26 | } 27 | .follow { 28 | p { 29 | @include typo($fsz: emCal(16, 15), $fw: 600); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /apps/static/assets/sass/abstracts/_function.scss: -------------------------------------------------------------------------------- 1 | //Calculation px to rem 2 | @function remCal($size) { 3 | @if ($size == "auto" or $size == "100%") { 4 | @return $size; 5 | } 6 | @return ($size/$rem-baseline) * 1rem; 7 | } 8 | 9 | //Calculation px to rem 10 | @function emCal($em, $size) { 11 | @return ($size/$em) * 1em; 12 | } 13 | 14 | //Golder ratio line height { 15 | @function goldLineHeight($font-size) { 16 | @return ($font-size/$rem-baseline * 1.42857) * 1rem; 17 | } 18 | 19 | //Check if color has exits 20 | @function setColor($color) { 21 | @if map-has-key($colors, $color) { 22 | @return map-get($colors, $color); 23 | } @else { 24 | @return $color; 25 | } 26 | } 27 | 28 | //Get color schema 29 | @function setSchmaColor($scheme, $tone: base) { 30 | @return map-get(map-get($colorscheme, $scheme), $tone); 31 | } 32 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /apps/migrations/0003_alter_comment_author_alter_comment_blog.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.3 on 2022-12-10 10:27 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('apps', '0002_alter_post_created_at'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='comment', 17 | name='author', 18 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), 19 | ), 20 | migrations.AlterField( 21 | model_name='comment', 22 | name='blog', 23 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='apps.post'), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_tab.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Tab 3 | ***************************/ 4 | .tab { 5 | .tab-header { 6 | margin-bottom: emCal(16, 45); 7 | ul { 8 | @include mq(md) { 9 | overflow-x: auto; 10 | white-space: nowrap; 11 | } 12 | & > li { 13 | display: inline-block; 14 | margin: 0 emCal(16, 25); 15 | @include spaceTrim; 16 | & > a { 17 | @include link( 18 | setColor(regular), 19 | setColor(title), 20 | $fsz: emCal(16, 18), 21 | $fw: 600 22 | ); 23 | &.active { 24 | color: setColor(title); 25 | } 26 | } 27 | } 28 | } 29 | } 30 | .tab-content { 31 | &__item { 32 | display: none; 33 | &.active { 34 | display: block; 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /apps/static/fonts/font-awesome-4.7.0/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /apps/static/assets/sass/base/_typography.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Typography 3 | ***************************/ 4 | 5 | //Generator some default font color 6 | @each $name, $value in $colors { 7 | .text-#{$name} { 8 | color: $value; 9 | } 10 | } 11 | 12 | .center-line-title { 13 | display: flex; 14 | align-items: center; 15 | margin-bottom: emCal(16, 40); 16 | font-size: 16px; 17 | &:after { 18 | content: ""; 19 | height: 1px; 20 | flex-grow: 1; 21 | display: block; 22 | background-color: setColor(border); 23 | } 24 | h5 { 25 | @include typo($fsz: emCal(16, 18), $fw: 600, $lh: 1, $up: true); 26 | margin-right: 15px; 27 | } 28 | &.-large { 29 | h5 { 30 | font-size: emCal(16, 26); 31 | } 32 | } 33 | &.-medium { 34 | h5 { 35 | font-size: emCal(16, 18); 36 | } 37 | } 38 | &.-mb-0 { 39 | margin-bottom: 0; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /apps/static/assets/sass/abstracts/_variable.scss: -------------------------------------------------------------------------------- 1 | //Default transition 2 | $transition: 0.2s ease-in-out; 3 | 4 | //Default colors 5 | $colors: ( 6 | title: #111, 7 | subTitle: #444, 8 | regular: #888, 9 | border: #e1e1e1, 10 | lightOverlay: #f5f5f5, 11 | yellow: #FF273C, 12 | blue: #11d2ef, 13 | violet: #537bdf, 14 | trans: transparent, 15 | ); 16 | 17 | //Color schema 18 | $colorscheme: ( 19 | gray: ( 20 | base: #ccc, 21 | light: #aeaeae, 22 | dark: #666, 23 | ), 24 | brown: ( 25 | base: #ab906b, 26 | light: #ecdac3, 27 | dark: #5e421c, 28 | ), 29 | ); 30 | 31 | //Cross-browser 32 | $prefixes: (webkit, moz, ms, o); 33 | 34 | //Rembaseline 35 | $rem-baseline: 16; 36 | 37 | //Font 38 | $font: ( 39 | color: #000, 40 | family: sans-serif, 41 | size: 16px, 42 | line-height: 1, 43 | ); 44 | 45 | //Breakpoint 46 | $breakpoint: ( 47 | sm: " 576px", 48 | md: "768px", 49 | lg: "992px", 50 | xl: "1200px", 51 | xxl: "1400px", 52 | xxxl: "1770px", 53 | ); 54 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_button.scss: -------------------------------------------------------------------------------- 1 | .btn { 2 | @include button( 3 | $color: #fff, 4 | $fsz: emCal(16, 14), 5 | $fw: 700, 6 | $up: true, 7 | $bg: setColor(yellow), 8 | $pd: emCal(14, 20) emCal(14, 30), 9 | $br: emCal(14, 5) 10 | ); 11 | display: inline-block; 12 | @include mq(sm) { 13 | font-size: 14px; 14 | } 15 | &.-normal { 16 | } 17 | &.-gray { 18 | @include button( 19 | $color: setColor(subTitle), 20 | $fsz: emCal(16, 14), 21 | $fw: 700, 22 | $up: true, 23 | $bg: #fff, 24 | $pd: emCal(14, 20) emCal(14, 30), 25 | $br: emCal(14, 5) 26 | ); 27 | border: 1px solid setColor(border); 28 | } 29 | &.-light-overlay { 30 | @include button( 31 | $color: setColor(title), 32 | $fsz: emCal(16, 14), 33 | $fw: 700, 34 | $up: true, 35 | $bg: setColor(lightOverlay), 36 | $pd: emCal(14, 20) emCal(14, 30), 37 | $br: emCal(14, 5) 38 | ); 39 | display: inline-block; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /apps/static/assets/sass/custom_bootstrap.scss: -------------------------------------------------------------------------------- 1 | /************************************ 2 | Custom bootsrap 3 | *************************************/ 4 | 5 | @import "node_modules/bootstrap/scss/functions"; 6 | @import "node_modules/bootstrap/scss/variables"; 7 | @import "node_modules/bootstrap/scss/mixins"; 8 | 9 | $grid-breakpoints: ( 10 | xs: 0, 11 | sm: 576px, 12 | md: 768px, 13 | lg: 992px, 14 | xl: 1170px, 15 | xxl: 1400px, 16 | xxxl: 1770px 17 | ); 18 | 19 | $container-max-widths: ( 20 | sm: 100%, 21 | md: 100%, 22 | lg: 100%, 23 | xl: 1170px, 24 | ); 25 | 26 | .container-max { 27 | max-width: 1920px; 28 | @include make-container(30px); 29 | // @include media-breakpoint-between(sm,md) { 30 | // padding-left: 30px; 31 | // padding-right: 30px; 32 | // } 33 | @include media-breakpoint-up(xl) { 34 | padding-left: 30px; 35 | padding-right: 30px; 36 | } 37 | &.no-gutter { 38 | @include make-container(0px); 39 | } 40 | } 41 | 42 | @import "node_modules/bootstrap/scss/bootstrap-grid"; -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_subcribe_bar.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Subcribe bar 3 | ***************************/ 4 | .subcribe-bar { 5 | font-size: 16px; 6 | background-color: setColor(lightOverlay); 7 | padding: emCal(16, 50); 8 | margin-bottom: remCal(70); 9 | @include mq(md) { 10 | font-size: 14px; 11 | } 12 | &__content { 13 | h5 { 14 | @include typo($fsz: emCal(16, 15)); 15 | margin-bottom: emCal(15, 15); 16 | } 17 | h3 { 18 | @include typo($fsz: emCal(16, 30), $fw: 700); 19 | } 20 | @include mq(md) { 21 | margin-bottom: emCal(16, 30); 22 | } 23 | } 24 | &__form { 25 | display: flex; 26 | input { 27 | @include input($pd: 0 emCal(16, 20), $height: 50px, $brd: emCal(16, 5)); 28 | margin-right: emCal(16, 15); 29 | } 30 | .btn { 31 | height: 50px; 32 | padding: 0 emCal(16, 20); 33 | } 34 | @include mq(md) { 35 | input { 36 | margin-right: 0; 37 | } 38 | } 39 | @include mq(sm) { 40 | .btn.-normal { 41 | padding: 0 emCal(16, 15); 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /apps/static/assets/sass/base/_player_color.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Player color 3 | ***************************/ 4 | $plyr-color: setColor(yellow); 5 | $plyr-color-dark: setColor(title); 6 | 7 | //Progress bar background 8 | .plyr--full-ui input[type="range"] { 9 | color: $plyr-color; 10 | } 11 | 12 | //Audio 13 | .plyr--audio { 14 | color: $plyr-color-dark; 15 | .plyr__control.plyr__tab-focus, 16 | .plyr__control:hover, 17 | .plyr__control[aria-expanded="true"] { 18 | background: $plyr-color; 19 | } 20 | input[type="range"] { 21 | color: $plyr-color-dark; 22 | } 23 | } 24 | 25 | //Video 26 | .plyr--video { 27 | .plyr__control.plyr__tab-focus, 28 | .plyr__control:hover, 29 | .plyr__control[aria-expanded="true"] { 30 | background: $plyr-color; 31 | } 32 | } 33 | 34 | //Control button background 35 | .plyr__control--overlaid { 36 | background: rgba($plyr-color, 0.8); 37 | } 38 | 39 | .plyr__control.plyr__tab-focus { 40 | box-shadow: 0 0 0 5px rgba($plyr-color, 0.5); 41 | } 42 | 43 | .plyr__menu__container 44 | .plyr__control[role="menuitemradio"][aria-checked="true"]::before { 45 | background: $plyr-color; 46 | } 47 | -------------------------------------------------------------------------------- /apps/utils/context_protsessor.py: -------------------------------------------------------------------------------- 1 | from datetime import date 2 | from django.db.models import Count 3 | from apps.models import Category, Post, PostViewHistory, AboutUs, Info 4 | 5 | 6 | def context_category(request): 7 | return { 8 | 'categories': Category.objects.annotate(p_count=Count('post')).order_by('-p_count'), 9 | 'tags': Category.objects.annotate(p_count=Count('post')).order_by('-p_count') 10 | } 11 | 12 | 13 | def context_info(request): 14 | return { 15 | 'info': Info.objects.first() 16 | } 17 | 18 | 19 | def context_post(request): 20 | trending_post = PostViewHistory.objects.filter(viewed_at__month__gt=date.today().month - 1) 21 | trending_post = trending_post.values_list('post', flat=True).annotate(count=Count('viewed_at')).order_by('-count')[ 22 | :5] 23 | return { 24 | 'posts': Post.objects.all(), 25 | 'feature_posts': Post.objects.order_by('-created_at')[:3], 26 | 'trending_post': Post.objects.filter(id__in=list(trending_post)).order_by('-views') 27 | # 'trending_post': PostViewHistory.objects.filter(viewed_at__month__gt=date.today().month - 1) 28 | } 29 | -------------------------------------------------------------------------------- /root/urls.py: -------------------------------------------------------------------------------- 1 | """root URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/4.1/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls.static import static 17 | from django.contrib import admin 18 | from django.urls import path, include 19 | 20 | from root.settings import STATIC_URL, STATIC_ROOT, MEDIA_URL, MEDIA_ROOT 21 | 22 | urlpatterns = [ 23 | path('admin/', admin.site.urls), 24 | path('', include('apps.urls')), 25 | path('ckeditor/', include('ckeditor_uploader.urls')), 26 | path('accounts/', include('allauth.urls')) 27 | ] + static(STATIC_URL, document_root=STATIC_ROOT) + static(MEDIA_URL, document_root=MEDIA_ROOT) -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_author.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Author 3 | ***************************/ 4 | .author-info-block { 5 | font-size: 16px; 6 | background-color: setColor(yellow); 7 | padding: emCal(16, 25) 0 emCal(16, 40); 8 | border-radius: emCal(16, 5); 9 | margin-bottom: remCal(70); 10 | &__avatar { 11 | height: 120px; 12 | width: 120px; 13 | border-radius: 999px; 14 | overflow: hidden; 15 | margin: 0 auto; 16 | margin-bottom: emCal(16, 25); 17 | img { 18 | @include imgCenter(); 19 | } 20 | } 21 | &__info { 22 | text-align: center; 23 | max-width: 70%; 24 | margin: 0 auto; 25 | 26 | h5 { 27 | @include typo($fsz: emCal(16, 22), $fw: 600); 28 | margin-bottom: emCal(22, 25); 29 | } 30 | p { 31 | @include typo($fsz: emCal(16, 15), $lh: emCal(15, 27), $fw: 400); 32 | margin-bottom: 1em; 33 | } 34 | .social-media { 35 | a { 36 | @include link(setColor(title), #fff, $fsz: 1em); 37 | margin: 0 emCal(16, 10); 38 | @include spaceTrim(); 39 | } 40 | } 41 | @include mq(md) { 42 | max-width: 100%; 43 | padding: 0 emCal(16, 15); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /apps/static/assets/sass/layout/_404.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | 404 error 3 | ***************************/ 4 | .error-404 { 5 | font-size: 16px; 6 | margin-bottom: remCal(80); 7 | &__content { 8 | @include mq(md) { 9 | margin-bottom: emCal(16, 50); 10 | } 11 | h2 { 12 | @include typo($fsz: emCal(16, 36), $fw: 700); 13 | margin-bottom: emCal(36, 10); 14 | } 15 | p { 16 | @include typo($fsz: emCal(16, 17), $lh: emCal(17, 27)); 17 | margin-bottom: emCal(16, 35); 18 | } 19 | form { 20 | position: relative; 21 | margin-bottom: emCal(16, 30); 22 | input { 23 | @include input($pd: emCal(14, 15) emCal(14, 20), $brd: emCal(14, 5)); 24 | } 25 | 26 | button { 27 | background-color: transparent; 28 | border: 0; 29 | @include link(setColor(title), setColor(yellow), $fsz: 1em); 30 | position: absolute; 31 | top: 50%; 32 | right: emCal(16, 25); 33 | transform: translateY(-50%); 34 | } 35 | } 36 | } 37 | &__image { 38 | padding-left: emCal(16, 30); 39 | img { 40 | @include imgCenter; 41 | } 42 | @include mq(md) { 43 | padding-left: 0; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_footer.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Footer 3 | ***************************/ 4 | footer { 5 | font-size: 16px; 6 | .footer-content { 7 | padding: remCal(80) 0 remCal(60); 8 | .footer-col { 9 | @include mq(lg) { 10 | margin-bottom: emCal(16, 40); 11 | } 12 | &.-about { 13 | p { 14 | @include typo( 15 | $fsz: emCal(16, 15), 16 | $lh: emCal(15, 26), 17 | $fw: 400, 18 | $color: setColor(subTitle) 19 | ); 20 | } 21 | .contact-method { 22 | margin-top: 15px; 23 | p { 24 | i { 25 | width: 8px; 26 | margin-right: emCal(16, 21); 27 | color: setColor(yellow); 28 | text-align: center; 29 | font-size: emCal(16, 15); 30 | } 31 | } 32 | } 33 | } 34 | &.-util { 35 | .tags-group { 36 | margin-bottom: emCal(16, 35); 37 | } 38 | } 39 | } 40 | } 41 | .copyright { 42 | padding: emCal(16, 25); 43 | border-top: 1px solid setColor(border); 44 | text-align: center; 45 | @include typo($fsz: emCal(16, 14), $fw: 400, $lh: emCal(14, 20)); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /apps/static/css/404_css.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Fira+Mono:wght@500&display=swap'); 2 | body{ 3 | height: 95vh; 4 | background: #000000; 5 | text-align: center; 6 | color: #E0E0E0; 7 | font-family: 'Fira Mono', monospace; 8 | } 9 | h1{ 10 | font-size: 2.5rem; 11 | font-family: 'Permanent Marker', cursive; 12 | } 13 | div{ 14 | transform-style: preserve-3d; 15 | } 16 | svg{ 17 | width: clamp(300px , 70% , 600px); 18 | height: 500px; 19 | 20 | } 21 | #rocket{ 22 | 23 | transform: translateY(750px); 24 | 25 | animation: launch 2s ease-out forwards; 26 | } 27 | 28 | @keyframes launch { 29 | from { 30 | transform: translateY(750px); 31 | } 32 | to{ 33 | perspective: 500px; 34 | transform: translateY(0px); 35 | } 36 | } 37 | #stars { 38 | animation: twinkling 2s linear ; 39 | } 40 | @keyframes twinkling { 41 | 42 | from{ 43 | transform: scale(0); 44 | } 45 | to{ 46 | transform: scale(1); 47 | } 48 | } 49 | .text{ 50 | opacity: 0; 51 | animation:appear 1s ease-in forwards; 52 | animation-delay: 1.8s; 53 | } 54 | @keyframes appear { 55 | from{ 56 | opacity: 0; 57 | } 58 | to{ 59 | opacity: 1; 60 | } 61 | } 62 | a{ 63 | color:#F66947; 64 | text-decoration: none; 65 | } -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_search.scss: -------------------------------------------------------------------------------- 1 | #search-box { 2 | font-size: 30px; 3 | position: absolute; 4 | top: 100%; 5 | left: 0; 6 | right: 0; 7 | background-color: #fff; 8 | box-shadow: 0px 5px 5px 0 rgba(48, 68, 78, 0.1); 9 | padding: emCal(30, 20) 0; 10 | // animation: slideInDown 1s forwards; 11 | z-index: 99; 12 | form { 13 | position: relative; 14 | input { 15 | @include input( 16 | $pd: emCal(28, 20) emCal(28, 30) emCal(28, 20) emCal(28, 80), 17 | $fsz: emCal(30, 28), 18 | $fw: 500, 19 | $height: emCal(28, 70), 20 | $brd: 0px 21 | ); 22 | background: { 23 | image: url("../images/icons/search.svg"); 24 | size: emCal(28, 30); 25 | position: emCal(28, 30) center; 26 | repeat: no-repeat; 27 | } 28 | } 29 | button { 30 | position: absolute; 31 | right: emCal(30, 30); 32 | top: 50%; 33 | transform: translateY(-50%); 34 | @include link(#aeaeae, setColor(title), $fsz: emCal(30, 28)); 35 | border: 0; 36 | background-color: transparent; 37 | } 38 | } 39 | } 40 | 41 | @keyframes slideInDown { 42 | from { 43 | transform: translateY(-500px); 44 | opacity: 0; 45 | visibility: hidden; 46 | } 47 | to { 48 | transform: translateY(0); 49 | opacity: 1; 50 | visibility: visible; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /apps/static/assets/sass/style.scss: -------------------------------------------------------------------------------- 1 | @import "abstracts/mixin"; 2 | @import "abstracts/function"; 3 | @import "abstracts/variable"; 4 | 5 | @import "base/reset"; 6 | @import "base/typography"; 7 | @import "base/align"; 8 | @import "base/utils"; 9 | @import "base/player_color"; 10 | 11 | @import "components/header"; 12 | @import "components/post_card"; 13 | @import "components/instagrams"; 14 | @import "components/footer"; 15 | @import "components/tag"; 16 | @import "components/search"; 17 | @import "components/category"; 18 | @import "components/blog_sidebar"; 19 | @import "components/trending_post"; 20 | @import "components/subcribe_box"; 21 | @import "components/subcribe_bar"; 22 | @import "components/button"; 23 | @import "components/news_block"; 24 | @import "components/video_block"; 25 | @import "components/pagination"; 26 | @import "components/social_block"; 27 | @import "components/post_footer"; 28 | @import "components/author"; 29 | @import "components/checkbox_customed"; 30 | @import "components/product"; 31 | @import "components/tab"; 32 | @import "components/quantity_controller"; 33 | @import "components/breadcrumb"; 34 | 35 | @import "layout/404"; 36 | @import "layout/about"; 37 | @import "layout/blog"; 38 | @import "layout/content"; 39 | @import "layout/contact"; 40 | @import "layout/load"; 41 | @import "layout/category"; 42 | @import "layout/post"; 43 | @import "layout/shop"; 44 | @import "layout/checkout"; 45 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_instagrams.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Instagram 3 | ***************************/ 4 | .instagrams { 5 | font-size: 15px; 6 | .instagrams-container { 7 | .instagrams-item { 8 | position: relative; 9 | &:hover { 10 | .instagrams-item__content { 11 | opacity: 1; 12 | } 13 | } 14 | img { 15 | width: 100%; 16 | } 17 | .instagrams-item__content { 18 | position: absolute; 19 | top: 0; 20 | left: 0; 21 | right: 0; 22 | bottom: 0; 23 | display: flex; 24 | align-items: center; 25 | justify-content: center; 26 | flex-direction: column; 27 | background-color: #FF273Cad; 28 | opacity: 0; 29 | @include prefix(transition, $transition); 30 | @include typo($fsz: emCal(15, 15), $fw: 400, $lh: 1, $color: #fff); 31 | i { 32 | font-size: emCal(15, 30); 33 | margin-bottom: emCal(30, 15); 34 | } 35 | } 36 | } 37 | } 38 | &.-theme--violet { 39 | .instagrams-container { 40 | .instagrams-item { 41 | .instagrams-item__content { 42 | background-color: #537bdfbd; 43 | } 44 | } 45 | } 46 | } 47 | &.-theme--blue { 48 | .instagrams-container { 49 | .instagrams-item { 50 | .instagrams-item__content { 51 | background-color: #11d1efbd; 52 | } 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /apps/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path, include 2 | 3 | from apps.views import BlogListView, AboutPageView, ContactPageView, BlogPageView, UserUpdateView, RegisterPageView, \ 4 | LoginPageView, CustomLogoutView, MainPageView, ProfileSettingView, AddPostView, GeneratePdf, ChangePasswordView, \ 5 | ResetPasswordView 6 | 7 | urlpatterns = [ 8 | path('', MainPageView.as_view(), name='main_page_view'), 9 | path('pdf/', GeneratePdf.as_view(), name='make_pdf'), 10 | path('blog-category/', BlogListView.as_view(), name='blog_category_view'), 11 | path('about', AboutPageView.as_view(), name='about_view'), 12 | path('contact', ContactPageView.as_view(), name='contact_view'), 13 | path('blog/', BlogPageView.as_view(), name='post_view'), 14 | 15 | path('change-password', ChangePasswordView.as_view(), name='change_password'), 16 | path('reset-password', ResetPasswordView.as_view(), name='reset_password'), 17 | 18 | path('user-edit/', UserUpdateView.as_view(), name='user_update_view'), 19 | path('register/', RegisterPageView.as_view(), name='register_view'), 20 | path('login', LoginPageView.as_view(), name='login_view'), 21 | path('logout', CustomLogoutView.as_view(), name='logout_view'), 22 | path('edit-profile/', ProfileSettingView.as_view(), name='edit_profile_view'), 23 | path('add-post/', AddPostView.as_view(), name='add_post_view'), 24 | 25 | path('oauth/', include('social_django.urls', namespace='social')), 26 | ] 27 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | amqp==5.1.1 2 | arabic-reshaper==2.1.4 3 | asgiref==3.5.2 4 | asn1crypto==1.5.1 5 | async-timeout==4.0.2 6 | billiard==3.6.4.0 7 | celery==5.2.7 8 | certifi==2022.12.7 9 | cffi==1.15.1 10 | charset-normalizer==2.1.1 11 | click==8.1.3 12 | click-didyoumean==0.3.0 13 | click-plugins==1.1.1 14 | click-repl==0.2.0 15 | cryptography==38.0.4 16 | cssselect2==0.7.0 17 | defusedxml==0.7.1 18 | Django==4.1.3 19 | django-allauth==0.51.0 20 | django-ckeditor==6.5.1 21 | django-crontab==0.7.1 22 | django-environ==0.9.0 23 | django-js-asset==2.0.0 24 | django-resized==1.0.2 25 | django-six==1.0.4 26 | fontawesomefree==6.2.1 27 | future==0.18.2 28 | html5lib==1.1 29 | idna==3.4 30 | kombu==5.2.4 31 | lxml==4.9.2 32 | oauthlib==3.2.2 33 | oscrypto==1.3.0 34 | Pillow==9.3.0 35 | prompt-toolkit==3.0.36 36 | psycopg2-binary==2.9.5 37 | pycparser==2.21 38 | pyHanko==0.15.1 39 | pyhanko-certvalidator==0.19.7 40 | PyJWT==2.6.0 41 | PyPDF3==1.0.6 42 | python-bidi==0.4.2 43 | python3-openid==3.2.0 44 | pytz==2022.6 45 | pytz-deprecation-shim==0.1.0.post0 46 | PyYAML==6.0 47 | qrcode==7.3.1 48 | redis==4.4.0 49 | reportlab==3.6.12 50 | requests==2.28.1 51 | requests-oauthlib==1.3.1 52 | sentry-sdk==1.12.1 53 | six==1.16.0 54 | social-auth-app-django==5.0.0 55 | social-auth-core==4.3.0 56 | sqlparse==0.4.3 57 | svglib==1.4.1 58 | tinycss2==1.2.1 59 | tqdm==4.64.1 60 | twilio==7.16.0 61 | tzdata==2022.7 62 | tzlocal==4.2 63 | uritools==4.0.0 64 | urllib3==1.26.13 65 | vine==5.0.0 66 | wcwidth==0.2.5 67 | webencodings==0.5.1 68 | xhtml2pdf==0.2.8 69 | -------------------------------------------------------------------------------- /apps/static/assets/sass/layout/_contact.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Contact 3 | ***************************/ 4 | .contact-us { 5 | font-size: 16px; 6 | margin-bottom: remCal(60); 7 | .contact-title { 8 | @include typo($fsz: emCal(16, 22), $fw: 700); 9 | margin-bottom: emCal(22, 30); 10 | } 11 | &__info { 12 | margin-bottom: remCal(30); 13 | .contact-description { 14 | @include typo($fsz: emCal(16, 15), $lh: emCal(15, 26), $fw: 400); 15 | margin-bottom: emCal(15, 30); 16 | } 17 | .contact-method { 18 | &__item { 19 | display: flex; 20 | align-items: center; 21 | margin-bottom: emCal(16, 20); 22 | i { 23 | height: emCal(16, 50); 24 | width: emCal(16, 50); 25 | border: 1px solid setColor(border); 26 | border-radius: 999px; 27 | text-align: center; 28 | line-height: emCal(16, 50); 29 | color: setColor(yellow); 30 | margin-right: emCal(16, 20); 31 | } 32 | } 33 | } 34 | } 35 | &__form { 36 | @include mq(md) { 37 | margin-top: remCal(50); 38 | } 39 | form { 40 | input { 41 | @include input( 42 | $pd: emCal(14, 15) emCal(14, 20), 43 | $width: 100%, 44 | $brd: emCal(14, 5) 45 | ); 46 | margin-bottom: emCal(14, 20); 47 | } 48 | textarea { 49 | @include textarea($pd: emCal(14, 20), $brd: emCal(14, 5)); 50 | margin-bottom: emCal(14, 20); 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_checkbox_customed.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Checkbox customed 3 | ***************************/ 4 | 5 | .checkbox-group { 6 | &.-round { 7 | &.customed { 8 | .checkmark { 9 | border-radius: 999px; 10 | } 11 | } 12 | } 13 | &.customed { 14 | display: block; 15 | position: relative; 16 | padding-left: emCal(16, 30); 17 | margin-bottom: 12px; 18 | cursor: pointer; 19 | font-size: 22px; 20 | -webkit-user-select: none; 21 | -moz-user-select: none; 22 | -ms-user-select: none; 23 | user-select: none; 24 | &:hover { 25 | input ~ .checkmark { 26 | background-color: #e6e6e6; 27 | } 28 | } 29 | @include typo($fsz: emCal(16, 15), $cpt: true); 30 | .checkmark { 31 | position: absolute; 32 | top: 0; 33 | left: 0; 34 | height: 15px; 35 | width: 15px; 36 | background-color: #d8d8d8; 37 | border-radius: emCal(15, 3); 38 | &:after { 39 | content: "\f00d"; 40 | font-family: "Font Awesome 5 Pro"; 41 | left: 4px; 42 | top: 2px; 43 | position: absolute; 44 | font-size: 12px; 45 | color: #fff; 46 | } 47 | } 48 | input { 49 | position: absolute; 50 | opacity: 0; 51 | cursor: pointer; 52 | height: 0; 53 | width: 0; 54 | &:checked ~ .checkmark { 55 | background-color: setColor(yellow); 56 | &:after { 57 | content: "\f00c"; 58 | font-size: 10px; 59 | left: 2.5px; 60 | top: 3px; 61 | } 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /apps/static/js/main.js: -------------------------------------------------------------------------------- 1 | 2 | (function ($) { 3 | "use strict"; 4 | 5 | 6 | /*================================================================== 7 | [ Validate ]*/ 8 | var input = $('.validate-input .input100'); 9 | 10 | $('.validate-form').on('submit',function(){ 11 | var check = true; 12 | 13 | for(var i=0; i 20 | 21 | ~ if you forgot your password you can easily reset your password by one time link which send to your email 22 | 23 | image 24 | 25 | ~ Also one of the most useful thing is render blog to pdf 26 | 27 | image 28 | 29 | ~ add jquery mask input on sign up and edit profile page 30 | 31 | image 32 | 33 | 34 | 35 | 36 | image 37 | 38 | add qr code in pdf 39 | 40 | -------------------------------------------------------------------------------- /templates/apps/parts/header.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 |
3 | 11 |
12 |
13 | 14 | 28 | {% if user.is_anonymous %} 29 | Sign up 30 | Log in 31 | {% else %} 32 | Edit Profile 33 | Log out 34 | {% endif %} 35 |
36 |
37 |
38 | -------------------------------------------------------------------------------- /templates/apps/about.html: -------------------------------------------------------------------------------- 1 | {% extends 'apps/parts/base.html' %} 2 | {% block title %} 3 | About 4 | {% endblock title %} 5 | 6 | {% block content %}{% load static %} 7 | 8 |
9 |
10 | 20 |
21 |
22 |
23 | 24 |
25 | About us image 26 |
27 |
28 |
29 |
30 |

Thank you for visit out my website.

31 |

This template makes create a blogs in a modern layout 32 | to break up the ample white space. The result: a clean and 33 | enjoyable reading experience. The top of the page puts the 34 | brand story (or other introductory text) first, supported by 35 | a large blog that speaks for itself. The pops of blog can be 36 | customized to your inform people, drawing emphasis to the most important 37 | elements you want to highlight.

38 | 40 |
41 |
42 |
43 |
44 |
45 |
46 | 47 | {% endblock content %} 48 | -------------------------------------------------------------------------------- /apps/static/assets/css/slick.css: -------------------------------------------------------------------------------- 1 | /* Slider */ 2 | .slick-slider { 3 | position: relative; 4 | 5 | display: block; 6 | box-sizing: border-box; 7 | 8 | -webkit-user-select: none; 9 | -moz-user-select: none; 10 | -ms-user-select: none; 11 | user-select: none; 12 | 13 | -webkit-touch-callout: none; 14 | -khtml-user-select: none; 15 | -ms-touch-action: pan-y; 16 | touch-action: pan-y; 17 | -webkit-tap-highlight-color: transparent; 18 | } 19 | 20 | .slick-list { 21 | position: relative; 22 | 23 | display: block; 24 | overflow: hidden; 25 | 26 | margin: 0; 27 | padding: 0; 28 | } 29 | .slick-list:focus { 30 | outline: none; 31 | } 32 | .slick-list.dragging { 33 | cursor: pointer; 34 | cursor: hand; 35 | } 36 | 37 | .slick-slider .slick-track, 38 | .slick-slider .slick-list { 39 | -webkit-transform: translate3d(0, 0, 0); 40 | -moz-transform: translate3d(0, 0, 0); 41 | -ms-transform: translate3d(0, 0, 0); 42 | -o-transform: translate3d(0, 0, 0); 43 | transform: translate3d(0, 0, 0); 44 | } 45 | 46 | .slick-track { 47 | position: relative; 48 | top: 0; 49 | left: 0; 50 | 51 | display: block; 52 | margin-left: auto; 53 | margin-right: auto; 54 | } 55 | .slick-track:before, 56 | .slick-track:after { 57 | display: table; 58 | 59 | content: ""; 60 | } 61 | .slick-track:after { 62 | clear: both; 63 | } 64 | .slick-loading .slick-track { 65 | visibility: hidden; 66 | } 67 | 68 | .slick-slide { 69 | display: none; 70 | float: left; 71 | 72 | height: 100%; 73 | min-height: 1px; 74 | } 75 | [dir="rtl"] .slick-slide { 76 | float: right; 77 | } 78 | .slick-slide img { 79 | display: block; 80 | } 81 | .slick-slide.slick-loading img { 82 | display: none; 83 | } 84 | .slick-slide.dragging img { 85 | pointer-events: none; 86 | } 87 | .slick-initialized .slick-slide { 88 | display: block; 89 | } 90 | .slick-loading .slick-slide { 91 | visibility: hidden; 92 | } 93 | .slick-vertical .slick-slide { 94 | display: block; 95 | 96 | height: auto; 97 | 98 | border: 1px solid transparent; 99 | } 100 | .slick-arrow.slick-hidden { 101 | display: none; 102 | } 103 | -------------------------------------------------------------------------------- /apps/utils/tasks.py: -------------------------------------------------------------------------------- 1 | from celery import shared_task 2 | from django.core.mail import EmailMessage, send_mail 3 | from django.template.loader import render_to_string 4 | from django.utils.encoding import force_bytes 5 | from django.utils.http import urlsafe_base64_encode 6 | 7 | from apps.models import User 8 | from apps.utils.token import one_time_token 9 | from root.settings import EMAIL_HOST_USER 10 | 11 | 12 | @shared_task 13 | def send_to_gmail(email, domain, _type='activation'): 14 | print('ACCEPT TASK') 15 | user = User.objects.get(email=email) 16 | context = { 17 | 'domain': domain, 18 | 'uid': urlsafe_base64_encode(force_bytes(str(user.pk))), 19 | 'token': one_time_token.make_token(user), 20 | } 21 | subject = 'Activate your account' 22 | template = 'email_activation.html' 23 | if _type == 'reset': 24 | subject = 'Trouble signing in?' 25 | template = 'reset_email_password.html' 26 | elif _type == 'change': 27 | subject = '' 28 | else: 29 | context['username'] = user.username 30 | 31 | message = render_to_string(f'apps/auth/email/{template}', context) 32 | 33 | # from_email = EMAIL_HOST_USER 34 | recipient_list = [email] 35 | 36 | email = EmailMessage(subject, message, EMAIL_HOST_USER, recipient_list) 37 | email.content_subtype = 'html' 38 | result = email.send() 39 | print('Send to MAIL', template) 40 | return result 41 | 42 | 43 | 44 | 45 | @shared_task 46 | def send_message_to_gmail(email): 47 | subject = 'Thanks for your invitation!' 48 | message = 'Your offer has been reviewed.' 49 | from_email = EMAIL_HOST_USER 50 | recipient_list = [email] 51 | print(subject, message, from_email, recipient_list) 52 | result = send_mail(subject, message, from_email, recipient_list) 53 | return result 54 | 55 | 56 | 57 | @shared_task 58 | def send_to_contact(email): 59 | user = User.objects.get(email=email) 60 | subject = 'Thanks so much for sharing your experience with us.' 61 | message = render_to_string('admin/custom/email.html', {}) 62 | 63 | # from_email = EMAIL_HOST_USER 64 | recipient_list = [email] 65 | 66 | email = EmailMessage(subject, message, EMAIL_HOST_USER, recipient_list) 67 | email.content_subtype = 'html' 68 | result = email.send() 69 | print('Send to', email) 70 | return result -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_video_block.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Video block 3 | ***************************/ 4 | .video-block { 5 | font-size: 16px; 6 | margin-bottom: remCal(70); 7 | .video-view { 8 | position: relative; 9 | #video-list__title { 10 | position: absolute; 11 | top: 20px; 12 | left: 20px; 13 | z-index: 5; 14 | @include typo( 15 | $fsz: emCal(16, 22), 16 | $lh: emCal(22, 26), 17 | $color: #fff, 18 | $cpt: true 19 | ); 20 | } 21 | #video-list-player { 22 | height: 475px; 23 | } 24 | } 25 | .video-list { 26 | height: 475px; 27 | overflow-y: auto; 28 | &::-webkit-scrollbar { 29 | width: 5px; 30 | } 31 | &::-webkit-scrollbar-track { 32 | background: rgba(0, 0, 0, 0.6); 33 | } 34 | &::-webkit-scrollbar-thumb { 35 | background: setColor(blue); 36 | } 37 | &::-webkit-scrollbar-thumb:hover { 38 | background: #000; 39 | } 40 | &__header { 41 | background-color: setColor(blue); 42 | padding: emCal(16, 30); 43 | h5 { 44 | @include typo($fsz: emCal(16, 20), $color: #fff, $up: true); 45 | margin-bottom: emCal(16, 10); 46 | } 47 | p { 48 | @include typo( 49 | $fsz: emCal(16, 16), 50 | $color: rgba(255, 255, 255, 0.7), 51 | $fw: 400 52 | ); 53 | } 54 | } 55 | &__content { 56 | background-color: #111; 57 | padding: emCal(16, 10) 0; 58 | &__item { 59 | display: flex; 60 | padding: emCal(16, 10) emCal(16, 30); 61 | @include link(#fff, #dedede, $fsz: 1em, $lh: emCal(16, 21), $cpt: true); 62 | &.active { 63 | background-color: setColor(blue); 64 | } 65 | &:hover { 66 | background-color: setColor(blue); 67 | } 68 | .item__image { 69 | img { 70 | @include imgCenter(70px, 105px); 71 | } 72 | } 73 | .item__detail { 74 | padding-left: emCal(16, 20); 75 | h5 { 76 | @include overflowText(2); 77 | margin-bottom: emCal(16, 10); 78 | } 79 | p { 80 | @include typo( 81 | $fsz: emCal(16, 13), 82 | $color: rgba(255, 255, 255, 0.5) 83 | ); 84 | } 85 | } 86 | } 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /templates/apps/parts/trending.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
Categories
7 |
8 | {% for category in categories %} 9 | 10 | 11 |
13 |
{{ category.name }}
14 |
{{ category.post_count }}
15 |
16 | {% endfor %} 17 |
18 | 19 |
20 |
21 |
Trending post
22 |
23 | 24 | {% for post in trending %} 25 |
26 |
27 |
{{ forloop.counter }}
28 | 29 | Web Accesibility For Beginers.. 31 |
32 |
33 | 34 |
{{ post.category.first }}
35 | {{ post.title }} 36 |
37 |

{{ post.created_at }}

38 |
39 |
40 |
41 | {% endfor %} 42 |
43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
51 |
52 | -------------------------------------------------------------------------------- /templates/pdf.html: -------------------------------------------------------------------------------- 1 | 2 | {% load static %} 3 | 4 | 5 | 6 | Title 7 | 45 | 46 | 47 |
48 |
49 | 50 |

{{ post.title|safe }}

51 |
52 |
53 | 58 |
59 |
60 | {{ post.description|safe }} 61 |
62 |
63 | 81 |
82 |
83 | 84 | -------------------------------------------------------------------------------- /templates/apps/auth/base.html: -------------------------------------------------------------------------------- 1 | 2 | {% load static %} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {% block title %} 11 | {% endblock title %} 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 |
34 |
Loading icon
35 |
36 |
37 | 38 | {% include 'apps/parts/header.html' %} 39 | 40 |
41 | {% block content %} 42 | 43 | {% endblock %} 44 |
45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /templates/apps/parts/base.html: -------------------------------------------------------------------------------- 1 | 2 | {% load static %} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {% block title %} 11 | 12 | {% endblock %} 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
35 |
Loading icon
36 |
37 |
38 | 39 | {% include 'apps/parts/header.html' %} 40 | 41 |
42 | {% block content %} 43 | 44 | {% endblock %} 45 |
46 | 47 | {% include 'apps/parts/footer.html' %} 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /templates/apps/contact.html: -------------------------------------------------------------------------------- 1 | {% extends 'apps/parts/base.html' %} 2 | {% block title %} Contact {% endblock title %} 3 | {% block content %} 4 |
5 |
6 | 12 |
13 |
14 |
15 |
16 |

GET IN TOUCH

17 |

At the bottom of the Contact Us page, there is an area where 18 | visitors can browse through Zendesk product support options and review Zendesk office 19 | locations. It's clear that the company took the time to build this page with its buyer 20 | personas in mind. It considered what users might be looking for on the contact page and 21 | added those items as additional resources.

22 |
23 |
24 |

{{ info.location }}

25 |
26 |
27 |

{{ info.phone }}

28 |
29 |
30 |

{{ info.email }}

31 |
32 |
33 |
34 | 35 | 36 |
37 |
38 |
39 |

LEAVE A MESSAGE

40 |
41 | {% csrf_token %} 42 | 43 | 44 | 45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | 53 | {% endblock content %} 54 | 55 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_category.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Category 3 | ***************************/ 4 | .category { 5 | .category__background { 6 | @include prefix(transition, $transition); 7 | background: { 8 | position: center; 9 | size: cover; 10 | repeat: no-repeat; 11 | } 12 | } 13 | &.-bar { 14 | font-size: 14px; 15 | position: relative; 16 | display: flex; 17 | align-items: center; 18 | justify-content: space-between; 19 | padding: emCal(14, 25); 20 | overflow: hidden; 21 | border-radius: emCal(14, 5); 22 | &:hover { 23 | .category__background { 24 | transform: scale(1.1); 25 | } 26 | } 27 | .category__background { 28 | position: absolute; 29 | top: 0; 30 | left: 0; 31 | height: 100%; 32 | width: 100%; 33 | z-index: -1; 34 | } 35 | h5 { 36 | @include typo($fsz: emCal(14, 14), $color: #fff, $fw: 700, $up: true); 37 | &.quantity { 38 | height: emCal(14, 35); 39 | width: emCal(14, 35); 40 | background-color: #ebebeb; 41 | text-align: center; 42 | line-height: emCal(14, 35); 43 | border-radius: 999px; 44 | color: setColor(title); 45 | } 46 | } 47 | } 48 | &.-round { 49 | display: block; 50 | text-align: center; 51 | @include link(setColor(title), setColor(yellow), 16px, $up: true); 52 | &:hover { 53 | .category__background { 54 | transform: rotate(10deg); 55 | } 56 | } 57 | .category__background { 58 | height: emCal(16, 200); 59 | width: emCal(16, 200); 60 | margin-bottom: emCal(16, 30); 61 | border-radius: 999px; 62 | margin: 0 auto; 63 | margin-bottom: emCal(16, 30); 64 | } 65 | h5 { 66 | display: inline-block; 67 | font-weight: 700; 68 | &.quantity { 69 | &::before { 70 | content: "("; 71 | } 72 | &::after { 73 | content: ")"; 74 | } 75 | } 76 | } 77 | } 78 | &.-square { 79 | display: block; 80 | text-align: center; 81 | @include link(setColor(title), setColor(yellow), 16px, $up: true); 82 | &:hover { 83 | .category__background { 84 | transform: translateY(-5px); 85 | } 86 | } 87 | .category__background { 88 | height: emCal(16, 105); 89 | width: 100%; 90 | border-radius: emCal(16, 5); 91 | margin: 0 auto; 92 | margin-bottom: emCal(16, 15); 93 | } 94 | h5 { 95 | display: inline-block; 96 | font-weight: 700; 97 | &.quantity { 98 | display: none; 99 | } 100 | } 101 | } 102 | &.-theme--violet { 103 | &.-round { 104 | &:hover { 105 | color: setColor(violet); 106 | } 107 | } 108 | &.-square { 109 | &:hover { 110 | color: setColor(violet); 111 | } 112 | } 113 | } 114 | &.-theme--blue { 115 | &.-round { 116 | &:hover { 117 | color: setColor(blue); 118 | } 119 | } 120 | &.-square { 121 | &:hover { 122 | color: setColor(blue); 123 | } 124 | } 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /templates/apps/auth/settings.html: -------------------------------------------------------------------------------- 1 | {% extends 'auth/auth/base.html' %} 2 | 3 | {% block title %} 4 | Register Page 5 | {% endblock %} 6 | 7 | {% block main_content %} 8 | 9 | 60 | 61 | {% endblock %} -------------------------------------------------------------------------------- /templates/apps/auth/login.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | Login V1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 |
21 |
22 | IMG 23 |
24 | 25 |
26 | {% csrf_token %} 27 | 28 | LOG IN 29 | 30 | 31 |
32 | 33 | 34 | 35 | 36 | 37 |
38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 |
46 | 47 |
48 | 49 |
50 | 51 |
52 | 53 | Forgot 54 | 55 | 56 | Password? 57 | 58 |
59 | 60 | 66 |
67 |
68 |
69 |
70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /apps/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.http import HttpResponseRedirect 3 | from django.urls import path 4 | # Register your models here. 5 | from django.contrib.admin import ModelAdmin 6 | from django.utils.html import format_html 7 | 8 | from apps import models 9 | from apps.models import Post, Category, Comment, User, Info, Message 10 | from apps.utils.tasks import send_message_to_gmail 11 | 12 | 13 | @admin.register(Post) 14 | class Post(ModelAdmin): 15 | list_display = ('title', 'created_at', 'show_main_picture', 'category_set', 'status_choice', 'status_button') 16 | list_display_links = ('title', 'created_at') 17 | exclude = ("slug",) 18 | change_form_template = "admin/custom/change_form.html" 19 | 20 | def show_main_picture(self, obj): 21 | return format_html(f'') 22 | 23 | def category_set(self, obj): 24 | return format_html(f'{obj.category.first()} ') 25 | 26 | def status_choice(self, obj): 27 | data = { 28 | 'pending': '', 29 | 'active': '', 30 | 'cancel': '' 31 | } 32 | return format_html(data[obj.status]) 33 | 34 | def get_urls(self): 35 | urls = super().get_urls() 36 | my_urls = [ 37 | path('cancel/', self.cancel), 38 | path('active/', self.active)] 39 | return urls + my_urls 40 | 41 | def active(self, request, id): 42 | post = models.Post.objects.filter(id=id).first() 43 | post.status = models.Post.Status.ACTIVE 44 | post.save_base() 45 | return HttpResponseRedirect('../') 46 | 47 | def cancel(self, request, id): 48 | post = models.Post.objects.filter(id=id).first() 49 | post.status = models.Post.Status.CANCEL 50 | post.save_base() 51 | return HttpResponseRedirect('../') 52 | 53 | 54 | @admin.register(Info) 55 | class Info(ModelAdmin): 56 | list_display = ('location', 'phone', 'email', 'about') 57 | list_display_links = ('location',) 58 | 59 | 60 | @admin.register(Category) 61 | class Category(ModelAdmin): 62 | list_display = ('name',) 63 | exclude = ('slug',) 64 | 65 | # def show_image(self, obj): 66 | # return format_html(f'') 67 | 68 | 69 | @admin.register(Comment) 70 | class Comment(ModelAdmin): 71 | list_display = ('author', 'created_at', 'comment', 'blog') 72 | 73 | 74 | @admin.register(User) 75 | class User(ModelAdmin): 76 | list_display = ('username', 'first_name', 'email', 'is_active') 77 | exclude = ('last_login', 'groups', 'user_permissions', 'date_joined') 78 | 79 | 80 | @admin.register(Message) 81 | class MessageAdmin(ModelAdmin): 82 | list_display = ('name', 'author', 'status') 83 | exclude = ('status',) 84 | change_form_template = "admin/custom/change_message_form.html" 85 | 86 | def response_change(self, request, obj: Message): 87 | post = request.POST 88 | if "send_email" in post: 89 | obj.status = True 90 | obj.save() 91 | send_message_to_gmail.apply_async(args=[obj.author.email], countdown=5) 92 | return super().response_change(request, obj) 93 | -------------------------------------------------------------------------------- /apps/static/js/jquery.maskedinput.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Masked Input plugin for jQuery 3 | Copyright (c) 2007-2013 Josh Bush (digitalbush.com) 4 | Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) 5 | Version: 1.3.1 6 | */ 7 | (function(e){function t(){var e=document.createElement("input"),t="onpaste";return e.setAttribute(t,""),"function"==typeof e[t]?"paste":"input"}var n,a=t()+".mask",r=navigator.userAgent,i=/iphone/i.test(r),o=/android/i.test(r);e.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn",placeholder:"_"},e.fn.extend({caret:function(e,t){var n;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof e?(t="number"==typeof t?t:e,this.each(function(){this.setSelectionRange?this.setSelectionRange(e,t):this.createTextRange&&(n=this.createTextRange(),n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select())})):(this[0].setSelectionRange?(e=this[0].selectionStart,t=this[0].selectionEnd):document.selection&&document.selection.createRange&&(n=document.selection.createRange(),e=0-n.duplicate().moveStart("character",-1e5),t=e+n.text.length),{begin:e,end:t})},unmask:function(){return this.trigger("unmask")},mask:function(t,r){var c,l,s,u,f,h;return!t&&this.length>0?(c=e(this[0]),c.data(e.mask.dataName)()):(r=e.extend({placeholder:e.mask.placeholder,completed:null},r),l=e.mask.definitions,s=[],u=h=t.length,f=null,e.each(t.split(""),function(e,t){"?"==t?(h--,u=e):l[t]?(s.push(RegExp(l[t])),null===f&&(f=s.length-1)):s.push(null)}),this.trigger("unmask").each(function(){function c(e){for(;h>++e&&!s[e];);return e}function d(e){for(;--e>=0&&!s[e];);return e}function m(e,t){var n,a;if(!(0>e)){for(n=e,a=c(t);h>n;n++)if(s[n]){if(!(h>a&&s[n].test(R[a])))break;R[n]=R[a],R[a]=r.placeholder,a=c(a)}b(),x.caret(Math.max(f,e))}}function p(e){var t,n,a,i;for(t=e,n=r.placeholder;h>t;t++)if(s[t]){if(a=c(t),i=R[t],R[t]=n,!(h>a&&s[a].test(i)))break;n=i}}function g(e){var t,n,a,r=e.which;8===r||46===r||i&&127===r?(t=x.caret(),n=t.begin,a=t.end,0===a-n&&(n=46!==r?d(n):a=c(n-1),a=46===r?c(a):a),k(n,a),m(n,a-1),e.preventDefault()):27==r&&(x.val(S),x.caret(0,y()),e.preventDefault())}function v(t){var n,a,i,l=t.which,u=x.caret();t.ctrlKey||t.altKey||t.metaKey||32>l||l&&(0!==u.end-u.begin&&(k(u.begin,u.end),m(u.begin,u.end-1)),n=c(u.begin-1),h>n&&(a=String.fromCharCode(l),s[n].test(a)&&(p(n),R[n]=a,b(),i=c(n),o?setTimeout(e.proxy(e.fn.caret,x,i),0):x.caret(i),r.completed&&i>=h&&r.completed.call(x))),t.preventDefault())}function k(e,t){var n;for(n=e;t>n&&h>n;n++)s[n]&&(R[n]=r.placeholder)}function b(){x.val(R.join(""))}function y(e){var t,n,a=x.val(),i=-1;for(t=0,pos=0;h>t;t++)if(s[t]){for(R[t]=r.placeholder;pos++a.length)break}else R[t]===a.charAt(pos)&&t!==u&&(pos++,i=t);return e?b():u>i+1?(x.val(""),k(0,h)):(b(),x.val(x.val().substring(0,i+1))),u?t:f}var x=e(this),R=e.map(t.split(""),function(e){return"?"!=e?l[e]?r.placeholder:e:void 0}),S=x.val();x.data(e.mask.dataName,function(){return e.map(R,function(e,t){return s[t]&&e!=r.placeholder?e:null}).join("")}),x.attr("readonly")||x.one("unmask",function(){x.unbind(".mask").removeData(e.mask.dataName)}).bind("focus.mask",function(){clearTimeout(n);var e;S=x.val(),e=y(),n=setTimeout(function(){b(),e==t.length?x.caret(0,e):x.caret(e)},10)}).bind("blur.mask",function(){y(),x.val()!=S&&x.change()}).bind("keydown.mask",g).bind("keypress.mask",v).bind(a,function(){setTimeout(function(){var e=y(!0);x.caret(e),r.completed&&e==x.val().length&&r.completed.call(x)},0)}),y()}))}})})(jQuery); -------------------------------------------------------------------------------- /apps/static/vendor/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | html{box-sizing:border-box;font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}*,::after,::before{box-sizing:inherit}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#868e96;text-align:left;caption-side:bottom}th{text-align:left}label{display:inline-block;margin-bottom:.5rem}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important} 2 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /apps/static/assets/sass/layout/_checkout.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Checkout 3 | ***************************/ 4 | .checkout { 5 | font-size: 16px; 6 | margin-bottom: remCal(80); 7 | &-title { 8 | @include typo($fsz: emCal(16, 18), $fw: 600, $up: true); 9 | padding-bottom: emCal(18, 12); 10 | border-bottom: 1px solid setColor(border); 11 | display: block; 12 | margin-bottom: emCal(16, 30); 13 | } 14 | &__coupon-alert { 15 | @include typo($fsz: emCal(16, 15), $lh: emCal(15, 26)); 16 | background-color: setColor(yellow); 17 | display: block; 18 | text-align: center; 19 | padding: 1em; 20 | margin-bottom: remCal(60); 21 | &:hover { 22 | text-decoration: underline; 23 | } 24 | } 25 | &__form { 26 | form { 27 | .input-group { 28 | margin-bottom: emCal(16, 30); 29 | label { 30 | @include typo($fsz: emCal(16, 15)); 31 | display: block; 32 | margin-bottom: emCal(16, 15); 33 | } 34 | input { 35 | @include input($pd: emCal(16, 15) emCal(16, 20), $brd: emCal(14, 5)); 36 | &.mb-20 { 37 | margin-bottom: emCal(16, 20); 38 | } 39 | } 40 | &.mb-15 { 41 | margin-bottom: emCal(16, 15); 42 | } 43 | } 44 | .checkbox-group { 45 | margin-bottom: emCal(16, 30); 46 | &.mb-15 { 47 | margin-bottom: emCal(16, 15); 48 | } 49 | } 50 | .label-description { 51 | @include typo($fsz: emCal(16, 14), $lh: emCal(14, 24), $fw: 400); 52 | margin-bottom: emCal(16, 30); 53 | } 54 | } 55 | } 56 | &__total { 57 | background-color: setColor(lightOverlay); 58 | padding: emCal(16, 25) emCal(16, 30); 59 | table { 60 | width: 100%; 61 | th, 62 | td { 63 | &:first-child { 64 | text-align: left; 65 | } 66 | } 67 | th, 68 | td { 69 | &:last-child { 70 | text-align: right; 71 | } 72 | } 73 | &.total__provisional { 74 | border-bottom: 1px solid setColor(border); 75 | margin-bottom: emCal(16, 10); 76 | thead { 77 | th { 78 | padding: emCal(16, 10) 0; 79 | @include typo($fsz: emCal(16, 18), $fw: 600); 80 | } 81 | } 82 | tbody { 83 | td { 84 | padding: emCal(16, 10) 0; 85 | &:first-child { 86 | span { 87 | float: left; 88 | @include typo( 89 | $color: setColor(yellow), 90 | $fw: 600, 91 | $fsz: emCal(16, 15), 92 | $lh: emCal(16, 24) 93 | ); 94 | margin-right: emCal(15, 5); 95 | } 96 | p { 97 | @include typo( 98 | $fsz: emCal(16, 15), 99 | $fw: 400, 100 | $lh: emCal(16, 24) 101 | ); 102 | } 103 | } 104 | } 105 | } 106 | } 107 | &.total__final { 108 | border-bottom: 1px solid setColor(border); 109 | margin-bottom: emCal(16, 30); 110 | tbody { 111 | td { 112 | padding: emCal(16, 10) 0; 113 | &:first-child { 114 | @include typo($fsz: emCal(16, 15), $fw: 400); 115 | } 116 | &:last-child { 117 | @include typo($fsz: emCal(16, 18), $fw: 600); 118 | } 119 | } 120 | } 121 | } 122 | } 123 | .total__payment-method { 124 | &__block { 125 | margin-bottom: emCal(16, 25); 126 | .payment__content { 127 | @include typo($fsz: emCal(16, 14), $lh: emCal(14, 24), $fw: 400); 128 | } 129 | } 130 | } 131 | .btn { 132 | width: 100%; 133 | } 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /apps/forms.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.forms import AuthenticationForm 2 | from django.contrib.auth.hashers import make_password 3 | from django.core.exceptions import ValidationError 4 | from django.db.transaction import atomic 5 | from django.forms import ModelForm, PasswordInput, CharField, ModelMultipleChoiceField, CheckboxSelectMultiple 6 | from django.utils.encoding import force_str 7 | from django.utils.http import urlsafe_base64_decode 8 | 9 | from apps.models import User, Comment, Category, Post, Message 10 | 11 | 12 | class RegisterForm(ModelForm): 13 | 14 | def clean(self): 15 | data = super().clean() 16 | data['password'] = make_password(data['password']) 17 | return data 18 | 19 | class Meta: 20 | model = User 21 | fields = ('username', 'password', 'email', 'phone') 22 | 23 | 24 | class EditProfile(ModelForm): 25 | class Meta: 26 | model = User 27 | fields = ('image', 'first_name', 'last_name', 'email', 'phone', 'biography') 28 | 29 | 30 | @atomic 31 | def save(self): 32 | user = User.objects.create_user( 33 | username=self.cleaned_data.get('username'), 34 | email=self.cleaned_data.get('email'), 35 | phone=self.cleaned_data.get('phone'), 36 | ) 37 | user.set_password(self.cleaned_data.get('password')) 38 | user.save() 39 | 40 | 41 | class LeaveCommentForm(ModelForm): 42 | class Meta: 43 | model = Comment 44 | # fields = ('author', 'comment', 'created_at') 45 | exclude = () 46 | 47 | 48 | class LoginForm(AuthenticationForm): 49 | def clean_password(self): 50 | username = self.cleaned_data['username'] 51 | password = self.cleaned_data['password'] 52 | user = User.objects.get(username=username) 53 | if user and not user.check_password(password): 54 | raise ValidationError('Please check Username or password !') 55 | return password 56 | 57 | 58 | class UpdateForm(ModelForm): 59 | confirm_password = CharField(widget=PasswordInput(attrs={"autocomplete": "current-password"})) 60 | old_password = CharField(widget=PasswordInput(attrs={"autocomplete": "current-password"})) 61 | 62 | def clean_password(self): 63 | password = self.cleaned_data['password'] 64 | confirm_password = self.cleaned_data['confirm_password'] 65 | if confirm_password != password: 66 | raise ValidationError('Please,check your password !') 67 | return make_password(password) 68 | 69 | class Meta: 70 | model = User 71 | fields = ('username', 'first_name', 'last_name', 'password', 'email', 'phone') 72 | 73 | 74 | def __init__(self, *args, **kwargs): 75 | self.fields['password'].required = False 76 | self.fields['confirm_password'].required = False 77 | 78 | 79 | class CreateComment(ModelForm): 80 | class Meta: 81 | model = Comment 82 | exclude = () 83 | 84 | 85 | class AddPostForm(ModelForm): 86 | category = ModelMultipleChoiceField( 87 | queryset=Category.objects.order_by('name'), 88 | label='Category', 89 | widget=CheckboxSelectMultiple 90 | ) 91 | 92 | class Meta: 93 | model = Post 94 | fields = ('title', 'main_picture', 'category', 'description') 95 | 96 | 97 | class ChangePasswordForm(ModelForm): 98 | def clean_password(self): 99 | user = self.instance 100 | password = self.data.get('password') 101 | new_password = self.data.get('new_password') 102 | confirm_password = self.data.get('confirm_password') 103 | if new_password == confirm_password: 104 | if user.check_password(password): 105 | return make_password(new_password) 106 | raise ValidationError('Old password isn\'t correct!') 107 | raise ValidationError('New Password did not match!') 108 | 109 | class Meta: 110 | model = User 111 | fields = ('password',) 112 | 113 | 114 | class MessageForm(ModelForm): 115 | name = CharField(max_length=255) 116 | message = CharField() 117 | 118 | class Meta: 119 | model = Message 120 | fields = ('name', 'message') 121 | -------------------------------------------------------------------------------- /templates/admin/custom/email.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Reset Password Email Template 8 | 9 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 69 | 70 |
20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 56 | 57 | 58 | 59 | 60 | 63 | 64 | 65 | 66 | 67 |
 
 
30 | 32 | 33 | 34 | 35 | 36 | 50 | 51 | 52 | 53 | 54 |
 
37 |

You have 38 | requested to reset your password

39 | 41 |

42 | We cannot simply send you your old password. A unique link to reset your 43 | password has been generated for you. To reset your password, click the 44 | following link and follow the instructions. 45 |

46 | Reset 48 | Password 49 |
 
55 |
 
61 |

© www.rakeshmandal.com

62 |
 
68 |
71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /templates/apps/auth/email/reset_email_password.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Reset Password 8 | 9 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 69 | 70 |
20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 56 | 57 | 58 | 59 | 60 | 63 | 64 | 65 | 66 | 67 |
 
 
30 | 32 | 33 | 34 | 35 | 36 | 50 | 51 | 52 | 53 | 54 |
 
37 |

You have 38 | requested to reset your password

39 | 41 |

42 | We cannot simply send you your old password. A unique link to reset your 43 | password has been generated for you. To reset your password, click the 44 | following link and follow the instructions. 45 |

46 | Reset 48 | Password 49 |
 
55 |
 
61 |

© {{ domain }}

62 |
 
68 |
71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /templates/apps/parts/footer.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 |
3 |
4 | 82 |
83 |
84 | -------------------------------------------------------------------------------- /templates/apps/blog-category.html: -------------------------------------------------------------------------------- 1 | {% extends 'apps/parts/base.html' %} 2 | {% block title %} Category{% endblock %} 3 | {% load static %} 4 | {% block content %} 5 |
6 |
7 | 14 |
15 |
16 | {% include 'apps/parts/trending.html' %} 17 |
18 |
19 |
20 |
Categories:
21 | {{ category.name }} 22 |
23 |
24 |
25 |
26 |
27 | {% for blog in blogs %} 28 |
29 | 32 |
33 | 34 | {{ blog.title }} 36 | React 37 | 45 |

{{ blog.description|striptags|truncatechars:150 }}

46 |
47 |
48 | {% endfor %} 49 | 50 |
51 | {% if page_obj.has_other_pages %} 52 | 73 |
74 |
75 |
76 |
77 |
78 | {% endblock %} -------------------------------------------------------------------------------- /apps/static/fonts/montserrat/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat) 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### JetBrains template 2 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 3 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 4 | 5 | # User-specific stuff 6 | .idea/**/workspace.xml 7 | .idea/**/tasks.xml 8 | .idea/**/usage.statistics.xml 9 | .idea/**/dictionaries 10 | .idea/**/shelf 11 | 12 | # Generated files 13 | .idea/**/contentModel.xml 14 | 15 | # Sensitive or high-churn files 16 | .idea/**/dataSources/ 17 | .idea/**/dataSources.ids 18 | .idea/**/dataSources.local.xml 19 | .idea/**/sqlDataSources.xml 20 | .idea/**/dynamic.xml 21 | .idea/**/uiDesigner.xml 22 | .idea/**/dbnavigator.xml 23 | 24 | # Gradle 25 | .idea/**/gradle.xml 26 | .idea/**/libraries 27 | 28 | # Gradle and Maven with auto-import 29 | # When using Gradle or Maven with auto-import, you should exclude module files, 30 | # since they will be recreated, and may cause churn. Uncomment if using 31 | # auto-import. 32 | # .idea/artifacts 33 | # .idea/compiler.xml 34 | # .idea/jarRepositories.xml 35 | # .idea/modules.xml 36 | # .idea/*.iml 37 | # .idea/modules 38 | # *.iml 39 | # *.ipr 40 | 41 | # CMake 42 | cmake-build-*/ 43 | 44 | # Mongo Explorer plugin 45 | .idea/**/mongoSettings.xml 46 | 47 | # File-based project format 48 | *.iws 49 | 50 | # IntelliJ 51 | out/ 52 | 53 | # mpeltonen/sbt-idea plugin 54 | .idea_modules/ 55 | 56 | # JIRA plugin 57 | atlassian-ide-plugin.xml 58 | 59 | # Cursive Clojure plugin 60 | .idea/replstate.xml 61 | 62 | # Crashlytics plugin (for Android Studio and IntelliJ) 63 | com_crashlytics_export_strings.xml 64 | crashlytics.properties 65 | crashlytics-build.properties 66 | fabric.properties 67 | 68 | # Editor-based Rest Client 69 | .idea/httpRequests 70 | 71 | # Android studio 3.1+ serialized cache file 72 | .idea/caches/build_file_checksums.ser 73 | 74 | ### VirtualEnv template 75 | # Virtualenv 76 | # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ 77 | .Python 78 | [Bb]in 79 | [Ii]nclude 80 | [Ll]ib 81 | [Ll]ib64 82 | [Ll]ocal 83 | [Ss]cripts 84 | pyvenv.cfg 85 | .venv 86 | pip-selfcheck.json 87 | 88 | ### Python template 89 | # Byte-compiled / optimized / DLL files 90 | __pycache__/ 91 | *.py[cod] 92 | *$py.class 93 | 94 | # C extensions 95 | *.so 96 | 97 | # Distribution / packaging 98 | .Python 99 | build/ 100 | develop-eggs/ 101 | dist/ 102 | downloads/ 103 | eggs/ 104 | .eggs/ 105 | lib/ 106 | lib64/ 107 | sdist/ 108 | var/ 109 | wheels/ 110 | share/python-wheels/ 111 | *.egg-info/ 112 | .installed.cfg 113 | *.egg 114 | MANIFEST 115 | 116 | # PyInstaller 117 | # Usually these files are written by a python script from a template 118 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 119 | *.manifest 120 | *.spec 121 | 122 | # Installer logs 123 | pip-log.txt 124 | pip-delete-this-directory.txt 125 | 126 | # Unit test / coverage reports 127 | htmlcov/ 128 | .tox/ 129 | .nox/ 130 | .coverage 131 | .coverage.* 132 | .cache 133 | nosetests.xml 134 | coverage.xml 135 | *.cover 136 | *.py,cover 137 | .hypothesis/ 138 | .pytest_cache/ 139 | cover/ 140 | 141 | # Translations 142 | *.mo 143 | *.pot 144 | 145 | # Django stuff: 146 | *.log 147 | local_settings.py 148 | db.sqlite3 149 | db.sqlite3-journal 150 | 151 | # Flask stuff: 152 | instance/ 153 | .webassets-cache 154 | 155 | # Scrapy stuff: 156 | .scrapy 157 | 158 | # Sphinx documentation 159 | docs/_build/ 160 | 161 | # PyBuilder 162 | .pybuilder/ 163 | target/ 164 | 165 | # Jupyter Notebook 166 | .ipynb_checkpoints 167 | 168 | # IPython 169 | profile_default/ 170 | ipython_config.py 171 | 172 | # pyenv 173 | # For a library or package, you might want to ignore these files since the code is 174 | # intended to run in multiple environments; otherwise, check them in: 175 | # .python-version 176 | 177 | # pipenv 178 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 179 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 180 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 181 | # install all needed dependencies. 182 | #Pipfile.lock 183 | 184 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 185 | __pypackages__/ 186 | 187 | # Celery stuff 188 | celerybeat-schedule 189 | celerybeat.pid 190 | 191 | # SageMath parsed files 192 | *.sage.py 193 | 194 | # Environments 195 | .env 196 | .venv 197 | env/ 198 | venv/ 199 | ENV/ 200 | env.bak/ 201 | venv.bak/ 202 | 203 | # Spyder project settings 204 | .spyderproject 205 | .spyproject 206 | 207 | # Rope project settings 208 | .ropeproject 209 | 210 | # mkdocs documentation 211 | /site 212 | 213 | # mypy 214 | .mypy_cache/ 215 | .dmypy.json 216 | dmypy.json 217 | 218 | # Pyre type checker 219 | .pyre/ 220 | 221 | # pytype static type analyzer 222 | .pytype/ 223 | 224 | # Cython debug symbols 225 | cython_debug/ 226 | 227 | -------------------------------------------------------------------------------- /templates/apps/auth/change_password.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | bs5 profile security page - Bootdey.com 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 21 |
22 |
23 |
24 | 25 |
26 |
Change Password
27 |
28 |
30 | {% csrf_token %} 31 | 32 |
33 | 34 | 35 |
36 | 37 |
38 | 39 | 40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 |
48 |
49 |
50 |
51 |
52 |
53 | 54 | 121 | 122 | 125 | 126 | -------------------------------------------------------------------------------- /apps/static/assets/js/imagesloaded.pkgd.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * imagesLoaded PACKAGED v4.1.4 3 | * JavaScript is all like "You images are done yet or what?" 4 | * MIT License 5 | */ 6 | 7 | !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o
'),this.glareElementWrapper=t(this).find(".js-tilt-glare"),this.glareElement=t(this).find(".js-tilt-glare-inner"),!i){var s={position:"absolute",top:"0",left:"0",width:"100%",height:"100%"};this.glareElementWrapper.css(s).css({overflow:"hidden","pointer-events":"none"}),this.glareElement.css({position:"absolute",top:"50%",left:"50%","background-image":"linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%)",width:""+2*t(this).outerWidth(),height:""+2*t(this).outerWidth(),transform:"rotate(180deg) translate(-50%, -50%)","transform-origin":"0% 0%",opacity:"0"})}},d=function(){this.glareElement.css({width:""+2*t(this).outerWidth(),height:""+2*t(this).outerWidth()})};return t.fn.tilt.destroy=function(){t(this).each(function(){t(this).find(".js-tilt-glare").remove(),t(this).css({"will-change":"",transform:""}),t(this).off("mousemove mouseenter mouseleave")})},t.fn.tilt.getValues=function(){var i=[];return t(this).each(function(){this.mousePositions=r.call(this),i.push(h.call(this))}),i},t.fn.tilt.reset=function(){t(this).each(function(){var i=this;this.mousePositions=r.call(this),this.settings=t(this).data("settings"),l.call(this),setTimeout(function(){i.reset=!1},this.settings.transition)})},this.each(function(){var s=this;this.settings=t.extend({maxTilt:t(this).is("[data-tilt-max]")?t(this).data("tilt-max"):20,perspective:t(this).is("[data-tilt-perspective]")?t(this).data("tilt-perspective"):300,easing:t(this).is("[data-tilt-easing]")?t(this).data("tilt-easing"):"cubic-bezier(.03,.98,.52,.99)",scale:t(this).is("[data-tilt-scale]")?t(this).data("tilt-scale"):"1",speed:t(this).is("[data-tilt-speed]")?t(this).data("tilt-speed"):"400",transition:!t(this).is("[data-tilt-transition]")||t(this).data("tilt-transition"),disableAxis:t(this).is("[data-tilt-disable-axis]")?t(this).data("tilt-disable-axis"):null,axis:t(this).is("[data-tilt-axis]")?t(this).data("tilt-axis"):null,reset:!t(this).is("[data-tilt-reset]")||t(this).data("tilt-reset"),glare:!!t(this).is("[data-tilt-glare]")&&t(this).data("tilt-glare"),maxGlare:t(this).is("[data-tilt-maxglare]")?t(this).data("tilt-maxglare"):1},i),null!==this.settings.axis&&(console.warn("Tilt.js: the axis setting has been renamed to disableAxis. See https://github.com/gijsroge/tilt.js/pull/26 for more information"),this.settings.disableAxis=this.settings.axis),this.init=function(){t(s).data("settings",s.settings),s.settings.glare&&c.call(s),e.call(s)},this.init()})},t("[data-tilt]").tilt(),!0}); -------------------------------------------------------------------------------- /apps/static/assets/sass/base/_reset.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | Reset CSS 3 | ***************************/ 4 | * { 5 | box-sizing: border-box; 6 | } 7 | 8 | html, 9 | body, 10 | div, 11 | span, 12 | applet, 13 | object, 14 | iframe, 15 | h1, 16 | h2, 17 | h3, 18 | h4, 19 | h5, 20 | h6, 21 | p, 22 | blockquote, 23 | pre, 24 | a, 25 | abbr, 26 | acronym, 27 | address, 28 | big, 29 | cite, 30 | code, 31 | del, 32 | dfn, 33 | em, 34 | img, 35 | ins, 36 | kbd, 37 | q, 38 | s, 39 | samp, 40 | small, 41 | strike, 42 | strong, 43 | sub, 44 | sup, 45 | tt, 46 | var, 47 | b, 48 | u, 49 | i, 50 | center, 51 | dl, 52 | dt, 53 | dd, 54 | ol, 55 | ul, 56 | li, 57 | fieldset, 58 | form, 59 | label, 60 | legend, 61 | table, 62 | caption, 63 | tbody, 64 | tfoot, 65 | thead, 66 | tr, 67 | th, 68 | td, 69 | article, 70 | aside, 71 | canvas, 72 | details, 73 | embed, 74 | figure, 75 | figcaption, 76 | footer, 77 | header, 78 | hgroup, 79 | menu, 80 | nav, 81 | output, 82 | ruby, 83 | section, 84 | summary, 85 | time, 86 | mark, 87 | audio, 88 | video { 89 | margin: 0; 90 | padding: 0; 91 | border: 0; 92 | font-size: 100%; 93 | font-family: "DM Sans", sans-serif; 94 | vertical-align: baseline; 95 | font-weight: 500; 96 | } 97 | 98 | :focus { 99 | outline: 0; 100 | } 101 | 102 | article, 103 | aside, 104 | details, 105 | figcaption, 106 | figure, 107 | footer, 108 | header, 109 | hgroup, 110 | menu, 111 | nav, 112 | section { 113 | display: block; 114 | } 115 | 116 | body { 117 | line-height: 1; 118 | } 119 | 120 | ol, 121 | ul { 122 | list-style: none; 123 | } 124 | 125 | blockquote, 126 | q { 127 | quotes: none; 128 | } 129 | 130 | blockquote:before, 131 | blockquote:after, 132 | q:before, 133 | q:after { 134 | content: ""; 135 | content: none; 136 | } 137 | 138 | table { 139 | border-collapse: collapse; 140 | border-spacing: 0; 141 | } 142 | 143 | input[type="search"]::-webkit-search-cancel-button, 144 | input[type="search"]::-webkit-search-decoration, 145 | input[type="search"]::-webkit-search-results-button, 146 | input[type="search"]::-webkit-search-results-decoration { 147 | -webkit-appearance: none; 148 | -moz-appearance: none; 149 | } 150 | 151 | input[type="search"] { 152 | -webkit-appearance: none; 153 | -moz-appearance: none; 154 | -webkit-box-sizing: content-box; 155 | -moz-box-sizing: content-box; 156 | box-sizing: content-box; 157 | } 158 | 159 | textarea { 160 | overflow: auto; 161 | vertical-align: top; 162 | resize: vertical; 163 | font-family: inherit; 164 | font-size: inherit; 165 | } 166 | 167 | audio, 168 | canvas, 169 | video { 170 | display: inline-block; 171 | *display: inline; 172 | *zoom: 1; 173 | max-width: 100%; 174 | } 175 | 176 | audio:not([controls]) { 177 | display: none; 178 | height: 0; 179 | } 180 | 181 | [hidden] { 182 | display: none; 183 | } 184 | 185 | html { 186 | font-size: 16px; 187 | -webkit-text-size-adjust: 100%; 188 | -ms-text-size-adjust: 100%; 189 | @include mq(md) { 190 | font-size: 14px; 191 | } 192 | } 193 | 194 | a { 195 | text-decoration: none; 196 | } 197 | 198 | a:focus { 199 | outline: 0; 200 | } 201 | 202 | a:active, 203 | a:hover { 204 | outline: 0; 205 | } 206 | 207 | img { 208 | border: 0; 209 | -ms-interpolation-mode: bicubic; 210 | } 211 | 212 | figure { 213 | margin: 0; 214 | } 215 | 216 | form { 217 | margin: 0; 218 | } 219 | 220 | fieldset { 221 | border: 1px solid #c0c0c0; 222 | margin: 0 2px; 223 | padding: 0.35em 0.625em 0.75em; 224 | } 225 | 226 | legend { 227 | border: 0; 228 | padding: 0; 229 | white-space: normal; 230 | *margin-left: -7px; 231 | } 232 | 233 | button, 234 | input, 235 | select, 236 | textarea { 237 | font-size: 100%; 238 | margin: 0; 239 | vertical-align: baseline; 240 | *vertical-align: middle; 241 | } 242 | 243 | button, 244 | input { 245 | line-height: normal; 246 | } 247 | 248 | button, 249 | select { 250 | text-transform: none; 251 | } 252 | 253 | button, 254 | html input[type="button"], 255 | input[type="reset"], 256 | input[type="submit"] { 257 | -webkit-appearance: button; 258 | cursor: pointer; 259 | *overflow: visible; 260 | } 261 | 262 | button[disabled], 263 | html input[disabled] { 264 | cursor: default; 265 | } 266 | 267 | input[type="checkbox"], 268 | input[type="radio"] { 269 | box-sizing: border-box; 270 | padding: 0; 271 | *height: 13px; 272 | *width: 13px; 273 | } 274 | 275 | input[type="search"] { 276 | -webkit-appearance: textfield; 277 | -moz-box-sizing: content-box; 278 | -webkit-box-sizing: content-box; 279 | box-sizing: content-box; 280 | } 281 | 282 | input[type="search"]::-webkit-search-cancel-button, 283 | input[type="search"]::-webkit-search-decoration { 284 | -webkit-appearance: none; 285 | } 286 | 287 | button::-moz-focus-inner, 288 | input::-moz-focus-inner { 289 | border: 0; 290 | padding: 0; 291 | } 292 | 293 | textarea { 294 | overflow: auto; 295 | vertical-align: top; 296 | } 297 | 298 | table { 299 | border-collapse: collapse; 300 | border-spacing: 0; 301 | } 302 | 303 | html, 304 | button, 305 | input, 306 | select, 307 | textarea { 308 | color: #222; 309 | } 310 | 311 | ::-moz-selection { 312 | background: #b3d4fc; 313 | text-shadow: none; 314 | } 315 | 316 | ::selection { 317 | background: #b3d4fc; 318 | text-shadow: none; 319 | } 320 | 321 | img { 322 | vertical-align: middle; 323 | } 324 | 325 | fieldset { 326 | border: 0; 327 | margin: 0; 328 | padding: 0; 329 | } 330 | 331 | textarea { 332 | resize: unset; 333 | } 334 | 335 | .chromeframe { 336 | margin: 0.2em 0; 337 | background: #ccc; 338 | color: #000; 339 | padding: 0.2em 0; 340 | } 341 | -------------------------------------------------------------------------------- /apps/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.3 on 2022-12-10 07:10 2 | 3 | import ckeditor_uploader.fields 4 | from django.conf import settings 5 | import django.contrib.auth.models 6 | import django.contrib.auth.validators 7 | from django.db import migrations, models 8 | import django.db.models.deletion 9 | import django.utils.timezone 10 | 11 | 12 | class Migration(migrations.Migration): 13 | 14 | initial = True 15 | 16 | dependencies = [ 17 | ('auth', '0012_alter_user_first_name_max_length'), 18 | ] 19 | 20 | operations = [ 21 | migrations.CreateModel( 22 | name='User', 23 | fields=[ 24 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 25 | ('password', models.CharField(max_length=128, verbose_name='password')), 26 | ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), 27 | ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), 28 | ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), 29 | ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')), 30 | ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), 31 | ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), 32 | ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), 33 | ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), 34 | ('email', models.EmailField(max_length=255, unique=True)), 35 | ('phone', models.CharField(max_length=255, unique=True)), 36 | ('image', models.ImageField(blank=True, max_length=300, null=True, upload_to='%m')), 37 | ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')), 38 | ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')), 39 | ], 40 | options={ 41 | 'verbose_name': 'Foydalanuvchi', 42 | 'verbose_name_plural': 'Foydalanuvchilar', 43 | }, 44 | managers=[ 45 | ('objects', django.contrib.auth.models.UserManager()), 46 | ], 47 | ), 48 | migrations.CreateModel( 49 | name='Category', 50 | fields=[ 51 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 52 | ('name', models.CharField(max_length=255)), 53 | ('slug', models.SlugField(max_length=255, unique=True)), 54 | ('image', models.ImageField(blank=True, null=True, upload_to='%m')), 55 | ], 56 | options={ 57 | 'verbose_name': 'Kategoriya', 58 | 'verbose_name_plural': 'Kategoriyalar', 59 | }, 60 | ), 61 | migrations.CreateModel( 62 | name='Post', 63 | fields=[ 64 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 65 | ('title', models.CharField(blank=True, max_length=255, null=True)), 66 | ('description', ckeditor_uploader.fields.RichTextUploadingField()), 67 | ('main_picture', models.ImageField(blank=True, null=True, upload_to='%m')), 68 | ('created_at', models.DateField(auto_now=True)), 69 | ('views', models.IntegerField(default=0)), 70 | ('slug', models.SlugField(max_length=255, unique=True)), 71 | ('status', models.CharField(choices=[('pending', 'kutilmoqda'), ('active', 'faol'), ('cancel', 'rad etilgan')], default='pending', max_length=50)), 72 | ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), 73 | ('category', models.ManyToManyField(blank=True, to='apps.category')), 74 | ], 75 | options={ 76 | 'verbose_name': "Po'st", 77 | 'verbose_name_plural': "Po'stlar", 78 | }, 79 | ), 80 | migrations.CreateModel( 81 | name='Comment', 82 | fields=[ 83 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 84 | ('comment', models.TextField()), 85 | ('created_at', models.DateField(auto_now_add=True)), 86 | ('author', models.ForeignKey(default=0, on_delete=django.db.models.deletion.SET_DEFAULT, to=settings.AUTH_USER_MODEL)), 87 | ('blog', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment_set', to='apps.post')), 88 | ], 89 | options={ 90 | 'verbose_name': 'Kamentariya', 91 | 'verbose_name_plural': 'Kamentariyalar', 92 | }, 93 | ), 94 | ] 95 | -------------------------------------------------------------------------------- /apps/static/assets/sass/components/_news_block.scss: -------------------------------------------------------------------------------- 1 | /*************************** 2 | News block 3 | ***************************/ 4 | .news-block { 5 | margin-bottom: remCal(50); 6 | &.-theme--blue { 7 | .news-block__header { 8 | .header__controller { 9 | .header__controller__tab { 10 | .tab-item { 11 | &.active { 12 | color: setColor(blue); 13 | } 14 | } 15 | } 16 | } 17 | } 18 | } 19 | &.-theme--violet { 20 | .news-block__header { 21 | .header__controller { 22 | .header__controller__tab { 23 | .tab-item { 24 | &.active { 25 | color: setColor(violet); 26 | } 27 | } 28 | } 29 | } 30 | } 31 | } 32 | .news-block__header { 33 | font-size: 18px; 34 | display: flex; 35 | margin-bottom: emCal(18, 48); 36 | align-items: center; 37 | @include mq(sm) { 38 | flex-direction: column; 39 | .header__controller__title { 40 | margin-bottom: emCal(18, 15); 41 | } 42 | } 43 | .header__controller__title { 44 | flex: 1; 45 | } 46 | .header__controller { 47 | display: flex; 48 | .header__controller__tab { 49 | @include mq(sm) { 50 | text-align: center; 51 | } 52 | .tab-item { 53 | @include link( 54 | setColor(regular), 55 | setColor(title), 56 | $fsz: emCal(18, 15), 57 | $cpt: true 58 | ); 59 | display: inline-block; 60 | margin: 0 emCal(18, 10); 61 | @include mq(sm) { 62 | line-height: emCal(18, 40); 63 | } 64 | &.active { 65 | color: setColor(yellow); 66 | } 67 | } 68 | } 69 | } 70 | } 71 | .news-block__tab { 72 | font-size: 16; 73 | &:hover { 74 | .slick-arrow { 75 | opacity: 1; 76 | } 77 | } 78 | .slick-arrow { 79 | background-color: #bebebe; 80 | border: 0; 81 | color: setColor(regular); 82 | font-size: 1em; 83 | top: 50%; 84 | transform: translateY(-50%); 85 | padding: 15px; 86 | position: absolute; 87 | z-index: 1; 88 | opacity: 0; 89 | @include prefix(transition, $transition); 90 | 91 | &.slick-next { 92 | right: emCal(16, 0); 93 | } 94 | &.slick-prev { 95 | left: emCal(16, 0); 96 | } 97 | @include mq(xl) { 98 | opacity: 1; 99 | &.slick-next { 100 | right: 0; 101 | } 102 | &.slick-prev { 103 | left: 0; 104 | } 105 | } 106 | } 107 | .news-block__tab__item { 108 | display: none; 109 | @include mq(md) { 110 | font-size: 15px; 111 | } 112 | &.active { 113 | display: block; 114 | } 115 | .news-block__content { 116 | color: red; 117 | .news-block__content__slide { 118 | .post-card { 119 | &.-large { 120 | @include mq(lg) { 121 | display: none; 122 | } 123 | @include mq(sm) { 124 | display: none; 125 | } 126 | } 127 | } 128 | } 129 | &.-default { 130 | .news-block__content__slide { 131 | .post-card { 132 | margin-bottom: emCal(16, 30); 133 | &.-large { 134 | .card__cover { 135 | // height: emCal(16, 380); 136 | align-items: center; 137 | } 138 | } 139 | &.-small { 140 | .card__cover { 141 | // height: emCal(16, 180); 142 | align-items: center; 143 | } 144 | .card__content { 145 | .card__content-title { 146 | font-size: emCal(16, 18); 147 | line-height: emCal(18, 22); 148 | } 149 | } 150 | } 151 | } 152 | } 153 | } 154 | &.-hoz { 155 | .news-block__content__slide { 156 | .post-card { 157 | &.-large { 158 | margin-bottom: emCal(16, 30); 159 | } 160 | &.-small { 161 | .card__cover { 162 | // height: emCal(16, 247); 163 | align-items: center; 164 | } 165 | @include mq(md) { 166 | margin-bottom: emCal(16, 30); 167 | } 168 | } 169 | } 170 | } 171 | } 172 | &.-hoz-small { 173 | .news-block__content__slide { 174 | .post-card { 175 | &.-small { 176 | margin-bottom: emCal(16, 30); 177 | .card__cover { 178 | // height: emCal(16, 180); 179 | align-items: center; 180 | } 181 | .card__content { 182 | &-title { 183 | font-size: emCal(16, 18); 184 | margin-bottom: emCal(16, 10); 185 | } 186 | &-description { 187 | margin-top: emCal(16, 10); 188 | margin-bottom: 0; 189 | } 190 | @include mq(sm) { 191 | &-info { 192 | flex-direction: column; 193 | align-items: flex-start; 194 | .info__time { 195 | margin-right: 0; 196 | margin-bottom: emCal(16, 5); 197 | } 198 | } 199 | } 200 | } 201 | @include mq(md) { 202 | margin-bottom: emCal(16, 30); 203 | } 204 | } 205 | } 206 | } 207 | } 208 | } 209 | } 210 | } 211 | } 212 | -------------------------------------------------------------------------------- /templates/apps/add-post.html: -------------------------------------------------------------------------------- 1 | {% extends 'apps/parts/base.html' %} 2 | {% load static %} 3 | {% block content %} 4 |
5 | 6 | 8 |
9 |
10 |
11 |
12 | 13 |

Create a post

14 |
15 |
16 |
17 |
18 | 19 |
20 | 21 |
22 | 23 |
24 | {% csrf_token %} 25 | 26 | 27 |
28 |
29 | 30 |
31 | 32 | 34 | Enter title here 35 |
36 |
37 | 38 |
39 |
40 | 41 | 43 |
44 |
45 |
46 |
47 | 48 |
49 |
Upload post image here, or 51 | Browse
52 | 58 |
59 |

Note: Only JPG, JPEG and PNG. Our 60 | suggested dimensions are 600px * 450px. Larger image will be cropped 61 | to 4:3 to fit our thumbnails/previews.

62 |
63 |
64 |
65 | 66 |
67 | 68 | 74 |
75 |
76 | 77 |
78 | 79 |
80 |
81 |
82 | 83 |
84 |
85 | 86 |
87 |
88 |
89 |
90 | 92 | 93 |
94 | {% endblock %} 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /templates/apps/auth/signup.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | Login V1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 |
21 |
22 |
23 |
24 | IMG 25 |
26 |
27 | {% csrf_token %} 28 | 29 | CREATE ACCOUNT 30 | 31 | 32 | {% if form.none_filed_errors %} 33 | {% for error in form.none_filed_errors %} 34 |
35 |
{{ error|escape }}
36 |
37 | 38 | {% endfor %} 39 | 40 | 41 | {% endif %} 42 | 43 |
44 | 45 | 46 | 47 | 48 | 49 | 50 |
51 |
52 | 53 | 54 | 55 | 56 | 57 |
58 |
59 | 60 | 61 | 62 | 63 | 64 | 65 |
66 |
67 | 68 | 69 | 70 | 71 | 72 |
73 |
74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 |
82 | 83 |
84 | 91 | 92 |
93 |
    94 | {# #} 95 | {# {% csrf_token %}#} 96 | 99 |
100 | {# #} 101 |
102 | 103 | 109 | 110 |
111 |
112 |
113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 127 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /apps/static/vendor/bootstrap/css/bootstrap-reboot.css: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | font-family: sans-serif; 4 | line-height: 1.15; 5 | -webkit-text-size-adjust: 100%; 6 | -ms-text-size-adjust: 100%; 7 | -ms-overflow-style: scrollbar; 8 | -webkit-tap-highlight-color: transparent; 9 | } 10 | 11 | *, 12 | *::before, 13 | *::after { 14 | box-sizing: inherit; 15 | } 16 | 17 | @-ms-viewport { 18 | width: device-width; 19 | } 20 | 21 | article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section { 22 | display: block; 23 | } 24 | 25 | body { 26 | margin: 0; 27 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 28 | font-size: 1rem; 29 | font-weight: normal; 30 | line-height: 1.5; 31 | color: #212529; 32 | background-color: #fff; 33 | } 34 | 35 | [tabindex="-1"]:focus { 36 | outline: none !important; 37 | } 38 | 39 | hr { 40 | box-sizing: content-box; 41 | height: 0; 42 | overflow: visible; 43 | } 44 | 45 | h1, h2, h3, h4, h5, h6 { 46 | margin-top: 0; 47 | margin-bottom: .5rem; 48 | } 49 | 50 | p { 51 | margin-top: 0; 52 | margin-bottom: 1rem; 53 | } 54 | 55 | abbr[title], 56 | abbr[data-original-title] { 57 | text-decoration: underline; 58 | -webkit-text-decoration: underline dotted; 59 | text-decoration: underline dotted; 60 | cursor: help; 61 | border-bottom: 0; 62 | } 63 | 64 | address { 65 | margin-bottom: 1rem; 66 | font-style: normal; 67 | line-height: inherit; 68 | } 69 | 70 | ol, 71 | ul, 72 | dl { 73 | margin-top: 0; 74 | margin-bottom: 1rem; 75 | } 76 | 77 | ol ol, 78 | ul ul, 79 | ol ul, 80 | ul ol { 81 | margin-bottom: 0; 82 | } 83 | 84 | dt { 85 | font-weight: bold; 86 | } 87 | 88 | dd { 89 | margin-bottom: .5rem; 90 | margin-left: 0; 91 | } 92 | 93 | blockquote { 94 | margin: 0 0 1rem; 95 | } 96 | 97 | dfn { 98 | font-style: italic; 99 | } 100 | 101 | b, 102 | strong { 103 | font-weight: bolder; 104 | } 105 | 106 | small { 107 | font-size: 80%; 108 | } 109 | 110 | sub, 111 | sup { 112 | position: relative; 113 | font-size: 75%; 114 | line-height: 0; 115 | vertical-align: baseline; 116 | } 117 | 118 | sub { 119 | bottom: -.25em; 120 | } 121 | 122 | sup { 123 | top: -.5em; 124 | } 125 | 126 | a { 127 | color: #007bff; 128 | text-decoration: none; 129 | background-color: transparent; 130 | -webkit-text-decoration-skip: objects; 131 | } 132 | 133 | a:hover { 134 | color: #0056b3; 135 | text-decoration: underline; 136 | } 137 | 138 | a:not([href]):not([tabindex]) { 139 | color: inherit; 140 | text-decoration: none; 141 | } 142 | 143 | a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover { 144 | color: inherit; 145 | text-decoration: none; 146 | } 147 | 148 | a:not([href]):not([tabindex]):focus { 149 | outline: 0; 150 | } 151 | 152 | pre, 153 | code, 154 | kbd, 155 | samp { 156 | font-family: monospace, monospace; 157 | font-size: 1em; 158 | } 159 | 160 | pre { 161 | margin-top: 0; 162 | margin-bottom: 1rem; 163 | overflow: auto; 164 | } 165 | 166 | figure { 167 | margin: 0 0 1rem; 168 | } 169 | 170 | img { 171 | vertical-align: middle; 172 | border-style: none; 173 | } 174 | 175 | svg:not(:root) { 176 | overflow: hidden; 177 | } 178 | 179 | a, 180 | area, 181 | button, 182 | [role="button"], 183 | input, 184 | label, 185 | select, 186 | summary, 187 | textarea { 188 | -ms-touch-action: manipulation; 189 | touch-action: manipulation; 190 | } 191 | 192 | table { 193 | border-collapse: collapse; 194 | } 195 | 196 | caption { 197 | padding-top: 0.75rem; 198 | padding-bottom: 0.75rem; 199 | color: #868e96; 200 | text-align: left; 201 | caption-side: bottom; 202 | } 203 | 204 | th { 205 | text-align: left; 206 | } 207 | 208 | label { 209 | display: inline-block; 210 | margin-bottom: .5rem; 211 | } 212 | 213 | button:focus { 214 | outline: 1px dotted; 215 | outline: 5px auto -webkit-focus-ring-color; 216 | } 217 | 218 | input, 219 | button, 220 | select, 221 | optgroup, 222 | textarea { 223 | margin: 0; 224 | font-family: inherit; 225 | font-size: inherit; 226 | line-height: inherit; 227 | } 228 | 229 | button, 230 | input { 231 | overflow: visible; 232 | } 233 | 234 | button, 235 | select { 236 | text-transform: none; 237 | } 238 | 239 | button, 240 | html [type="button"], 241 | [type="reset"], 242 | [type="submit"] { 243 | -webkit-appearance: button; 244 | } 245 | 246 | button::-moz-focus-inner, 247 | [type="button"]::-moz-focus-inner, 248 | [type="reset"]::-moz-focus-inner, 249 | [type="submit"]::-moz-focus-inner { 250 | padding: 0; 251 | border-style: none; 252 | } 253 | 254 | input[type="radio"], 255 | input[type="checkbox"] { 256 | box-sizing: border-box; 257 | padding: 0; 258 | } 259 | 260 | input[type="date"], 261 | input[type="time"], 262 | input[type="datetime-local"], 263 | input[type="month"] { 264 | -webkit-appearance: listbox; 265 | } 266 | 267 | textarea { 268 | overflow: auto; 269 | resize: vertical; 270 | } 271 | 272 | fieldset { 273 | min-width: 0; 274 | padding: 0; 275 | margin: 0; 276 | border: 0; 277 | } 278 | 279 | legend { 280 | display: block; 281 | width: 100%; 282 | max-width: 100%; 283 | padding: 0; 284 | margin-bottom: .5rem; 285 | font-size: 1.5rem; 286 | line-height: inherit; 287 | color: inherit; 288 | white-space: normal; 289 | } 290 | 291 | progress { 292 | vertical-align: baseline; 293 | } 294 | 295 | [type="number"]::-webkit-inner-spin-button, 296 | [type="number"]::-webkit-outer-spin-button { 297 | height: auto; 298 | } 299 | 300 | [type="search"] { 301 | outline-offset: -2px; 302 | -webkit-appearance: none; 303 | } 304 | 305 | [type="search"]::-webkit-search-cancel-button, 306 | [type="search"]::-webkit-search-decoration { 307 | -webkit-appearance: none; 308 | } 309 | 310 | ::-webkit-file-upload-button { 311 | font: inherit; 312 | -webkit-appearance: button; 313 | } 314 | 315 | output { 316 | display: inline-block; 317 | } 318 | 319 | summary { 320 | display: list-item; 321 | } 322 | 323 | template { 324 | display: none; 325 | } 326 | 327 | [hidden] { 328 | display: none !important; 329 | } 330 | /*# sourceMappingURL=bootstrap-reboot.css.map */ --------------------------------------------------------------------------------