ananke/layouts/partials/func/socials/GetServiceData.html
Regis Philibert c7b9901e01
Refactor social service logic and UX (#425)
* Start of work

* Refactor social service logic

Update README

Fixes #422

* Add URL to contributors instuctions

* Add tiktok
2021-12-02 15:22:18 -05:00

27 lines
705 B
HTML

{{/*
socials/GetServiceDefaults
Returns the defaults of any given service as stored in GetBuildInServicesDefaults
@author @regisphilibert
@context String (.)
@access private
@returns Map
- String (.label)
String (.color)
@uses
- func/socials/GetBuiltInServicesDefaults
*/}}
{{ $service_data := dict }}
{{ with partialCached "func/socials/GetBuiltInServicesDefaults" "socials/GetBuiltInServicesDefaults" }}
{{/* If the passed context string (held in $) is found as a key of the map returned by the above returning partial
We store it in the returning variable */}}
{{ with index . $ }}
{{ $service_data = . }}
{{ end }}
{{ end }}
{{ return $service_data }}