From 0686a7fa66f7ae173045d73e60fbdcdac7349ea8 Mon Sep 17 00:00:00 2001 From: Bobby Date: Tue, 20 May 2025 08:08:56 +0530 Subject: moving older templates to `templates.old` temporarily; auth module; user profile middleware; localegen generator --- auth/__init__.py | 0 auth/admin.py | 3 + auth/apps.py | 6 + auth/migrations/__init__.py | 0 auth/models.py | 3 + auth/tests.py | 3 + auth/urls.py | 8 + auth/views.py | 34 ++ locale/ja/LC_MESSAGES/django.po | 57 +- localegen.sh | 88 +++ middleware/userprofilemiddleware.py | 14 + runserver.sh | 70 --- static/images/core/icons/anime.png | Bin 0 -> 1044 bytes static/images/core/icons/calendar.png | Bin 0 -> 658 bytes static/images/core/icons/census.png | Bin 0 -> 591 bytes static/images/core/icons/changelanguage.png | Bin 0 -> 1850 bytes static/images/core/icons/chatrooms.png | Bin 0 -> 659 bytes static/images/core/icons/coin.png | Bin 0 -> 5172 bytes static/images/core/icons/discussions.png | Bin 0 -> 538 bytes static/images/core/icons/dvd.png | Bin 0 -> 646 bytes static/images/core/icons/folder.png | Bin 0 -> 481 bytes static/images/core/icons/games.png | Bin 0 -> 926 bytes static/images/core/icons/guestbook.png | Bin 0 -> 512 bytes static/images/core/icons/harlemshake.gif | Bin 0 -> 64804 bytes static/images/core/icons/home.png | Bin 0 -> 828 bytes .../images/core/icons/journalofrandomthoughts.png | Bin 0 -> 563 bytes static/images/core/icons/journals.png | Bin 0 -> 507 bytes static/images/core/icons/logout.png | Bin 0 -> 900 bytes static/images/core/icons/marketplace.png | Bin 0 -> 461 bytes static/images/core/icons/matrix.png | Bin 0 -> 8329 bytes static/images/core/icons/music.png | Bin 0 -> 684 bytes static/images/core/icons/myanimelist.png | Bin 0 -> 947 bytes static/images/core/icons/mypage.png | Bin 0 -> 462 bytes static/images/core/icons/pagodarealm.png | Bin 0 -> 3198 bytes static/images/core/icons/pamphlet.png | Bin 0 -> 497 bytes static/images/core/icons/preferences.png | Bin 0 -> 548 bytes static/images/core/icons/registeraccount.png | Bin 0 -> 552 bytes static/images/core/icons/repositories.png | Bin 0 -> 719 bytes static/images/core/icons/rss.png | Bin 0 -> 1158 bytes static/images/core/icons/screenshots.png | Bin 0 -> 1250 bytes static/images/core/icons/shrines.png | Bin 0 -> 1586 bytes static/images/core/icons/socialify.png | Bin 0 -> 8624 bytes static/images/core/icons/summon_oneko.gif | Bin 0 -> 151 bytes static/images/core/icons/useraccount.png | Bin 0 -> 625 bytes static/images/core/icons/weblog.gif | Bin 0 -> 356 bytes static/images/core/icons/webring.png | Bin 0 -> 948 bytes static/images/core/icons/withdraw_oneko.gif | Bin 0 -> 160 bytes templates.old/400.html | 10 + templates.old/403.html | 10 + templates.old/404.html | 41 ++ templates.old/500.html | 10 + templates.old/blog/account.html | 146 +++++ templates.old/blog/activity.html | 61 +++ templates.old/blog/anidata.html | 6 + templates.old/blog/anilist.html | 27 + templates.old/blog/archives.html | 26 + templates.old/blog/articles.html | 66 +++ templates.old/blog/categories.html | 26 + templates.old/blog/home.html | 70 +++ templates.old/blog/partials/base.html | 170 ++++++ templates.old/blog/partials/mathjax.html | 57 ++ templates.old/blog/partials/post_list.html | 45 ++ .../blog/partials/search/comment_list.html | 9 + templates.old/blog/partials/search/post_list.html | 23 + templates.old/blog/partials/search/user_list.html | 13 + templates.old/blog/partials/sidebar.html | 424 +++++++++++++++ templates.old/blog/post.html | 387 +++++++++++++ templates.old/blog/register.html | 42 ++ templates.old/blog/resetpass.html | 25 + templates.old/blog/resetpass_input.html | 24 + templates.old/blog/search.html | 74 +++ templates.old/blog/site_policy.html | 87 +++ templates.old/blog/socialify.html | 103 ++++ templates.old/blog/tagged.html | 12 + templates.old/blog/tags.html | 20 + templates.old/blog_admin/comments.html | 63 +++ templates.old/blog_admin/edit_post.html | 205 +++++++ templates.old/blog_admin/new_post.html | 121 +++++ .../blog_admin/partials/category_topbar.html | 23 + .../blog_admin/partials/posts_topbar.html | 7 + templates.old/blog_admin/partials/tags_topbar.html | 14 + .../blog_admin/partials/users_topbar.html | 15 + templates.old/blog_admin/posts.html | 89 +++ templates.old/dev_status/home.html | 121 +++++ templates.old/dev_status/repo.html | 140 +++++ templates.old/userpages/home.html | 8 + templates.old/userpages/partials/base.html | 23 + templates.old/userpages/partials/navbar.html | 0 templates/400.html | 10 - templates/403.html | 10 - templates/404.html | 41 -- templates/500.html | 10 - templates/_partials/left_sidebar.html | 605 +++++++++++++++++++++ templates/blog/account.html | 146 ----- templates/blog/activity.html | 61 --- templates/blog/anidata.html | 6 - templates/blog/anilist.html | 27 - templates/blog/archives.html | 26 - templates/blog/articles.html | 66 --- templates/blog/categories.html | 26 - templates/blog/home.html | 70 --- templates/blog/partials/base.html | 170 ------ templates/blog/partials/mathjax.html | 57 -- templates/blog/partials/post_list.html | 45 -- templates/blog/partials/search/comment_list.html | 9 - templates/blog/partials/search/post_list.html | 23 - templates/blog/partials/search/user_list.html | 13 - templates/blog/partials/sidebar.html | 424 --------------- templates/blog/post.html | 387 ------------- templates/blog/register.html | 42 -- templates/blog/resetpass.html | 25 - templates/blog/resetpass_input.html | 24 - templates/blog/search.html | 74 --- templates/blog/site_policy.html | 87 --- templates/blog/socialify.html | 103 ---- templates/blog/tagged.html | 12 - templates/blog/tags.html | 20 - templates/blog_admin/comments.html | 63 --- templates/blog_admin/edit_post.html | 205 ------- templates/blog_admin/new_post.html | 121 ----- templates/blog_admin/partials/category_topbar.html | 23 - templates/blog_admin/partials/posts_topbar.html | 7 - templates/blog_admin/partials/tags_topbar.html | 14 - templates/blog_admin/partials/users_topbar.html | 15 - templates/blog_admin/posts.html | 89 --- templates/dev_status/home.html | 121 ----- templates/dev_status/repo.html | 140 ----- templates/userpages/home.html | 8 - templates/userpages/partials/base.html | 23 - templates/userpages/partials/navbar.html | 0 thatcomputerscientist/settings.py | 1 + thatcomputerscientist/urls.py | 5 +- users/functions.py | 9 + 133 files changed, 3644 insertions(+), 2948 deletions(-) create mode 100644 auth/__init__.py create mode 100644 auth/admin.py create mode 100644 auth/apps.py create mode 100644 auth/migrations/__init__.py create mode 100644 auth/models.py create mode 100644 auth/tests.py create mode 100644 auth/urls.py create mode 100644 auth/views.py create mode 100644 localegen.sh create mode 100644 middleware/userprofilemiddleware.py delete mode 100755 runserver.sh create mode 100644 static/images/core/icons/anime.png create mode 100644 static/images/core/icons/calendar.png create mode 100644 static/images/core/icons/census.png create mode 100644 static/images/core/icons/changelanguage.png create mode 100644 static/images/core/icons/chatrooms.png create mode 100644 static/images/core/icons/coin.png create mode 100644 static/images/core/icons/discussions.png create mode 100644 static/images/core/icons/dvd.png create mode 100644 static/images/core/icons/folder.png create mode 100644 static/images/core/icons/games.png create mode 100644 static/images/core/icons/guestbook.png create mode 100644 static/images/core/icons/harlemshake.gif create mode 100644 static/images/core/icons/home.png create mode 100644 static/images/core/icons/journalofrandomthoughts.png create mode 100644 static/images/core/icons/journals.png create mode 100644 static/images/core/icons/logout.png create mode 100644 static/images/core/icons/marketplace.png create mode 100644 static/images/core/icons/matrix.png create mode 100644 static/images/core/icons/music.png create mode 100644 static/images/core/icons/myanimelist.png create mode 100644 static/images/core/icons/mypage.png create mode 100644 static/images/core/icons/pagodarealm.png create mode 100644 static/images/core/icons/pamphlet.png create mode 100644 static/images/core/icons/preferences.png create mode 100644 static/images/core/icons/registeraccount.png create mode 100644 static/images/core/icons/repositories.png create mode 100644 static/images/core/icons/rss.png create mode 100644 static/images/core/icons/screenshots.png create mode 100644 static/images/core/icons/shrines.png create mode 100644 static/images/core/icons/socialify.png create mode 100644 static/images/core/icons/summon_oneko.gif create mode 100644 static/images/core/icons/useraccount.png create mode 100644 static/images/core/icons/weblog.gif create mode 100644 static/images/core/icons/webring.png create mode 100644 static/images/core/icons/withdraw_oneko.gif create mode 100644 templates.old/400.html create mode 100644 templates.old/403.html create mode 100644 templates.old/404.html create mode 100644 templates.old/500.html create mode 100644 templates.old/blog/account.html create mode 100644 templates.old/blog/activity.html create mode 100644 templates.old/blog/anidata.html create mode 100644 templates.old/blog/anilist.html create mode 100644 templates.old/blog/archives.html create mode 100644 templates.old/blog/articles.html create mode 100644 templates.old/blog/categories.html create mode 100644 templates.old/blog/home.html create mode 100644 templates.old/blog/partials/base.html create mode 100644 templates.old/blog/partials/mathjax.html create mode 100644 templates.old/blog/partials/post_list.html create mode 100644 templates.old/blog/partials/search/comment_list.html create mode 100644 templates.old/blog/partials/search/post_list.html create mode 100644 templates.old/blog/partials/search/user_list.html create mode 100644 templates.old/blog/partials/sidebar.html create mode 100644 templates.old/blog/post.html create mode 100644 templates.old/blog/register.html create mode 100644 templates.old/blog/resetpass.html create mode 100644 templates.old/blog/resetpass_input.html create mode 100644 templates.old/blog/search.html create mode 100644 templates.old/blog/site_policy.html create mode 100644 templates.old/blog/socialify.html create mode 100644 templates.old/blog/tagged.html create mode 100644 templates.old/blog/tags.html create mode 100644 templates.old/blog_admin/comments.html create mode 100644 templates.old/blog_admin/edit_post.html create mode 100644 templates.old/blog_admin/new_post.html create mode 100644 templates.old/blog_admin/partials/category_topbar.html create mode 100644 templates.old/blog_admin/partials/posts_topbar.html create mode 100644 templates.old/blog_admin/partials/tags_topbar.html create mode 100644 templates.old/blog_admin/partials/users_topbar.html create mode 100644 templates.old/blog_admin/posts.html create mode 100644 templates.old/dev_status/home.html create mode 100644 templates.old/dev_status/repo.html create mode 100644 templates.old/userpages/home.html create mode 100644 templates.old/userpages/partials/base.html create mode 100644 templates.old/userpages/partials/navbar.html delete mode 100644 templates/400.html delete mode 100644 templates/403.html delete mode 100644 templates/404.html delete mode 100644 templates/500.html delete mode 100644 templates/blog/account.html delete mode 100644 templates/blog/activity.html delete mode 100644 templates/blog/anidata.html delete mode 100644 templates/blog/anilist.html delete mode 100644 templates/blog/archives.html delete mode 100644 templates/blog/articles.html delete mode 100644 templates/blog/categories.html delete mode 100644 templates/blog/home.html delete mode 100644 templates/blog/partials/base.html delete mode 100644 templates/blog/partials/mathjax.html delete mode 100644 templates/blog/partials/post_list.html delete mode 100644 templates/blog/partials/search/comment_list.html delete mode 100644 templates/blog/partials/search/post_list.html delete mode 100644 templates/blog/partials/search/user_list.html delete mode 100644 templates/blog/partials/sidebar.html delete mode 100644 templates/blog/post.html delete mode 100644 templates/blog/register.html delete mode 100644 templates/blog/resetpass.html delete mode 100644 templates/blog/resetpass_input.html delete mode 100644 templates/blog/search.html delete mode 100644 templates/blog/site_policy.html delete mode 100644 templates/blog/socialify.html delete mode 100644 templates/blog/tagged.html delete mode 100644 templates/blog/tags.html delete mode 100644 templates/blog_admin/comments.html delete mode 100644 templates/blog_admin/edit_post.html delete mode 100644 templates/blog_admin/new_post.html delete mode 100644 templates/blog_admin/partials/category_topbar.html delete mode 100644 templates/blog_admin/partials/posts_topbar.html delete mode 100644 templates/blog_admin/partials/tags_topbar.html delete mode 100644 templates/blog_admin/partials/users_topbar.html delete mode 100644 templates/blog_admin/posts.html delete mode 100644 templates/dev_status/home.html delete mode 100644 templates/dev_status/repo.html delete mode 100644 templates/userpages/home.html delete mode 100644 templates/userpages/partials/base.html delete mode 100644 templates/userpages/partials/navbar.html create mode 100644 users/functions.py diff --git a/auth/__init__.py b/auth/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/auth/admin.py b/auth/admin.py new file mode 100644 index 00000000..8c38f3f3 --- /dev/null +++ b/auth/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/auth/apps.py b/auth/apps.py new file mode 100644 index 00000000..836fe02b --- /dev/null +++ b/auth/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AuthConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'auth' diff --git a/auth/migrations/__init__.py b/auth/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/auth/models.py b/auth/models.py new file mode 100644 index 00000000..71a83623 --- /dev/null +++ b/auth/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/auth/tests.py b/auth/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/auth/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/auth/urls.py b/auth/urls.py new file mode 100644 index 00000000..23113b17 --- /dev/null +++ b/auth/urls.py @@ -0,0 +1,8 @@ +from django.urls import path +from . import views + +app_name = "auth" +urlpatterns = [ + path("login", views.login, name="login"), + path("logout", views.logout, name="logout"), +] diff --git a/auth/views.py b/auth/views.py new file mode 100644 index 00000000..9921b17e --- /dev/null +++ b/auth/views.py @@ -0,0 +1,34 @@ +from django.contrib import messages +from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout +from django.shortcuts import redirect +from users.functions import email_verified + +def login(request): + next = request.POST.get("next", "core:home").strip() + username = request.POST.get("username") + password = request.POST.get("password") + + print("Next:", next) + print("Username:", username) + print("Password:", password) + if username == "" or password == "" or username is None or password is None: + messages.error(request, "ErrorEmptyFields", extra_tags="LoginError") + return redirect(f"{next}?username={username}" if username else next) + else: + user = authenticate(request, username=username, password=password) + if user is not None: + if email_verified(user): + auth_login(request, user) + return redirect(next) + else: + messages.error(request, "ErrorEmailNotVerified", extra_tags="LoginError") + return redirect(f"{next}?username={username}") + else: + messages.error(request, "ErrorInvalidCredentials", extra_tags="LoginError") + return redirect(f"{next}?username={username}") + + +def logout(request): + auth_logout(request) + referer = request.META.get('HTTP_REFERER', '/') + return redirect(referer) diff --git a/locale/ja/LC_MESSAGES/django.po b/locale/ja/LC_MESSAGES/django.po index 1cd18f8d..77b68e97 100644 --- a/locale/ja/LC_MESSAGES/django.po +++ b/locale/ja/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-05-20 00:57+0000\n" +"POT-Creation-Date: 2025-05-20 01:39+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,40 +17,31 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +#: templates/_partials/left_sidebar.html:11 +msgid "Username" +msgstr "ユーザー名" -#: templates/blog/home.html:8 +#: templates/_partials/left_sidebar.html:12 +msgid "Password" +msgstr "パスワード" + +#: templates/_partials/left_sidebar.html:27 #, python-format -msgid "" -"\n" -"

