{{ post.category.first }}
35 | {{ post.title }} 36 |{{ post.created_at }}
38 |├── 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 |
6 | 7 |
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/
24 |
25 | ~ Also one of the most useful thing is render blog to pdf
26 |
27 |
28 |
29 | ~ add jquery mask input on sign up and edit profile page
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | add qr code in pdf
39 |
40 |
--------------------------------------------------------------------------------
/templates/apps/parts/header.html:
--------------------------------------------------------------------------------
1 | {% load static %}
2 |
14 |
28 | {% if user.is_anonymous %}
29 | Sign up
30 | Log in
31 | {% else %}
32 | Edit Profile
33 | Log out
34 | {% endif %}
35 |
26 | 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 |{{ post.title|safe }}
51 |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 |{{ info.location }}
25 |{{ info.phone }}
28 |{{ info.email }}
31 |
55 |
23 |
20 |
|
69 |
20 |
|
69 |
{{ blog.created_at|date:"d M ,Y" }} {{ blog.created_at|time:"H:i" }}
40 |{{ blog.comment_count }}
43 |{{ blog.description|striptags|truncatechars:150 }}
46 |
25 |
{{ forloop.counter }}
67 |{{ comment.author }}
70 |72 | {{ comment.created_at }} 73 |
74 |{{ comment.comment }}
77 |