Skip to content

Commit e87b842

Browse files
committed
Make better at smaller breakpoints
1 parent acc34e0 commit e87b842

File tree

2 files changed

+27
-21
lines changed

2 files changed

+27
-21
lines changed

apps/components_guide_web/lib/components_guide_web/templates/landing/index.html.eex

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
11
<%= if true do %>
22
<div class="text-white" style="background: linear-gradient(-32deg, #840000 0%, #E0003C 30%, #FF493F 50%, #FF584A 50%, #FF6F86 90%, #FF584A 120%);">
33
<section class="container px-6 pt-12 pb-8">
4-
<h1 class="mx-auto max-w-4xl text-5xl text-center leading-snug font-bold text-shadow">
4+
<h1 class="mx-auto max-w-4xl px-2 text-3xl sm:text-4xl md:text-5xl text-center leading-snug font-bold text-shadow">
55
<%#= "Great apps need great components. Learn how to make them in SwiftUI and React." %>
66
<%= "Great apps need great components. Learn by making in SwiftUI or React." %>
77
</h1>
8-
<p class="mt-6 mb-8 mx-auto max-w-3xl text-4xl text-center leading-snug italic text-red-100 text-shadow">
8+
<p class="mt-6 mb-8 mx-auto max-w-3xl text-2xl sm:text-3xl md:text-4xl text-center leading-snug italic text-red-100 text-shadow">
99
<%= "Learn the techniques that work best across a range of component systems." %>
1010
</p>
11-
<p class="mx-auto py-2 max-w-4xl text-xl text-center">
11+
<p class="mx-auto py-2 max-w-4xl text-base md:text-xl text-center">
1212
Topics include:
1313
<%= for {text, index} <- Enum.with_index(["SwiftUI", "React", "Combine", "RxJS", "Figma", "Sketch", "Performance", "Clarity", "Documentation", "Responsive", "Design Teams"]) do %>
14-
<a href="#" class="inline-block mx-1 mb-3 px-4 py-2 font-bold bg-white <%= if index <= 5, do: "text-blue-500 hover:bg-blue-600", else: "text-indigo-500 hover:bg-indigo-600" %> hover:text-white rounded shadow-xl"><%= text %></a>
14+
<a href="#" class="inline-block md:mx-1 mb-2 md:mb-3 px-3 md:px-4 py-1 md:py-2 font-bold bg-white <%= if index <= 5, do: "text-blue-500 hover:bg-blue-600", else: "text-indigo-500 hover:bg-indigo-600" %> hover:text-white rounded shadow-xl"><%= text %></a>
1515
<% end %>
1616
</p>
17-
<div class="max-w-3xl mx-auto mt-8 flex flex-row justify-around">
18-
<figure class="flex flex-col items-center">
19-
<img src="https://collected.systems/1/github/leungwensen/svg-icon/b84b3f3a3da329b7c1d02346865f8e98beb05413/dist/svg/material/play-circle-outline.svg?defaultFill=white" width=92 height=92>
20-
<figcaption class="text-xl font-bold">Watch video lessons</figcaption>
17+
<div class="max-w-3xl mx-auto mt-8 flex flex-col sm:flex-row justify-around">
18+
<figure class="pb-4 flex flex-col items-center">
19+
<div style="height: 92px;">
20+
<img src="https://collected.systems/1/github/leungwensen/svg-icon/b84b3f3a3da329b7c1d02346865f8e98beb05413/dist/svg/material/play-circle-outline.svg?defaultFill=white" width=92 height=92>
21+
</div>
22+
<figcaption class="text-lg md:text-xl font-bold">Watch video lessons</figcaption>
2123
</figure>
22-
<figure class="flex flex-col items-center">
23-
<img src="https://collected.systems/1/github/leungwensen/svg-icon/b84b3f3a3da329b7c1d02346865f8e98beb05413/dist/svg/dev/swift.svg?defaultFill=white" width=92 height=92>
24-
<figcaption class="text-xl font-bold">Learn SwiftUI & Combine</figcaption>
24+
<figure class="pb-4 flex flex-col items-center">
25+
<div style="height: 92px;">
26+
<img src="https://collected.systems/1/github/leungwensen/svg-icon/b84b3f3a3da329b7c1d02346865f8e98beb05413/dist/svg/dev/swift.svg?defaultFill=white" width=92 height=92>
27+
</div>
28+
<figcaption class="text-lg md:text-xl font-bold">Learn SwiftUI & Combine</figcaption>
2529
</figure>
26-
<figure class="flex flex-col items-center">
27-
<img src="https://collected.systems/1/github/leungwensen/svg-icon/b84b3f3a3da329b7c1d02346865f8e98beb05413/dist/svg/dev/react.svg?defaultFill=white" width=92 height=92>
28-
<figcaption class="text-xl font-bold">Learn React</figcaption>
30+
<figure class="pb-4 flex flex-col items-center">
31+
<div style="height: 92px;">
32+
<img src="https://collected.systems/1/github/leungwensen/svg-icon/b84b3f3a3da329b7c1d02346865f8e98beb05413/dist/svg/dev/react.svg?defaultFill=white" width=92 height=92>
33+
</div>
34+
<figcaption class="text-lg md:text-xl font-bold">Learn React</figcaption>
2935
</figure>
3036
</div>
3137
</section>
@@ -53,7 +59,7 @@
5359

