Skip to content

Commit 420bf8d

Browse files
committed
Move codymaze and codehunting games in metodi
1 parent 60a1dc0 commit 420bf8d

File tree

5 files changed

+51
-28
lines changed

5 files changed

+51
-28
lines changed

src/components/widgets/Header.astro

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,32 @@ const props = Astro.props;
144144
/>
145145
</button>
146146

147-
<ul class="dropdown2-menu lg:backdrop-blur-lg dark:lg:bg-dark rounded lg:absolute top-0 left-32 pl-4 lg:pl-0 lg:hidden font-medium lg:bg-white lg:min-w-[200px] drop-shadow-xl">
147+
<ul class="dropdown2-menu lg:backdrop-blur-lg dark:lg:bg-dark rounded lg:absolute top-0 left-32 pl-4 lg:pl-0 lg:hidden font-medium lg:bg-white lg:min-w-[220px] drop-shadow-xl">
148148
{links2.map(({ text: text3, href: href3, target = '' }) => (
149149
<li>
150150
<a
151151
class:list={[
152-
'first:rounded-t last:rounded-b lg:hover:bg-gray-200 hover:text-link dark:hover:text-white dark:hover:bg-gray-700 py-2 px-5 block whitespace-no-wrap',
152+
'flex gap-2 items-center first:rounded-t last:rounded-b lg:hover:bg-gray-200 hover:text-link dark:hover:text-white dark:hover:bg-gray-700 py-2 px-5 whitespace-no-wrap',
153153
{ 'aw-link-active': href3 === currentPath },
154154
]}
155155
href={href3}
156156
target={target}
157157
>
158158
{text3}
159+
{target !== '' && (
160+
<svg
161+
xmlns="http://www.w3.org/2000/svg"
162+
width="1em"
163+
height="1em"
164+
viewBox="0 0 24 24"
165+
{...props}
166+
>
167+
<path
168+
fill="currentColor"
169+
d="M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83l1.41 1.41L19 6.41V10h2V3z"
170+
/>
171+
</svg>
172+
)}
159173
</a>
160174
</li>
161175
))}

src/components/widgets/Hero.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const {
1717
} = Astro.props;
1818
---
1919

