diff --git a/Dockerfile.static b/Dockerfile.static new file mode 100644 index 0000000..9713ca3 --- /dev/null +++ b/Dockerfile.static @@ -0,0 +1,54 @@ +# Copyright (C) 2016 Jones Magloire @Joxit +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +FROM node:slim + +MAINTAINER Jones MAGLOIRE @Joxit + +WORKDIR /usr/src/app + +RUN npm install -g http-server && npm cache clean + +COPY package.json /usr/src/app + +RUN npm install \ + && find node_modules/ \ + -maxdepth 1 -mindepth 1 -type d \ + ! -name riot \ + ! -name material-design-icons \ + ! -name material-design-* \ + ! -name dialog-polyfill \ + ! -name riotgear-router \ + -exec rm -rf {} \; \ + && find node_modules/material-design-* \ + -maxdepth 1 -mindepth 1 \ + ! -name package.json \ + ! -name iconfont \ + ! -name LICENSE \ + ! -name material* \ + ! -name dist \ + -exec rm -rf {} \; \ + && find node_modules/material-design-lite/dist/ -maxdepth 1 -mindepth 1 \ + ! -name "*.js*" \ + ! -name "*.css*" \ + -exec rm -rf {} \; \ + && npm cache clean + +COPY . /usr/src/app +COPY static/*.* /usr/src/app/ +COPY static/entrypoint /bin + +EXPOSE 8080 + +ENTRYPOINT entrypoint diff --git a/static/add.tag b/static/add.tag new file mode 100644 index 0000000..f9c1210 --- /dev/null +++ b/static/add.tag @@ -0,0 +1,19 @@ + + + + diff --git a/static/change.tag b/static/change.tag new file mode 100644 index 0000000..9ba0fc3 --- /dev/null +++ b/static/change.tag @@ -0,0 +1,19 @@ + + + + diff --git a/static/entrypoint b/static/entrypoint new file mode 100755 index 0000000..6f09aad --- /dev/null +++ b/static/entrypoint @@ -0,0 +1,4 @@ +#!/bin/bash +sed -i "s,\${URL},${URL}," script.js + +http-server $@ diff --git a/static/menu.tag b/static/menu.tag new file mode 100644 index 0000000..4199dd1 --- /dev/null +++ b/static/menu.tag @@ -0,0 +1,19 @@ + + + + diff --git a/static/script.js b/static/script.js new file mode 100644 index 0000000..cb9c0af --- /dev/null +++ b/static/script.js @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2016 Jones Magloire @Joxit + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +var registryUI = {} +registryUI.url = function() { + return '${URL}'; +} +registryUI.catalog = {}; +registryUI.taglist = {}; + +riot.mount('catalog'); +riot.mount('taglist'); +riot.mount('app');