Skip to content
63 changes: 63 additions & 0 deletions assets/css/gambit.css
Original file line number Diff line number Diff line change
Expand Up @@ -1110,3 +1110,66 @@ td {
margin: 0;
font-size: 0.9rem;
}

/* Visuals Gallery */
.visuals-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 1rem;
margin: 2rem auto;
max-width: 80%;
}

.visuals-item {
display: flex;
flex-direction: column;
border-radius: 4px;
overflow: hidden;
border: 1.5px solid var(--color-border-light);
background: var(--color-white);
position: relative;
transition: border-color 0.2s, box-shadow 0.2s;
text-decoration: none;
}

.visuals-item:hover {
border-color: var(--color-primary);
box-shadow: 0 2px 8px var(--shadow-hover);
}

.visuals-item img {
width: 100%;
aspect-ratio: 4 / 3;
object-fit: contain;
background: #f8f8f8;
display: block;
}

.visuals-caption {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 0.5rem 0.6rem;
font-size: 0.8rem;
color: #fff;
text-align: center;
background: rgba(26, 158, 126, 0.88);
opacity: 0;
transition: opacity 0.2s;
}

.visuals-item:hover .visuals-caption {
opacity: 1;
}

@media (max-width: 768px) {
.visuals-grid {
grid-template-columns: repeat(2, 1fr);
max-width: 100%;
}
.visuals-caption {
opacity: 1;
font-size: 0.75rem;
}
}
15 changes: 15 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ params:
description:
- "Gambit is a set of software tools for doing computation on finite, noncooperative games in extensive or strategy form and a set of file formats for storing and communicating games to external tools."
- "The Gambit Project was founded in the mid-1980s at the California Institute of Technology and to this day is actively developed by a community of contributors, with core development led by [The Alan Turing Institute](https://www.turing.ac.uk) as part of its project: [Automated analysis of strategic interactions](https://www.turing.ac.uk/research/research-projects/automated-analysis-strategic-interactions)."
visuals:
title: "Visualisations"
slides:
- image: visuals/kuhn-4-card.svg
caption: "Extensive form representation of a 4-card Kuhn poker game, illustrating information sets and strategy nodes."
link: ""
- image: visuals/test_image.jpg
caption: "Placeholder image."
link: ""
- image: visuals/test_image.jpg
caption: "Placeholder image 2."
link: ""
- image: visuals/test_image.jpg
caption: "Placeholder image 3."
link: ""
software_title: "Open source & free to use"
software:
- name: PyGambit
Expand Down
26 changes: 26 additions & 0 deletions layouts/partials/hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,32 @@
</div>
</div>

<!-- Visuals Section -->
{{- $visuals := index $hero "visuals" }}
{{ if $visuals }}
<!--- {{ with $visuals.title }}
<div class="hero-title">{{ . }}</div>
{{ end }} -->
<div class="visuals-grid">
{{- range $visuals.slides }}
{{ if .link }}
<a href="{{ .link }}" class="visuals-item" target="_blank" rel="noopener">
{{ else }}
<div class="visuals-item">
{{ end }}
<img src="{{ printf "/images/%s" .image | relURL }}" alt="{{ .caption }}">
{{ with .caption }}
<div class="visuals-caption">{{ . }}</div>
{{ end }}
{{ if .link }}
</a>
{{ else }}
</div>
{{ end }}
{{- end }}
</div>
{{ end }}

<!-- Software section -->
{{- $softwareTitle := index $hero "software_title" }}
{{ if $softwareTitle }}
Expand Down
Loading