20-
<section class="relative md:-mt-[76px] not-prose mb-16" {...id ? { id } : {}}>
20+
<section class="relative md:-mt-[76px] not-prose" {...id ? { id } : {}}>
2121
<div class="absolute inset-0 pointer-events-none" aria-hidden="true">
2222
<slot name="bg">
2323
{bg ? <Fragment set:html={bg} /> : null}
@@ -26,7 +26,7 @@ const {
2626
<div class="relative max-w-7xl mx-auto px-4 sm:px-6">
2727
<div class="pt-0 md:pt-[76px] pointer-events-none"></div>
2828
<div class="pt-12">
29-
<div class="text-center md:pb-4 max-w-5xl mx-auto">
29+
<div class="text-center pb-4 max-w-5xl mx-auto">
3030
{
3131
tagline &&
3232
(taglineLink ? (

src/components/widgets/MobileMenu.tsx

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ const MobileMenu = ({ links, currentPath }) => {
6060
{text2}
6161
<Icon
6262
icon="tabler:chevron-right"
63-
className={`w-3.5 h-3.5 ml-0.5 ${
64-
isSubMenuOpen ? 'rotate-90' : ''
65-
} transition-transform`}
63+
className={`w-3.5 h-3.5 ml-0.5 ${isSubMenuOpen ? 'rotate-90' : ''
64+
} transition-transform`}
6665
/>
6766
</button>
6867

@@ -71,13 +70,25 @@ const MobileMenu = ({ links, currentPath }) => {
7170
{subLinks2.map(({ text: text3, href: href3, target: target3 = '' }) => (
7271
<li key={text3}>
7372
<a
74-
className={`no-underline text-[rgba(0,0,0,0.788)] hover:text-black first:rounded-t last:rounded-b md:hover:bg-gray-200 hover:text-link dark:hover:text-white dark:hover:bg-gray-700 py-2 px-5 block whitespace-no-wrap ${
75-
href3 === currentPath ? 'aw-link-active' : ''
76-
}`}
73+
className={`flex gap-2 items-center no-underline text-[rgba(0,0,0,0.788)] hover:text-black first:rounded-t last:rounded-b md:hover:bg-gray-200 hover:text-link dark:hover:text-white dark:hover:bg-gray-700 py-2 px-5 whitespace-no-wrap ${href3 === currentPath ? 'aw-link-active' : ''
74+
}`}
7775
href={href3}
7876
target={target3}
7977
>
80-
{text3}
78+
{text3}{target3 !== '' && (
79+
<svg
80+
xmlns="http://www.w3.org/2000/svg"
81+
width="1em"
82+
height="1em"
83+
viewBox="0 0 24 24"
84+
85+
>
86+
<path
87+
fill="currentColor"
88+
d="M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83l1.41 1.41L19 6.41V10h2V3z"
89+
/>
90+
</svg>
91+
)}
8192
</a>
8293
</li>
8394
))}
@@ -86,9 +97,8 @@ const MobileMenu = ({ links, currentPath }) => {
8697
</div>
8798
) : (
8899
<a
89-
className={`no-underline text-[rgba(0,0,0,0.788)] hover:text-black flex gap-2 first:rounded-t last:rounded-b md:hover:bg-gray-200 hover:text-link dark:hover:text-white dark:hover:bg-gray-700 py-2 px-5 whitespace-no-wrap items-center ${
90-
href2 === currentPath ? 'aw-link-active' : ''
91-
}`}
100+
className={`no-underline text-[rgba(0,0,0,0.788)] hover:text-black flex gap-2 first:rounded-t last:rounded-b md:hover:bg-gray-200 hover:text-link dark:hover:text-white dark:hover:bg-gray-700 py-2 px-5 whitespace-no-wrap items-center ${href2 === currentPath ? 'aw-link-active' : ''
101+
}`}
92102
href={href2}
93103
target={target2}
94104
>
@@ -117,9 +127,8 @@ const MobileMenu = ({ links, currentPath }) => {
117127
</>
118128
) : (
119129
<a
120-
className={`no-underline text-[rgba(0,0,0,0.788)] hover:text-black hover:text-link dark:hover:text-white px-4 py-3 flex items-center whitespace-nowrap gap-2 ${
121-
href === currentPath ? 'aw-link-active' : ''
122-
}`}
130+
className={`no-underline text-[rgba(0,0,0,0.788)] hover:text-black hover:text-link dark:hover:text-white px-4 py-3 flex items-center whitespace-nowrap gap-2 ${href === currentPath ? 'aw-link-active' : ''
131+
}`}
123132
href={href}
124133
target={target}
125134
>

src/navigation.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ export const headerData = {
3232
{
3333
text: 'Altri metodi',
3434
links: [
35+
{
36+
text: 'CodyMaze',
37+
href: getPermalink(`${metodiPath}${otherMethods}/codymaze`),
38+
},
39+
{
40+
text: 'CodeHunting Games',
41+
href: 'https://codehunting.games/it/introduzione',
42+
target: '_blank',
43+
},
3544
{
3645
text: 'CodyWay',
3746
href: getPermalink(`${metodiPath}${otherMethods}/codyway`),
@@ -47,15 +56,6 @@ export const headerData = {
4756
{
4857
text: 'Risorse',
4958
links: [
50-
{
51-
text: 'CodyMaze',
52-
href: getPermalink(`${appPath}/codymaze`),
53-
},
54-
{
55-
text: 'CodeHunting Games',
56-
href: 'https://codehunting.games/it/introduzione',
57-
target: '_blank',
58-
},
5959
{
6060
text: 'CodyColor Game',
6161
href: getPermalink(`${appPath}/codycolor-game`),

src/pages/risorse/codymaze.astro renamed to src/pages/metodi/altri-metodi/codymaze.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
import Hero from '~/components/widgets/Hero.astro';
3-
import Layout from '../../layouts/PageLayout.astro';
3+
import Layout from '../../../layouts/PageLayout.astro';
44
55
import banner from '~/assets/images/risorse/codymaze/banner.jpg';
66
import AnimateText from '~/components/ui/AnimateText.astro';
7-
import Button from '../../components/ui/Button.astro';
7+
import Button from '../../../components/ui/Button.astro';
88
99
import QRCode from '~/../public/codymaze/qrCode.pdf';
1010
const metadata = {

0 commit comments

Comments
 (0)