subroutineicon_linkprivate
subroutine icon_link(url, icon, label, b)
Write an icon linking to url, if it is set.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| url | character(len=:) | in | allocatable | the address |
| icon | character(len=*) | in | the icon | |
| label | character(len=*) | in | what it links to | |
| b | type(buffer_t) | inout | the HTML |
Calls
Source
Show the code
subroutine icon_link(url, icon, label, b)
character(len=:), allocatable, intent(in) :: url !! the address
character(len=*), intent(in) :: icon !! the icon
character(len=*), intent(in) :: label !! what it links to
type(buffer_t), intent(inout) :: b !! the HTML
if (.not. allocated(url)) return
call add(b, '<a class="icon-link icon-'//icon//'" title="'//label//'" aria-label="'//label//'" href="')
call html_escape(url, b, .true.)
call add(b, '"></a>')
end subroutine icon_link