├── .gitignore ├── README.md ├── author ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ ├── 0001_initial.py │ └── __init__.py ├── models.py ├── tests.py └── views.py ├── blog ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ ├── 0001_initial.py │ └── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py ├── contact ├── __init__.py ├── admin.py ├── apps.py ├── forms.py ├── migrations │ ├── 0001_initial.py │ └── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py ├── manage.py ├── requirements.txt ├── static ├── css │ ├── bootstrap.min.css │ ├── font-awesome.min.css │ └── style.css ├── error │ ├── css │ │ └── style.css │ └── img │ │ └── bg.jpg ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 ├── img │ ├── about-1.jpg │ ├── about-2.jpg │ ├── ad-1.jpg │ ├── ad-2.jpg │ ├── author.png │ ├── avatar.png │ ├── logo.png │ ├── post-1.jpg │ ├── post-2.jpg │ ├── post-3.jpg │ ├── post-4.jpg │ ├── post-5.jpg │ ├── post-6.jpg │ ├── post-page.jpg │ ├── widget-1.jpg │ ├── widget-2.jpg │ ├── widget-3.jpg │ └── widget-4.jpg └── js │ ├── bootstrap.min.js │ ├── jquery.min.js │ └── main.js ├── templates ├── 404.html ├── about.html ├── base │ ├── asidebar.html │ ├── base.html │ ├── category-tag.html │ ├── featuredpost.html │ ├── footer.html │ ├── header.html │ ├── js.html │ └── mostreadpost.html ├── blank.html ├── blog │ ├── blog-post.html │ └── search.html ├── category.html ├── contact │ └── contact.html ├── error.html └── home.html └── webmagblog ├── __init__.py ├── custom-context.py ├── settings.py ├── urls.py ├── views.py └── wsgi.py /.gitignore: -------------------------------------------------------------------------------- 1 | post_images/ 2 | author_images/ 3 | db.sqlite3 4 | env/ 5 | media 6 | __pycache_/ 7 | # Created by https://www.gitignore.io/api/git,django,python,pycharm,visualstudiocode 8 | # Edit at https://www.gitignore.io/?templates=git,django,python,pycharm,visualstudiocode 9 | 10 | ### Django ### 11 | *.log 12 | *.pot 13 | *.pyc 14 | __pycache__/ 15 | local_settings.py 16 | db.sqlite3 17 | media 18 | 19 | # If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/ 20 | # in your Git repository. Update and uncomment the following line accordingly. 21 | # /staticfiles/ 22 | 23 | ### Django.Python Stack ### 24 | # Byte-compiled / optimized / DLL files 25 | *.py[cod] 26 | *$py.class 27 | 28 | # C extensions 29 | *.so 30 | 31 | # Distribution / packaging 32 | .Python 33 | build/ 34 | develop-eggs/ 35 | dist/ 36 | downloads/ 37 | eggs/ 38 | .eggs/ 39 | lib/ 40 | lib64/ 41 | parts/ 42 | sdist/ 43 | var/ 44 | wheels/ 45 | pip-wheel-metadata/ 46 | share/python-wheels/ 47 | *.egg-info/ 48 | .installed.cfg 49 | *.egg 50 | MANIFEST 51 | 52 | # PyInstaller 53 | # Usually these files are written by a python script from a template 54 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 55 | *.manifest 56 | *.spec 57 | 58 | # Installer logs 59 | pip-log.txt 60 | pip-delete-this-directory.txt 61 | 62 | # Unit test / coverage reports 63 | htmlcov/ 64 | .tox/ 65 | .nox/ 66 | .coverage 67 | .coverage.* 68 | .cache 69 | nosetests.xml 70 | coverage.xml 71 | *.cover 72 | .hypothesis/ 73 | .pytest_cache/ 74 | 75 | # Translations 76 | *.mo 77 | 78 | # Django stuff: 79 | 80 | # Flask stuff: 81 | instance/ 82 | .webassets-cache 83 | 84 | # Scrapy stuff: 85 | .scrapy 86 | 87 | # Sphinx documentation 88 | docs/_build/ 89 | 90 | # PyBuilder 91 | target/ 92 | 93 | # Jupyter Notebook 94 | .ipynb_checkpoints 95 | 96 | # IPython 97 | profile_default/ 98 | ipython_config.py 99 | 100 | # pyenv 101 | .python-version 102 | 103 | # pipenv 104 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 105 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 106 | # having no cross-platform support, pipenv may install dependencies that don’t work, or not 107 | # install all needed dependencies. 108 | #Pipfile.lock 109 | 110 | # celery beat schedule file 111 | celerybeat-schedule 112 | 113 | # SageMath parsed files 114 | *.sage.py 115 | 116 | # Environments 117 | .env 118 | .venv 119 | env/ 120 | venv/ 121 | ENV/ 122 | env.bak/ 123 | venv.bak/ 124 | 125 | # Spyder project settings 126 | .spyderproject 127 | .spyproject 128 | 129 | # Rope project settings 130 | .ropeproject 131 | 132 | # mkdocs documentation 133 | /site 134 | 135 | # mypy 136 | .mypy_cache/ 137 | .dmypy.json 138 | dmypy.json 139 | 140 | # Pyre type checker 141 | .pyre/ 142 | 143 | ### Git ### 144 | # Created by git for backups. To disable backups in Git: 145 | # $ git config --global mergetool.keepBackup false 146 | *.orig 147 | 148 | # Created by git when using merge tools for conflicts 149 | *.BACKUP.* 150 | *.BASE.* 151 | *.LOCAL.* 152 | *.REMOTE.* 153 | *_BACKUP_*.txt 154 | *_BASE_*.txt 155 | *_LOCAL_*.txt 156 | *_REMOTE_*.txt 157 | 158 | ### PyCharm ### 159 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 160 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 161 | 162 | # User-specific stuff 163 | .idea/**/workspace.xml 164 | .idea/**/tasks.xml 165 | .idea/**/usage.statistics.xml 166 | .idea/**/dictionaries 167 | .idea/**/shelf 168 | 169 | # Generated files 170 | .idea/**/contentModel.xml 171 | 172 | # Sensitive or high-churn files 173 | .idea/**/dataSources/ 174 | .idea/**/dataSources.ids 175 | .idea/**/dataSources.local.xml 176 | .idea/**/sqlDataSources.xml 177 | .idea/**/dynamic.xml 178 | .idea/**/uiDesigner.xml 179 | .idea/**/dbnavigator.xml 180 | 181 | # Gradle 182 | .idea/**/gradle.xml 183 | .idea/**/libraries 184 | 185 | # Gradle and Maven with auto-import 186 | # When using Gradle or Maven with auto-import, you should exclude module files, 187 | # since they will be recreated, and may cause churn. Uncomment if using 188 | # auto-import. 189 | # .idea/modules.xml 190 | # .idea/*.iml 191 | # .idea/modules 192 | 193 | # CMake 194 | cmake-build-*/ 195 | 196 | # Mongo Explorer plugin 197 | .idea/**/mongoSettings.xml 198 | 199 | # File-based project format 200 | *.iws 201 | 202 | # IntelliJ 203 | out/ 204 | 205 | # mpeltonen/sbt-idea plugin 206 | .idea_modules/ 207 | 208 | # JIRA plugin 209 | atlassian-ide-plugin.xml 210 | 211 | # Cursive Clojure plugin 212 | .idea/replstate.xml 213 | 214 | # Crashlytics plugin (for Android Studio and IntelliJ) 215 | com_crashlytics_export_strings.xml 216 | crashlytics.properties 217 | crashlytics-build.properties 218 | fabric.properties 219 | 220 | # Editor-based Rest Client 221 | .idea/httpRequests 222 | 223 | # Android studio 3.1+ serialized cache file 224 | .idea/caches/build_file_checksums.ser 225 | 226 | # JetBrains templates 227 | **___jb_tmp___ 228 | 229 | ### PyCharm Patch ### 230 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 231 | 232 | # *.iml 233 | # modules.xml 234 | # .idea/misc.xml 235 | # *.ipr 236 | 237 | # Sonarlint plugin 238 | .idea/sonarlint 239 | 240 | ### Python ### 241 | # Byte-compiled / optimized / DLL files 242 | 243 | # C extensions 244 | 245 | # Distribution / packaging 246 | 247 | # PyInstaller 248 | # Usually these files are written by a python script from a template 249 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 250 | 251 | # Installer logs 252 | 253 | # Unit test / coverage reports 254 | 255 | # Translations 256 | 257 | # Django stuff: 258 | 259 | # Flask stuff: 260 | 261 | # Scrapy stuff: 262 | 263 | # Sphinx documentation 264 | 265 | # PyBuilder 266 | 267 | # Jupyter Notebook 268 | 269 | # IPython 270 | 271 | # pyenv 272 | 273 | # pipenv 274 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 275 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 276 | # having no cross-platform support, pipenv may install dependencies that don’t work, or not 277 | # install all needed dependencies. 278 | 279 | # celery beat schedule file 280 | 281 | # SageMath parsed files 282 | 283 | # Environments 284 | 285 | # Spyder project settings 286 | 287 | # Rope project settings 288 | 289 | # mkdocs documentation 290 | 291 | # mypy 292 | 293 | # Pyre type checker 294 | 295 | ### VisualStudioCode ### 296 | .vscode/* 297 | !.vscode/settings.json 298 | !.vscode/tasks.json 299 | !.vscode/launch.json 300 | !.vscode/extensions.json 301 | 302 | ### VisualStudioCode Patch ### 303 | # Ignore all local history of files 304 | .history 305 | 306 | # End of https://www.gitignore.io/api/git,django,python,pycharm,visualstudiocode 307 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Project Name: Django Blog Web Application 2 | 3 | ## How To Setup 4 | 1. Clone This Project `git clone https://github.com/sajib1066/django-blog.git` 5 | 2. Enter Project Directory `cd django-blog` 6 | 3. Create a Virtual Environment `virtualenv env` 7 | 4. Activate Virtual Environment `source env/bin/activate` 8 | 5. Install Requirements Package `pip install -r requirements.txt` 9 | 6. Migrate Database `python manage.py migrate` 10 | 7. Create Super User `python manage.py createsuperuser` 11 | 8. Finally Run The Project `python manage.py runserver` 12 | 13 | ## Preview 14 | [![Preview](http://img.youtube.com/vi/u-ZMbQxhNC8/0.jpg)](http://www.youtube.com/watch?v=u-ZMbQxhNC8 "") 15 | 16 | ## Website Demo 17 | ![b-1](https://user-images.githubusercontent.com/39632170/63780390-d790f200-c909-11e9-9060-581828c8815c.png) 18 | ![b2](https://user-images.githubusercontent.com/39632170/63780460-f7281a80-c909-11e9-940e-a251c954543f.png) 19 | ![b3](https://user-images.githubusercontent.com/39632170/63780461-f7c0b100-c909-11e9-8c2b-250ad8d7bc8c.png) 20 | ![b4](https://user-images.githubusercontent.com/39632170/63780462-f7c0b100-c909-11e9-8e84-ef64356cddd6.png) 21 | ![b5](https://user-images.githubusercontent.com/39632170/63780463-f8594780-c909-11e9-9c65-797696f823b5.png) 22 | ![b6](https://user-images.githubusercontent.com/39632170/63780465-f8594780-c909-11e9-9704-432bf780dc18.png) 23 | ![b7](https://user-images.githubusercontent.com/39632170/63780467-f8f1de00-c909-11e9-956f-bbe14d5546af.png) 24 | ![b8](https://user-images.githubusercontent.com/39632170/63780470-f98a7480-c909-11e9-840d-8c26b355bddd.png) 25 | -------------------------------------------------------------------------------- /author/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/author/__init__.py -------------------------------------------------------------------------------- /author/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import AuthorProfile 3 | 4 | admin.site.register(AuthorProfile) 5 | -------------------------------------------------------------------------------- /author/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AuthorConfig(AppConfig): 5 | name = 'author' 6 | -------------------------------------------------------------------------------- /author/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.13 on 2020-07-18 15:46 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 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='AuthorProfile', 19 | fields=[ 20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 | ('author_name', models.CharField(max_length=45)), 22 | ('author_img', models.ImageField(upload_to='media/author_images')), 23 | ('author_description', models.TextField()), 24 | ('author_gender', models.CharField(choices=[('male', 'Male'), ('female', 'Female')], max_length=6)), 25 | ('author_facebook', models.URLField(blank=True, null=True)), 26 | ('author_twitter', models.URLField(blank=True, null=True)), 27 | ('author_linkedin', models.URLField(blank=True, null=True)), 28 | ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 29 | ], 30 | ), 31 | ] 32 | -------------------------------------------------------------------------------- /author/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/author/migrations/__init__.py -------------------------------------------------------------------------------- /author/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | 4 | class AuthorProfile(models.Model): 5 | user = models.OneToOneField(User, on_delete=models.CASCADE) 6 | author_name = models.CharField(max_length=45) 7 | author_img = models.ImageField(upload_to='media/author_images') 8 | author_description = models.TextField() 9 | gender_choices = ( 10 | ('male', 'Male'), 11 | ('female', 'Female') 12 | ) 13 | author_gender = models.CharField(choices=gender_choices, max_length=6) 14 | author_facebook = models.URLField(null=True, blank=True) 15 | author_twitter = models.URLField(null=True, blank=True) 16 | author_linkedin = models.URLField(null=True, blank=True) 17 | 18 | def __str__(self): 19 | return self.author_name 20 | -------------------------------------------------------------------------------- /author/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /author/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /blog/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/blog/__init__.py -------------------------------------------------------------------------------- /blog/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Category, Tags, Post, FeaturedPost, MenuCategory 3 | 4 | class CategoryAdmin(admin.ModelAdmin): 5 | list_display = ['id', 'name', 'title', 'author', 'create_date'] 6 | 7 | class TagsAdmin(admin.ModelAdmin): 8 | list_display = ['id', 'name', 'author', 'create_date'] 9 | 10 | class PostAdmin(admin.ModelAdmin): 11 | list_display = ['id', 'title', 'category', 'author', 'pub_date'] 12 | 13 | class FeaturedPostAdmin(admin.ModelAdmin): 14 | list_display = ['id', 'post', 'date'] 15 | 16 | class MenuCategoryAdmin(admin.ModelAdmin): 17 | list_display = ['id', 'menu', 'date'] 18 | 19 | admin.site.register(Category, CategoryAdmin) 20 | admin.site.register(Tags, TagsAdmin) 21 | admin.site.register(Post, PostAdmin) 22 | admin.site.register(FeaturedPost, FeaturedPostAdmin) 23 | admin.site.register(MenuCategory, MenuCategoryAdmin) 24 | -------------------------------------------------------------------------------- /blog/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BlogConfig(AppConfig): 5 | name = 'blog' 6 | -------------------------------------------------------------------------------- /blog/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.13 on 2020-07-18 15:46 2 | 3 | import ckeditor_uploader.fields 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ('author', '0001_initial'), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name='Category', 19 | fields=[ 20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 | ('name', models.CharField(max_length=45, unique=True)), 22 | ('title', models.CharField(max_length=500)), 23 | ('ctg_image', models.ImageField(upload_to='ctg-images/')), 24 | ('create_date', models.DateTimeField(auto_now_add=True)), 25 | ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='author.AuthorProfile')), 26 | ], 27 | ), 28 | migrations.CreateModel( 29 | name='Tags', 30 | fields=[ 31 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 32 | ('name', models.CharField(max_length=45, unique=True)), 33 | ('create_date', models.DateTimeField(auto_now_add=True)), 34 | ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='author.AuthorProfile')), 35 | ], 36 | ), 37 | migrations.CreateModel( 38 | name='Post', 39 | fields=[ 40 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 41 | ('title', models.CharField(max_length=100, unique=True)), 42 | ('image', models.ImageField(upload_to='post-image/')), 43 | ('content', ckeditor_uploader.fields.RichTextUploadingField()), 44 | ('is_draft', models.BooleanField(default=False)), 45 | ('pub_date', models.DateTimeField(auto_now_add=True)), 46 | ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='author.AuthorProfile')), 47 | ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Category')), 48 | ('tags', models.ManyToManyField(to='blog.Tags')), 49 | ], 50 | ), 51 | migrations.CreateModel( 52 | name='MenuCategory', 53 | fields=[ 54 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 55 | ('date', models.DateTimeField(auto_now_add=True)), 56 | ('menu', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='blog.Category')), 57 | ], 58 | ), 59 | migrations.CreateModel( 60 | name='FeaturedPost', 61 | fields=[ 62 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 63 | ('is_draft', models.BooleanField(default=False)), 64 | ('date', models.DateTimeField(auto_now_add=True)), 65 | ('post', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='blog.Post')), 66 | ], 67 | ), 68 | ] 69 | -------------------------------------------------------------------------------- /blog/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/blog/migrations/__init__.py -------------------------------------------------------------------------------- /blog/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from ckeditor_uploader.fields import RichTextUploadingField 3 | from author.models import AuthorProfile 4 | 5 | class Category(models.Model): 6 | name = models.CharField(max_length=45, unique=True) 7 | title = models.CharField(max_length=500) 8 | ctg_image = models.ImageField(upload_to='ctg-images/') 9 | author = models.ForeignKey(AuthorProfile, on_delete=models.SET_NULL, null=True, blank=True) 10 | create_date = models.DateTimeField(auto_now_add=True) 11 | 12 | def __str__(self): 13 | return self.name 14 | 15 | class Tags(models.Model): 16 | name = models.CharField(max_length=45, unique=True) 17 | author = models.ForeignKey(AuthorProfile, on_delete=models.SET_NULL, null=True, blank=True) 18 | create_date = models.DateTimeField(auto_now_add=True) 19 | 20 | def __str__(self): 21 | return self.name 22 | 23 | class PostManager(models.Manager): 24 | def latest_post(self): 25 | l_post = Post.objects.filter(is_draft=False).order_by('-pub_date')[:3] 26 | return l_post 27 | 28 | class Post(models.Model): 29 | title = models.CharField(max_length=100, unique=True) 30 | image = models.ImageField(upload_to='post-image/') 31 | content = RichTextUploadingField() 32 | category = models.ForeignKey(Category, on_delete=models.CASCADE) 33 | tags = models.ManyToManyField(Tags) 34 | author = models.ForeignKey(AuthorProfile, on_delete=models.SET_NULL, null=True) 35 | is_draft = models.BooleanField(default=False) 36 | pub_date = models.DateTimeField(auto_now_add=True) 37 | 38 | objects = PostManager() 39 | 40 | def __str__(self): 41 | return self.title 42 | 43 | class FeaturedPostManager(models.Manager): 44 | def featured_post(self): 45 | f_post = FeaturedPost.objects.filter(is_draft=False).order_by('-date')[:3] 46 | return f_post 47 | 48 | class FeaturedPost(models.Model): 49 | post = models.OneToOneField(Post, on_delete=models.CASCADE) 50 | is_draft = models.BooleanField(default=False) 51 | date = models.DateTimeField(auto_now_add=True) 52 | 53 | objects = FeaturedPostManager() 54 | 55 | def __str__(self): 56 | return str(self.post) 57 | 58 | class MenuCategory(models.Model): 59 | menu = models.OneToOneField(Category, on_delete=models.CASCADE) 60 | date = models.DateTimeField(auto_now_add=True) 61 | 62 | def __str__(self): 63 | return str(self.menu) 64 | -------------------------------------------------------------------------------- /blog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /blog/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import category, blog_post, search_post 3 | 4 | urlpatterns = [ 5 | path('category', category, name='category'), 6 | path('post/', blog_post, name='blog-post'), 7 | path('search', search_post, name='search') 8 | ] 9 | -------------------------------------------------------------------------------- /blog/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from .models import Post, FeaturedPost 3 | 4 | # Create your views here. 5 | def category(request): 6 | return render(request, 'blog/category.html') 7 | 8 | def blog_post(request, post): 9 | try: 10 | post = Post.objects.get(id=post) 11 | most_read_post = Post.objects.filter(is_draft=False).order_by('-id')[:4] 12 | featured_post = FeaturedPost.objects.featured_post() 13 | context = { 14 | 'post': post, 15 | 'most_read_post': most_read_post, 16 | 'featured_post': featured_post 17 | } 18 | return render(request, 'blog/blog-post.html', context) 19 | except: 20 | return render(request, '404.html') 21 | 22 | def search_post(request): 23 | if request.method == 'POST': 24 | data = request.POST['search'] 25 | posts = Post.objects.filter(title__icontains=data) 26 | context = { 27 | 'posts': posts 28 | } 29 | return render(request, 'blog/search.html', context) 30 | return render(request, 'blog/search.html') 31 | -------------------------------------------------------------------------------- /contact/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/contact/__init__.py -------------------------------------------------------------------------------- /contact/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Contact, NewsLetter 4 | 5 | class ContactAdmin(admin.ModelAdmin): 6 | list_display = ['name', 'email', 'subject', 'date'] 7 | 8 | admin.site.register(Contact, ContactAdmin) 9 | admin.site.register(NewsLetter) 10 | -------------------------------------------------------------------------------- /contact/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ContactConfig(AppConfig): 5 | name = 'contact' 6 | -------------------------------------------------------------------------------- /contact/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from .models import Contact, NewsLetter 3 | 4 | class ContactForm(forms.ModelForm): 5 | class Meta: 6 | model = Contact 7 | fields = '__all__' 8 | widgets = { 9 | 'name': forms.TextInput(attrs={'class': 'input', 'placeholder': 'Your Name'}), 10 | 'email': forms.EmailInput(attrs={'class': 'input', 'placeholder': 'Your Email'}), 11 | 'subject': forms.TextInput(attrs={'class': 'input', 'placeholder': 'Subject'}), 12 | 'message': forms.Textarea(attrs={'class': 'input', 'placeholder': 'Message'}) 13 | } 14 | 15 | class NewsletterForm(forms.ModelForm): 16 | class Meta: 17 | model = NewsLetter 18 | fields = ('email', ) 19 | widgets = { 20 | 'email': forms.EmailInput(attrs={'class': 'input', 'placeholder': 'Enter your email'}) 21 | } 22 | -------------------------------------------------------------------------------- /contact/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.13 on 2020-07-18 15:46 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Contact', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('name', models.CharField(max_length=200)), 19 | ('email', models.EmailField(max_length=200)), 20 | ('subject', models.CharField(max_length=200)), 21 | ('message', models.TextField()), 22 | ('date', models.DateTimeField(auto_now_add=True)), 23 | ], 24 | ), 25 | migrations.CreateModel( 26 | name='NewsLetter', 27 | fields=[ 28 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 29 | ('email', models.EmailField(max_length=254)), 30 | ('date', models.DateTimeField(auto_now_add=True)), 31 | ], 32 | ), 33 | ] 34 | -------------------------------------------------------------------------------- /contact/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/contact/migrations/__init__.py -------------------------------------------------------------------------------- /contact/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | class Contact(models.Model): 4 | name = models.CharField(max_length=200) 5 | email = models.EmailField(max_length=200) 6 | subject = models.CharField(max_length=200) 7 | message = models.TextField() 8 | date = models.DateTimeField(auto_now_add=True) 9 | 10 | def __str__(self): 11 | return self.name 12 | 13 | class NewsLetter(models.Model): 14 | email = models.EmailField(max_length=254) 15 | date = models.DateTimeField(auto_now_add=True) 16 | 17 | def __str__(self): 18 | return self.email 19 | -------------------------------------------------------------------------------- /contact/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /contact/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('', views.contact_page, name='contact') 6 | ] 7 | -------------------------------------------------------------------------------- /contact/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from django.contrib import messages 3 | 4 | from .forms import ContactForm 5 | 6 | 7 | def contact_page(request): 8 | forms = ContactForm() 9 | if request.method == 'POST': 10 | forms = ContactForm(request.POST) 11 | if forms.is_valid(): 12 | forms.save() 13 | messages.add_message(request, messages.INFO, 'Submitted!') 14 | return redirect('contact') 15 | context = { 16 | 'forms': forms 17 | } 18 | return render(request, 'contact/contact.html', context) 19 | -------------------------------------------------------------------------------- /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 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'webmagblog.settings') 9 | try: 10 | from django.core.management import execute_from_command_line 11 | except ImportError as exc: 12 | raise ImportError( 13 | "Couldn't import Django. Are you sure it's installed and " 14 | "available on your PYTHONPATH environment variable? Did you " 15 | "forget to activate a virtual environment?" 16 | ) from exc 17 | execute_from_command_line(sys.argv) 18 | 19 | 20 | if __name__ == '__main__': 21 | main() 22 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==2.2.28 2 | django-ckeditor==5.7.1 3 | django-js-asset==1.2.2 4 | Pillow==9.3.0 5 | pytz==2019.1 6 | sqlparse==0.3.0 7 | -------------------------------------------------------------------------------- /static/css/font-awesome.min.css: -------------------------------------------------------------------------------- 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 | */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} 5 | -------------------------------------------------------------------------------- /static/css/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Template Name: WebMag Html Template 3 | 4 | Author: yaminncco 5 | 6 | Colors: 7 | Body : #3d455c 8 | Headers : #212631 9 | Primary : #212631 #4BB92F #ff8700 #0078ff #8d00ff 10 | Dark : #212631 11 | Grey : #eceef2 #a7b3c6 #fbfbfd 12 | 13 | Fonts: Nunito & Nunito-Sans 14 | 15 | Table OF Contents 16 | ------------------------------------ 17 | GENERAL 18 | NAVIGATION 19 | HEADER 20 | POST 21 | POST PAGE 22 | ASIDE 23 | FOOTER 24 | RESPONSIVE 25 | ------------------------------------*/ 26 | /*========================================================= 27 | GENERAL 28 | ===========================================================*/ 29 | /*----------------------------*\ 30 | typography 31 | \*----------------------------*/ 32 | body { 33 | font-family: 'Nunito', sans-serif; 34 | font-size: 16px; 35 | font-weight: 300; 36 | color: #3d455c; 37 | margin: 0; 38 | padding: 0; 39 | overflow-x: hidden; 40 | } 41 | h1, h2, h3, h4, h5, h6 { 42 | font-family: 'Nunito Sans', sans-serif; 43 | font-weight: 700; 44 | color: #212631; 45 | margin: 0px 0px 15px; 46 | } 47 | h1 { 48 | font-size: 34px; 49 | } 50 | h2 { 51 | font-size: 28px; 52 | } 53 | h3 { 54 | font-size: 23px; 55 | } 56 | h4 { 57 | font-size: 16px; 58 | } 59 | a { 60 | font-weight: 600; 61 | color: #212631; 62 | text-decoration: none; 63 | } 64 | a:hover, a:focus{ 65 | color: #212631; 66 | text-decoration: underline; 67 | outline: none; 68 | } 69 | p { 70 | margin: 0px 0px 20px; 71 | } 72 | ul,ol{ 73 | margin: 0; 74 | padding: 0; 75 | list-style: none 76 | } 77 | ul.list-style, ol.list-style { 78 | padding-left: 15px; 79 | margin-bottom: 10px; 80 | } 81 | ul.list-style { 82 | list-style-type: disc; 83 | } 84 | ol.list-style { 85 | list-style-type: decimal; 86 | } 87 | blockquote.blockquote { 88 | position:relative; 89 | border-left:0; 90 | font-weight:600; 91 | margin-bottom:10px; 92 | padding: 20px; 93 | } 94 | blockquote.blockquote:before { 95 | content: "``"; 96 | font-family: 'Nunito Sans', sans-serif; 97 | display: block; 98 | position: absolute; 99 | left: -5px; 100 | top: 5px; 101 | font-size: 240px; 102 | line-height: 200px; 103 | color: #eceef2; 104 | letter-spacing: -30px; 105 | z-index: -2; 106 | } 107 | figure.figure-img { 108 | margin-bottom:20px; 109 | } 110 | figure.figure-img figcaption { 111 | padding-top:5px; 112 | font-size: 13px; 113 | font-weight:600; 114 | } 115 | .input { 116 | height: 40px; 117 | border: 2px solid #eceef2; 118 | width: 100%; 119 | padding: 0px 15px; 120 | -webkit-transition: 0.2s border; 121 | transition: 0.2s border; 122 | } 123 | .input:focus { 124 | border-color: #3d455c; 125 | } 126 | textarea.input { 127 | height: 90px; 128 | padding: 15px; 129 | } 130 | .primary-button { 131 | padding: 9px 45px; 132 | border: none; 133 | background-color: #212631; 134 | font-weight: 600; 135 | text-transform: uppercase; 136 | font-size: 13px; 137 | color: #fff; 138 | -webkit-transition: 0.2s opacity; 139 | transition: 0.2s opacity; 140 | } 141 | .primary-button:hover,.primary-button:focus { 142 | color: #fff; 143 | opacity: 0.9; 144 | } 145 | .section { 146 | padding-top: 40px; 147 | } 148 | .section.section-grey { 149 | background-color: #fbfbfd; 150 | border-bottom: 1px solid #eceef2; 151 | border-top: 1px solid #eceef2; 152 | } 153 | .section .section-title { 154 | margin-bottom: 40px; 155 | } 156 | .section .section-title h2 { 157 | text-transform: capitalize; 158 | font-size: 28px; 159 | } 160 | .section-row { 161 | margin-bottom:40px; 162 | } 163 | /*========================================================= 164 | NAVIGATION 165 | ===========================================================*/ 166 | #nav { 167 | height: 70px; 168 | } 169 | #nav:after { 170 | content: ""; 171 | position: fixed; 172 | left: 0; 173 | right: 0; 174 | bottom: 0; 175 | top: 0; 176 | background-color: rgba(33, 38, 49, 0.5); 177 | z-index: 90; 178 | opacity: 0; 179 | visibility: hidden; 180 | -webkit-transition: 0.2s all; 181 | transition: 0.2s all; 182 | } 183 | #nav.shadow-active:after { 184 | opacity: 1; 185 | visibility: visible; 186 | } 187 | #nav-fixed { 188 | position: fixed; 189 | left: 0; 190 | right: 0; 191 | top: 0; 192 | z-index: 90; 193 | background-color: #FFF; 194 | -webkit-box-shadow: 0px -1px 0px 0px #eceef2 inset; 195 | box-shadow: 0px -1px 0px 0px #eceef2 inset; 196 | } 197 | #nav-fixed.slide-down { 198 | -webkit-animation: slide-down 0.3s; 199 | animation: slide-down 0.3s; 200 | } 201 | #nav-fixed.slide-up { 202 | -webkit-animation: slide-up 0.3s; 203 | animation: slide-up 0.3s; 204 | -webkit-animation-fill-mode: forwards; 205 | animation-fill-mode: forwards; 206 | } 207 | @-webkit-keyframes slide-down { 208 | from { 209 | -webkit-transform:translateY(-100%); 210 | transform:translateY(-100%); 211 | } 212 | to { 213 | -webkit-transform:translateY(0%); 214 | transform:translateY(0%); 215 | } 216 | } 217 | @keyframes slide-down { 218 | from { 219 | -webkit-transform:translateY(-100%); 220 | transform:translateY(-100%); 221 | } 222 | to { 223 | -webkit-transform:translateY(0%); 224 | transform:translateY(0%); 225 | } 226 | } 227 | @-webkit-keyframes slide-up { 228 | from { 229 | -webkit-transform:translateY(0%); 230 | transform:translateY(0%); 231 | } 232 | to { 233 | -webkit-transform:translateY(-100%); 234 | transform:translateY(-100%); 235 | } 236 | } 237 | @keyframes slide-up { 238 | from { 239 | -webkit-transform:translateY(0%); 240 | transform:translateY(0%); 241 | } 242 | to { 243 | -webkit-transform:translateY(-100%); 244 | transform:translateY(-100%); 245 | } 246 | } 247 | #nav .container { 248 | position: relative; 249 | } 250 | /*----------------------------*\ 251 | logo 252 | \*----------------------------*/ 253 | .nav-logo { 254 | float:left; 255 | } 256 | .nav-logo .logo { 257 | line-height: 70px; 258 | display:inline-block; 259 | } 260 | .nav-logo .logo > img { 261 | width: 100%; 262 | max-height: 70px; 263 | } 264 | /*----------------------------*\ 265 | menu 266 | \*----------------------------*/ 267 | .nav-menu { 268 | margin-left: 20px; 269 | } 270 | .nav-menu li a { 271 | position: relative; 272 | padding: 25px 20px; 273 | text-transform: capitalize; 274 | -webkit-box-shadow: -1px 0px 0px 0px #eceef2 inset; 275 | box-shadow: -1px 0px 0px 0px #eceef2 inset; 276 | -webkit-transition: 0.2s color; 277 | transition: 0.2s color; 278 | } 279 | .nav-menu li:first-child a { 280 | border-left: 1px solid #eceef2; 281 | } 282 | .nav-menu li a:after { 283 | content: ''; 284 | position: absolute; 285 | left: 0; 286 | right: 0; 287 | bottom: 0px; 288 | width: 100%; 289 | height: 4px; 290 | -webkit-transition: 0.2s width; 291 | transition: 0.2s width; 292 | } 293 | .nav-menu li.cat-1 a:after { 294 | background-color: #4BB92F; 295 | } 296 | .nav-menu li.cat-2 a:after { 297 | background-color: #ff8700; 298 | } 299 | .nav-menu li.cat-3 a:after { 300 | background-color: #0078ff; 301 | } 302 | .nav-menu li.cat-4 a:after { 303 | background-color: #8d00ff; 304 | } 305 | .nav-menu li a:hover, .nav-menu li a:focus { 306 | background-color: transparent; 307 | text-decoration: none; 308 | } 309 | .nav-menu li.cat-1 a:hover, .nav-menu li.cat-1 a:focus { 310 | color: #4BB92F; 311 | } 312 | .nav-menu li.cat-2 a:hover, .nav-menu li.cat-2 a:focus { 313 | color: #ff8700; 314 | } 315 | .nav-menu li.cat-3 a:hover, .nav-menu li.cat-3 a:focus { 316 | color: #0078ff; 317 | } 318 | .nav-menu li.cat-4 a:hover, .nav-menu li.cat-4 a:focus { 319 | color: #8d00ff; 320 | } 321 | /*----------------------------*\ 322 | search 323 | \*----------------------------*/ 324 | .nav-btns { 325 | float:right; 326 | } 327 | .nav-btns > button { 328 | padding: 25px 25px; 329 | border: none; 330 | line-height: 20px; 331 | background: transparent; 332 | } 333 | .nav-btns .search-form { 334 | position: absolute; 335 | left: 0; 336 | right: 0; 337 | top: 0; 338 | bottom: 0px; 339 | padding: 0px 15px; 340 | opacity: 0; 341 | visibility: hidden; 342 | -webkit-transition: 0.3s all; 343 | transition: 0.3s all; 344 | } 345 | .nav-btns .search-form.active { 346 | opacity: 1; 347 | visibility: visible; 348 | } 349 | .nav-btns .search-form .search-input { 350 | height: 100%; 351 | width: 100%; 352 | border: none; 353 | background: #FFF; 354 | padding: 0px; 355 | font-weight: 600; 356 | } 357 | .nav-btns .search-form .search-close { 358 | position: absolute; 359 | top: 50%; 360 | right: 15px; 361 | -webkit-transform: translateY(-50%); 362 | -ms-transform: translateY(-50%); 363 | transform: translateY(-50%); 364 | border: none; 365 | background: transparent; 366 | line-height: 20px; 367 | color: #212631; 368 | font-size: 22px; 369 | padding: 0; 370 | } 371 | /*----------------------------*\ 372 | nav aside 373 | \*----------------------------*/ 374 | #nav-aside { 375 | position: fixed; 376 | right: 0; 377 | top: 0; 378 | bottom: 0; 379 | background-color: #fff; 380 | max-width: 360px; 381 | width: 100%; 382 | padding: 80px 20px; 383 | overflow-y: scroll; 384 | z-index: 99; 385 | -webkit-transform: translateX(100%); 386 | -ms-transform: translateX(100%); 387 | transform: translateX(100%); 388 | -webkit-transition: 0.3s all; 389 | transition: 0.3s all; 390 | } 391 | #nav-aside.active { 392 | -webkit-transform: translateX(0%); 393 | -ms-transform: translateX(0%); 394 | transform: translateX(0%); 395 | } 396 | .nav-aside-menu li a { 397 | font-family: 'Nunito Sans', sans-serif; 398 | font-weight:700; 399 | font-size:23px; 400 | } 401 | .nav-aside-social li { 402 | display: inline-block; 403 | } 404 | .nav-aside-social li > a { 405 | display: block; 406 | width: 30px; 407 | height: 30px; 408 | line-height: 30px; 409 | text-align: center; 410 | background-color: #212631; 411 | color: #FFF; 412 | border-radius: 2px; 413 | margin-right: 5px; 414 | -webkit-transition: 0.2s opacity; 415 | transition: 0.2s opacity; 416 | } 417 | .nav-aside-social li > a:hover, .nav-aside-social li > a:focus { 418 | opacity: 0.9; 419 | } 420 | .nav-aside-close { 421 | position: absolute; 422 | top: 0px; 423 | right: 0px; 424 | height: 70px; 425 | width: 70px; 426 | line-height: 70px; 427 | text-align: center; 428 | background-color: transparent; 429 | color: #212631; 430 | border: none; 431 | font-size: 22px; 432 | border-radius: 50%; 433 | padding: 0; 434 | } 435 | /*========================================================= 436 | HEADER 437 | ===========================================================*/ 438 | .page-header { 439 | position: relative; 440 | margin: 0; 441 | padding-top: 60px; 442 | padding-bottom: 60px; 443 | background-color: #fbfbfd; 444 | border-bottom: 2px solid #F4f4f9; 445 | } 446 | .page-header .background-img { 447 | position: absolute; 448 | top: 0; 449 | left: 0; 450 | right: 0; 451 | bottom: 0; 452 | background-position: center; 453 | background-size: cover; 454 | } 455 | .page-header .background-img:after { 456 | content: ''; 457 | position: absolute; 458 | top: 0; 459 | left: 0; 460 | right: 0; 461 | bottom: 0; 462 | background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(33, 38, 49, 0.3)), to(transparent)); 463 | background-image: linear-gradient(to top, rgba(33, 38, 49, 0.3) 0%, transparent 100%); 464 | } 465 | #post-header.page-header { 466 | padding-top: 120px; 467 | } 468 | .page-header h1 { 469 | text-transform: capitalize; 470 | margin-bottom: 0px; 471 | } 472 | #post-header.page-header h1 { 473 | color: #FFF; 474 | } 475 | .page-header .post-meta { 476 | margin: 15px 0px; 477 | } 478 | .page-header .post-meta .post-date { 479 | color: #eceef2; 480 | } 481 | .page-header .page-header-breadcrumb { 482 | margin: 15px 0px; 483 | } 484 | .page-header .page-header-breadcrumb li { 485 | display: inline-block; 486 | } 487 | .page-header .page-header-breadcrumb li, .page-header .page-header-breadcrumb li a { 488 | font-size: 13px; 489 | text-transform: capitalize; 490 | color: #a7b3c6; 491 | } 492 | .page-header .page-header-breadcrumb li a { 493 | -webkit-transition: 0.2s color; 494 | transition: 0.2s color; 495 | } 496 | .page-header .page-header-breadcrumb li a:hover, .page-header .page-header-breadcrumb li a:focus { 497 | color: #0b0f28; 498 | text-decoration: none; 499 | } 500 | .page-header .page-header-breadcrumb li + li:before { 501 | content: '/'; 502 | display: inline-block; 503 | margin: 0px 10px; 504 | } 505 | /*========================================================= 506 | POST 507 | ===========================================================*/ 508 | /*----------------------------*\ 509 | post 510 | \*----------------------------*/ 511 | .post { 512 | margin-bottom: 40px; 513 | } 514 | .post .post-img { 515 | display: block; 516 | -webkit-transition: 0.2s opacity; 517 | transition: 0.2s opacity; 518 | } 519 | .post .post-img:hover, .post .post-img:focus { 520 | opacity: 0.9; 521 | } 522 | .post .post-img > img { 523 | width: 100%; 524 | } 525 | .post .post-meta { 526 | margin-top: 15px; 527 | margin-bottom: 15px; 528 | } 529 | .post-meta .post-category { 530 | font-size: 13px; 531 | text-transform: uppercase; 532 | padding: 3px 10px; 533 | font-weight: 600; 534 | border-radius: 2px; 535 | margin-right: 15px; 536 | color: #FFF; 537 | background-color: #212631; 538 | -webkit-transition: 0.2s opacity; 539 | transition: 0.2s opacity; 540 | } 541 | .post-meta .post-category:hover, .post-meta .post-category:focus { 542 | text-decoration: none; 543 | opacity: 0.9; 544 | } 545 | .post-meta .post-category.cat-1 { 546 | background-color: #4BB92F; 547 | } 548 | .post-meta .post-category.cat-2 { 549 | background-color: #ff8700; 550 | } 551 | .post-meta .post-category.cat-3 { 552 | background-color: #8d00ff; 553 | } 554 | .post-meta .post-category.cat-4 { 555 | background-color: #0078ff; 556 | } 557 | .post-meta .post-date { 558 | font-size: 13px; 559 | font-weight: 600; 560 | } 561 | .post .post-title { 562 | font-size: 18px; 563 | margin-bottom: 0px; 564 | color: #ffffff; 565 | } 566 | .post-tags li { 567 | display:inline-block; 568 | margin-right:3px; 569 | margin-bottom:5px; 570 | } 571 | .post-tags li a { 572 | display:block; 573 | color:#fff; 574 | background-color: #212631; 575 | padding:3px 10px; 576 | font-weight:600; 577 | border-radius:2px; 578 | -webkit-transition:0.2s opacity; 579 | transition:0.2s opacity; 580 | } 581 | /*----------------------------*\ 582 | post thumb 583 | \*----------------------------*/ 584 | .post.post-thumb { 585 | position: relative; 586 | } 587 | .post.post-thumb .post-img:after { 588 | content: ''; 589 | position: absolute; 590 | left: 0; 591 | right: 0; 592 | bottom: 0; 593 | top: 0; 594 | background: -webkit-gradient(linear, left bottom, left top, from(rgba(33, 38, 49, 0.3)), to(transparent)); 595 | background: linear-gradient(to top, rgba(33, 38, 49, 0.3) 0%, transparent 100%); 596 | } 597 | .post.post-thumb .post-body { 598 | position: absolute; 599 | bottom: 0px; 600 | padding: 20px 15px; 601 | } 602 | .post.post-thumb .post-meta .post-date { 603 | color: #eceef2; 604 | } 605 | .post.post-thumb .post-title { 606 | font-size: 22px; 607 | } 608 | .post.post-thumb .post-title > a { 609 | color: #FFF; 610 | } 611 | /*----------------------------*\ 612 | post widget 613 | \*----------------------------*/ 614 | .post.post-widget:after { 615 | content: ''; 616 | display: block; 617 | clear: both; 618 | } 619 | .post.post-widget .post-img { 620 | width: 90px; 621 | float: left; 622 | margin-right: 15px; 623 | } 624 | .post.post-widget .post-img img { 625 | width: 100%; 626 | } 627 | .post.post-widget .post-title { 628 | font-size: 18px; 629 | } 630 | /*----------------------------*\ 631 | post row 632 | \*----------------------------*/ 633 | .post.post-row:after { 634 | content: ''; 635 | display: block; 636 | clear: both; 637 | } 638 | .post.post-row .post-img { 639 | width: 40%; 640 | float: left; 641 | } 642 | .post.post-row .post-body { 643 | margin-left: calc(40% + 30px); 644 | } 645 | .post.post-row .post-meta { 646 | margin-top: 0px; 647 | } 648 | .post.post-row .post-title { 649 | margin-bottom: 15px; 650 | } 651 | /*========================================================= 652 | POST PAGE 653 | ===========================================================*/ 654 | .sticky-container { 655 | position: relative; 656 | padding-left: 80px; 657 | } 658 | .sticky-container .sticky-shares { 659 | position: absolute; 660 | top: 0; 661 | left: 0; 662 | } 663 | .sticky-shares a { 664 | display: block; 665 | margin-bottom: 10px; 666 | width: 40px; 667 | height: 40px; 668 | line-height: 40px; 669 | text-align: center; 670 | border-radius: 50%; 671 | background-color: #fbfbfd; 672 | color: #a7b3c6; 673 | border: 1px solid #eceef2; 674 | -webkit-transition: 0.2s all; 675 | transition: 0.2s all; 676 | } 677 | .sticky-shares a:hover { 678 | -webkit-transform: scale(1.3); 679 | -ms-transform: scale(1.3); 680 | transform: scale(1.3); 681 | } 682 | .sticky-shares a.share-facebook:hover { 683 | color: #3b5998; 684 | border-color: #3b5998; 685 | } 686 | .sticky-shares a.share-twitter:hover { 687 | color: #55acee; 688 | border-color: #55acee; 689 | } 690 | .sticky-shares a.share-google-plus:hover { 691 | color: #dd4b39; 692 | border-color: #dd4b39; 693 | } 694 | .sticky-shares a.share-pinterest:hover { 695 | color: #ff0000; 696 | border-color: #ff0000; 697 | } 698 | .sticky-shares a.share-linkedin:hover { 699 | color: #007bb5; 700 | border-color: #007bb5; 701 | } 702 | /*----------------------------*\ 703 | author 704 | \*----------------------------*/ 705 | .post-author .media .media-left { 706 | padding-right: 40px; 707 | } 708 | .post-author .media .media-left .media-object { 709 | width:120px; 710 | border-radius: 50%; 711 | } 712 | .post-author .author-social { 713 | margin-top:15px; 714 | } 715 | .post-author .author-social li { 716 | display: inline-block; 717 | margin-right: 5px; 718 | } 719 | .post-author .author-social li > a { 720 | display: block; 721 | width: 30px; 722 | height: 30px; 723 | line-height: 30px; 724 | text-align: center; 725 | background-color: #a7b3c6; 726 | color: #FFF; 727 | border-radius: 2px; 728 | -webkit-transition: 0.2s opacity; 729 | transition: 0.2s opacity; 730 | } 731 | .post-author .author-social li > a:hover, .post-author .author-social li > a:focus { 732 | color: #FFF; 733 | opacity: 0.9; 734 | } 735 | /*----------------------------*\ 736 | comments 737 | \*----------------------------*/ 738 | .post-comments .media { 739 | padding-top: 15px; 740 | border-top: 1px solid #eceef2; 741 | } 742 | .post-comments .media:nth-child(1) { 743 | padding-top: 0px; 744 | border-top: none; 745 | } 746 | .post-comments .media .media-left { 747 | padding-right: 15px; 748 | } 749 | .post-comments .media .media-left .media-object { 750 | width:70px; 751 | border-radius: 50%; 752 | } 753 | .post-comments .media .media-body .media-heading h4 { 754 | text-transform: capitalize; 755 | } 756 | .post-comments .media .media-body .media-heading .time { 757 | font-size: 13px; 758 | margin-right: 15px; 759 | color: #a7b3c6; 760 | } 761 | .post-comments .media .media-body .media-heading .reply { 762 | font-size: 13px; 763 | color: #a7b3c6; 764 | -webkit-transition: 0.2s color; 765 | transition: 0.2s color; 766 | } 767 | .post-comments .media .media-body .media-heading .reply:hover, .post-comments .media .media-body .media-heading .reply:focus { 768 | color: #212631; 769 | text-decoration: none; 770 | } 771 | /*========================================================= 772 | Aside 773 | ===========================================================*/ 774 | .aside-widget { 775 | margin-bottom: 40px; 776 | } 777 | /*----------------------------*\ 778 | category 779 | \*----------------------------*/ 780 | .category-widget ul li { 781 | display:block; 782 | padding-bottom: 10px; 783 | border-bottom: 1px solid #eceef2; 784 | } 785 | .category-widget ul li + li { 786 | margin-top:10px; 787 | } 788 | .category-widget ul li > a { 789 | display:block; 790 | -webkit-transition:0.2s color; 791 | transition:0.2s color; 792 | } 793 | .category-widget ul li > a > span { 794 | float:right; 795 | color:#fff; 796 | background-color: #212631; 797 | padding:0px 5px; 798 | font-weight:600; 799 | border-radius:2px; 800 | } 801 | .category-widget ul li > a.cat-1 > span { 802 | background-color: #4BB92F; 803 | } 804 | .category-widget ul li > a.cat-2 > span { 805 | background-color: #ff8700; 806 | } 807 | .category-widget ul li > a.cat-3 > span { 808 | background-color: #8d00ff; 809 | } 810 | .category-widget ul li > a.cat-4 > span { 811 | background-color: #0078ff; 812 | } 813 | .category-widget ul li > a:hover, .category-widget ul li > a:focus { 814 | text-decoration:none; 815 | } 816 | .category-widget ul li > a.cat-1:hover, .category-widget ul li > a.cat-1:focus { 817 | color: #4BB92F; 818 | } 819 | .category-widget ul li > a.cat-2:hover, .category-widget ul li > a.cat-2:focus { 820 | color: #ff8700; 821 | } 822 | .category-widget ul li > a.cat-3:hover, .category-widget ul li > a.cat-3:focus { 823 | color: #0078ff; 824 | } 825 | .category-widget ul li > a.cat-4:hover, .category-widget ul li > a.cat-4:focus { 826 | color: #8d00ff; 827 | } 828 | /*----------------------------*\ 829 | tags 830 | \*----------------------------*/ 831 | .tags-widget ul li { 832 | display:inline-block; 833 | margin-right:3px; 834 | margin-bottom:5px; 835 | } 836 | .tags-widget ul li a { 837 | display:block; 838 | color:#fff; 839 | background-color: #212631; 840 | padding:3px 10px; 841 | font-weight:600; 842 | border-radius:2px; 843 | -webkit-transition:0.2s opacity; 844 | transition:0.2s opacity; 845 | } 846 | .tags-widget ul li a:hover, .tags-widget ul li a:focus { 847 | opacity:0.9; 848 | color:#fff; 849 | text-decoration:none; 850 | } 851 | /*----------------------------*\ 852 | archive 853 | \*----------------------------*/ 854 | .archive-widget ul li { 855 | display:block; 856 | padding-bottom: 10px; 857 | border-bottom: 1px solid #eceef2; 858 | } 859 | .archive-widget ul li + li { 860 | margin-top:10px; 861 | } 862 | .archive-widget ul li > a { 863 | display:block; 864 | } 865 | /*========================================================= 866 | FOOTER 867 | ===========================================================*/ 868 | #footer { 869 | padding-bottom: 40px; 870 | margin-top: 40px; 871 | } 872 | #footer .container { 873 | padding-top: 80px; 874 | border-top: 1px solid #F4f4f9; 875 | } 876 | .footer-widget { 877 | margin-bottom: 40px; 878 | } 879 | .footer-widget .footer-title { 880 | margin-bottom: 40px; 881 | text-transform: capitalize; 882 | font-size: 18px; 883 | } 884 | .footer-widget a { 885 | color: #a7b3c6; 886 | -webkit-transition: 0.2s color; 887 | transition: 0.2s color; 888 | } 889 | .footer-widget a:hover, .footer-widget a:focus { 890 | text-decoration: none; 891 | color: #212631; 892 | } 893 | .footer-logo { 894 | margin-bottom: 40px; 895 | } 896 | .footer-nav li { 897 | display: inline-block; 898 | margin-right: 15px; 899 | } 900 | .footer-links li + li { 901 | margin-top: 5px; 902 | } 903 | .footer-copyright { 904 | margin-top: 20px; 905 | color: #a7b3c6; 906 | font-size: 13px; 907 | } 908 | .footer-newsletter form { 909 | position: relative; 910 | } 911 | .footer-newsletter form > input.input { 912 | padding-right: 55px; 913 | } 914 | .footer-newsletter form > .newsletter-btn { 915 | position: absolute; 916 | top: 0; 917 | right: 0; 918 | height: 40px; 919 | line-height: 40px; 920 | width: 40px; 921 | text-align: center; 922 | color: #a7b3c6; 923 | background: transparent; 924 | border: none; 925 | border-radius: 0px 2px 2px 0px; 926 | -webkit-transition: 0.2s opacity; 927 | transition: 0.2s opacity; 928 | } 929 | .footer-newsletter form > .newsletter-btn:hover { 930 | opacity: 0.9; 931 | } 932 | .footer-social { 933 | margin-top: 20px; 934 | } 935 | .footer-social li { 936 | display: inline-block; 937 | margin-right: 5px; 938 | } 939 | .footer-social li > a { 940 | display: block; 941 | width: 30px; 942 | height: 30px; 943 | line-height: 30px; 944 | text-align: center; 945 | background-color: #a7b3c6; 946 | color: #FFF; 947 | border-radius: 2px; 948 | -webkit-transition: 0.2s opacity; 949 | transition: 0.2s opacity; 950 | } 951 | .footer-social li > a:hover, .footer-social li > a:focus { 952 | color: #FFF; 953 | opacity: 0.9; 954 | } 955 | /*========================================================= 956 | RESPONSIVE 957 | ===========================================================*/ 958 | @media only screen and (max-width: 991px) { 959 | #nav .nav-menu { 960 | display: none; 961 | } 962 | } 963 | @media only screen and (max-width: 767px) { 964 | .page-header h1 { 965 | font-size: 28px; 966 | } 967 | .post.post-row .post-img { 968 | width: 100%; 969 | float: none; 970 | } 971 | .post.post-row .post-body { 972 | margin-left: 0px; 973 | } 974 | .post.post-row .post-meta { 975 | margin-top: 15px; 976 | } 977 | .post.post-row .post-body p { 978 | display:none; 979 | } 980 | } 981 | -------------------------------------------------------------------------------- /static/error/css/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | -webkit-box-sizing: border-box; 3 | box-sizing: border-box; 4 | } 5 | 6 | body { 7 | padding: 0; 8 | margin: 0; 9 | } 10 | 11 | #notfound { 12 | position: relative; 13 | height: 100vh; 14 | } 15 | 16 | #notfound .notfound { 17 | position: absolute; 18 | left: 50%; 19 | top: 50%; 20 | -webkit-transform: translate(-50%, -50%); 21 | -ms-transform: translate(-50%, -50%); 22 | transform: translate(-50%, -50%); 23 | } 24 | 25 | .notfound { 26 | max-width: 410px; 27 | width: 100%; 28 | text-align: center; 29 | } 30 | 31 | .notfound .notfound-404 { 32 | height: 280px; 33 | position: relative; 34 | z-index: -1; 35 | } 36 | 37 | .notfound .notfound-404 h1 { 38 | font-family: 'Montserrat', sans-serif; 39 | font-size: 230px; 40 | margin: 0px; 41 | font-weight: 900; 42 | position: absolute; 43 | left: 50%; 44 | -webkit-transform: translateX(-50%); 45 | -ms-transform: translateX(-50%); 46 | transform: translateX(-50%); 47 | background: url('../img/bg.jpg') no-repeat; 48 | -webkit-background-clip: text; 49 | -webkit-text-fill-color: transparent; 50 | background-size: cover; 51 | background-position: center; 52 | } 53 | 54 | 55 | .notfound h2 { 56 | font-family: 'Montserrat', sans-serif; 57 | color: #000; 58 | font-size: 24px; 59 | font-weight: 700; 60 | text-transform: uppercase; 61 | margin-top: 0; 62 | } 63 | 64 | .notfound p { 65 | font-family: 'Montserrat', sans-serif; 66 | color: #000; 67 | font-size: 14px; 68 | font-weight: 400; 69 | margin-bottom: 20px; 70 | margin-top: 0px; 71 | } 72 | 73 | .notfound a { 74 | font-family: 'Montserrat', sans-serif; 75 | font-size: 14px; 76 | text-decoration: none; 77 | text-transform: uppercase; 78 | background: #0046d5; 79 | display: inline-block; 80 | padding: 15px 30px; 81 | border-radius: 40px; 82 | color: #fff; 83 | font-weight: 700; 84 | -webkit-box-shadow: 0px 4px 15px -5px #0046d5; 85 | box-shadow: 0px 4px 15px -5px #0046d5; 86 | } 87 | 88 | 89 | @media only screen and (max-width: 767px) { 90 | .notfound .notfound-404 { 91 | height: 142px; 92 | } 93 | .notfound .notfound-404 h1 { 94 | font-size: 112px; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /static/error/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/error/img/bg.jpg -------------------------------------------------------------------------------- /static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /static/img/about-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/about-1.jpg -------------------------------------------------------------------------------- /static/img/about-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/about-2.jpg -------------------------------------------------------------------------------- /static/img/ad-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/ad-1.jpg -------------------------------------------------------------------------------- /static/img/ad-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/ad-2.jpg -------------------------------------------------------------------------------- /static/img/author.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/author.png -------------------------------------------------------------------------------- /static/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/avatar.png -------------------------------------------------------------------------------- /static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/logo.png -------------------------------------------------------------------------------- /static/img/post-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/post-1.jpg -------------------------------------------------------------------------------- /static/img/post-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/post-2.jpg -------------------------------------------------------------------------------- /static/img/post-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/post-3.jpg -------------------------------------------------------------------------------- /static/img/post-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/post-4.jpg -------------------------------------------------------------------------------- /static/img/post-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/post-5.jpg -------------------------------------------------------------------------------- /static/img/post-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/post-6.jpg -------------------------------------------------------------------------------- /static/img/post-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/post-page.jpg -------------------------------------------------------------------------------- /static/img/widget-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/widget-1.jpg -------------------------------------------------------------------------------- /static/img/widget-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/widget-2.jpg -------------------------------------------------------------------------------- /static/img/widget-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/widget-3.jpg -------------------------------------------------------------------------------- /static/img/widget-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/static/img/widget-4.jpg -------------------------------------------------------------------------------- /static/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); -------------------------------------------------------------------------------- /static/js/main.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | "use strict" 3 | 4 | // Fixed Nav 5 | var lastScrollTop = 0; 6 | $(window).on('scroll', function() { 7 | var wScroll = $(this).scrollTop(); 8 | if ( wScroll > $('#nav').height() ) { 9 | if ( wScroll < lastScrollTop ) { 10 | $('#nav-fixed').removeClass('slide-up').addClass('slide-down'); 11 | } else { 12 | $('#nav-fixed').removeClass('slide-down').addClass('slide-up'); 13 | } 14 | } 15 | lastScrollTop = wScroll 16 | }); 17 | 18 | // Search Nav 19 | $('.search-btn').on('click', function () { 20 | $('.search-form').addClass('active'); 21 | }); 22 | 23 | $('.search-close').on('click', function () { 24 | $('.search-form').removeClass('active'); 25 | }); 26 | 27 | // Aside Nav 28 | $(document).click(function(event) { 29 | if (!$(event.target).closest($('#nav-aside')).length) { 30 | if ( $('#nav-aside').hasClass('active') ) { 31 | $('#nav-aside').removeClass('active'); 32 | $('#nav').removeClass('shadow-active'); 33 | } else { 34 | if ($(event.target).closest('.aside-btn').length) { 35 | $('#nav-aside').addClass('active'); 36 | $('#nav').addClass('shadow-active'); 37 | } 38 | } 39 | } 40 | }); 41 | 42 | $('.nav-aside-close').on('click', function () { 43 | $('#nav-aside').removeClass('active'); 44 | $('#nav').removeClass('shadow-active'); 45 | }); 46 | 47 | // Sticky Shares 48 | var $shares = $('.sticky-container .sticky-shares'), 49 | $sharesHeight = $shares.height(), 50 | $sharesTop, 51 | $sharesCon = $('.sticky-container'), 52 | $sharesConTop, 53 | $sharesConleft, 54 | $sharesConHeight, 55 | $sharesConBottom, 56 | $offsetTop = 80; 57 | 58 | function setStickyPos () { 59 | if ($shares.length > 0) { 60 | $sharesTop = $shares.offset().top 61 | $sharesConTop = $sharesCon.offset().top; 62 | $sharesConleft = $sharesCon.offset().left; 63 | $sharesConHeight = $sharesCon.height(); 64 | $sharesConBottom = $sharesConHeight + $sharesConTop; 65 | } 66 | } 67 | 68 | function stickyShares (wScroll) { 69 | if ($shares.length > 0) { 70 | if ( $sharesConBottom - $sharesHeight - $offsetTop < wScroll ) { 71 | $shares.css({ position: 'absolute', top: $sharesConHeight - $sharesHeight , left:0}); 72 | } else if ( $sharesTop < wScroll + $offsetTop ) { 73 | $shares.css({ position: 'fixed', top: $offsetTop, left: $sharesConleft }); 74 | } else { 75 | $shares.css({position: 'absolute', top: 0, left: 0}); 76 | } 77 | } 78 | } 79 | 80 | $(window).on('scroll', function() { 81 | stickyShares($(this).scrollTop()); 82 | }); 83 | 84 | $(window).resize(function() { 85 | setStickyPos(); 86 | stickyShares($(this).scrollTop()); 87 | }); 88 | 89 | setStickyPos(); 90 | 91 | })(jQuery); 92 | -------------------------------------------------------------------------------- /templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends 'base/base.html' %} 2 | {% load static %} 3 | 4 | {% block content %} 5 | 6 |
7 | 8 |
9 | 10 |
11 |
12 |
13 |

