这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: ci

on:
push:
branches:
- main

jobs:
docker:
runs-on: ubuntu-latest
steps:

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./packaging/docker/alpine/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
158 changes: 85 additions & 73 deletions internal/template/templates/common/layout.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{ define "base" }}
<!DOCTYPE html>
<html lang="{{ replace .language "_" "-"}}">
<html lang="{{ replace .language " _" "-" }}">

<head>
<meta charset="utf-8">
<title>{{template "title" .}} - Miniflux</title>
Expand All @@ -11,114 +12,122 @@
<meta name="referrer" content="no-referrer">
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="theme-color" content="{{ theme_color .theme "light" }}" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="{{ theme_color .theme "dark" }}" media="(prefers-color-scheme: dark)">
<meta name="theme-color" content="{{ theme_color .theme " light" }}" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="{{ theme_color .theme " dark" }}" media="(prefers-color-scheme: dark)">

<link rel="manifest" href="{{ route "webManifest" }}" crossorigin="use-credentials">
<link rel="manifest" href="{{ route " webManifest" }}" crossorigin="use-credentials">

<link rel="icon" type="image/png" sizes="16x16" href="{{ route "appIcon" "filename" "icon-16.png" }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ route "appIcon" "filename" "icon-32.png" }}">
<link rel="icon" type="image/png" sizes="128x128" href="{{ route "appIcon" "filename" "icon-128.png" }}">
<link rel="icon" type="image/png" sizes="192x192" href="{{ route "appIcon" "filename" "icon-192.png" }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ route "appIcon" "filename" "icon-120.png" }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ route "appIcon" "filename" "icon-152.png" }}">
<link rel="apple-touch-icon" sizes="167x167" href="{{ route "appIcon" "filename" "icon-167.png" }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ route "appIcon" "filename" "icon-180.png" }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ route " appIcon" "filename" "icon-16.png" }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ route " appIcon" "filename" "icon-32.png" }}">
<link rel="icon" type="image/png" sizes="128x128" href="{{ route " appIcon" "filename" "icon-128.png" }}">
<link rel="icon" type="image/png" sizes="192x192" href="{{ route " appIcon" "filename" "icon-192.png" }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ route " appIcon" "filename" "icon-120.png" }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ route " appIcon" "filename" "icon-152.png" }}">
<link rel="apple-touch-icon" sizes="167x167" href="{{ route " appIcon" "filename" "icon-167.png" }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ route " appIcon" "filename" "icon-180.png" }}">

{{ $cspNonce := nonce }}
{{ csp .user $cspNonce | safeHTML }}
<link rel="stylesheet" nonce="{{ $cspNonce }}" type="text/css" href="{{ route "stylesheet" "name" .theme "checksum" .theme_checksum }}">
<script nonce="{{ $cspNonce }}" src="{{ route "javascript" "name" "app" "checksum" .app_js_checksum }}" type="module"></script>
<link rel="stylesheet" nonce="{{ $cspNonce }}" type="text/css" href="{{ route " stylesheet" "name" .theme "checksum"
.theme_checksum }}">
<script nonce="{{ $cspNonce }}" src="{{ route " javascript" "name" "app" "checksum" .app_js_checksum }}"
type="module"></script>
{{ if .user -}}
{{ if .user.Stylesheet -}}
<style nonce="{{ $cspNonce }}">{{ .user.Stylesheet | safeCSS }}</style>
{{ end -}}
{{ if .user.CustomJS -}}
<script type="module" nonce="{{ $cspNonce }}">{{ .user.CustomJS | safeJS }}</script>
{{ end -}}
{{ if .user.Stylesheet -}}
<style nonce="{{ $cspNonce }}">
{
{
.user.Stylesheet | safeCSS
}
}
</style>
{{ end -}}
{{ if .user.CustomJS -}}
<script type="module" nonce="{{ $cspNonce }}">{ { .user.CustomJS | safeJS } }</script>
{{ end -}}
{{ end -}}
</head>
<body
data-service-worker-url="{{ route "javascript" "name" "service-worker" "checksum" .sw_js_checksum }}"
{{ if .csrf }}data-csrf-token="{{ .csrf }}"{{ end }}
data-add-subscription-url="{{ route "addSubscription" }}"
data-entries-status-url="{{ route "updateEntriesStatus" }}"
data-refresh-all-feeds-url="{{ route "refreshAllFeeds" }}"
{{ if .webAuthnEnabled }}
data-webauthn-register-begin-url="{{ route "webauthnRegisterBegin" }}"
data-webauthn-register-finish-url="{{ route "webauthnRegisterFinish" }}"
data-webauthn-login-begin-url="{{ route "webauthnLoginBegin" }}"
data-webauthn-login-finish-url="{{ route "webauthnLoginFinish" }}"
data-webauthn-delete-all-url="{{ route "webauthnDeleteAll" }}"
{{ end }}
{{ if .user }}
{{ if not .user.KeyboardShortcuts }}data-disable-keyboard-shortcuts="true"{{ end }}
data-mark-as-read-on-view="{{ if .user.MarkReadOnView }}true{{ else }}false{{ end }}"
{{ end }}>

