diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..eb781c1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Nikurasu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e54abec --- /dev/null +++ b/README.md @@ -0,0 +1,104 @@ +# 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. \ No newline at end of file diff --git a/demo.png b/demo.png new file mode 100644 index 0000000..341b53a Binary files /dev/null and b/demo.png differ diff --git a/docker/stacks/production/docker-compose.yml b/docker/stacks/production/docker-compose.yml new file mode 100644 index 0000000..3fd15a2 --- /dev/null +++ b/docker/stacks/production/docker-compose.yml @@ -0,0 +1,9 @@ +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" \ No newline at end of file diff --git a/src/.env.example b/src/.env.example index 5c002e0..c9b22f7 100644 --- a/src/.env.example +++ b/src/.env.example @@ -8,11 +8,11 @@ LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=social_tree -DB_USERNAME=root +DB_CONNECTION=sqlite +DB_HOST= +DB_PORT= +DB_DATABASE= +DB_USERNAME= DB_PASSWORD= BROADCAST_DRIVER=log diff --git a/src/public/img/download20210506213644.png b/src/public/img/profilepic.png similarity index 100% rename from src/public/img/download20210506213644.png rename to src/public/img/profilepic.png diff --git a/src/resources/views/linkpage.blade.php b/src/resources/views/linkpage.blade.php index 905a0ed..885ec6a 100644 --- a/src/resources/views/linkpage.blade.php +++ b/src/resources/views/linkpage.blade.php @@ -1,5 +1,5 @@
- +

@{{$username}}

- - {{json_encode($links)}}