mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Regis Philibert
02.22.2021 c7b9901e01ec3720b47fcef3d33bdbd6ce53f000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{{/*
  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 }}