diff options
-rw-r--r-- | .dir-locals.el | 7 | ||||
-rw-r--r-- | README | 30 | ||||
-rw-r--r-- | deps.edn | 2 | ||||
-rw-r--r-- | resources/src/css/tubo.scss (renamed from resources/src/css/tau.scss) | 0 | ||||
-rw-r--r-- | shadow-cljs.edn | 4 | ||||
-rw-r--r-- | src/backend/tubo/api/channels.clj (renamed from src/backend/tau/api/channels.clj) | 4 | ||||
-rw-r--r-- | src/backend/tubo/api/comments.clj (renamed from src/backend/tau/api/comments.clj) | 2 | ||||
-rw-r--r-- | src/backend/tubo/api/items.clj (renamed from src/backend/tau/api/items.clj) | 7 | ||||
-rw-r--r-- | src/backend/tubo/api/playlists.clj (renamed from src/backend/tau/api/playlists.clj) | 4 | ||||
-rw-r--r-- | src/backend/tubo/api/services.clj (renamed from src/backend/tau/api/services.clj) | 4 | ||||
-rw-r--r-- | src/backend/tubo/api/streams.clj (renamed from src/backend/tau/api/streams.clj) | 4 | ||||
-rw-r--r-- | src/backend/tubo/core.clj (renamed from src/backend/tau/core.clj) | 4 | ||||
-rw-r--r-- | src/backend/tubo/downloader_impl.clj (renamed from src/backend/tau/downloader_impl.clj) | 12 | ||||
-rw-r--r-- | src/backend/tubo/handler.clj (renamed from src/backend/tau/handler.clj) | 18 | ||||
-rw-r--r-- | src/backend/tubo/http.clj (renamed from src/backend/tau/http.clj) | 6 | ||||
-rw-r--r-- | src/backend/tubo/router.clj (renamed from src/backend/tau/router.clj) | 4 | ||||
-rw-r--r-- | src/frontend/tubo/api.cljs (renamed from src/frontend/tau/api.cljs) | 2 | ||||
-rw-r--r-- | src/frontend/tubo/components/comments.cljs (renamed from src/frontend/tau/components/comments.cljs) | 12 | ||||
-rw-r--r-- | src/frontend/tubo/components/items.cljs (renamed from src/frontend/tau/components/items.cljs) | 20 | ||||
-rw-r--r-- | src/frontend/tubo/components/loading.cljs (renamed from src/frontend/tau/components/loading.cljs) | 2 | ||||
-rw-r--r-- | src/frontend/tubo/components/navigation.cljs (renamed from src/frontend/tau/components/navigation.cljs) | 4 | ||||
-rw-r--r-- | src/frontend/tubo/components/player.cljs (renamed from src/frontend/tau/components/player.cljs) | 8 | ||||
-rw-r--r-- | src/frontend/tubo/core.cljs (renamed from src/frontend/tau/core.cljs) | 10 | ||||
-rw-r--r-- | src/frontend/tubo/events.cljs (renamed from src/frontend/tau/events.cljs) | 6 | ||||
-rw-r--r-- | src/frontend/tubo/routes.cljs (renamed from src/frontend/tau/routes.cljs) | 14 | ||||
-rw-r--r-- | src/frontend/tubo/subs.cljs (renamed from src/frontend/tau/subs.cljs) | 2 | ||||
-rw-r--r-- | src/frontend/tubo/util.cljs (renamed from src/frontend/tau/util.cljs) | 2 | ||||
-rw-r--r-- | src/frontend/tubo/views.cljs (renamed from src/frontend/tau/views.cljs) | 27 | ||||
-rw-r--r-- | src/frontend/tubo/views/channel.cljs (renamed from src/frontend/tau/views/channel.cljs) | 10 | ||||
-rw-r--r-- | src/frontend/tubo/views/kiosk.cljs (renamed from src/frontend/tau/views/kiosk.cljs) | 10 | ||||
-rw-r--r-- | src/frontend/tubo/views/playlist.cljs (renamed from src/frontend/tau/views/playlist.cljs) | 12 | ||||
-rw-r--r-- | src/frontend/tubo/views/search.cljs (renamed from src/frontend/tau/views/search.cljs) | 8 | ||||
-rw-r--r-- | src/frontend/tubo/views/stream.cljs (renamed from src/frontend/tau/views/stream.cljs) | 20 | ||||
-rw-r--r-- | webpack.config.js | 2 |
34 files changed, 145 insertions, 138 deletions
diff --git a/.dir-locals.el b/.dir-locals.el index 0261cff..5ab24c3 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -5,10 +5,11 @@ . "(do (require '[shadow.cljs.devtools.api :as shadow]) (require '[shadow.cljs.devtools.server :as server]) (server/start!) -(shadow/watch :tau) -(shadow/nrepl-select :tau))") +(shadow/watch :tubo) +(shadow/nrepl-select :tubo))") (cider-merge-sessions . :project) - (eval . (when (boundp 'cider-jack-in-nrepl-middlewares) + (eval . (if (not (boundp 'cider-jack-in-nrepl-middlewares)) + (require 'cider) (make-variable-buffer-local 'cider-jack-in-nrepl-middlewares) (add-to-list 'cider-jack-in-nrepl-middlewares "cider.nrepl/cider-middleware") (add-to-list 'cider-jack-in-nrepl-middlewares "shadow.cljs.devtools.server.nrepl/middleware")))))) @@ -1,7 +1,7 @@ # -*- mode: org; org-html-head-include-default-style: nil; org-html-postamble: nil; -*- #+OPTIONS: toc:nil -* Tau -An alternative front-end to various streaming sites. The aim of Tau is to free you from the world of ad-ridden streaming sites full of vendor lock-ins by providing you with a minimal interface to enjoy your favorite content. It currently supports the following platforms: +* Tubo +An alternative front-end to various streaming sites. The aim of Tubo is to free you from the world of ad-ridden streaming sites full of vendor lock-ins by providing you with a minimal interface to enjoy your favorite content. It currently supports the following platforms: - YouTube - SoundCloud @@ -9,22 +9,22 @@ An alternative front-end to various streaming sites. The aim of Tau is to free y - PeerTube - Bandcamp -To retrieve the data, it leverages the excellent [[https://github.com/TeamNewPipe/NewPipeExtractor][NewPipe Extractor]] library that powers the popular [[https://github.com/TeamNewPipe/NewPipe][NewPipe]] Android app. Tau exposes the extracted data over a REST API that is consumed by a local re-frame SPA. +To retrieve the data, it leverages the excellent [[https://github.com/TeamNewPipe/NewPipeExtractor][NewPipe Extractor]] library that powers the popular [[https://github.com/TeamNewPipe/NewPipe][NewPipe]] Android app. Tubo exposes the extracted data over a REST API that is consumed by a local re-frame SPA. -The ultimate goal behind Tau is to replicate the Newpipe experience on the web, so that it's accessible to those that don't use an Android device. +The ultimate goal behind Tubo is to replicate the Newpipe experience on the web, so that it's accessible to those that don't use an Android device. ** Installation -The easiest way to set up Tau's dependencies is via the [[https://guix.gnu.org/][GNU Guix]] package manager. Simply invoke what follows: +The easiest way to set up Tubo's dependencies is via the [[https://guix.gnu.org/][GNU Guix]] package manager. Simply invoke what follows: #+begin_src sh -cd /path/to/tau +cd /path/to/tubo guix shell #+end_src To run the application, first compile the downloader ahead-of-time. #+begin_src sh -clojure -M -e "(compile 'tau.downloader-impl)" +clojure -M -e "(compile 'tubo.downloader-impl)" #+end_src Fetch the front-end dependencies and build the front-end assets. @@ -37,7 +37,7 @@ npm run build Then, compile the front-end. #+begin_src sh -clojure -M:frontend compile tau +clojure -M:frontend compile tubo #+end_src You can now start a local server that listens on port 3000 by running the following: @@ -48,10 +48,16 @@ clojure -M:run Access the front-end in your browser at =http://localhost:3000=. +** Road-map +- [X] Basic audio player +- [ ] Track queuing system +- [ ] Playlists +- [ ] User settings + ** Screenshots -https://raw.githubusercontent.com/efimerspan/tau/master/assets/kiosk.jpg -https://raw.githubusercontent.com/efimerspan/tau/master/assets/channel.jpg -https://raw.githubusercontent.com/efimerspan/tau/master/assets/stream.jpg +[[https://raw.githubusercontent.com/efimerspan/tubo/master/assets/kiosk.jpg]] +[[https://raw.githubusercontent.com/efimerspan/tubo/master/assets/channel.jpg]] +[[https://raw.githubusercontent.com/efimerspan/tubo/master/assets/stream.jpg]] ** Contributing -You can use the project's [[https://lists.sr.ht/~conses/tau][mailing list]] to send feedback, patches or open discussions. Bugs should be reported on the project's [[https://todo.sr.ht/~conses/tau][bug-tracker]]. +You can use the project's [[https://lists.sr.ht/~conses/tubo][mailing list]] to send feedback, patches or open discussions. Bugs should be reported on the project's [[https://todo.sr.ht/~conses/tubo][bug-tracker]]. @@ -23,4 +23,4 @@ day8.re-frame/http-fx {:mvn/version "0.2.4"} cljs-ajax/cljs-ajax {:mvn/version "0.8.4"}} :main-opts ["-m" "shadow.cljs.devtools.cli"]} - :run {:main-opts ["-m" "tau.core"]}}} + :run {:main-opts ["-m" "tubo.core"]}}} diff --git a/resources/src/css/tau.scss b/resources/src/css/tubo.scss index 9119144..9119144 100644 --- a/resources/src/css/tau.scss +++ b/resources/src/css/tubo.scss diff --git a/shadow-cljs.edn b/shadow-cljs.edn index 16b4c38..cfb9930 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -1,7 +1,7 @@ {:deps {:aliases [:frontend]} :builds - {:tau + {:tubo {:target :browser :output-dir "resources/public/js" :asset-path "/js" - :modules {:main {:init-fn tau.core/init}}}}} + :modules {:main {:init-fn tubo.core/init}}}}} diff --git a/src/backend/tau/api/channels.clj b/src/backend/tubo/api/channels.clj index 2c82767..f19a65e 100644 --- a/src/backend/tau/api/channels.clj +++ b/src/backend/tubo/api/channels.clj @@ -1,8 +1,8 @@ -(ns tau.api.channels +(ns tubo.api.channels (:require [clojure.java.data :as j] [ring.util.codec :refer [url-decode]] - [tau.api.items :as items]) + [tubo.api.items :as items]) (:import org.schabi.newpipe.extractor.channel.ChannelInfo org.schabi.newpipe.extractor.NewPipe diff --git a/src/backend/tau/api/comments.clj b/src/backend/tubo/api/comments.clj index c0891ea..b4f03ba 100644 --- a/src/backend/tau/api/comments.clj +++ b/src/backend/tubo/api/comments.clj @@ -1,4 +1,4 @@ -(ns tau.api.comments +(ns tubo.api.comments (:require [clojure.java.data :as j] [ring.util.codec :refer [url-decode]]) diff --git a/src/backend/tau/api/items.clj b/src/backend/tubo/api/items.clj index 676af3e..63678c1 100644 --- a/src/backend/tau/api/items.clj +++ b/src/backend/tubo/api/items.clj @@ -1,4 +1,4 @@ -(ns tau.api.items) +(ns tubo.api.items) (defn get-stream-item [stream] @@ -13,9 +13,8 @@ :short-description (.getShortDescription stream) :duration (.getDuration stream) :view-count (when-not (= (.getViewCount stream) -1) (.getViewCount stream)) - :uploaded (if (.getUploadDate stream) - (.. stream (getUploadDate) (offsetDateTime) (toInstant) (toEpochMilli)) - false) + :uploaded (when (.getUploadDate stream) + (.. stream (getUploadDate) (offsetDateTime) (toInstant) (toEpochMilli))) :verified? (.isUploaderVerified stream)}) (defn get-channel-item diff --git a/src/backend/tau/api/playlists.clj b/src/backend/tubo/api/playlists.clj index 5520d2b..9ded200 100644 --- a/src/backend/tau/api/playlists.clj +++ b/src/backend/tubo/api/playlists.clj @@ -1,8 +1,8 @@ -(ns tau.api.playlists +(ns tubo.api.playlists (:require [clojure.java.data :as j] [ring.util.codec :refer [url-decode]] - [tau.api.items :as items]) + [tubo.api.items :as items]) (:import org.schabi.newpipe.extractor.playlist.PlaylistInfo org.schabi.newpipe.extractor.Page diff --git a/src/backend/tau/api/services.clj b/src/backend/tubo/api/services.clj index 8b9638f..0bc44af 100644 --- a/src/backend/tau/api/services.clj +++ b/src/backend/tubo/api/services.clj @@ -1,8 +1,8 @@ -(ns tau.api.services +(ns tubo.api.services (:require [clojure.java.data :as j] [ring.util.codec :refer [url-encode url-decode]] - [tau.api.items :as items]) + [tubo.api.items :as items]) (:import org.schabi.newpipe.extractor.kiosk.KioskInfo org.schabi.newpipe.extractor.kiosk.KioskList diff --git a/src/backend/tau/api/streams.clj b/src/backend/tubo/api/streams.clj index e1bd637..274d5f2 100644 --- a/src/backend/tau/api/streams.clj +++ b/src/backend/tubo/api/streams.clj @@ -1,8 +1,8 @@ -(ns tau.api.streams +(ns tubo.api.streams (:require [clojure.java.data :as j] [ring.util.codec :refer [url-decode]] - [tau.api.items :as items]) + [tubo.api.items :as items]) (:import org.schabi.newpipe.extractor.stream.StreamInfo org.schabi.newpipe.extractor.NewPipe diff --git a/src/backend/tau/core.clj b/src/backend/tubo/core.clj index 662f5b9..a587909 100644 --- a/src/backend/tau/core.clj +++ b/src/backend/tubo/core.clj @@ -1,7 +1,7 @@ -(ns tau.core +(ns tubo.core (:gen-class) (:require - [tau.http :as http])) + [tubo.http :as http])) (defn -main [& _] diff --git a/src/backend/tau/downloader_impl.clj b/src/backend/tubo/downloader_impl.clj index cf355e1..1582159 100644 --- a/src/backend/tau/downloader_impl.clj +++ b/src/backend/tubo/downloader_impl.clj @@ -1,24 +1,24 @@ -(ns tau.downloader-impl +(ns tubo.downloader-impl (:import [org.schabi.newpipe.extractor.downloader Response Request] [okhttp3 Request$Builder OkHttpClient$Builder RequestBody])) (gen-class - :name tau.DownloaderImpl + :name tubo.DownloaderImpl :constructors {[okhttp3.OkHttpClient$Builder] []} :extends org.schabi.newpipe.extractor.downloader.Downloader :init downloader-impl) (gen-class - :name tau.DownloaderImpl + :name tubo.DownloaderImpl :constructors {[okhttp3.OkHttpClient$Builder] []} :extends org.schabi.newpipe.extractor.downloader.Downloader :prefix "-" :main false :state state :init downloader-impl - :methods [#^{:static true} [init [] tau.DownloaderImpl] - #^{:static true} [getInstance [] tau.DownloaderImpl]]) + :methods [#^{:static true} [init [] tubo.DownloaderImpl] + #^{:static true} [getInstance [] tubo.DownloaderImpl]]) (def user-agent "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0") (def instance (atom nil)) @@ -33,7 +33,7 @@ ([] (-init (OkHttpClient$Builder.))) ([builder] - (reset! instance (tau.DownloaderImpl. builder)))) + (reset! instance (tubo.DownloaderImpl. builder)))) (defn -getInstance [] (or @instance (-init))) diff --git a/src/backend/tau/handler.clj b/src/backend/tubo/handler.clj index 3ec4469..2012504 100644 --- a/src/backend/tau/handler.clj +++ b/src/backend/tubo/handler.clj @@ -1,13 +1,13 @@ -(ns tau.handler +(ns tubo.handler (:require [clojure.string :as str] [hiccup.page :as hiccup] [ring.util.response :refer [response]] - [tau.api.streams :as streams] - [tau.api.channels :as channels] - [tau.api.playlists :as playlists] - [tau.api.comments :as comments] - [tau.api.services :as services])) + [tubo.api.streams :as streams] + [tubo.api.channels :as channels] + [tubo.api.playlists :as playlists] + [tubo.api.comments :as comments] + [tubo.api.services :as services])) (defn index [_] @@ -16,12 +16,12 @@ [:head [:meta {:charset "UTF-8"}] [:meta {:name "viewport" :content "width=device-width, initial-scale=1"}] - [:title "Tau"] - (hiccup/include-css "/css/tau.css")] + [:title "Tubo"] + (hiccup/include-css "/css/tubo.css")] [:body [:div#app] (hiccup/include-js "/js/main.js") - [:script "tau.core.init();"]]))) + [:script "tubo.core.init();"]]))) (defn search [{:keys [parameters] :as req}] diff --git a/src/backend/tau/http.clj b/src/backend/tubo/http.clj index cbb5896..9e1359f 100644 --- a/src/backend/tau/http.clj +++ b/src/backend/tubo/http.clj @@ -1,9 +1,9 @@ -(ns tau.http +(ns tubo.http (:require [org.httpkit.server :refer [run-server]] - [tau.router :as router]) + [tubo.router :as router]) (:import - tau.DownloaderImpl + tubo.DownloaderImpl org.schabi.newpipe.extractor.NewPipe org.schabi.newpipe.extractor.localization.Localization)) diff --git a/src/backend/tau/router.clj b/src/backend/tubo/router.clj index 5bab278..73e75ee 100644 --- a/src/backend/tau/router.clj +++ b/src/backend/tubo/router.clj @@ -1,4 +1,4 @@ -(ns tau.router +(ns tubo.router (:require [malli.experimental.lite :as l] [reitit.ring :as ring] @@ -9,7 +9,7 @@ [ring.middleware.params :refer [wrap-params]] [ring.middleware.json :refer [wrap-json-response]] [ring.middleware.cors :refer [wrap-cors]] - [tau.handler :as handler])) + [tubo.handler :as handler])) (def router (ring/router diff --git a/src/frontend/tau/api.cljs b/src/frontend/tubo/api.cljs index e69bc9c..2ca442f 100644 --- a/src/frontend/tau/api.cljs +++ b/src/frontend/tubo/api.cljs @@ -1,4 +1,4 @@ -(ns tau.api +(ns tubo.api (:require [ajax.core :as ajax])) diff --git a/src/frontend/tau/components/comments.cljs b/src/frontend/tubo/components/comments.cljs index bfbf822..a65b6d8 100644 --- a/src/frontend/tau/components/comments.cljs +++ b/src/frontend/tubo/components/comments.cljs @@ -1,10 +1,10 @@ -(ns tau.components.comments +(ns tubo.components.comments (:require [re-frame.core :as rf] [reitit.frontend.easy :as rfe] - [tau.components.loading :as loading] - [tau.events :as events] - [tau.util :as util])) + [tubo.components.loading :as loading] + [tubo.events :as events] + [tubo.util :as util])) (defn comment-item [{:keys [id text uploader-name uploader-avatar uploader-url stream-position @@ -15,7 +15,7 @@ [:div.flex.items-center.py-3.box-border.h-12 (when uploader-url [:div.w-12 - [:a {:href (rfe/href :tau.routes/channel nil {:url uploader-url}) :title uploader-name} + [:a {:href (rfe/href :tubo.routes/channel nil {:url uploader-url}) :title uploader-name} [:img.rounded-full.object-cover.min-w-full.min-h-full {:src uploader-avatar}]]])]) [:div.ml-4 [:div.flex.items-center @@ -23,7 +23,7 @@ [:i.fa-solid.fa-thumbtack.mr-2.text-xs]) (when uploader-name [:div.flex.items-center - [:a {:href (rfe/href :tau.routes/channel nil {:url uploader-url}) :title uploader-name} + [:a {:href (rfe/href :tubo.routes/channel nil {:url uploader-url}) :title uploader-name} [:h1.text-gray-300.font-bold uploader-name]] (when stream-position [:p.mx-1.text-xs (str "at " (util/format-duration stream-position))])]) diff --git a/src/frontend/tau/components/items.cljs b/src/frontend/tubo/components/items.cljs index dccd43f..95e2251 100644 --- a/src/frontend/tau/components/items.cljs +++ b/src/frontend/tubo/components/items.cljs @@ -1,9 +1,9 @@ -(ns tau.components.items +(ns tubo.components.items (:require [re-frame.core :as rf] [reitit.frontend.easy :as rfe] - [tau.components.loading :as loading] - [tau.util :as util])) + [tubo.components.loading :as loading] + [tubo.util :as util])) (defn thumbnail [thumbnail-url route url name duration] @@ -30,7 +30,7 @@ (when-not (empty? uploader-name) [:div.flex.items-center.my-2 (if uploader-url - [:a {:href (rfe/href :tau.routes/channel nil {:url uploader-url}) :title uploader-name} + [:a {:href (rfe/href :tubo.routes/channel nil {:url uploader-url}) :title uploader-name} [:h1.line-clamp-1.text-gray-300.font-bold.pr-2 uploader-name]] [:h1.line-clamp-1.text-gray-300.font-bold.pr-2 uploader-name]) (when verified? @@ -53,20 +53,20 @@ (defn stream-item [{:keys [url name thumbnail-url duration] :as item}] [:<> - [thumbnail thumbnail-url (rfe/href :tau.routes/stream nil {:url url}) url name duration] - [item-content item (rfe/href :tau.routes/stream nil {:url url})]]) + [thumbnail thumbnail-url (rfe/href :tubo.routes/stream nil {:url url}) url name duration] + [item-content item (rfe/href :tubo.routes/stream nil {:url url})]]) (defn channel-item [{:keys [url name thumbnail-url] :as item}] [:<> - [thumbnail thumbnail-url (rfe/href :tau.routes/channel nil {:url url}) url name nil] - [item-content item (rfe/href :tau.routes/channel nil {:url url})]]) + [thumbnail thumbnail-url (rfe/href :tubo.routes/channel nil {:url url}) url name nil] + [item-content item (rfe/href :tubo.routes/channel nil {:url url})]]) (defn playlist-item [{:keys [url name thumbnail-url] :as item}] [:<> - [thumbnail thumbnail-url (rfe/href :tau.routes/playlist nil {:url url}) url name nil] - [item-content item (rfe/href :tau.routes/playlist nil {:url url})]]) + [thumbnail thumbnail-url (rfe/href :tubo.routes/playlist nil {:url url}) url name nil] + [item-content item (rfe/href :tubo.routes/playlist nil {:url url})]]) (defn generic-item [item] diff --git a/src/frontend/tau/components/loading.cljs b/src/frontend/tubo/components/loading.cljs index 40f6db3..08c37de 100644 --- a/src/frontend/tau/components/loading.cljs +++ b/src/frontend/tubo/components/loading.cljs @@ -1,4 +1,4 @@ -(ns tau.components.loading) +(ns tubo.components.loading) (defn loading-icon [service-color & styles] diff --git a/src/frontend/tau/components/navigation.cljs b/src/frontend/tubo/components/navigation.cljs index 87e6dc5..a48854c 100644 --- a/src/frontend/tau/components/navigation.cljs +++ b/src/frontend/tubo/components/navigation.cljs @@ -1,7 +1,7 @@ -(ns tau.components.navigation +(ns tubo.components.navigation (:require [re-frame.core :as rf] - [tau.events :as events])) + [tubo.events :as events])) (defn back-button [service-color] [:div.flex.items-center diff --git a/src/frontend/tau/components/player.cljs b/src/frontend/tubo/components/player.cljs index 11cc9c5..c4b5df7 100644 --- a/src/frontend/tau/components/player.cljs +++ b/src/frontend/tubo/components/player.cljs @@ -1,10 +1,10 @@ -(ns tau.components.player +(ns tubo.components.player (:require [reagent.core :as r] [reagent.dom :as rdom] [re-frame.core :as rf] [reitit.frontend.easy :as rfe] - [tau.events :as events] + [tubo.events :as events] ["video.js" :as videojs])) (defn global-player @@ -21,9 +21,9 @@ [:div.flex.flex-wrap.items-center [:div.flex.flex-col [:a.text-xs - {:href (rfe/href :tau.router/stream nil {:url url})} name] + {:href (rfe/href :tubo.router/stream nil {:url url})} name] [:a.text-xs.text-gray-300 - {:href (rfe/href :tau.router/channel nil {:url uploader-url})} uploader-name]] + {:href (rfe/href :tubo.router/channel nil {:url uploader-url})} uploader-name]] [:div.px-2.py-0.md:pt-4 [:audio {:src stream :ref #(reset! !player %) :loop @!loop?}]] [:div.mx-2 diff --git a/src/frontend/tau/core.cljs b/src/frontend/tubo/core.cljs index 7665a20..4834dc2 100644 --- a/src/frontend/tau/core.cljs +++ b/src/frontend/tubo/core.cljs @@ -1,12 +1,12 @@ -(ns tau.core +(ns tubo.core (:require ["react-dom/client" :as rdom] [reagent.core :as r] [re-frame.core :as rf] - [tau.events :as events] - [tau.routes :as routes] - [tau.subs] - [tau.views :as views])) + [tubo.events :as events] + [tubo.routes :as routes] + [tubo.subs] + [tubo.views :as views])) (defonce root (rdom/createRoot (.querySelector js/document "#app"))) diff --git a/src/frontend/tau/events.cljs b/src/frontend/tubo/events.cljs index d854b0e..d919e31 100644 --- a/src/frontend/tau/events.cljs +++ b/src/frontend/tubo/events.cljs @@ -1,10 +1,10 @@ -(ns tau.events +(ns tubo.events (:require [day8.re-frame.http-fx] [re-frame.core :as rf] [reitit.frontend.easy :as rfe] [reitit.frontend.controllers :as rfc] - [tau.api :as api])) + [tubo.api :as api])) (rf/reg-event-db ::initialize-db @@ -283,7 +283,7 @@ ::change-service (fn [{:keys [db]} [_ service-id]] {:fx [[:dispatch - [::navigate {:name :tau.routes/kiosk + [::navigate {:name :tubo.routes/kiosk :params {} :query {:serviceId service-id}}]]]})) diff --git a/src/frontend/tau/routes.cljs b/src/frontend/tubo/routes.cljs index a5fb579..eb40ac7 100644 --- a/src/frontend/tau/routes.cljs +++ b/src/frontend/tubo/routes.cljs @@ -1,14 +1,14 @@ -(ns tau.routes +(ns tubo.routes (:require [reitit.frontend :as ref] [reitit.frontend.easy :as rfe] [re-frame.core :as rf] - [tau.events :as events] - [tau.views.channel :as channel] - [tau.views.kiosk :as kiosk] - [tau.views.playlist :as playlist] - [tau.views.search :as search] - [tau.views.stream :as stream])) + [tubo.events :as events] + [tubo.views.channel :as channel] + [tubo.views.kiosk :as kiosk] + [tubo.views.playlist :as playlist] + [tubo.views.search :as search] + [tubo.views.stream :as stream])) (def routes (ref/router diff --git a/src/frontend/tau/subs.cljs b/src/frontend/tubo/subs.cljs index 41bbb67..88291ca 100644 --- a/src/frontend/tau/subs.cljs +++ b/src/frontend/tubo/subs.cljs @@ -1,4 +1,4 @@ -(ns tau.subs +(ns tubo.subs (:require [re-frame.core :as rf])) diff --git a/src/frontend/tau/util.cljs b/src/frontend/tubo/util.cljs index d23ef9a..8e03f85 100644 --- a/src/frontend/tau/util.cljs +++ b/src/frontend/tubo/util.cljs @@ -1,4 +1,4 @@ -(ns tau.util +(ns tubo.util (:require ["timeago.js" :as timeago])) diff --git a/src/frontend/tau/views.cljs b/src/frontend/tubo/views.cljs index 6a4789f..4fe2202 100644 --- a/src/frontend/tau/views.cljs +++ b/src/frontend/tubo/views.cljs @@ -1,12 +1,12 @@ -(ns tau.views +(ns tubo.views (:require [reitit.frontend.easy :as rfe] [re-frame.core :as rf] [reagent.ratom :as ratom] - [tau.components.navigation :as navigation] - [tau.components.player :as player] - [tau.events :as events] - [tau.routes :as routes])) + [tubo.components.navigation :as navigation] + [tubo.components.player :as player] + [tubo.events :as events] + [tubo.routes :as routes])) (defonce scroll-hook (.addEventListener js/window "scroll" #(rf/dispatch [::events/page-scroll]))) (defonce mobile-touch-hook (.addEventListener js/document.body "touchmove" #(rf/dispatch [::events/page-scroll]))) @@ -26,8 +26,9 @@ {:style {:background service-color}} [:div.flex.items-center.justify-between.flex-auto [:div.py-2 - [:a.px-5.text-white.font-bold.font-nunito - {:href (rfe/href ::routes/home) :dangerouslySetInnerHTML {:__html "τ"}}]] + [:a.px-5.text-white.font-bold + {:href (rfe/href ::routes/home)} + "tubo"]] [:form.flex.items-center.relative {:on-submit (fn [e] (.preventDefault e) @@ -79,12 +80,12 @@ [] [:footer [:div.bg-black.text-gray-300.p-5.text-center.w-full - [:div.flex.flex-col.justify-center - [:div - [:p.px-2 (str "Tau " (.getFullYear (js/Date.)))]] - [:div.pt-4 - [:a {:href "https://sr.ht/~conses/tau"} - [:i.fa-solid.fa-code]]]]]]) + [:div.flex.flex-col.justify-center.items-center + [:div.flex.items-center.justify-center + [:div.items-center + [:a.font-bold {:href "https://sr.ht/~conses/tubo"} "tubo"]] + [:div + [:p.px-2 (str "2022-" (.getFullYear (js/Date.)))]]]]]]) (defn app [] diff --git a/src/frontend/tau/views/channel.cljs b/src/frontend/tubo/views/channel.cljs index 205474d..ee5459f 100644 --- a/src/frontend/tau/views/channel.cljs +++ b/src/frontend/tubo/views/channel.cljs @@ -1,10 +1,10 @@ -(ns tau.views.channel +(ns tubo.views.channel (:require [re-frame.core :as rf] - [tau.components.items :as items] - [tau.components.loading :as loading] - [tau.components.navigation :as navigation] - [tau.events :as events])) + [tubo.components.items :as items] + [tubo.components.loading :as loading] + [tubo.components.navigation :as navigation] + [tubo.events :as events])) (defn channel [{{:keys [url]} :query-params}] diff --git a/src/frontend/tau/views/kiosk.cljs b/src/frontend/tubo/views/kiosk.cljs index 824d85b..1c072af 100644 --- a/src/frontend/tau/views/kiosk.cljs +++ b/src/frontend/tubo/views/kiosk.cljs @@ -1,10 +1,10 @@ -(ns tau.views.kiosk +(ns tubo.views.kiosk (:require [re-frame.core :as rf] - [tau.components.items :as items] - [tau.components.loading :as loading] - [tau.components.navigation :as navigation] - [tau.events :as events])) + [tubo.components.items :as items] + [tubo.components.loading :as loading] + [tubo.components.navigation :as navigation] + [tubo.events :as events])) (defn kiosk [{{:keys [serviceId kioskId]} :query-params}] diff --git a/src/frontend/tau/views/playlist.cljs b/src/frontend/tubo/views/playlist.cljs index 756846c..ed4f90f 100644 --- a/src/frontend/tau/views/playlist.cljs +++ b/src/frontend/tubo/views/playlist.cljs @@ -1,11 +1,11 @@ -(ns tau.views.playlist +(ns tubo.views.playlist (:require [re-frame.core :as rf] [reitit.frontend.easy :as rfe] - [tau.components.items :as items] - [tau.components.loading :as loading] - [tau.components.navigation :as navigation] - [tau.events :as events])) + [tubo.components.items :as items] + [tubo.components.loading :as loading] + [tubo.components.navigation :as navigation] + [tubo.events :as events])) (defn playlist [{{:keys [url]} :query-params}] @@ -34,7 +34,7 @@ [:span.mr-2 "By"] [:div.flex.items-center.py-3.box-border.h-12 [:div.w-12 - [:a {:href (rfe/href :tau.routes/channel nil {:url uploader-url}) :title uploader-name} + [:a {:href (rfe/href :tubo.routes/channel nil {:url uploader-url}) :title uploader-name} [:img.rounded-full.object-cover.min-h-full.min-w-full {:src uploader-avatar :alt uploader-name}]]]]] [:p.pt-4 (str stream-count " streams")]]] [items/related-streams related-streams next-page-url]])])) diff --git a/src/frontend/tau/views/search.cljs b/src/frontend/tubo/views/search.cljs index bfb0b20..9938f53 100644 --- a/src/frontend/tau/views/search.cljs +++ b/src/frontend/tubo/views/search.cljs @@ -1,10 +1,10 @@ -(ns tau.views.search +(ns tubo.views.search (:require [re-frame.core :as rf] [reitit.frontend.easy :as rfe] - [tau.components.items :as items] - [tau.components.loading :as loading] - [tau.events :as events])) + [tubo.components.items :as items] + [tubo.components.loading :as loading] + [tubo.events :as events])) (defn search [{{:keys [q serviceId]} :query-params}] diff --git a/src/frontend/tau/views/stream.cljs b/src/frontend/tubo/views/stream.cljs index 3363d6a..a380b5e 100644 --- a/src/frontend/tau/views/stream.cljs +++ b/src/frontend/tubo/views/stream.cljs @@ -1,14 +1,14 @@ -(ns tau.views.stream +(ns tubo.views.stream (:require [re-frame.core :as rf] [reitit.frontend.easy :as rfe] - [tau.events :as events] - [tau.components.items :as items] - [tau.components.loading :as loading] - [tau.components.navigation :as navigation] - [tau.components.comments :as comments] - [tau.components.player :as player] - [tau.util :as util])) + [tubo.events :as events] + [tubo.components.items :as items] + [tubo.components.loading :as loading] + [tubo.components.navigation :as navigation] + [tubo.components.comments :as comments] + [tubo.components.player :as player] + [tubo.util :as util])) (defn stream [match] @@ -65,10 +65,10 @@ [:div.flex.items-center.flex-auto (when uploader-avatar [:div.relative.w-16.h-16 - [:a {:href (rfe/href :tau.routes/channel nil {:url uploader-url}) :title uploader-name} + [:a {:href (rfe/href :tubo.routes/channel nil {:url uploader-url}) :title uploader-name} [:img.rounded-full.object-cover.max-w-full.min-h-full {:src uploader-avatar :alt uploader-name}]]]) [:div.mx-2 - [:a {:href (rfe/href :tau.routes/channel nil {:url uploader-url})} uploader-name] + [:a {:href (rfe/href :tubo.routes/channel nil {:url uploader-url})} uploader-name] (when subscriber-count [:div.flex.my-2.items-center [:i.fa-solid.fa-users.text-xs] diff --git a/webpack.config.js b/webpack.config.js index 55590c4..b3b8620 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -5,7 +5,7 @@ const RemoveEmptyScriptsPlugin = require("webpack-remove-empty-scripts") module.exports = { mode: process.env.NODE_ENV, entry: { - tau: "./resources/src/css/tau.scss" + tubo: "./resources/src/css/tubo.scss" }, output: { path: path.resolve(__dirname, "resources/public") |