Skip to content

Commit 4db3f96

Browse files
committed
fix: reduce the issues in mobile
1 parent f9ab8e3 commit 4db3f96

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

src/components/aprende/books.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ pub fn Books(
1515
"Hemos dedicado tiempo y esfuerzo a adaptar libros al español, estamos orgullosos de compartir estos recursos, esperando que contribuyan al acceso y comprensión de valiosos conocimientos."
1616
</p>
1717
</div>
18-
<div class="flex flex-row justify-center items-center container mx-auto mb-28">
19-
<section class="w-1/2 px-10">
18+
<div class="flex flex-col md:flex-row justify-center items-center container mx-auto mb-16 md:mb-28 gap-4">
19+
<section class="w-full md:w-1/2 px-10">
2020
<div class="relative group flex flex-col gap-y-6 border border-black p-2 sm:p-6 bg-orange-100 drop-shadow-[0_0_0_rgba(0,0,0)] hover:drop-shadow-[-4px_-4px_0_rgba(0,0,0)] justify-between group transition-all transform">
2121
<span class="absolute top-0 end-0 inline-flex items-center size-3.5 rounded-full border-2 border-white text-xs font-medium transition-all transform -translate-y-1/2 translate-x-1/2 bg-teal-500 dark:border-slate-900 badge-container">
2222
<span class="sr-only text-black badge-content transition-all transform ">
@@ -37,7 +37,7 @@ pub fn Books(
3737
</div>
3838
</section>
3939

40-
<section class="w-1/2 px-10">
40+
<section class="w-full md:w-1/2 px-10 flex flex-col h-full ">
4141
<div class="group flex flex-col gap-y-6 border border-black p-2 sm:p-6 bg-orange-100 drop-shadow-[0_0_0_rgba(0,0,0)] hover:drop-shadow-[-4px_-4px_0_rgba(0,0,0)] transition justify-between">
4242
<span class="absolute top-0 end-0 inline-flex items-center size-3.5 rounded-full border-2 border-white text-xs font-medium transition-all transform -translate-y-1/2 translate-x-1/2 bg-yellow-500 dark:border-slate-900 badge-container">
4343
<span class="sr-only text-black badge-content transition-all transform ">
@@ -70,8 +70,8 @@ pub fn Books(
7070
"Estos son algunos otros libros que nos interesa compartir con ustedes."
7171
</p>
7272
</div>
73-
<div class="flex flex-row justify-center items-center container mx-auto">
74-
<section class="w-1/2 px-10">
73+
<div class="flex flex-col md:flex-row justify-center items-center container mx-auto">
74+
<section class="w-full lg:w-1/2 px-10">
7575
<div class="relative group flex flex-col gap-y-6 border border-black p-2 sm:p-6 bg-orange-100 drop-shadow-[0_0_0_rgba(0,0,0)] hover:drop-shadow-[-4px_-4px_0_rgba(0,0,0)] justify-between group transition-all transform">
7676
<h1 class="font-alfa-slab text-xl sm:text-2xl lg:text-3xl text-center mb-5">
7777
"Comprehensive Rust"
@@ -83,6 +83,7 @@ pub fn Books(
8383
<ButtonLink
8484
href="https://google.github.io/comprehensive-rust/es/index.html"
8585
size="big"
86+
class="max-w-fit"
8687
>
8788
"Ir a Comprehensive Rust"
8889
</ButtonLink>

src/components/aprende/roadmap.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ pub fn Roadmap(
1212
};
1313

1414
view! {
15-
<section class="bg-orange-200 py-20 flex flex-col md:flex-row items-center justify-center container mx-auto gap-10">
16-
<div class="container mx-auto flex flex-wrap text-balance gap-5 w-1/2">
15+
<section class="bg-orange-200 py-20 flex flex-col-reverse md:flex-row items-center justify-center container mx-auto gap-10">
16+
<div class="container px-10 lg:mx-auto flex flex-wrap text-balance gap-5 lg:w-1/2">
1717
<h1 class="font-alfa-slab text-3xl sm:text-4xl lg:text-5xl text-center lg:text-left">
1818
"Roadmap de aprendizaje del lenguaje"
1919
</h1>
@@ -24,8 +24,8 @@ pub fn Roadmap(
2424
"Ir al Roadmap"
2525
</ButtonLink>
2626
</div>
27-
<div class=" w-1/2 lg:min-h-[500px]">
28-
<div class="image-container w-full">
27+
<div class="w-full lg:w-1/2 min-h-72 xs:min-h-[420px] lg:min-h-[450px] xs:mb-12">
28+
<div class="image-container w-full max-w-60 xs:max-w-none mx-auto">
2929
<img
3030
src=format!("{}/roadmap.avif", assets_folder)
3131
alt="Roadmap"

src/components/aprende/youtube.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn Youtube(
1717
</p>
1818
</div>
1919
<div class="p-6 w-full">
20-
<div class="list">
20+
<div class="list py-6">
2121
<YoutubeCard
2222
username="robertohuertasm"
2323
title="Roberto Huertas"

src/components/button_link.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub fn ButtonLink(
66
#[prop(into)] href: String,
77
#[prop(default = "primary")] color: &'static str,
88
#[prop(default = "normal")] size: &'static str,
9+
#[prop(into, optional)] class: String,
910
children: Children,
1011
) -> impl IntoView {
1112
let colors = HashMap::from([
@@ -21,9 +22,10 @@ pub fn ButtonLink(
2122
href=href
2223
target="_blank"
2324
class=format!(
24-
"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 {} {}",
25+
"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 {} {} {}",
2526
current_color,
2627
current_size,
28+
class,
2729
)
2830
>
2931

tailwind.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ const svgToDataUri = require("mini-svg-data-uri");
22
const {
33
default: flattenColorPalette,
44
} = require("tailwindcss/lib/util/flattenColorPalette");
5+
const defaultTheme = require('tailwindcss/defaultTheme')
6+
57

68
/** @type {import('tailwindcss').Config} */
79
module.exports = {
@@ -14,6 +16,10 @@ module.exports = {
1416
"work-sans": ["Work Sans", "sans-serif"],
1517
},
1618
extend: {
19+
screens: {
20+
'xs': '475px',
21+
...defaultTheme.screens,
22+
},
1723
gridTemplateColumns: (theme) => ({
1824
"divided": "2.5fr 1fr",
1925
"sidebar": "1fr 1fr"

0 commit comments

Comments
 (0)