2020-06-18 16:54:48 -04:00
|
|
|
package display
|
|
|
|
|
2020-09-01 13:55:09 -04:00
|
|
|
import (
|
|
|
|
"io/ioutil"
|
|
|
|
|
|
|
|
"github.com/makeworld-the-better-one/amfora/config"
|
|
|
|
)
|
|
|
|
|
|
|
|
//nolint
|
|
|
|
var defaultNewTabContent = `# New Tab
|
2020-06-18 16:54:48 -04:00
|
|
|
|
2020-06-19 11:18:28 -04:00
|
|
|
You've opened a new tab. Use the bar at the bottom to browse around. You can start typing in it by pressing the space key.
|
2020-06-18 16:54:48 -04:00
|
|
|
|
2020-06-19 11:18:28 -04:00
|
|
|
Press the ? key at any time to bring up the help, and see other keybindings. Most are what you expect.
|
2020-06-18 16:54:48 -04:00
|
|
|
|
2020-09-01 13:55:09 -04:00
|
|
|
You can customize this page by creating a gemtext file called newtab.gmi, in Amfora's configuration folder.
|
|
|
|
|
2020-06-18 16:54:48 -04:00
|
|
|
Happy browsing!
|
|
|
|
|
2020-12-20 00:31:14 -05:00
|
|
|
## Internal Pages
|
|
|
|
|
2020-06-23 20:07:25 -04:00
|
|
|
=> about:bookmarks Bookmarks
|
2020-12-05 20:35:15 -05:00
|
|
|
=> about:subscriptions Subscriptions
|
2021-02-12 21:26:07 -05:00
|
|
|
=> about:about All internal pages
|
2020-06-23 20:07:25 -04:00
|
|
|
|
2020-12-20 00:31:14 -05:00
|
|
|
## Learn more about Amfora!
|
|
|
|
|
|
|
|
=> https://github.com/makeworld-the-better-one/amfora Amfora homepage
|
|
|
|
=> https://github.com/makeworld-the-better-one/amfora/wiki Amfora Wiki [GitHub]
|
2021-02-17 12:11:57 -05:00
|
|
|
=> gemini://makeworld.space/amfora-wiki/ Amfora Wiki [On Gemini!]
|
2020-12-20 00:31:14 -05:00
|
|
|
|
2023-11-03 11:34:18 -04:00
|
|
|
=> gemini://geminiprotocol.net Project Gemini
|
2020-06-18 16:54:48 -04:00
|
|
|
`
|
2020-09-01 13:55:09 -04:00
|
|
|
|
|
|
|
// Read the new tab content from a file if it exists or fallback to a default page.
|
|
|
|
func getNewTabContent() string {
|
|
|
|
data, err := ioutil.ReadFile(config.NewTabPath)
|
|
|
|
if err == nil {
|
|
|
|
return string(data)
|
|
|
|
}
|
|
|
|
return defaultNewTabContent
|
|
|
|
}
|