No Post Found

14 |
15 |
16 | 17 |
18 | 19 | 20 | {% include 'base/category-tag.html' %} 21 | 22 | 23 | 24 |
25 |
26 |

Archive

27 |
28 |
29 | 34 |
35 |
36 | 37 |
38 |
39 | 40 |
41 | 42 |
43 | 44 | {% endblock %} 45 | -------------------------------------------------------------------------------- /templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends 'base/base.html' %} 2 | {% load static %} 3 | {% block extraheader %} 4 | 5 | 18 | 19 | {% endblock %} 20 | {% block content %} 21 | 22 |
23 | 24 |
25 | 26 |
27 |
28 |
29 |

Lorem ipsum dolor sit amet, ea eos tibique expetendis, tollit viderer ne nam. No ponderum accommodare eam, purto nominavi cum ea, sit no dolores tractatos. Scripta principes quaerendum ex has, ea mei omnes eruditi. Nec ex nulla mandamus, quot omnesque mel et. Amet habemus ancillae id eum, justo dignissim mei ea, vix ei tantas aliquid. Cu laudem impetus conclusionemque nec, velit erant persius te mel. Ut eum verterem perpetua scribentur.

30 |
31 | Cover Photo 32 |
33 |

Vix mollis admodum ei, vis legimus voluptatum ut, vis reprimique efficiendi sadipscing ut. Eam ex animal assueverit consectetuer, et nominati maluisset repudiare nec. Rebum aperiam vis ne, ex summo aliquando dissentiunt vim. Quo ut cibo docendi. Suscipit indoctum ne quo, ne solet offendit hendrerit nec. Case malorum evertitur ei vel.

