├── example_project ├── __init__.py ├── asgi.py ├── wsgi.py └── urls.py ├── punkweb_boards ├── conf │ ├── __init__.py │ └── settings.py ├── rest │ ├── __init__.py │ └── permissions.py ├── migrations │ ├── __init__.py │ ├── 0002_boardprofile_metadata.py │ ├── 0004_alter_boardprofile_options_alter_userrank_id.py │ └── 0003_remove_boardprofile_metadata_and_more.py ├── static │ └── punkweb_boards │ │ ├── js │ │ ├── .gitignore │ │ ├── _compile.sh │ │ ├── deps │ │ │ └── sceditor-3.1.1 │ │ │ │ ├── languages │ │ │ │ ├── en-US.js │ │ │ │ ├── en.js │ │ │ │ ├── et.js │ │ │ │ ├── cn.js │ │ │ │ ├── template.js │ │ │ │ ├── tw.js │ │ │ │ ├── nl.js │ │ │ │ ├── sv.js │ │ │ │ ├── ru.js │ │ │ │ ├── uk.js │ │ │ │ ├── ja.js │ │ │ │ ├── de.js │ │ │ │ ├── ar.js │ │ │ │ ├── vi.js │ │ │ │ ├── tr.js │ │ │ │ ├── pl.js │ │ │ │ ├── pt-BR.js │ │ │ │ ├── id.js │ │ │ │ ├── cs.js │ │ │ │ ├── fa.js │ │ │ │ ├── pt.js │ │ │ │ ├── ca.js │ │ │ │ ├── gl.js │ │ │ │ ├── nb.js │ │ │ │ ├── hu.js │ │ │ │ ├── es.js │ │ │ │ ├── fr.js │ │ │ │ ├── sk.js │ │ │ │ ├── el.js │ │ │ │ ├── it.js │ │ │ │ └── lt.js │ │ │ │ ├── emoticons │ │ │ │ ├── cwy.png │ │ │ │ ├── sad.png │ │ │ │ ├── wub.png │ │ │ │ ├── alien.png │ │ │ │ ├── angel.png │ │ │ │ ├── angry.png │ │ │ │ ├── blink.png │ │ │ │ ├── blush.png │ │ │ │ ├── cool.png │ │ │ │ ├── devil.png │ │ │ │ ├── dizzy.png │ │ │ │ ├── ermm.png │ │ │ │ ├── face.png │ │ │ │ ├── grin.png │ │ │ │ ├── happy.png │ │ │ │ ├── heart.png │ │ │ │ ├── ninja.png │ │ │ │ ├── pinch.png │ │ │ │ ├── pouty.png │ │ │ │ ├── sick.png │ │ │ │ ├── silly.png │ │ │ │ ├── smile.png │ │ │ │ ├── tongue.png │ │ │ │ ├── unsure.png │ │ │ │ ├── w00t.png │ │ │ │ ├── wassat.png │ │ │ │ ├── wink.png │ │ │ │ ├── cheerful.png │ │ │ │ ├── getlost.png │ │ │ │ ├── kissing.png │ │ │ │ ├── laughing.png │ │ │ │ ├── shocked.png │ │ │ │ ├── sideways.png │ │ │ │ ├── sleeping.png │ │ │ │ ├── whistling.png │ │ │ │ └── credits.txt │ │ │ │ ├── minified │ │ │ │ ├── themes │ │ │ │ │ ├── famfamfam.png │ │ │ │ │ └── content │ │ │ │ │ │ └── default.min.css │ │ │ │ └── plugins │ │ │ │ │ ├── plaintext.js │ │ │ │ │ ├── v1compat.js │ │ │ │ │ ├── format.js │ │ │ │ │ ├── autoyoutube.js │ │ │ │ │ ├── autosave.js │ │ │ │ │ ├── alternative-lists.js │ │ │ │ │ └── undo.js │ │ │ │ ├── development │ │ │ │ ├── themes │ │ │ │ │ ├── famfamfam.png │ │ │ │ │ └── content │ │ │ │ │ │ └── default.css │ │ │ │ └── plugins │ │ │ │ │ ├── plaintext.js │ │ │ │ │ ├── v1compat.js │ │ │ │ │ ├── autosave.js │ │ │ │ │ ├── format.js │ │ │ │ │ └── autoyoutube.js │ │ │ │ └── example.html │ │ ├── navigate.js │ │ ├── bootstrap.js │ │ ├── ui │ │ │ ├── spoiler.js │ │ │ ├── modal.js │ │ │ └── collapse.js │ │ ├── editor-config.js │ │ └── editor-extras.js │ │ ├── scss │ │ ├── .gitignore │ │ ├── components │ │ │ ├── pw-card.scss │ │ │ ├── pw-input.scss │ │ │ └── pw-modal.scss │ │ ├── punkweb.scss │ │ ├── _typography.scss │ │ ├── _punkweb-editor.scss │ │ ├── _punkweb-theme.scss │ │ ├── _punkweb-mobile.scss │ │ ├── _alignments.scss │ │ └── _punkweb-elements.scss │ │ ├── favicon.ico │ │ └── fonts │ │ ├── Montserrat-Regular.ttf │ │ ├── OpenSans-Regular.ttf │ │ └── Inconsolata-Regular.ttf ├── __init__.py ├── apps.py ├── page_urls.py ├── templates │ └── punkweb_boards │ │ └── themes │ │ └── punkweb │ │ ├── components │ │ └── birthday │ │ │ └── birthday.html │ │ ├── includes │ │ ├── footer.html │ │ └── page_header.html │ │ ├── unpermitted.html │ │ ├── page.html │ │ ├── login.html │ │ ├── register.html │ │ ├── page_not_found.html │ │ ├── settings.html │ │ ├── post_update_form.html │ │ ├── thread_create_form.html │ │ ├── thread_update_form.html │ │ ├── post_delete_form.html │ │ ├── thread_delete_form.html │ │ ├── base.html │ │ ├── report_view.html │ │ ├── keyword_search.html │ │ └── category_detail.html ├── middleware.py ├── context_processors.py ├── queries.py ├── utils.py ├── urls.py └── mixins.py ├── vendor.yml ├── .gitattributes ├── server └── dev │ └── .gitignore ├── MANIFEST.in ├── run_web.sh ├── requirements.txt ├── README.rst ├── Dockerfile ├── docker-compose.yml ├── manage.py ├── setup.py ├── LICENSE └── .gitignore /example_project/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /punkweb_boards/conf/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /punkweb_boards/rest/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /punkweb_boards/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/.gitignore: -------------------------------------------------------------------------------- 1 | lib 2 | -------------------------------------------------------------------------------- /vendor.yml: -------------------------------------------------------------------------------- 1 | - punkweb_boards/static/punkweb_boards/js/deps/**/* linguist-vendored -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | punkweb_boards/static/punkweb_boards/js/deps/**/* linguist-vendored 2 | -------------------------------------------------------------------------------- /punkweb_boards/__init__.py: -------------------------------------------------------------------------------- 1 | default_app_config = "punkweb_boards.apps.PunkwebBoardsConfig" 2 | -------------------------------------------------------------------------------- /server/dev/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | !README.md 6 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/scss/.gitignore: -------------------------------------------------------------------------------- 1 | punkweb.css 2 | punkweb-admin.css 3 | punkweb-admin.min.css 4 | punkweb.min.css 5 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst 2 | include requirements.txt 3 | global-exclude *.pyc 4 | prune example_project/ 5 | recursive-include punkweb_boards/ * 6 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/favicon.ico -------------------------------------------------------------------------------- /run_web.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | python manage.py migrate 4 | python manage.py collectstatic --noinput 5 | python manage.py runserver 0.0.0.0:8000 6 | -------------------------------------------------------------------------------- /punkweb_boards/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PunkwebBoardsConfig(AppConfig): 5 | name = "punkweb_boards" 6 | verbose_name = "Board" 7 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/fonts/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/fonts/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/fonts/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/fonts/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/fonts/Inconsolata-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/fonts/Inconsolata-Regular.ttf -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/_compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | browserify bootstrap.js -o lib/punkweb-boards.js 3 | uglifyjs lib/punkweb-boards.js --compress --mangle -o lib/punkweb-boards.min.js 4 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/en-US.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | 4 | sceditor.locale['en-US'] = { 5 | dateFormat: 'month/day/year' 6 | }; 7 | })(); 8 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/cwy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/cwy.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/sad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/sad.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/wub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/wub.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/navigate.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $(document).ready(function() { 3 | $('.pageBack').click(function() { 4 | window.history.back(); 5 | }); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | django>=3.2 2 | django-precise-bbcode 3 | easy-thumbnails 4 | pillow 5 | 6 | djangorestframework 7 | django-cors-headers 8 | django-compressor 9 | django-libsass 10 | pymemcache 11 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/alien.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/alien.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/angel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/angel.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/angry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/angry.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/blink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/blink.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/blush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/blush.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/cool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/cool.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/devil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/devil.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/dizzy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/dizzy.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/ermm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/ermm.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/face.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/grin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/grin.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/happy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/happy.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/heart.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/ninja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/ninja.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/pinch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/pinch.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/pouty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/pouty.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/sick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/sick.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/silly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/silly.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/smile.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/tongue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/tongue.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/unsure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/unsure.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/w00t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/w00t.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/wassat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/wassat.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/wink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/wink.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | require('./editor-custom-tags.js'); 2 | require('./editor-config.js'); 3 | require('./ui/collapse.js'); 4 | require('./ui/spoiler.js'); 5 | require('./navigate.js'); 6 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/cheerful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/cheerful.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/getlost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/getlost.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/kissing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/kissing.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/laughing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/laughing.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/shocked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/shocked.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/sideways.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/sideways.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/sleeping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/sleeping.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/whistling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/whistling.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/minified/themes/famfamfam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/minified/themes/famfamfam.png -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/development/themes/famfamfam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Punkweb/punkweb-boards/HEAD/punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/development/themes/famfamfam.png -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | punkweb-boards 2 | ============== 3 | 4 | This package is no longer maintained. A newer version is available at 5 | `PunkwebBB `, 6 | which is a full rewrite and improved version of this package. Please use that package instead. -------------------------------------------------------------------------------- /punkweb_boards/page_urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import re_path 2 | 3 | from punkweb_boards import views 4 | 5 | urlpatterns = [ 6 | re_path(r"^not-found/$", views.page_not_found_view, name="not-found"), 7 | re_path(r"^(?P[\w-]+)/$", views.page_view, name="page"), 8 | ] 9 | -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/components/birthday/birthday.html: -------------------------------------------------------------------------------- 1 | {% if user.profile.birthday_today %} 2 |

3 | 4 | Happy Birthday! 5 | 6 |

7 | {% endif %} 8 | -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/includes/footer.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/en.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | 4 | sceditor.locale['en-GB'] = { 5 | 'Font Color': 'Font Colour', 6 | 'Center': 'Centre', 7 | dateFormat: 'day/month/year' 8 | }; 9 | 10 | // set this as the default English locale 11 | sceditor.locale['en'] = sceditor.locale['en-GB']; 12 | })(); 13 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/ui/spoiler.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $(document).ready(function() { 3 | $('.dropdown').click(function() { 4 | $(this).children('.dropdown__content').toggle("100", 'swing'); 5 | }); 6 | $(document).on('click', '.spoiler__open', function() { 7 | $(this).siblings('.spoiler__content').toggle("100", 'swing'); 8 | }); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.9 2 | ENV PYTHONUNBUFFERED 1 3 | 4 | RUN mkdir /webapps 5 | WORKDIR /webapps 6 | 7 | # Installing OS Dependencies 8 | RUN apt-get update && apt-get upgrade -y 9 | 10 | RUN pip install -U pip setuptools 11 | 12 | COPY requirements.txt /webapps/ 13 | 14 | RUN pip install -r /webapps/requirements.txt 15 | 16 | ADD . /webapps/ 17 | 18 | # Django service 19 | EXPOSE 8000 20 | -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/includes/page_header.html: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /example_project/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for example_project project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'example_project.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /example_project/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for example_project project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'example_project.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/emoticons/credits.txt: -------------------------------------------------------------------------------- 1 | Presenting, Nomicons: The Full Monty :o 2 | 3 | Credits: 4 | Oscar Gruno, aka Nominell v. 2.0 -> oscargruno@mac.com 5 | Andy Fedosjeenko, aka Nightwolf -> bobo@animevanguard.com 6 | 7 | Copyright (C) 2001-Infinity, Oscar Gruno & Andy Fedosjeenko 8 | 9 | You can redistribute these files as much as you like, as long as you keep this file with them and give us the proper credit. You may even rape them if you please, just give us credit for our work. -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | cache: 5 | image: memcached 6 | ports: 7 | - "11211:11211" 8 | entrypoint: 9 | - memcached 10 | - -m 64 11 | 12 | web: 13 | build: . 14 | command: ["/webapps/run_web.sh"] 15 | environment: 16 | MEMCACHED_HOST: cache 17 | volumes: 18 | - .:/webapps 19 | ports: 20 | - "8000:8000" 21 | links: 22 | - cache 23 | depends_on: 24 | - cache 25 | 26 | volumes: 27 | db: 28 | driver: local -------------------------------------------------------------------------------- /punkweb_boards/migrations/0002_boardprofile_metadata.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.2 on 2018-03-14 04:18 2 | 3 | import django.contrib.postgres.fields.jsonb 4 | from django.db import migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [("punkweb_boards", "0001_initial")] 9 | 10 | operations = [ 11 | migrations.AddField( 12 | model_name="boardprofile", 13 | name="metadata", 14 | field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True), 15 | ) 16 | ] 17 | -------------------------------------------------------------------------------- /punkweb_boards/middleware.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | from django.core.cache import cache 3 | from django.conf import settings 4 | from django.utils.deprecation import MiddlewareMixin 5 | from punkweb_boards.conf import settings as BOARD_SETTINGS 6 | 7 | 8 | class ActiveUserMiddleware(MiddlewareMixin): 9 | def process_request(self, request): 10 | if request.user: 11 | now = datetime.datetime.now() 12 | name = request.user.username.replace(" ", "_") 13 | cache.set("seen_%s" % (name), now, BOARD_SETTINGS.USER_LASTSEEN_TIMEOUT) 14 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/scss/components/pw-card.scss: -------------------------------------------------------------------------------- 1 | .pw-card { 2 | background-color: white; 3 | border-radius: 2px; 4 | border: 1px solid $hr; 5 | box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5); 6 | margin-bottom: 1rem; 7 | width: fit-content; 8 | 9 | &.pw-fluid { 10 | width: 100%; 11 | } 12 | } 13 | 14 | .pw-card-header { 15 | padding: 0 1rem; 16 | 17 | &.pw-bordered { 18 | border-bottom: 1px solid $hr; 19 | } 20 | } 21 | 22 | .pw-card-body { 23 | padding: 0 1rem 1rem 1rem; 24 | } 25 | 26 | .pw-card-footer { 27 | font-size: 14px; 28 | padding: 0.75rem; 29 | } 30 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example_project.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | 16 | execute_from_command_line(sys.argv) 17 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/scss/punkweb.scss: -------------------------------------------------------------------------------- 1 | @import 'punkweb_boards/scss/open-color'; 2 | @import 'punkweb_boards/scss/punkweb-theme'; 3 | @import 'punkweb_boards/scss/defaults'; 4 | @import 'punkweb_boards/scss/alignments'; 5 | @import 'punkweb_boards/scss/typography'; 6 | @import 'punkweb_boards/scss/punkweb-editor'; 7 | @import 'punkweb_boards/scss/punkweb-elements'; 8 | @import 'punkweb_boards/scss/punkweb-layout'; 9 | @import 'punkweb_boards/scss/punkweb-mobile'; 10 | 11 | @import 'punkweb_boards/scss/components/pw-button'; 12 | @import 'punkweb_boards/scss/components/pw-card'; 13 | @import 'punkweb_boards/scss/components/pw-input'; 14 | @import 'punkweb_boards/scss/components/pw-modal'; 15 | -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/unpermitted.html: -------------------------------------------------------------------------------- 1 | {% extends 'punkweb_boards/themes/punkweb/base.html' %} 2 | {% load static %} 3 | 4 | {% block title %}Unpermitted{% endblock %} 5 | {% block meta_description %}You are not authorized to view this page. Redirecting to the board index.{% endblock %} 6 | 7 | {% block content %} 8 |
9 |
10 |

11 | Unpermitted 12 |

13 |
14 | You will be redirected to the index in 2 seconds. 15 |
16 |
17 |
18 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /punkweb_boards/migrations/0004_alter_boardprofile_options_alter_userrank_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.2 on 2023-08-20 02:29 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('punkweb_boards', '0003_remove_boardprofile_metadata_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name='boardprofile', 15 | options={'ordering': ('user',)}, 16 | ), 17 | migrations.AlterField( 18 | model_name='userrank', 19 | name='id', 20 | field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/editor-config.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $(document).ready(function() { 3 | $('.post-editor').sceditor({ 4 | format: 'bbcode', 5 | icons: 'material', 6 | toolbar: 'bold,italic,underline,strike|bulletlist,orderedlist,center,horizontalrule|font,size,color,quote,code,link,image|date,time|source,maximize,removeformat', 7 | style: '/static/punkweb_boards/scss/editor.css', 8 | fonts: 'Arial,Arial Black,Comic Sans MS,Inconsolata,Courier New,Georgia,Impact,Open Sans,Montserrat,Sans-serif,Serif,Times New Roman,Trebuchet MS,Verdana', 9 | autoExpand: true, 10 | emoticonsEnabled: false, 11 | emoticonsCompat: true, 12 | emoticonsRoot: '/media/precise_bbcode/smilies/' 13 | }); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/scss/_typography.scss: -------------------------------------------------------------------------------- 1 | html, body { 2 | font-family: 'Open Sans', 'Calibri', 'sans-serif'; 3 | font-size: 16px; 4 | color: $default-text; 5 | @include normal; 6 | } 7 | 8 | h1, h2, h3, h4, h5, h6 { 9 | font-family: 'Montserrat'; 10 | font-weight: bold; 11 | letter-spacing: 1px; 12 | } 13 | 14 | @font-face { 15 | font-family: 'Inconsolata'; 16 | src: url('../fonts/Inconsolata-Regular.ttf'); 17 | font-weight: normal; 18 | font-style: normal; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Montserrat'; 23 | src: url('../fonts/Montserrat-Regular.ttf'); 24 | font-weight: normal; 25 | font-style: normal; 26 | } 27 | 28 | @font-face { 29 | font-family: 'Open Sans'; 30 | src: url('../fonts/OpenSans-Regular.ttf'); 31 | font-weight: normal; 32 | font-style: normal; 33 | } 34 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/minified/plugins/plaintext.js: -------------------------------------------------------------------------------- 1 | /* SCEditor v3.1.1 | (C) 2017, Sam Clarke | sceditor.com/license */ 2 | 3 | !function(t){"use strict";var i=t.utils,l=t.dom;t.plugins.plaintext=function(){var n=!0;this.init=function(){var t=this.commands,e=this.opts;e&&e.plaintext&&e.plaintext.addButton&&(n=e.plaintext.enabled,t.pastetext=i.extend(t.pastetext||{},{state:function(){return n?1:0},exec:function(){n=!n}}))},this.signalPasteRaw=function(t){var e;n&&(t.html&&!t.text&&((e=document.createElement("div")).innerHTML=t.html,i.each(e.querySelectorAll("p"),function(t,e){l.convertElement(e,"div")}),i.each(e.querySelectorAll("br"),function(t,e){e.nextSibling&&l.isInline(e.nextSibling,!0)||e.parentNode.removeChild(e)}),document.body.appendChild(e),t.text=e.innerText,document.body.removeChild(e)),t.html=null)}}}(sceditor); -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/page.html: -------------------------------------------------------------------------------- 1 | {% extends 'punkweb_boards/themes/punkweb/base.html' %} 2 | {% load static %} 3 | 4 | {% block title %}{{page.title}}{% endblock %} 5 | {% block meta_description %}{{page.content.rendered|striptags|truncatechars:160}}{% endblock %} 6 | 7 | {% block content %} 8 |
9 |
10 |
11 |

{{page.title}}

12 | {% if user.is_staff %} 13 | Edit Page 14 | {% endif %} 15 |
16 |
17 |
18 | {{page.content.rendered}} 19 |
20 |
21 |
22 |
23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/minified/plugins/v1compat.js: -------------------------------------------------------------------------------- 1 | /* SCEditor v3.1.1 | (C) 2017, Sam Clarke | sceditor.com/license */ 2 | 3 | !function(t,r){"use strict";var e=t.plugins;function n(c){if(c._scePatched)return c;function t(){for(var t=[],e=0;e=3.2"], 28 | install_requires=open("requirements.txt").readlines(), 29 | ) 30 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/minified/themes/content/default.min.css: -------------------------------------------------------------------------------- 1 | /*! SCEditor | (C) 2011-2013, Sam Clarke | sceditor.com/license */body,code:before,html,p,table{margin:0;padding:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;color:#111;line-height:1.25;overflow:visible}html{height:100%}.ios{overflow:auto;-webkit-overflow-scrolling:touch}.ios body{position:relative;overflow:auto}body{min-height:100%;word-wrap:break-word}body.placeholder:before{content:attr(placeholder);color:#555;font-style:italic}ol,ul{margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0}table,td{border:1px dotted #000;empty-cells:show}table td{min-width:5px}code{display:block;background:#f1f1f1;white-space:pre;padding:1em;text-align:left;margin:.25em 0;direction:ltr}blockquote{background:#fff7d9;margin:.25em 0;border-left:.3em solid #f4e59f;padding:.5em .5em .5em .75em}blockquote cite{font-weight:700;display:block;font-size:1em;margin:0 -.5em .25em -.75em;padding:0 .5em .15em .75em;border-bottom:1px solid #f4e59f}h1,h2,h3,h4,h5,h6{padding:0;margin:0}div,p{min-height:1.25em} -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/login.html: -------------------------------------------------------------------------------- 1 | {% extends 'punkweb_boards/themes/punkweb/base.html' %} 2 | {% load static %} 3 | 4 | {% block title %}Login{% endblock %} 5 | 6 | {% block content %} 7 |
8 |
9 |
10 |
11 |

Login

12 |
13 |
14 |
15 | {% csrf_token %} 16 | {{ form.as_p }} 17 | 21 |
22 |
23 |
24 |
25 |
26 | 27 | {% if user.is_authenticated %} 28 | 33 | {% endif %} 34 | {% endblock %} 35 | -------------------------------------------------------------------------------- /punkweb_boards/rest/permissions.py: -------------------------------------------------------------------------------- 1 | from rest_framework import permissions 2 | 3 | 4 | class IsTargetUser(permissions.BasePermission): 5 | def has_object_permission(self, request, view, obj): 6 | if request.user.profile.is_banned: 7 | return False 8 | 9 | if request.method in permissions.SAFE_METHODS: 10 | return True 11 | 12 | return request.user == obj 13 | 14 | 15 | class BelongsToUser(permissions.BasePermission): 16 | def has_permission(self, request, view): 17 | if request.user.is_authenticated and request.user.profile.is_banned: 18 | return False 19 | 20 | if request.method in permissions.SAFE_METHODS: 21 | return True 22 | 23 | return request.user.is_authenticated 24 | 25 | def has_object_permission(self, request, view, obj): 26 | if request.user.profile.is_banned: 27 | return False 28 | 29 | if request.method in permissions.SAFE_METHODS: 30 | return True 31 | 32 | return request.user.is_authenticated and request.user == obj.user 33 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/minified/plugins/format.js: -------------------------------------------------------------------------------- 1 | /* SCEditor v3.1.1 | (C) 2017, Sam Clarke | sceditor.com/license */ 2 | 3 | !function(i){"use strict";i.plugins.format=function(){var n,a,c={p:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",address:"Address",pre:"Preformatted Text"};this.init=function(){var e=this.opts,t=e.paragraphformat;e.format&&"bbcode"===e.format||(t&&(t.tags&&(c=t.tags),t.excludeTags&&t.excludeTags.forEach(function(e){delete c[e]})),this.commands.format||(this.commands.format={exec:a,txtExec:a,tooltip:"Format Paragraph"}),e.toolbar===i.defaultOptions.toolbar&&(e.toolbar=e.toolbar.replace(",color,",",color,format,")))},n=function(e,t){e.sourceMode()?e.insert("<"+t+">",""):e.execCommand("formatblock","<"+t+">")},a=function(e){var o=this,r=document.createElement("div");i.utils.each(c,function(t,a){var e=document.createElement("a");e.className="sceditor-option",e.textContent=a.name||a,e.addEventListener("click",function(e){o.closeDropDown(!0),a.exec?a.exec(o):n(o,t),e.preventDefault()}),r.appendChild(e)}),o.createDropDown(e,"format",r)}}}(sceditor); -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/register.html: -------------------------------------------------------------------------------- 1 | {% extends 'punkweb_boards/themes/punkweb/base.html' %} 2 | {% load static %} 3 | 4 | {% block title %}Sign up{% endblock %} 5 | {% block meta_description %}Board registration/signup{% endblock %} 6 | 7 | {% block content %} 8 |
9 |
10 |
11 |
12 |

Sign Up

13 |
14 |
15 |
16 | {% csrf_token %} 17 | {{ form.as_p }} 18 | 22 |
23 |
24 |
25 |
26 |
27 | 28 | {% if user.is_authenticated %} 29 | 34 | {% endif %} 35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/page_not_found.html: -------------------------------------------------------------------------------- 1 | {% extends 'punkweb_boards/themes/punkweb/base.html' %} 2 | {% load static %} 3 | 4 | {% block title %}Page Not Found{% endblock %} 5 | {% block meta_description %}Requested page was not found{% endblock %} 6 | 7 | {% block extrascript %} 8 | 9 | {% endblock %} 10 | 11 | {% block content %} 12 |
13 |
14 |
15 |
16 |
17 |

Not Found

18 |
19 |
20 |

The page you have requested was not found, it may have been moved or deleted.

21 | 22 | Home 23 |
24 |
25 |
26 |
27 |
28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/minified/plugins/autoyoutube.js: -------------------------------------------------------------------------------- 1 | /* SCEditor v3.1.1 | (C) 2017, Sam Clarke | sceditor.com/license */ 2 | 3 | !function(a,n){"use strict";var c=n.dom,d=/(^|\s)(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/watch\?v=)([^"&?\/ ]{11})(?:\&[\&_\?0-9a-z\#]+)?(\s|$)/i;function l(e){return''}n.plugins.autoyoutube=function(){this.signalPasteRaw=function(e){var t;c.closest(this.currentNode(),"code")||(e.html||e.text)&&((t=a.createElement("div")).innerHTML=e.html||n.escapeEntities(e.text),function e(t,n){var r,i,o=t.firstChild,s=t.textContent||"",u=(s=n?s.trim():s).match(d);if(s===s.trim()&&u&&u[0].length===s.length)return c.removeAttr(t,"style"),c.removeAttr(t,"class"),void(t.innerHTML=l(u[2]));for(;o;)3===o.nodeType?(r=o.nodeValue,i=o.parentNode,(u=r.match(d))&&(i.insertBefore(a.createTextNode(r.substr(0,u.index)+u[1]),o),i.insertBefore(c.parseHTML(l(u[2])),o),o.nodeValue=u[3]+r.substr(u.index+u[0].length))):c.is(o,"code")||e(o),o=o.nextSibling}(t,!0),e.html=t.innerHTML)}}}(document,sceditor); -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/scss/components/pw-input.scss: -------------------------------------------------------------------------------- 1 | @mixin pw-input-base { 2 | background: transparent; 3 | border: 2px solid $hr; 4 | border-radius: 4px; 5 | font-family: "Open Sans"; 6 | font-size: 16px; 7 | outline: none; 8 | padding: 0.5rem 1rem; 9 | transition: all 0.1s ease-in-out; 10 | 11 | @include placeholder { 12 | color: $oc-gray-6; 13 | } 14 | 15 | &:disabled { 16 | cursor: not-allowed; 17 | } 18 | 19 | &.pw-fluid { 20 | width: 100%; 21 | } 22 | } 23 | 24 | .pw-input { 25 | @include pw-input-base; 26 | 27 | &:hover { 28 | border: 2px solid $oc-gray-6; 29 | } 30 | 31 | &:focus, 32 | &:active { 33 | border: 2px solid $primary; 34 | } 35 | 36 | &:user-invalid { 37 | border: 2px solid $warn; 38 | } 39 | } 40 | 41 | .pw-input-filled { 42 | @include pw-input-base; 43 | background: $oc-gray-1; 44 | 45 | &:hover { 46 | background: $oc-gray-3; 47 | border: 2px solid $oc-gray-6; 48 | } 49 | 50 | &:focus, 51 | &:active { 52 | background: $oc-gray-3; 53 | border: 2px solid $primary; 54 | } 55 | 56 | &:user-invalid { 57 | border-bottom: 2px solid $warn; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /punkweb_boards/context_processors.py: -------------------------------------------------------------------------------- 1 | from punkweb_boards.conf import settings as BOARD_SETTINGS 2 | from punkweb_boards.models import Report 3 | 4 | 5 | def settings(request): 6 | return { 7 | "BOARD_SETTINGS": { 8 | "BOARD_NAME": BOARD_SETTINGS.BOARD_NAME, 9 | "BOARD_THEME": BOARD_SETTINGS.BOARD_THEME, 10 | "SHOUTBOX_ENABLED": BOARD_SETTINGS.SHOUTBOX_ENABLED, 11 | "SIGNATURES_ENABLED": BOARD_SETTINGS.SIGNATURES_ENABLED, 12 | "USER_BIRTHDAY_MESSAGE": BOARD_SETTINGS.USER_BIRTHDAY_MESSAGE, 13 | } 14 | } 15 | 16 | 17 | def base_context(request): 18 | ctx = {} 19 | if request.user.is_authenticated and not request.user.profile.is_banned: 20 | ctx.update({"notifications": request.user.notifications.all()[:5]}) 21 | ctx.update({"unread_conversations": request.user.unread_conversations.count()}) 22 | ctx.update( 23 | { 24 | "unread_notifications": request.user.notifications.filter( 25 | read=False 26 | ).count() 27 | } 28 | ) 29 | if request.user.is_staff: 30 | unresolved_reports = Report.objects.filter(resolved=False).count() 31 | ctx.update({"unresolved_reports": unresolved_reports}) 32 | return ctx 33 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/minified/plugins/autosave.js: -------------------------------------------------------------------------------- 1 | /* SCEditor v3.1.1 | (C) 2017, Sam Clarke | sceditor.com/license */ 2 | 3 | !function(e){"use strict";var t="sce-autodraft-"+location.pathname+location.search;function c(e){localStorage.removeItem(e||t)}e.plugins.autosave=function(){var a,e=this,o=!1,r=t,n=864e5,s=function(e){localStorage.setItem(r,JSON.stringify(e))},i=function(){return JSON.parse(localStorage.getItem(r))};e.init=function(){var e=(a=this).opts&&a.opts.autosave||{};s=e.save||s,i=e.load||i,r=e.storageKey||r,n=e.expires||n,function(){for(var e=0;e 9 |
10 |
11 |
12 |
Profile Settings
13 |
14 |
15 | 20 |
21 |
22 |
23 | 24 |
25 |
26 |
27 |
28 |
29 | {% csrf_token %} 30 | {{ form.as_p }} 31 | 32 |
33 |
34 |
35 |
36 |
37 | {% endblock %} 38 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/minified/plugins/alternative-lists.js: -------------------------------------------------------------------------------- 1 | /* SCEditor v3.1.1 | (C) 2017, Sam Clarke | sceditor.com/license */ 2 | 3 | !function(n){"use strict";var e=n.utils;n.plugins["alternative-lists"]=function(){var l,i,s;this.init=function(){var t=this.opts;t.format&&"bbcode"!==t.format||(n.command.get("orderedlist").txtExec=i,n.command.get("bulletlist").txtExec=l,n.formats.bbcode.set("list",{breakStart:!0,isInline:!1,skipLastLineBreak:!0,html:function(t,l,i){var s="disc",e=null;return"function"==typeof(e=("1"===(s=l.defaultattr?l.defaultattr:s)?n.formats.bbcode.get("ol"):n.formats.bbcode.get("ul")).html)?e.call(this,t,l,i):(t.attrs[0]=i,n.formats.bbcode.formatBBCodeString(e,t.attrs))}}),n.formats.bbcode.set("ul",{tags:{ul:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[list]{0}[/list]",html:"
    {0}
"}),n.formats.bbcode.set("ol",{tags:{ol:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[list=1]{0}[/list]",html:"
    {0}
"}),n.formats.bbcode.set("li",{tags:{li:null},isInline:!1,closedBy:["/ul","/ol","/list","*","li"],format:"[*]{0}",html:"
  • {0}
  • "}),n.formats.bbcode.set("*",{isInline:!1,excludeClosing:!0,closedBy:["/ul","/ol","/list","*","li"],html:"
  • {0}
  • "}))},s=function(t,l,i){var s="";e.each(i.split(/\r?\n/),function(t){s+=(s?"\n":"")+"[*]"+t}),""===l?t.insertText("[list]\n"+s+"\n[/list]"):t.insertText("[list="+l+"]\n"+s+"\n[/list]")},i=function(t,l){s(this,"1",l)},l=function(t,l){s(this,"",l)}}}(sceditor); -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/post_update_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'punkweb_boards/themes/punkweb/base.html' %} 2 | 3 | {% block title %}Update Post{% endblock %} 4 | 5 | {% block content %} 6 | 24 |
    25 |
    26 |
    27 |
    28 |

    Update {{obj}}

    29 |
    30 |
    31 |
    32 | {% csrf_token %} 33 | {{ form.as_p }} 34 | 35 |
    36 |
    37 |
    38 |
    39 |
    40 | {% endblock %} 41 | -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/thread_create_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'punkweb_boards/themes/punkweb/base.html' %} 2 | 3 | {% block title %}Create Thread{% endblock %} 4 | {% block meta_description %}Create a thread in {{subcategory.name}}{% endblock %} 5 | 6 | {% block content %} 7 | 24 |
    25 |
    26 |
    27 |
    28 |

    Create New Thread

    29 |
    30 |
    31 |
    32 | {% csrf_token %} 33 | {{ form.as_p }} 34 | 35 |
    36 |
    37 |
    38 |
    39 |
    40 | {% endblock %} 41 | -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/thread_update_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'punkweb_boards/themes/punkweb/base.html' %} 2 | 3 | {% block title %}Update Thread{% endblock %} 4 | 5 | {% block content %} 6 | 24 |
    25 |
    26 |
    27 |
    28 |

    Update {{object.title}} by {{object.user.username}}

    29 |
    30 |
    31 |
    32 | {% csrf_token %} 33 | {{ form.as_p }} 34 | 35 |
    36 |
    37 |
    38 |
    39 |
    40 | {% endblock %} 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2022, Punkweb 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /punkweb_boards/conf/settings.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | 3 | SETTINGS_OVERRIDES = getattr(settings, "PUNKWEB_BOARDS", {}) 4 | 5 | BOARD_NAME = SETTINGS_OVERRIDES.get("BOARD_NAME", "Punkweb Boards") 6 | 7 | # Theme (punkweb) 8 | BOARD_THEME = SETTINGS_OVERRIDES.get("BOARD_THEME", "punkweb") 9 | 10 | # Display user signatures and allow users to set them in profile settings 11 | SIGNATURES_ENABLED = SETTINGS_OVERRIDES.get("SIGNATURES_ENABLED", True) 12 | 13 | USERNAME_MODIFIERS_ENABLED = SETTINGS_OVERRIDES.get("USERNAME_MODIFIERS_ENABLED", True) 14 | 15 | # Happy birthday message only the user can see 16 | USER_BIRTHDAY_MESSAGE = SETTINGS_OVERRIDES.get("USER_BIRTHDAY_MESSAGE", True) 17 | 18 | # Shoutbox settings 19 | SHOUTBOX_ENABLED = SETTINGS_OVERRIDES.get("SHOUTBOX_ENABLED", True) 20 | SHOUTBOX_MINIMUM_POSTS = SETTINGS_OVERRIDES.get("SHOUTBOX_MINIMUM_POSTS", False) 21 | SHOUTBOX_MINIMUM_POSTS_REQ = SETTINGS_OVERRIDES.get("SHOUTBOX_MINIMUM_POSTS_REQ", 5) 22 | SHOUTBOX_DISABLED_TAGS = SETTINGS_OVERRIDES.get( 23 | "SHOUTBOX_DISABLED_TAGS", 24 | [ 25 | "img", 26 | "hr", 27 | "ol", 28 | "ul", 29 | "li", 30 | "youtube", 31 | "code", 32 | "user", 33 | "quote", 34 | "size", 35 | "spoiler", 36 | "anchor", 37 | "n", 38 | "y", 39 | "list", 40 | "*", 41 | "center", 42 | ], 43 | ) 44 | 45 | # Number of seconds of inactivity before a user is marked offline 46 | USER_ONLINE_TIMEOUT = SETTINGS_OVERRIDES.get("USER_ONLINE_TIMEOUT", 300) 47 | 48 | # Number of seconds that we will keep track of inactive users for before 49 | # their last seen is removed from the cache 50 | USER_LASTSEEN_TIMEOUT = SETTINGS_OVERRIDES.get( 51 | "USER_LASTSEEN_TIMEOUT", 60 * 60 * 24 * 14 52 | ) 53 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/development/themes/content/default.css: -------------------------------------------------------------------------------- 1 | /*! SCEditor | (C) 2011-2013, Sam Clarke | sceditor.com/license */ 2 | html, body, p, code:before, table { 3 | margin: 0; 4 | padding: 0; 5 | font-family: Verdana, Arial, Helvetica, sans-serif; 6 | font-size: 14px; 7 | color: #111; 8 | line-height: 1.25; 9 | overflow: visible; 10 | } 11 | html { 12 | height: 100%; 13 | } 14 | .ios { 15 | /* Needed for iOS scrolling bug fix */ 16 | overflow: auto; 17 | -webkit-overflow-scrolling: touch; 18 | } 19 | .ios body { 20 | /* Needed for iOS scrolling bug fix */ 21 | position: relative; 22 | overflow: auto; 23 | } 24 | body { 25 | /* Needed to make sure body covers the whole editor and that 26 | long lines don't cause horizontal scrolling */ 27 | min-height: 100%; 28 | word-wrap: break-word; 29 | } 30 | 31 | body.placeholder::before { 32 | content: attr(placeholder); 33 | color: #555; 34 | font-style: italic; 35 | } 36 | 37 | ul, ol { 38 | margin-top: 0; 39 | margin-bottom: 0; 40 | padding-top: 0; 41 | padding-bottom: 0; 42 | } 43 | 44 | table, td { 45 | border: 1px dotted #000; 46 | empty-cells: show; 47 | } 48 | 49 | table td { 50 | min-width: 5px; 51 | } 52 | 53 | code { 54 | display: block; 55 | background: #f1f1f1; 56 | white-space: pre; 57 | padding: 1em; 58 | text-align: left; 59 | margin: .25em 0; 60 | direction: ltr; 61 | } 62 | 63 | blockquote { 64 | background: #fff7d9; 65 | margin: .25em 0; 66 | border-left: .3em solid #f4e59f; 67 | padding: .5em .5em .5em .75em; 68 | } 69 | blockquote cite { 70 | font-weight: bold; 71 | display: block; 72 | font-size: 1em; 73 | margin: 0 -.5em .25em -.75em; 74 | padding: 0 .5em .15em .75em; 75 | border-bottom: 1px solid #f4e59f; 76 | } 77 | 78 | h1, h2, h3, h4, h5, h6 { 79 | padding: 0; margin: 0; 80 | } 81 | 82 | /* Prevent empty paragraphs from collapsing */ 83 | div, p { 84 | min-height: 1.25em; 85 | } 86 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/scss/_punkweb-editor.scss: -------------------------------------------------------------------------------- 1 | .sceditor-container { 2 | background: $editor-container; 3 | border: 1px solid $editor-border; 4 | color: $editor-text; 5 | width: 100% !important; 6 | } 7 | .sceditor-container iframe, 8 | .sceditor-container textarea { 9 | background: $editor-container; 10 | color: $editor-text; 11 | } 12 | div.sceditor-toolbar { 13 | background: $editor-toolbar; 14 | } 15 | div.sceditor-group { 16 | background: $editor-toolbar-group; 17 | border-color: $oc-gray-4 !important; 18 | } 19 | .sceditor-button:hover, 20 | .sceditor-button:active, 21 | .sceditor-button.active { 22 | background: $editor-toolbar-group-hover; 23 | } 24 | .sceditor-button:active { 25 | background: $editor-toolbar-group-hover; 26 | } 27 | 28 | div.sceditor-dropdown { 29 | border: 1px solid $editor-border; 30 | background: $editor-container; 31 | color: $editor-text; 32 | } 33 | .sceditor-dropdown a:hover { 34 | background: $editor-border; 35 | } 36 | div.sceditor-dropdown a, 37 | div.sceditor-dropdown a:link { 38 | color: $editor-text; 39 | } 40 | div.sceditor-dropdown label { 41 | color: $editor-text; 42 | } 43 | div.sceditor-dropdown input, 44 | div.sceditor-dropdown textarea { 45 | border: 1px solid $editor-border; 46 | border-top-color: $editor-border; 47 | } 48 | div.sceditor-dropdown input:focus, 49 | div.sceditor-dropdown textarea:focus { 50 | border-color: lighten($editor-border, 25%); 51 | border-top-color: lighten($editor-border, 25%); 52 | } 53 | div.sceditor-dropdown .button { 54 | color: $editor-button-text; 55 | background: $editor-button; 56 | border: solid 1px $editor-button-border; 57 | } 58 | div.sceditor-dropdown .button:hover { 59 | background: $editor-button-hover; 60 | } 61 | .sceditor-color-option { 62 | border: 1px solid $editor-container; 63 | } 64 | .sceditor-color-option:hover { 65 | border: 1px solid white; 66 | } 67 | .sceditor-button { 68 | background: $editor-button; 69 | } 70 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | 3 | ### Sqlite database 4 | *.sqlite3 5 | *.pyc 6 | npm-debug.log 7 | __pycache__/ 8 | 9 | 10 | ### Python template 11 | # Byte-compiled / optimized / DLL files 12 | __pycache__/ 13 | *.py[cod] 14 | 15 | # C extensions 16 | *.so 17 | 18 | # Distribution / packaging 19 | .Python 20 | env/ 21 | build/ 22 | develop-eggs/ 23 | dist/ 24 | eggs/ 25 | lib/ 26 | lib64/ 27 | parts/ 28 | sdist/ 29 | var/ 30 | *.egg-info/ 31 | .installed.cfg 32 | *.egg 33 | 34 | # PyInstaller 35 | # Usually these files are written by a python script from a template 36 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 37 | *.manifest 38 | *.spec 39 | 40 | # Installer logs 41 | pip-log.txt 42 | pip-delete-this-directory.txt 43 | 44 | # Unit test / coverage reports 45 | htmlcov/ 46 | .tox/ 47 | .coverage 48 | .cache 49 | nosetests.xml 50 | coverage.xml 51 | 52 | # Translations 53 | *.mo 54 | *.pot 55 | 56 | # Django stuff: 57 | *.log 58 | log.txt 59 | 60 | # Sphinx documentation 61 | docs/_build/ 62 | 63 | # PyBuilder 64 | target/ 65 | 66 | # IDEA editor config directory 67 | .idea/ 68 | 69 | 70 | ### OSX ### 71 | .DS_Store 72 | .AppleDouble 73 | .LSOverride 74 | 75 | # Icon must end with two \r 76 | Icon 77 | 78 | 79 | # Thumbnails 80 | ._* 81 | 82 | # Files that might appear on external disk 83 | .Spotlight-V100 84 | .Trashes 85 | 86 | # Directories potentially created on remote AFP share 87 | .AppleDB 88 | .AppleDesktop 89 | Network Trash Folder 90 | Temporary Items 91 | .apdisk 92 | 93 | 94 | ### Windows ### 95 | # Windows image file caches 96 | Thumbs.db 97 | ehthumbs.db 98 | 99 | # Folder config file 100 | Desktop.ini 101 | 102 | # Recycle Bin used on file shares 103 | $RECYCLE.BIN/ 104 | 105 | # Windows Installer files 106 | *.cab 107 | *.msi 108 | *.msm 109 | *.msp 110 | 111 | # Windows shortcuts 112 | *.lnk 113 | 114 | 115 | ### Linux ### 116 | *~ 117 | 118 | # KDE directory preferences 119 | .directory 120 | .python-version 121 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/ui/modal.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $(document).ready(function() { 3 | // This script adds functionality to elements with data-role="modal" and data-role="modal-open" attributes. 4 | // Elements with these roles should also have a data-modal-id attribute that match. 5 | 6 | var openers = $('[data-role="modal-open"]'); 7 | var modals = $('[data-role="modal"]'); 8 | 9 | function getOpener(modalId) { 10 | return openers.filter('[data-modal-id=' + modalId + ']'); 11 | } 12 | 13 | function getModal(modalId) { 14 | return modals.filter('[data-modal-id=' + modalId + ']'); 15 | } 16 | 17 | function openModal(modalId) { 18 | getModal(modalId).show(100, 'swing', function() {}); 19 | } 20 | 21 | function closeModal(modalId) { 22 | getModal(modalId).hide(100, 'swing', function() {}); 23 | } 24 | 25 | function setPointer(opener) { 26 | opener.css({ 27 | 'cursor': 'pointer', 28 | }); 29 | } 30 | 31 | // Close modal if backdrop with valid id is clicked. 32 | $(window).click(function(e) { 33 | var roleAttr = e.target.attributes['data-role']; 34 | var hasRoleAttr = !!roleAttr; 35 | var roleValue = hasRoleAttr ? roleAttr.value : undefined; 36 | if (roleValue == 'modal') { 37 | var modalIdAttr = e.target.attributes['data-modal-id']; 38 | var hasModalIdAttr = !!modalIdAttr; 39 | var modalIdValue = hasModalIdAttr ? modalIdAttr.value : undefined; 40 | closeModal(modalIdValue); 41 | } 42 | }); 43 | 44 | // Open modal with the corresponding "data-modal-id" attribute. 45 | openers.each(function() { 46 | var self = $(this); 47 | setPointer(self); 48 | self.click(function() { 49 | openModal(self.attr('data-modal-id')); 50 | }); 51 | }); 52 | 53 | modals.each(function() { 54 | var self = $(this); 55 | if (self.attr('data-init-open') === "true") { 56 | openModal(self.attr('data-modal-id')); 57 | } 58 | }); 59 | }); 60 | }); 61 | -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/post_delete_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'punkweb_boards/themes/punkweb/base.html' %} 2 | {% load static %} 3 | 4 | {% block title %}Delete Post{% endblock %} 5 | 6 | {% block extrascript %} 7 | 8 | {% endblock %} 9 | 10 | {% block content %} 11 | 29 |
    30 |
    31 |
    32 |
    33 |
    34 |

    Delete {{object}}

    35 |
    36 |
    37 |
    {% csrf_token %} 38 |

    Are you sure you want to delete this post?

    39 |
    40 | 41 | 42 |
    43 |
    44 |
    45 |
    46 |
    47 |
    48 |
    49 | {% endblock %} 50 | -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/thread_delete_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'punkweb_boards/themes/punkweb/base.html' %} 2 | {% load static %} 3 | 4 | {% block title %}Delete Thread{% endblock %} 5 | 6 | {% block extrascript %} 7 | 8 | {% endblock %} 9 | 10 | {% block content %} 11 | 29 |
    30 |
    31 |
    32 |
    33 |
    34 |

    Delete {{object.title}} by {{object.user.username}}

    35 |
    36 |
    37 |
    {% csrf_token %} 38 |

    Are you sure you want to delete this thread?

    39 |
    40 | 41 | 42 |
    43 |
    44 |
    45 |
    46 |
    47 |
    48 |
    49 | {% endblock %} 50 | -------------------------------------------------------------------------------- /punkweb_boards/migrations/0003_remove_boardprofile_metadata_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0.1 on 2022-02-19 00:13 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 11 | ('punkweb_boards', '0002_boardprofile_metadata'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='boardprofile', 17 | name='metadata', 18 | ), 19 | migrations.AlterField( 20 | model_name='boardprofile', 21 | name='downvoted_by', 22 | field=models.ManyToManyField(blank=True, related_name='%(app_label)s_%(class)s_downvoted', to=settings.AUTH_USER_MODEL), 23 | ), 24 | migrations.AlterField( 25 | model_name='boardprofile', 26 | name='upvoted_by', 27 | field=models.ManyToManyField(blank=True, related_name='%(app_label)s_%(class)s_upvoted', to=settings.AUTH_USER_MODEL), 28 | ), 29 | migrations.AlterField( 30 | model_name='post', 31 | name='downvoted_by', 32 | field=models.ManyToManyField(blank=True, related_name='%(app_label)s_%(class)s_downvoted', to=settings.AUTH_USER_MODEL), 33 | ), 34 | migrations.AlterField( 35 | model_name='post', 36 | name='upvoted_by', 37 | field=models.ManyToManyField(blank=True, related_name='%(app_label)s_%(class)s_upvoted', to=settings.AUTH_USER_MODEL), 38 | ), 39 | migrations.AlterField( 40 | model_name='thread', 41 | name='downvoted_by', 42 | field=models.ManyToManyField(blank=True, related_name='%(app_label)s_%(class)s_downvoted', to=settings.AUTH_USER_MODEL), 43 | ), 44 | migrations.AlterField( 45 | model_name='thread', 46 | name='upvoted_by', 47 | field=models.ManyToManyField(blank=True, related_name='%(app_label)s_%(class)s_upvoted', to=settings.AUTH_USER_MODEL), 48 | ), 49 | ] 50 | -------------------------------------------------------------------------------- /example_project/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for example_project project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/4.2/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | from django.conf import settings 18 | from django.conf.urls.static import static 19 | from django.contrib import admin 20 | from django.urls import include, path 21 | from rest_framework import routers 22 | from punkweb_boards.rest.views import ( 23 | BoardProfileViewSet, 24 | CategoryViewSet, 25 | SubcategoryViewSet, 26 | ThreadViewSet, 27 | PostViewSet, 28 | ConversationViewSet, 29 | MessageViewSet, 30 | ShoutViewSet, 31 | ) 32 | 33 | router = routers.DefaultRouter() 34 | 35 | router.register(r"board/categories", CategoryViewSet, basename="categories") 36 | router.register(r"board/subcategories", SubcategoryViewSet, basename="subcategories") 37 | router.register(r"board/threads", ThreadViewSet, basename="threads") 38 | router.register(r"board/posts", PostViewSet, basename="posts") 39 | router.register(r"board/conversations", ConversationViewSet, basename="conversations") 40 | router.register(r"board/messages", MessageViewSet, basename="messages") 41 | router.register(r"board/shouts", ShoutViewSet, basename="shouts") 42 | router.register(r"board/profiles", BoardProfileViewSet, basename="profiles") 43 | 44 | urlpatterns = [ 45 | path("admin/", admin.site.urls), 46 | path("board/", include("punkweb_boards.urls")), 47 | path("api/", include(router.urls)), 48 | path("api-auth/", include("rest_framework.urls", namespace="rest_framework")), 49 | ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 50 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/scss/components/pw-modal.scss: -------------------------------------------------------------------------------- 1 | .pw-modal { 2 | position: fixed; 3 | z-index: 101; 4 | top: 0; 5 | left: 0; 6 | width: 100%; 7 | height: 100%; 8 | padding: 3rem; 9 | background-color: $oc-gray-9; 10 | background-color: rgba($oc-gray-9, 0.7); 11 | 12 | &--no-backdrop { 13 | background-color: transparent; 14 | } 15 | 16 | &__content { 17 | margin: 0 auto; 18 | z-index: 60; 19 | overflow: auto; 20 | max-width: 1440px; 21 | min-width: 280px; 22 | max-height: 100%; 23 | min-height: 50px; 24 | border-radius: 4px; 25 | padding: 24px; 26 | background-color: #ffffff; 27 | box-shadow: 0 3px 9px 0 rgba(0, 0, 0, 0.5); 28 | } 29 | 30 | &__close { 31 | position: absolute; 32 | right: 0.5rem; 33 | top: 0.5rem; 34 | z-index: 100; 35 | } 36 | } 37 | 38 | @media only screen and (max-width: 840px) { 39 | .pw-modal { 40 | padding: 1rem 0; 41 | 42 | &__content { 43 | margin: 0 1rem; 44 | width: auto !important; 45 | } 46 | } 47 | } 48 | 49 | @keyframes scaleIn { 50 | from { 51 | opacity: 0; 52 | transform: scale(0.9); 53 | } 54 | 55 | to { 56 | opacity: 1; 57 | transform: scale(1); 58 | } 59 | } 60 | 61 | @keyframes slideInTop { 62 | 0% { 63 | transform: translateY(-100vh); 64 | } 65 | 66 | 70% { 67 | transform: translateY(5vh); 68 | } 69 | 70 | 100% { 71 | transform: translateY(0px); 72 | } 73 | } 74 | 75 | @keyframes slideInBottom { 76 | 0% { 77 | transform: translateY(100vh); 78 | } 79 | 80 | 70% { 81 | transform: translateY(-5vh); 82 | } 83 | 84 | 100% { 85 | transform: translateY(0px); 86 | } 87 | } 88 | 89 | @keyframes slideInLeft { 90 | 0% { 91 | transform: translateX(-100vw); 92 | } 93 | 94 | 70% { 95 | transform: translateX(5vw); 96 | } 97 | 98 | 100% { 99 | transform: translateX(0px); 100 | } 101 | } 102 | 103 | @keyframes slideInRight { 104 | 0% { 105 | transform: translateX(100vw); 106 | } 107 | 108 | 70% { 109 | transform: translateX(-5vw); 110 | } 111 | 112 | 100% { 113 | transform: translateX(0px); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/et.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | 4 | sceditor.locale['et'] = { 5 | 'Bold': 'Rasvane', 6 | 'Italic': 'Kaldkiri', 7 | 'Underline': 'Allajoonitud', 8 | 'Strikethrough': 'Läbijoonitud', 9 | 'Subscript': 'Allindeks', 10 | 'Superscript': 'Ülaindeks', 11 | 'Align left': 'Joonad vasakule', 12 | 'Center': 'Joonda keskele', 13 | 'Align right': 'Joonda paremale', 14 | 'Justify': 'Joondus mõlemale poole', 15 | 'Font Name': 'Fondi nimi', 16 | 'Font Size': 'Fondi suurus', 17 | 'Font Color': 'Fondi värv', 18 | 'Remove Formatting': 'Eemalda vormindus', 19 | 'Cut': 'Lõika', 20 | 'Sinu veebilehitseja ei luba lõikamise käsu kasutamist. Palun kasuta kiirklahvi Ctrl/Cmd-X': '... Ctrl / Cmd-X', 21 | 'Copy': 'Kopeeri', 22 | 'Sinu veebilehitseja ei luba kopeerimise käsu kasutamist. Palun kasuta kiirklahvi Ctrl/Cmd-C': '... Ctrl / Cmd-C', 23 | 'Paste': 'Aseta', 24 | 'Sinu veebilehitseja ei luba asetamise käsu kasutamist. Palun kasuta kiirklahvi Ctrl/Cmd-V': '... Ctrl / Cmd-V', 25 | 'Paste your text inside the following box:': 'Aseta oma tekst järgneva tekstikasti sisse', 26 | 'Paste Text': 'Aseta tekstina', 27 | 'Bullet list': 'Nimekiri', 28 | 'Numbered list': 'Nummerdatud nimekiri', 29 | 'Undo': 'Samm tagasi', 30 | 'Redo': 'Samm edasi', 31 | 'Rows:': 'Read', 32 | 'Cols:': 'Veerud', 33 | 'Insert a table': 'Sisesta tabel', 34 | 'Insert a horizontal rule': 'Sisesta horisontaalne joon', 35 | 'Code': 'Kood', 36 | 'Insert a Quote': 'Sisesta tsitaat', 37 | 'Width (optional):': 'Laius (Valikuline)', 38 | 'Height (optional):': 'Kõrgus (Valikuline)', 39 | 'Insert an image': 'Sisesta pilt', 40 | 'E-mail:': 'E-post', 41 | 'Insert an email': 'Sisesta e-posti aadress', 42 | 'URL:': 'Link', 43 | 'Insert a link': 'Sisesta link', 44 | 'Unlink': 'Eemalda link', 45 | 'More': 'Veel', 46 | 'Insert an emoticon': 'Sisesta emotikon', 47 | 'Video URL:': 'Video link', 48 | 'Insert': 'Sisesta', 49 | 'Insert a YouTube video': 'Sisesta YouTube video', 50 | 'Insert current date': 'Sisesta praegune kuupäev', 51 | 'Insert current time': 'Sisesta praegune kellaaeg', 52 | 'Print': 'Prindi', 53 | 'View source': 'Vaata lähtekoodi', 54 | 55 | dateFormat: 'day.month.year' 56 | }; 57 | })(); 58 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/scss/_punkweb-theme.scss: -------------------------------------------------------------------------------- 1 | $primary: $oc-indigo-9; 2 | $primary-link: $oc-indigo-9; 3 | $primary-hover: $oc-indigo-1; 4 | $primary-active: $oc-indigo-2; 5 | 6 | $accent: $oc-green-9; 7 | $accent-hover: $oc-green-1; 8 | $accent-active: $oc-green-2; 9 | 10 | $warn: $oc-red-9; 11 | $warn-hover: $oc-red-1; 12 | $warn-active: $oc-red-2; 13 | 14 | $default-text-on-light: $oc-gray-9; 15 | $default-text-on-dark: $oc-gray-0; 16 | $default-text: $default-text-on-light; 17 | 18 | $body-background: $oc-gray-1; 19 | 20 | $upper-nav: $oc-gray-9; 21 | $upper-nav-link: $default-text-on-dark; 22 | 23 | $main-nav: mix(black, $primary, 10%); 24 | $main-nav-title: $default-text-on-dark; 25 | $main-nav-text: $default-text-on-dark; 26 | $main-nav-link: $default-text-on-dark; 27 | 28 | $page-header: mix(black, $primary, 20%); 29 | $page-header-text: $default-text-on-dark; 30 | 31 | $breadcrumb-active: $default-text-on-dark; 32 | $breadcrumb-separator: darken($default-text-on-dark, 20%); 33 | $breadcrumb-link: $default-text-on-dark; 34 | 35 | $hr: $oc-gray-4; 36 | 37 | $badge-background: $oc-red-9; 38 | $badge-text: $oc-white; 39 | 40 | $dropdown: mix(black, $primary, 65%); 41 | $dropdown-shadow: 0px .5rem 1rem 0px rgba(0, 0, 0, 0.2); 42 | 43 | $card-header: mix(black, $primary, 30%); 44 | $card-title: $default-text-on-dark; 45 | $card-body: $oc-gray-0; 46 | $card-text: $default-text-on-light; 47 | $card-footer: mix(black, $primary, 40%); 48 | $card-opacity: 1; 49 | 50 | $table-header: $oc-white; 51 | $table-header-text: $default-text-on-light; 52 | $table-header-link: $default-text-on-light; 53 | $table-body: $oc-white; 54 | $table-body-text: $default-text-on-light; 55 | $table-body-link: $primary-link; 56 | 57 | $footer: $primary; 58 | $footer-text: $default-text-on-dark; 59 | $footer-link: $oc-gray-3; 60 | 61 | $input-placeholder: darken($default-text-on-dark, 15%); 62 | 63 | $editor-container: $oc-gray-1; 64 | $editor-text: $default-text-on-light; 65 | $editor-border: desaturate($primary, 25%); 66 | $editor-toolbar: $oc-white; 67 | $editor-toolbar-group: $oc-white; 68 | $editor-toolbar-group-hover: lighten($body-background, 70%); 69 | $editor-button: $oc-white; 70 | $editor-button-hover: lighten($body-background, 5%); 71 | $editor-button-text: $default-text-on-dark; 72 | $editor-button-border: desaturate($primary, 25%); 73 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/cn.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author 3 | * @license [MIT](http://www.opensource.org/licenses/mit-license.php) 4 | */ 5 | (function () { 6 | 'use strict'; 7 | 8 | sceditor.locale['cn'] = { 9 | 'Bold': '粗体', 10 | 'Italic': '斜体', 11 | 'Underline': '下划线', 12 | 'Strikethrough': '删除线', 13 | 'Subscript': '下标', 14 | 'Superscript': '上标', 15 | 'Align left': '靠左对齐', 16 | 'Center': '置中', 17 | 'Align right': '靠右对齐', 18 | 'Justify': '两端对齐', 19 | 'Font Name': '字体', 20 | 'Font Size': '字号', 21 | 'Font Color': '字色', 22 | 'Remove Formatting': '格式清除', 23 | 'Cut': '剪切', 24 | 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': '您的浏览器不支持剪切命令,请使用快捷键 Ctrl/Cmd-X', 25 | 'Copy': '拷贝', 26 | 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': '您的浏览器不支持拷贝命令,请使用快捷键 Ctrl/Cmd-C', 27 | 'Paste': '粘贴', 28 | 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': '您的浏览器不支持粘贴命令,请使用快捷键 Ctrl/Cmd-V', 29 | 'Paste your text inside the following box:': '请在下面贴入您的文本', 30 | 'Paste Text': '粘贴纯文本', 31 | 'Bullet list': '符号列表', 32 | 'Numbered list': '编号列表', 33 | 'Undo': '恢复', 34 | 'Redo': '撤消', 35 | 'Rows:': '行数', 36 | 'Cols:': '列数', 37 | 'Insert a table': '插入表格', 38 | 'Insert a horizontal rule': '插入分隔符', 39 | 'Code': '代码', 40 | 'Width (optional):': '宽度(选填)', 41 | 'Height (optional):': '高度(选填)', 42 | 'Insert an image': '插入图片', 43 | 'E-mail:': 'Email地址', 44 | 'Insert an email': '插入Email地址', 45 | 'URL:': '网址', 46 | 'Insert a link': '插入链接', 47 | 'Unlink': '取消链接', 48 | 'More': '更多', 49 | 'Insert an emoticon': '插入表情符号', 50 | 'Video URL:': '视频地址', 51 | 'Insert': '插入', 52 | 'Insert a YouTube video': '插入YouTube视频', 53 | 'Insert current date': '插入当前日期', 54 | 'Insert current time': '插入当前时间', 55 | 'Print': '打印', 56 | 'View source': '查看代码', 57 | 'Description (optional):': '描述(选填)', 58 | 'Enter the image URL:': '输入图片地址', 59 | 'Enter the e-mail address:': '输入email地址', 60 | 'Enter the displayed text:': '输入显示文字', 61 | 'Enter URL:': '输入网址', 62 | 'Enter the YouTube video URL or ID:': '输入YouTube地址或编号', 63 | 'Insert a Quote': '插入引用', 64 | 'Invalid YouTube video': '无效的YouTube视频', 65 | 66 | dateFormat: 'year-month-day' 67 | }; 68 | })(); 69 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/template.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author 3 | * @license [MIT](http://www.opensource.org/licenses/mit-license.php) 4 | */ 5 | (function () { 6 | 'use strict'; 7 | 8 | // Replace with the language code, e.g. no, fr, en, ect. 9 | sceditor.locale[''] = { 10 | 11 | // Original string is on the left, place the translation between 12 | // the quotes on the right 13 | 'Bold': '', 14 | 'Italic': '', 15 | 'Underline': '', 16 | 'Strikethrough': '', 17 | 'Subscript': '', 18 | 'Superscript': '', 19 | 'Align left': '', 20 | 'Center': '', 21 | 'Align right': '', 22 | 'Justify': '', 23 | 'Font Name': '', 24 | 'Font Size': '', 25 | 'Font Color': '', 26 | 'Remove Formatting': '', 27 | 'Cut': '', 28 | 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': '', 29 | 'Copy': '', 30 | 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': '', 31 | 'Paste': '', 32 | 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': '', 33 | 'Paste your text inside the following box:': '', 34 | 'Paste Text': '', 35 | 'Bullet list': '', 36 | 'Numbered list': '', 37 | 'Undo': '', 38 | 'Redo': '', 39 | 'Rows:': '', 40 | 'Cols:': '', 41 | 'Insert a table': '', 42 | 'Insert a horizontal rule': '', 43 | 'Code': '', 44 | 'Width (optional):': '', 45 | 'Height (optional):': '', 46 | 'Insert an image': '', 47 | 'E-mail:': '', 48 | 'Insert an email': '', 49 | 'URL:': '', 50 | 'Insert a link': '', 51 | 'Unlink': '', 52 | 'More': '', 53 | 'Insert an emoticon': '', 54 | 'Video URL:': '', 55 | 'Insert': '', 56 | 'Insert a YouTube video': '', 57 | 'Insert current date': '', 58 | 'Insert current time': '', 59 | 'Print': '', 60 | 'View source': '', 61 | 'Description (optional):': '', 62 | 'Enter the image URL:': '', 63 | 'Enter the e-mail address:': '', 64 | 'Enter the displayed text:': '', 65 | 'Enter URL:': '', 66 | 'Enter the YouTube video URL or ID:': '', 67 | 'Insert a Quote': '', 68 | 'Invalid YouTube video': '', 69 | 'Drop files here': '', 70 | 71 | // month format, replace - with the date format separator and order in the 72 | // order used 73 | dateFormat: 'day-month-year' 74 | }; 75 | })(); 76 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/tw.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author 3 | * @license [MIT](http://www.opensource.org/licenses/mit-license.php) 4 | */ 5 | (function () { 6 | 'use strict'; 7 | 8 | sceditor.locale['tw'] = { 9 | 'Bold': '粗體', 10 | 'Italic': '斜體', 11 | 'Underline': '底線', 12 | 'Strikethrough': '删除線', 13 | 'Subscript': '下標', 14 | 'Superscript': '上標', 15 | 'Align left': '靠左對齊', 16 | 'Center': '置中', 17 | 'Align right': '靠右對齊', 18 | 'Justify': '兩端對齊', 19 | 'Font Name': '字形', 20 | 'Font Size': '字體大小', 21 | 'Font Color': '文字顏色', 22 | 'Remove Formatting': '清除格式', 23 | 'Cut': '剪下', 24 | 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': '您的瀏覽器不支持剪下命令,請使用快速键 Ctrl/Cmd-X', 25 | 'Copy': '拷貝', 26 | 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': '您的瀏覽器不支持拷貝命令,請使用快速键 Ctrl/Cmd-C', 27 | 'Paste': '貼上', 28 | 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': '您的瀏覽器不支持貼上命令,請使用快速键 Ctrl/Cmd-V', 29 | 'Paste your text inside the following box:': '請在下面貼上您的文字', 30 | 'Paste Text': '貼上纯文字', 31 | 'Bullet list': '符號列表', 32 | 'Numbered list': '编號列表', 33 | 'Undo': '復原', 34 | 'Redo': '重做', 35 | 'Rows:': '行數', 36 | 'Cols:': '列數', 37 | 'Insert a table': '插入表格', 38 | 'Insert a horizontal rule': '插入分隔線', 39 | 'Code': '原始碼', 40 | 'Width (optional):': '寬度(選填)', 41 | 'Height (optional):': '高度(選填)', 42 | 'Insert an image': '插入圖片', 43 | 'E-mail:': 'Email', 44 | 'Insert an email': '插入Email', 45 | 'URL:': '網址', 46 | 'Insert a link': '插入超鏈結', 47 | 'Unlink': '取消超鏈結', 48 | 'More': '更多', 49 | 'Insert an emoticon': '插入表情符號', 50 | 'Video URL:': '影片網址', 51 | 'Insert': '插入', 52 | 'Insert a YouTube video': '插入 YouTube 影片', 53 | 'Insert current date': '插入目前日期', 54 | 'Insert current time': '插入目前時間', 55 | 'Print': '列印', 56 | 'View source': '查看原始碼', 57 | 'Description (optional):': '描述(選填)', 58 | 'Enter the image URL:': '輸入圖片網址', 59 | 'Enter the e-mail address:': '輸入 Email', 60 | 'Enter the displayed text:': '輸入顯示文字', 61 | 'Enter URL:': '輸入網址', 62 | 'Enter the YouTube video URL or ID:': '輸入 YouTube 網址或影片编號', 63 | 'Insert a Quote': '插入引用', 64 | 'Invalid YouTube video': '無效的YouTube影片', 65 | 66 | dateFormat: 'year-month-day' 67 | }; 68 | })(); 69 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/nl.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | 4 | sceditor.locale['nl'] = { 5 | 'Bold': 'Vet', 6 | 'Italic': 'Schuingedrukt', 7 | 'Underline': 'Onderstreept', 8 | 'Strikethrough': 'Doorhalen', 9 | 'Subscript': 'Subscript', 10 | 'Superscript': 'Superscript', 11 | 'Align left': 'Links uitlijnen', 12 | 'Center': 'Centreren', 13 | 'Align right': 'Rechts uitlijnen', 14 | 'Justify': 'Uitvullen', 15 | 'Font Name': 'Fontnaam', 16 | 'Font Size': 'Fontgrootte', 17 | 'Font Color': 'Fontkleur', 18 | 'Remove Formatting': 'Verwijder opmaak', 19 | 'Cut': 'Knippen', 20 | 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Je browser staat het knippen commando niet toe. Gebruik de toetsenbord sneltoets Ctrl / Cmd-X', 21 | 'Copy': 'Kopiëren', 22 | 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Je browser staat het kopieer commando niet toe. Gebruik de toetsenbord sneltoets Ctrl / Cmd-C', 23 | 'Paste': 'Plakken', 24 | 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Je browser staat het plakken commando niet toe. Gebruik de toetsenbord sneltoets Ctrl / Cmd-V', 25 | 'Paste your text inside the following box:': 'Plak je tekst in de volgende locatie:', 26 | 'Paste Text': 'Tekst plakken', 27 | 'Bullet list': 'Opsomming', 28 | 'Numbered list': 'Genummerde lijst', 29 | 'Undo': 'Ongedaan maken', 30 | 'Redo': 'Opnieuw uitvoeren', 31 | 'Rows:': 'Rijen', 32 | 'Cols:': 'Kolommen', 33 | 'Insert a table': 'Tabel', 34 | 'Insert a horizontal rule': 'Horizontale regel', 35 | 'Code': 'Code', 36 | 'Insert a Quote': 'Citeren', 37 | 'Width (optional):': 'Breedte (optioneel):', 38 | 'Height (optional):': 'Hoogte (optioneel):', 39 | 'Insert an image': 'Afbeelding', 40 | 'E-mail:': 'E-mail', 41 | 'Insert an email': 'E-mail', 42 | 'URL:': 'URL:', 43 | 'Insert a link': 'Link', 44 | 'Unlink': 'Link verwijderen', 45 | 'More': 'Meer', 46 | 'Insert an emoticon': 'Emoticon', 47 | 'Video URL:': 'Video URL', 48 | 'Insert': 'Invoegen', 49 | 'Insert a YouTube video': 'YouTube-video', 50 | 'Insert current date': 'Huidige datum', 51 | 'Insert current time': 'Huidige tijd', 52 | 'Print': 'Print', 53 | 'View source': 'Bron bekijken', 54 | 55 | dateFormat: 'day.month.year' 56 | }; 57 | })(); 58 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/development/plugins/plaintext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SCEditor Plain Text Plugin 3 | * http://www.sceditor.com/ 4 | * 5 | * Copyright (C) 2016, Sam Clarke (samclarke.com) 6 | * 7 | * SCEditor is licensed under the MIT license: 8 | * http://www.opensource.org/licenses/mit-license.php 9 | * 10 | * @author Sam Clarke 11 | */ 12 | (function (sceditor) { 13 | 'use strict'; 14 | 15 | var utils = sceditor.utils; 16 | var dom = sceditor.dom; 17 | 18 | /** 19 | * Options: 20 | * 21 | * pastetext.addButton - If to replace the plaintext button with a toggle 22 | * button that enables and disables plain text mode. 23 | * 24 | * pastetext.enabled - If the plain text button should be enabled at start 25 | * up. Only applies if addButton is enabled. 26 | */ 27 | sceditor.plugins.plaintext = function () { 28 | var plainTextEnabled = true; 29 | 30 | this.init = function () { 31 | var commands = this.commands; 32 | var opts = this.opts; 33 | 34 | if (opts && opts.plaintext && opts.plaintext.addButton) { 35 | plainTextEnabled = opts.plaintext.enabled; 36 | 37 | commands.pastetext = utils.extend(commands.pastetext || {}, { 38 | state: function () { 39 | return plainTextEnabled ? 1 : 0; 40 | }, 41 | exec: function () { 42 | plainTextEnabled = !plainTextEnabled; 43 | } 44 | }); 45 | } 46 | }; 47 | 48 | this.signalPasteRaw = function (data) { 49 | if (plainTextEnabled) { 50 | if (data.html && !data.text) { 51 | var div = document.createElement('div'); 52 | div.innerHTML = data.html; 53 | 54 | // TODO: Refactor into private shared module with editor 55 | // innerText adds two newlines after

    tags so convert 56 | // them to

    tags 57 | utils.each(div.querySelectorAll('p'), function (_, elm) { 58 | dom.convertElement(elm, 'div'); 59 | }); 60 | // Remove collapsed
    tags as innerText converts them to 61 | // newlines 62 | utils.each(div.querySelectorAll('br'), function (_, elm) { 63 | if (!elm.nextSibling || 64 | !dom.isInline(elm.nextSibling, true)) { 65 | elm.parentNode.removeChild(elm); 66 | } 67 | }); 68 | 69 | document.body.appendChild(div); 70 | data.text = div.innerText; 71 | document.body.removeChild(div); 72 | } 73 | 74 | data.html = null; 75 | } 76 | }; 77 | }; 78 | }(sceditor)); 79 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/sv.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | 4 | sceditor.locale['sv-SE'] = { 5 | 'Bold': 'Fet', 6 | 'Italic': 'Kursiv', 7 | 'Underline': 'Understruken', 8 | 'Strikethrough': 'Genomstruken', 9 | 'Subscript': 'Nersänkt', 10 | 'Superscript': 'Upphöjt', 11 | 'Align left': 'Vänsterställ', 12 | 'Center': 'Centrera', 13 | 'Align right': 'Högerställ', 14 | 'Justify': 'Normalt oppstilt', 15 | 'Font Name': 'Teckensnitt', 16 | 'Font Size': 'Teckenstorlek', 17 | 'Font Color': 'Teckenfärg', 18 | 'Remove Formatting': 'Ta bort formatering', 19 | 'Cut': 'Klipp ut', 20 | 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Din webbläsare kan inte utföra kommandot. Vänligen använd kortkommando Ctrl / Cmd-X', 21 | 'Copy': 'Kopiera', 22 | 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Din webbläsare kan inte utföra kommandot. Vänligen använd kortkommando Ctrl / Cmd-C', 23 | 'Paste': 'Klista in', 24 | 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Din webbläsare kan inte utföra kommandot. Vänligen använd kortkommando Ctrl / Cmd-V', 25 | 'Paste your text inside the following box:': 'Klistra in din text i rutan:', 26 | 'Paste Text': 'Klistra in text', 27 | 'Bullet list': 'Lista', 28 | 'Numbered list': 'Numrerad lista', 29 | 'Undo': 'Ångra', 30 | 'Redo': 'Gör om', 31 | 'Rows:': 'Rader', 32 | 'Cols:': 'Kolumner', 33 | 'Insert a table': 'Infoga tabell', 34 | 'Insert a horizontal rule': 'Infoga skiljestreck', 35 | 'Code': 'Kod', 36 | 'Width (optional):': 'Bredd (valfritt):', 37 | 'Height (optional):': 'Höjd (valfritt):', 38 | 'Insert an image': 'Infoga bild', 39 | 'E-mail:': 'E-post', 40 | 'Insert an email': 'Infoga e-post', 41 | 'URL:': 'URL:', 42 | 'Insert a link': 'Infoga länk', 43 | 'Unlink': 'Ta bort länk', 44 | 'More': 'Mer', 45 | 'Insert an emoticon': 'Infoga smiley', 46 | 'Video URL:': 'Video URL', 47 | 'Insert': 'Infoga', 48 | 'Insert a YouTube video': 'Infoga YouTube-video', 49 | 'Insert current date': 'Infoga dagens datum', 50 | 'Insert current time': 'Infoga nuvarande tid', 51 | 'Print': 'Skriv ut', 52 | 'View source': 'Visa källkod', 53 | 'Description (optional):': 'Beskrivning (valfritt):', 54 | dateFormat: 'year-month-day' 55 | }; 56 | 57 | sceditor.locale['sv'] = sceditor.locale['sv-SE']; 58 | })(); 59 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/scss/_punkweb-mobile.scss: -------------------------------------------------------------------------------- 1 | @media only screen and (max-width: 840px) { 2 | .container { 3 | padding: 0 0.5rem; 4 | } 5 | .flexrow { 6 | flex-direction: column; 7 | } 8 | .flexcol { 9 | flex-direction: column; 10 | } 11 | .recentActivity, .recentThreads { 12 | margin-left: 0; 13 | } 14 | 15 | .sidebar { 16 | margin-left: 0; 17 | margin-right: 0; 18 | } 19 | 20 | .search { 21 | margin: 0.5rem 0; 22 | } 23 | 24 | .pageHeader { 25 | &__title { 26 | margin: 0.5rem 0; 27 | } 28 | 29 | &__flex { 30 | display: flex; 31 | flex-direction: column; 32 | } 33 | 34 | &__left { 35 | align-items: center; 36 | justify-content: center; 37 | } 38 | 39 | &__right { 40 | align-items: center; 41 | justify-content: center; 42 | } 43 | } 44 | 45 | .breadcrumb { 46 | margin: 0.5rem 0; 47 | 48 | li+li:before { 49 | margin: 0 .25rem; 50 | } 51 | } 52 | 53 | .nav { 54 | &--upper { 55 | text-align: center; 56 | } 57 | 58 | &__flex { 59 | display: flex; 60 | flex-direction: column; 61 | width: 100%; 62 | } 63 | 64 | &__title { 65 | padding: 1rem 0 .5rem 0; 66 | margin: 0; 67 | } 68 | 69 | &__left { 70 | justify-content: center; 71 | &--mobileColumn { 72 | flex-direction: column; 73 | } 74 | } 75 | &__right { 76 | justify-content: center; 77 | } 78 | 79 | &__link { 80 | padding: .5rem 0; 81 | } 82 | } 83 | .thread { 84 | flex-direction: column; 85 | 86 | &__user { 87 | border-bottom: 2px solid $hr; 88 | border-right: none; 89 | padding-bottom: 0.5rem; 90 | } 91 | &__body { 92 | max-width: 100%; 93 | } 94 | &__content { 95 | padding: 0.5rem; 96 | } 97 | } 98 | .modal { 99 | padding: 2rem; 100 | } 101 | } 102 | 103 | @media only screen and (max-width: 600px) { 104 | .hide-on-mobile { 105 | display: none; 106 | } 107 | } 108 | 109 | @media only screen and (max-width: 425px) { 110 | .hide-on-xsmall { 111 | display: none; 112 | } 113 | } 114 | 115 | @media only screen and (max-width: 600px) { 116 | .modal { 117 | padding: 1rem 0; 118 | } 119 | 120 | .modal__content { 121 | margin: 0 1rem; 122 | width: auto !important; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /punkweb_boards/templates/punkweb_boards/themes/punkweb/base.html: -------------------------------------------------------------------------------- 1 | {% load compress humanize static %} 2 | 3 | 4 | 5 | {{ BOARD_SETTINGS.BOARD_NAME }} | {% block title %}{% endblock %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {% compress css %} 14 | 15 | {% endcompress %} 16 | {% block extrastyle %} 17 | {% endblock %} 18 | 19 | 20 |
    21 | {% include 'punkweb_boards/themes/punkweb/includes/nav.html' %} 22 | {% block content %}{% endblock %} 23 |
    24 | {% include 'punkweb_boards/themes/punkweb/includes/footer.html' %} 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | {% block extrascript %} 36 | {% endblock %} 37 | 38 | 39 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/ru.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | 4 | sceditor.locale['ru'] = { 5 | 'Bold': 'Жирный', 6 | 'Italic': 'Курсив', 7 | 'Underline': 'Подчёркнутый', 8 | 'Strikethrough': 'Зачёркнутый', 9 | 'Subscript': 'Нижний индекс', 10 | 'Superscript': 'Верхний индекс', 11 | 'Align left': 'Выравнивание по левому краю', 12 | 'Center': 'Выравнивание по центру', 13 | 'Align right': 'Выравнивание по правому краю', 14 | 'Justify': 'Выравнивание по обоим краям', 15 | 'Font Name': 'Шрифт', 16 | 'Font Size': 'Размер шрифта', 17 | 'Font Color': 'Цвет шрифта', 18 | 'Remove Formatting': 'Удалить форматирование', 19 | 'Cut': 'Вырезать', 20 | 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Ваш браузер не позволяет выполнять эту команду. Пожалуйста, используйте сочетание клавиш Ctrl / Cmd-X', 21 | 'Copy': 'Копировать', 22 | 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Ваш браузер не позволяет выполнять эту команду. Пожалуйста, используйте сочетание клавиш Ctrl / Cmd-C', 23 | 'Paste': 'Выставить', 24 | 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Ваш браузер не позволяет выполнять эту команду. Пожалуйста, используйте сочетание клавиш Ctrl / Cmd-V', 25 | 'Paste your text inside the following box:': 'Вставьте текст в следующее окно:', 26 | 'Paste Text': 'Вставить текст', 27 | 'Bullet list': 'Маркированный список', 28 | 'Numbered list': 'Нумерованный список', 29 | 'Undo': 'Отменить', 30 | 'Redo': 'Повторить', 31 | 'Rows:': 'Строки', 32 | 'Cols:': 'Столбцы', 33 | 'Insert a table': 'Таблица', 34 | 'Insert a horizontal rule': 'Горизонтальная линия', 35 | 'Code': 'Код', 36 | 'Insert a Quote': 'Цитата', 37 | 'Width (optional):': 'Ширина (необязательно):', 38 | 'Height (optional):': 'Высота (необязательно):', 39 | 'Insert an image': 'Изображение', 40 | 'E-mail:': 'E-mail', 41 | 'Insert an email': 'E-mail', 42 | 'URL:': 'URL:', 43 | 'Insert a link': 'Ссылка', 44 | 'Unlink': 'Удалить ссылку', 45 | 'More': 'Больше', 46 | 'Insert an emoticon': 'Смайлы', 47 | 'Video URL:': 'Видео URL', 48 | 'Insert': 'Вставить', 49 | 'Insert a YouTube video': 'YouTube-видео', 50 | 'Insert current date': 'Текущая дата', 51 | 'Insert current time': 'Текущее время', 52 | 'Print': 'Распечатать', 53 | 'View source': 'Показать код', 54 | 'Maximize': 'Развернуть', 55 | dateFormat: 'day.month.year' 56 | }; 57 | })(); 58 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/development/plugins/v1compat.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Version 1 compatibility plugin 3 | * 4 | * Patches commands and BBCodes set with 5 | * command.set and bbcode.set to wrap DOM 6 | * node arguments in jQuery objects. 7 | * 8 | * Should only be used to ease migrating. 9 | */ 10 | (function (sceditor, $) { 11 | 'use strict'; 12 | 13 | var plugins = sceditor.plugins; 14 | 15 | /** 16 | * Patches a method to wrap and DOM nodes in a jQuery object 17 | * @private 18 | */ 19 | function patchMethodArguments(fn) { 20 | if (fn._scePatched) { 21 | return fn; 22 | } 23 | 24 | var patch = function () { 25 | var args = []; 26 | 27 | for (var i = 0; i < arguments.length; i++) { 28 | var arg = arguments[i]; 29 | 30 | if (arg && arg.nodeType) { 31 | args.push($(arg)); 32 | } else { 33 | args.push(arg); 34 | } 35 | } 36 | 37 | return fn.apply(this, args); 38 | }; 39 | 40 | patch._scePatched = true; 41 | return patch; 42 | } 43 | 44 | /** 45 | * Patches a method to wrap any return value in a jQuery object 46 | * @private 47 | */ 48 | function patchMethodReturn(fn) { 49 | if (fn._scePatched) { 50 | return fn; 51 | } 52 | 53 | var patch = function () { 54 | return $(fn.apply(this, arguments)); 55 | }; 56 | 57 | patch._scePatched = true; 58 | return patch; 59 | } 60 | 61 | var oldSet = sceditor.command.set; 62 | sceditor.command.set = function (name, cmd) { 63 | if (cmd && typeof cmd.exec === 'function') { 64 | cmd.exec = patchMethodArguments(cmd.exec); 65 | } 66 | 67 | if (cmd && typeof cmd.txtExec === 'function') { 68 | cmd.txtExec = patchMethodArguments(cmd.txtExec); 69 | } 70 | 71 | return oldSet.call(this, name, cmd); 72 | }; 73 | 74 | if (plugins.bbcode) { 75 | var oldBBCodeSet = plugins.bbcode.bbcode.set; 76 | plugins.bbcode.bbcode.set = function (name, bbcode) { 77 | if (bbcode && typeof bbcode.format === 'function') { 78 | bbcode.format = patchMethodArguments(bbcode.format); 79 | } 80 | 81 | return oldBBCodeSet.call(this, name, bbcode); 82 | }; 83 | }; 84 | 85 | var oldCreate = sceditor.create; 86 | sceditor.create = function (textarea, options) { 87 | oldCreate.call(this, textarea, options); 88 | 89 | if (textarea && textarea._sceditor) { 90 | var editor = textarea._sceditor; 91 | 92 | editor.getBody = patchMethodReturn(editor.getBody); 93 | editor.getContentAreaContainer = 94 | patchMethodReturn(editor.getContentAreaContainer); 95 | } 96 | }; 97 | }(sceditor, jQuery)); 98 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/uk.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | 4 | sceditor.locale['uk'] = { 5 | 'Bold': 'Жирний', 6 | 'Italic': 'Курсив', 7 | 'Underline': 'Підкреслений', 8 | 'Strikethrough': 'Закреслений', 9 | 'Subscript': 'Нижній індекс', 10 | 'Superscript': 'Верхній індекс', 11 | 'Align left': 'Вирівняти по лівому краю', 12 | 'Center': 'Вирівняти по центру', 13 | 'Align right': 'Вирівняти по правому краю', 14 | 'Justify': 'Вирівняти по ширині', 15 | 'Font Name': 'Шрифт', 16 | 'Font Size': 'Розмір шрифту', 17 | 'Font Color': 'Колір шрифту', 18 | 'Remove Formatting': 'Видалити форматування', 19 | 'Cut': 'Вирізати', 20 | 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Ваш браузер не дозволяє виконати цю команду. Будь ласка, використовуйте комбінацію клавіш Ctrl/Cmd-X', 21 | 'Copy': 'Копіювати', 22 | 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Ваш браузер не дозволяє виконати цю команду. Будь ласка, використовуйте комбінацію клавіш Ctrl/Cmd-C', 23 | 'Paste': 'Вставити', 24 | 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Ваш браузер не дозволяє виконати цю команду. Будь ласка, використовуйте комбінацію клавіш Ctrl/Cmd-V', 25 | 'Paste your text inside the following box:': 'Вставте текст у наступне вікно:', 26 | 'Paste Text': 'Вставити текст', 27 | 'Bullet list': 'Маркований список', 28 | 'Numbered list': 'Нумерований список', 29 | 'Undo': 'Відмінити', 30 | 'Redo': 'Повторити', 31 | 'Rows:': 'Рядків:', 32 | 'Cols:': 'Cтовпців:', 33 | 'Insert a table': 'Додати таблицю', 34 | 'Insert a horizontal rule': 'Додати горизонтальну лінію', 35 | 'Code': 'Код', 36 | 'Insert a Quote': 'Додати цитату', 37 | 'Width (optional):': 'Ширина (необов\'язково):', 38 | 'Height (optional):': 'Висота (необов\'язково):', 39 | 'Insert an image': 'Додати зображення', 40 | 'E-mail:': 'E-mail:', 41 | 'Insert an email': 'Додати E-mail', 42 | 'URL:': 'URL:', 43 | 'Insert a link': 'Додати посилання', 44 | 'Unlink': 'Видалити посилання', 45 | 'More': 'Більше', 46 | 'Insert an emoticon': 'Додати смайлик', 47 | 'Video URL:': 'URL відео:', 48 | 'Insert': 'Вставити', 49 | 'Insert a YouTube video': 'Додати відео з YouTube', 50 | 'Insert current date': 'Додати дату', 51 | 'Insert current time': 'Додати час', 52 | 'Print': 'Надрукувати', 53 | 'View source': 'Показати код', 54 | 'Maximize': 'Розгорнути редактор', 55 | dateFormat: 'day.month.year' 56 | }; 57 | })(); 58 | -------------------------------------------------------------------------------- /punkweb_boards/queries.py: -------------------------------------------------------------------------------- 1 | from django.db import connection 2 | 3 | 4 | def new_posts_this_week(): 5 | QUERY = """ 6 | SELECT 7 | EXTRACT(dow FROM post.created) AS chunk, 8 | COUNT(post.id) AS count_posts 9 | FROM punkweb_boards_post as post 10 | WHERE EXTRACT (week FROM post.created) = EXTRACT(week FROM CURRENT_DATE) 11 | GROUP BY chunk 12 | ORDER BY chunk 13 | """ 14 | with connection.cursor() as cursor: 15 | cursor.execute(QUERY, {}) 16 | return [ 17 | {"chunk": chunk, "count_posts": count_posts} 18 | for chunk, count_posts in cursor 19 | ] 20 | 21 | 22 | def new_threads_this_week(): 23 | QUERY = """ 24 | SELECT 25 | EXTRACT(dow FROM thread.created) AS chunk, 26 | COUNT(thread.id) AS count_threads 27 | FROM punkweb_boards_thread as thread 28 | WHERE EXTRACT (week FROM thread.created) = EXTRACT(week FROM CURRENT_DATE) 29 | GROUP BY chunk 30 | ORDER BY chunk 31 | """ 32 | with connection.cursor() as cursor: 33 | cursor.execute(QUERY, {}) 34 | return [ 35 | {"chunk": chunk, "count_threads": count_threads} 36 | for chunk, count_threads in cursor 37 | ] 38 | 39 | 40 | def new_members_this_week(): 41 | QUERY = """ 42 | SELECT 43 | EXTRACT(dow FROM member.created) AS chunk, 44 | COUNT(member.id) AS count_members 45 | FROM punkweb_boards_boardprofile AS member 46 | WHERE EXTRACT (week FROM member.created) = EXTRACT(week FROM CURRENT_DATE) 47 | GROUP BY chunk 48 | ORDER BY chunk 49 | """ 50 | with connection.cursor() as cursor: 51 | cursor.execute(QUERY, {}) 52 | return [ 53 | {"chunk": chunk, "count_members": count_members} 54 | for chunk, count_members in cursor 55 | ] 56 | 57 | 58 | def threads_in_subcategories(): 59 | QUERY = """ 60 | SELECT 61 | subcategory.id AS chunk, 62 | subcategory.name AS name, 63 | COUNT(thread.id) AS count_threads 64 | FROM punkweb_boards_subcategory as subcategory 65 | LEFT JOIN punkweb_boards_thread as thread 66 | ON thread.category_id = subcategory.id 67 | GROUP BY chunk 68 | ORDER BY count_threads DESC 69 | """ 70 | with connection.cursor() as cursor: 71 | cursor.execute(QUERY, {}) 72 | return [ 73 | {"chunk": chunk, "name": name, "count_threads": count_threads} 74 | for chunk, name, count_threads in cursor 75 | ] 76 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/ja.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author 3 | * @license [MIT](http://www.opensource.org/licenses/mit-license.php) 4 | */ 5 | (function () { 6 | 'use strict'; 7 | 8 | sceditor.locale['ja'] = { 9 | 'Bold': '太字', 10 | 'Italic': '斜字', 11 | 'Underline': '下線', 12 | 'Strikethrough': '取り消し線', 13 | 'Subscript': '下付き文字', 14 | 'Superscript': '上付き文字', 15 | 'Align left': '左揃え', 16 | 'Center': '中央揃え', 17 | 'Align right': '右揃え', 18 | 'Justify': '均等揃え', 19 | 'Font Name': 'フォント名', 20 | 'Font Size': 'フォントサイズ', 21 | 'Font Color': 'フォントの色', 22 | 'Remove Formatting': '書式解除', 23 | 'Cut': '切り取り', 24 | 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'お使いのブラウザではカットコマンドを許可されていません。 キーボードショートカットの Ctrl/Cmd-X をお使いください。', 25 | 'Copy': 'コピー', 26 | 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'お使いのブラウザではコピーコマンドを許可されていません。 キーボードショートカットの Ctrl/Cmd-C をお使いください。', 27 | 'Paste': '貼り付け', 28 | 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'お使いのブラウザでは貼り付けコマンドを許可されていません。 キーボードショートカットの Ctrl/Cmd-V をお使いください。', 29 | 'Paste your text inside the following box:': '以下にテキストを貼り付けてください。', 30 | 'Paste Text': 'テキストを貼り付け', 31 | 'Bullet list': '箇条書き', 32 | 'Numbered list': '段落番号', 33 | 'Undo': '元に戻す', 34 | 'Redo': 'やり直す', 35 | 'Rows:': '行数', 36 | 'Cols:': '列数', 37 | 'Insert a table': '表を挿入', 38 | 'Insert a horizontal rule': '水平線を挿入', 39 | 'Code': 'コード', 40 | 'Width (optional):': '幅 (オプション)', 41 | 'Height (optional):': '高さ (オプション)', 42 | 'Insert an image': '画像を挿入', 43 | 'E-mail:': 'メールアドレス', 44 | 'Insert an email': 'メールアドレスを挿入', 45 | //'URL:': ', 46 | 'Insert a link': 'リンクを挿入', 47 | 'Unlink': 'リンクを解除', 48 | //'More': ', 49 | 'Insert an emoticon': '顔文字を挿入', 50 | 'Video URL:': '動画URL', 51 | 'Insert': '挿入', 52 | 'Insert a YouTube video': 'Youtubeを挿入', 53 | 'Insert current date': '現在の日付を挿入', 54 | 'Insert current time': '現在の時間を挿入', 55 | 'Print': '印刷', 56 | 'View source': 'ソースを表示', 57 | 'Description (optional):': '説明 (オプション)', 58 | 'Enter the image URL:': '画像URLを入力してください。', 59 | 'Enter the e-mail address:': 'メールアドレスを入力してください。', 60 | 'Enter the displayed text:': '表示テキストを入力してください。', 61 | 'Enter URL:': 'URLを入力してください。', 62 | 'Enter the YouTube video URL or ID:': 'Youtubeの動画URLまたはIDを入力してください。', 63 | 'Insert a Quote': '引用を挿入', 64 | 'Invalid YouTube video': '不正なYoutube動画', 65 | 'Left-to-Right': '左から右へ', 66 | 'Right-to-Left': '右から左へ', 67 | 'Maximize': '最大化', 68 | 69 | dateFormat: 'year-month-day' 70 | }; 71 | })(); 72 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | SCEditor Demo 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 42 | 43 | 44 |
    45 |
    46 | 55 | 56 |
    57 | 58 |
    59 | 60 | 68 |
    69 |
    70 | 71 | 72 | 88 | 89 |

    SCEditor is licensed under the MIT

    90 | 91 | 92 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/languages/de.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | 4 | sceditor.locale['de'] = { 5 | 'Bold': 'Fett', 6 | 'Italic': 'Kursiv', 7 | 'Underline': 'Unterstrichen', 8 | 'Strikethrough': 'Durchgestrichen', 9 | 'Subscript': 'Tiefgestellt', 10 | 'Superscript': 'Hochgestellt', 11 | 'Align left': 'Linksbündig ausrichten', 12 | 'Center': 'Zentrieren', 13 | 'Align right': 'Rechtsbündig ausrichten', 14 | 'Justify': 'Blocksatz', 15 | 'Font Name': 'Schriftname', 16 | 'Font Size': 'Schriftgröße', 17 | 'Font Color': 'Schriftfarbe', 18 | 'Remove Formatting': 'Formatierung entfernen', 19 | 'Cut': 'Ausschneiden', 20 | 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Ihr Browser erlaubt das Ausschneiden von Text nicht, bitte Nutzen Sie das Tastenkürzel Strg / Cmd-X', 21 | 'Copy': 'Kopieren', 22 | 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Ihr Browser erlaubt das Kopieren von Text nicht, bitte Nutzen Sie das Tastenkürzel Strg / Cmd-C', 23 | 'Paste': 'Einfügen', 24 | 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Ihr Browser erlaubt das Einfügen von Text nicht, bitte Nutzen Sie das Tastenkürzel Strg / Cmd-V', 25 | 'Paste your text inside the following box:': 'Fügen Sie Ihren Text in die folgende Box ein', 26 | 'Paste Text': 'Text einfügen', 27 | 'Bullet list': 'Aufzählungsliste', 28 | 'Numbered list': 'Nummerierte Liste', 29 | 'Undo': 'Rückgängig machen', 30 | 'Redo': 'Wiederherstellen', 31 | 'Rows:': 'Zeilen', 32 | 'Cols:': 'Spalten', 33 | 'Insert a table': 'Tabelle einfügen', 34 | 'Insert a horizontal rule': 'Horizontale Linie einfügen', 35 | 'Code': 'Code', 36 | 'Insert a Quote': 'Zitat einfügen', 37 | 'Width (optional):': 'Breite (Optional)', 38 | 'Height (optional):': 'Höhe (Optional)', 39 | 'Insert an image': 'Ein Bild einfügen', 40 | 'E-mail:': 'E-Mail', 41 | 'Insert an email': 'E-Mail einfügen', 42 | 'URL:': 'URL', 43 | 'Insert a link': 'Link einfügen', 44 | 'Unlink': 'Link entfernen', 45 | 'More': 'Mehr', 46 | 'Left-to-Right': 'Links nach rechts', 47 | 'Right-to-Left': 'Rechts nach links', 48 | 'Insert an emoticon': 'Emoticon einfügen', 49 | 'Video URL:': 'Video URL', 50 | 'Insert': 'Einfügen', 51 | 'Insert a YouTube video': 'YouTube Video einfügen', 52 | 'Insert current date': 'Aktuelles Datum einfügen', 53 | 'Insert current time': 'Aktuelle Uhrzeit einfügen', 54 | 'Print': 'Drucken', 55 | 'Maximize': 'Maximieren', 56 | 'View source': 'Quelltext ansehen', 57 | dateFormat: 'day.month.year' 58 | }; 59 | })(); 60 | -------------------------------------------------------------------------------- /punkweb_boards/static/punkweb_boards/js/deps/sceditor-3.1.1/minified/plugins/undo.js: -------------------------------------------------------------------------------- 1 | /* SCEditor v3.1.1 | (C) 2017, Sam Clarke | sceditor.com/license */ 2 | 3 | !function(){"use strict";sceditor.plugins.undo=function(){var n,o,r,i,a=this,s="",c=0,u=!1,d=!1,l=!1,e=50,t=[],g=0;function f(e){var t;d=!0,o.sourceMode(e.sourceMode),e.sourceMode?(o.val(e.value,!1),o.sourceEditorCaret(e.caret)):(o.getBody().innerHTML=e.value,function(e,t){try{var n=t.startPositions,o=t.endPositions;e.setStart(S(r,n),n[0]),e.setEnd(S(r,o),o[0])}catch(e){console&&console.warn&&console.warn("[SCEditor] Undo plugin lost caret",e)}}(t=o.getRangeHelper().selectedRange(),e.caret),o.getRangeHelper().selectRange(t)),o.focus(),d=!1}function p(e,t){var n=e[t];e[t]=function(){var e=u;!e&&!d&&i&&o.getRangeHelper().hasSelection()&&h(),u=!0,n.apply(this,arguments),e||(u=!1,d||(v(),s=""))}}function v(){g&&(t.length-=g,g=0),0e&&t.shift(),i={},h(),t.push(i)}function h(){var e,t=o.sourceMode();i.caret=t?o.sourceEditorCaret():(e=o.getRangeHelper().selectedRange(),r.normalize(),{startPositions:y(e.startContainer,e.startOffset),endPositions:y(e.endContainer,e.endOffset)}),i.sourceMode=t,i.value=t?o.getSourceEditorValue(!1):o.getBody().innerHTML}function E(){n===document.activeElement&&a.signalSelectionchangedEvent()}function y(e,t){for(var n=[t],o=e;o&&"BODY"!==o.tagName;)n.push(function(e){var t=0;for(;e=e.previousSibling;)t++;return t}(o)),o=o.parentNode;return n}function S(e,t){for(var n=t.length-1;e&&0', { 11 | id: 'fontAwesomeLink', 12 | rel: 'stylesheet', 13 | href: linkUrl, 14 | integrity: 'sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg==', 15 | crossorigin: 'anonymous', 16 | referrerpolicy: 'no-referrer' 17 | }); 18 | $(iframeHead).append(link); 19 | }); 20 | }, 500); 21 | } 22 | 23 | function initJQuery() { 24 | setTimeout(function() { 25 | $('.sceditor-container').each(function() { 26 | var editor = $(this); 27 | var iframe = $(editor).children('iframe')[0]; 28 | var iframeHead = $(iframe).contents().find('head'); 29 | var scriptUrl = '/static/punkweb_boards/js/deps/jquery-3.6.0.min.js'; 30 | $(iframeHead).append($('