Compare commits

...

17 Commits

Author SHA1 Message Date
DJ Sundog b9e064967c Merge branch 'main' into 'main'
require Django 3.x for compatibility

See merge request brutaldon/brutaldon!7
2022-11-14 14:53:02 +00:00
franklint 397306a8d9 require Django 3.x for compatibility 2022-11-12 19:04:30 +00:00
DJ Sundog 8b147bbc16 Merge branch 'fix-default-field-warning' into 'main'
Deploy CI Pipeline for tests

Closes #19

See merge request brutaldon/brutaldon!6
2021-08-03 15:20:35 +00:00
DJ Sundog 19b4e56007 Merge branch 'show-local-only' into 'main'
Added local-only toot display support

Closes #21

See merge request brutaldon/brutaldon!5
2021-08-03 15:19:14 +00:00
Zachery Bohon 2131b9da3f Add .gitlab-ci.yml 2021-08-03 04:45:35 +00:00
Zac Bohon badd8922fb Added DEFAULT_AUTO_FIELD to settings.py
Resolves warnings thrown by PyTest.

see https://dev.to/weplayinternet/upgrading-to-django-3-2-and-fixing-defaultautofield-warnings-518n
2021-08-02 23:41:36 -05:00
Zac Bohon cdc199532d Added local-only toot display support
If the API returns a toot with the local_only property set to true:
Adds a "(local only)" text to the visibility.
Tested to work on Glitch-Soc and Hometown, and not break on Vanilla
2021-08-02 16:50:38 -05:00
DJ Sundog 6d7d8d936a Merge branch 'add-rel-attribute' into 'main'
Added rel attributes to the next and prev links

Closes #4

See merge request brutaldon/brutaldon!4
2021-08-01 20:39:25 +00:00
Zac Bohon 06d306ce2b Added rel attributes to the next and prev links 2021-08-01 15:37:06 -05:00
DJ Sundog 13761e6125 Merge branch 'fix-source-link' into 'main'
fix the html templates to point to gitlab repo

See merge request brutaldon/brutaldon!3
2021-08-01 20:19:49 +00:00
Zac Bohon 287e2fc19c Change the html templates to point to gitlab repo 2021-08-01 15:14:29 -05:00
Zac Bohon 9981d0ff38 Added email address to CoC 2021-08-01 11:00:27 -05:00
DJ Sundog 5f97d9fccd Merge branch 'contributing-doc' into 'main'
Add CONTRIBUTING.md

Closes #2

See merge request brutaldon/brutaldon!2
2021-08-01 14:41:37 +00:00
DJ Sundog 38904d4628 Merge branch 'code-of-conduct' into 'main'
Added CODE_OF_CONDUCT.md

Closes #1

See merge request brutaldon/brutaldon!1
2021-08-01 14:39:12 +00:00
Zachery Bohon 11df272d5d Add CONTRIBUTING.md 2021-08-01 06:50:28 +00:00
Zachery Bohon 0b51f6b390 Added CODE_OF_CONDUCT.md 2021-08-01 06:35:08 +00:00
DJ Sundog ba0d0f2df0 Update README.md to refer to new primary repo and remove former maintainer's tip jar 2021-08-01 00:56:41 +00:00
14 changed files with 156 additions and 21 deletions

56
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,56 @@
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Django.gitlab-ci.yml
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python
image: python:latest
# Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
services:
# - mysql:latest
# - postgres:latest
variables:
# POSTGRES_DB: database_name
# This folder is cached between builds
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
cache:
paths:
- ~/.cache/pip/
# This is a basic example for a gem or script which doesn't use
# services such as redis or postgres
before_script:
- python -V # Print out python version for debugging
# Uncomment next line if your Django app needs a JS runtime:
# - apt-get update -q && apt-get install nodejs -yqq
- pip install pipenv
- pipenv install
# To get Django tests to work you may need to create a settings file using
# the following DATABASES:
#
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
# 'NAME': 'ci',
# 'USER': 'postgres',
# 'PASSWORD': 'postgres',
# 'HOST': 'postgres',
# 'PORT': '5432',
# },
# }
#
# and then adding `--settings app.settings.ci` (or similar) to the test command
test:
variables:
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
script:
- pipenv run python manage.py test

