Commit ddd749c7 authored by Matt Spencer's avatar Matt Spencer
Browse files

Merge branch 'perceptive_member' into 'main'

Add Perceptive new member announcement

See merge request !23
parents 5fc5c53b ea3f4c7d
Pipeline #212 passed with stages
in 20 seconds
......@@ -42,11 +42,16 @@ googleAnalytics = "GTM-WLHTXFF"
pre = "blog"
pageref = "/blog"
weight = 2
[[menu.main]]
name = "News"
pre = "news"
pageref = "/news"
weight = 3
[[menu.main]]
identifier = "community"
name = "Community"
weight = 3
weight = 4
[[menu.main]]
identifier = "gitlab"
parent = "community"
......
---
Title: Examples of theme shortcodes and partials
Draft: true
Member: governing_body/arm
Banner:
Title: This is the banner title
Description: The banner description. Should be limited to two lines
Background: banner/banner1.jpg
Card:
class: new_member
---
# Examples of theme shortcodes and partials
This page shows all of the shortcodes available in the SOAFEE website. Shortcodes can be included directly in your markdown, for more information check the [upstream documentation](https://gohugo.io/content-management/shortcodes/).
---
## Member Header
A member header can be used in a page that is sponsored or created by a specific partner. It adds the partner logo to the left and a markdown formatted content section to the right.
{{< member_header >}}
### Member header
A member header can have markdown formatted content, however currently can not include any shortcodes or partials.
{{< /member_header>}}
---
## Banner
The banner takes data from the page ```frontmatter``` by default. There is currently no method for overriding the parameters in the shortcode.
```bash
Banner:
Active: true/false - If true, the banner will show in the carousel
Title: This is the banner title
Description: Description text for the banner
Background: path to the image, relative to the 'headless_media' page
```
{{< banner >}}
---
## Carousel
The carousel picks up on all active banners, it currently doesn't take any parameters
{{< carousel >}}
---
## Image Grid
This shortcode will pull a list of images from a static data file and present in a grid format
{{< table >}}
| parameter | description |
|----------- |-------------|
| columns | The number of columns to split the grid into. The grid will create responsive images based on css breakpoints for efficient serving of pages |
| data | the source of the data from .Site.Data |
| media_page | where to source the images from, the default being 'headless_media' |
{{< /table >}}
{{< imagegrid columns="3" data="members.governing_body" media_page="headless_media" >}}
## Img
Create a responsive image based on the backbone CSS breakpoints
{{< table >}}
| parameter | description |
|----------- |-------------|
| media_page | The source page to get the image from, defaults to the current page |
| src | the path, relative to media_page, to get the image from |
| alt | the alt text to apply to the image for compliance with accessability needs |
{{< /table >}}
{{< img media_page="headless_media" src="images/arm.png" alt="Alt text">}}
---
## Question
This shortcode is for formatting a QnA style
{{< question "This is the text of the question, the answer is in the content and will be revealed below" >}}
This is where the answer goes. It can include __markdown__.
```bash
# With code examples
In any format
```
However, you can not currently include shortcodes in the markdown section
{{< /question >}}
---
## Table
This shortcode will add styling to the standard markdown table to make it 'pretty'. Simply place your markdown table as the content block for this shortcode.
{{< table >}}
| parameter | description |
|----------- |-------------|
| table_class | Override the css class applied to the &lt;table&gt; element |
| thead_class | Override the css class applied to the &lt;thead&gt; element |
{{< /table >}}
{{< table >}}
| Column 1 header | Column 2 header |
|-----------------|-----------------|
| Hello | World |
| Markdown is great |
| __SOAFEE__ | Is better |
{{< /table >}}
---
---
Title: "Perceptive joins SOAFEE SIG"
Description: "New member announcement click for more details on Perceptive"
Date: "2022-03-09"
Member: "voting/perceptive"
Banner:
Active: true
Title: Perceptive joins SOAFEE SIG
Description: Perceptive joins the SOAFEE SIG as a voting member.
Background: "banner/banner2.jpg"
Card:
Class: new-member
---
{{< member_header >}}
# Perceptive joins SOAFEE SIG
The SOAFEE community are excited to welcome Perceptive as a voting member of the SOAFEE SIG.
{{</ member_header >}}
## About Perceptive
Perceptive is building a full-stack sensing and perception platform for autonomous intelligence. Based on groundbreaking innovations on both hardware and software, Perceptive changes fundamentally the way sensing and perception software are developed and implemented in hardware.
Perceptive brings deep and unique expertise on sensing and perception for autonomy and robotics to SOAFEE. Our domain includes both the physical layer, all the sages of vehicle compute, as well as DSP and software algorithms. We strongly believe that the future of autonomy sensing is software-defined and centered on AI, and we're excited to foster that vision within the SOAFEE architecture.
---
Title: "SOAFEE News"
layout: "list"
---
governing_body:
- name: AWS
image: "images/aws.png"
url: https://aws.amazon.com/
alt: AWS
- name: Arm
image: "images/arm.png"
url: http://arm.com
alt: Arm
- name: Bosch
image: images/bosch.png
url: https://bosch.com
alt: Bosch
- name: CARIAD
image: images/cariad.png
url: https://cariad.technology/
alt: CARIAD
- name: Continental
image: images/continental.jpg
url: https://continental.com
alt: Continental
- name: RedHat
image: images/redhat.png
url: https://redhat.com
alt: RedHat
- name: SUSE
image: images/suse.png
url: https://suse.com
alt: SUSE
- name: Woven Planet
image: images/woven_planet.png
url: https://woven-planet.global
alt: Woven Planet
\ No newline at end of file
aws:
name: AWS
image: "images/aws.png"
url: https://aws.amazon.com/
alt: AWS
arm:
name: Arm
image: "images/arm.png"
url: http://arm.com
alt: Arm
bosch:
name: Bosch
image: images/bosch.png
url: https://bosch.com
alt: Bosch
cariad:
name: CARIAD
image: images/cariad.png
url: https://cariad.technology/
alt: CARIAD
continental:
name: Continental
image: images/continental.jpg
url: https://continental.com
alt: Continental
redhat:
name: RedHat
image: images/redhat.png
url: https://redhat.com
alt: RedHat
suse:
name: SUSE
image: images/suse.png
url: https://suse.com
alt: SUSE
woven_planet:
name: Woven Planet
image: images/woven_planet.png
url: https://woven-planet.global
alt: Woven Planet
voting:
perceptive:
name: Perceptive
image: images/perceptive.png
url: https://www.perceptivesensing.ai/
alt: Perceptive
......@@ -125,6 +125,51 @@ img {
z-index: 1;
}
// Styling for new member news card and article header
.blog-card.new-member .member-image {
width: 17%;
padding: 10px;
}
.new-member-header .flex-column {
width: 17%;
padding: 10px;
}
@include media-breakpoint-only(xs) {
.blog-card.new-member .member-image {
width: 50%;
}
.new-member-header .flex-column {
width: 50%;
}
}
@include media-breakpoint-only(sm) {
.blog-card.new-member .member-image {
width: 40%;
}
.new-member-header .flex-column {
width: 40%;
}
}
@include media-breakpoint-only(md) {
.blog-card.new-member .member-image {
width: 30%;
}
.new-member-header .flex-column {
width: 30%;
}
}
@include media-breakpoint-only(lg) {
.blog-card.new-member .member-image {
width: 20%;
}
.new-member-header .flex-column {
width: 20%;
}
}
// Button styling
.s-button {
......
{{ $self := .ctx | default . }}
{{ $ctx := .ctx | default . }}
{{ $params := .params | default . }}
<div class="card banner bg-light text-light">
{{ $ctx := (dict
"src" $self.Background
"alt" $self.Title
{{ $img_params := (dict
"src" $params.Background
"alt" $params.Title
"media_page" "headless_media"
"class" "card-img" )}}
{{ with (dict "Page" .Page "ctx" $ctx) }}
{{ with (dict "Page" $ctx.Page "params" $img_params) }}
{{ partial "img" . }}
{{ end }}
<div class="card-img-overlay d-flex flex-column">
<h3 class="card-title">{{ $self.Title }} </h3>
<h3 class="card-title">{{ $params.Title }} </h3>
<hr>
<p class="card-text text-center flex-grow-1">
{{ $self.Description }}
{{ $params.Description }}
</p>
<a href="{{ .Page.Permalink }}" class="btn btn-primary mt-auto">More Details</a>
<a href="{{ $ctx.Page.Permalink }}" class="btn btn-primary mt-auto">More Details</a>
</div>
</div>
<div class="card blog-card">
{{ $class := .Params.card.class | default "" }}
<div class="card blog-card {{ $class }}">
<a href="{{ .RelPermalink }}"></a>
<div class="card-body">
<div class="card-body d-flex flex-row">
{{ if isset .Params "member"}}
<div class="member-image">
<div class="d-flex flex-column justify-content-center h-100">
{{ partial "member_logo" (dict "ctx" . )}}
</div>
</div>
<div class="w-auto">
{{ else }}
<div class="w-100">
{{ end }}
<h5 class="card-title">{{ .Title }}
</h5>
<p class="card-text">{{ .Description }}</p>
</div>
</div>
<div class="card-footer">{{.Date.Format "Mon, Jan 2 2006"}}</div>
</div>
......@@ -3,17 +3,18 @@
<!-- TODO: Filter breakpoints if needed -->
{{ $ctx := .ctx | default . }}
{{ $params := .params | default . }}
{{ $alt := $ctx.alt | default "" }}
{{ $columns := $ctx.columns | default 1 }}
{{ $alt := $params.alt | default "" }}
{{ $columns := $params.columns | default 1 }}
<!-- Allow specifying a resource bundle to source the image from -->
{{ $mediaPage := $ctx.media_page | default .Page.File.Path }}
{{ $resourcesPage := .Page.Site.GetPage $mediaPage }}
{{ $image := $resourcesPage.Resources.GetMatch $ctx.src }}
{{ $mediaPage := $params.media_page | default $ctx.Page.File.Path }}
{{ $resourcesPage := $ctx.Page.Site.GetPage $mediaPage }}
{{ $image := $resourcesPage.Resources.GetMatch $params.src }}
{{ if strings.HasSuffix $ctx.src "svg" }}
{{ if strings.HasSuffix $params.src "svg" }}
<!-- TODO add width and height -->
<img src="{{ $image.RelPermalink }}"
alt={{ $alt }}
......
{{ $ctx := .ctx | default . }}
{{ if isset $ctx.Page.Params "member"}}
{{ $data := $ctx.Site.Data.members }}
{{ range (split $ctx.Page.Params.member "/") }}
{{ $data = (index $data .)}}
{{ end }}
{{ if and (isset $ "with_link") (isset $data "url") }}
<a href="{{$data.url}}">
{{ end }}
{{ partial "img" (dict "Page" $ctx.Page "src" $data.image "alt" $data.alt "media_page" "headless_media" "columns" 3)}}
{{ if and (isset $ "with_link") (isset $data "url") }}
</a>
{{ end }}
{{ end }}
\ No newline at end of file
{{ $bannerSourcePage := .Get "source" | default .Page.File.Path }}
{{ $page := .Page.Site.GetPage $bannerSourcePage }}
{{ with $page }}
{{ with (dict "Page" .Page "ctx" .Params.banner)}}
{{ partial "banner" . }}
{{ end }}
{{ with (dict "ctx" . "params" .Page.Params.banner)}}
{{ partial "banner" . }}
{{ end }}
......@@ -19,7 +19,7 @@
{{ range $index,$post := $posts }}
<div class="carousel-item {{ if eq $index 0 }}active{{ end }}">
<div class="card banner bg-light text-light">
{{ with (dict "Page" .Page "ctx" .Params.banner)}}
{{ with (dict "Page" .Page "Site" .Site "params" .Params.banner)}}
{{ partial "banner" . }}
{{ end }}
</div>
......
<!-- Shared implementation is in the shortcode -->
{{ partial "img" (dict "Page" .Page "ctx" .Params )}}
{{ partial "img" (dict "ctx" . "params" .Params )}}
{{ if isset .Page.Params "member"}}
<div class="new-member-header d-flex flex-row">
<div class="d-flex flex-column justify-content-center">
{{ partial "member_logo" (dict "ctx" . "with_link" 1) }}
</div>
<div class="w-100 text-center">
{{ .Inner | markdownify }}
</div>
</div>
{{ end }}
\ No newline at end of file
......@@ -2,13 +2,15 @@
{{ $table_class := .Get "table_class" | default "table table-striped table-hover" }}
{{ $thead_class := .Get "thead_class" | default "table-dark" }}
{{ $old_class := "<table>" }}
{{ $old_class := "<table>" }}
{{ $new_class := printf "<table class=\"%s\">" $table_class }}
{{ $htmlTable = replace $htmlTable $old_class $new_class }}
{{ $old_thead := "<thead>" }}
{{ $new_thead := printf "<thead class=\"%s\">" $thead_class }}
{{ $htmlTable = replace $htmlTable $old_thead $new_thead }}
<div class="table-responsive">
{{ $htmlTable | safeHTML }}
</div>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment