From ebb25d15a540f50b1c9a78347b5f05fbfa69d38b Mon Sep 17 00:00:00 2001 From: Dale Black Date: Mon, 18 Mar 2024 18:36:35 -0700 Subject: [PATCH] Update index.jl --- index.jl | 79 ++++++++++++++++++++++++++------------------------------ 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/index.jl b/index.jl index 759bb98..ab95fb0 100644 --- a/index.jl +++ b/index.jl @@ -1,5 +1,5 @@ ### A Pluto.jl notebook ### -# v0.19.26 +# v0.19.40 #> [frontmatter] #> title = "Home" @@ -14,7 +14,7 @@ begin Pkg.activate(joinpath(pwd(), "docs")) Pkg.instantiate() - using HTMLStrings: to_html, head, link, script, divv, h1, img, p, span, a, figure, hr + using HTMLStrings: to_html, head, link, script, divv, h1, img, p, span, a, figure, hr, select, option, label, h2, li, ul using PlutoUI end @@ -25,7 +25,7 @@ md""" # ╔═╡ 2bdcaa42-25e3-4012-acc0-f066d68e5dc6 md""" -## API +## References """ # ╔═╡ e81b2642-0442-42c3-a5ef-7ec312aa3181 @@ -47,8 +47,8 @@ function index_title_card(title::String, subtitle::String, image_url::String; da ), divv(:data_theme => "$data_theme", :class => "card card-bordered flex justify-center items-center border-$border_color text-center w-full dark:text-[#e6e6e6]", divv(:class => "card-body flex flex-col justify-center items-center", - img(:src => "$image_url", :class => "h-20 w-20 md:h-32 md:w-32 rounded-md", :alt => "$title Logo"), - divv(:class => "text-5xl font-bold bg-gradient-to-r from-accent to-primary inline-block text-transparent bg-clip-text py-10", "$title"), + img(:src => "$image_url", :class => "h-24 w-24 md:h-40 md:w-40 rounded-md", :alt => "$title Logo"), + divv(:class => "text-3xl md:text-5xl font-bold bg-gradient-to-r from-accent to-primary inline-block text-transparent bg-clip-text py-10", "$title"), p(:class => "card-text text-md font-serif", "$subtitle" ) ) @@ -65,36 +65,34 @@ index_title_card( data_theme = data_theme ) -# ╔═╡ 25a553ba-25fa-41df-903c-fdcd2226a81c -struct Article - title::String - path::String - image_url::String -end - # ╔═╡ 9f5dedbb-92ee-4099-ab47-24eb4954392c -article_list_tutorials = Article[ - Article("Getting Started", "docs/01_getting_started.jl", "https://img.freepik.com/free-photo/futuristic-spaceship-takes-off-into-purple-galaxy-fueled-by-innovation-generated-by-ai_24640-100023.jpg"), -]; - -# ╔═╡ 881d969b-aeef-451e-8c4f-f25ecbbc379c -article_list_api = Article[ - Article("API", "docs/99_api.jl", "https://img.freepik.com/free-photo/modern-technology-workshop-creativity-innovation-communication-development-generated-by-ai_188544-24548.jpg"), -]; - -# ╔═╡ 9a5d201c-546d-4624-95e0-7e0c6a72bf0b -function article_card(article::Article, color::String; data_theme = "pastel") - a(:href => article.path, :class => "w-1/2 p-2", - divv(:data_theme => "$data_theme", :class => "card card-bordered border-$color text-center dark:text-[#e6e6e6]", - divv(:class => "card-body justify-center items-center", - p(:class => "card-title", article.title), - p("Click to open the notebook") - ), - figure( - img(:src => article.image_url, :alt => article.title) +begin + struct Article + title::String + path::String + image_url::String + end + + article_list_tutorials = Article[ + Article("Getting Started", "docs/01_getting_started.jl", "https://img.freepik.com/free-photo/futuristic-spaceship-takes-off-into-purple-galaxy-fueled-by-innovation-generated-by-ai_24640-100023.jpg"), + ]; + article_list_api = Article[ + Article("API", "docs/99_api.jl", "https://img.freepik.com/free-photo/modern-technology-workshop-creativity-innovation-communication-development-generated-by-ai_188544-24548.jpg"), + ]; + + function article_card(article::Article, color::String; data_theme = "pastel") + a(:href => article.path, :class => "w-full md:w-1/2 p-2", + divv(:data_theme => "$data_theme", :class => "card card-bordered border-$color text-center dark:text-[#e6e6e6]", + divv(:class => "card-body justify-center items-center h-32 md:h-40", + p(:class => "text-lg md:text-2xl", article.title), + p(:class => "text-sm md:text-base", "Click to open the notebook") + ), + figure( + img(:class => "w-full h-40 md:h-48 object-cover", :src => article.image_url, :alt => article.title) + ) ) - ) - ) + ) + end end; # ╔═╡ 89394b04-55aa-4d68-a8e7-500a4e15a343 @@ -117,12 +115,9 @@ to_html( # ╟─89394b04-55aa-4d68-a8e7-500a4e15a343 # ╟─2bdcaa42-25e3-4012-acc0-f066d68e5dc6 # ╟─61a70dd2-eeae-40d9-97dc-206f1100c251 -# ╟─e81b2642-0442-42c3-a5ef-7ec312aa3181 -# ╟─90f47371-c6a1-499c-812e-42fd84217781 -# ╟─3cf724dd-8103-430e-a3eb-2b2f25db1324 -# ╟─476678f2-4af0-45fa-8993-2372607d11f2 -# ╟─e532258c-7652-455e-97b0-2ce4ce1eaeb5 -# ╟─25a553ba-25fa-41df-903c-fdcd2226a81c -# ╟─9f5dedbb-92ee-4099-ab47-24eb4954392c -# ╟─881d969b-aeef-451e-8c4f-f25ecbbc379c -# ╟─9a5d201c-546d-4624-95e0-7e0c6a72bf0b +# ╠═e81b2642-0442-42c3-a5ef-7ec312aa3181 +# ╠═90f47371-c6a1-499c-812e-42fd84217781 +# ╠═3cf724dd-8103-430e-a3eb-2b2f25db1324 +# ╠═476678f2-4af0-45fa-8993-2372607d11f2 +# ╠═e532258c-7652-455e-97b0-2ce4ce1eaeb5 +# ╠═9f5dedbb-92ee-4099-ab47-24eb4954392c