\n" -" Welcome to the home of Shifoo (previously That Computer " -"Scientist). My name is @bobby, and " -"this is my personal\n" -" website. I aim to build a retro looking personal website, where I share " -"my thoughts, ideas, and experiences through articles, and will showcase some " -"cool nostalgic features and tools.\n" -"

\n" -"

\n" -" Please note that I am continuously working on this site, and it is still " -"under construction. So, not all features are available yet, and some " -"features may not work as intended.\n" -"

\n" -"

\n" -" There's also a some of fun stuff you can find " -"in the sidebar, that you can play around with. I will be adding more in the " -"not so distant future.\n" -" Also, To participate around various sections of the site, you will need " -"to register for an account. I hope you " -"enjoy your stay here.\n" -"

\n" -" " -msgstr "" +msgid "Hello, %(username)s" +msgstr "こんにちは、%(username)sさん" -#: thatcomputerscientist/settings.py:231 -msgid "English" -msgstr "" +#: templates/_partials/left_sidebar.html:34 +msgid "Journals" +msgstr "ジャーナル" -#: thatcomputerscientist/settings.py:232 -msgid "Japanese" -msgstr "" +#: templates/_partials/left_sidebar.html:38 +msgid "The Pagoda Realm" +msgstr "パゴダレルム" + +#: templates/_partials/left_sidebar.html:42 +msgid "My Page" +msgstr "マイページ" +#: templates/_partials/left_sidebar.html:46 +msgid "Logout" +msgstr "ログアウト" diff --git a/localegen.sh b/localegen.sh new file mode 100644 index 00000000..ab7f0888 --- /dev/null +++ b/localegen.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +# Colors +CYAN='\033[0;36m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +PURPLE='\033[0;35m' +RED='\033[0;31m' +NC='\033[0m' # No Color +BOLD='\033[1m' + +clear + +# ASCII Art +echo -e "${CYAN} + ████████╗██████╗ █████╗ ███╗ ██╗███████╗██╗ █████╗ ████████╗███████╗ + ╚══██╔══╝██╔══██╗██╔══██╗████╗ ██║██╔════╝██║ ██╔══██╗╚══██╔══╝██╔════╝ + ██║ ██████╔╝███████║██╔██╗ ██║███████╗██║ ███████║ ██║ █████╗ + ██║ ██╔══██╗██╔══██║██║╚██╗██║╚════██║██║ ██╔══██║ ██║ ██╔══╝ + ██║ ██║ ██║██║ ██║██║ ╚████║███████║███████╗██║ ██║ ██║ ███████╗ + ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝ + ${NC}" + +echo -e "${PURPLE} ᕕ(⌐■_■)ᕗ ${GREEN}Locale generation tool ${YELLOW}for Japanese templates${NC}\n" + +LANG_CODE="ja" + +generate_messages() { + echo -e "\n${BOLD}${YELLOW}Generating translation messages for ${LANG_CODE} (HTML templates only)...${NC}\n" + + python manage.py makemessages -l ${LANG_CODE} -e html \ + --ignore="templates.old/*" \ + --ignore="venv/*" + + echo -e "\n${GREEN}✓ Translation message files successfully generated!${NC}" + echo -e "${BLUE}You can now edit the .po files in locale/${LANG_CODE}/LC_MESSAGES/${NC}\n" +} + +compile_messages() { + echo -e "\n${BOLD}${YELLOW}Compiling translation messages for ${LANG_CODE}...${NC}\n" + + if [[ ! -d "locale/${LANG_CODE}/LC_MESSAGES" ]]; then + echo -e "${RED}Error: Could not find locale/${LANG_CODE}/LC_MESSAGES directory.${NC}" + exit 1 + fi + + cd locale/${LANG_CODE}/LC_MESSAGES || exit 1 + + if [[ ! -f "django.po" ]]; then + echo -e "${RED}Error: Could not find django.po file in locale/${LANG_CODE}/LC_MESSAGES directory.${NC}" + echo -e "${YELLOW}Tip: Run the generate option first to create translation files.${NC}" + cd - > /dev/null + exit 1 + fi + + echo -e "${BLUE}Compiling django.po...${NC}" + if msgfmt django.po -o django.mo; then + echo -e "${GREEN}✓ Compiled django.mo successfully.${NC}" + else + echo -e "${RED}Error: Failed to compile django.po${NC}" + cd - > /dev/null + exit 1 + fi + + cd - > /dev/null + echo -e "\n${GREEN}✓ Translation messages compilation complete!${NC}\n" +} + +echo -e "${BOLD}${CYAN}What do you want to do?${NC}" +echo -e " ${GREEN}g${NC} - Generate translation messages" +echo -e " ${BLUE}c${NC} - Compile translation messages" +echo -n -e "${YELLOW}Choose an option ${NC}[${GREEN}g${NC}]: " +read -n 1 action +echo "" + +case "$action" in + "g"|"") + generate_messages + ;; + "c") + compile_messages + ;; + *) + echo -e "\n${RED}Error: Invalid option. Use 'g' for generate or 'c' for compile.${NC}" + exit 1 + ;; +esac \ No newline at end of file diff --git a/middleware/userprofilemiddleware.py b/middleware/userprofilemiddleware.py new file mode 100644 index 00000000..724f7f04 --- /dev/null +++ b/middleware/userprofilemiddleware.py @@ -0,0 +1,14 @@ +from django.utils.deprecation import MiddlewareMixin +from users.models import UserProfile + +class UserProfileMiddleware(MiddlewareMixin): + def process_request(self, request): + if request.user.is_authenticated: + try: + user_profile = UserProfile.objects.get(user=request.user) + except UserProfile.DoesNotExist: + user_profile = UserProfile(user=request.user) + user_profile.save() + request.user.profile = user_profile + else: + request.user.profile = None \ No newline at end of file diff --git a/runserver.sh b/runserver.sh deleted file mode 100755 index 5a84a06c..00000000 --- a/runserver.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# Function to check if mkcert is installed -check_mkcert_installed() { - if ! command -v mkcert &> /dev/null; then - echo "mkcert is not installed. Installing mkcert..." - brew install mkcert # Assuming you're using Homebrew to install mkcert - fi -} - -# Function to check if the mkcert local CA is installed and install it if not present -check_and_install_local_ca() { - if ! mkcert -CAROOT &> /dev/null; then - echo "Installing mkcert local CA..." - mkcert -install - fi -} - -# Function to set the DOMAIN value in the .env file -set_domain_in_env() { - domain=$1 - sed -i "" "s/^DOMAIN=.*/DOMAIN='.${domain}'/" .env -} - -# Function to run the development server -run_dev_server() { - domain=$1 - cert_file="SSL/${domain}+1.pem" - key_file="SSL/${domain}+1-key.pem" - - if [[ -f "$cert_file" && -f "$key_file" ]]; then - set_domain_in_env "$domain" - sudo python3 manage.py runsslserver 127.0.0.1:443 --certificate "$cert_file" --key "$key_file" - else - echo "Certificate files not found. Generating self-signed certificate..." - mkdir -p SSL && cd SSL - mkcert "${domain}" "*.${domain}" - cd .. - set_domain_in_env "$domain" - sudo python3 manage.py runsslserver 127.0.0.1:443 --certificate "$cert_file" --key "$key_file" - fi -} - -# Main script - -# Check if mkcert is installed and install if not present -check_mkcert_installed - -# Present options to the user -echo "Choose an option:" -echo "[1]: (*).[peek].shi.foo" -echo "[2]: (*).[peek].thatcomputerscientist.com" -read -p "Enter your choice (1 or 2): " choice - -case $choice in - 1) - domain="peek.shi.foo" - check_and_install_local_ca - run_dev_server "$domain" - ;; - 2) - domain="peek.thatcomputerscientist.com" - check_and_install_local_ca - run_dev_server "$domain" - ;; - *) - echo "Invalid choice. Exiting..." - exit 1 - ;; -esac diff --git a/static/images/core/icons/anime.png b/static/images/core/icons/anime.png new file mode 100644 index 00000000..27750e47 Binary files /dev/null and b/static/images/core/icons/anime.png differ diff --git a/static/images/core/icons/calendar.png b/static/images/core/icons/calendar.png new file mode 100644 index 00000000..fc024771 Binary files /dev/null and b/static/images/core/icons/calendar.png differ diff --git a/static/images/core/icons/census.png b/static/images/core/icons/census.png new file mode 100644 index 00000000..c13d25d4 Binary files /dev/null and b/static/images/core/icons/census.png differ diff --git a/static/images/core/icons/changelanguage.png b/static/images/core/icons/changelanguage.png new file mode 100644 index 00000000..d2f4df83 Binary files /dev/null and b/static/images/core/icons/changelanguage.png differ diff --git a/static/images/core/icons/chatrooms.png b/static/images/core/icons/chatrooms.png new file mode 100644 index 00000000..0641f621 Binary files /dev/null and b/static/images/core/icons/chatrooms.png differ diff --git a/static/images/core/icons/coin.png b/static/images/core/icons/coin.png new file mode 100644 index 00000000..4be6fe09 Binary files /dev/null and b/static/images/core/icons/coin.png differ diff --git a/static/images/core/icons/discussions.png b/static/images/core/icons/discussions.png new file mode 100644 index 00000000..0fb0bd5f Binary files /dev/null and b/static/images/core/icons/discussions.png differ diff --git a/static/images/core/icons/dvd.png b/static/images/core/icons/dvd.png new file mode 100644 index 00000000..ee045037 Binary files /dev/null and b/static/images/core/icons/dvd.png differ diff --git a/static/images/core/icons/folder.png b/static/images/core/icons/folder.png new file mode 100644 index 00000000..807f1690 Binary files /dev/null and b/static/images/core/icons/folder.png differ diff --git a/static/images/core/icons/games.png b/static/images/core/icons/games.png new file mode 100644 index 00000000..1bd3fc2e Binary files /dev/null and b/static/images/core/icons/games.png differ diff --git a/static/images/core/icons/guestbook.png b/static/images/core/icons/guestbook.png new file mode 100644 index 00000000..0cf514c4 Binary files /dev/null and b/static/images/core/icons/guestbook.png differ diff --git a/static/images/core/icons/harlemshake.gif b/static/images/core/icons/harlemshake.gif new file mode 100644 index 00000000..0ef493b0 Binary files /dev/null and b/static/images/core/icons/harlemshake.gif differ diff --git a/static/images/core/icons/home.png b/static/images/core/icons/home.png new file mode 100644 index 00000000..0bfbd03c Binary files /dev/null and b/static/images/core/icons/home.png differ diff --git a/static/images/core/icons/journalofrandomthoughts.png b/static/images/core/icons/journalofrandomthoughts.png new file mode 100644 index 00000000..845863a2 Binary files /dev/null and b/static/images/core/icons/journalofrandomthoughts.png differ diff --git a/static/images/core/icons/journals.png b/static/images/core/icons/journals.png new file mode 100644 index 00000000..535e090e Binary files /dev/null and b/static/images/core/icons/journals.png differ diff --git a/static/images/core/icons/logout.png b/static/images/core/icons/logout.png new file mode 100644 index 00000000..61b7b260 Binary files /dev/null and b/static/images/core/icons/logout.png differ diff --git a/static/images/core/icons/marketplace.png b/static/images/core/icons/marketplace.png new file mode 100644 index 00000000..c231f8f8 Binary files /dev/null and b/static/images/core/icons/marketplace.png differ diff --git a/static/images/core/icons/matrix.png b/static/images/core/icons/matrix.png new file mode 100644 index 00000000..d445aa1c Binary files /dev/null and b/static/images/core/icons/matrix.png differ diff --git a/static/images/core/icons/music.png b/static/images/core/icons/music.png new file mode 100644 index 00000000..68bb414d Binary files /dev/null and b/static/images/core/icons/music.png differ diff --git a/static/images/core/icons/myanimelist.png b/static/images/core/icons/myanimelist.png new file mode 100644 index 00000000..a079fb91 Binary files /dev/null and b/static/images/core/icons/myanimelist.png differ diff --git a/static/images/core/icons/mypage.png b/static/images/core/icons/mypage.png new file mode 100644 index 00000000..3e7c64f7 Binary files /dev/null and b/static/images/core/icons/mypage.png differ diff --git a/static/images/core/icons/pagodarealm.png b/static/images/core/icons/pagodarealm.png new file mode 100644 index 00000000..df1bcfab Binary files /dev/null and b/static/images/core/icons/pagodarealm.png differ diff --git a/static/images/core/icons/pamphlet.png b/static/images/core/icons/pamphlet.png new file mode 100644 index 00000000..397063ef Binary files /dev/null and b/static/images/core/icons/pamphlet.png differ diff --git a/static/images/core/icons/preferences.png b/static/images/core/icons/preferences.png new file mode 100644 index 00000000..5d977bfb Binary files /dev/null and b/static/images/core/icons/preferences.png differ diff --git a/static/images/core/icons/registeraccount.png b/static/images/core/icons/registeraccount.png new file mode 100644 index 00000000..071ceff2 Binary files /dev/null and b/static/images/core/icons/registeraccount.png differ diff --git a/static/images/core/icons/repositories.png b/static/images/core/icons/repositories.png new file mode 100644 index 00000000..6c2f4bba Binary files /dev/null and b/static/images/core/icons/repositories.png differ diff --git a/static/images/core/icons/rss.png b/static/images/core/icons/rss.png new file mode 100644 index 00000000..73d16e8a Binary files /dev/null and b/static/images/core/icons/rss.png differ diff --git a/static/images/core/icons/screenshots.png b/static/images/core/icons/screenshots.png new file mode 100644 index 00000000..563dd621 Binary files /dev/null and b/static/images/core/icons/screenshots.png differ diff --git a/static/images/core/icons/shrines.png b/static/images/core/icons/shrines.png new file mode 100644 index 00000000..f0000eba Binary files /dev/null and b/static/images/core/icons/shrines.png differ diff --git a/static/images/core/icons/socialify.png b/static/images/core/icons/socialify.png new file mode 100644 index 00000000..529d0cae Binary files /dev/null and b/static/images/core/icons/socialify.png differ diff --git a/static/images/core/icons/summon_oneko.gif b/static/images/core/icons/summon_oneko.gif new file mode 100644 index 00000000..5f43a2ce Binary files /dev/null and b/static/images/core/icons/summon_oneko.gif differ diff --git a/static/images/core/icons/useraccount.png b/static/images/core/icons/useraccount.png new file mode 100644 index 00000000..2938efb7 Binary files /dev/null and b/static/images/core/icons/useraccount.png differ diff --git a/static/images/core/icons/weblog.gif b/static/images/core/icons/weblog.gif new file mode 100644 index 00000000..53bb81db Binary files /dev/null and b/static/images/core/icons/weblog.gif differ diff --git a/static/images/core/icons/webring.png b/static/images/core/icons/webring.png new file mode 100644 index 00000000..b89e422a Binary files /dev/null and b/static/images/core/icons/webring.png differ diff --git a/static/images/core/icons/withdraw_oneko.gif b/static/images/core/icons/withdraw_oneko.gif new file mode 100644 index 00000000..b7cddb4c Binary files /dev/null and b/static/images/core/icons/withdraw_oneko.gif differ diff --git a/templates.old/400.html b/templates.old/400.html new file mode 100644 index 00000000..41beaa4e --- /dev/null +++ b/templates.old/400.html @@ -0,0 +1,10 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load static %} +
+
+

