diff --git a/.gitignore b/.gitignore index 1472ad2..010e963 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ static/css/font-awesome.min.css static/js/bootstrap.bundle.min.js static/js/jquery.min.js +static/js/vue.min.js +static/js/axios.min.js static/fonts staticfiles diff --git a/Dockerfile b/Dockerfile index 4b160dc..13d7d61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,11 +5,6 @@ WORKDIR /app ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 -# https://github.com/twbs/bootstrap/issues/30553 don't upgrade jquery to 3.5.0 yet -ENV JQUERY_VERSION=3.4.1 -ENV BOOTSTRAP_VERSION=4.4.1 -ENV INTER_VERSION=3.13 - # install required packages RUN apk add --no-cache postgresql-dev gcc python3-dev musl-dev gettext postgresql-client nginx supervisor @@ -28,14 +23,8 @@ RUN addgroup -S portier && adduser -S portier -G portier ADD --chown=portier:portier . /app # add static external libraries for frontend -RUN wget http://code.jquery.com/jquery-${JQUERY_VERSION}.min.js -O /app/static/js/jquery.min.js \ - && wget https://stackpath.bootstrapcdn.com/bootstrap/${BOOTSTRAP_VERSION}/js/bootstrap.bundle.min.js -O /app/static/js/bootstrap.bundle.min.js \ - && mkdir -p /tmp/inter /app/static/fonts \ - && cd /tmp/inter && wget https://github.com/rsms/inter/releases/download/v${INTER_VERSION}/Inter-${INTER_VERSION}.zip \ - && unzip Inter-${INTER_VERSION}.zip && mv /tmp/inter/Inter\ Web/* /app/static/fonts/ \ - && cd - \ - && rm -rf /tmp/inter \ - && chown -R portier:portier /app/static/fonts/ +RUN ./fetch_frontend_libs.sh \ + && chown -R portier:portier static/ # collect static files and compile localized strings RUN ./manage.py collectstatic --noinput --link diff --git a/fetch_frontend_libs.sh b/fetch_frontend_libs.sh new file mode 100755 index 0000000..a6ddf38 --- /dev/null +++ b/fetch_frontend_libs.sh @@ -0,0 +1,20 @@ +#!/bin/sh +set -ex + +JQUERY_VERSION=3.5.1 +BOOTSTRAP_VERSION=4.4.1 +INTER_VERSION=3.13 +VUE_VERSION=2.6.11 +AXIOS_VERSION=0.19.2 + +wget https://cdn.jsdelivr.net/npm/jquery@${JQUERY_VERSION}/dist/jquery.min.js -O static/js/jquery.min.js +wget https://cdn.jsdelivr.net/npm/vue@${VUE_VERSION}/dist/vue.min.js -O static/js/vue.min.js +wget https://cdn.jsdelivr.net/npm/axios@${AXIOS_VERSION}/dist/axios.min.js -O static/js/axios.min.js +wget https://cdn.jsdelivr.net/npm/bootstrap@${BOOTSTRAP_VERSION}/dist/js/bootstrap.bundle.min.js -O static/js/bootstrap.bundle.min.js +mkdir -p /tmp/inter static/fonts +cd /tmp/inter && wget https://github.com/rsms/inter/releases/download/v${INTER_VERSION}/Inter-${INTER_VERSION}.zip +unzip Inter-${INTER_VERSION}.zip +cd - +mv /tmp/inter/Inter\ Web/* static/fonts/ +rm -rf /tmp/inter + diff --git a/portal/templates/portal/index.html b/portal/templates/portal/index.html index b3f25f0..9fc75f7 100644 --- a/portal/templates/portal/index.html +++ b/portal/templates/portal/index.html @@ -1,11 +1,37 @@ {% extends 'base.html' %} +{% load fontawesome_5 %} {% block 'content' %}
Nothing to see here yet. We're working on it, though!
+Portier will be a pretty cool streaming platform, built by and for nerds. You are welcome to contribute, be it code, ideas, documentation, design or something else entirely.
- Code on GitHub +Portier is a pretty cool streaming platform, built by and for nerds. You are welcome to contribute, be it code, ideas, documentation, design or something else entirely.
+ Code on GitHubSend us multiple copies of your stream over different network connections. If one of your connections fails, we'll automatically fail over to the next available - within seconds!
+Any stream that's coming into our system can be restreamed to a new target. This works with most of the popular streaming platforms - even multiple at the same time.
+Streaming is hard. Especially if you're not a techie. We have streaming-ninjas in our team that will happily support you every step of the way.
+{% trans "name" %} | -{% trans "active" %} | -{% trans "actions" %} | -|||||||
---|---|---|---|---|---|---|---|---|---|
{{ object.name }} | -
- {% if object.active %}
- {% fa5_icon 'check-circle' %}
- {% else %}
- {% fa5_icon 'times-circle' %}
- {% endif %}
+
+
+
+
+
+
+ {% trans "loading..." %}
+
+
|
{% trans "name" %} | -{% trans "receiving" %} | -{% trans "actions" %} | -
---|---|---|
{{ object.name }} | -- {% if object.publish_counter > 0 %} - {% fa5_icon 'check-circle' %} - {% else %} - {% fa5_icon 'times-circle' %} - {% endif %} - | -- {% trans "details" %} - {% if "delete_stream" in obj_perms %} - {% fa5_icon 'trash' %} - {% endif %} - | -
{% trans "name" %} | +{% trans "receiving" %} | +{% trans "actions" %} | +
---|---|---|
{% verbatim %}{{ stream.name }}{% endverbatim %} | ++ {% fa5_icon 'check-circle' %} {% verbatim %}{{ stream.publish_counter}}{% endverbatim %} + {% fa5_icon 'times-circle' %} + | ++ {% trans "details" %} + {% fa5_icon 'trash' %} + | +