Initial commit

This will probably not lint successfully
This commit is contained in:
MagicalCodeMonkey
2020-03-30 23:34:20 -04:00
commit 3e6ff9a133
30 changed files with 809 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
root = true
[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
[*.md]
indent_style = space
indent_size = 2
[*.yaml,*.yml]
indent_style = space
indent_size = 2
+41
View File
@@ -0,0 +1,41 @@
name: CI
on: [push, pull_request]
jobs:
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: markdownlint
run: |
echo '{"default": true,"line_length": false,"no-inline-html": false,"first-line-h1": false}' > .markdownlint.json
while IFS= read -r line; do echo "Linting ${line}"; docker run --rm -v "${PWD}:/markdown" -v "${PWD}:${PWD}" 06kellyjac/markdownlint-cli "${PWD}/${line}" || exit 1; done < <(git ls-files '*.md')
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: yamllint
run: |
while IFS= read -r line; do echo "Linting ${line}"; docker run --rm -v "${PWD}:${PWD}" sdesbure/yamllint yamllint -d '{extends: default, rules: {document-start: {present: false}, line-length: disable}}' "${PWD}/${line}" || exit 1; done < <(git ls-files '*.yaml' '*.yml')
deploy:
needs: [markdownlint, yamllint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: mkdocs
run: |
docker run --rm -v ${PWD}/site:/site -v ${PWD}:/docs squidfunk/mkdocs-material:5.0.0rc4 build --verbose --clean --strict
sudo cp ${PWD}/CNAME ${PWD}/site/
- name: deploy
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./site
with:
emptyCommits: "false"
+11
View File
@@ -0,0 +1,11 @@
# Contributing
Contributions to SyncLounge are welcome and there are a few ways to contribute!
1. Donating
- You can help SyncLounge by [donating](/contributing/donating/). All donations to SyncLounge go directly towards running the SyncLounge public servers and the continued development of the application.
1. Documentation
- Help SyncLounge by updating this documentation! You can get started by reading the [Documenation Guidelines](/contributing/documentation-guidelines/)
1. Development
- Interested in getting your hands dirty? Head to the [Developing](/contributing/developing/) section to get started!
+25
View File
@@ -0,0 +1,25 @@
# Developing
We'll gladly merge Pull requests if you're keen to get hands on with the development!
## Requirements
* Node v8.4.0+
## Running
1. Clone the repo: `git clone https://github.com/samcm/SyncLounge`
1. Change to the directory: `cd synclounge`
1. Install packages and dependencies: `npm install`
1. Run the development server: `npm run dev`
Once Webpack has finished compiling, navigate to http://localhost:8080 in your web browser.
Notes:
* Hot reload is enabled!
* It is suggested to install Vue.js [Devtools](https://vuejs.org/v2/cookbook/debugging-in-vscode.html#Vue-Devtools)
* [Chrome Extension](https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
* [Firefox Addon](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
* If you use VS Code, see VueJS's [Debugging in VS Code](https://vuejs.org/v2/cookbook/debugging-in-vscode.html)
@@ -0,0 +1,21 @@
# Documentation Guidelines
Almost all of the pages in this documentation are written in markdown and conform to the rules of markdownlint. If you contribute to the documentation, make sure that your edits pass linting which will automatically occur once you submit you changes.
If you run into any linting issues, you may find a full list of linting rules, and examples, in the [markdownlint repository](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md)
Highlights:
- Heading levels should only increment by one level at a time.
- No hard tabs. All indentation should use spaces and be consistent.
- There should be no more than 1 blank line between text or elements.
- Unordered lists elements should start with `-`.
- Ordered list should all start with `1.` regardless of the order. Markdown will handle the proper numbering sequence when rendering.
- Headings, lists, and code blocks (possibly more) should be surrounded by blank lines.
- Images should have alternate text (alt text).
- Files should end with a blank line.
- Disabled rules:
- Line length
- No Inline HTML
- First line in file should be a top level heading
+13
View File
@@ -0,0 +1,13 @@
# Donating
How to donate:
- [PayPal](https://paypal.me/PlexTogether)
- Cyrptocurrency:
- ETH: 0xC886a3b94867AC12901220BBcbFD407e60E009A5
- LTC: LQkfMbcFGQgMZWw13hbzbYkRkSM6n1fZjE
- BTC: 3Q7wZnUdJMQi53eH3dErms9Tno7VGmTHZL
- BCH: 1K3ULWzW9dLyGbtpnNqUysHuj1suZFXtx4
If you make a donation, stop by the Discord and message samcm#2715 to get your Donator role. Thank you!
+55
View File
@@ -0,0 +1,55 @@
hide_nav_left: true
hide_nav_right: true
# FAQ
## General
- _Do I have to have a Plex account to use SyncLounge?_
- Yes.
- _Why do I have to log in with my Plex account?_
- SyncLounge uses your Plex account to fetch details about your Plex Clients and Media Servers to use within the app. For security concerns, see the 'Security' section below.
- _Can I make someone else the 'host' of a room?_
- Yes! Double-click their avatar to make them a host.
## Issues
- _I can't log in to SyncLounge_
- This is most likely due to Popup Blocking. If you press the "Click me" button and nothing happens, make sure that your browser isn't blocking popups for the site.
- _When trying to connect, "Unable to connect" "Try disabling your adblocker" appears even though there is no adblocker or it has been disabled._
- This indicates that SyncLounge was unable to connect to the server properly. Here are known reasons why the connection may be blocked or not work properly:
- An adblocker, firewall, network configuration, ISP, or some other software on your computer is blocking the connection.
- The server owner's firewall, network configuration, ISP, or some other software is blocking the connection.
- Remote access is not enabled on the server or it isn't working properly.
- _Client X isn't working!_
- If you use the Plex Desktop app, you may encounter issues. Try the original [Plex Media Player application](https://forums.plex.tv/t/plex-media-player/120475/100) for Windows and MacOS. Scroll down to the newest to download.
- If the site is running using SSL (HTTPS), due to the way some of the Plex clients have been made they can only operate using HTTP. If the site allows for HTTP use, like the [hosted Synclounge does](http://app.synclounge.tv/) then try that to see if it will work.
- If you are using the new Plex Player, Plex changed the way it operates. Try changing back to the "old player" and see if it works.
- SyncLounge tries to maintain support as many clients as possible. However, changes to implementation on Plex's or the client's side can cause them to no longer work properly.
- _Someone in my room is getting "the quota has been exceeded" error_
- Lower the bitrate (aka streaming quality) on the client.
If any of the above don't answer your question or address your issue, check the [Issue Tracker](https://github.com/samcm/synclounge/issues) and [Discord](https://discord.gg/fKQB3yt) to see if your issue has been reported already. If not, let us know!
## Security
- _Won't you have access to my username, password?_
- No. SyncLounge uses Plex's OAuth to log in, so your username and password are never seen by SyncLounge.
- _Won't you have access to my Plex Account?_
- All details provided by Plex are stored client side (in your browser). Absolutely none of your **confidential** data is sent to our server. You can verify this by inspecting the Network tab within Chrome developer tools. If you would like, you can [host SyncLounge yourself](/self-hosted/getting-started/).
- _What is sent then?_
- When you've connected to a SyncLounge room, a few details are sent back and forth to the SyncLounge Server to enable syncing. The data sent contains the following:
- Plex Username
- Plex User Thumbnail URL
- Content playing title (Eg. Lord of the Rings: The Fellowship of the Ring)
- Current timestamp (Eg. 00:35:02)
- Maximum timestamp (Eg. 03:48:18)
- Host content ratingKey
- Host machineIdentifier
- Playerstate (Eg. paused, stopped, playing)
- Client response time (Ping time between you and your Plex Client)
- SL Server address, SL Server Room and SL Server Room Password are sent to the WebApp when you join a room to create shortened invite links.
- _What about the public server provided by SyncLounge? Is my data safe?_
- As noted above, SyncLounge gets none of your **confidential** data and we log absolutely nothing to disk. Data is kept within the room instance until you leave or the server restarts. We have enabled SSL on our public servers but if privacy is a concern for you we strongly suggest [running your own server](/self-hosted/getting-started/).
- _Speaking of SSL, why isn't the site served over HTTPS?_
- By default SyncLounge is served via HTTP. While we do offer HTTPS, doing so forces modern browsers in to blocking all HTTP connections. This effectively stops all communication with some Plex Clients that only operate using HTTP.
+24
View File
@@ -0,0 +1,24 @@
hide_nav: true
# <!-- Home -->
<div class="container text-white">
<div class="row">
<div class="col align-self-center text-center">
<img class="title-page-logo" src='img/logo-long-light.png' />
<p class="title-page-text">Documentation</p>
</div>
</div>
<div class="row">
<div class="col align-self-center text-center">
Welcome to the SyncLounge Documentation!
</div>
</div>
<div class="row">
<div class="col">
In the top navigation you will find useful links.<br />
<br />
Get started by checking out the <a href="/faq/">Frequently Asked Questions</a>!
</div>
</div>
<div>
+48
View File
@@ -0,0 +1,48 @@
hide_nav: true
# <!-- Home -->
<div class="container text-white">
<div class="row">
<div class="col align-self-center text-center">
<a href='https://synclounge.tv/'>
<img src='img/logo-long-light.png' />
</a>
<h2 class="">Enjoy Plex with your friends. In Sync. Together.</h2>
</div>
</div>
<div class="row">
<div class="col">
<h1 class="text-warning">What is SyncLounge?</h2>
<p>
SyncLounge is a third party tool that allows you to watch Plex in sync with your friends/family, wherever you are.
</p>
</div>
</div>
<div class="row">
<div class="col-md">
<h3 class="text-warning">How does it work?</h3>
</div>
</div>
<div class="row">
<div class="col-md-6">
<ol style='font-size: 1.2em;'>
<li>Log in to your Plex.tv account</li>
<li>Select your player (Plex Media Player, Apple TV, Nvidia Shield etc.)</li>
<li>Join a SyncLounge Room, or create your own</li>
<li>Give your friends/family your Room details</li>
<li>Enjoy your media, fully synchronised</li>
</ol>
</div>
<div class="col-md-6">
<img src='img/flow_v2.png' style='max-height: 335px;' >
</div>
</div>
<div class="row">
<div class="col align-self-center text-center">
<a href='http://app.synclounge.tv/'>
<h3 class="text-warning">Try it out yourself on our hosted servers!</h4>
</a>
</div>
</div>
</div>
+29
View File
@@ -0,0 +1,29 @@
## Docker
The official Docker container for SyncLounge can be found on [Docker Hub](https://hub.docker.com/r/starbix/synclounge) made by [Starbix](https://github.com/Starbix/)
The following tags are available:
* latest / alpine: webapp and server based on alpine
* server: only server based on alpine
* dev: development version of webapp and server based on alpine
* nginx: latest + nginx reverse proxy
To use the latest
```
docker run \
--name=synclounge \
-p 8088:8088 \
-p 8089:8089 \
-e DOMAIN=example.com \
starbix/synclounge
```
To use a tagged version:
```
docker run \
--name=plextogether_nginx \
-p 80:80 \
-e DOMAIN=example.com \
starbix/synclounge:TAG
```
+27
View File
@@ -0,0 +1,27 @@
# <!-- Self-hosting / --> Getting Started
## Prerequisites
1. An understanding of, or willingness to learn, some basic tech stuff
1. A computer to run these applications
However you decide to run SyncLounge yourself, to run the webapp you need to set the Access URL using one of these methods:
* In settings.json
* Via argument. E.g. - `node webapp.js --accessUrl=http://example.com`
* Environment Variable
## Running
### Docker
The recommended way of running SyncLounge is by using [Docker](/self-hosted/docker/). Docker is an application that runs software in containers making it easier to get applications running. You can learn more by going to [Docker's website](https://www.docker.com/).
If you are running linux, check out [DockSTARTer](https://dockstarter.com/)! DockSTARTer's main goal is to make it quick and easy to get up and running with Docker.
### Locally
You may also run it directly on a machine using a [local install](/self-hosted/locally/).
[joecot](https://gist.github.com/joecot) made an awesome [how-to for linux](https://gist.github.com/joecot/2b6fb52f72ca8022cacc4543fe1bed1b) that you should check out!
+24
View File
@@ -0,0 +1,24 @@
# Running Locally
## Requirements
- Node v8.4.0+
## First steps
1. Clone the repo: `git clone https://github.com/samcm/SyncLounge`
1. Change to the directory: `cd synclounge`
1. Install packages and dependencies: `npm install`
# Running the webapp:
1. Build the webapp: `npm run build`
* Note: This must be done anytime you change the `webroot` setting
1. Run the webapp using `node webapp.js`
* Don't forget that you need to set Access URL as described in [Getting Started](/self-hosted/getting-started/).
* The SL web app will be running at http://ip:8088/ or http://ip:8088/`webroot_setting` if you set `webroot`.
### Running the server:
- Run the server using `npm run server`
* The SL server will be running at http://ip:8089/slserver.
+11
View File
@@ -0,0 +1,11 @@
# Reverse Proxy
If you want to host SyncLounge on your own domain and not having to give out your IP address, you will want to use a reverse proxy.
There are many different options such as nginx, haproxy, traefik, etc.
## Nginx
If you are using the [Let's Encrypt container by LinuxServer.io (LSIO)](https://hub.docker.com/r/linuxserver/letsencrypt), you can use the provided configs found in [LSIO's reverse proxy repo](https://github.com/linuxserver/reverse-proxy-confs).
If you aren't using [LSIO's Let's Encrypt container](https://hub.docker.com/r/linuxserver/letsencrypt), the configurations found in [LSIO's reverse proxy repo](https://github.com/linuxserver/reverse-proxy-confs) for [subdomain](https://github.com/linuxserver/reverse-proxy-confs/blob/master/synclounge.subdomain.conf.sample) and [subfolder](https://github.com/linuxserver/reverse-proxy-confs/blob/master/synclounge.subfolder.conf.sample) configurations will still be helpful.
+89
View File
@@ -0,0 +1,89 @@
# Settings
## Arguments and ENV variables
The following can be used to change some of the settings in the application. Arguments are passed to the application by using `--<argument>=<value>` when running the application. ENV variables are mostly for Docker but can be set locally on your system.
| Argument | ENV | Description |
| ------ | ------ | ------ |
| webroot | WEB_ROOT | Change the base URL of the web app. Ex - `/lounge` |
| webapp_port | WEB_PORT | Change the port the web app uses. Defaults to `8088` |
| accessUrl | WEB_ACCESSURL | Set the URL the web app uses for things like invites. Ex - `http://mysynclounge.com` |
| autoJoin | AUTOJOIN_ENABLED | Set to `true` to enable auto joining. Defaults to `false` |
| autoJoinServer | AUTOJOIN_SERVERURL | Set this to the server URL you want the user to auto join. Required if auto join is enabled. Ex - `http://mysynclounge.com/slserver` |
| autoJoinRoom | AUTOJOIN_ROOM | Set this to the room name in the server that you want the users to auto join. Optional |
| autoJoinPassword | AUTOJOIN_PASSWORD | Set this to the room's password, if it has one. Optional |
| authentication | AUTHENTICATION | Configure authentication for the server. See below for more information. Optional |
| customServer | CUSTOM_SERVER | Override the custom server entry in the servers list. See below for more information. Optional |
| servers | SERVERS | Set your own servers list. See below for more information. Optional |
| serverroot | SERVER_ROOT | Change the base URL of the server app. Ex - `/server`. Defaults to `/slserver` |
| server_port | SERVER_PORT | Change the port the server app uses. Defaults to `8089` |
## Authentication
To enable authentication, the following setting and format is used
```json
"authentication": {
"mechanism": "plex",
"type": ["server", "user"],
"authorized": [
"PLEX_SERVER_MACHINE_ID",
"PLEX_USER_EMAIL",
"PLEX_USER_NAME",
]
}
```
- `mechanism` specifies how SyncLounge should authenticate a user. This is mostly for future-proofing to allow other authentication mechanisms to be provided. Defaults to `none`.
- `type` is mechanism dependent. Since `plex` is the only one currently, either or both `server` and `user` can be specified.
- `server` checks against the plex server machine ID (`PLEX_SERVER_MACHINE_ID`). If the user has access to a server matching any of the IDs in the `authorized` list, they will be granted access.
- `user` checks against the user's email (`PLEX_USER_EMAIL`) or username (`PLEX_USER_NAME`). If either matches a value in the `authorized` list, they will be granted access.
- `authorized` is a list of information for who is authorized.
## Customize the server list
### Customize the Custom Server entry
Adding this to your settings will override the the custom server in the server list.
```json
"customServer": {
"name": "Custom Server 1",
"location": "Custom Location",
"url": "https://mycustomserver.com/server",
"logo": "https://mycustomserver.com/logo.png"
}
```
![image](https://user-images.githubusercontent.com/1524443/76433720-19a3f180-638b-11ea-8c20-1997728e8325.png)
### Customize servers list
The servers list can be modified with your own list of servers. If this setting is provided, it will ignore the `customServer` setting above. Also, if only one server is provided, it will automatically join it! A server entry can also handle a default Room, with or without password. If set, SyncLounge will attempt to auto-join the room when the server is selected by the user.
```json
"servers": [
{
"name": "Custom Server 1",
"location": "Custom Location",
"url": "https://1.mycustomserver.com/server",
"logo": "https://mycustomserver.com/logo.png"
},
{
"name": "Custom Server 2",
"location": "Custom Location",
"url": "https://2.mycustomserver.com/server",
"logo": "https://mycustomserver.com/logo-2.png",
"defaultRoom": "DefaultRoom"
},
{
"name": "Custom Server 3",
"location": "Custom Location",
"url": "https://3.mycustomserver.com/server",
"logo": "https://mycustomserver.com/logo-3.png",
"defaultRoom": "DefaultRoom",
"defaultPassword": "DefaultPassword123"
}
]
```
![image](https://user-images.githubusercontent.com/1524443/76433958-6daed600-638b-11ea-9cf6-41ea79182dbc.png)
+58
View File
@@ -0,0 +1,58 @@
Here's how you set up on SyncLounge with Docker on Synology NAS.
This was pulled from a [tutorial on Gist](https://gist.github.com/jacobmix/32003649e06d5588dba35e5edafa5d7b) by [jacobmix](https://gist.github.com/jacobmix)!
First make sure you got the Docker Hub in your registry:
![Registry](https://user-images.githubusercontent.com/5995327/77686804-6398f400-6f95-11ea-97a4-693afb538c70.png)
Download the latest SyncLounge image:
![Image](https://user-images.githubusercontent.com/5995327/77686898-86c3a380-6f95-11ea-8544-bc711cec406e.png)
Launch the image, and go to advanced settings:
![Create Container](https://user-images.githubusercontent.com/5995327/77686989-abb81680-6f95-11ea-8f9e-c01ddece89d0.png)
Enable auto-restart, and make a shortcut if you want:
![Advanced Settings](https://user-images.githubusercontent.com/5995327/77687107-e0c46900-6f95-11ea-89ef-6d34b7bd3b36.png)
You can edit settings later by clicking the container, and pressing 'Edit' if it's not running.
Configure the network, and ports to use:
![Port Settings](https://user-images.githubusercontent.com/5995327/77687283-0d788080-6f96-11ea-9b5f-6b970c737b68.png)
![Network](https://user-images.githubusercontent.com/5995327/77687294-12d5cb00-6f96-11ea-9aaa-b454bd75d9c6.png)
Just use the same network as Docker, and leave them as default if you can.
Set the environment variables:
![Environment](https://user-images.githubusercontent.com/5995327/77687414-41ec3c80-6f96-11ea-9713-18c82d4a3e82.png)
Click Apply, finish the setup, an start it. It will take 20-30 minutes to start every time.
If you wanna update the container you have to re-download/overwrite the image.
Then clear the container, and restart it:
![Clear](https://user-images.githubusercontent.com/5995327/77687545-78c25280-6f96-11ea-83bd-c1bb77090513.png)
Hope this good enough to get you through the setup.
Now if you want to actually use SyncLounge:
1. Connect with `IP:PORT1/slweb`
1. Log-in with you Plex account
1. Choose your player.
1. Select Custom Server.
1. Enter `IP:PORT2/slserver`
1. Type in the room name, and password.
Then you should be good to go! You can invite people with the button at the top.
![invite](https://user-images.githubusercontent.com/5995327/77689611-e1f79500-6f99-11ea-9de0-cae30564776f.png)
Other people need access to the same episode/movie/video on their/your/someones Plex server.
You can invite people to your Plex like this:
![Plex invite](https://user-images.githubusercontent.com/5995327/77689675-f9cf1900-6f99-11ea-9da8-66114901d51b.png)
They need a Plex account before you can share your server with them. You just need to run the server, and forward the ports.
Some notes:
- You can use the `SyncLounge Player (BETA)` player in your browser.
+73
View File
@@ -0,0 +1,73 @@
# Project information
site_name: "SyncLounge Docs"
site_description: "Enjoy Plex with your friends. In Sync. Together."
site_author: "MagicalCodeMonkey"
site_url: "https://docs.synclounge.tv/"
# Repository
repo_name: "samcm/synclounge"
repo_url: "https://github.com/samcm/synclounge"
edit_uri: "https://github.com/samcm/docs.synclounge.tv/edit/master/docs/"
# Copyright
copyright: "Copyright &copy; SyncLounge<br />SyncLounge is not affiliated with Plex Inc."
# Configuration
theme:
name: material
custom_dir: synclounge/
language: "en"
palette:
primary: "black"
accent: "yellow"
font:
text: "Roboto"
code: "Roboto Mono"
logo: "img/logo-long-light.png"
favicon: "img/favicon.ico"
features:
- tabs
plugins:
- search
- git-revision-date-localized
highlightjs: true
markdown_extensions:
- toc:
permalink: true
extra_javascript:
- 'js/synclounge.js'
extra_css:
- https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css
- 'css/synclounge.css'
extra:
social:
- image: img/logo-small-light.png
link: 'http://app.synclounge.tv/'
- icon: fontawesome/brands/discord
link: 'https://discord.gg/fKQB3yt'
- icon: fontawesome/brands/twitter
link: 'https://twitter.com/syncloungetv'
# Navigation
nav:
- Docs Home: index.md
- FAQ:
- FAQ: faq.md
- Self-Hosting:
- Getting Started: self-hosted/getting-started.md
- Running with Docker: self-hosted/docker.md
- Running on Synology NAS: self-hosted/synology.md
- Running Locally: self-hosted/locally.md
- Using a Reverse Proxy: self-hosted/reverse-proxy.md
- Settings: self-hosted/settings.md
- Contributing:
- Contributing: contributing/contributing.md
- Donating: contributing/donating.md
- Documetation Guidelines: contributing/documentation-guidelines.md
- Developing: contributing/developing.md
- App:
- App: http://app.synclounge.tv/
- Discord:
- Discord: https://discord.gg/fKQB3yt
- Twitter: https://twitter.com/syncloungetv
+7
View File
@@ -0,0 +1,7 @@
.md-sidebar.md-sidebar--primary {
display: none;
}
.md-content {
margin-left: 5px;
}
+7
View File
@@ -0,0 +1,7 @@
.md-sidebar.md-sidebar--secondary {
display: none;
}
.md-content {
margin-right: 5px;
}
+72
View File
@@ -0,0 +1,72 @@
body {
color: white;
background: linear-gradient(180deg, #1f1c2c, #182848)
}
main {
background: linear-gradient(180deg, #1f1c2c, #182848);
}
a {
color: #ffc107;
}
.md-tabs__link:hover, a:hover {
color: #ffc107;
}
.title-page-text {
color: #ffc107;
font-size: 1.25rem;
line-height: 0;
letter-spacing: -0.01em;
top: -40px;
position: relative;
}
.md-typeset h1, h1,
.md-typeset h2, h2,
.md-typeset h3, h3,
.md-typeset h4, h4,
.md-typeset h5, h5 {
color: #ffc107;
}
.md-typeset .md-content__button, .md-typeset .md-content__icon {
color: #ffc107;
}
.md-typeset a {
color: #ffc107;
}
.external:after {
content: url('../img/open_in_new.svg');
text-decoration: inherit;
color: #ffc107;
}
.md-tabs__link--active, .md-nav__item .md-nav__link--active, .md-nav__link--active, .md-nav__link:active {
color: #ffc107;
font-weight: bold;
}
.md-header-nav__topic {
margin-top: 6px;
}
.md-nav__link[data-md-state=blur] {
color: #ffc107;
}
.md-typeset code, .md-typeset pre, code {
background-color: hsla(0,0%,50.5%,.5);
box-shadow: 0.29412em 0 0 hsla(0,0%,50.5%,.5), -0.29412em 0 0 hsla(0,0%,50.5%,.5);
color: #ffc107;
}
.md-header-nav__button.md-logo img {
height: 36px;
width: auto;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="18px" height="18px"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/></svg>

After

Width:  |  Height:  |  Size: 285 B

+15
View File
@@ -0,0 +1,15 @@
Array.from( document.querySelectorAll( '.md-tabs__link, .md-content a' ) ).forEach( tabLink => {
if(location.hostname !== tabLink.hostname) {
if(tabLink.title != 'Edit this page') {
tabLink.classList.add('external');
tabLink.setAttribute('target', '_blank')
}
}
});
let headerElement = document.querySelector('h1');
if( headerElement.innerHTML.includes("<!-- Home -->") ) {
headerElement.remove();
document.querySelector('a[title="Edit this page"]').remove();
}
+11
View File
@@ -0,0 +1,11 @@
{% extends "base.html" %}
{% block styles %}
{{ super() }}
{% if page and page.meta and (page.meta.hide_nav_left or page.meta.hide_nav) %}
<link rel="stylesheet" href="{{ base_url }}/css/remove_nav_left.css">
{% endif %}
{% if page and page.meta and (page.meta.hide_nav_right or page.meta.hide_nav) %}
<link rel="stylesheet" href="{{ base_url }}/css/remove_nav_right.css">
{% endif %}
{% endblock %}
+65
View File
@@ -0,0 +1,65 @@
{% import "partials/language.html" as lang with context %}
<footer class="md-footer">
{% if page.previous_page or page.next_page %}
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="{{ lang.t('footer.title') }}">
{% if page.previous_page %}
<a href="{{ page.previous_page.url | url }}" title="{{ page.previous_page.title | striptags }}" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__button md-icon">
{% include ".icons/material/arrow-left.svg" %}
</div>
<div class="md-footer-nav__title">
<div class="md-ellipsis">
<span class="md-footer-nav__direction">
{{ lang.t("footer.previous") }}
</span>
{% if page.parent and page.parent != "None" %}
{% if page.previous_page.parent.is_section and page.previous_page.parent.title != page.previous_page.title and page.parent.title != page.previous_page.parent.title %}
{{ page.previous_page.parent.title }} |
{% endif %}
{% endif %}
{{ page.previous_page.title }}
</div>
</div>
</a>
{% endif %}
{% if page.next_page %}
<a href="{{ page.next_page.url | url }}" title="{{ page.next_page.title | striptags }}" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title">
<div class="md-ellipsis">
<span class="md-footer-nav__direction">
{{ lang.t("footer.next") }}
</span>
{% if page.parent and page.parent != "None" %}
{% if page.next_page.parent.is_section and page.next_page.parent.title != page.next_page.title and page.parent.title != page.next_page.parent.title %}
{{ page.next_page.parent.title }} |
{% endif %}
{% endif %}
{{ page.next_page.title }}
</div>
</div>
<div class="md-footer-nav__button md-icon">
{% include ".icons/material/arrow-right.svg" %}
</div>
</a>
{% endif %}
</nav>
</div>
{% endif %}
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
{% if config.copyright %}
<div class="md-footer-copyright__highlight">
{{ config.copyright }}
</div>
{% endif %}
made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
{% include "partials/social.html" %}
</div>
</div>
</footer>
+50
View File
@@ -0,0 +1,50 @@
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid" aria-label="{{ lang.t('header.title') }}">
<a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" class="md-header-nav__button md-logo" aria-label="{{ config.site_name }}">
{% include "partials/logo.html" %}
</a>
<label class="md-header-nav__button md-icon" for="__drawer">
{% include ".icons/material/menu" ~ ".svg" %}
</label>
<div class="md-header-nav__title" data-md-component="header-title">
{% if config.site_name == page.title %}
<div class="md-header-nav__ellipsis md-ellipsis">
{{ config.site_name }}
</div>
{% else %}
<div class="md-header-nav__ellipsis">
<span class="md-header-nav__topic md-ellipsis">
{% if page.parent and page.parent != "None" %}
{% if page.parent.is_section %}
{{ page.parent.title }}
{% endif %}
{% endif %}
</span>
<span class="md-header-nav__topic md-ellipsis">
{% if page.parent and page.parent != "None" %}
{% if page.parent.is_section and page.parent.title != page.title %}
{{ page.parent.title }} >
{% endif %}
{% endif %}
{% if page and page.meta and page.meta.title %}
{{ page.meta.title }}
{% else %}
{{ page.title }}
{% endif %}
</span>
</div>
{% endif %}
</div>
{% if "search" in config["plugins"] %}
<label class="md-header-nav__button md-icon" for="__search">
{% include ".icons/material/magnify.svg" %}
</label>
{% include "partials/search.html" %}
{% endif %}
{% if config.repo_url %}
<div class="md-header-nav__source">
{% include "partials/source.html" %}
</div>
{% endif %}
</nav>
</header>
+15
View File
@@ -0,0 +1,15 @@
{% if config.extra.social %}
<div class="md-footer-social">
{% for social in config.extra.social %}
{% set _,rest = social.link.split("//") %}
{% set domain = rest.split("/")[0] %}
<a href="{{ social.link }}" target="_blank" rel="noopener" title="{{ domain }}" class="md-footer-social__link">
{% if social.image %}
<img src="{{ social.image | url }}" height="18px">
{% else %}
{% include ".icons/" ~ social.icon ~ ".svg" %}
{% endif %}
</a>
{% endfor %}
</div>
{% endif %}