Procházet zdrojové kódy

refactor: rename selected to featured

BREAKING CHANGES
See issue below and v4 release note for details

See #867
George Cushen před 6 roky
rodič
revize
70b87306be

+ 2 - 2
archetypes/publication/index.md

@@ -25,8 +25,8 @@ publication_short = ""
 abstract = ""
 abstract_short = ""
 
-# Is this a selected publication? (true/false)
-selected = false
+# Is this a featured publication? (true/false)
+featured = false
 
 # Projects (optional).
 #   Associate this publication with one or more of your projects.

+ 2 - 2
archetypes/talk/index.md

@@ -22,8 +22,8 @@ event_url = ""
 # Location of event.
 location = ""
 
-# Is this a selected talk? (true/false)
-selected = false
+# Is this a featured talk? (true/false)
+featured = false
 
 # Projects (optional).
 #   Associate this talk with one or more of your projects.

+ 5 - 6
exampleSite/config.toml

@@ -141,11 +141,10 @@ enableGitInfo = false
   # Contact Widget setup
     email = "test@example.org"
     address = "Building 1 Room 1, Stanford University, California, 90210, USA"
-    office_hours = """
-    Monday 10:00 to 13:00<br>
-    Wednesday 09:00 to 10:00<br>
-    Otherwise email to book an appointment
-    """
+    # Office hours: use `<br>` to insert a line break, or set to "" to remove office hours
+    office_hours = """Monday 10:00 to 13:00<br>
+                      Wednesday 09:00 to 10:00<br>
+                      Otherwise email to book an appointment"""
     phone = "888 888 88 88"
     skype = "echo123"
     telegram = ""
@@ -247,7 +246,7 @@ enableGitInfo = false
 
 [[menu.main]]
   name = "Publications"
-  url = "#publications_selected"
+  url = "#publications_featured"
   weight = 2
 
 [[menu.main]]

+ 2 - 2
exampleSite/content/home/publications.md

@@ -33,7 +33,7 @@ list_format = 4
 #  6: Book chapter
 publication_type = "-1"
 
-# Exclude publications that are shown in the Selected Publications widget?
-exclude_selected = false
+# Exclude publications that are shown in the Featured Publications widget?
+exclude_featured = false
 +++
 

+ 4 - 4
exampleSite/content/home/publications_selected.md → exampleSite/content/home/publications_featured.md

@@ -1,12 +1,12 @@
 +++
-# Selected Publications widget.
+# Featured Publications widget.
 # This widget displays publications from `content/publication/` which have
-# `selected = true` in their `+++` front matter.
-widget = "publications_selected"
+# `featured = true` in their `+++` front matter.
+widget = "publications_featured"
 active = true
 date = 2016-04-20T00:00:00
 
-title = "Selected Publications"
+title = "Featured Publications"
 subtitle = ""
 
 # Order that this section will appear in.

+ 2 - 2
exampleSite/content/home/talks.md

@@ -19,7 +19,7 @@ count = 10
 #   2 = Stream
 list_format = 2
 
-# Exclude talks that are shown in the Selected Talks widget?
-exclude_selected = false
+# Exclude talks that are shown in the Featured Talks widget?
+exclude_featured = false
 +++
 

+ 3 - 3
exampleSite/content/home/talks_selected.md → exampleSite/content/home/talks_featured.md

@@ -1,10 +1,10 @@
 +++
-# Selected Talks widget.
-widget = "talks_selected"
+# Featured Talks widget.
+widget = "talks_featured"
 active = false
 date = 2016-04-20T00:00:00
 
-title = "Selected Talks"
+title = "Featured Talks"
 subtitle = ""
 
 # Order that this section will appear in.

+ 2 - 2
exampleSite/content/publication/clothing-search/index.md

@@ -25,8 +25,8 @@ publication_short = "In *ICMEW*"
 abstract = "We present a mobile visual clothing search system whereby a smart phone user can either choose a social networking photo or take a new photo of a person wearing clothing of interest and search for similar clothing in a retail database. From the query image, the person is detected, clothing is segmented, and clothing features are extracted and quantized. The information is sent from the phone client to a server, where the feature vector of the query image is used to retrieve similar clothing products from online databases. The phone's GPS location is used to re-rank results by retail store location. State of the art work focuses primarily on the recognition of a diverse range of clothing offline and pays little attention to practical applications. Evaluated on a challenging dataset, the system is relatively fast and achieves promising results."
 abstract_short = "A mobile visual clothing search system is presented whereby a smart phone user can either choose a social networking image or capture a new photo of a person wearing clothing of interest and search for similar clothing in a large cloud-based ecommerce database. The phone's GPS location is used to re-rank results by retail store location, to inform the user of local stores where similar clothing items can be tried on."
 
-# Is this a selected publication? (true/false)
-selected = true
+# Is this a featured publication? (true/false)
+featured = true
 
 # Projects (optional).
 #   Associate this publication with one or more of your projects.

+ 2 - 2
exampleSite/content/publication/person-re-id/index.md

