Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Theme
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Theme
Commits
baf175ff
Commit
baf175ff
authored
1 year ago
by
claraRigo
Browse files
Options
Downloads
Patches
Plain Diff
premier commit pour feedback :)
parent
d8a09501
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
assets/sass/_theme/blocks/programs.sass
+37
-1
37 additions, 1 deletion
assets/sass/_theme/blocks/programs.sass
layouts/partials/blocks/templates/programs.html
+33
-10
33 additions, 10 deletions
layouts/partials/blocks/templates/programs.html
with
70 additions
and
11 deletions
assets/sass/_theme/blocks/programs.sass
+
37
−
1
View file @
baf175ff
...
...
@@ -12,8 +12,44 @@
&
:hover
color
:
$color-accent
.programs-grid
@include
grid
(
2
,
xl
)
article
display
:
flex
flex-direction
:
column
justify-content
:
space-between
height
:
100%
.title
@include
h3
div
a
@include
meta
@include
btn
text-decoration-color
:
rgba
(
$block-call-to-action-color
,
.3
)
display
:
inline-block
background
:
$block-call-to-action-button-background
color
:
$block-call-to-action-button-color
transition
:
background
.3s
ease
,
color
.3s
ease
&
:hover
,
&
:focus-visible
,
&
:focus
background
:
$block-call-to-action-button-hover-background
color
:
$block-call-to-action-button-hover-color
@include
in-page-without-sidebar
.programs
li
a
@include
h2
\ No newline at end of file
@include
h2
@include
media-breakpoint-up
(
desktop
)
.programs-grid
@include
grid
(
2
,
desktop
)
@include
grid
(
3
,
xl
)
p
margin-top
:
$spacing3
@include
media-breakpoint-up
(
desktop
)
.programs-grid
article
>
div
a
margin-top
:
$spacing1
This diff is collapsed.
Click to expand it.
layouts/partials/blocks/templates/programs.html
+
33
−
10
View file @
baf175ff
{{- $layout := "grid" -}}
{{- $layout := "whatever" -}}
{{- $block := .block -}}
{{- $block_class := partial "GetBlockClass" .block -}}
...
...
@@ -9,18 +12,38 @@
"title" $block.title
"heading_level" $block.ranks.self
)}}
<
ol
class=
"programs"
>
{{- if eq $layout "grid" -}}
<
div
class=
"programs
-grid
"
>
{{- range .programs -}}
<li>
{{ $program := site.GetPage (printf "/programs%s" .path) }}
{{- $title := partial "PrepareHTML" $program.Title -}}
<a
href=
"{{ $program.Permalink }}"
title=
"{{ safeHTML (i18n "
commons.more_aria
"
(
dict
"
Title
"
$
title
))
}}"
>
{{- $title -}}
</a>
</li>
{{ $program := site.GetPage (printf "/programs%s" .path) }}
{{- $title := partial "PrepareHTML" $program.Title -}}
{{- $summary := partial "PrepareHTML" $program.Params.summary -}}
<article>
<p
class=
"title"
>
{{- $title -}}
</p>
<div
>
<p>
{{$summary}}
</p>
<a
href=
"{{ $program.Permalink }}"
title=
"{{ safeHTML (i18n "
commons.more_aria
"
(
dict
"
Title
"
$
title
))
}}"
>
{{ safeHTML (i18n "commons.more") }}
</a>
</div>
</article>
{{ end }}
</ol>
</div>
{{- else -}}
<ol
class=
"programs"
>
{{- range .programs -}}
<li>
{{ $program := site.GetPage (printf "/programs%s" .path) }}
{{- $title := partial "PrepareHTML" $program.Title -}}
<a
href=
"{{ $program.Permalink }}"
title=
"{{ safeHTML (i18n "
commons.more_aria
"
(
dict
"
Title
"
$
title
))
}}"
>
{{- $title -}}
</a>
</li>
{{ end }}
</ol>
{{- end -}}
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment