1
0
Fork 0

Add subscriptions.header config option

Fixes #191
This commit is contained in:
makeworld 2021-12-23 14:18:18 -05:00
parent eab0a6a626
commit 7318283aef
5 changed files with 13 additions and 3 deletions

View File

@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Syntax highlighting for preformatted text blocks with alt text (#252, #263, [wiki page](https://github.com/makeworld-the-better-one/amfora/wiki/Source-Code-Highlighting))
- [Client certificates](https://github.com/makeworld-the-better-one/amfora/wiki/Client-Certificates) can be restricted to certain paths of a host (#115)
- `header` config option in `[subscriptions]` to allow disabling the header text on the subscriptions page (#191)
### Changed
- Center text automatically, removing `left_margin` from the config (#233)

View File

@ -263,6 +263,7 @@ func Init() error {
viper.SetDefault("subscriptions.update_interval", 1800)
viper.SetDefault("subscriptions.workers", 3)
viper.SetDefault("subscriptions.entries_per_page", 20)
viper.SetDefault("subscriptions.header", true)
viper.SetConfigFile(configPath)
viper.SetConfigType("toml")

View File

@ -333,6 +333,9 @@ workers = 3
# The number of subscription updates displayed per page.
entries_per_page = 20
# Set to false to remove the explanatory text from the top of the subscription page
header = true
[theme]
# This section is for changing the COLORS used in Amfora.

View File

@ -330,6 +330,9 @@ workers = 3
# The number of subscription updates displayed per page.
entries_per_page = 20
# Set to false to remove the explanatory text from the top of the subscription page
header = true
[theme]
# This section is for changing the COLORS used in Amfora.

View File

@ -97,9 +97,11 @@ func Subscriptions(t *tab, u string) string {
} else {
// Render page
rawPage += "You can use Ctrl-X to subscribe to a page, or to an Atom/RSS/JSON feed. See the online wiki for more.\n" +
"If you just opened Amfora then updates may appear incrementally. Reload the page to see them.\n\n" +
"=> about:manage-subscriptions Manage subscriptions\n\n"
if viper.GetBool("subscriptions.header") {
rawPage += "You can use Ctrl-X to subscribe to a page, or to an Atom/RSS/JSON feed. See the online wiki for more.\n" +
"If you just opened Amfora then updates may appear incrementally. Reload the page to see them.\n\n"
}
rawPage += "=> about:manage-subscriptions Manage subscriptions\n\n"
// curDay represents what day of posts the loop is on.
// It only goes backwards in time.