"If blog post page, use this BaseOf template"

Hi there,
I want to create two base of template that will allow me to create fullwidth base of and grid-container base of.
At the moment, my baseof template is as followed:

<div class="grid-container {{ if .Params.layout }} {{ .Params.layout }}{{ end }}{{ if .IsHome }} home{{ end }}">
{{- block "main" . }}{{- end }}

But this “grid-container” is only useful for the blog list page, not for single pages. And as I use it with {{- block "main" . }}{{- end }}, it applies for all content.
Is there a way to create two baseof template that enables me to use for two types of pages?
Maybe a use in the front-matter to define with layout or template I want this page to use?

Let me know,

See https://gohugo.io/templates/section-templates/#page-kinds


{{- if eq .Kind "page" -}}
  <div class="grid-container">
{{- else -}}
  <div class="something-else">
{{- end -}}


{{- $class := cond (eq .Kind "page") "grid-container" "something-else" -}}
<div class="{{ $class }}">