This repository has been archived on 2022-11-29. You can view files and clone it, but cannot push or open issues or pull requests.
socialtree-laravel/README.md

104 lines
3.4 KiB
Markdown
Raw Normal View History

# Socialtree
![demoimage](demo.png)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)
[![Docker](https://badgen.net/badge/icon/docker?icon=docker&label)](https://https://docker.com/)
![Maintainer](https://img.shields.io/badge/maintainer-Nikurasu-blue)
A webpage to display links to your social media accounts, not more, but also not less.
[Overview](#overview) • [Installation](#installation) • [Building](#building) • [License](https://lbesson.mit-license.org/)
## Overview
Socialtree is a Webpage writen in php with the laravel framework to display all the links to your social media
accounts. It is ment to run within docker, but it also works on baremetal.
### Features
- [x] Preloading the links and settings before first start with a json file
- [x] Laravel command to reload the config and links
- [ ] Laravel command to change the links
- [ ] Different Themes (The next theme planned is a [DoodleCSS](https://github.com/chr15m/DoodleCSS) Theme)
- [ ] Admin interface
## Installation
As mentioned, the easiest way to do this is via Docker. For that you can use this
[docker-compose.yml](https://git.nikurasu.de/Nikurasu/socialtree/src/branch/main/docker/stacks/production/docker-compose.yml)
file or modify it for your needs.
```yaml
version: "3"
services:
web:
image: nikurasukun/socialtree:latest
volumes:
- PATH/TO/CONFIG.json:/var/www/html/src/resources/data.json
- PATH/TO/PROFILE/PICTURE.png:/var/www/html/src/public/img/profilepic.png
ports:
- "40890:80"
```
Mount your profile pic to `/var/www/html/src/resources/data.json` and the json with the config to
`/var/www/html/src/public/img/profilepic.png`
It has to look like this
```json
{
"username": "Nikurasu",
"theme": "orange",
"links": [{
"platform": "Twitter",
"link": "https://twitter.com/nik_png",
"linktext": "Twitter",
"brandcolors": 1
},
{
"platform": "Mastodon",
"link": "https://layer8.space/@Nikurasukun",
"linktext": "Mastodon",
"brandcolors": 0
}
]
}
```
With `username` you specify the displayed name. The `theme` option specifies the theme of the page. Currently these
themes are available:
- `orange`
In the `links` array you can specify as many links as you want. The `platform` option is used for the coloring of the link.
At the moment I support these platforms:
- YouTube
- Pinterest
- Twitter
- TikTok
- Telegram
- Facebook
- LinkedIn
- Mastodon
- Tumblr
- VK
- Discord
- Twitch
- Instagram
- Flickr
- Deviantart
- Spotify
- Snapchat
- Reddit
- Soundcloud
- Steam
Besides coloring this option has no effect. You can make a Green Youtube Link with the `Deviantart` option if you want.
And this option isn't case sensitive.
`Link` specifies, of corse the link. With `linktext` you can specify the displayed text for the link. And with `brandcolors`
you can enable the coloring of the link in the colors of the platform you specified with `platform`.
You can change all of the settings in the running container with:
```shell
docker exec -d CONTAINER-NAME php src/artisan preloadDB:all
```
You can use the project without docker for sure, but I don't provide support for that.
## Building
If you want you can build the container by yourself. Simply run `docker build` from the project root. The Dockerfile is
in the `docker/images/base` directory. But you have to create your own `env` file and `src/resources/database.db` file
for that.