46
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at sundog@reclaim.technology. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

29
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,29 @@
Contributing
============
Thank you for considering contributing to Brutaldon
You can contribute in the following ways:
- Finding and reporting bugs
- Translating the Brutaldon interface into various languages
- Contributing code to Brutaldon by fixing bugs or implementing features
- Creating/improving the documentation
## Bug reports
Bug reports and feature suggestions must use descriptive and concise titles and be submitted to [GitLab Issues](https://gitlab.com/brutaldon/brutaldon/-/issues). Please use the search function to make sure that you are not submitting duplicates, and that a similar report or request has not already been resolved or rejected.
## Translations
We currently lack a formal process for this. Translations can be submitted via merge request to the gitlab repo.
## Merge requests
**Please use clean, concise titles for your merge requests.** Unless the merge request is about refactoring code, updating dependencies or other internal tasks, assume that the person reading the merge request title is not a programmer or Brutaldon developer, but instead a Brutaldon user or server administrator, and **try to describe your change or fix from their perspective**.
**The smaller the set of changes in the merge request is, the quicker it can be reviewed and merged.** Splitting tasks into multiple smaller merge requests is often preferable.
## Documentation
We would love assistance in creating a formal documentation process for this project.

View File

@ -21,7 +21,7 @@ requests = "*"
six = "*"
"urllib3" = "*"
webencodings = "*"
Django = "*"
Django = "~=3.2"
django-html_sanitizer = "*"
inscriptis = "*"
lxml = "*"

View File

@ -1,6 +1,6 @@
# Brutaldon
Note: If you are seeing this on Github, this repo is a mirror that may not be up-to-date. Please go to https://git.carcosa.net/jmcbray/brutaldon for the latest code.
Note: If you are seeing this on Github, this repo is a mirror that may not be up-to-date. Please go to https://gitlab.com/brutaldon/brutaldon for the latest code.
Brutaldon is a [brutalist][0], [Web 1.0][0.5] web interface for [Mastodon][1] and [Pleroma][p]. It is not a Mastodon-compatible social networking server; rather, it is just a client, like the Android or iOS client for Mastodon you may already be using, but it runs in a web server, and is accessed through a web browser. It works great in text-mode browsers such as [Lynx][2], [w3m][3], or [elinks][4], and also in more heavy-weight graphical browsers, such as Firefox. It works completely without JavaScript, but if JavaScript is available and enabled, it will be used to unobtrusively enhance the user experience.
@ -12,11 +12,11 @@ Brutaldon is a [brutalist][0], [Web 1.0][0.5] web interface for [Mastodon][1] an
[4]: http://elinks.or.cz/
[p]: https://pleroma.social/
There is a hosted instance at [brutaldon.online][hosted] which you can use to log in to any instance. However, you are also encouraged to run your own, either locally or on a public server.
There is a hosted instance at [brutaldon.org][hosted] which you can use to log in to any instance. However, you are also encouraged to run your own, either locally or on a public server.
[hosted]: https://brutaldon.online/
[hosted]: https://brutaldon.org/
Brutaldon is ready for day to day use, and is my main way of interacting with the fediverse. It is still missing some features you might want, like lists, filters, and editing your own profile.
Brutaldon is ready for day to day use. It is still missing some features you might want, like lists, filters, and editing your own profile.
Please see the issues tracker.
## Screenshots
@ -66,8 +66,3 @@ People love screenshots, whatever the project, so here we are. These screenshots
## Aesthetic
No automatic page updates: refresh the page to see new toots. No endless scroll: there's a "next page" link. No autocompletion of anything: use another lynx process in another screen window to look things up. UTF8 clean.
## Tip Jar
You can buy me a coffee to give me energy to work on this, but only if you have it to spare.
[![ko-fi](https://www.ko-fi.com/img/donate_sm.png)](https://ko-fi.com/D1D7QBZC)

View File

@ -211,5 +211,8 @@ def CHECK_INSTANCE_URL(url, redirect):
return redirect(RICKROLL_URL)
# See https://dev.to/weplayinternet/upgrading-to-django-3-2-and-fixing-defaultautofield-warnings-518n
DEFAULT_AUTO_FIELD='django.db.models.AutoField'
# Version number displayed on about page
BRUTALDON_VERSION = "2.15.0"

View File

@ -60,7 +60,7 @@
<a class="level-item is-size-7" href="/about">
About
</a>
<a class="level-item is-size-7" href="https://github.com/jfmcbrayer/brutaldon">
<a class="level-item is-size-7" href="https://gitlab.com/brutaldon/brutaldon">
Source
</a>
</div>

View File

@ -180,7 +180,7 @@
<a class="level-item is-size-7" href="{% url "about" %}">
About
</a>
<a class="level-item is-size-7" href="https://github.com/jfmcbrayer/brutaldon">
<a class="level-item is-size-7" href="https://gitlab.com/brutaldon/brutaldon">
Source
</a>
<span class="level-item is-size-7" >Bookmarklet: <a href="{{ bookmarklet_url }}">Share via brutaldon</a></span>

View File

@ -3,10 +3,10 @@
{% block pagination %}
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %}
<a class="pagination-next" href="{% url 'local_prev' prev.min_id %}">Newer</a>
<a class="pagination-next" rel="next" href="{% url 'local_prev' prev.min_id %}">Newer</a>
{% endif %}
{% if next %}
<a class="pagination-previous" href="{% url 'local_next' next.max_id %}">Older</a>
<a class="pagination-previous" rel="prev" href="{% url 'local_next' next.max_id %}">Older</a>
{% endif %}
</nav>
{% endblock %}

View File

@ -109,10 +109,10 @@ mastodon.notifications()[0]
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %}
<a class="pagination-next" href="{% url 'note_prev' prev.min_id %}">Newer</a>
<a class="pagination-next" rel="next" href="{% url 'note_prev' prev.min_id %}">Newer</a>
{% endif %}
{% if next %}
<a class="pagination-previous" href="{% url 'note_next' next.max_id %}">Older</a>
<a class="pagination-previous" rel="prev" href="{% url 'note_next' next.max_id %}">Older</a>
{% endif %}
</nav>

View File

@ -3,10 +3,10 @@
{% block pagination %}
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %}
<a class="pagination-next" href="{% url 'fed_prev' prev.min_id %}">Newer</a>
<a class="pagination-next" rel="next" href="{% url 'fed_prev' prev.min_id %}">Newer</a>
{% endif %}
{% if next %}
<a class="pagination-previous" href="{% url 'fed_next' next.max_id %}">Older</a>
<a class="pagination-previous" rel="prev" href="{% url 'fed_next' next.max_id %}">Older</a>
{% endif %}
</nav>
{% endblock %}