@@ -25,8 +25,8 @@ publication_short = "In *SITIS*"
 abstract = "Person re-identification is a critical security task for recognizing a person across spatially disjoint sensors. Previous work can be computationally intensive and is mainly based on low-level cues extracted from RGB data and implemented on a PC for a fixed sensor network (such as traditional CCTV). We present a practical and efficient framework for mobile devices (such as smart phones and robots) where high-level semantic soft biometrics are extracted from RGB and depth data. By combining these cues, our approach attempts to provide robustness to noise, illumination, and minor variations in clothing. This mobile approach may be particularly useful for the identification of persons in areas ill-served by fixed sensors or for tasks where the sensor position and direction need to dynamically adapt to a target. Results on the BIWI dataset are preliminary but encouraging. Further evaluation and demonstration of the system will be available on our website."
 abstract_short = ""
 
-# Is this a selected publication? (true/false)
-selected = false
+# Is this a featured publication? (true/false)
+featured = false
 
 # Projects (optional).
 #   Associate this publication with one or more of your projects.

+ 2 - 2
exampleSite/content/talk/example/index.md

@@ -22,8 +22,8 @@ event_url = "https://example.org"
 # Location of event.
 location = "London, United Kingdom"
 
-# Is this a selected talk? (true/false)
-selected = false
+# Is this a featured talk? (true/false)
+featured = false
 
 # Projects (optional).
 #   Associate this talk with one or more of your projects.

+ 2 - 2
layouts/partials/widgets/publications.html

@@ -25,8 +25,8 @@
       {{ $.Scratch.Set "recent_pubs" (where $.Site.RegularPages "Type" "publication") }}
     {{ end }}
 
-    {{ if $page.Params.exclude_selected }}
-      {{ $.Scratch.Set "recent_pubs" ( ($.Scratch.Get "recent_pubs") | intersect (where (where $.Site.RegularPages "Type" "publication") ".Params.selected" "!=" true) ) }}
+    {{ if $page.Params.exclude_featured }}
+      {{ $.Scratch.Set "recent_pubs" ( ($.Scratch.Get "recent_pubs") | intersect (where (where $.Site.RegularPages "Type" "publication") ".Params.featured" "!=" true) ) }}
     {{ end }}
 
     {{ $recent_pubs := $.Scratch.Get "recent_pubs" }}

+ 3 - 3
layouts/partials/widgets/publications_selected.html → layouts/partials/widgets/publications_featured.html

@@ -1,7 +1,7 @@
 {{ $ := .root }}
 {{ $page := .page }}
 
-<!-- Selected Publications widget -->
+<!-- Featured Publications widget -->
 <div class="row">
   <div class="col-12 col-lg-4 section-heading">
     <h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
@@ -11,9 +11,9 @@
     {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
 
     {{ if and ($page.Params.publication_type) (ne $page.Params.publication_type "-1") }}
-      {{ $.Scratch.Set "sel_pubs" (where (where (where $.Site.RegularPages "Type" "publication") ".Params.selected" true) ".Params.publication_types" "intersect" (slice $page.Params.publication_type)) }}
+      {{ $.Scratch.Set "sel_pubs" (where (where (where $.Site.RegularPages "Type" "publication") ".Params.featured" true) ".Params.publication_types" "intersect" (slice $page.Params.publication_type)) }}
     {{ else }}
-      {{ $.Scratch.Set "sel_pubs" (where (where $.Site.RegularPages "Type" "publication") ".Params.selected" true) }}
+      {{ $.Scratch.Set "sel_pubs" (where (where $.Site.RegularPages "Type" "publication") ".Params.featured" true) }}
     {{ end }}
 
     {{ $sel_pubs := $.Scratch.Get "sel_pubs" }}

+ 3 - 3
layouts/partials/widgets/talks.html

@@ -21,9 +21,9 @@
 
     {{ $.Scratch.Set "talks" (where $.Site.RegularPages "Type" "talk") }}
 
-    {{/* Exclude talks shown in Selected Talks widget? */}}
-    {{ if $page.Params.exclude_selected }}
-    {{ $.Scratch.Set "talks" (where ($.Scratch.Get "talks") ".Params.selected" "!=" true) }}
+    {{/* Exclude talks shown in Featured Talks widget? */}}
+    {{ if $page.Params.exclude_featured }}
+    {{ $.Scratch.Set "talks" (where ($.Scratch.Get "talks") ".Params.featured" "!=" true) }}
     {{ end }}
 
     {{ range first $page.Params.count (sort ($.Scratch.Get "talks") ".Params.time_start" "desc") }}

+ 2 - 2
layouts/partials/widgets/talks_selected.html → layouts/partials/widgets/talks_featured.html

@@ -1,7 +1,7 @@
 {{ $ := .root }}
 {{ $page := .page }}
 
-<!-- Selected Talks widget -->
+<!-- Featured Talks widget -->
 <div class="row">
   <div class="col-12 col-lg-4 section-heading">
     <h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
@@ -10,7 +10,7 @@
   <div class="col-12 col-lg-8">
     {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
 
-    {{ range (sort (where (where $.Site.RegularPages "Type" "talk") ".Params.selected" true) ".Params.time_start" "desc") }}
+    {{ range (sort (where (where $.Site.RegularPages "Type" "talk") ".Params.featured" true) ".Params.time_start" "desc") }}
       {{ if eq $page.Params.list_format 1 }}
         {{ partial "talk_li_detailed" . }}
       {{ else if eq $page.Params.list_format 2 }}