34 |
35 |
36 |
37 |
38 | 39 |
40 |
41 |
42 |

Our Mission

43 |

Id usu mutat debet tempor, fugit omnesque posidonium nec ei. An assum labitur ocurreret qui, eam aliquid ornatus tibique ut.

44 |
    45 |
  • Vix mollis admodum ei, vis legimus voluptatum ut.

  • 46 |
  • Cu cum alia vide malis. Vel aliquid facilis adolescens.

  • 47 |
  • Laudem rationibus vim id. Te per illum ornatus.

  • 48 |
49 |
50 |
51 |
52 | 53 | 54 |
55 | 56 |
57 | 58 | Add Image 59 | 60 |
61 | 62 | 63 | 64 |
65 |
66 |

Most Read

67 |
68 | {% for post in most_read_post %} 69 |
70 | 71 |
72 |

{{ post.title }}

73 |
74 |
75 | {% endfor %} 76 |
77 | 78 |
79 | 80 |
81 | 82 |
83 | 84 |
85 | 86 | {% endblock %} 87 | -------------------------------------------------------------------------------- /templates/base/asidebar.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 46 | -------------------------------------------------------------------------------- /templates/base/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% load static %} 4 | {% include 'base/header.html' %} 5 | 6 | 7 | 8 | 56 | 57 | 58 | 59 | {% block content %} 60 | 61 | {% endblock %} 62 | 63 | 64 | {% include 'base/footer.html' %} 65 | 66 | 67 | 68 | {% include 'base/js.html' %} 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /templates/base/category-tag.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Catagories

