From a643e5514680e1a5dbcde071eeb3126d05154c44 Mon Sep 17 00:00:00 2001 From: Andrew Jakubowicz Date: Wed, 9 Aug 2023 16:30:49 -0700 Subject: [PATCH] second design --- .../site/css/learn-catalog.css | 28 +++++++++++++++---- .../lit-dev-content/site/learn/index.html | 19 +++++++++---- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/packages/lit-dev-content/site/css/learn-catalog.css b/packages/lit-dev-content/site/css/learn-catalog.css index e98718be7..d41604f9b 100644 --- a/packages/lit-dev-content/site/css/learn-catalog.css +++ b/packages/lit-dev-content/site/css/learn-catalog.css @@ -61,18 +61,21 @@ main { display: inline-block; padding: 10px; - border-radius: 0px; - transition: border-radius 50ms; - /* Undo anchor tag typography */ font-family: Manrope; color: black; text-decoration: none; font-weight: 400; - border: 1px solid #d1d1d1; - box-shadow: rgb(0 0 0 / 10%) 0 0 5px 0; + max-height: 400px; + overflow: hidden; +} + +.card:hover .card-header { + border-radius: 10px; + overflow: hidden; } + .card img { width: 100%; height: auto; @@ -88,12 +91,27 @@ main { color: #646464; } +.card-header { + aspect-ratio: 16 / 9; + width: auto; + display: flex; + align-items: flex-end; + + background-color: rgba(50, 79, 255, 1); +} + +.card-header h1 { + margin: 10px; + color: white; +} + .learn-kind-row { display: flex; color: #9e9e9e; font-weight: 400; font-size: 16px; text-transform: uppercase; + margin-top: 16px; } .learn-kind-row span:first-child { diff --git a/packages/lit-dev-content/site/learn/index.html b/packages/lit-dev-content/site/learn/index.html index de97c16b6..810ec6394 100644 --- a/packages/lit-dev-content/site/learn/index.html +++ b/packages/lit-dev-content/site/learn/index.html @@ -22,6 +22,17 @@

Learn

{% for content in learn %} +
+ {% if content.kind == "video" %} + Video thumbnail for '{{content.title}}' + {% else %} +

{{content.title}}

+ {% endif %} +
{{content.kind}} {% if content.kind == "tutorial" %} @@ -29,12 +40,8 @@

Learn

{{content.duration}} Min {% endif %}
-

{{content.title}}

- {% if content.kind == "video" %} - - {% else %} -

{{content.summary|markdownWithoutHtml|safe}}

- {% endif %} + +

{{content.summary|markdown}}

{% endfor %}