<body data-service-worker-url="{{ route " javascript" "name" "service-worker" "checksum" .sw_js_checksum }}" {{ if .csrf
}}data-csrf-token="{{ .csrf }}" {{ end }} data-add-subscription-url="{{ route " addSubscription" }}"
data-entries-status-url="{{ route " updateEntriesStatus" }}" data-refresh-all-feeds-url="{{ route " refreshAllFeeds"
}}" {{ if .webAuthnEnabled }} data-webauthn-register-begin-url="{{ route " webauthnRegisterBegin" }}"
data-webauthn-register-finish-url="{{ route " webauthnRegisterFinish" }}" data-webauthn-login-begin-url="{{ route "
webauthnLoginBegin" }}" data-webauthn-login-finish-url="{{ route " webauthnLoginFinish" }}"
data-webauthn-delete-all-url="{{ route " webauthnDeleteAll" }}" {{ end }} {{ if .user }} {{ if not
.user.KeyboardShortcuts }}data-disable-keyboard-shortcuts="true" {{ end }}
data-mark-as-read-on-view="{{ if .user.MarkReadOnView }}true{{ else }}false{{ end }}" {{ end }}>

{{ if .user }}
<a class="skip-to-content-link" href="#main">{{ t "skip_to_content" }}</a>
<header class="header">
<nav>
<div class="logo" data-toggle-button-label="{{ t "menu.title" }}">
<a aria-label="{{ t "menu.home_page" }}" href="{{ route .user.DefaultHomePage }}">
<div class="logo" data-toggle-button-label="{{ t " menu.title" }}">
<a aria-label="{{ t " menu.home_page" }}" href="{{ route .user.DefaultHomePage }}">
Mini<span>flux</span>
</a>
{{ icon "chevron-down"}}
</div>
<ul id="header-menu">
<li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g u" }}">
<a href="{{ route "unread" }}"
data-page="unread"
{{ if gt .countUnread 0 }}
aria-label="{{ t "menu.unread" }}, {{ plural "page.unread_entry_count" .countUnread .countUnread }}"
{{ end }}
>
<li {{ if eq .menu "unread" }}class="active" {{ end }} title="{{ t " tooltip.keyboard_shortcuts" "g u"
}}">
<a href="{{ route " unread" }}" data-page="unread" {{ if gt .countUnread 0 }} aria-label="{{ t "
menu.unread" }}, {{ plural "page.unread_entry_count" .countUnread .countUnread }}" {{ end }}>
{{ icon "entries" }}{{ t "menu.unread" }}
{{ if gt .countUnread 0 }}
<span class="unread-counter-wrapper" aria-hidden="true">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
<span class="unread-counter-wrapper" aria-hidden="true">(<span class="unread-counter">{{
.countUnread }}</span>)</span>
{{ end }}
</a>
</li>
<li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g b" }}">
<a href="{{ route "starred" }}" data-page="starred">{{ icon "star" }}{{ t "menu.starred" }}</a>
<li {{ if eq .menu "starred" }}class="active" {{ end }} title="{{ t " tooltip.keyboard_shortcuts" "g b"
}}">
<a href="{{ route " starred" }}" data-page="starred">{{ icon "star" }}{{ t "menu.starred" }}</a>
</li>
<li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g h" }}">
<a href="{{ route "history" }}" data-page="history">{{ icon "history" }}{{ t "menu.history" }}</a>
<li {{ if eq .menu "history" }}class="active" {{ end }} title="{{ t " tooltip.keyboard_shortcuts" "g h"
}}">
<a href="{{ route " history" }}" data-page="history">{{ icon "history" }}{{ t "menu.history" }}</a>
</li>
<li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g f" }}">
<a href="{{ route "feeds" }}" data-page="feeds">{{ icon "feeds" }}{{ t "menu.feeds" }}
{{ if gt .countErrorFeeds 0 }}
<span class="error-feeds-counter-wrapper">(<span class="error-feeds-counter">{{ .countErrorFeeds }}</span>)</span>
{{ end }}
<li {{ if eq .menu "feeds" }}class="active" {{ end }} title="{{ t " tooltip.keyboard_shortcuts" "g f"
}}">
<a href="{{ route " feeds" }}" data-page="feeds">{{ icon "feeds" }}{{ t "menu.feeds" }}
{{ if gt .countErrorFeeds 0 }}
<span class="error-feeds-counter-wrapper">(<span class="error-feeds-counter">{{ .countErrorFeeds
}}</span>)</span>
{{ end }}
</a>
<a href="{{ route "addSubscription" }}" title="{{ t "tooltip.keyboard_shortcuts" "+" }}" aria-label="{{ t "menu.add_feed" }}">
<a href="{{ route " addSubscription" }}" title="{{ t " tooltip.keyboard_shortcuts" "+" }}"
aria-label="{{ t " menu.add_feed" }}">
(+)
</a>
</li>
<li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g c" }}">
<a href="{{ route "categories" }}" data-page="categories">{{ icon "categories" }}{{ t "menu.categories" }}</a>
<li {{ if eq .menu "categories" }}class="active" {{ end }} title="{{ t "
tooltip.keyboard_shortcuts" "g c" }}">
<a href="{{ route " categories" }}" data-page="categories">{{ icon "categories" }}{{ t
"menu.categories" }}</a>
</li>
<li {{ if eq .menu "search" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "/" }}">
<a href="{{ route "search" }}" data-page="search">{{ icon "search" }}{{ t "menu.search" }}</a>
<li {{ if eq .menu "search" }}class="active" {{ end }} title="{{ t " tooltip.keyboard_shortcuts" "/"
}}">
<a href="{{ route " search" }}" data-page="search">{{ icon "search" }}{{ t "menu.search" }}</a>
</li>
<li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g s" }}">
<a href="{{ route "settings" }}" data-page="settings">{{ icon "settings" }}{{ t "menu.settings" }}</a>
<li {{ if eq .menu "settings" }}class="active" {{ end }} title="{{ t " tooltip.keyboard_shortcuts" "g s"
}}">
<a href="{{ route " settings" }}" data-page="settings">{{ icon "settings" }}{{ t "menu.settings"
}}</a>
</li>
{{ if not hasAuthProxy }}
<li>
<a href="{{ route "logout" }}" title="{{ t "tooltip.logged_user" .user.Username }}">{{ icon "logout" }}{{ t "menu.logout" }}</a>
</li>
<li>
<a href="{{ route " logout" }}" title="{{ t " tooltip.logged_user" .user.Username }}">{{ icon
"logout" }}{{ t "menu.logout" }}</a>
</li>
{{ end }}
</ul>
</nav>
</header>
{{ end }}
{{ if .flashMessage }}
<div role="alert" class="flash-message alert alert-success">{{ .flashMessage }}</div>
<div role="alert" class="flash-message alert alert-success">{{ .flashMessage }}</div>
{{ end }}
{{ if .flashErrorMessage }}
<div role="alert" class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
<div role="alert" class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
{{ end }}