400 Bad Request

+

Unfortunately, something went wrong. The server could not understand your request.

+

Go Home

+
+
+{% endblock %} diff --git a/templates.old/403.html b/templates.old/403.html new file mode 100644 index 00000000..1ab86cd6 --- /dev/null +++ b/templates.old/403.html @@ -0,0 +1,10 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load static %} +
+
+

403 Permission Denied

+

You do not have permission to access this page.

+

<Go Home

+
+
+{% endblock %} diff --git a/templates.old/404.html b/templates.old/404.html new file mode 100644 index 00000000..455f1659 --- /dev/null +++ b/templates.old/404.html @@ -0,0 +1,41 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load static %} + +
+ +
+ {% if context.mode == 'article' %} + {% load random_numbers %} + {% if context.similar_posts %} + + {% else %} + + {% endif %} +

+

Hey! Skippy here! I am the 404 Assistant Bot for this site. Looks like you are trying to search an article, but I couldn't find the page. {% if context.similar_posts %}Maybe you are looking for one of these?{% endif %}

+ + {% elif context.mode == 'user' %} + +

+

Hey! Skippy here! I am the 404 Assistant Bot for this site. Looks like you are trying to search a user with username {{ context.username }} but I couldn't find any user with that username. {% if context.similar_users %}Maybe you are looking for one of these users?{% endif %}

+ + {% else %} + +

Hey! Skippy here! I am the 404 Assistant Bot for this site. Unfortunately, I couldn't find the page you were looking for. Let me guide you home!

+ {% endif %} +
+

Go Home

+
+
+
+
+ +{% endblock %} diff --git a/templates.old/500.html b/templates.old/500.html new file mode 100644 index 00000000..f61b46fa --- /dev/null +++ b/templates.old/500.html @@ -0,0 +1,10 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load static %} +
+
+

500 Server Error

+

Sorry, something went wrong. The server encountered an internal error or misconfiguration and was unable to complete your request.

+

Go Home

+
+
+{% endblock %} diff --git a/templates.old/blog/account.html b/templates.old/blog/account.html new file mode 100644 index 00000000..7af89675 --- /dev/null +++ b/templates.old/blog/account.html @@ -0,0 +1,146 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load static %} +

My Account

+
+
+
+ {{ user.username }}'s avatar +
+ +
+
+ {% for message in messages %} +
+

{{ message }}

+
+ {% endfor %} + {% if request.GET.tab == 'avatar' %} +
+

Choose an avatar from the list below. The avatars are grouped by their theme.

+
+ {% csrf_token %} + {% for avatar_dir, avatar_files in avatarlist.items %} +

{{ avatar_dir }}

+
+ {% for avatar_file in avatar_files %} +
+ {% with ""|add:avatar_dir|add:"/"|add:avatar_file as avt_url %} + + + {% endwith %} +
+ {% endfor %} +
+

+
+ {% endfor %} + +
+
+ {% elif request.GET.tab == 'blinkies' %} +
+

Choose a blinkie to display on your public profile.

+
+ {% csrf_token %} +
+ + +
+ {% for blinkie in blinkies %} +
+ + +
+ {% endfor %} + +
+
+
+ {% elif request.GET.tab == 'details' %} +
+

Change your account details here. You can change your first name, last name, bio, email and activity visibility.

+
+ {% csrf_token %} + + {{ update_form.as_table }} +
+ +
+
+ {% elif request.GET.tab == 'email' %} +
+

Change your email address here. Your current registered email is {{ user.email }}. Please note that a verification email will be sent to the new email address in order to update the current email address. Please provide the new email address in the box below:

+
+ {% csrf_token %} +

+ +
+
+ {% elif request.GET.tab == 'password' %} +
+
+ {% csrf_token %} + + + + + + + + + + + + + +
+
+ +
+
+ {% elif request.GET.tab == 'delete' and not user.is_superuser %} +
+

Deleting your account will remove all your posts, comments and other data from the website. Please note that this action is irreversible. If you wish to delete your account, please enter your password in the box below:

+
+ {% csrf_token %} +

+ +
+
+ {% else %} +
+

You can change account settings for {{ user.username }} here. If you wish to have additional support, please contact me at webmaster@thatcomputerscientist.com. Please take care of the following points before you submit your support request:

+
    +
  • Please do not edit the subject line.
  • +
  • As an individual monitoring this email, I request you to refrain yourself from spamming.
  • +
  • Please do not include any sensitive information (like credit card numbers, passwords, etc.) in the email.
  • +
  • Allow me upto 48 hours to respond to your support request.
  • +
  • Do not send multiple support requests.
  • +
  • Please note that this is a support request related to your account. Please do not file any bugs here. If you have noticed a bug, please report it to the GitHub Issues page.
  • +
+
+ {% endif %} +
+
+{% endblock %} diff --git a/templates.old/blog/activity.html b/templates.old/blog/activity.html new file mode 100644 index 00000000..d963fe1d --- /dev/null +++ b/templates.old/blog/activity.html @@ -0,0 +1,61 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load static %} +
+ + + + + +
+ {{ activity_user.username }}'s avatar + +

+ {{ activity_user.first_name }} {{ activity_user.last_name }} + @{{ activity_user.username }} + {% if activity_user_profile.blinkie_url %} + {{ activity_user_profile.blinkie_url }} + {% endif %} +

+ {% if activity_user_profile.bio %} +

Bio: {{ activity_user_profile.bio|linebreaksbr }}

+ {% endif %} + + {% if activity_user_profile.location %} +

Location: {{ activity_user_profile.location }}

+ {% endif %} + + {% if activity_user_profile.email_public %} +

Email: {{ activity_user.email }}

+ {% endif %} +
+
+ +
+ {% if activity_user_profile.is_public or request.user.username == activity_user.username %} + + + {% if activity_recent_comments %} +

Recent Comments

+ {% if not activity_user_profile.is_public and request.user.username == activity_user.username %} +

Your profile is not public. Only you can see this information. If you want to change this, go to your account settings.

+ {% endif %} +
    + {% for comment in activity_recent_comments %} +
  • +

    On {{ comment.post.title }}: +

    {{ comment.body|safe }}

    +
  • + {% endfor %} +
+ {% endif %} + + {% else %} + +

This user's profile is private.

+ + {% endif %} +
+{% endblock %} +{% block scripts%} +{% include 'blog/partials/mathjax.html' %} +{% endblock %} diff --git a/templates.old/blog/anidata.html b/templates.old/blog/anidata.html new file mode 100644 index 00000000..78e7106c --- /dev/null +++ b/templates.old/blog/anidata.html @@ -0,0 +1,6 @@ +{{ MALContent|safe }} + diff --git a/templates.old/blog/anilist.html b/templates.old/blog/anilist.html new file mode 100644 index 00000000..2ab01484 --- /dev/null +++ b/templates.old/blog/anilist.html @@ -0,0 +1,27 @@ +{% extends 'blog/partials/base.html' %} {% block content %} {% load static %} +
+ +
+
+
    +
  • + Data is fetched from + MyAnimeList. +
  • +
  • + I do not update the list regularly. Some anime might be missing. +
  • +
+{% endblock content %} {% block scripts %} + +{% endblock scripts %} diff --git a/templates.old/blog/archives.html b/templates.old/blog/archives.html new file mode 100644 index 00000000..09ec4963 --- /dev/null +++ b/templates.old/blog/archives.html @@ -0,0 +1,26 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +

Archives

+{% load static %} +{% if archives %} +
+ +
+{% else %} +

No archives found.

+{% endif %} + +{% endblock %} + diff --git a/templates.old/blog/articles.html b/templates.old/blog/articles.html new file mode 100644 index 00000000..87bb53cf --- /dev/null +++ b/templates.old/blog/articles.html @@ -0,0 +1,66 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% if type == 'articles' %} +

All Posts

+{% elif type == 'articles-archive' %} +

Posts made in {{ date }}

+{% elif type == 'articles-category' %} +

Posts made in Category: {{ category_name }}

+{% endif %} + +
+ Filters:     + + + + + {% if type != 'articles-category' %} + + + {% endif %} +    + +
+{% if posts %} +
+ {% include 'blog/partials/post_list.html' %} +
+
+ + + {% if page == 1 %} + + + {% else %} + + + {% endif %} + {% load times %} + {% for i in num_pages|times %} + + {% endfor %} + {% if page == num_pages %} + + + {% else %} + + + {% endif %} + +
««{{ i }}»»
+
+{% include 'blog/partials/mathjax.html' %} +{% else %} +

No posts found.

+{% endif %} +{% endblock %} \ No newline at end of file diff --git a/templates.old/blog/categories.html b/templates.old/blog/categories.html new file mode 100644 index 00000000..b95403ea --- /dev/null +++ b/templates.old/blog/categories.html @@ -0,0 +1,26 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +

Categories

+{% load static %} +{% if categories %} +
+ +
+{% else %} +

No categories found.

+{% endif %} + +{% endblock %} + diff --git a/templates.old/blog/home.html b/templates.old/blog/home.html new file mode 100644 index 00000000..739c5227 --- /dev/null +++ b/templates.old/blog/home.html @@ -0,0 +1,70 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load static %} +{% load i18n %} + +
+ {% url 'blog:user_activity' 'bobby' as bobby_profile_url %} + {% url 'blog:register' as register_url %} + {% blocktrans %} +

+ Welcome to the home of Shifoo (previously That Computer Scientist). My name is @bobby, and this is my personal + website. I aim to build a retro looking personal website, where I share my thoughts, ideas, and experiences through articles, and will showcase some cool nostalgic features and tools. +

+

+ Please note that I am continuously working on this site, and it is still under construction. So, not all features are available yet, and some features may not work as intended. +

+