5460
<div class="text-white bg-gray-800">
5561
<section class="pt-20">
56-
<header class="mb-8 mx-auto max-w-4xl text-center">
62+
<header class="mb-8 mx-auto max-w-4xl px-4 text-center">
5763
<h2 class="text-4xl font-bold leading-snug">
5864
Make modern iOS and macOS apps using reusable components, async data flow.
5965
</h2>
@@ -73,7 +79,7 @@
7379
</section>
7480

7581
<section class="pt-20 pb-16">
76-
<header class="mb-8 mx-auto max-w-4xl text-center">
82+
<header class="mb-8 mx-auto max-w-4xl px-4 text-center">
7783
<h2 class="text-4xl font-bold">Learn to make modern web apps using components, hooks, async data flow.</h2>
7884
</header>
7985
<div class="w-full max-w-md mx-auto rounded overflow-hidden shadow-lg">

apps/components_guide_web/lib/components_guide_web/templates/layout/_header.html.eex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<header class="bg-gray-900 text-white">
22
<section class="container flex flex-row items-center">
3-
<a href="/" class="block py-4 text-base font-bold text-red-100 tracking-wide">
3+
<a href="/" class="block py-4 text-sm md:text-base font-bold text-red-100 tracking-wide">
44
<span class="py-1 border-b-4 border-red-400">Components.Guide</span>
55
</a>
66
<nav role="navigation" class="flex-grow px-16 text-lg">
7-
<ul class="flex flex-row justify-around">
8-
<li><a href="/learn-by-building" class="block py-4 font-bold"><%= "Learn by Building" %></a></li>
9-
<li><a href="/links" class="block py-4 font-bold"><%= "Recommended Links" %></a></li>
10-
<li><a href="/about" class="block py-4 font-bold"><%= "Who?" %></a></li>
7+
<ul class="flex flex-col md:flex-row justify-around py-3">
8+
<li><a href="/learn-by-building" class="block py-2 md:py-4 font-bold border-b-4 border-transparent hover:border-red-400"><%= "Learn by Building" %></a></li>
9+
<li><a href="/links" class="block py-2 md:py-4 font-bold border-b-4 border-transparent hover:border-red-400"><%= "Recommended Links" %></a></li>
10+
<li><a href="/about" class="block py-2 md:py-4 font-bold border-b-4 border-transparent hover:border-red-400"><%= "About" %></a></li>
1111
<% if false do %>
1212
<li><a href="/swiftui" class="block py-4 font-bold"><%= "SwiftUI + Combine" %></a></li>
1313
<li><a href="/rxjs" class="block py-4 font-bold"><%= "React + TS + RxJS" %></a></li>

0 commit comments

Comments
 (0)