5 |
6 |
7 | 12 |
13 |
14 | 15 | 16 | 17 |
18 |
19 |
    20 | {% for tag in tag %} 21 |
  • {{ tag.name }}
  • 22 | {% endfor %} 23 |
24 |
25 |
26 | 27 | -------------------------------------------------------------------------------- /templates/base/featuredpost.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 |
3 | 4 |
5 | 6 |
7 |
8 |
9 |

Featured Posts

10 |
11 |
12 | 13 | 14 |
15 |
16 | 17 |
18 | 22 |

Chrome Extension Protects Against JavaScript-Based CPU Side-Channel Attacks

23 |
24 |
25 |
26 | 27 | 28 | 29 |
30 |
31 | 32 |
33 | 37 |

Ask HN: Does Anybody Still Use JQuery?

38 |
39 |
40 |
41 | 42 | 43 | 44 |
45 |
46 | 47 |
48 | 52 |

Pagedraw UI Builder Turns Your Website Design Mockup Into Code Automatically

53 |
54 |
55 |
56 | 57 |
58 | 59 |
60 | 61 |
62 | -------------------------------------------------------------------------------- /templates/base/footer.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 |
4 | 5 |
6 | 7 |
8 |
9 | 23 |
24 | 25 |
26 |
27 |
28 | 36 |
37 |
38 | 46 |
47 |
48 |
49 | 50 |
51 | 67 |
68 | 69 |
70 | 71 |
72 | 73 | {% block extrafooter %} 74 | 75 | {% endblock %} 76 |
77 | -------------------------------------------------------------------------------- /templates/base/header.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | WebMag HTML Template 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 29 | 30 | {% block extrahead %} 31 | 32 | {% endblock %} 33 | 34 | 35 | -------------------------------------------------------------------------------- /templates/base/js.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | {% block script %} 9 | 10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /templates/base/mostreadpost.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 |
3 |
4 |
5 |
6 |