+ There's also a some of fun stuff you can find in the sidebar, that you can play around with. I will be adding more in the not so distant future. + Also, To participate around various sections of the site, you will need to register for an account. I hope you enjoy your stay here. +

+ {% endblocktrans %} +
+
+ +
+
+ +
+ + {% if announcements is not None %} + +
    + {% for announcement in announcements %} +
  • + + {% if announcement.is_new %} + + {% else %} + + {% endif %} + + + {{ announcement.created_at | date:"M d, Y" }}: {{ announcement.content | safe }} + +
  • +

    + {% endfor %} +
+
+ {% endif %} +
+
+ {% load ad %} + Ad +
+{% if posts %} +
+

Recent Posts

+ {% include 'blog/partials/post_list.html' %} +
+{% endif %} +{% endblock %} + +{% block scripts %} +{% include 'blog/partials/mathjax.html' %} + + +{% endblock %} + diff --git a/templates.old/blog/partials/base.html b/templates.old/blog/partials/base.html new file mode 100644 index 00000000..ea517166 --- /dev/null +++ b/templates.old/blog/partials/base.html @@ -0,0 +1,170 @@ +{% load static %} + + + + + + + + + + + + + + + + + + + + Shifoo - {{ title }} + + + + + + + + + + +
+
+ + + + + + + +
+ {% block content %} {% endblock %} +
+ + +
+
+ + + {% comment %} + + {% endcomment %} + + + + + {% comment %} + + {% endcomment %} + {% comment %} {% endcomment %} + {% comment %} {% endcomment %} + {% if request.COOKIES.summonOneko == 'true' %} + + {% endif %} {% block scripts %} {% endblock %} + diff --git a/templates.old/blog/partials/mathjax.html b/templates.old/blog/partials/mathjax.html new file mode 100644 index 00000000..dd1944d4 --- /dev/null +++ b/templates.old/blog/partials/mathjax.html @@ -0,0 +1,57 @@ +{% load static %} + + diff --git a/templates.old/blog/partials/post_list.html b/templates.old/blog/partials/post_list.html new file mode 100644 index 00000000..d72bd723 --- /dev/null +++ b/templates.old/blog/partials/post_list.html @@ -0,0 +1,45 @@ +{% load tz %} +{% load static %} +{% for post in posts %} +
+
+

+ {{ post.title }} +

+
+ {% with post.author.userprofile_set.first as userprofile %} + + {% endwith %} + + + {{ post.author.first_name }} {{ post.author.last_name }} + + + posted in + + + {{ post.category }} + + + | + {% localtime on %}{{ post.date | date:"M d, Y" }}{% endlocaltime %} +
+
+
+ + {{ post.excerpt | safe }} +
+
+ + Continue Reading | {{ post.num_comments }} + Comment{% if not post.num_comments == 1 %}s{% endif %} + + {% comment %} tags {% endcomment %} + + {% for tag in post.tags.all %} + {{ tag.name }} + {% endfor %} + +
+
+{% endfor %} \ No newline at end of file diff --git a/templates.old/blog/partials/search/comment_list.html b/templates.old/blog/partials/search/comment_list.html new file mode 100644 index 00000000..7afbced0 --- /dev/null +++ b/templates.old/blog/partials/search/comment_list.html @@ -0,0 +1,9 @@ +{% load static %} + diff --git a/templates.old/blog/partials/search/post_list.html b/templates.old/blog/partials/search/post_list.html new file mode 100644 index 00000000..811c417e --- /dev/null +++ b/templates.old/blog/partials/search/post_list.html @@ -0,0 +1,23 @@ +{% load tz %} +{% load static %} +{% for post in posts %} + {% comment %} This is the plain small version for search list {% endcomment %} +

+ {{ post.title }} +

+

Posted by {{ post.author.first_name }} {{ post.author.last_name }} in {{ post.category }} on {% localtime on %}{{ post.date | date:"M d, Y" }}{% endlocaltime %}

+ +
+ {{ post.body|truncatewords:150|safe }} +
+
+

Tags: + {% for tag in post.tags.all %} + {{ tag.name }} + {% endfor %} +

+

+ Read complete post... +

+
+{% endfor %} \ No newline at end of file diff --git a/templates.old/blog/partials/search/user_list.html b/templates.old/blog/partials/search/user_list.html new file mode 100644 index 00000000..3493508c --- /dev/null +++ b/templates.old/blog/partials/search/user_list.html @@ -0,0 +1,13 @@ +{% load static %} +{% for user in users %} + +{% endfor %} \ No newline at end of file diff --git a/templates.old/blog/partials/sidebar.html b/templates.old/blog/partials/sidebar.html new file mode 100644 index 00000000..458ddbee --- /dev/null +++ b/templates.old/blog/partials/sidebar.html @@ -0,0 +1,424 @@ +{% load static %} +{% comment %} Login Area {% endcomment %} +{% if not user.is_authenticated %} + +{% for message in messages %} +{% if 'loginError' in message.tags %} + {% if message.message == "ENVERR" and request.GET.username %} +
+ {% csrf_token %} + + +
+ {% endif %} +
+
+
+ {% endif %} + {% endfor %} +
+
+ + + + + +
+ + +
+{% endif %} + +{% if user.is_authenticated %} +
+

Hello, {{ user.username }}!

+ +
+{% endif %} + + + +
+ {% comment %}

Advertisement

{% endcomment %} + {% load ad %} + Advertisement +
+ +
+

Good Stuff

+ +
+ +
+

Site Spells

+ +
+ +
+

Archives

+ +
+ +
+

Categories

+ +
+ +{% if user.is_superuser %} +
+

Admin

+ +
+{% endif %} + +{% if anonymous_users or logged_in_users or admin_users %} +
+

Who's Online?

+
+

In total, there {% if not anonymous_users|add:logged_in_users|add:admin_users == 1%}are{% else %}is{% endif %} {{ anonymous_users|add:logged_in_users|add:admin_users }} user{% if not anonymous_users|add:logged_in_users|add:admin_users == 1%}s{% endif %} online ::

+
    +
  • {{ anonymous_users }} Guest{% if not anonymous_users == 1%}s{% endif %}
  • +
  • {{ logged_in_users }} Registered User{% if not logged_in_users == 1%}s{% endif %}
  • +
  • {{ admin_users }} Staff Member{% if not admin_users == 1%}s{% endif %}
  • +
+

(Based on users active over the past 5 minutes)

+
+
+{% endif %} + +
+

You are Visitor #

+
+ 0 + 0 + 6 + 9 + 4 + 2 + 0 +
+

____________________________________
This is just a nice random number!

+
+ diff --git a/templates.old/blog/post.html b/templates.old/blog/post.html new file mode 100644 index 00000000..5a98e981 --- /dev/null +++ b/templates.old/blog/post.html @@ -0,0 +1,387 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load static %} +{% load tz %} +{% load sha256 %} +
+ Home + Opinions + Focus Off + Spectacles Off + {% comment %} + Translate to Japanese + {% if request.session.language == 'jp' %} + Translate to English + {% else %} + Translate to Japanese + {% endif %} + {% endcomment %} +
+
+

+ {{ post.title }} +

+
+ {% with post.author.userprofile_set.first as userprofile %} + + {% endwith %} + + + {{ post.author.first_name }} {{ post.author.last_name }} + + + posted in + + + {{ post.category }} + + + | + {% localtime on %}{{ post.date | date:"M d, Y" }}{% endlocaltime %} + | + {{ post.views }} view{% if not post.views == 1%}s{% endif %} + +
+

+ {% for tag in post.tags.all %} + {{ tag.name }} + {% endfor %} +

+ +
+ {{ post.first_paragraph | safe }} + Post Image for {{ post.title }} +
+ {{ post.body | safe }} +
+
+ +
+

Liked this post? Wanna stay updated?

+

Subscribe to my RSS feed to get the latest updates from this weblog. Copy and paste the following link into your favorite RSS reader:

+
https://shi.foo/rss/
+
+ +{% if read_next %} +

Read Next

+ +{% endif %} +

Comments + + Back to Top + +

+{% if comments %} +
+ {% for comment in comments %} +
+ + + + + +
+ Profile Picture + {% if not comment.user %} + Anonymous User + {% else %} + Registered User + {% endif %} + +
+ {% if comment.user %}{{ comment.user.username }}{% else %}{{ comment.anonymous_user.name }}{% endif %} on {{ comment.created_at | date:"M d, Y" }} + {% if comment.edited %} + (Edited) + {% endif %} + {% if comment.user == user %} +    + Edit +    + Delete + {% endif %} + {% if comment.anonymous_user.name and comment.anonymous_user.email and comment.anonymous_user.token and comment.anonymous_user.token == request.COOKIES.anonymous_token|sha256 %} +    + Edit +    + Delete + {% endif %} +
+
+ {{ comment.processed_body|safe }} +
+ {% if comment.user == user %} + + {% endif %} + {% if comment.anonymous_user.name and comment.anonymous_user.email and comment.anonymous_user.token and comment.anonymous_user.token == request.COOKIES.anonymous_token|sha256 %} + + {% endif %} +
+
+ {% endfor %} +
+{% else %} +
+

Sadly, there are no comments yet. Be the first to leave one!

+
+{% endif %} + +{% if user.is_authenticated %} +
+

Leave a Comment

+ {% if messages %} + {% for message in messages %} + {% if 'spam' in message.tags %} +

Your comment was not allowed as it was marked as possible spam. If you think this is a mistake, please contact me at webmaster@thatcomputerscientist.com.

+ {% endif %} + {% endfor %} + {% endif %} +
+ {% csrf_token %} + +
+

Text Markup Tips >

+ +
+ +
+ +
+{% else %} +
+

Leave a Comment

+ {% if messages %} + {% for message in messages %} + {% if 'spam' in message.tags %} +

Your comment was not allowed as it was marked as possible spam. If you think this is a mistake, please contact me at webmaster@thatcomputerscientist.com.

+ {% endif %} + {% endfor %} + {% endif %} +

You must be logged in to leave a comment. Or, you can leave an anonymous comment.

+ +
+ +{% endif %} +{% endblock %} +{% block scripts %} + + +{% include 'blog/partials/mathjax.html' %} +{% endblock %} + diff --git a/templates.old/blog/register.html b/templates.old/blog/register.html new file mode 100644 index 00000000..16ff128a --- /dev/null +++ b/templates.old/blog/register.html @@ -0,0 +1,42 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +

Register for an account

+

+ Register for an account to post your thoughts and get feedback from other + users. +

+
+
+ + + {{ form.as_table }} +
+

+ Captcha +

+ + +
+

+

+ By registering on this site, you agree to everything that's + written here. +

+

+ Note: Upon registering, you will be sent an email with a link to + activate your account. If you don't activate your account within 72 hours, + your username will be released and you will have to register again. +

+{% for message in messages %} {% if 'accountCreated' in message.tags %} +

{{ message.message }}

+{% endif %} {% endfor %} {% endblock %} diff --git a/templates.old/blog/resetpass.html b/templates.old/blog/resetpass.html new file mode 100644 index 00000000..81c68c56 --- /dev/null +++ b/templates.old/blog/resetpass.html @@ -0,0 +1,25 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +

Reset your Password

+

+ Forgot your password? No problem! Just enter your email address below, (the + email you registered with) and I will send you a link to reset your password. +

+
+
+ + + {{ form.as_table }} +
+
+ +
+

+

Anonymous users cannot reset their password.

+{% for message in messages %} {% if 'passwordReset' in message.tags %} +

{{ message.message }}

+{% endif %} {% endfor %} {% endblock content %} diff --git a/templates.old/blog/resetpass_input.html b/templates.old/blog/resetpass_input.html new file mode 100644 index 00000000..939eab9d --- /dev/null +++ b/templates.old/blog/resetpass_input.html @@ -0,0 +1,24 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +

Reset your Password

+

+ Enter a new password for your account. Your password must be at least 8 + characters long. +

+
+
+ + + {{ form.as_table }} +
+
+ +
+

+{% for message in messages %} {% if 'passwordReset' in message.tags %} +

{{ message.message }}

+{% endif %} {% endfor %} {% endblock content %} diff --git a/templates.old/blog/search.html b/templates.old/blog/search.html new file mode 100644 index 00000000..721f8d8d --- /dev/null +++ b/templates.old/blog/search.html @@ -0,0 +1,74 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load get_list %} + + + + + + + +{% endblock %} +{% block scripts %} +{% include 'blog/partials/mathjax.html' %} +{% endblock %} \ No newline at end of file diff --git a/templates.old/blog/site_policy.html b/templates.old/blog/site_policy.html new file mode 100644 index 00000000..683e2c07 --- /dev/null +++ b/templates.old/blog/site_policy.html @@ -0,0 +1,87 @@ +{% extends 'blog/partials/base.html' %} {% block content %} + +

I see cookies! Wait, Do you track me?

+

This site uses cookies to store information on your computer. These cookies are required to enable the login functionality of the site. They are not used for tracking purposes.

+

Update: W.E.F May 27, 2023, this site will employ Google Analytics to track user activity. Also Cloudflare's Browser Insights will be used to track performance metrics. (Redacted! No tracking is involved. Enjoy your privacy!)

+ +

Also, do not sell my data!

+

Any personal information you provide here will be kept confidential and will not be sold, rented, loaned, or otherwise disclosed. Any information you provide will be held with the utmost care, and will not be used in ways that you have not consented to. If you have any questions, please feel free to contact me at webmaster@thatcomputerscientist.com.

+ +

What are these Advertisements?

+

As you know, one of the main goals to this site is to maintain a retro look. The advertisements are a part of that. The ads shown on this website are fake and purely for aesthetic purposes. They are just images of ads from the early days of the internet to spark the nostalgia. I do not make any money from these ads.

+ +

I wanna say something in the comments...

+

Not so fast! Before you post a comment, know that comments are moderated. I will employ general moderation tools to prevent spam and other undesirable content. I also reserve the right to edit or delete any comments submitted to this site without notice due to any of the following reasons:

