Documentation
¶
Index ¶
- Constants
- Variables
- func About() templ.Component
- func AccountSettings(user *models.User) templ.Component
- func ActionSuggestionSubscriptions(subscriptions models.Subscriptions) templ.Component
- func AddCategory(category models.Category) templ.Component
- func AddFeedSubscription(request *models.FeedSubscriptionRequest) templ.Component
- func AddGroupSubscription(request *models.GroupSubscriptionRequest) templ.Component
- func AddSearchSubscription(request *models.SearchSubscriptionRequest) templ.Component
- func AddSearchSubscriptionFilter(filter *models.AddSubscriptionSearchFilterRequest) templ.Component
- func AddSubscriptionToGroup(id, name string) templ.Component
- func AdvancedSearch(request *models.SearchRequest, attributes templ.Attributes) templ.Component
- func ArticleCard(idx int, a *models.Article) templ.Component
- func ArticleContent(a *models.Article) templ.Component
- func CategoryBadge(category models.Category, options ...element.PropertiesOption) templ.Component
- func CategoryFilters(data *models.CategoryFilters) templ.Component
- func CategoryManagement(suggested []models.Category, existing []models.Category) templ.Component
- func ChangelogPage(releases []Release) templ.Component
- func ChooseSubscriptionPlan(user *models.User, props *CheckoutProps) templ.Component
- func Comparison(service string) templ.Component
- func Contact() templ.Component
- func CreatePage(template templ.Component, options ...PageOption) templ.Component
- func DeactivateAccountModal() templ.Component
- func DeactivateResult(user *models.User, timeLeft *time.Time) templ.Component
- func DisplaySettings(user *models.User) templ.Component
- func Dock(options ...element.PropertiesOption) templ.Component
- func Document(data []byte) templ.Component
- func EditEmailSubscription(request *models.EditEmailSubscriptionRequest) templ.Component
- func EditFeedSubscription(request *models.FeedSubscriptionRequest) templ.Component
- func EditGroupSubscription(request *models.GroupSubscriptionRequest) templ.Component
- func EditSearchSubscription(request *models.SearchSubscriptionRequest) templ.Component
- func ExportSubscriptions() templ.Component
- func ExternalError(user *models.User, msg *models.UserMessage) templ.Component
- func FeatureAddContent(flipped bool) templ.Component
- func FeatureArticleFilters(flipped bool) templ.Component
- func FeatureEmailNewsletters(flipped bool) templ.Component
- func FeatureFavorites(flipped bool) templ.Component
- func FeatureFetchRemoteContent(flipped bool) templ.Component
- func FeatureGroupSubscriptions(flipped bool) templ.Component
- func FeatureImport(flipped bool) templ.Component
- func FeatureLayout(flipped bool) templ.Component
- func FeatureSearchSubscription(flipped bool) templ.Component
- func FeatureSubscriptionCustomisation(flipped bool) templ.Component
- func FeatureThemes(flipped bool) templ.Component
- func Features() templ.Component
- func FeaturesPageCollect() templ.Component
- func FeaturesPageConsume() templ.Component
- func FeaturesPageCurate() templ.Component
- func FooterExternal() templ.Component
- func ForgetMe() templ.Component
- func FragmentKeysFromCtx(ctx context.Context) []templFragmentKey
- func FragmentKeysToCtx(ctx context.Context, keys ...templFragmentKey) context.Context
- func HeaderExternal() templ.Component
- func HeaderInternal(props *InternalLayoutProps) templ.Component
- func ImportSubscriptions() templ.Component
- func ImportSubscriptionsResults(results []models.FeedSubscriptionResult) templ.Component
- func InternalError(user *models.User, referer string, msg *models.UserMessage) templ.Component
- func ItemList(name string, entries []ListItem) templ.Component
- func Landing() templ.Component
- func LandingHeaderSlot() templ.Component
- func LayoutExternal(content ...templ.Component) templ.Component
- func LayoutInternal(props *InternalLayoutProps, content ...templ.Component) templ.Component
- func ListArticles(response *models.ListArticlesResponse) templ.Component
- func ListFavorites(response *models.ListFavoritesResponse) templ.Component
- func ListSubscriptions(response *models.ListSubscriptionsResponse) templ.Component
- func NewFeaturePanel(id string) templ.Component
- func NewOpenGraphMetadata(options ...opengraph.Option) *opengraph.OpenGraph
- func NewUserHome() templ.Component
- func NotFound() templ.Component
- func Notification(msg *models.UserMessage, options ...notificationOption) templ.Component
- func PaddleHead() templ.Component
- func PathFromCtx(ctx context.Context) string
- func PathToCtx(ctx context.Context, path string) context.Context
- func Post(post *models.MarkdownFile) templ.Component
- func PostsIndex(posts []*models.MarkdownFile) templ.Component
- func PurchaseSubscriptionSuccess(transactionID string) templ.Component
- func RemoveSubscriptionModal(request *models.RemoveSubscriptionRequest, options ...element.PropertiesOption) templ.Component
- func ReportIssue(details *models.ReportIssueRequest) templ.Component
- func Search() templ.Component
- func SearchResults(results *models.SearchResults) templ.Component
- func SearchSubscriptionFilterSuggestions(subscriptions models.Subscriptions) templ.Component
- func SearchSuggestions(suggestions *models.SearchResults) templ.Component
- func ShareArticleModal(request *models.ShareArticleRequest) templ.Component
- func ShowFeedSuggestions(request *models.FeedSuggestionsResults) templ.Component
- func ShowNoSuggestions(text string) templ.Component
- func ShowSubscriptionEmail(email string) templ.Component
- func SideBar(options ...element.PropertiesOption) templ.Component
- func SimilarArticles(articles models.Articles) templ.Component
- func SubscriptionCard(idx int, subscription *models.Subscription) templ.Component
- func SubscriptionSettings(data *SubscriptionSettingsData) templ.Component
- func Unsubscribe(token string) templ.Component
- func UnsubscribeResult(msg *models.UserMessage) templ.Component
- func UpdateTitle(title string) templ.Component
- func UpdatesToast(options ...element.PropertiesOption) templ.Component
- func UserAccountIssue() templ.Component
- func UserAvatar(user *models.User, attributes templ.Attributes) templ.Component
- func UserHome(data *HomeData) templ.Component
- func UserSettings() templ.Component
- func Viewer(feed *models.Feed, errMsg *models.UserMessage) templ.Component
- func ViewerError(msg *models.UserMessage) templ.Component
- func ViewerResults(feed *models.Feed) templ.Component
- func VsFeedly() templ.Component
- func VsFeedlyMeta() templ.Component
- func VsInoreader() templ.Component
- func VsInoreaderMeta() templ.Component
- func WithNotificationTimeout(duration time.Duration) notificationOption
- type Article
- type ChangeEntry
- type ChangeType
- type CheckoutProps
- type HomeData
- type InternalLayoutProps
- type ListItem
- type Page
- type PageOption
- type Release
- type Subscription
- type SubscriptionSettingsData
- type VersionType
Constants ¶
const ( // BodyFragment is a fragment key pointing to tbe body section of a page. BodyFragment templFragmentKey = "body" // ContentFragment is a fragment key pointing to the main content of a page. ContentFragment templFragmentKey = "content" // PaginateFragment is a fragment key pointing to the content to render when paginating. PaginateFragment templFragmentKey = "paginate" )
const DefaultNotificationTimeout = 5 * time.Second
DefaultNotificationTimeout is the default duration which a notification is shown (unless overridden on a per notification basis).
const ErrorFragment templFragmentKey = "error"
const (
ExternalHeader templFragmentKey = "ExternalHeader"
)
const SubscriptionsTable templFragmentKey = "subscriptionsTable"
Variables ¶
var BillingFAQ = []partials.FAQEntry{
{
ID: "switching",
Question: "Can I switch plans?",
Answer: `
<p>Yes. You can upgrade from monthly to annual at any time. We'll prorate the difference.</p>
`,
},
{
ID: "payment-methods",
Question: "What payment methods do you accept?",
Answer: `
<p>All major credit cards, PayPal, and local payment methods depending on your region. Payments are handled by Paddle.</p>
`,
},
{
ID: "tax",
Question: "Do you handle tax?",
Answer: `
<p>Yes. Paddle is our Merchant of Record and handles sales tax, VAT, and GST collection globally.</p>
`,
},
{
ID: "cancel",
Question: "Can I cancel anytime?",
Answer: `
<p>Absolutely. Cancel from your dashboard and you'll retain access until the end of your billing period.</p>
<p>You can manage your subscription from Settings->Account once logged in.</p>
`,
},
{
ID: "refunds",
Question: "What is your refund policy?",
Answer: `
<p>Monthly plans: No refunds. Cancel anytime before your next billing date.</p>
<p>Annual plans: Full refund within 14 days of purchase if you're not satisfied. After 14 days, no
refunds are issued for the remaining period.</p>
<p>To request a refund, contact hello@immanent.tech with your account email, or use the contact form on
the website.</p> `,
},
}
var ( // ContentID points to the element containing the main content of the page. ContentID = models.ElementID("content") )
var LandingPageFAQ = []partials.FAQEntry{
{
ID: "whatisit",
Question: "What is a feed reader? How is it different from X, Facebook, Instagram, etc.?",
Answer: `
<p>A feed reader is an app that collects content from websites, blogs, and newsletters you choose and
displays it in one place without algorithms deciding what you see or ads interrupting your reading.</p>
<p>Most websites publish their content as an RSS or Atom feed: a standardised file that lists their
latest articles. A feed reader checks these files regularly and shows you new posts as they arrive, in
chronological order, from only the sources you've subscribed to.</p>
<p>This is fundamentally different from social platforms like Facebook, X (Twitter), or LinkedIn, where
a proprietary algorithm selects and ranks what you see based on engagement, advertising revenue, and
platform goals and not your preferences. It's also different from news aggregators like Apple News or
Google News, which curate content editorially and promote sponsored stories.</p>
<p>With a feed reader, you own your reading list. You can follow any website that publishes a feed, from
major newspapers to small independent blogs and everything appears together, unfiltered and in the order
it was published.</p>
`,
},
{
ID: "app",
Question: "Do you have an app?",
Answer: `
<p>Foragd is a web app, which means there is nothing to install and no app store required. Open your
browser, log in on any device you already own. Because Foragd runs entirely in the browser, it works on
every platform without a separate version for each: Chrome, Safari, Firefox, and Edge on Windows, macOS,
Linux, iOS, and Android are all fully supported. Your reading list, bookmarks, and settings are always
in sync across every device automatically, with no manual backup or export needed. </p>
<p>On mobile, Foragd can be added to your home screen directly from your browser (on iOS via Safari's
"Add to Home Screen" and on Android via Chrome's "Add to Home Screen"). This gives you a full app-like
experience, including offline support, without going through the App Store or Google Play.</p>
<p>This also means Foragd is always up to date. There are no app updates to approve or install;
improvements and new features are available the moment you open the page.</p>
`,
},
{
ID: "import",
Question: "Can I import my subscriptions from elsewhere?",
Answer: `
<p>Yes. Foragd supports importing and exporting subscriptions using the OPML file format; an open
standard that all major feed readers support. If you're switching from Feedly, Inoreader, NewsBlur, The
Old Reader, or any other RSS reader, you can export your subscriptions as an OPML file and import them
into Foragd in seconds, with no manual re-adding of feeds.</p>
<p>This portability is by design. Your subscriptions are a list of websites and sources you've
deliberately chosen to follow. Your data is always yours, not the platform's. Unlike a social media
following list that's locked inside a single company's database, an OPML file is a plain, open format
you can take anywhere. Foragd treats your reading list as your data, which is why Foragd also supports
exporting as well as importing. If you're currently using a platform that doesn't offer OPML export,
that's a sign your subscriptions are being held hostage. A feed reader that won't let you leave with
your data isn't a tool; it's a trap.</p>
<p>Switching to Foragd takes just a few minutes: export your OPML from your current reader, import it in
Foragd's settings, and every feed you've ever subscribed to will be waiting for you.</p>
`,
},
{
ID: "privacy",
Question: "Are my subscriptions private?",
Answer: `
<p>Yes, completely. Foragd has no social features, no public profiles, and no follower counts. What you
read is nobody's business but yours.</p>
<p>Most free content platforms are built on a simple trade: you get the service, they get your attention
and behaviour data to sell to advertisers. Every article you read, every topic you follow, every link
you click becomes a data point used to build an advertising profile. Foragd has no advertising business
model, so there is no incentive to collect, analyse, or sell your reading behaviour. We don't know what
you read, and we don't want to.</p>
<p>What we do collect is the minimum required to run the service: your email address to log in, and the
list of feeds you subscribe to so we can fetch content for you. That's it. We don't share this with
marketing third-parties, we don't run behavioural analytics on your reading habits, and we never inject
ads or sponsored content into your feed.</p>
<p>Because Foragd is subscription-funded rather than advertiser-funded, your interests and ours are
aligned: we succeed when you find the product valuable enough to pay for, not when we maximise the time
you spend staring at a screen. You can read the full details in our <a href="/policies/privacy"
class="link">privacy policy</a>.</p>
<p>Your subscriptions are also portable and exportable at any time (see the previous question on OPML
import and export).</p> `,
},
{
ID: "opensource",
Question: "Is Foragd open source?",
Answer: `
<p>Yes. Foragd's source code is publicly available <a class="link"
href="https://github.com/immanent-tech/foragd">on GitHub</a>. But more importantly, here's why that
matters to you as a user rather than just as a developer:</p>
<ul class="space-y-2">
<li>
<p class="font-semibold">You can verify our privacy claims.</p>
<p> We tell you we don't track your reading habits or sell your data. But with closed-source
software, that's a promise you have to take on faith. With open source, anyone can read the code
and confirm that what we say matches what the software actually does. Independent researchers,
security professionals, and privacy advocates can audit Foragd without our permission or
involvement. Trust, but verify.</p>
</li>
<li>
<p class="font-semibold">Your data can never be held hostage.</p>
<p>If Foragd ever shut down, was acquired, or changed direction in a way you disagreed with, the
open source code means the community could continue running it independently. Your reading list
and the software that powers it can't be locked away. This is the open source guarantee that no
proprietary feed reader such as Feedly, Inoreader, or anyone else can offer.</p>
</li>
<li>
<p class="font-semibold">Security is stronger with more eyes on the code.</p>
<p>Closed-source software relies on a single team to find and fix vulnerabilities. Open source
means the entire developer community can spot and report issues, often faster than any internal
team could alone.</p>
</li>
<li>
<p class="font-semibold">You're not betting on a black box.</p>
<p>Many RSS readers have come and gone over the years — Google Reader being the most famous
casualty. When a proprietary service shuts down, your subscriptions, your history, and your
reading habits can disappear overnight. Open source is a hedge against that risk. You can find
the Foragd source code and contribute at <a class="link"
href="https://github.com/immanent-tech/foragd">GitHub</a>.</p>
</li>
</ul>
`,
},
}
var NotificationsID = models.ElementID("notifications")
NotificationsID points to an element that can be used for displaying notifications to the user.
var ViewerFAQ = []partials.FAQEntry{
{
ID: "whatisit",
Question: "What is a feed reader? How is it different from X, Facebook, Instagram, etc.?",
Answer: `
<p>A feed reader is an app that collects content from websites, blogs, and newsletters you choose and
displays it in one place without algorithms deciding what you see or ads interrupting your reading.</p>
<p>Most websites publish their content as an RSS or Atom feed: a standardised file that lists their
latest articles. A feed reader checks these files regularly and shows you new posts as they arrive, in
chronological order, from only the sources you've subscribed to.</p>
<p>This is fundamentally different from social platforms like Facebook, X (Twitter), or LinkedIn, where
a proprietary algorithm selects and ranks what you see based on engagement, advertising revenue, and
platform goals and not your preferences. It's also different from news aggregators like Apple News or
Google News, which curate content editorially and promote sponsored stories.</p>
<p>With a feed reader, you own your reading list. You can follow any website that publishes a feed, from
major newspapers to small independent blogs and everything appears together, unfiltered and in the order
it was published.</p>
`,
},
{
ID: "how-it-works",
Question: "How does the feed viewer work?",
Answer: `
<p>When you enter a URL, the feed viewer will fetch the source of the page.</p>
<p>If the source is one of the known feed formats like RSS or Atom, the viewer will format and return
the posts contained in the feed.</p>
<p>If the source is normal webpage, the viewer will look at links in the page and try to find one that
points to feed content, which it will then fetch, format and display.</p>
`,
},
{
ID: "not-working",
Question: "Why did the feed viewer not find content for my URL?",
Answer: `
<p>Unfortunately, not all websites have RSS and Atom feeds. While the viewer tries its best to find
feed content, and uses a few tricks for this, there are still websites that cannot be parsed.</p>
`,
},
{
ID: "privacy",
Question: "Does the feed viewer collect or store any information about me, the URL or the feed content it fetches?",
Answer: `
<p>No. Content is fetched and displayed dynamically, and is not stored once you navigate away from the page.</p>
<p>We do store common analytics services to track minimal, anonymous usage of the feed viewer. No
personal information is collected or stored. The feed viewer does not require cookies.</p>
<p>More information can be found in our <a href="/policies/privacy" class="link">Privacy Policy</a>.</p>
`,
},
{
ID: "open-source",
Question: "Is this open-source?",
Answer: `
<p>The underlying library that does most of the heavy lifting, <a
href="https://github.com/immanent-tech/go-syndication" class="link">go-syndication</a> is
open-source!</p>
<p>The site itself is part of <a href="https://foragd.app" class="link">Foragd</a>, a beautiful, web
based, online feed reader, that uses the go-syndication library.</p>
`,
},
}
Functions ¶
func ActionSuggestionSubscriptions ¶ added in v0.73.0
func ActionSuggestionSubscriptions(subscriptions models.Subscriptions) templ.Component
func AddCategory ¶
AddCategory renders a new category item to the list of categories of a subscription.
func AddFeedSubscription ¶
func AddFeedSubscription(request *models.FeedSubscriptionRequest) templ.Component
AddFeedSubscription is a page for adding a new subscription to a feed.
func AddGroupSubscription ¶
func AddGroupSubscription(request *models.GroupSubscriptionRequest) templ.Component
AddGroupSubscription is a page for adding a new group subscription.
func AddSearchSubscription ¶
func AddSearchSubscription(request *models.SearchSubscriptionRequest) templ.Component
AddSearchSubscription is a page for adding a new search subscription.
func AddSearchSubscriptionFilter ¶
func AddSearchSubscriptionFilter(filter *models.AddSubscriptionSearchFilterRequest) templ.Component
func AddSubscriptionToGroup ¶ added in v0.82.4
AddSubscriptionToGroup renders a button indicating a subscription is part of a group subscription. Clicking the button removes it from the group.
func AdvancedSearch ¶ added in v0.81.1
func AdvancedSearch(request *models.SearchRequest, attributes templ.Attributes) templ.Component
func ArticleCard ¶
Card renders an article as a card, for displaying in a list.
func ArticleContent ¶
ArticleContent renders the complete content of an article.
func CategoryBadge ¶ added in v0.19.0
CategoryBadge renders a badge containing a category. Options can be used to apply additional styling or attributes (i.e. HTMX options) to the badge.
func CategoryFilters ¶ added in v0.78.0
func CategoryFilters(data *models.CategoryFilters) templ.Component
func CategoryManagement ¶
func ChangelogPage ¶ added in v0.153.0
ChangelogPage renders a full changelog page
func ChooseSubscriptionPlan ¶ added in v0.143.0
func ChooseSubscriptionPlan(user *models.User, props *CheckoutProps) templ.Component
ChooseSubscriptionPlan renders a full page for the user to choose their subscription plan, with any previously selected option highlighted. This is displayed after a user account has been created (in Auth0) and redirects the user to Stripe for payment.
func Comparison ¶ added in v0.95.0
func CreatePage ¶ added in v0.36.0
func CreatePage(template templ.Component, options ...PageOption) templ.Component
CreatePage creates a new page with the given body template and additional options.
func DeactivateAccountModal ¶
func DeactivateResult ¶ added in v0.143.0
func Document ¶
Document renders the given raw HTML data as full-page prose content. Used primarily for hosted markdown documents (i.e., privacy policy, terms of service, etc.)
func EditEmailSubscription ¶ added in v0.26.0
func EditEmailSubscription(request *models.EditEmailSubscriptionRequest) templ.Component
func EditFeedSubscription ¶ added in v0.82.4
func EditFeedSubscription(request *models.FeedSubscriptionRequest) templ.Component
EditFeedSubscription is a page for editing an existing feed subscription.
func EditGroupSubscription ¶
func EditGroupSubscription(request *models.GroupSubscriptionRequest) templ.Component
EditGroupSubscription is a page for editing a group subscription.
func EditSearchSubscription ¶
func EditSearchSubscription(request *models.SearchSubscriptionRequest) templ.Component
EditSearchSubscription is a page for editing a search subscription.
func ExportSubscriptions ¶
ExportSubscriptions renders a form for exporting all subscriptions as an OPML file.
func ExternalError ¶
func FeatureAddContent ¶ added in v0.101.0
func FeatureArticleFilters ¶ added in v0.101.0
func FeatureEmailNewsletters ¶ added in v0.101.0
func FeatureFavorites ¶ added in v0.101.0
func FeatureFetchRemoteContent ¶ added in v0.101.0
func FeatureGroupSubscriptions ¶ added in v0.101.0
func FeatureImport ¶ added in v0.101.0
func FeatureLayout ¶ added in v0.101.0
func FeatureSearchSubscription ¶ added in v0.101.0
func FeatureSubscriptionCustomisation ¶ added in v0.101.0
func FeatureThemes ¶ added in v0.101.0
func FeaturesPageCollect ¶ added in v0.155.0
func FeaturesPageConsume ¶ added in v0.155.0
func FeaturesPageCurate ¶ added in v0.155.0
func FooterExternal ¶ added in v0.146.0
func FragmentKeysFromCtx ¶ added in v0.150.0
func FragmentKeysToCtx ¶ added in v0.150.0
func HeaderExternal ¶ added in v0.101.0
func HeaderInternal ¶ added in v0.146.0
func HeaderInternal(props *InternalLayoutProps) templ.Component
func ImportSubscriptions ¶
ImportSubscriptions renders a form for the user to select or drag and drop an OPML file to import their subscriptions.
func ImportSubscriptionsResults ¶ added in v0.82.4
func ImportSubscriptionsResults(results []models.FeedSubscriptionResult) templ.Component
ImportSubscriptionsResults renders the results of importing the users subscriptions.
func InternalError ¶ added in v0.36.0
func LandingHeaderSlot ¶ added in v0.116.0
func LayoutExternal ¶ added in v0.146.0
func LayoutInternal ¶ added in v0.146.0
func LayoutInternal(props *InternalLayoutProps, content ...templ.Component) templ.Component
func ListArticles ¶
func ListArticles(response *models.ListArticlesResponse) templ.Component
ListArticles renders the list of articles in a grid layout with filtering controls and an actions menu.
func ListFavorites ¶ added in v0.39.0
func ListFavorites(response *models.ListFavoritesResponse) templ.Component
ListFavorites renders subscription and article favorites in a grid layout.
func ListSubscriptions ¶
func ListSubscriptions(response *models.ListSubscriptionsResponse) templ.Component
ListSubscriptions renders the list of subscriptions in a grid layout with filtering controls and an actions menu.
func NewFeaturePanel ¶ added in v0.101.0
func NewOpenGraphMetadata ¶ added in v0.70.0
NewMetadata creates a new opengraph Metadata object with properties set to values given by the options. Where a property is not set by an option, a default value will be used.
func NewUserHome ¶
NewUserHome is a home page displayed for new users, with some instructions and actions to help them set up the app.
func Notification ¶
func Notification(msg *models.UserMessage, options ...notificationOption) templ.Component
Notification renders a notification (or alert) in the UI. The notification will be coloured appropriately for the status/severity of the UserMessage.
func PaddleHead ¶ added in v0.143.0
func PathFromCtx ¶ added in v0.80.3
PathFromCtx retrieves the URL path from the context.
func Post ¶ added in v0.49.0
func Post(post *models.MarkdownFile) templ.Component
Post renders a post.
See also: https://developers.google.com/search/docs/appearance/structured-data/article#microdata
func PostsIndex ¶ added in v0.36.0
func PostsIndex(posts []*models.MarkdownFile) templ.Component
func PurchaseSubscriptionSuccess ¶ added in v0.143.0
func RemoveSubscriptionModal ¶
func RemoveSubscriptionModal(request *models.RemoveSubscriptionRequest, options ...element.PropertiesOption) templ.Component
RemoveObjectModal renders a modal that will action an unsubscribe request when the user has confirmed.
func ReportIssue ¶ added in v0.131.3
func ReportIssue(details *models.ReportIssueRequest) templ.Component
ReportIssue renders a form for reporting issues with the app.
func SearchResults ¶
func SearchResults(results *models.SearchResults) templ.Component
SearchResults renders the given articles returned from the given search in a grid layout with an actions menu.
func SearchSubscriptionFilterSuggestions ¶
func SearchSubscriptionFilterSuggestions(subscriptions models.Subscriptions) templ.Component
func SearchSuggestions ¶
func SearchSuggestions(suggestions *models.SearchResults) templ.Component
SearchSuggestions will render suggestions for a given search.
func ShareArticleModal ¶ added in v0.34.1
func ShareArticleModal(request *models.ShareArticleRequest) templ.Component
func ShowFeedSuggestions ¶ added in v0.110.0
func ShowFeedSuggestions(request *models.FeedSuggestionsResults) templ.Component
func ShowNoSuggestions ¶ added in v0.110.0
func ShowSubscriptionEmail ¶ added in v0.26.0
func SimilarArticles ¶
SimilarArticles renders a page of articles that are the result of a search for similar articles to a given input set.
func SubscriptionCard ¶
func SubscriptionCard(idx int, subscription *models.Subscription) templ.Component
SubscriptionCard renders a subscription in a card format, suitable for showing together with other subscriptions in a list/grid. The idx argument is used to indicate the position of this subscription card relative to others in a grid/list (and is used for CSS-based animations).
func SubscriptionSettings ¶ added in v0.150.0
func SubscriptionSettings(data *SubscriptionSettingsData) templ.Component
func Unsubscribe ¶ added in v0.87.0
func UnsubscribeResult ¶ added in v0.87.0
func UnsubscribeResult(msg *models.UserMessage) templ.Component
func UpdateTitle ¶ added in v0.36.0
func UpdatesToast ¶
func UpdatesToast(options ...element.PropertiesOption) templ.Component
UpdatesToast renders a toast notification to inform the user that updated content is available.
func UserAccountIssue ¶
func UserAvatar ¶
func UserSettings ¶ added in v0.39.0
func ViewerError ¶ added in v0.36.0
func ViewerError(msg *models.UserMessage) templ.Component
func VsFeedlyMeta ¶ added in v0.117.0
func VsInoreader ¶ added in v0.95.0
func VsInoreaderMeta ¶ added in v0.117.0
func WithNotificationTimeout ¶ added in v0.155.0
Types ¶
type ChangeEntry ¶ added in v0.153.0
type ChangeEntry struct {
Type ChangeType `toml:"type"`
Description string `toml:"description"`
}
ChangeEntry is a single change within a release
type ChangeType ¶ added in v0.153.0
type ChangeType string
ChangeType represents the type of change in a release
const ( ChangeTypeNew ChangeType = "new" ChangeTypeImproved ChangeType = "improved" ChangeTypeFixed ChangeType = "fixed" ChangeTypeRemoved ChangeType = "removed" ChangeTypeSecurity ChangeType = "security" )
type CheckoutProps ¶ added in v0.143.0
type HomeData ¶ added in v0.142.0
type HomeData struct {
LatestArticles models.Articles
RareCategories models.CategoryCounts
Subscriptions models.Subscriptions
TopCategories models.CategoryCounts
}
type InternalLayoutProps ¶ added in v0.146.0
type Page ¶
type Page struct {
// Component is the main body content of the page.
Component templ.Component
// Title is a string for the (browser) titlebar.
Title string
// Description adds a meta tag with the given text.
Description string
// OGMetadata contains the Opengraph metadata for the page.
OpenGraph *opengraph.OpenGraph
// CanonicalLink is the link that will be used with <link rel="canonical> on the page.
CanonicalLink string
}
Page contains data for rendering a full HTML page.
type PageOption ¶ added in v0.21.0
type PageOption func(*Page)
PageOption is a functional option applied to a page.
func WithCanonicalLink ¶ added in v0.72.0
func WithCanonicalLink(link string) PageOption
WithCanonicalLink sets the <link rel="canonical> link for the page.
func WithOpenGraphMetadata ¶ added in v0.70.0
func WithOpenGraphMetadata(metadata *opengraph.OpenGraph) PageOption
WithOpenGraphMetadata option sets the given metadata as appropriate Open Graph tags in the page header.
func WithPageDescription ¶ added in v0.21.0
func WithPageDescription(desc string) PageOption
WithPageDescription option sets a description meta tag in the page header.
func WithPageTitle ¶ added in v0.21.0
func WithPageTitle(title string) PageOption
WithPageTitle option sets the page title (displayed in the browser titlebar).
type Release ¶ added in v0.153.0
type Release struct {
Version string `toml:"version"`
Date string `toml:"date"`
Type VersionType `toml:"type"`
IsLatest bool `toml:"is_latest"`
Changes []ChangeEntry `toml:"changes"`
}
Release represents a single versioned release
type Subscription ¶ added in v0.27.0
type Subscription struct {
*models.Subscription
}
type SubscriptionSettingsData ¶ added in v0.150.0
type SubscriptionSettingsData struct {
User *models.User
Subscriptions models.Subscriptions
}
type VersionType ¶ added in v0.153.0
type VersionType string
VersionType represents semver release tier
const ( VersionMajor VersionType = "major" VersionMinor VersionType = "minor" VersionPatch VersionType = "patch" )
Source Files
¶
- about_templ.go
- article.go
- article_templ.go
- categories_templ.go
- changelog_templ.go
- checkout_templ.go
- compare_templ.go
- contact_templ.go
- containers_templ.go
- dock_templ.go
- document_templ.go
- error_templ.go
- export_templ.go
- favorites_templ.go
- features_templ.go
- footer_templ.go
- forget-me_templ.go
- header_templ.go
- home_templ.go
- import_templ.go
- issues_templ.go
- itemlist_templ.go
- landing_templ.go
- layouts_templ.go
- list_templ.go
- notifications_templ.go
- page_templ.go
- posts_templ.go
- pricing_templ.go
- search_templ.go
- settings_templ.go
- sidebar_templ.go
- subscription.go
- subscription_templ.go
- templates.go
- templates_templ.go
- toast_templ.go
- user_templ.go
- viewer_templ.go