Most Read

7 |
8 |
9 | 10 |
11 |
12 | 13 |
14 | 18 |

Chrome Extension Protects Against JavaScript-Based CPU Side-Channel Attacks

19 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam...

20 |
21 |
22 |
23 | 24 | 25 | 26 |
27 |
28 | 29 |
30 | 34 |

Why Node.js Is The Coolest Kid On The Backend Development Block!

35 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam...

36 |
37 |
38 |
39 | 40 | 41 | 42 |
43 |
44 | 45 |
46 | 50 |

CSS Float: A Tutorial

51 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam...

52 |
53 |
54 |
55 | 56 | 57 | 58 |
59 |
60 | 61 |
62 | 66 |

Ask HN: Does Anybody Still Use JQuery?

67 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam...

68 |
69 |
70 |
71 | 72 | 73 |
74 |
75 | 76 |
77 |
78 |
79 |
80 | -------------------------------------------------------------------------------- /templates/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | WebMag HTML Template 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 | 32 | 33 | 34 | 147 | 148 | 149 | 150 |
151 | 152 |
153 | 154 |
155 |
156 |

H1 Typography heading.

157 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

158 | 159 |

H2 Typography heading.

160 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

161 | 162 |

H3 Typography heading.

163 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

164 | 165 |

H4 Typography heading.

