<% articles.take(3).zip(%w[left right].cycle).each do |(page, side)| %> <%= render Pages::Summary.from_page(page, side: side) %> diff --git a/app/javascript/css/application.css b/app/javascript/css/application.css index 3c3f92a4..45fc4829 100644 --- a/app/javascript/css/application.css +++ b/app/javascript/css/application.css @@ -22,6 +22,7 @@ @import './components/anchors.scss'; @import './components/article-content.css'; +@import './components/bokeh.css'; @import './components/button.css'; @import './components/callout.css'; @import './components/clipboard-copy.css'; diff --git a/app/javascript/css/components/bokeh.css b/app/javascript/css/components/bokeh.css new file mode 100644 index 00000000..aa7b1078 --- /dev/null +++ b/app/javascript/css/components/bokeh.css @@ -0,0 +1,8 @@ +.bokeh__background { + background-image: url(~/images/content/index/bokeh-background.webp); + + background-attachment: fixed; + background-size: cover; + background-position: center -250px; + background-repeat: no-repeat; +} diff --git a/app/javascript/css/components/page-header.css b/app/javascript/css/components/page-header.css index 23502bc3..c36b1851 100644 --- a/app/javascript/css/components/page-header.css +++ b/app/javascript/css/components/page-header.css @@ -1,5 +1,4 @@ .page-header { - --gradient-from: rgb(86 55 251 / 85%); --gradient-from: var(--joy-text-theme); --gradient-to: rgb(255 0 0 / 85%); --gradient-stops: var(--gradient-from), var(--gradient-to); @@ -27,6 +26,24 @@ font-weight: 300; } } + + &.background-gradient { + background: radial-gradient( + ellipse at 1000% 50%, + rgba(0, 0, 0, 0) -10%, + var(--joy-background-header) + ); + } +} + +.dark { + .page-header { + --gradient-from: var(--joy-text); + + &.background-gradient { + backdrop-filter: contrast(0.7); + } + } } .extend-page-header-bg { diff --git a/app/javascript/css/utilities/tailwind-media.scss b/app/javascript/css/utilities/tailwind-media.scss index 6193d6ff..9c05cb2d 100644 --- a/app/javascript/css/utilities/tailwind-media.scss +++ b/app/javascript/css/utilities/tailwind-media.scss @@ -114,6 +114,14 @@ grid-column-start: 2; } + .lg\:grid-column-start-3 { + grid-column-start: 3; + } + + .lg\:grid-column-end-3 { + grid-column-end: 3; + } + .lg\:aspect-\[3\/2\] { aspect-ratio: 3 / 2; } @@ -137,4 +145,8 @@ .lg\:hidden { display: none; } + + .lg\:w-4\/5 { + width: 80%; + } } diff --git a/app/javascript/css/utilities/tailwind.css b/app/javascript/css/utilities/tailwind.css index 0979cede..2d6f4383 100644 --- a/app/javascript/css/utilities/tailwind.css +++ b/app/javascript/css/utilities/tailwind.css @@ -292,6 +292,10 @@ width: 32px; } +.w-1\/2 { + width: 50%; +} + .w-full { width: 100%; } diff --git a/app/javascript/images/content/index/bokeh-background.webp b/app/javascript/images/content/index/bokeh-background.webp new file mode 100644 index 00000000..de5ee9fa Binary files /dev/null and b/app/javascript/images/content/index/bokeh-background.webp differ diff --git a/app/javascript/images/content/index/pencil-transparent.webp b/app/javascript/images/content/index/pencil-transparent.webp new file mode 100644 index 00000000..e2fc41e0 Binary files /dev/null and b/app/javascript/images/content/index/pencil-transparent.webp differ diff --git a/app/views/components/pages/header.rb b/app/views/components/pages/header.rb index dc48b909..e2f057c8 100644 --- a/app/views/components/pages/header.rb +++ b/app/views/components/pages/header.rb @@ -20,8 +20,13 @@ def view_template(&) end class Container < ApplicationComponent + attr_reader :attributes + def initialize(**attributes) + @attributes = attributes + end + def view_template(&) - header(class: "page-header") do + header(**mix(attributes, class: "page-header")) do div(class: "container header-content", &) end end