[WIP] treehouse-vagrant #27
|
@ -0,0 +1,7 @@
|
||||||
|
LOCAL_DOMAIN=localhost
|
||||||
|
ALTERNATE_DOMAINS=mastodon.internal
|
||||||
|
|
||||||
|
DB_HOST=$(pwd)/data/postgres
|
||||||
|
DB_USER=mastodon
|
||||||
|
DB_NAME=mastodon_dev
|
||||||
|
REDIS_URL=unix://./data/redis/redis-dev.sock
|
|
@ -3,3 +3,8 @@ NODE_ENV=tests
|
||||||
# Federation
|
# Federation
|
||||||
LOCAL_DOMAIN=cb6e6126.ngrok.io
|
LOCAL_DOMAIN=cb6e6126.ngrok.io
|
||||||
LOCAL_HTTPS=true
|
LOCAL_HTTPS=true
|
||||||
|
|
||||||
|
DB_HOST=$(pwd)/data/postgres
|
||||||
|
DB_USER=mastodon
|
||||||
|
DB_NAME=mastodon_dev
|
||||||
|
REDIS_URL=unix://./data/redis/redis-dev.sock
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
# or operating system, you probably want to add a global ignore instead:
|
# or operating system, you probably want to add a global ignore instead:
|
||||||
# git config --global core.excludesfile '~/.gitignore_global'
|
# git config --global core.excludesfile '~/.gitignore_global'
|
||||||
|
|
||||||
|
# Ignore local dotenv overrides
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
# Ignore bundler config and downloaded libraries.
|
# Ignore bundler config and downloaded libraries.
|
||||||
/.bundle
|
/.bundle
|
||||||
/vendor/bundle
|
/vendor/bundle
|
||||||
|
@ -12,6 +15,9 @@
|
||||||
/db/*.sqlite3
|
/db/*.sqlite3
|
||||||
/db/*.sqlite3-journal
|
/db/*.sqlite3-journal
|
||||||
|
|
||||||
|
# Ignore local data directory
|
||||||
|
/data
|
||||||
|
|
||||||
# Ignore all logfiles and tempfiles.
|
# Ignore all logfiles and tempfiles.
|
||||||
.eslintcache
|
.eslintcache
|
||||||
/log/*
|
/log/*
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: docker
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- docker image build -f Dockerfile . -t gitea.treehouse.systems/treehouse/mastodon:latest
|
||||||
|
|
||||||
|
push:
|
||||||
|
image: docker
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- echo $REGISTRY_SECRET | docker login -u ariadne --password-stdin gitea.treehouse.systems
|
||||||
|
- docker image push --all-tags gitea.treehouse.systems/treehouse/mastodon
|
||||||
|
when:
|
||||||
|
event: [push, tag]
|
||||||
|
branch: main
|
||||||
|
secrets: [REGISTRY_SECRET]
|
|
@ -1,6 +1,6 @@
|
||||||
# Contributing to Mastodon Glitch Edition #
|
# Contributing to Mastodon Glitch+Treehouse Edition #
|
||||||
|
|
||||||
Thank you for your interest in contributing to the `glitch-soc` project!
|
Thank you for your interest in contributing to the **Treehouse Mastodon** project!
|
||||||
Here are some guidelines, and ways you can help.
|
Here are some guidelines, and ways you can help.
|
||||||
|
|
||||||
> (This document is a bit of a work-in-progress, so please bear with us.
|
> (This document is a bit of a work-in-progress, so please bear with us.
|
||||||
|
@ -8,14 +8,19 @@ Here are some guidelines, and ways you can help.
|
||||||
|
|
||||||
## Planning ##
|
## Planning ##
|
||||||
|
|
||||||
Right now a lot of the planning for this project takes place in our development Discord, or through GitHub Issues and Projects.
|
Right now a lot of the planning for this project takes place in the `#fediverse`
|
||||||
|
channel of the Treehouse Discord, or through Gitea Issues.
|
||||||
|
|
||||||
We're working on ways to improve the planning structure and better solicit feedback, and if you feel like you can help in this respect, feel free to give us a holler.
|
We're working on ways to improve the planning structure and better solicit feedback, and if you feel like you can help in this respect, feel free to give us a holler.
|
||||||
|
|
||||||
## Documentation ##
|
## Documentation ##
|
||||||
|
|
||||||
The documentation for this repository is available at [`glitch-soc/docs`](https://github.com/glitch-soc/docs) (online at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/)).
|
The upstream Glitch documentation for this repository is available at [`glitch-soc/docs`](https://github.com/glitch-soc/docs) (online at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/)).
|
||||||
Right now, we've mostly focused on the features that make this fork different from upstream in some manner.
|
|
||||||
Adding screenshots, improving descriptions, and so forth are all ways to help contribute to the project even if you don't know any code.
|
## Setup ##
|
||||||
|
|
||||||
|
For a some-batteries-required guide to setting up a development environment for this repository, read Rin's excellent
|
||||||
|
[SETUP.md](https://gitea.treehouse.systems/treehouse/mastodon/src/branch/main/SETUP.md).
|
||||||
|
|
||||||
## Frontend Development ##
|
## Frontend Development ##
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,10 @@ ENV BIND="0.0.0.0"
|
||||||
USER mastodon
|
USER mastodon
|
||||||
|
|
||||||
# Precompile assets
|
# Precompile assets
|
||||||
|
# TODO(kaniini): Yarn install is invoked to allow us to pre-patch emoji-mart
|
||||||
|
# we should set up a deviation instead.
|
||||||
RUN cd ~ && \
|
RUN cd ~ && \
|
||||||
|
yarn install && cp ./emoji_data/all.json ./node_modules/emoji-mart/data/all.json && \
|
||||||
OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
|
OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
|
||||||
yarn cache clean
|
yarn cache clean
|
||||||
|
|
||||||
|
|
24
README.md
|
@ -1,14 +1,20 @@
|
||||||
# Mastodon Glitch Edition #
|
# Mastodon Glitch+Treehouse Edition #
|
||||||
|
|
||||||
> Now with automated deploys!
|
> Now with bunny ears!
|
||||||
|
|
||||||
[![Build Status](https://img.shields.io/circleci/project/github/glitch-soc/mastodon.svg)][circleci]
|
So here's the deal: we all work on this code, and anyone who uses that does so absolutely at their own risk. Can you dig it?
|
||||||
[![Code Climate](https://img.shields.io/codeclimate/maintainability/glitch-soc/mastodon.svg)][code_climate]
|
|
||||||
|
|
||||||
[circleci]: https://circleci.com/gh/glitch-soc/mastodon
|
Specifically, this fork-of-a-fork is intended for Treehouse use only. Unless
|
||||||
[code_climate]: https://codeclimate.com/github/glitch-soc/mastodon
|
otherwise communicated, we will not put effort into supporting other deployments
|
||||||
|
or upstreaming our patches.
|
||||||
|
|
||||||
So here's the deal: we all work on this code, and anyone who uses that does so absolutely at their own risk. can you dig it?
|
## Links
|
||||||
|
|
||||||
- You can view documentation for this project at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/).
|
- You can view upstream Glitch's documentation for this project at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/).
|
||||||
- And contributing guidelines are available [here](CONTRIBUTING.md) and [here](https://glitch-soc.github.io/docs/contributing/).
|
- Contributing guidelines are available [here](CONTRIBUTING.md).
|
||||||
|
|
||||||
|
## Known Deployments
|
||||||
|
|
||||||
|
- Treehouse Social: [social.treehouse.systems](https://social.treehouse.systems)
|
||||||
|
- VT Social: [vt.social](https://vt.social)
|
||||||
|
- Unstable Systems: [unstable.systems](https://unstable.systems)
|
||||||
|
|
|
@ -0,0 +1,143 @@
|
||||||
|
# Setting up a dev environment
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
Mastodon development requires the following:
|
||||||
|
|
||||||
|
- Ruby 3.0
|
||||||
|
- Ruby gems:
|
||||||
|
- `bundler`
|
||||||
|
- `irb`
|
||||||
|
- `foreman`
|
||||||
|
- NodeJS v18 (LTS)
|
||||||
|
- NPM packages:
|
||||||
|
- `yarn`
|
||||||
|
- Postgres
|
||||||
|
- Redis
|
||||||
|
|
||||||
|
### macOS
|
||||||
|
|
||||||
|
First, make sure you have Homebrew installed. Follow the instructions at
|
||||||
|
[brew.sh](https://brew.sh).
|
||||||
|
|
||||||
|
Run the following to install all necessary packages:
|
||||||
|
```
|
||||||
|
brew install ruby@3.0 foreman node yarn postgresql redis
|
||||||
|
```
|
||||||
|
|
||||||
|
Ruby 3.0 is **keg-only** by default. Follow the instructions in the **Caveat**
|
||||||
|
to add it to your path.
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
|
||||||
|
We will assume that you know how to locate the correct packages for your distro.
|
||||||
|
That said, some distros package `bundler` and `irb` separately. Make sure that
|
||||||
|
you also install these.
|
||||||
|
|
||||||
|
On Arch, you will need:
|
||||||
|
|
||||||
|
- `ruby`
|
||||||
|
- `ruby-bundler`
|
||||||
|
- `ruby-irb`
|
||||||
|
- `ruby-foreman`
|
||||||
|
- `redis`
|
||||||
|
- `postgresql`
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
Unfortunately, none of the authors use Windows. Contributions welcome!
|
||||||
|
|
||||||
|
## Database
|
||||||
|
|
||||||
|
In the root of this repository, go through the following script:
|
||||||
|
```sh
|
||||||
|
# Create a folder for local data
|
||||||
|
mkdir -p data
|
||||||
|
|
||||||
|
# Set up a local database
|
||||||
|
pg_ctl -D data/postgres initdb -o '-U mastodon --auth-host=trust'
|
||||||
|
|
||||||
|
# Use the data/postgres folder for the DB connection unix socket
|
||||||
|
#
|
||||||
|
# If you don't know what that means, it's just a way for Mastodon to communicate
|
||||||
|
# with a database on the same machine efficiently.
|
||||||
|
#
|
||||||
|
# See: https://manpages.ubuntu.com/manpages/jammy/man7/unix.7.html
|
||||||
|
echo 'unix_socket_directories = .' >> data/postgres/postgresql.conf
|
||||||
|
|
||||||
|
# Start the database
|
||||||
|
pg_ctl -D data/postgres start --silent
|
||||||
|
```
|
||||||
|
|
||||||
|
## Redis
|
||||||
|
|
||||||
|
In the root of this repository, run the following:
|
||||||
|
```sh
|
||||||
|
# Create a folder for redis data
|
||||||
|
mkdir -p data/redis
|
||||||
|
|
||||||
|
# Start Redis
|
||||||
|
redis-server ./redis-dev.conf
|
||||||
|
|
||||||
|
# [Optional] Stop Redis
|
||||||
|
kill "$(cat ./data/redis/redis-dev.pid)"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Ruby
|
||||||
|
|
||||||
|
```sh
|
||||||
|
export RAILS_ENV=development
|
||||||
|
|
||||||
|
# Bundle installs all Ruby gems globally by default, which might cause problems.
|
||||||
|
bundle config set --local path 'vendor/bundle'
|
||||||
|
|
||||||
|
# [Apple Silicon] If using macOS on Apple Silicon, run the following:
|
||||||
|
# bundle config build.idn-ruby -- --with-idn-dir="$(brew --prefix libidn)"
|
||||||
|
|
||||||
|
# Install dependencies using bundle (Ruby) and yarn (JS)
|
||||||
|
bundle install
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
# Setup the database using the pre-defined Rake task
|
||||||
|
#
|
||||||
|
# Rake is a command runner for Ruby projects. The `bundle exec` ensures that
|
||||||
|
# we use the version of Rake that this project requires.
|
||||||
|
bundle exec rake db:setup
|
||||||
|
|
||||||
|
# [Optional] If that fails, run the following and try again:
|
||||||
|
# bundle exec rake db:reset
|
||||||
|
```
|
||||||
|
|
||||||
|
## Running Mastodon
|
||||||
|
|
||||||
|
1. Run `export RAILS_ENV=development NODE_ENV=development`.
|
||||||
|
a. Put these in your shell's .rc, or a script you can source if you want to skip this step in the future.
|
||||||
|
2. Run `bundle exec rake assets:precompile`.
|
||||||
|
a. If this explodes, complaining about `Hash`, you'll need to `export NODE_OPTIONS=--openssl-legacy-provider`.
|
||||||
|
b. After doing this, you will need to run `bundle exec rake assets:clobber` and then re-run
|
||||||
|
`bundle exec rake assets:precompile`.
|
||||||
|
3. Run `foreman start`
|
||||||
|
|
||||||
|
# Updates/Troubleshooting
|
||||||
|
|
||||||
|
## RubyVM/DebugInspector Issues
|
||||||
|
|
||||||
|
Still unable to fix. Circumvent by removing `better_errors` and `binding_of_caller` from Gemfile.
|
||||||
|
Happy to troubleshoot with someone better with Ruby than us >_<'/.
|
||||||
|
|
||||||
|
## Webpack Issues
|
||||||
|
If Webpack compalins about being unable to find some assets or locales:
|
||||||
|
Try:
|
||||||
|
|
||||||
|
1. `rm -rf node_modules`
|
||||||
|
2. `yarn install`
|
||||||
|
|
||||||
|
If this doesn't help, try:
|
||||||
|
|
||||||
|
1. `yarn add webpack`
|
||||||
|
2. `git restore package.json yarn.lock`
|
||||||
|
3. `yarn install`
|
||||||
|
|
||||||
|
Then re-run `foreman`. No. We have no idea why this worked.
|
||||||
|
|
||||||
|
If the above instructions don't work, please contact @Rin here, or @tammy@social.treehouse.systems.
|
|
@ -1,137 +1,88 @@
|
||||||
# -*- mode: ruby -*-
|
# -*- mode: ruby -*-
|
||||||
# vi: set ft=ruby :
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
ENV["PORT"] ||= "3000"
|
REQUIRED_PLUGINS = %w(vagrant-libvirt)
|
||||||
|
exit unless REQUIRED_PLUGINS.all? do |plugin|
|
||||||
|
Vagrant.has_plugin?(plugin) || (
|
||||||
|
puts "The #{plugin} plugin is required. Please install it with:"
|
||||||
|
puts "$ vagrant plugin install #{plugin}"
|
||||||
|
false
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
$provision = <<SCRIPT
|
$provision = <<SCRIPT
|
||||||
|
# see SETUP.md for details
|
||||||
|
|
||||||
cd /vagrant # This is where the host folder/repo is mounted
|
# packages
|
||||||
|
#all | sudo pacman -Syu --noconfirm base-devel
|
||||||
|
sudo pacman -Syu --noconfirm base-devel git libidn
|
||||||
|
sudo pacman -Syu --noconfirm ruby ruby-bundler ruby-irb redis postgresql yarn
|
||||||
|
git clone https://aur.archlinux.org/ruby-foreman.git
|
||||||
|
cd ruby-foreman
|
||||||
|
yes | sudo -u vagrant makepkg -si
|
||||||
|
|
||||||
# Add the yarn repo + yarn repo keys
|
# treehouse mastodon files are synced here
|
||||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
cd /vagrant
|
||||||
sudo apt-add-repository 'deb https://dl.yarnpkg.com/debian/ stable main'
|
|
||||||
|
|
||||||
# Add repo for NodeJS
|
## database
|
||||||
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
|
if [ -d "data/" ]; then rm -rf data/; fi
|
||||||
|
mkdir -p data/
|
||||||
|
pg_ctl -D data/postgres initdb -o '-U mastodon --auth-host=trust'
|
||||||
|
echo 'unix_socket_directories = .' >> data/postgres/postgresql.conf
|
||||||
|
pg_ctl -D data/postgres start --silent
|
||||||
|
|
||||||
# Add firewall rule to redirect 80 to PORT and save
|
# redis
|
||||||
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port #{ENV["PORT"]}
|
mkdir -p data/redis
|
||||||
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections
|
redis-server ./redis-dev.conf
|
||||||
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections
|
|
||||||
sudo apt-get install iptables-persistent -y
|
|
||||||
|
|
||||||
# Add packages to build and run Mastodon
|
# ruby
|
||||||
sudo apt-get install \
|
export RAILS_ENV=development
|
||||||
git-core \
|
if [ -d "vendor/bundle/" ]; then rm -rf vendor/bundle/; fi
|
||||||
g++ \
|
bundle config set --local path 'vendor/bundle/'
|
||||||
libpq-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libxslt1-dev \
|
|
||||||
imagemagick \
|
|
||||||
nodejs \
|
|
||||||
redis-server \
|
|
||||||
redis-tools \
|
|
||||||
postgresql \
|
|
||||||
postgresql-contrib \
|
|
||||||
yarn \
|
|
||||||
libicu-dev \
|
|
||||||
libidn11-dev \
|
|
||||||
libreadline-dev \
|
|
||||||
libpam0g-dev \
|
|
||||||
-y
|
|
||||||
|
|
||||||
# Install rvm
|
|
||||||
read RUBY_VERSION < .ruby-version
|
|
||||||
|
|
||||||
curl -sSL https://rvm.io/mpapis.asc | gpg --import
|
|
||||||
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import
|
|
||||||
|
|
||||||
curl -sSL https://raw.githubusercontent.com/rvm/rvm/stable/binscripts/rvm-installer | bash -s stable --ruby=$RUBY_VERSION
|
|
||||||
source /home/vagrant/.rvm/scripts/rvm
|
|
||||||
|
|
||||||
# Install Ruby
|
|
||||||
rvm reinstall ruby-$RUBY_VERSION --disable-binary
|
|
||||||
|
|
||||||
# Configure database
|
|
||||||
sudo -u postgres createuser -U postgres vagrant -s
|
|
||||||
sudo -u postgres createdb -U postgres mastodon_development
|
|
||||||
|
|
||||||
# Install gems and node modules
|
|
||||||
gem install bundler foreman
|
|
||||||
bundle install
|
bundle install
|
||||||
yarn install
|
yarn install
|
||||||
|
bundle exec rake db:setup
|
||||||
|
|
||||||
# Build Mastodon
|
# run mastodon
|
||||||
export RAILS_ENV=development
|
export NODE_ENV=development
|
||||||
export $(cat ".env.vagrant" | xargs)
|
bundle exec rake assets:precompile
|
||||||
bundle exec rails db:setup
|
foreman start
|
||||||
|
|
||||||
# Configure automatic loading of environment variable
|
|
||||||
echo 'export RAILS_ENV=development' >> ~/.bash_profile
|
|
||||||
echo 'export $(cat "/vagrant/.env.vagrant" | xargs)' >> ~/.bash_profile
|
|
||||||
|
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
$start = <<SCRIPT
|
$start = <<SCRIPT
|
||||||
|
|
||||||
echo 'To start server'
|
export NODE_ENV=development
|
||||||
echo ' $ vagrant ssh -c "cd /vagrant && foreman start"'
|
export RAILS_ENV=development
|
||||||
|
cd /vagrant
|
||||||
|
pg_ctl -D data/postgres start --silent
|
||||||
|
redis-server ./redis-dev.conf
|
||||||
|
foreman start
|
||||||
|
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
VAGRANTFILE_API_VERSION = "2"
|
Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
config.vagrant.plugins = "vagrant-libvirt"
|
||||||
|
|
||||||
config.vm.box = "ubuntu/bionic64"
|
config.vm.box = "archlinux/archlinux"
|
||||||
|
|
||||||
config.vm.provider :virtualbox do |vb|
|
|
||||||
vb.name = "mastodon"
|
|
||||||
vb.customize ["modifyvm", :id, "--memory", "4096"]
|
|
||||||
# Increase the number of CPUs. Uncomment and adjust to
|
|
||||||
# increase performance
|
|
||||||
# vb.customize ["modifyvm", :id, "--cpus", "3"]
|
|
||||||
|
|
||||||
# Disable VirtualBox DNS proxy to skip long-delay IPv6 resolutions.
|
|
||||||
# https://github.com/mitchellh/vagrant/issues/1172
|
|
||||||
vb.customize ["modifyvm", :id, "--natdnsproxy1", "off"]
|
|
||||||
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]
|
|
||||||
|
|
||||||
# Use "virtio" network interfaces for better performance.
|
|
||||||
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
|
|
||||||
vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
# This uses the vagrant-hostsupdater plugin, and lets you
|
|
||||||
# access the development site at http://mastodon.local.
|
|
||||||
# If you change it, also change it in .env.vagrant before provisioning
|
|
||||||
# the vagrant server to update the development build.
|
|
||||||
#
|
|
||||||
# To install:
|
|
||||||
# $ vagrant plugin install vagrant-hostsupdater
|
|
||||||
config.vm.hostname = "mastodon.local"
|
config.vm.hostname = "mastodon.local"
|
||||||
|
|
||||||
if defined?(VagrantPlugins::HostsUpdater)
|
# vagrant ssh -- -R 3000:localhost:3000 (:
|
||||||
config.vm.network :private_network, ip: "192.168.42.42", nictype: "virtio"
|
#config.vm.network :forwarded_port, guest: 3000, host: 3000
|
||||||
config.hostsupdater.remove_on_suspend = false
|
|
||||||
end
|
|
||||||
|
|
||||||
if config.vm.networks.any? { |type, options| type == :private_network }
|
config.vm.synced_folder ".", "/vagrant",
|
||||||
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp', 'actimeo=1']
|
type: "rsync",
|
||||||
else
|
rsync__args: ["--verbose", "--archive", "--delete", "-z"],
|
||||||
config.vm.synced_folder ".", "/vagrant"
|
rsync__exclide: ".git/"
|
||||||
end
|
|
||||||
|
|
||||||
# Otherwise, you can access the site at http://localhost:3000 and http://localhost:4000 , http://localhost:8080
|
|
||||||
config.vm.network :forwarded_port, guest: 3000, host: 3000
|
|
||||||
config.vm.network :forwarded_port, guest: 4000, host: 4000
|
|
||||||
config.vm.network :forwarded_port, guest: 8080, host: 8080
|
|
||||||
|
|
||||||
# Full provisioning script, only runs on first 'vagrant up' or with 'vagrant provision'
|
|
||||||
config.vm.provision :shell, inline: $provision, privileged: false
|
config.vm.provision :shell, inline: $provision, privileged: false
|
||||||
|
|
||||||
# Start up script, runs on every 'vagrant up'
|
|
||||||
config.vm.provision :shell, inline: $start, run: 'always', privileged: false
|
config.vm.provision :shell, inline: $start, run: 'always', privileged: false
|
||||||
|
|
||||||
|
config.vm.provider :libvirt do |libvirt|
|
||||||
|
libvirt.driver = "kvm"
|
||||||
|
libvirt.memory = 4096
|
||||||
|
libvirt.cpus = 4
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -39,6 +39,8 @@ const notFoundFn = () => (
|
||||||
set='twitter'
|
set='twitter'
|
||||||
size={32}
|
size={32}
|
||||||
sheetSize={32}
|
sheetSize={32}
|
||||||
|
sheetColumns={60}
|
||||||
|
sheetRows={60}
|
||||||
backgroundImageFn={backgroundImageFn}
|
backgroundImageFn={backgroundImageFn}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -97,12 +99,12 @@ class ModifierPickerMenu extends React.PureComponent {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='emoji-picker-dropdown__modifiers__menu' style={{ display: active ? 'block' : 'none' }} ref={this.setRef}>
|
<div className='emoji-picker-dropdown__modifiers__menu' style={{ display: active ? 'block' : 'none' }} ref={this.setRef}>
|
||||||
<button onClick={this.handleClick} data-index={1}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={1} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
<button onClick={this.handleClick} data-index={1}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={1} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
||||||
<button onClick={this.handleClick} data-index={2}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={2} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
<button onClick={this.handleClick} data-index={2}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={2} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
||||||
<button onClick={this.handleClick} data-index={3}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={3} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
<button onClick={this.handleClick} data-index={3}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={3} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
||||||
<button onClick={this.handleClick} data-index={4}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={4} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
<button onClick={this.handleClick} data-index={4}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={4} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
||||||
<button onClick={this.handleClick} data-index={5}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={5} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
<button onClick={this.handleClick} data-index={5}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={5} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
||||||
<button onClick={this.handleClick} data-index={6}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={6} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
<button onClick={this.handleClick} data-index={6}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={6} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} /></button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -137,7 +139,7 @@ class ModifierPicker extends React.PureComponent {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='emoji-picker-dropdown__modifiers'>
|
<div className='emoji-picker-dropdown__modifiers'>
|
||||||
<Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={modifier} onClick={this.handleClick} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} />
|
<Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={modifier} onClick={this.handleClick} backgroundImageFn={backgroundImageFn} native={useSystemEmojiFont} />
|
||||||
<ModifierPickerMenu active={active} onSelect={this.handleSelect} onClose={this.props.onClose} />
|
<ModifierPickerMenu active={active} onSelect={this.handleSelect} onClose={this.props.onClose} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -278,6 +280,8 @@ class EmojiPickerMenu extends React.PureComponent {
|
||||||
perLine={8}
|
perLine={8}
|
||||||
emojiSize={22}
|
emojiSize={22}
|
||||||
sheetSize={32}
|
sheetSize={32}
|
||||||
|
sheetColumns={60}
|
||||||
|
sheetRows={60}
|
||||||
custom={buildCustomEmojis(custom_emojis)}
|
custom={buildCustomEmojis(custom_emojis)}
|
||||||
color=''
|
color=''
|
||||||
emoji=''
|
emoji=''
|
||||||
|
|
|
@ -10,6 +10,17 @@ $content-width: 840px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $highlight-text-color;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:active,
|
||||||
|
&:focus {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar-wrapper {
|
.sidebar-wrapper {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 950 B After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 641 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.0 KiB |
|
@ -1,2 +1,139 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="79" height="79" viewBox="0 0 79 75"><symbol id="logo-symbol-icon"><path d="M74.7135 16.6043C73.6199 8.54587 66.5351 2.19527 58.1366 0.964691C56.7196 0.756754 51.351 0 38.9148 0H38.822C26.3824 0 23.7135 0.756754 22.2966 0.964691C14.1319 2.16118 6.67571 7.86752 4.86669 16.0214C3.99657 20.0369 3.90371 24.4888 4.06535 28.5726C4.29578 34.4289 4.34049 40.275 4.877 46.1075C5.24791 49.9817 5.89495 53.8251 6.81328 57.6088C8.53288 64.5968 15.4938 70.4122 22.3138 72.7848C29.6155 75.259 37.468 75.6697 44.9919 73.971C45.8196 73.7801 46.6381 73.5586 47.4475 73.3063C49.2737 72.7302 51.4164 72.086 52.9915 70.9542C53.0131 70.9384 53.0308 70.9178 53.0433 70.8942C53.0558 70.8706 53.0628 70.8445 53.0637 70.8179V65.1661C53.0634 65.1412 53.0574 65.1167 53.0462 65.0944C53.035 65.0721 53.0189 65.0525 52.9992 65.0371C52.9794 65.0218 52.9564 65.011 52.9318 65.0056C52.9073 65.0002 52.8819 65.0003 52.8574 65.0059C48.0369 66.1472 43.0971 66.7193 38.141 66.7103C29.6118 66.7103 27.3178 62.6981 26.6609 61.0278C26.1329 59.5842 25.7976 58.0784 25.6636 56.5486C25.6622 56.5229 25.667 56.4973 25.6775 56.4738C25.688 56.4502 25.7039 56.4295 25.724 56.4132C25.7441 56.397 25.7678 56.3856 25.7931 56.3801C25.8185 56.3746 25.8448 56.3751 25.8699 56.3816C30.6101 57.5151 35.4693 58.0873 40.3455 58.086C41.5183 58.086 42.6876 58.086 43.8604 58.0553C48.7647 57.919 53.9339 57.6701 58.7591 56.7361C58.8794 56.7123 58.9998 56.6918 59.103 56.6611C66.7139 55.2124 73.9569 50.665 74.6929 39.1501C74.7204 38.6967 74.7892 34.4016 74.7892 33.9312C74.7926 32.3325 75.3085 22.5901 74.7135 16.6043ZM62.9996 45.3371H54.9966V25.9069C54.9966 21.8163 53.277 19.7302 49.7793 19.7302C45.9343 19.7302 44.0083 22.1981 44.0083 27.0727V37.7082H36.0534V27.0727C36.0534 22.1981 34.124 19.7302 30.279 19.7302C26.8019 19.7302 25.0651 21.8163 25.0617 25.9069V45.3371H17.0656V25.3172C17.0656 21.2266 18.1191 17.9769 20.2262 15.568C22.3998 13.1648 25.2509 11.9308 28.7898 11.9308C32.8859 11.9308 35.9812 13.492 38.0447 16.6111L40.036 19.9245L42.0308 16.6111C44.0943 13.492 47.1896 11.9308 51.2788 11.9308C54.8143 11.9308 57.6654 13.1648 59.8459 15.568C61.9529 17.9746 63.0065 21.2243 63.0065 25.3172L62.9996 45.3371Z" fill="currentColor"/></symbol><use xlink:href="#logo-symbol-icon" style="color:#fff" /></svg>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="100mm"
|
||||||
|
height="100mm"
|
||||||
|
viewBox="0 0 100 100"
|
||||||
|
version="1.1"
|
||||||
|
id="svg299"
|
||||||
|
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14, custom)"
|
||||||
|
sodipodi:docname="treehouse-icon-wordmark.svg"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:export-filename="safari-1024x1024.png"
|
||||||
|
inkscape:export-xdpi="260.10001"
|
||||||
|
inkscape:export-ydpi="260.10001"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||||
|
id="namedview301"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="2.1739703"
|
||||||
|
inkscape:cx="171.11549"
|
||||||
|
inkscape:cy="141.21628"
|
||||||
|
inkscape:window-width="1623"
|
||||||
|
inkscape:window-height="1371"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer1" /><defs
|
||||||
|
id="defs296"><linearGradient
|
||||||
|
id="linearGradient34140"
|
||||||
|
inkscape:swatch="solid"><stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop34138" /></linearGradient><clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath266"><rect
|
||||||
|
style="fill:#000000;stroke-width:0.75"
|
||||||
|
id="rect268"
|
||||||
|
width="300"
|
||||||
|
height="300"
|
||||||
|
x="0.89256281"
|
||||||
|
y="-298.39465"
|
||||||
|
transform="scale(1,-1)" /></clipPath><clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath262"><rect
|
||||||
|
style="fill:#000000;stroke-width:0.75"
|
||||||
|
id="rect264"
|
||||||
|
width="300"
|
||||||
|
height="300"
|
||||||
|
x="0.89256281"
|
||||||
|
y="-298.39465"
|
||||||
|
transform="scale(1,-1)" /></clipPath><clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath258"><rect
|
||||||
|
style="fill:#000000;stroke-width:0.75"
|
||||||
|
id="rect260"
|
||||||
|
width="300"
|
||||||
|
height="300"
|
||||||
|
x="0.89256281"
|
||||||
|
y="-298.39465"
|
||||||
|
transform="scale(1,-1)" /></clipPath><clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath254"><rect
|
||||||
|
style="fill:#000000;stroke-width:0.75"
|
||||||
|
id="rect256"
|
||||||
|
width="300"
|
||||||
|
height="300"
|
||||||
|
x="0.89256281"
|
||||||
|
y="-298.39465"
|
||||||
|
transform="scale(1,-1)" /></clipPath><clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath250"><rect
|
||||||
|
style="fill:#000000;stroke-width:0.75"
|
||||||
|
id="rect252"
|
||||||
|
width="300"
|
||||||
|
height="300"
|
||||||
|
x="0.89256281"
|
||||||
|
y="-298.39465"
|
||||||
|
transform="scale(1,-1)" /></clipPath><clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath246"><rect
|
||||||
|
style="fill:#000000;stroke-width:0.75"
|
||||||
|
id="rect248"
|
||||||
|
width="300"
|
||||||
|
height="300"
|
||||||
|
x="0.89256281"
|
||||||
|
y="-298.39465"
|
||||||
|
transform="scale(1,-1)" /></clipPath><mask
|
||||||
|
maskUnits="userSpaceOnUse"
|
||||||
|
id="mask1677"><image
|
||||||
|
width="100"
|
||||||
|
height="100"
|
||||||
|
preserveAspectRatio="none"
|
||||||
|
xlink:href="data:image/png;base64,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 spRuksf/AQGJjDhvlYqLAAAAAElFTkSuQmCC "
|
||||||
|
id="image1679"
|
||||||
|
x="-142.08125"
|
||||||
|
y="-68.527077"
|
||||||
|
style="fill:#000000;fill-opacity:1" /></mask></defs><g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"><g
|
||||||
|
id="g9734"
|
||||||
|
transform="translate(-0.56747079,-0.60319788)"
|
||||||
|
style="fill:#000000;fill-opacity:1"><path
|
||||||
|
id="path9722"
|
||||||
|
clip-path="url(#clipPath266)"
|
||||||
|
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.04672"
|
||||||
|
d="m 148.10952,261.04452 c -2.06649,0.0422 -4.13783,0.0165 -6.20654,-0.082 -9.03297,-0.43028 -17.4723,-1.69278 -25.21582,-3.6709 1.95723,-3.04579 3.62861,-6.19047 4.86181,-9.41895 1.0933,-2.86169 2.06819,-6.06832 2.93702,-9.39404 5.97882,1.41185 12.41455,2.26761 19.3374,2.43164 7.8224,0.18531 15.14923,-0.68835 21.97412,-2.31592 0.86115,3.28373 1.82434,6.45027 2.90479,9.27832 1.23038,3.22113 2.88552,6.3635 4.83691,9.40284 -7.87565,2.15196 -16.58364,3.58862 -25.42969,3.76904 z M 86.219871,243.54843 C 79.135999,238.83894 72.903758,233.56337 67.024558,227.68417 49.557998,210.21762 36.413306,184.82735 36.943991,150.03133 37.322903,125.20846 46.732098,105.05671 57.637839,90.085532 61.45103,84.852994 65.425291,79.543181 70.00991,75.366781 c 19.181088,-17.465513 42.57142,-30.269605 77.8667,-30.079102 15.91534,0.08478 31.16013,4.698278 43.30518,10.453125 12.23927,5.799859 22.86841,13.510545 31.35937,22.612794 8.56947,9.187033 15.97962,19.660028 21.33252,32.425782 5.2315,12.47583 9.54041,27.78413 8.74805,45.22559 -0.73166,16.10163 -4.59718,31.20723 -10.45459,43.30517 -8.99238,18.57589 -21.58401,33.19172 -38.1958,44.06397 -2.31466,-6.63911 -4.61328,-13.17798 -6.85254,-19.50586 3.44267,-2.57487 6.59968,-5.30936 9.42187,-8.13135 14.29397,-14.29395 25.48515,-34.26814 26.02735,-61.65234 0.54115,-27.4062 -11.35774,-48.68927 -25.17334,-62.504888 -14.30339,-14.304424 -34.60695,-26.239746 -61.43848,-26.239746 -27.74113,0 -48.035409,10.491046 -62.718751,25.17334 -13.699435,13.699434 -26.239746,34.165224 -26.239746,61.438474 0,27.79034 10.744976,48.07693 25.171875,62.50489 3.314031,3.31403 6.965461,6.49069 10.954102,9.43213 -2.257102,6.37839 -4.571641,12.9692 -6.903809,19.65967 z"
|
||||||
|
transform="matrix(0.35277777,0,0,-0.35277777,-0.52260784,108.57872)" /><g
|
||||||
|
id="g9726"
|
||||||
|
clip-path="url(#clipPath262)"
|
||||||
|
transform="matrix(0.35277777,0,0,-0.35277777,-0.52260784,108.57872)"
|
||||||
|
style="fill:#000000;fill-opacity:1"><path
|
||||||
|
id="path9724"
|
||||||
|
style="color:#000000;fill:#000000;stroke-width:7.79528;-inkscape-stroke:none;fill-opacity:1"
|
||||||
|
d="m 75.314109,288.61142 c 0.792777,-2.69314 1.634814,-5.51875 2.904786,-9.4292 3.288523,-10.12592 7.91432,-23.60109 12.613769,-37.04883 8.510354,-24.35287 15.714366,-44.24376 17.293946,-48.61524 l 17.83447,13.95117 c -0.34406,3.20433 -2.77605,25.20128 -8.05224,39.01172 v 0.001 c -2.69383,7.05234 -7.75838,14.01594 -13.73438,20.22656 -7.323043,7.61056 -15.978751,14.09202 -22.936522,18.52002 -2.358994,1.50129 -4.088107,2.38872 -5.923829,3.38233 z" /></g><g
|
||||||
|
id="g9730"
|
||||||
|
clip-path="url(#clipPath258)"
|
||||||
|
transform="matrix(0.35277777,0,0,-0.35277777,-0.52260784,108.57872)"
|
||||||
|
style="fill:#000000;fill-opacity:1"><path
|
||||||
|
id="path9728"
|
||||||
|
style="color:#000000;fill:#000000;stroke-width:7.79528;-inkscape-stroke:none;fill-opacity:1"
|
||||||
|
d="m 214.98257,288.76376 c -0.13295,-0.0727 -0.19067,-0.0887 -0.32666,-0.16406 -3.98394,-2.20699 -9.28528,-5.56377 -14.80371,-9.75147 -11.03686,-8.37541 -22.86033,-20.19752 -27.5083,-32.36572 v -0.001 c -5.27619,-13.81042 -7.70819,-35.80734 -8.05225,-39.01172 l 17.83301,-13.95117 c 1.5796,4.37153 8.7836,24.2624 17.29394,48.61524 4.69945,13.44774 9.32378,26.92291 12.61231,37.04883 1.29043,3.97344 2.15527,6.86878 2.95166,9.58154 z" /></g><path
|
||||||
|
d="m 173.4755,165.60476 c -0.4773,6.26252 -0.12456,18.21709 -3.41335,22.39978 -2.90046,3.68864 -10.18248,3.58187 -17.06675,3.83936 -6.86752,0.2575 -12.48631,0.65316 -17.91878,0 -5.70462,-0.6856 -11.77872,-0.0314 -14.93354,-3.41335 -3.47091,-3.72108 -3.30135,-14.73047 -3.83936,-21.97272 -1.10533,-14.86654 -0.58616,-29.35627 -13.86693,-31.14616 0.12247,-1.65486 -0.25749,-3.8132 0.21353,-5.1195 27.39054,-0.17271 56.5605,-0.48045 84.47858,0 0.3203,1.41097 0.3203,3.70852 0,5.1195 -13.07247,1.98981 -12.54074,15.70601 -13.6534,30.29309 m -40.53209,59.51852 h 24.31946 c 0.49301,-3.98695 0.0743,-8.8856 0.21249,-13.22634 12.614,-1.12731 25.68962,-0.0429 31.35969,-7.8933 4.38052,-6.06469 4.12303,-17.83295 4.90702,-28.15988 1.35027,-17.79945 0.3496,-34.36692 18.34584,-35.41154 -0.2397,-9.97523 0.50661,-21.91934 -0.42706,-30.50662 h -54.39798 c -0.62908,-4.70396 0.20307,-10.87018 -0.42706,-15.57308 -8.03671,0.1413 -16.63864,-0.28262 -24.31946,0.21353 -0.49405,4.62545 -0.0733,10.16573 -0.21353,15.14602 -18.17209,0.56523 -38.38841,-0.10153 -54.825041,0.42706 v 30.50662 c 5.375951,0.63012 10.631521,2.43153 13.438821,6.39964 3.98172,5.62506 4.12408,16.23356 4.90702,25.81208 1.21629,14.87806 0.30041,30.53069 10.66607,35.62612 6.43104,3.16109 15.7573,2.71624 25.81313,3.19982 0.75259,3.9409 -0.45951,9.84648 0.64059,13.43987"
|
||||||
|
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.75;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path9732"
|
||||||
|
clip-path="url(#clipPath254)"
|
||||||
|
transform="matrix(0.35277777,0,0,-0.35277777,-0.52260784,108.57872)" /></g></g></svg>
|
||||||
|
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 12 KiB |
|
@ -38,6 +38,8 @@ const notFoundFn = () => (
|
||||||
set='twitter'
|
set='twitter'
|
||||||
size={32}
|
size={32}
|
||||||
sheetSize={32}
|
sheetSize={32}
|
||||||
|
sheetColumns={60}
|
||||||
|
sheetRows={60}
|
||||||
backgroundImageFn={backgroundImageFn}
|
backgroundImageFn={backgroundImageFn}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -96,12 +98,12 @@ class ModifierPickerMenu extends React.PureComponent {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='emoji-picker-dropdown__modifiers__menu' style={{ display: active ? 'block' : 'none' }} ref={this.setRef}>
|
<div className='emoji-picker-dropdown__modifiers__menu' style={{ display: active ? 'block' : 'none' }} ref={this.setRef}>
|
||||||
<button type='button' onClick={this.handleClick} data-index={1}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={1} backgroundImageFn={backgroundImageFn} /></button>
|
<button type='button' onClick={this.handleClick} data-index={1}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={1} backgroundImageFn={backgroundImageFn} /></button>
|
||||||
<button type='button' onClick={this.handleClick} data-index={2}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={2} backgroundImageFn={backgroundImageFn} /></button>
|
<button type='button' onClick={this.handleClick} data-index={2}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={2} backgroundImageFn={backgroundImageFn} /></button>
|
||||||
<button type='button' onClick={this.handleClick} data-index={3}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={3} backgroundImageFn={backgroundImageFn} /></button>
|
<button type='button' onClick={this.handleClick} data-index={3}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={3} backgroundImageFn={backgroundImageFn} /></button>
|
||||||
<button type='button' onClick={this.handleClick} data-index={4}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={4} backgroundImageFn={backgroundImageFn} /></button>
|
<button type='button' onClick={this.handleClick} data-index={4}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={4} backgroundImageFn={backgroundImageFn} /></button>
|
||||||
<button type='button' onClick={this.handleClick} data-index={5}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={5} backgroundImageFn={backgroundImageFn} /></button>
|
<button type='button' onClick={this.handleClick} data-index={5}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={5} backgroundImageFn={backgroundImageFn} /></button>
|
||||||
<button type='button' onClick={this.handleClick} data-index={6}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={6} backgroundImageFn={backgroundImageFn} /></button>
|
<button type='button' onClick={this.handleClick} data-index={6}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={6} backgroundImageFn={backgroundImageFn} /></button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -136,7 +138,7 @@ class ModifierPicker extends React.PureComponent {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='emoji-picker-dropdown__modifiers'>
|
<div className='emoji-picker-dropdown__modifiers'>
|
||||||
<Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={modifier} onClick={this.handleClick} backgroundImageFn={backgroundImageFn} />
|
<Emoji emoji='fist' set='twitter' size={22} sheetSize={32} sheetColumns={60} sheetRows={60} skin={modifier} onClick={this.handleClick} backgroundImageFn={backgroundImageFn} />
|
||||||
<ModifierPickerMenu active={active} onSelect={this.handleSelect} onClose={this.props.onClose} />
|
<ModifierPickerMenu active={active} onSelect={this.handleSelect} onClose={this.props.onClose} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -277,6 +279,8 @@ class EmojiPickerMenu extends React.PureComponent {
|
||||||
perLine={8}
|
perLine={8}
|
||||||
emojiSize={22}
|
emojiSize={22}
|
||||||
sheetSize={32}
|
sheetSize={32}
|
||||||
|
sheetColumns={60}
|
||||||
|
sheetRows={60}
|
||||||
custom={buildCustomEmojis(custom_emojis)}
|
custom={buildCustomEmojis(custom_emojis)}
|
||||||
color=''
|
color=''
|
||||||
emoji=''
|
emoji=''
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
- %w(57 60 72 76 114 120 144 152 167 180 1024).each do |size|
|
- %w(57 60 72 76 114 120 144 152 167 180 1024).each do |size|
|
||||||
%link{ rel: 'apple-touch-icon', sizes: "#{size}x#{size}", href: asset_pack_path("media/icons/apple-touch-icon-#{size}x#{size}.png") }/
|
%link{ rel: 'apple-touch-icon', sizes: "#{size}x#{size}", href: asset_pack_path("media/icons/apple-touch-icon-#{size}x#{size}.png") }/
|
||||||
|
|
||||||
%link{ rel: 'mask-icon', href: asset_pack_path('media/images/logo-symbol-icon.svg'), color: '#6364FF' }/
|
%link{ rel: 'mask-icon', href: asset_pack_path('media/images/logo-symbol-icon.svg'), color: '#00AEEF' }/
|
||||||
%link{ rel: 'manifest', href: manifest_path(format: :json) }/
|
%link{ rel: 'manifest', href: manifest_path(format: :json) }/
|
||||||
%meta{ name: 'theme-color', content: '#191b22' }/
|
%meta{ name: 'theme-color', content: '#191b22' }/
|
||||||
%meta{ name: 'apple-mobile-web-app-capable', content: 'yes' }/
|
%meta{ name: 'apple-mobile-web-app-capable', content: 'yes' }/
|
||||||
|
|
|
@ -39,7 +39,7 @@ Rails.application.configure do
|
||||||
|
|
||||||
# Specifies the header that your server uses for sending files.
|
# Specifies the header that your server uses for sending files.
|
||||||
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
||||||
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
||||||
|
|
||||||
# Allow to specify public IP of reverse proxy if it's needed
|
# Allow to specify public IP of reverse proxy if it's needed
|
||||||
config.action_dispatch.trusted_proxies = ENV['TRUSTED_PROXY_IP'].split(/(?:\s*,\s*|\s+)/).map { |item| IPAddr.new(item) } if ENV['TRUSTED_PROXY_IP'].present?
|
config.action_dispatch.trusted_proxies = ENV['TRUSTED_PROXY_IP'].split(/(?:\s*,\s*|\s+)/).map { |item| IPAddr.new(item) } if ENV['TRUSTED_PROXY_IP'].present?
|
||||||
|
|
|
@ -31,7 +31,7 @@ if Rails.env.production?
|
||||||
p.base_uri :none
|
p.base_uri :none
|
||||||
p.default_src :none
|
p.default_src :none
|
||||||
p.frame_ancestors :none
|
p.frame_ancestors :none
|
||||||
p.script_src :self, assets_host
|
p.script_src :self, assets_host, :unsafe_eval
|
||||||
p.font_src :self, assets_host
|
p.font_src :self, assets_host
|
||||||
p.img_src :self, :data, :blob, *data_hosts
|
p.img_src :self, :data, :blob, *data_hosts
|
||||||
p.style_src :self, assets_host
|
p.style_src :self, assets_host
|
||||||
|
|
|
@ -99,7 +99,7 @@ en:
|
||||||
imports:
|
imports:
|
||||||
data: CSV file exported from another Mastodon server
|
data: CSV file exported from another Mastodon server
|
||||||
invite_request:
|
invite_request:
|
||||||
text: This will help us review your application
|
text: "Be sure to provide at least one link to an established account on another social website: GitHub, Twitter, or a personal blog or website. This will help us review your request in a timely manner."
|
||||||
ip_block:
|
ip_block:
|
||||||
comment: Optional. Remember why you added this rule.
|
comment: Optional. Remember why you added this rule.
|
||||||
expires_in: IP addresses are a finite resource, they are sometimes shared and often change hands. For this reason, indefinite IP blocks are not recommended.
|
expires_in: IP addresses are a finite resource, they are sometimes shared and often change hands. For this reason, indefinite IP blocks are not recommended.
|
||||||
|
|
|
@ -1,17 +1,36 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'pathname'
|
||||||
|
|
||||||
def setup_redis_env_url(prefix = nil, defaults = true)
|
def setup_redis_env_url(prefix = nil, defaults = true)
|
||||||
prefix = prefix.to_s.upcase + '_' unless prefix.nil?
|
prefix = "#{prefix.to_s.upcase}_" unless prefix.nil?
|
||||||
prefix = '' if prefix.nil?
|
prefix = '' if prefix.nil?
|
||||||
|
redis_url_key = "#{prefix}REDIS_URL"
|
||||||
|
|
||||||
return if ENV[prefix + 'REDIS_URL'].present?
|
if ENV[redis_url_key].present?
|
||||||
|
conn = +ENV["#{prefix}REDIS_URL"].sub(/redis:\/\//i, '')
|
||||||
|
|
||||||
password = ENV.fetch(prefix + 'REDIS_PASSWORD') { '' if defaults }
|
# Strip any prefixing `unix://`
|
||||||
host = ENV.fetch(prefix + 'REDIS_HOST') { 'localhost' if defaults }
|
unix = !conn.sub!(/^unix:\/\//i, '').nil?
|
||||||
port = ENV.fetch(prefix + 'REDIS_PORT') { 6379 if defaults }
|
# Strip any prefixing `./`
|
||||||
db = ENV.fetch(prefix + 'REDIS_DB') { 0 if defaults }
|
unix |= conn.sub!(/^(\.\/)+/, '')
|
||||||
|
unix |= conn.start_with?('/')
|
||||||
|
|
||||||
ENV[prefix + 'REDIS_URL'] = begin
|
if unix
|
||||||
|
pn = Pathname.new(conn)
|
||||||
|
pn = Pathname.getwd / pn if pn.relative?
|
||||||
|
ENV[redis_url_key] = "unix://#{pn}"
|
||||||
|
end
|
||||||
|
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
password = ENV.fetch("#{prefix}REDIS_PASSWORD") { '' if defaults }
|
||||||
|
host = ENV.fetch("#{prefix}REDIS_HOST") { 'localhost' if defaults }
|
||||||
|
port = ENV.fetch("#{prefix}REDIS_PORT") { 6379 if defaults }
|
||||||
|
db = ENV.fetch("#{prefix}REDIS_DB") { 0 if defaults }
|
||||||
|
|
||||||
|
ENV["#{prefix}REDIS_URL"] = begin
|
||||||
if [password, host, port, db].all?(&:nil?)
|
if [password, host, port, db].all?(&:nil?)
|
||||||
ENV['REDIS_URL']
|
ENV['REDIS_URL']
|
||||||
else
|
else
|
||||||
|
@ -27,7 +46,7 @@ setup_redis_env_url(:cache, false)
|
||||||
setup_redis_env_url(:sidekiq, false)
|
setup_redis_env_url(:sidekiq, false)
|
||||||
|
|
||||||
namespace = ENV.fetch('REDIS_NAMESPACE', nil)
|
namespace = ENV.fetch('REDIS_NAMESPACE', nil)
|
||||||
cache_namespace = namespace ? namespace + '_cache' : 'cache'
|
cache_namespace = namespace ? "#{namespace}_cache" : 'cache'
|
||||||
sidekiq_namespace = namespace
|
sidekiq_namespace = namespace
|
||||||
|
|
||||||
REDIS_CACHE_PARAMS = {
|
REDIS_CACHE_PARAMS = {
|
||||||
|
|
|
@ -21,7 +21,7 @@ module Mastodon
|
||||||
end
|
end
|
||||||
|
|
||||||
def suffix
|
def suffix
|
||||||
'+glitch'
|
'+glitch+th'
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_a
|
def to_a
|
||||||
|
|
Before Width: | Height: | Size: 3.9 MiB After Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -0,0 +1,12 @@
|
||||||
|
# This redis configuration is for development only
|
||||||
|
|
||||||
|
daemonize yes
|
||||||
|
|
||||||
|
dir ./data/redis
|
||||||
|
pidfile ./redis-dev.pid
|
||||||
|
|
||||||
|
unixsocket ./redis-dev.sock
|
||||||
|
unixsocketperm 700
|
||||||
|
|
||||||
|
# Disable TCP
|
||||||
|
port 0
|
|
@ -18,7 +18,7 @@ const env = process.env.NODE_ENV || 'development';
|
||||||
const alwaysRequireAuth = process.env.LIMITED_FEDERATION_MODE === 'true' || process.env.WHITELIST_MODE === 'true' || process.env.AUTHORIZED_FETCH === 'true';
|
const alwaysRequireAuth = process.env.LIMITED_FEDERATION_MODE === 'true' || process.env.WHITELIST_MODE === 'true' || process.env.AUTHORIZED_FETCH === 'true';
|
||||||
|
|
||||||
dotenv.config({
|
dotenv.config({
|
||||||
path: env === 'production' ? '.env.production' : '.env',
|
path: env === 'production' || env === 'development' ? `.env.${env}` : '.env',
|
||||||
});
|
});
|
||||||
|
|
||||||
log.level = process.env.LOG_LEVEL || 'verbose';
|
log.level = process.env.LOG_LEVEL || 'verbose';
|
||||||
|
|