166 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

167 | 168 |
    169 |
  • Vix mollis admodum ei, vis legimus voluptatum ut.

  • 170 |
  • Cu cum alia vide malis. Vel aliquid facilis adolescens.

  • 171 |
  • Laudem rationibus vim id. Te per illum ornatus.

  • 172 |
173 | 174 |
    175 |
  1. Vix mollis admodum ei, vis legimus voluptatum ut.

  2. 176 |
  3. Cu cum alia vide malis. Vel aliquid facilis adolescens.

  4. 177 |
  5. Laudem rationibus vim id. Te per illum ornatus.

  6. 178 |
179 |
180 | 181 |
182 | 183 |
184 | 185 | 186 | 187 |
188 | 189 | 190 | 191 |
192 |
193 |

Most Read

194 |
195 | 196 |
197 | 198 |
199 |

Tell-A-Tool: Guide To Web Design And Development Tools

200 |
201 |
202 | 203 |
204 | 205 |
206 |

Pagedraw UI Builder Turns Your Website Design Mockup Into Code Automatically

207 |
208 |
209 | 210 |
211 | 212 |
213 |

Why Node.js Is The Coolest Kid On The Backend Development Block!

214 |
215 |
216 | 217 |
218 | 219 |
220 |

Tell-A-Tool: Guide To Web Design And Development Tools