+
    +
  • Comments deemed to be spam or questionable spam
  • +
  • Comments including profanity
  • +
  • Comments containing language or concepts that could be deemed offensive
  • +
  • Comments that attack a group or individual
  • +
  • Comments that harass other posters
  • +
  • Comments that are off-topic
  • +
+ +

Comments are not for promoting your articles or other sites. Spam will be deleted and repeated offenses will result in a ban.

+ +

Comments are not for asking questions or help. I may open a forum soon, if I ever wanted to entend the features on the site. Also, remember that Stack Overflow and Reddit are your best friends.

+ + +

Rules, you say? Anything else?

+

Yes, by using this site, you agree to the following terms and conditions:

+
    +
  • You will not post any content that is illegal, obscene, defamatory, threatening, harassing, abusive, hateful, or embarrassing to any other person or entity as determined by us.
  • +
  • You will not post any content that infringes any patent, trademark, trade secret, copyright or other proprietary rights of any party.
  • +
  • You will not post any unsolicited or unauthorized advertising, promotional materials, junk mail, spam, chain letters, pyramid schemes, or any other form of solicitation.
  • +
  • You will not post any material that contains software viruses or any other computer code, files or programs designed to interrupt, destroy or limit the functionality of any computer software or hardware or telecommunications equipment.
  • +
  • You will not impersonate any person or entity, including, but not limited to, a blog author, forum leader, guide or host, or falsely state or otherwise misrepresent your affiliation with a person or entity.
  • +
  • You will not forge headers or otherwise manipulate identifiers in order to disguise the origin of any content transmitted through the blog.
  • +
  • You will not post any content that is knowingly false and/or defamatory, inaccurate, abusive, vulgar, hateful, harassing, obscene, profane, sexually oriented, threatening, invasive of a person's privacy, or otherwise violative of any law.
  • +
  • You will not post any content that may infringe any patent, trademark, trade secret, copyright or other proprietary rights of any party.
  • +
  • You will not post any content that contains personal information about another person without that person's explicit consent.
  • +
  • You will not use the blog to advertise or offer to sell or buy any goods or services for any business purpose, unless such blog specifically allows such messages.
  • +
+ +

Can I scrape, pretty please?

+

Scraping is allowed, but please be considerate. I don't want to have to block your IP address.

+

Also the site employs Cloudflare's Email Obfuscation feature to prevent email addresses from being scraped by bots. This means that email addresses are not visible in the source code of the page. If you are a bot and you are reading this, please don't scrape my email address(^v^)

+ + + +

Am I free to use your content?

+ +

Unless otherwise stated, all content on this site is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Source code is licensed under MIT License. Source code available on + GitHub + .

+ +

You are free to use and share the content on this site as long as you give credit to the author and link back to the original content. You may not use the content for commercial purposes. If you remix, transform, or build upon the source code, you must distribute your contributions under the same license as the original.

+ +

Username Restrictions W.E.F May 27, 2023

+

A certain number of restrictions have been placed on usernames. Here's what you need to know:

+
    +
  • Length Restrictions: 4-30 characters, alphanumeric only. (Unchanged)
  • +
  • Protected Usernames: Certain usernames like admin, administrator, root, moderator, etc. (non-exhaustive list) are protected and cannot be used for registering an account. (New)
  • +
  • Changing Username: Right now, this site does not allow username changes. (Unchanged) There are plans to allow username changes in the future, but it will be limited to once every 30 days. (New)
  • +
  • Username Purging: Accounts which have registered and haven't verified their email within 72 hours will be purged and the username will be available for registration again. (New) (Not yet implemented) Implemented; as of Jul 19, 2023.
  • +
+ + +

Is all the information on this site accurate?

+

The information contained in this website is for general information purposes only. The information is provided by shi.foo and while I endeavour to keep the information up to date and correct, I make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk.

+ +

In no event will I be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website.

+ +

Links to external websites are provided as a convenience and for informational purposes only. They should not be construed as an endorsement by me of the content or views of the linked materials.

+ +

Through this website you are/will be able to link to other websites which are not under the control of shi.foo. I have no control over the nature, content and availability of those sites. The inclusion of any links does not necessarily imply a recommendation or endorse the views expressed within them.

+ +

Every effort is made to keep the website up and running smoothly. However, shi.foo takes no responsibility for, and will not be liable for, the website being temporarily unavailable due to technical issues beyond our control.

+ +

Who gets the final say?

+

Me! Okay! I am the supreme overlord of this site. All information on this site is subject to change without notice. I reserve the right to change the terms of service at any time. If you care too much about the terms of service, you should probably not use this site. Okay, all done now. Get out of here!

+ +

Update: July 13, 2023

+

The website's new URL is shi.foo. The old URL thatcomputerscientist.com will be redirected to the new URL. Please update your bookmarks.

+ +{% endblock %} + diff --git a/templates.old/blog/socialify.html b/templates.old/blog/socialify.html new file mode 100644 index 00000000..f48eba25 --- /dev/null +++ b/templates.old/blog/socialify.html @@ -0,0 +1,103 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +

Socialify

+{% load static %} +{% if url %} +

+ Socialify +

+ +{% else %} +

Socialify +

+{% endif %} +
+

Socialify is a image service that generates header images for your GitHub README.md files. Go ahead and try putting your GitHub repository URL in the input box below. A full React app is also available at https://socialify.thatcomputerscientist.com. +

+
+
+
+
+

+ Repository URL: + + + + +

+

+ Theme: + + +       + Font: + + +

+

+ Background Pattern: + + +

+

+ + +    + + +    + + +    + + +    + + +

+ + +    + + +    + + +    + + +

+

+ + {% if url %} + Download Image + {% endif %} +

+
+{% if url %} +

For additional download options, view this image on Socialify.

+{% endif %} + +{% endblock %} + diff --git a/templates.old/blog/tagged.html b/templates.old/blog/tagged.html new file mode 100644 index 00000000..192ef2ee --- /dev/null +++ b/templates.old/blog/tagged.html @@ -0,0 +1,12 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load static %} +

Posts Tagged With "{{ tag.name }}"

+{% if posts %} +
+ {% include 'blog/partials/post_list.html' %} +
+{% else %} +

There are no posts tagged with "{{ tag.name }}".

+{% endif %} +{% endblock %} + diff --git a/templates.old/blog/tags.html b/templates.old/blog/tags.html new file mode 100644 index 00000000..44dcac61 --- /dev/null +++ b/templates.old/blog/tags.html @@ -0,0 +1,20 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +

All Tags

+{% load static %} +{% if tags %} +{% comment %} Varying font sizes based on tag.count {% endcomment %} +{% comment %}
    {% endcomment %} +
    +{% for tag in tags %} + + {{ tag.name }} ({{ tag.count }} post{{ tag.count|pluralize }}) + +{% endfor %} +
    +{% comment %}
{% endcomment %} +{% else %} +

No Tags found.

+{% endif %} + +{% endblock %} + diff --git a/templates.old/blog_admin/comments.html b/templates.old/blog_admin/comments.html new file mode 100644 index 00000000..95ae1d96 --- /dev/null +++ b/templates.old/blog_admin/comments.html @@ -0,0 +1,63 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load static %} +
+

{{ title }}

+{% for message in messages %} +
+

{{ message }}

+
+{% endfor %} + + + + + + + + + + + + {% for comment in comments %} + + + + + + + + {% endfor %} + +
TextAuthorPostComment DateActions
{{ comment.body }}{% if comment.user %}{{ comment.user.username }}{% else %}{{ comment.anonymous_user.name }}{% endif %}{{ comment.post.title }}{{ comment.created_at | date:"d.m.Y" }} + Edit + Delete +
+{% if num_pages and page %} + +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/templates.old/blog_admin/edit_post.html b/templates.old/blog_admin/edit_post.html new file mode 100644 index 00000000..6ce7af18 --- /dev/null +++ b/templates.old/blog_admin/edit_post.html @@ -0,0 +1,205 @@ +{% extends 'blog/partials/base.html' %} +{% load static %} +{% load escape %} +{% block content %} + +

Editing Post: {{ post.title }}

+
+ Code + Preview + Image (Block) + Image (Inline) +
+
+
+
+
+
+
+
+ +
+{% endblock content %} {% block scripts %} + + + +{% endblock scripts %} diff --git a/templates.old/blog_admin/new_post.html b/templates.old/blog_admin/new_post.html new file mode 100644 index 00000000..c2e911b6 --- /dev/null +++ b/templates.old/blog_admin/new_post.html @@ -0,0 +1,121 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% if post %} +

Edit Post: {{ post.title }}

+{% else %} +

Create New Post

+{% endif %} +

This page allows you to create metadata for a new post. You can add the actual content of the post in the next step.

+ +{% for message in messages %} + {% if 'new_post_message' in message.tags %} +

{{message.message}}

+ {% endif %} +{% endfor %} +
+ {% csrf_token %} + {% if post %} + + {% endif %} + + + + + + + + + + {% if post %} + + + + + {% endif %} + + + + + + + + + + + + + + + + + + +
Title *
Slug + Auto generated. + + Use custom slug? +
Cover Image + Cover Image +
+ {% if post %} + New Cover Image + {% else %} + Cover Image * + {% endif %} + + +
Tags * + +
Additional Tags + +
Category * + +
Post Date + {% comment %} {{ post.post_date|date:"Y-m-d" }} {% endcomment %} + +
+
+ +
+ + +{% endblock %} \ No newline at end of file diff --git a/templates.old/blog_admin/partials/category_topbar.html b/templates.old/blog_admin/partials/category_topbar.html new file mode 100644 index 00000000..a52b2bb3 --- /dev/null +++ b/templates.old/blog_admin/partials/category_topbar.html @@ -0,0 +1,23 @@ +
+ Create New Category +
+ + +
+
+

{{ title }}

+
+
+{% for message in messages %} +

{{ message }}

+{% endfor %} diff --git a/templates.old/blog_admin/partials/posts_topbar.html b/templates.old/blog_admin/partials/posts_topbar.html new file mode 100644 index 00000000..b9bad541 --- /dev/null +++ b/templates.old/blog_admin/partials/posts_topbar.html @@ -0,0 +1,7 @@ +
+
+ + +
+ Create New Post +
diff --git a/templates.old/blog_admin/partials/tags_topbar.html b/templates.old/blog_admin/partials/tags_topbar.html new file mode 100644 index 00000000..c4a49ccf --- /dev/null +++ b/templates.old/blog_admin/partials/tags_topbar.html @@ -0,0 +1,14 @@ +
+ Create New Tag + {% comment %} Search Users Box {% endcomment %} +
+ + +
+
+

{{ title }}

+
+
+{% for message in messages %} +

{{ message }}

+{% endfor %} \ No newline at end of file diff --git a/templates.old/blog_admin/partials/users_topbar.html b/templates.old/blog_admin/partials/users_topbar.html new file mode 100644 index 00000000..a0be6122 --- /dev/null +++ b/templates.old/blog_admin/partials/users_topbar.html @@ -0,0 +1,15 @@ + +
+ Create New User + {% comment %} Search Users Box {% endcomment %} +
+ + +
+
+

{{ title }}

+
+
+{% for message in messages %} +

{{ message }}

+{% endfor %} \ No newline at end of file diff --git a/templates.old/blog_admin/posts.html b/templates.old/blog_admin/posts.html new file mode 100644 index 00000000..a8aac92c --- /dev/null +++ b/templates.old/blog_admin/posts.html @@ -0,0 +1,89 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load static %} +
+
+ {% include 'blog_admin/partials/posts_topbar.html' %} +

{{ title }}

+ {% for message in messages %} +
+

{{ message }}

+
+ {% endfor %} + + + + + + + + + + + + + + {% for post in posts %} + + + + + + + + + + {% endfor %} + +
CoverArticleAuthorCreatedCategoryActions
+ {% if post.is_public %} + Home + {% else %} + Home + {% endif %} + + Cover Image + + + {{ post.title }} + + {{ post.author }}{{ post.date | date:"d M Y" }}{{ post.category }} +

Edit Post Metadata

+

Edit Post Contents

+

Delete Post

+ {% if post.is_public %} +

Unpublish Post

+ {% else %} +

Publish Post

+ {% endif %} +
+ {% if num_pages and page %} + + {% endif %} +
+
+{% endblock %} diff --git a/templates.old/dev_status/home.html b/templates.old/dev_status/home.html new file mode 100644 index 00000000..18574c0a --- /dev/null +++ b/templates.old/dev_status/home.html @@ -0,0 +1,121 @@ +{% extends 'blog/partials/base.html' %} {% block content %} +{% load replace %} +
+
+ + + + + + + + + + + +
+

Search & Filter:  

+
+ + + + + + + + + +
+
+
+ {% load static %} + {% load times %} +
+
+
+ {% comment %} Search and Filter {% endcomment %} + +
+ + {% for repo in repos %} + + + + + {% endfor %} +
+ + + +

+ {{ repo.name }} + {% if repo.isFork %} + + {% endif %} + {% if repo.isArchived %} + + {% endif %} +

+

{{ repo.description }}

+

+ {% if repo.homepageUrl %} + + {{ repo.homepageUrl|replace:'https://'|replace:'http://' }} + {% endif %} + Last Pushed: {{ repo.pushedAt }} +

+
+

+ {% if repo.licenseInfo %} + + {{ repo.licenseInfo.name }} + {% endif %} + + {{ repo.stargazerCount }} + + {{ repo.forkCount }} +

+
+
+ +
+
+{% endblock %} diff --git a/templates.old/dev_status/repo.html b/templates.old/dev_status/repo.html new file mode 100644 index 00000000..c5df710b --- /dev/null +++ b/templates.old/dev_status/repo.html @@ -0,0 +1,140 @@ +{% extends 'blog/partials/base.html' %} {% block content %} {% load static %} + +Socialify +{% if parent is not None %} +

+ + Folder + + .. + {% endif %} +