View File

@ -40,6 +40,7 @@
{% if next %}
<p class="column is-one-quarter">
<a class="pagination-previous is-fullwidth button"
rel="prev"
href="{% url 'home_next' next.max_id %}"
{% if preferences.click_to_load %}
ic-get-from="{% url 'home_next' next.max_id %}"
@ -57,6 +58,7 @@
{% if prev %}
<p class="column is-one-quarter">
<a class="pagination-next is-fullwidth button"
rel="next"
href="{% url 'home_prev' prev.min_id %}">
Newer
</a>

View File

@ -214,7 +214,11 @@
delete
</a>
{% endif %}
{{ toot.visibility }}
{% if toot.local_only %}
{{ toot.visibility }} (local-only)
{% else %}
{{ toot.visibility }}
{% endif %}
&nbsp;&nbsp;
{% if toot.in_reply_to_id or toot.replies_count > 0 %}
<a class="level-item" href="{% url "thread" toot.id %}#toot-{{ toot.id }}">

View File

@ -120,10 +120,10 @@ Brutaldon ({{ own_acct.username }}) - {{ user.acct }} timelime
{% endfor %}
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if prev %}
<a class="pagination-next" href="{% url 'user_prev' user.acct prev.min_id %}">Newer</a>
<a class="pagination-next" rel="next" href="{% url 'user_prev' user.acct prev.min_id %}">Newer</a>
{% endif %}
{% if next %}
<a class="pagination-previous" href="{% url 'user_next' user.acct next.max_id %}">Older</a>
<a class="pagination-previous" rel="prev" href="{% url 'user_next' user.acct next.max_id %}">Older</a>
{% endif %}
</nav>