221 |
222 |
223 |
224 | 225 |
226 | 227 |
228 | 229 |
230 | 231 |
232 | 233 | 234 | 235 |
236 | 237 |
238 | 239 |
240 |
241 | 255 |
256 | 257 |
258 |
259 |
260 | 268 |
269 |
270 | 279 |
280 |
281 |
282 | 283 |
284 | 299 |
300 | 301 |
302 | 303 |
304 | 305 |
306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | -------------------------------------------------------------------------------- /templates/blog/blog-post.html: -------------------------------------------------------------------------------- 1 | {% extends 'base/base.html' %} 2 | {% load static %} 3 | {% block extraheader %} 4 |
5 |
6 |
7 |
8 |
9 | 13 |

{{ post.category.title }}

14 |
15 |
16 |
17 |
18 | {% endblock %} 19 | {% block content %} 20 | 21 |
22 | 23 |
24 | 25 |
26 | 27 |
28 |
29 |
30 |

{{ post.title }}

31 |
32 | {{ post.content|safe }} 33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 |
43 |
44 | 45 | 46 |
47 | 48 | 49 | 50 |
51 | 52 | 53 | 54 |
55 | 74 |
75 | 76 | 77 | 78 |
79 |
80 |

3 Comments

81 |
82 | 83 |
84 | 85 |
86 |
87 | 88 |
89 |
90 |
91 |

John Doe

92 | March 27, 2018 at 8:00 am 93 | Reply 94 |
95 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

96 | 97 | 98 |
99 |
100 | 101 |
102 |
103 |
104 |

John Doe

105 | March 27, 2018 at 8:00 am 106 | Reply 107 |
108 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

109 |
110 |
111 | 112 |
113 |
114 | 115 | 116 | 117 |
118 |
119 | 120 |
121 |
122 |
123 |

John Doe

124 | March 27, 2018 at 8:00 am 125 | Reply 126 |
127 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

128 |
129 |
130 | 131 |
132 |
133 | 134 | 135 | 136 |
137 |
138 |

Leave a reply

139 |

your email address will not be published. required fields are marked *

140 |
141 |
142 |
143 |
144 |
145 | Name * 146 | 147 |
148 |
149 |
150 |
151 | Email * 152 | 153 |
154 |
155 |
156 |
157 | Website 158 | 159 |
160 |
161 |
162 |
163 | 164 |
165 | 166 |
167 |
168 |
169 |
170 | 171 |
172 | 173 | 174 | 175 |
176 | 177 |
178 | 179 | 180 | 181 |
182 | 183 | 184 | 185 |
186 |
187 |

Most Read

188 |
189 | {% for post in most_read_post %} 190 |
191 | 192 |
193 |

{{ post.title }}

194 |
195 |
196 | {% endfor %} 197 |
198 | 199 | 200 | 201 |
202 |
203 |

Featured Posts

204 |
205 | {% for post in featured_post %} 206 |
207 | 208 |
209 | 213 |

{{ post.post.title }}

214 |
215 |
216 | {% endfor %} 217 |
218 | 219 | 220 | 221 | {% include 'base/category-tag.html' %} 222 | 223 | 224 |
225 |
226 |

Archive

227 |
228 |
229 | 234 |
235 |
236 | 237 |
238 | 239 |
240 | 241 |
242 | 243 |
244 | 245 | {% endblock %} 246 | -------------------------------------------------------------------------------- /templates/blog/search.html: -------------------------------------------------------------------------------- 1 | {% extends 'base/base.html' %} 2 | {% load static %} 3 | 4 | {% block content %} 5 | 6 |
7 | 8 |
9 | 10 |
11 |
12 |
13 | {% if posts %} 14 | {% for post in posts %} 15 |
16 |
17 | 18 |
19 | 23 |

{{ post.title }}

24 |
25 |
26 |
27 | {% endfor %} 28 | {% else %} 29 |

No Post Found. Please Search Again!

30 | {% endif %} 31 |
32 |
33 | 34 |
35 | 36 | 37 | {% include 'base/category-tag.html' %} 38 | 39 | 40 | 41 |
42 |
43 |

Archive

44 |
45 |
46 | 51 |
52 |
53 | 54 |
55 |
56 | 57 |
58 | 59 |
60 | 61 | {% endblock %} 62 | -------------------------------------------------------------------------------- /templates/category.html: -------------------------------------------------------------------------------- 1 | {% extends 'base/base.html' %} 2 | {% load static %} 3 | 4 | {% block extraheader %} 5 | 18 | {% endblock %} 19 | 20 | {% block content %} 21 | 22 |
23 | 24 |
25 | 26 |
27 |
28 |
29 | 30 |
31 |
32 | 33 |
34 | 38 |

{{ category_name }}: {{ category_name.title }}

39 |
40 |
41 |
42 | 43 | 44 | 45 | {% for post in ctg_feature_post %} 46 |
47 |
48 | 49 |
50 | 54 |

{{ post.title }}

55 |
56 |
57 |
58 | {% endfor %} 59 | 60 | 61 |
62 | 63 | 64 |
65 |
66 | 67 | 68 | 69 |
70 |
71 | 72 | 73 | 74 | {% if post %} 75 | {% for post in post %} 76 |
77 |
78 | 79 |
80 | 84 |

{{ post.title }}

85 |

{{ post.content|safe|truncatewords:30 }}

86 |
87 |
88 |
89 | {% endfor %} 90 | 91 | 92 |
93 |
94 | 95 |
96 |
97 | {% else %} 98 |

No Post Found!

99 | {% endif %} 100 |
101 |
102 | 103 |
104 | 105 |
106 | 107 | 108 | 109 |
110 | 111 | 112 | 113 | {% if ctg_most_read_post %} 114 |
115 |
116 |

Most Read

117 |
118 | {% for post in ctg_most_read_post %} 119 |
120 | 121 |
122 |

{{ post.title }}

123 |
124 |
125 | {% endfor %} 126 |
127 | {% endif %} 128 | 129 | 130 | 131 | {% include 'base/category-tag.html' %} 132 | 133 | 134 | 135 |
136 |
137 |

Archive

138 |
139 |
140 | 145 |
146 |
147 | 148 |
149 |
150 | 151 |
152 | 153 |
154 | 155 | {% endblock %} 156 | -------------------------------------------------------------------------------- /templates/contact/contact.html: -------------------------------------------------------------------------------- 1 | {% extends 'base/base.html' %} 2 | {% block extraheader %} 3 | 16 | {% endblock %} 17 | {% block content %} 18 | 19 |
20 | 21 |
22 | 23 |
24 |
25 |
26 |

Contact Information

27 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

28 | 33 |
34 |
35 |
36 |
37 |

Send A Message

38 |
39 | {% csrf_token %} 40 |
41 | {% if messages %} 42 | {% for message in messages %} 43 | {{ message }} 44 | {% endfor %} 45 | {% endif %} 46 |
47 |
48 |
49 |
50 | {{ forms.name }} 51 |
52 |
53 |
54 |
55 | {{ forms.email }} 56 |
57 |
58 |
59 |
60 | {{ forms.subject }} 61 |
62 |
63 |
64 |
65 | {{ forms.message }} 66 |
67 | 68 |
69 |
70 |
71 |
72 |
73 |
74 | 75 |
76 | 77 |
78 | 79 | {% endblock %} 80 | -------------------------------------------------------------------------------- /templates/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% load static %} 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ message }} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
31 |
32 |

Oops!

33 |
34 |

{{ message }}

35 |

The page you are looking for might have been removed had its name changed or is temporarily unavailable.

