use maud::{Markup, Render, html};

/// Shorthand for an `<a>` link that opens a new tab
/// Values are (url, text)
pub struct FarLink<'a, T: Render>(pub &'a str, pub T);

impl<T: Render> Render for FarLink<'_, T> {
	fn render(&self) -> Markup {
		html!(
			a
			target="_blank"
			rel="noopener noreferrer"
			href=(self.0)
			{ (self.1) }
		)
	}
}