+{% if files and "byteSize" not in files %} + + + + + + + + + + {% for file in files %} + + + + + + {% endfor %} + +
NameLast CommitUpdated
+ {% if file.type == 'tree' %} + + Folder + + {% else %} + + File + + {% endif %} + {{ file.name }} + {{ file.commit.message|truncatechars:50 }}{{ file.commit.committedDate }}
+{% endif %} {% if "byteSize" in files and not files.isBinary %} +
+
+

+ Viewing + {{ files.name }} +
+{{ files.lines }} lines ({{ files.loc }} loc) • {{ files.size }}
+

+
+ {{files.text|safe}} +
+{% endif %} {% if "byteSize" in files and files.isBinary %} + +
+
+

+ Viewing + {{ files.name }} +
+{{ files.size }}
+

+
+ {% if files.isImage == True %} + {{files.name}} + {% else %} +

Binary file, cannot display

+

+ Download + here +

+ {% endif %} {% endif %} {% endblock content %} +
diff --git a/templates.old/userpages/home.html b/templates.old/userpages/home.html new file mode 100644 index 00000000..68a13b2c --- /dev/null +++ b/templates.old/userpages/home.html @@ -0,0 +1,8 @@ +{% extends 'userpages/partials/base.html' %} {% block content %} +
+
+

Welcome to {{ username }}'s {{ title }}

+ Powered by Shifoo – © 2022 +
+
+{% endblock %} diff --git a/templates.old/userpages/partials/base.html b/templates.old/userpages/partials/base.html new file mode 100644 index 00000000..d6dd452a --- /dev/null +++ b/templates.old/userpages/partials/base.html @@ -0,0 +1,23 @@ +{% load static %} + + + + + + + + {{ username }}'s {{ title }} | Shifoo + + + + + + + + {% include 'userpages/partials/navbar.html' %} + {% block content %} {% endblock %} + + diff --git a/templates.old/userpages/partials/navbar.html b/templates.old/userpages/partials/navbar.html new file mode 100644 index 00000000..e69de29b diff --git a/templates/400.html b/templates/400.html deleted file mode 100644 index 41beaa4e..00000000 --- a/templates/400.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load static %} -
-
-

400 Bad Request

-

Unfortunately, something went wrong. The server could not understand your request.

-

Go Home

-
-
-{% endblock %} diff --git a/templates/403.html b/templates/403.html deleted file mode 100644 index 1ab86cd6..00000000 --- a/templates/403.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load static %} -
-
-

403 Permission Denied

-

You do not have permission to access this page.

-

<Go Home

-
-
-{% endblock %} diff --git a/templates/404.html b/templates/404.html deleted file mode 100644 index 455f1659..00000000 --- a/templates/404.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load static %} - -
- -
- {% if context.mode == 'article' %} - {% load random_numbers %} - {% if context.similar_posts %} - - {% else %} - - {% endif %} -

-

Hey! Skippy here! I am the 404 Assistant Bot for this site. Looks like you are trying to search an article, but I couldn't find the page. {% if context.similar_posts %}Maybe you are looking for one of these?{% endif %}

- - {% elif context.mode == 'user' %} - -

-

Hey! Skippy here! I am the 404 Assistant Bot for this site. Looks like you are trying to search a user with username {{ context.username }} but I couldn't find any user with that username. {% if context.similar_users %}Maybe you are looking for one of these users?{% endif %}

- - {% else %} - -

Hey! Skippy here! I am the 404 Assistant Bot for this site. Unfortunately, I couldn't find the page you were looking for. Let me guide you home!

- {% endif %} -
-

Go Home

-
-
-
-
- -{% endblock %} diff --git a/templates/500.html b/templates/500.html deleted file mode 100644 index f61b46fa..00000000 --- a/templates/500.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load static %} -
-
-

500 Server Error

-

Sorry, something went wrong. The server encountered an internal error or misconfiguration and was unable to complete your request.

-

Go Home

-
-
-{% endblock %} diff --git a/templates/_partials/left_sidebar.html b/templates/_partials/left_sidebar.html index e69de29b..8e1445a8 100644 --- a/templates/_partials/left_sidebar.html +++ b/templates/_partials/left_sidebar.html @@ -0,0 +1,605 @@ +{% load static %} +{% load i18n %} +{% block head %} + +{% endblock %} + + +{% comment %} {% load static %} + + + {% endcomment %} diff --git a/templates/blog/account.html b/templates/blog/account.html deleted file mode 100644 index 7af89675..00000000 --- a/templates/blog/account.html +++ /dev/null @@ -1,146 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load static %} -

My Account

-
-
-
- {{ user.username }}'s avatar -
- -
-
- {% for message in messages %} -
-

{{ message }}

-
- {% endfor %} - {% if request.GET.tab == 'avatar' %} -
-

Choose an avatar from the list below. The avatars are grouped by their theme.

-
- {% csrf_token %} - {% for avatar_dir, avatar_files in avatarlist.items %} -

{{ avatar_dir }}

-
- {% for avatar_file in avatar_files %} -
- {% with ""|add:avatar_dir|add:"/"|add:avatar_file as avt_url %} - - - {% endwith %} -
- {% endfor %} -
-

-
- {% endfor %} - -
-
- {% elif request.GET.tab == 'blinkies' %} -
-

Choose a blinkie to display on your public profile.

-
- {% csrf_token %} -
- - -
- {% for blinkie in blinkies %} -
- - -
- {% endfor %} - -
-
-
- {% elif request.GET.tab == 'details' %} -
-

Change your account details here. You can change your first name, last name, bio, email and activity visibility.

-
- {% csrf_token %} - - {{ update_form.as_table }} -
- -
-
- {% elif request.GET.tab == 'email' %} -
-

Change your email address here. Your current registered email is {{ user.email }}. Please note that a verification email will be sent to the new email address in order to update the current email address. Please provide the new email address in the box below:

-
- {% csrf_token %} -

- -
-
- {% elif request.GET.tab == 'password' %} -
-
- {% csrf_token %} - - - - - - - - - - - - - -
-
- -
-
- {% elif request.GET.tab == 'delete' and not user.is_superuser %} -
-

Deleting your account will remove all your posts, comments and other data from the website. Please note that this action is irreversible. If you wish to delete your account, please enter your password in the box below:

-
- {% csrf_token %} -

- -
-
- {% else %} -
-

You can change account settings for {{ user.username }} here. If you wish to have additional support, please contact me at webmaster@thatcomputerscientist.com. Please take care of the following points before you submit your support request:

-
    -
  • Please do not edit the subject line.
  • -
  • As an individual monitoring this email, I request you to refrain yourself from spamming.
  • -
  • Please do not include any sensitive information (like credit card numbers, passwords, etc.) in the email.
  • -
  • Allow me upto 48 hours to respond to your support request.
  • -
  • Do not send multiple support requests.
  • -
  • Please note that this is a support request related to your account. Please do not file any bugs here. If you have noticed a bug, please report it to the GitHub Issues page.
  • -
-
- {% endif %} -
-
-{% endblock %} diff --git a/templates/blog/activity.html b/templates/blog/activity.html deleted file mode 100644 index d963fe1d..00000000 --- a/templates/blog/activity.html +++ /dev/null @@ -1,61 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load static %} -
- - - - - -
- {{ activity_user.username }}'s avatar - -

- {{ activity_user.first_name }} {{ activity_user.last_name }} - @{{ activity_user.username }} - {% if activity_user_profile.blinkie_url %} - {{ activity_user_profile.blinkie_url }} - {% endif %} -

- {% if activity_user_profile.bio %} -

Bio: {{ activity_user_profile.bio|linebreaksbr }}

- {% endif %} - - {% if activity_user_profile.location %} -

Location: {{ activity_user_profile.location }}

- {% endif %} - - {% if activity_user_profile.email_public %} -

Email: {{ activity_user.email }}

- {% endif %} -
-
- -
- {% if activity_user_profile.is_public or request.user.username == activity_user.username %} - - - {% if activity_recent_comments %} -

Recent Comments

- {% if not activity_user_profile.is_public and request.user.username == activity_user.username %} -

Your profile is not public. Only you can see this information. If you want to change this, go to your account settings.

- {% endif %} -
    - {% for comment in activity_recent_comments %} -
  • -

    On {{ comment.post.title }}: -

    {{ comment.body|safe }}

    -
  • - {% endfor %} -
- {% endif %} - - {% else %} - -

This user's profile is private.

- - {% endif %} -
-{% endblock %} -{% block scripts%} -{% include 'blog/partials/mathjax.html' %} -{% endblock %} diff --git a/templates/blog/anidata.html b/templates/blog/anidata.html deleted file mode 100644 index 78e7106c..00000000 --- a/templates/blog/anidata.html +++ /dev/null @@ -1,6 +0,0 @@ -{{ MALContent|safe }} - diff --git a/templates/blog/anilist.html b/templates/blog/anilist.html deleted file mode 100644 index 2ab01484..00000000 --- a/templates/blog/anilist.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} {% load static %} -
- -
-
-
    -
  • - Data is fetched from - MyAnimeList. -
  • -
  • - I do not update the list regularly. Some anime might be missing. -
  • -
-{% endblock content %} {% block scripts %} - -{% endblock scripts %} diff --git a/templates/blog/archives.html b/templates/blog/archives.html deleted file mode 100644 index 09ec4963..00000000 --- a/templates/blog/archives.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -

Archives

-{% load static %} -{% if archives %} -
- -
-{% else %} -

No archives found.

-{% endif %} - -{% endblock %} - diff --git a/templates/blog/articles.html b/templates/blog/articles.html deleted file mode 100644 index 87bb53cf..00000000 --- a/templates/blog/articles.html +++ /dev/null @@ -1,66 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% if type == 'articles' %} -

All Posts

-{% elif type == 'articles-archive' %} -

Posts made in {{ date }}

-{% elif type == 'articles-category' %} -

Posts made in Category: {{ category_name }}

-{% endif %} - -
- Filters:     - - - - - {% if type != 'articles-category' %} - - - {% endif %} -    - -
-{% if posts %} -
- {% include 'blog/partials/post_list.html' %} -
-
- - - {% if page == 1 %} - - - {% else %} - - - {% endif %} - {% load times %} - {% for i in num_pages|times %} - - {% endfor %} - {% if page == num_pages %} - - - {% else %} - - - {% endif %} - -
««{{ i }}»»
-
-{% include 'blog/partials/mathjax.html' %} -{% else %} -

No posts found.

-{% endif %} -{% endblock %} \ No newline at end of file diff --git a/templates/blog/categories.html b/templates/blog/categories.html deleted file mode 100644 index b95403ea..00000000 --- a/templates/blog/categories.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -

Categories

-{% load static %} -{% if categories %} -
- -
-{% else %} -

No categories found.

-{% endif %} - -{% endblock %} - diff --git a/templates/blog/home.html b/templates/blog/home.html deleted file mode 100644 index 739c5227..00000000 --- a/templates/blog/home.html +++ /dev/null @@ -1,70 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load static %} -{% load i18n %} - -
- {% url 'blog:user_activity' 'bobby' as bobby_profile_url %} - {% url 'blog:register' as register_url %} - {% blocktrans %} -

- Welcome to the home of Shifoo (previously That Computer Scientist). My name is @bobby, and this is my personal - website. I aim to build a retro looking personal website, where I share my thoughts, ideas, and experiences through articles, and will showcase some cool nostalgic features and tools. -

-

- Please note that I am continuously working on this site, and it is still under construction. So, not all features are available yet, and some features may not work as intended. -

-

- There's also a some of fun stuff you can find in the sidebar, that you can play around with. I will be adding more in the not so distant future. - Also, To participate around various sections of the site, you will need to register for an account. I hope you enjoy your stay here. -

- {% endblocktrans %} -
-
- -
-
- -
- - {% if announcements is not None %} - -
    - {% for announcement in announcements %} -
  • - - {% if announcement.is_new %} - - {% else %} - - {% endif %} - - - {{ announcement.created_at | date:"M d, Y" }}: {{ announcement.content | safe }} - -
  • -

    - {% endfor %} -
-
- {% endif %} -
-
- {% load ad %} - Ad -
-{% if posts %} -
-

Recent Posts

- {% include 'blog/partials/post_list.html' %} -
-{% endif %} -{% endblock %} - -{% block scripts %} -{% include 'blog/partials/mathjax.html' %} - - -{% endblock %} - diff --git a/templates/blog/partials/base.html b/templates/blog/partials/base.html deleted file mode 100644 index ea517166..00000000 --- a/templates/blog/partials/base.html +++ /dev/null @@ -1,170 +0,0 @@ -{% load static %} - - - - - - - - - - - - - - - - - - - - Shifoo - {{ title }} - - - - - - - - - - -
-
- - - - - - - -
- {% block content %} {% endblock %} -
- - -
-
- - - {% comment %} - - {% endcomment %} - - - - - {% comment %} - - {% endcomment %} - {% comment %} {% endcomment %} - {% comment %} {% endcomment %} - {% if request.COOKIES.summonOneko == 'true' %} - - {% endif %} {% block scripts %} {% endblock %} - diff --git a/templates/blog/partials/mathjax.html b/templates/blog/partials/mathjax.html deleted file mode 100644 index dd1944d4..00000000 --- a/templates/blog/partials/mathjax.html +++ /dev/null @@ -1,57 +0,0 @@ -{% load static %} - - diff --git a/templates/blog/partials/post_list.html b/templates/blog/partials/post_list.html deleted file mode 100644 index d72bd723..00000000 --- a/templates/blog/partials/post_list.html +++ /dev/null @@ -1,45 +0,0 @@ -{% load tz %} -{% load static %} -{% for post in posts %} -
-
-

- {{ post.title }} -