36 | Go To Homepage 37 |
38 |
39 | 40 | --> 41 | 42 | 43 | -------------------------------------------------------------------------------- /templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends 'base/base.html' %} 2 | {% load static %} 3 | {% block content %} 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | {% for post in header_post %} 12 |
13 |
14 | 15 |
16 | 20 |

{{ post.post.title }}

21 |
22 |
23 |
24 | {% endfor %} 25 |
26 | 27 | 28 | 29 |
30 |
31 |
32 |

Recent Posts

33 |
34 |
35 | 36 | 37 | {% for post in recent_post %} 38 |
39 |
40 | 41 |
42 | 46 |

{{ post.title }}

47 |
48 |
49 |
50 | {% if forloop.counter == 3 %} 51 |
52 | {% endif %} 53 | {% endfor %} 54 | 55 | 56 |
57 | 58 | 59 | 60 |
61 |
62 |
63 | 64 |
65 |
66 | 67 |
68 | 72 |

{{ post.title }}

73 |
74 |
75 |
76 | 77 | 78 | 79 | {% for post in recent_post %} 80 |
81 |
82 | 83 |
84 | 88 |

{{ post.title }}

89 |
90 |
91 |
92 | {% if forloop.counter == 2 %} 93 |
94 | {% endif %} 95 | {% if forloop.counter == 4 %} 96 |
97 | {% endif %} 98 | {% endfor %} 99 | 100 | 101 | 102 | 103 |
104 |
105 | 106 |
107 | 108 |
109 |
110 |

Most Read

111 |
112 | {% for post in most_read_post %} 113 |
114 | image 115 |
116 |

{{ post.title }}

117 |
118 |
119 | {% endfor %} 120 |
121 | 122 | 123 | 124 |
125 |
126 |

Featured Posts

127 |
128 | {% for post in featured_post %} 129 |
130 | 131 |
132 | 136 |

{{ post.post.title }}

137 |
138 |
139 | {% endfor %} 140 |
141 | 142 | 143 | 144 |
145 | 146 | 147 | 148 |
149 | 150 |
151 |
152 | 153 |
154 | 155 |
156 | 157 | 158 | 159 |
160 | 161 |
162 | 163 |
164 |
165 |
166 |

Featured Posts

167 |
168 |
169 | 170 | 171 | {% for post in featured_post %} 172 |
173 |
174 | 175 |
176 | 180 |

{{ post.post.title }}

181 |
182 |
183 |
184 | {% endfor %} 185 | 186 |
187 | 188 |
189 | 190 |
191 | 192 | 193 | 194 |
195 | 196 |
197 | 198 |
199 |
200 |
201 |
202 |
203 |

Most Read

204 |
205 |
206 | 207 | {% for post in most_read_post %} 208 |
209 |
210 | 211 |
212 | 216 |

{{ post.title }}

217 |

{{ post.content|safe|truncatewords:30 }}

218 |
219 |
220 |
221 | {% endfor %} 222 | 223 | 224 |
225 |
226 | 227 |
228 |
229 |
230 |
231 | 232 |
233 | 234 |
235 | 236 | 237 | 238 |
239 | 240 | 241 | 242 | {% include 'base/category-tag.html' %} 243 | 244 | 245 |
246 |
247 | 248 |
249 | 250 |
251 | 252 | {% endblock %} 253 | -------------------------------------------------------------------------------- /webmagblog/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sajib1066/django-blog/6f51c870e8ff32a6194a90317a8212dfa05a7e9c/webmagblog/__init__.py -------------------------------------------------------------------------------- /webmagblog/custom-context.py: -------------------------------------------------------------------------------- 1 | from blog.models import Category, Tags, MenuCategory, Post 2 | from django.db.models import Count 3 | from contact.forms import NewsletterForm 4 | 5 | 6 | def mycontext(request): 7 | tag = Tags.objects.all() 8 | menu = MenuCategory.objects.all() 9 | category = Category.objects.all().annotate(number_of_posts=Count('post')).order_by('-number_of_posts', 'name') 10 | recent_post = Post.objects.filter(is_draft=False).order_by('-id')[:3] 11 | context = { 12 | 'category': category, 13 | 'tag': tag, 14 | 'menu': menu, 15 | 'posts': recent_post 16 | } 17 | return context 18 | 19 | def newsletter_form(request): 20 | forms = NewsletterForm() 21 | if request.method == 'POST': 22 | forms = NewsletterForm(request.POST) 23 | if forms.is_valid(): 24 | forms.save() 25 | 26 | context = { 27 | 'forms': forms 28 | } 29 | return context 30 | -------------------------------------------------------------------------------- /webmagblog/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for webmagblog project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.2.3. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.2/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'a%jladi2qqpsj5*g*ewzs#b9yokz_7_b(1$ma!s7pfsecoz&pt' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 41 | 'ckeditor', 42 | 'ckeditor_uploader', 43 | 44 | 'blog', 45 | 'author', 46 | 'contact' 47 | ] 48 | 49 | MIDDLEWARE = [ 50 | 'django.middleware.security.SecurityMiddleware', 51 | 'django.contrib.sessions.middleware.SessionMiddleware', 52 | 'django.middleware.common.CommonMiddleware', 53 | 'django.middleware.csrf.CsrfViewMiddleware', 54 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 55 | 'django.contrib.messages.middleware.MessageMiddleware', 56 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 57 | ] 58 | 59 | ROOT_URLCONF = 'webmagblog.urls' 60 | 61 | TEMPLATES = [ 62 | { 63 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 64 | 'DIRS': ['templates'], 65 | 'APP_DIRS': True, 66 | 'OPTIONS': { 67 | 'context_processors': [ 68 | 'webmagblog.custom-context.mycontext', 69 | 'webmagblog.custom-context.newsletter_form', 70 | 71 | 'django.template.context_processors.debug', 72 | 'django.template.context_processors.request', 73 | 'django.contrib.auth.context_processors.auth', 74 | 'django.contrib.messages.context_processors.messages', 75 | ], 76 | }, 77 | }, 78 | ] 79 | 80 | WSGI_APPLICATION = 'webmagblog.wsgi.application' 81 | 82 | 83 | # Database 84 | # https://docs.djangoproject.com/en/2.2/ref/settings/#databases 85 | 86 | # DATABASES = { 87 | # 'default': { 88 | # 'ENGINE': 'django.db.backends.postgresql_psycopg2', 89 | # 'NAME': 'webmag_db', 90 | # 'USER': 'sajib', 91 | # 'PASSWORD': 'nothing1234', 92 | # 'HOST': 'localhost', 93 | # 'PORT': '' 94 | # } 95 | # } 96 | 97 | DATABASES = { 98 | 'default': { 99 | 'ENGINE': 'django.db.backends.sqlite3', 100 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 101 | } 102 | } 103 | 104 | 105 | # Password validation 106 | # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators 107 | 108 | AUTH_PASSWORD_VALIDATORS = [ 109 | { 110 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 111 | }, 112 | { 113 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 114 | }, 115 | { 116 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 117 | }, 118 | { 119 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 120 | }, 121 | ] 122 | 123 | 124 | # Internationalization 125 | # https://docs.djangoproject.com/en/2.2/topics/i18n/ 126 | 127 | LANGUAGE_CODE = 'en-us' 128 | 129 | TIME_ZONE = 'UTC' 130 | 131 | USE_I18N = True 132 | 133 | USE_L10N = True 134 | 135 | USE_TZ = True 136 | 137 | 138 | # Static files (CSS, JavaScript, Images) 139 | # https://docs.djangoproject.com/en/2.2/howto/static-files/ 140 | 141 | STATIC_URL = '/static/' 142 | STATICFILES_DIRS = [ 143 | os.path.join(BASE_DIR, 'static') 144 | ] 145 | 146 | MEDIA_URL = '/media/' 147 | MEDIA_ROOT = os.path.join(BASE_DIR, 'media') 148 | 149 | CKEDITOR_JQUERY_URL = 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js' 150 | 151 | CKEDITOR_UPLOAD_PATH = "uploads/" 152 | CKEDITOR_CONFIGS = { 153 | 'default': { 154 | 'toolbar': None, 155 | }, 156 | } 157 | -------------------------------------------------------------------------------- /webmagblog/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | from . import views 4 | from . import settings 5 | from django.contrib.staticfiles.urls import static, staticfiles_urlpatterns 6 | from django.conf.urls import handler404, handler500 7 | 8 | urlpatterns = [ 9 | path('admin/', admin.site.urls), 10 | path('', views.home_page, name='home'), 11 | path('about/', views.about_page, name='about'), 12 | path('blog/', include('blog.urls')), 13 | path('contact/', include('contact.urls')), 14 | path('category/', views.category_page, name='category'), 15 | path('ckeditor/', include('ckeditor_uploader.urls')), 16 | ] 17 | handler404 = views.error_404 18 | handler500 = views.error_500 19 | 20 | urlpatterns += staticfiles_urlpatterns() 21 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 22 | -------------------------------------------------------------------------------- /webmagblog/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from django.http import HttpResponse 3 | from blog.models import FeaturedPost, Category, Tags, Post 4 | 5 | def error_404(request, allowed_hosts=True): 6 | data = {'message': '404 - Page not found'} 7 | return render(request, 'error.html', data) 8 | 9 | def error_500(request, allowed_hosts=True): 10 | data = {'message': '500 Internal Server Error'} 11 | return render(request, 'error.html', data) 12 | 13 | def home_page(request): 14 | try: 15 | header_post = FeaturedPost.objects.featured_post()[:2] 16 | featured_post = FeaturedPost.objects.featured_post() 17 | recent_post = Post.objects.filter(is_draft=False).order_by('-id')[:6] 18 | most_read_post = Post.objects.filter(is_draft=False).order_by('-id')[:4] 19 | context = { 20 | 'header_post': header_post, 21 | 'featured_post': featured_post, 22 | 'recent_post': recent_post, 23 | 'most_read_post': most_read_post, 24 | 'post': recent_post[2] 25 | } 26 | return render(request, 'home.html', context) 27 | except Exception: 28 | return HttpResponse( 29 | """ 30 |

Please add some blog from admin panel

31 | Admin Panel 32 | """ 33 | ) 34 | 35 | def category_page(request, name): 36 | category_name = Category.objects.get(name=name) 37 | ctg_feature_post = Post.objects.filter(category=category_name).order_by('-id')[:2] 38 | ctg_most_read_post = Post.objects.filter(category=category_name).order_by('-id')[:4] 39 | post = Post.objects.filter(category=category_name) 40 | context = { 41 | 'category_name': category_name, 42 | 'ctg_feature_post': ctg_feature_post, 43 | 'ctg_most_read_post': ctg_most_read_post, 44 | 'post': post 45 | } 46 | return render(request, 'category.html', context) 47 | 48 | def about_page(request): 49 | most_read_post = Post.objects.filter(is_draft=False).order_by('-id')[:4] 50 | context = { 51 | 'most_read_post': most_read_post 52 | } 53 | return render(request, 'about.html', context) 54 | -------------------------------------------------------------------------------- /webmagblog/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for webmagblog 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/2.2/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', 'webmagblog.settings') 15 | 16 | application = get_wsgi_application() 17 | --------------------------------------------------------------------------------