{{template "page_header" .}}
Expand Down Expand Up @@ -146,8 +155,10 @@ <h3 tabindex="-1" id="dialog-title">{{ t "page.keyboard_shortcuts.title" }}</h3>

<p>{{ t "page.keyboard_shortcuts.subtitle.items" }}</p>
<ul>
<li>{{ t "page.keyboard_shortcuts.go_to_previous_item" }} = <strong>p</strong>, <strong>k</strong>, <strong>&#x23F4;</strong></li>
<li>{{ t "page.keyboard_shortcuts.go_to_next_item" }} = <strong>n</strong>, <strong>j</strong>, <strong>&#x23F5;</strong></li>
<li>{{ t "page.keyboard_shortcuts.go_to_previous_item" }} = <strong>p</strong>, <strong>k</strong>,
<strong>&#x23F4;</strong></li>
<li>{{ t "page.keyboard_shortcuts.go_to_next_item" }} = <strong>n</strong>, <strong>j</strong>,
<strong>&#x23F5;</strong></li>
<li>{{ t "page.keyboard_shortcuts.go_to_feed" }} = <strong>F</strong></li>
<li>{{ t "page.keyboard_shortcuts.go_to_top_item" }} = <strong>g + g</strong></li>
<li>{{ t "page.keyboard_shortcuts.go_to_bottom_item" }} = <strong>G</strong></li>
Expand Down Expand Up @@ -189,5 +200,6 @@ <h3 tabindex="-1" id="dialog-title">{{ t "page.keyboard_shortcuts.title" }}</h3>
<template id="icon-unstar">{{ icon "unstar" }}</template>
<template id="icon-save">{{ icon "save" }}</template>
</body>

</html>
{{ end }}
{{ end }}
8 changes: 1 addition & 7 deletions packaging/docker/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ RUN make miniflux

FROM docker.io/library/alpine:3.22

LABEL org.opencontainers.image.title=Miniflux
LABEL org.opencontainers.image.description="Miniflux is a minimalist and opinionated feed reader"
LABEL org.opencontainers.image.vendor="Frédéric Guillot"
LABEL org.opencontainers.image.licenses=Apache-2.0
LABEL org.opencontainers.image.url=https://miniflux.app
LABEL org.opencontainers.image.source=https://github.com/miniflux/v2
LABEL org.opencontainers.image.documentation=https://miniflux.app/docs/


EXPOSE 8080
ENV LISTEN_ADDR=0.0.0.0:8080
Expand Down