diff --git a/compose.yaml b/compose.yaml index e2f86df7a15ca20d985ca4da647fa2157ec77793..fceb9a8fb94900dacaada8af360df98e79835c6d 100755 --- a/compose.yaml +++ b/compose.yaml @@ -27,7 +27,6 @@ services: volumes: - "${APP_ROOT}/keycloak:/shared:rw" - "./config/keycloak/theme:/opt/keycloak/themes/snow:ro" - - "./config/font:/opt/keycloak/themes/snow/login/resources/font:ro" secrets: - keycloak-crt - keycloak-key @@ -111,7 +110,7 @@ services: restart: unless-stopped labels: net.paperclover.list.name: Copyparty File Storage - net.paperclover.list.domain: nas + net.paperclover.list.domain: file net.paperclover.list.priority: 103 depends_on: forward-auth: @@ -171,7 +170,6 @@ services: - "/etc/localtime:/etc/localtime:ro" - ./config/forgejo/public:/custom/public:ro - ./config/forgejo/templates:/custom/templates:ro - - ./config/font:/custom/public/assets/font:ro - ./config/forgejo/init:/custom/init:ro labels: net.paperclover.list.name: Clover Git Forge @@ -196,6 +194,8 @@ services: TARGET: http://forgejo:3000 COOKIE_DOMAIN: "${HOME_DOMAIN:?}" ED25519_PRIVATE_KEY_HEX: "${ANUBIS_PRIVATE_KEY:?}" + COOKIE_PREFIX: "anubis_v1" + DIFFICULTY: 5 forgejo-runner: container_name: forgejo-runner image: code.forgejo.org/forgejo/runner:12 @@ -237,7 +237,6 @@ services: - "${APP_ROOT}/jellyfin/cache:/cache:rw" - "./config/jellyfin:/config/custom:ro" - "./config/jellyfin/branding.xml:/config/config/branding.xml:ro" - - "./config/font:/usr/local/share/fonts/custom:ro" labels: net.paperclover.list.name: Cloverfin net.paperclover.list.domain: jelly diff --git a/config/Caddyfile b/config/Caddyfile index 1957fbe9077cc1d78f4e56c43a36fe2d778d9642..efff157865ebe703bc0bb68c75015e222256a872 100644 --- a/config/Caddyfile +++ b/config/Caddyfile @@ -67,6 +67,18 @@ dawarich.{$HOME_DOMAIN} { db.{$HOME_DOMAIN} { reverse_proxy "http://clover-source-of-truth" } +file.{$HOME_DOMAIN} { + handle "/.static/*" { + uri strip_prefix /.static + root /etc/caddy/static + @cors header_regexp origin Origin ^([a-f0-9]+)\.(paperclover\.net|local\.test)$ + header @cors Access-Control-Allow-Origin "{http.request.header.Origin}" + header @cors Access-Control-Allow-Methods "GET, OPTIONS" + header @cors Access-Control-Allow-Headers "Range" + file_server + } + import auth-optional "http://copyparty" +} git.{$HOME_DOMAIN} { handle /user/login { rewrite /user/oauth2/snow @@ -86,9 +98,6 @@ import ./jellyfin/Caddyfile music.{$HOME_DOMAIN} { reverse_proxy "http://navidrome:4533" } -nas.{$HOME_DOMAIN} { - import auth-optional "http://copyparty" -} # opencode.{$HOME_DOMAIN} { # import auth # reverse_proxy "http://opencode" @@ -132,12 +141,21 @@ paperclover.dev { on_demand } } +nas.paperclover.net { + redir "https://file.paperclover.net{uri}" + tls { + on_demand + } +} :80, :443 { handle_errors { rewrite * /{err.status_code} reverse_proxy https://http.cat { - header_up Host {upstream_hostport} + header_up host {upstream_hostport} + header_down Cache-Control "no-store, no-cache, must-revalidate, max-age=0" + header_down Pragma "no-cache" + header_down Expires "0" replace_status {err.status_code} } } diff --git a/config/copyparty.conf b/config/copyparty.conf index dc7a25db1e399cc38f5a8322c7e7b4f8296c3d11..49e43a2af885d1868465c7e0502434515a8abbf2 100644 --- a/config/copyparty.conf +++ b/config/copyparty.conf @@ -19,6 +19,8 @@ idp-logout: /snow.oauth2/sign_out idp-login-t: with sso (snow sign on) + html-head: + [/] # webroot /w accs: @@ -26,18 +28,24 @@ [/clover] /w/clover accs: - rwmda: snow + rwmd: snow [/media] # mediaroot /w/media accs: - rwmda: snow - rwmd: rain, fish, akira + rwmd: snow, rain, fish, akira, @media-manage + r: @media [/home/${u}] /w/home/${u} accs: - rwmda: ${u}, @su + rwmd: ${u}, @su [/clover/Public] /w/clover/Public accs: r: * rwm: @acct + rwmd: snow +[/mirrors] + /w/mirrors + accs: + r: * + rwmd: snow diff --git a/config/font/README.txt b/config/font/README.txt deleted file mode 100644 index 85995d370b2f0366db8a28763ce93106b2b2648c..0000000000000000000000000000000000000000 --- a/config/font/README.txt +++ /dev/null @@ -1,14 +0,0 @@ -The fonts in this directory MUST be purchased to use: -https://www.arrowtype.com/name-sans -https://www.arrowtype.com/name-mono - -The full license from ArrowType: https://www.arrowtype.com/licensing/commercial - -This license specifically grants me, Clover M Caruso, the right to embed these -webfonts on domains I control. - -> The webfonts may only be installed on website domains that are under your -> direct control. - -Since this git repo is hosted on a domain I control, using hardware I control -(local git server in my home), I diff --git a/config/font/nm.woff2 b/config/font/nm.woff2 deleted file mode 100755 index 9e6c9984adffaedb0834daf39aae42940504b4ce..0000000000000000000000000000000000000000 Binary files a/config/font/nm.woff2 and /dev/null differ diff --git a/config/font/nmb.woff2 b/config/font/nmb.woff2 deleted file mode 100755 index b8d7dfc8060a25f161032aa2bc070c7cfaa57929..0000000000000000000000000000000000000000 Binary files a/config/font/nmb.woff2 and /dev/null differ diff --git a/config/font/nmi.woff2 b/config/font/nmi.woff2 deleted file mode 100755 index 6ebda3062e1f546301b4fa6ffd41b082b71b60ba..0000000000000000000000000000000000000000 Binary files a/config/font/nmi.woff2 and /dev/null differ diff --git a/config/font/nsv.woff2 b/config/font/nsv.woff2 deleted file mode 100755 index c9d6290f4ec927b5daaca52a7e4adc7199109fd2..0000000000000000000000000000000000000000 Binary files a/config/font/nsv.woff2 and /dev/null differ diff --git a/config/font/nsvi.woff2 b/config/font/nsvi.woff2 deleted file mode 100755 index 8ed5df211c9c5868d26933bee48a8e976003410b..0000000000000000000000000000000000000000 Binary files a/config/font/nsvi.woff2 and /dev/null differ diff --git a/config/forgejo/public/assets/css/theme-clover.css b/config/forgejo/public/assets/css/theme-clover.css index 6c1b32e4ca2c0fc089a1174965d7a843e4782449..dd2906f836e16575b4e6f16b8bf5771705db8816 100755 --- a/config/forgejo/public/assets/css/theme-clover.css +++ b/config/forgejo/public/assets/css/theme-clover.css @@ -1,47 +1,6 @@ @import "theme-forgejo-light.css"; @import "theme-forgejo-dark.css" (prefers-color-scheme: dark); - -@font-face { - font-family: "Name Mono"; - src: url("../font/nm.woff2") format("woff2"); - font-weight: 400; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Name Mono"; - src: url("../font/nmb.woff2") format("woff2"); - font-weight: 700; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Name Mono"; - src: url("../font/nmi.woff2") format("woff2"); - font-weight: 400; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: "Name Sans"; - src: url("../font/nsv.woff2") format("woff2") tech(variations); - font-weight: 100 900; - font-style: normal; - font-display: swap; - font-stretch: 75% 125%; -} - -@font-face { - font-family: "Name Sans"; - src: url("../font/nsvi.woff2") format("woff2") tech(variations); - font-weight: 100 900; - font-style: italic; - font-display: swap; - font-stretch: 75% 125%; -} +@import "https://file.paperclover.net/.static/font.css"; :root { --fonts-proportional: @@ -225,4 +184,3 @@ transparent ); } - diff --git a/config/keycloak/theme/login/resources/css/styles.css b/config/keycloak/theme/login/resources/css/styles.css index ea3ac145c7b15be4e3295be70a6184add9480c62..21b5932129de7e04f441d70bec4edd1d2dfacd4e 100644 --- a/config/keycloak/theme/login/resources/css/styles.css +++ b/config/keycloak/theme/login/resources/css/styles.css @@ -1,28 +1,4 @@ -@font-face { - font-family: "Name Mono"; - src: url("../font/ATNameMono-Italic.woff2") format("woff2"); - font-weight: 400; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: "Name Sans"; - src: url("../font/nsv.woff2") format("woff2") tech(variations); - font-weight: 100 900; - font-style: normal; - font-display: swap; - font-stretch: 75% 125%; -} - -@font-face { - font-family: "Name Sans"; - src: url("../font/nsvi.woff2") format("woff2") tech(variations); - font-weight: 100 900; - font-style: italic; - font-display: swap; - font-stretch: 75% 125%; -} +@import "https://file.paperclover.net/.static/font.css"; /* reset */ html, @@ -84,7 +60,6 @@ body { background-repeat: no-repeat; color: black; --text: black; - font-family: "Name Sans", sans-serif; --header: light-dark(#1a46cd, #938cff); --primary: light-dark(#00238f, #938cff); diff --git a/config/static/README.txt b/config/static/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..85995d370b2f0366db8a28763ce93106b2b2648c --- /dev/null +++ b/config/static/README.txt @@ -0,0 +1,14 @@ +The fonts in this directory MUST be purchased to use: +https://www.arrowtype.com/name-sans +https://www.arrowtype.com/name-mono + +The full license from ArrowType: https://www.arrowtype.com/licensing/commercial + +This license specifically grants me, Clover M Caruso, the right to embed these +webfonts on domains I control. + +> The webfonts may only be installed on website domains that are under your +> direct control. + +Since this git repo is hosted on a domain I control, using hardware I control +(local git server in my home), I diff --git a/config/static/copyparty.css b/config/static/copyparty.css new file mode 100644 index 0000000000000000000000000000000000000000..7d88b7f6d3b5b732d5d6efea3470be73b1b2cd5e --- /dev/null +++ b/config/static/copyparty.css @@ -0,0 +1,9 @@ +@import "/.static/font.css"; +#opa_msg, #repl { + display: none; +} +:root { + --font-main: "Name Sans", sans-serif; + --font-serif: "Name Sans", serif; + --font-mono: "Name Mono", monospace; +} diff --git a/config/static/font.css b/config/static/font.css new file mode 100644 index 0000000000000000000000000000000000000000..10fffe7cbcf2d754c141f8ba0fdbe609280710ee --- /dev/null +++ b/config/static/font.css @@ -0,0 +1,45 @@ +@font-face { + font-family: "Name Mono"; + src: url("./nm.woff2") format("woff2"); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Name Mono"; + src: url("./nmb.woff2") format("woff2"); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Name Mono"; + src: url("./nmi.woff2") format("woff2"); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Name Sans"; + src: url("./nsv.woff2") format("woff2") tech(variations); + font-weight: 100 900; + font-style: normal; + font-display: swap; + font-stretch: 75% 125%; +} + +@font-face { + font-family: "Name Sans"; + src: url("./nsvi.woff2") format("woff2") tech(variations); + font-weight: 100 900; + font-style: italic; + font-display: swap; + font-stretch: 75% 125%; +} + +body { + font-family: "Name Sans", sans-serif; +} diff --git a/config/static/nm.woff2 b/config/static/nm.woff2 new file mode 100755 index 0000000000000000000000000000000000000000..9e6c9984adffaedb0834daf39aae42940504b4ce Binary files /dev/null and b/config/static/nm.woff2 differ diff --git a/config/static/nmb.woff2 b/config/static/nmb.woff2 new file mode 100755 index 0000000000000000000000000000000000000000..b8d7dfc8060a25f161032aa2bc070c7cfaa57929 Binary files /dev/null and b/config/static/nmb.woff2 differ diff --git a/config/static/nmi.woff2 b/config/static/nmi.woff2 new file mode 100755 index 0000000000000000000000000000000000000000..6ebda3062e1f546301b4fa6ffd41b082b71b60ba Binary files /dev/null and b/config/static/nmi.woff2 differ diff --git a/config/static/nsv.woff2 b/config/static/nsv.woff2 new file mode 100755 index 0000000000000000000000000000000000000000..c9d6290f4ec927b5daaca52a7e4adc7199109fd2 Binary files /dev/null and b/config/static/nsv.woff2 differ diff --git a/config/static/nsvi.woff2 b/config/static/nsvi.woff2 new file mode 100755 index 0000000000000000000000000000000000000000..8ed5df211c9c5868d26933bee48a8e976003410b Binary files /dev/null and b/config/static/nsvi.woff2 differ