-
- {% with post.author.userprofile_set.first as userprofile %} - - {% endwith %} - - - {{ post.author.first_name }} {{ post.author.last_name }} - - - posted in - - - {{ post.category }} - - - | - {% localtime on %}{{ post.date | date:"M d, Y" }}{% endlocaltime %} -
-
-
- - {{ post.excerpt | safe }} -
-
- - Continue Reading | {{ post.num_comments }} - Comment{% if not post.num_comments == 1 %}s{% endif %} - - {% comment %} tags {% endcomment %} - - {% for tag in post.tags.all %} - {{ tag.name }} - {% endfor %} - -
-
-{% endfor %} \ No newline at end of file diff --git a/templates/blog/partials/search/comment_list.html b/templates/blog/partials/search/comment_list.html deleted file mode 100644 index 7afbced0..00000000 --- a/templates/blog/partials/search/comment_list.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load static %} - diff --git a/templates/blog/partials/search/post_list.html b/templates/blog/partials/search/post_list.html deleted file mode 100644 index 811c417e..00000000 --- a/templates/blog/partials/search/post_list.html +++ /dev/null @@ -1,23 +0,0 @@ -{% load tz %} -{% load static %} -{% for post in posts %} - {% comment %} This is the plain small version for search list {% endcomment %} -

- {{ post.title }} -

-

Posted by {{ post.author.first_name }} {{ post.author.last_name }} in {{ post.category }} on {% localtime on %}{{ post.date | date:"M d, Y" }}{% endlocaltime %}

- -
- {{ post.body|truncatewords:150|safe }} -
-
-

Tags: - {% for tag in post.tags.all %} - {{ tag.name }} - {% endfor %} -

-

- Read complete post... -

-
-{% endfor %} \ No newline at end of file diff --git a/templates/blog/partials/search/user_list.html b/templates/blog/partials/search/user_list.html deleted file mode 100644 index 3493508c..00000000 --- a/templates/blog/partials/search/user_list.html +++ /dev/null @@ -1,13 +0,0 @@ -{% load static %} -{% for user in users %} - -{% endfor %} \ No newline at end of file diff --git a/templates/blog/partials/sidebar.html b/templates/blog/partials/sidebar.html deleted file mode 100644 index 458ddbee..00000000 --- a/templates/blog/partials/sidebar.html +++ /dev/null @@ -1,424 +0,0 @@ -{% load static %} -{% comment %} Login Area {% endcomment %} -{% if not user.is_authenticated %} - -{% for message in messages %} -{% if 'loginError' in message.tags %} - {% if message.message == "ENVERR" and request.GET.username %} -
- {% csrf_token %} - - -
- {% endif %} -
-
-
- {% endif %} - {% endfor %} -
-
- - - - - -
- - -
-{% endif %} - -{% if user.is_authenticated %} -
-

Hello, {{ user.username }}!

- -
-{% endif %} - - - -
- {% comment %}

Advertisement

{% endcomment %} - {% load ad %} - Advertisement -
- -
-

Good Stuff

- -
- -
-

Site Spells

- -
- -
-

Archives

- -
- -
-

Categories

- -
- -{% if user.is_superuser %} -
-

Admin

- -
-{% endif %} - -{% if anonymous_users or logged_in_users or admin_users %} -
-

Who's Online?

-
-

In total, there {% if not anonymous_users|add:logged_in_users|add:admin_users == 1%}are{% else %}is{% endif %} {{ anonymous_users|add:logged_in_users|add:admin_users }} user{% if not anonymous_users|add:logged_in_users|add:admin_users == 1%}s{% endif %} online ::

-
    -
  • {{ anonymous_users }} Guest{% if not anonymous_users == 1%}s{% endif %}
  • -
  • {{ logged_in_users }} Registered User{% if not logged_in_users == 1%}s{% endif %}
  • -
  • {{ admin_users }} Staff Member{% if not admin_users == 1%}s{% endif %}
  • -
-

(Based on users active over the past 5 minutes)

-
-
-{% endif %} - -
-

You are Visitor #

-
- 0 - 0 - 6 - 9 - 4 - 2 - 0 -
-

____________________________________
This is just a nice random number!

-
- diff --git a/templates/blog/post.html b/templates/blog/post.html deleted file mode 100644 index 5a98e981..00000000 --- a/templates/blog/post.html +++ /dev/null @@ -1,387 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load static %} -{% load tz %} -{% load sha256 %} -
- Home - Opinions - Focus Off - Spectacles Off - {% comment %} - Translate to Japanese - {% if request.session.language == 'jp' %} - Translate to English - {% else %} - Translate to Japanese - {% endif %} - {% endcomment %} -
-
-

- {{ post.title }} -

-
- {% with post.author.userprofile_set.first as userprofile %} - - {% endwith %} - - - {{ post.author.first_name }} {{ post.author.last_name }} - - - posted in - - - {{ post.category }} - - - | - {% localtime on %}{{ post.date | date:"M d, Y" }}{% endlocaltime %} - | - {{ post.views }} view{% if not post.views == 1%}s{% endif %} - -
-

- {% for tag in post.tags.all %} - {{ tag.name }} - {% endfor %} -

- -
- {{ post.first_paragraph | safe }} - Post Image for {{ post.title }} -
- {{ post.body | safe }} -
-
- -
-

Liked this post? Wanna stay updated?

-

Subscribe to my RSS feed to get the latest updates from this weblog. Copy and paste the following link into your favorite RSS reader:

-
https://shi.foo/rss/
-
- -{% if read_next %} -

Read Next

- -{% endif %} -

Comments - - Back to Top - -

-{% if comments %} -
- {% for comment in comments %} -
- - - - - -
- Profile Picture - {% if not comment.user %} - Anonymous User - {% else %} - Registered User - {% endif %} - -
- {% if comment.user %}{{ comment.user.username }}{% else %}{{ comment.anonymous_user.name }}{% endif %} on {{ comment.created_at | date:"M d, Y" }} - {% if comment.edited %} - (Edited) - {% endif %} - {% if comment.user == user %} -    - Edit -    - Delete - {% endif %} - {% if comment.anonymous_user.name and comment.anonymous_user.email and comment.anonymous_user.token and comment.anonymous_user.token == request.COOKIES.anonymous_token|sha256 %} -    - Edit -    - Delete - {% endif %} -
-
- {{ comment.processed_body|safe }} -
- {% if comment.user == user %} - - {% endif %} - {% if comment.anonymous_user.name and comment.anonymous_user.email and comment.anonymous_user.token and comment.anonymous_user.token == request.COOKIES.anonymous_token|sha256 %} - - {% endif %} -
-
- {% endfor %} -
-{% else %} -
-

Sadly, there are no comments yet. Be the first to leave one!

-
-{% endif %} - -{% if user.is_authenticated %} -
-

Leave a Comment

- {% if messages %} - {% for message in messages %} - {% if 'spam' in message.tags %} -

Your comment was not allowed as it was marked as possible spam. If you think this is a mistake, please contact me at webmaster@thatcomputerscientist.com.

- {% endif %} - {% endfor %} - {% endif %} -
- {% csrf_token %} - -
-

Text Markup Tips >

- -
- -
- -
-{% else %} -
-

Leave a Comment

- {% if messages %} - {% for message in messages %} - {% if 'spam' in message.tags %} -

Your comment was not allowed as it was marked as possible spam. If you think this is a mistake, please contact me at webmaster@thatcomputerscientist.com.

- {% endif %} - {% endfor %} - {% endif %} -

You must be logged in to leave a comment. Or, you can leave an anonymous comment.

- -
- -{% endif %} -{% endblock %} -{% block scripts %} - - -{% include 'blog/partials/mathjax.html' %} -{% endblock %} - diff --git a/templates/blog/register.html b/templates/blog/register.html deleted file mode 100644 index 16ff128a..00000000 --- a/templates/blog/register.html +++ /dev/null @@ -1,42 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -

Register for an account

-

- Register for an account to post your thoughts and get feedback from other - users. -

-
-
- - - {{ form.as_table }} -
-

- Captcha -

- - -
-

-

- By registering on this site, you agree to everything that's - written here. -

-

- Note: Upon registering, you will be sent an email with a link to - activate your account. If you don't activate your account within 72 hours, - your username will be released and you will have to register again. -

-{% for message in messages %} {% if 'accountCreated' in message.tags %} -

{{ message.message }}

-{% endif %} {% endfor %} {% endblock %} diff --git a/templates/blog/resetpass.html b/templates/blog/resetpass.html deleted file mode 100644 index 81c68c56..00000000 --- a/templates/blog/resetpass.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -

Reset your Password

-

- Forgot your password? No problem! Just enter your email address below, (the - email you registered with) and I will send you a link to reset your password. -

-
-
- - - {{ form.as_table }} -
-
- -
-

-

Anonymous users cannot reset their password.

-{% for message in messages %} {% if 'passwordReset' in message.tags %} -

{{ message.message }}

-{% endif %} {% endfor %} {% endblock content %} diff --git a/templates/blog/resetpass_input.html b/templates/blog/resetpass_input.html deleted file mode 100644 index 939eab9d..00000000 --- a/templates/blog/resetpass_input.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -

Reset your Password

-

- Enter a new password for your account. Your password must be at least 8 - characters long. -

-
-
- - - {{ form.as_table }} -
-
- -
-

-{% for message in messages %} {% if 'passwordReset' in message.tags %} -

{{ message.message }}

-{% endif %} {% endfor %} {% endblock content %} diff --git a/templates/blog/search.html b/templates/blog/search.html deleted file mode 100644 index 721f8d8d..00000000 --- a/templates/blog/search.html +++ /dev/null @@ -1,74 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load get_list %} - - - - - - - -{% endblock %} -{% block scripts %} -{% include 'blog/partials/mathjax.html' %} -{% endblock %} \ No newline at end of file diff --git a/templates/blog/site_policy.html b/templates/blog/site_policy.html deleted file mode 100644 index 683e2c07..00000000 --- a/templates/blog/site_policy.html +++ /dev/null @@ -1,87 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} - -

I see cookies! Wait, Do you track me?

-

This site uses cookies to store information on your computer. These cookies are required to enable the login functionality of the site. They are not used for tracking purposes.

-

Update: W.E.F May 27, 2023, this site will employ Google Analytics to track user activity. Also Cloudflare's Browser Insights will be used to track performance metrics. (Redacted! No tracking is involved. Enjoy your privacy!)

- -

Also, do not sell my data!

-

Any personal information you provide here will be kept confidential and will not be sold, rented, loaned, or otherwise disclosed. Any information you provide will be held with the utmost care, and will not be used in ways that you have not consented to. If you have any questions, please feel free to contact me at webmaster@thatcomputerscientist.com.

- -

What are these Advertisements?

-

As you know, one of the main goals to this site is to maintain a retro look. The advertisements are a part of that. The ads shown on this website are fake and purely for aesthetic purposes. They are just images of ads from the early days of the internet to spark the nostalgia. I do not make any money from these ads.

- -

I wanna say something in the comments...

-

Not so fast! Before you post a comment, know that comments are moderated. I will employ general moderation tools to prevent spam and other undesirable content. I also reserve the right to edit or delete any comments submitted to this site without notice due to any of the following reasons:

-
    -
  • Comments deemed to be spam or questionable spam
  • -
  • Comments including profanity
  • -
  • Comments containing language or concepts that could be deemed offensive
  • -
  • Comments that attack a group or individual
  • -
  • Comments that harass other posters
  • -
  • Comments that are off-topic
  • -
- -

Comments are not for promoting your articles or other sites. Spam will be deleted and repeated offenses will result in a ban.

- -

Comments are not for asking questions or help. I may open a forum soon, if I ever wanted to entend the features on the site. Also, remember that Stack Overflow and Reddit are your best friends.

- - -

Rules, you say? Anything else?

-

Yes, by using this site, you agree to the following terms and conditions:

-
    -
  • You will not post any content that is illegal, obscene, defamatory, threatening, harassing, abusive, hateful, or embarrassing to any other person or entity as determined by us.
  • -
  • You will not post any content that infringes any patent, trademark, trade secret, copyright or other proprietary rights of any party.
  • -
  • You will not post any unsolicited or unauthorized advertising, promotional materials, junk mail, spam, chain letters, pyramid schemes, or any other form of solicitation.
  • -
  • You will not post any material that contains software viruses or any other computer code, files or programs designed to interrupt, destroy or limit the functionality of any computer software or hardware or telecommunications equipment.
  • -
  • You will not impersonate any person or entity, including, but not limited to, a blog author, forum leader, guide or host, or falsely state or otherwise misrepresent your affiliation with a person or entity.
  • -
  • You will not forge headers or otherwise manipulate identifiers in order to disguise the origin of any content transmitted through the blog.
  • -
  • You will not post any content that is knowingly false and/or defamatory, inaccurate, abusive, vulgar, hateful, harassing, obscene, profane, sexually oriented, threatening, invasive of a person's privacy, or otherwise violative of any law.
  • -
  • You will not post any content that may infringe any patent, trademark, trade secret, copyright or other proprietary rights of any party.
  • -
  • You will not post any content that contains personal information about another person without that person's explicit consent.
  • -
  • You will not use the blog to advertise or offer to sell or buy any goods or services for any business purpose, unless such blog specifically allows such messages.
  • -
- -

Can I scrape, pretty please?

-

Scraping is allowed, but please be considerate. I don't want to have to block your IP address.

-

Also the site employs Cloudflare's Email Obfuscation feature to prevent email addresses from being scraped by bots. This means that email addresses are not visible in the source code of the page. If you are a bot and you are reading this, please don't scrape my email address(^v^)

- - - -

Am I free to use your content?

- -

Unless otherwise stated, all content on this site is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Source code is licensed under MIT License. Source code available on - GitHub - .

- -

You are free to use and share the content on this site as long as you give credit to the author and link back to the original content. You may not use the content for commercial purposes. If you remix, transform, or build upon the source code, you must distribute your contributions under the same license as the original.

- -

Username Restrictions W.E.F May 27, 2023

-

A certain number of restrictions have been placed on usernames. Here's what you need to know:

-
    -
  • Length Restrictions: 4-30 characters, alphanumeric only. (Unchanged)
  • -
  • Protected Usernames: Certain usernames like admin, administrator, root, moderator, etc. (non-exhaustive list) are protected and cannot be used for registering an account. (New)
  • -
  • Changing Username: Right now, this site does not allow username changes. (Unchanged) There are plans to allow username changes in the future, but it will be limited to once every 30 days. (New)
  • -
  • Username Purging: Accounts which have registered and haven't verified their email within 72 hours will be purged and the username will be available for registration again. (New) (Not yet implemented) Implemented; as of Jul 19, 2023.
  • -
- - -

Is all the information on this site accurate?

-

The information contained in this website is for general information purposes only. The information is provided by shi.foo and while I endeavour to keep the information up to date and correct, I make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk.

- -

In no event will I be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website.

- -

Links to external websites are provided as a convenience and for informational purposes only. They should not be construed as an endorsement by me of the content or views of the linked materials.

- -

Through this website you are/will be able to link to other websites which are not under the control of shi.foo. I have no control over the nature, content and availability of those sites. The inclusion of any links does not necessarily imply a recommendation or endorse the views expressed within them.

- -

Every effort is made to keep the website up and running smoothly. However, shi.foo takes no responsibility for, and will not be liable for, the website being temporarily unavailable due to technical issues beyond our control.

- -

Who gets the final say?

-

Me! Okay! I am the supreme overlord of this site. All information on this site is subject to change without notice. I reserve the right to change the terms of service at any time. If you care too much about the terms of service, you should probably not use this site. Okay, all done now. Get out of here!

- -

Update: July 13, 2023

-

The website's new URL is shi.foo. The old URL thatcomputerscientist.com will be redirected to the new URL. Please update your bookmarks.

- -{% endblock %} - diff --git a/templates/blog/socialify.html b/templates/blog/socialify.html deleted file mode 100644 index f48eba25..00000000 --- a/templates/blog/socialify.html +++ /dev/null @@ -1,103 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -

Socialify

-{% load static %} -{% if url %} -

- Socialify -

- -{% else %} -

Socialify -

-{% endif %} -
-

Socialify is a image service that generates header images for your GitHub README.md files. Go ahead and try putting your GitHub repository URL in the input box below. A full React app is also available at https://socialify.thatcomputerscientist.com. -

-
-
-
-
-

- Repository URL: - - - - -

-

- Theme: - - -       - Font: - - -

-

- Background Pattern: - - -

-

- - -    - - -    - - -    - - -    - - -

- - -    - - -    - - -    - - -

-

- - {% if url %} - Download Image - {% endif %} -

-
-{% if url %} -

For additional download options, view this image on Socialify.

-{% endif %} - -{% endblock %} - diff --git a/templates/blog/tagged.html b/templates/blog/tagged.html deleted file mode 100644 index 192ef2ee..00000000 --- a/templates/blog/tagged.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load static %} -

Posts Tagged With "{{ tag.name }}"

-{% if posts %} -
- {% include 'blog/partials/post_list.html' %} -
-{% else %} -

There are no posts tagged with "{{ tag.name }}".

-{% endif %} -{% endblock %} - diff --git a/templates/blog/tags.html b/templates/blog/tags.html deleted file mode 100644 index 44dcac61..00000000 --- a/templates/blog/tags.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -

All Tags

-{% load static %} -{% if tags %} -{% comment %} Varying font sizes based on tag.count {% endcomment %} -{% comment %}
    {% endcomment %} -
    -{% for tag in tags %} - - {{ tag.name }} ({{ tag.count }} post{{ tag.count|pluralize }}) - -{% endfor %} -
    -{% comment %}
{% endcomment %} -{% else %} -

No Tags found.

-{% endif %} - -{% endblock %} - diff --git a/templates/blog_admin/comments.html b/templates/blog_admin/comments.html deleted file mode 100644 index 95ae1d96..00000000 --- a/templates/blog_admin/comments.html +++ /dev/null @@ -1,63 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load static %} -
-

{{ title }}

-{% for message in messages %} -
-

{{ message }}

-
-{% endfor %} - - - - - - - - - - - - {% for comment in comments %} - - - - - - - - {% endfor %} - -
TextAuthorPostComment DateActions
{{ comment.body }}{% if comment.user %}{{ comment.user.username }}{% else %}{{ comment.anonymous_user.name }}{% endif %}{{ comment.post.title }}{{ comment.created_at | date:"d.m.Y" }} - Edit - Delete -
-{% if num_pages and page %} - -{% endif %} -{% endblock %} \ No newline at end of file diff --git a/templates/blog_admin/edit_post.html b/templates/blog_admin/edit_post.html deleted file mode 100644 index 6ce7af18..00000000 --- a/templates/blog_admin/edit_post.html +++ /dev/null @@ -1,205 +0,0 @@ -{% extends 'blog/partials/base.html' %} -{% load static %} -{% load escape %} -{% block content %} - -

Editing Post: {{ post.title }}

-
- Code - Preview - Image (Block) - Image (Inline) -
-
-
-
-
-
-
-
- -
-{% endblock content %} {% block scripts %} - - - -{% endblock scripts %} diff --git a/templates/blog_admin/new_post.html b/templates/blog_admin/new_post.html deleted file mode 100644 index c2e911b6..00000000 --- a/templates/blog_admin/new_post.html +++ /dev/null @@ -1,121 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% if post %} -

Edit Post: {{ post.title }}

-{% else %} -

Create New Post

-{% endif %} -

This page allows you to create metadata for a new post. You can add the actual content of the post in the next step.

- -{% for message in messages %} - {% if 'new_post_message' in message.tags %} -

{{message.message}}

- {% endif %} -{% endfor %} -
- {% csrf_token %} - {% if post %} - - {% endif %} - - - - - - - - - - {% if post %} - - - - - {% endif %} - - - - - - - - - - - - - - - - - - -
Title *
Slug - Auto generated. - - Use custom slug? -
Cover Image - Cover Image -
- {% if post %} - New Cover Image - {% else %} - Cover Image * - {% endif %} - - -
Tags * - -
Additional Tags - -
Category * - -
Post Date - {% comment %} {{ post.post_date|date:"Y-m-d" }} {% endcomment %} - -
-
- -
- - -{% endblock %} \ No newline at end of file diff --git a/templates/blog_admin/partials/category_topbar.html b/templates/blog_admin/partials/category_topbar.html deleted file mode 100644 index a52b2bb3..00000000 --- a/templates/blog_admin/partials/category_topbar.html +++ /dev/null @@ -1,23 +0,0 @@ -
- Create New Category -
- - -
-
-

{{ title }}

-
-
-{% for message in messages %} -

{{ message }}

-{% endfor %} diff --git a/templates/blog_admin/partials/posts_topbar.html b/templates/blog_admin/partials/posts_topbar.html deleted file mode 100644 index b9bad541..00000000 --- a/templates/blog_admin/partials/posts_topbar.html +++ /dev/null @@ -1,7 +0,0 @@ -
-
- - -
- Create New Post -
diff --git a/templates/blog_admin/partials/tags_topbar.html b/templates/blog_admin/partials/tags_topbar.html deleted file mode 100644 index c4a49ccf..00000000 --- a/templates/blog_admin/partials/tags_topbar.html +++ /dev/null @@ -1,14 +0,0 @@ -
- Create New Tag - {% comment %} Search Users Box {% endcomment %} -
- - -
-
-

{{ title }}

-
-
-{% for message in messages %} -

{{ message }}

-{% endfor %} \ No newline at end of file diff --git a/templates/blog_admin/partials/users_topbar.html b/templates/blog_admin/partials/users_topbar.html deleted file mode 100644 index a0be6122..00000000 --- a/templates/blog_admin/partials/users_topbar.html +++ /dev/null @@ -1,15 +0,0 @@ - -
- Create New User - {% comment %} Search Users Box {% endcomment %} -
- - -
-
-

{{ title }}

-
-
-{% for message in messages %} -

{{ message }}

-{% endfor %} \ No newline at end of file diff --git a/templates/blog_admin/posts.html b/templates/blog_admin/posts.html deleted file mode 100644 index a8aac92c..00000000 --- a/templates/blog_admin/posts.html +++ /dev/null @@ -1,89 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load static %} -
-
- {% include 'blog_admin/partials/posts_topbar.html' %} -

{{ title }}

- {% for message in messages %} -
-

{{ message }}

-
- {% endfor %} - - - - - - - - - - - - - - {% for post in posts %} - - - - - - - - - - {% endfor %} - -
CoverArticleAuthorCreatedCategoryActions
- {% if post.is_public %} - Home - {% else %} - Home - {% endif %} - - Cover Image - - - {{ post.title }} - - {{ post.author }}{{ post.date | date:"d M Y" }}{{ post.category }} -

Edit Post Metadata

-

Edit Post Contents

-

Delete Post

- {% if post.is_public %} -

Unpublish Post

- {% else %} -

Publish Post

- {% endif %} -
- {% if num_pages and page %} - - {% endif %} -
-
-{% endblock %} diff --git a/templates/dev_status/home.html b/templates/dev_status/home.html deleted file mode 100644 index 18574c0a..00000000 --- a/templates/dev_status/home.html +++ /dev/null @@ -1,121 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} -{% load replace %} -
-
- - - - - - - - - - - -
-

Search & Filter:  

-
- - - - - - - - - -
-
-
- {% load static %} - {% load times %} -
-
-
- {% comment %} Search and Filter {% endcomment %} - -
- - {% for repo in repos %} - - - - - {% endfor %} -
- - - -

- {{ repo.name }} - {% if repo.isFork %} - - {% endif %} - {% if repo.isArchived %} - - {% endif %} -

-

{{ repo.description }}

-

- {% if repo.homepageUrl %} - - {{ repo.homepageUrl|replace:'https://'|replace:'http://' }} - {% endif %} - Last Pushed: {{ repo.pushedAt }} -

-
-

- {% if repo.licenseInfo %} - - {{ repo.licenseInfo.name }} - {% endif %} - - {{ repo.stargazerCount }} - - {{ repo.forkCount }} -

-
-
- -
-
-{% endblock %} diff --git a/templates/dev_status/repo.html b/templates/dev_status/repo.html deleted file mode 100644 index c5df710b..00000000 --- a/templates/dev_status/repo.html +++ /dev/null @@ -1,140 +0,0 @@ -{% extends 'blog/partials/base.html' %} {% block content %} {% load static %} - -Socialify -{% if parent is not None %} -

- - Folder - - .. - {% endif %} -

-{% if files and "byteSize" not in files %} - - - - - - - - - - {% for file in files %} - - - - - - {% endfor %} - -
NameLast CommitUpdated
- {% if file.type == 'tree' %} - - Folder - - {% else %} - - File - - {% endif %} - {{ file.name }} - {{ file.commit.message|truncatechars:50 }}{{ file.commit.committedDate }}
-{% endif %} {% if "byteSize" in files and not files.isBinary %} -
-
-

- Viewing - {{ files.name }} -
-{{ files.lines }} lines ({{ files.loc }} loc) • {{ files.size }}
-

-
- {{files.text|safe}} -
-{% endif %} {% if "byteSize" in files and files.isBinary %} - -
-
-

- Viewing - {{ files.name }} -
-{{ files.size }}
-

-
- {% if files.isImage == True %} - {{files.name}} - {% else %} -

Binary file, cannot display

-

- Download - here -

- {% endif %} {% endif %} {% endblock content %} -
diff --git a/templates/userpages/home.html b/templates/userpages/home.html deleted file mode 100644 index 68a13b2c..00000000 --- a/templates/userpages/home.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends 'userpages/partials/base.html' %} {% block content %} -
-
-

Welcome to {{ username }}'s {{ title }}

- Powered by Shifoo – © 2022 -
-
-{% endblock %} diff --git a/templates/userpages/partials/base.html b/templates/userpages/partials/base.html deleted file mode 100644 index d6dd452a..00000000 --- a/templates/userpages/partials/base.html +++ /dev/null @@ -1,23 +0,0 @@ -{% load static %} - - - - - - - - {{ username }}'s {{ title }} | Shifoo - - - - - - - - {% include 'userpages/partials/navbar.html' %} - {% block content %} {% endblock %} - - diff --git a/templates/userpages/partials/navbar.html b/templates/userpages/partials/navbar.html deleted file mode 100644 index e69de29b..00000000 diff --git a/thatcomputerscientist/settings.py b/thatcomputerscientist/settings.py index 823ed0e8..6e4ee98d 100644 --- a/thatcomputerscientist/settings.py +++ b/thatcomputerscientist/settings.py @@ -111,6 +111,7 @@ MIDDLEWARE = [ "django.middleware.clickjacking.XFrameOptionsMiddleware", "middleware.globalmetamiddleware.GlobalMetaMiddleware", "middleware.i18nmiddleware.I18NMiddleware", + "middleware.userprofilemiddleware.UserProfileMiddleware", # "whitenoise.middleware.WhiteNoiseMiddleware", # "middleware.oldbrowsermiddleware.OldBrowserMiddleware", # "middleware.ignismiddleware.IgnisMiddleware", diff --git a/thatcomputerscientist/urls.py b/thatcomputerscientist/urls.py index caa7fb77..1b86eae2 100644 --- a/thatcomputerscientist/urls.py +++ b/thatcomputerscientist/urls.py @@ -35,9 +35,10 @@ handler404 = 'thatcomputerscientist.error_handler.custom_404' urlpatterns = [ path('', include('core.urls', namespace='core')), + # Authentication + path('auth/', include('auth.urls', namespace='auth')), - - # Django Admin + # Administration path('admin/administration/', admin.site.urls), diff --git a/users/functions.py b/users/functions.py new file mode 100644 index 00000000..ccf1a7a6 --- /dev/null +++ b/users/functions.py @@ -0,0 +1,9 @@ +from users.models import UserProfile + +def email_verified(user): + profile = UserProfile.objects.get(user=user) + if profile.email_verified: + return True + else: + return False + \ No newline at end of file -- cgit v1.2.3