Skip to content

Commit 07a1984

Browse files
committed
fix: some improvements in mobile view
1 parent da45fa8 commit 07a1984

File tree

5 files changed

+31
-13
lines changed

5 files changed

+31
-13
lines changed

src/components/button_link.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,19 @@ pub fn ButtonLink(
1313
("white", "bg-orange-100")
1414
]);
1515
let sizes = HashMap::from([
16-
("tiny", "h-7"),
16+
("tiny", "min-h-7"),
1717
("normal", "h-9"),
1818
("big", "h-12")
1919
]);
2020
let current_color = colors.get(&color).unwrap().to_string();
2121
let current_size = sizes.get(&size).unwrap().to_string();
2222

23+
2324
view! {
2425
<a
2526
href=href
2627
target="_blank"
27-
class=format!("tracking-wider font-work-sans border border-black flex items-center px-4 drop-shadow-[4px_4px_0_rgba(0,0,0)] hover:drop-shadow-[0_0_0_rgba(0,0,0)] transition w-fit gap-x-4 whitespace-nowrap {} {}", current_color, current_size)
28+
class=format!("tracking-wider font-work-sans border border-black flex items-center px-4 drop-shadow-[4px_4px_0_rgba(0,0,0)] hover:drop-shadow-[0_0_0_rgba(0,0,0)] transition w-fit gap-x-4 sm:whitespace-nowrap max-w-[10rem] sm:max-w-none {} {}", current_color, current_size)
2829
>
2930
{children()}
3031
</a>

src/components/cards/project_card.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub fn ProjectCard(
2727
<a
2828
href=link
2929
target="_blank"
30-
class="group flex flex-col gap-y-6 border border-black p-6 hover:bg-orange-500 bg-orange-200 drop-shadow-[0_0_0_rgba(0,0,0)] hover:drop-shadow-[-4px_-4px_0_rgba(0,0,0)] transition justify-between"
30+
class="group flex flex-col gap-y-6 border border-black p-2 sm:p-6 hover:bg-orange-500 bg-orange-200 drop-shadow-[0_0_0_rgba(0,0,0)] hover:drop-shadow-[-4px_-4px_0_rgba(0,0,0)] transition justify-between"
3131
>
3232
<div class="flex flex-col justify-between gap-y-2">
3333
{if brand_as_letter {

src/components/community_projects.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub fn CommunityProjects() -> impl IntoView {
9595
<span class="font-work-sans font-light">"Proyectos de la "</span>
9696
<span class="font-alfa-slab text-orange-500">"Comunidad"</span>
9797
</h2>
98-
<div class="w-full grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-x-8 gap-y-4">
98+
<div class="w-full grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 sm:gap-x-8 gap-y-4">
9999
{items.into_iter().map(|item| {
100100
view! {
101101
<ProjectCard

src/components/hero.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn Hero() -> impl IntoView {
1818
<span class="font-alfa-slab text-orange-500 text-6xl sm:text-7xl lg:text-8xl text-center lg:text-left">"Rust Lang"</span>
1919
<span class="font-work-sans text-5xl font-semibold text-center lg:text-left">"En Español"</span>
2020
</h1>
21-
<p class="font-work-sans font-light">
21+
<p class="font-work-sans font-light text-center lg:text-left">
2222
"Una comunidad de gente mal intencionada y tonta."
2323
</p>
2424
</div>

style/output.css

+25-8
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,6 @@ video {
630630
height: 3rem;
631631
}
632632

633-
.h-7 {
634-
height: 1.75rem;
635-
}
636-
637633
.h-9 {
638634
height: 2.25rem;
639635
}
@@ -667,6 +663,10 @@ video {
667663
width: 100%;
668664
}
669665

666+
.max-w-\[10rem\] {
667+
max-width: 10rem;
668+
}
669+
670670
.flex-col {
671671
flex-direction: column;
672672
}
@@ -732,10 +732,6 @@ video {
732732
row-gap: 1.5rem;
733733
}
734734

735-
.whitespace-nowrap {
736-
white-space: nowrap;
737-
}
738-
739735
.rounded-full {
740736
border-radius: 9999px;
741737
}
@@ -795,6 +791,10 @@ video {
795791
fill: #000;
796792
}
797793

794+
.p-2 {
795+
padding: 0.5rem;
796+
}
797+
798798
.p-6 {
799799
padding: 1.5rem;
800800
}
@@ -1453,6 +1453,10 @@ video {
14531453
}
14541454

14551455
@media (min-width: 640px) {
1456+
.sm\:max-w-none {
1457+
max-width: none;
1458+
}
1459+
14561460
.sm\:grid-cols-2 {
14571461
grid-template-columns: repeat(2, minmax(0, 1fr));
14581462
}
@@ -1461,6 +1465,19 @@ video {
14611465
flex-direction: row;
14621466
}
14631467

1468+
.sm\:gap-x-8 {
1469+
-moz-column-gap: 2rem;
1470+
column-gap: 2rem;
1471+
}
1472+
1473+
.sm\:whitespace-nowrap {
1474+
white-space: nowrap;
1475+
}
1476+
1477+
.sm\:p-6 {
1478+
padding: 1.5rem;
1479+
}
1480+
14641481
.sm\:text-7xl {
14651482
font-size: 4.5rem;
14661483
line-height: 1;

0 commit comments

Comments
 (0)