Просмотр исходного кода

widgets: Upgrade to Font Awesome 5

See #659
George Cushen 7 лет назад
Родитель
Сommit
7b639f107c

+ 1 - 1
exampleSite/content/home/hero_carousel.md

@@ -33,7 +33,7 @@ height = "300px"
   #   Deactivate by commenting out parameters, prefixing lines with `#`.
   cta_label = "Get Academic"
   cta_url = "https://sourcethemes.com/academic/"
-  cta_icon_pack = "fa"
+  cta_icon_pack = "fas"
   cta_icon = "graduation-cap"
 
 [[item]]

+ 24 - 12
exampleSite/content/home/skills.md

@@ -4,27 +4,39 @@ widget = "featurette"  # Do not modify this line!
 date = 2017-09-20T00:00:00
 
 # Activate this widget? true/false
-active = false
+active = true
 
-title = ""
+title = "Skills"
 subtitle = ""
 
 # Order that this section will appear in.
-weight = 20
+weight = 7
 
+# Showcase personal skills or business features.
+# 
 # Add/remove as many `[[feature]]` blocks below as you like.
-# See `config.toml` for more info on available icons.
+# 
+# Available icon packs and icons:
+# * fas - Font Awesome standard icons (see https://fontawesome.com/icons)
+# * fab - Font Awesome brand icons (see https://fontawesome.com/icons)
+# * ai - academic icons (see https://jpswalsh.github.io/academicons/)
 
 [[feature]]
-  icon = "files-o"
-  icon_pack = "fa"
-  name = "Data Driven"
-  description = "..."
+  icon = "r-project"
+  icon_pack = "fab"
+  name = "R"
+  description = "90%"
   
 [[feature]]
-  icon = "pencil"
-  icon_pack = "fa"
-  name = "Math"
-  description = "..."
+  icon = "chart-line"
+  icon_pack = "fas"
+  name = "Statistics"
+  description = "100%"  
+  
+[[feature]]
+  icon = "camera-retro"
+  icon_pack = "fas"
+  name = "Photography"
+  description = "10%"
 
 +++

+ 1 - 1
layouts/partials/widgets/about.html

@@ -40,7 +40,7 @@
 
       <ul class="network-icon" aria-hidden="true">
         {{ range $.Site.Params.social }}
-        {{ $pack := or .icon_pack "fa" }}
+        {{ $pack := or .icon_pack "fas" }}
         {{ $pack_prefix := $pack }}
         {{ if in (slice "fab" "fas" "far" "fal") $pack }}
           {{ $pack_prefix = "fa" }}

+ 6 - 2
layouts/partials/widgets/featurette.html

@@ -16,9 +16,13 @@
   {{ end }}
 
   {{ range $page.Params.feature }}
-  {{ $pack := or .icon_pack "fa" }}
+  {{ $pack := or .icon_pack "fas" }}
+  {{ $pack_prefix := $pack }}
+  {{ if in (slice "fab" "fas" "far" "fal") $pack }}
+    {{ $pack_prefix = "fa" }}
+  {{ end }}
   <div class="col-sm-4">
-    {{ with .icon }}<div class="featurette-icon"><i class="{{ $pack }} {{ $pack }}-{{ . }}"></i></div>{{ end }}
+    {{ with .icon }}<div class="featurette-icon"><i class="{{ $pack }} {{ $pack_prefix }}-{{ . }}"></i></div>{{ end }}
     <h3>{{ .name | markdownify | emojify }}</h3>
     {{ with .description }}<p>{{ . | markdownify | emojify }}</p>{{ end }}
   </div>