Skip to content

Commit

Permalink
Merge pull request #6 from gdgbari/main
Browse files Browse the repository at this point in the history
target blank on links
  • Loading branch information
domysh authored Sep 3, 2024
2 parents a3eab73 + 7f2f6b0 commit 1204d05
Show file tree
Hide file tree
Showing 16 changed files with 311 additions and 237 deletions.
5 changes: 0 additions & 5 deletions .firebaserc

This file was deleted.

41 changes: 0 additions & 41 deletions firebase.json

This file was deleted.

24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"astro-robots-txt": "^1.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.77.8",
"tailwindcss": "^3.3.5"
},
"devDependencies": {
Expand Down
19 changes: 19 additions & 0 deletions public/styles/utils.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,23 @@
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(-360deg); }
}

body.multicolored {
background: linear-gradient(-40deg, #34A853, #4285F4, #EA4335, #F9AB00 );
background-size: 150% 150%;
animation: gradient 10s ease infinite;
height: 100vh;
}

@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
66 changes: 66 additions & 0 deletions src/assets/styles/multicolored-bg.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
@mixin dots($count, $color) {
$text-shadow: ();
@for $i from 0 through $count {
$text-shadow: $text-shadow,
(-.5+(random()) * 3) + em
(-.5+(random()) * 3) + em
14px
$color
}
text-shadow: $text-shadow;
}
html.multicolored-bg{
head{
display: block;
color: transparent;
}
head::before, head::after,
body::before, body::after {
display: block;
font-size: 250px;
color: transparent;
position: fixed;
top: 50%;
left: 50%;
width: 3em;
height: 3em;
content: '.';
mix-blend-mode: screen;
animation: 44s -27s move infinite ease-in-out alternate;
}


body::before {
@include dots(200, #34A853);
animation-duration: 10s;
animation-delay: -27s;
}

body::after {
@include dots(200, #4285F4);
animation-duration: 20s;
animation-delay: -32s;
}

head::before {
@include dots(300, #EA4335);
animation-duration: 40s;
animation-delay: -23s;
}

head::after {
@include dots(100, #F9AB00);
animation-duration: 30s;
animation-delay: -19s;
}


@keyframes move {
from {
transform: rotate(0deg) scale(12) translateX(-40px);
}
to {
transform: rotate(180deg) scale(18) translateX(40px);
}
}
}
10 changes: 5 additions & 5 deletions src/components/Common/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const year = new Date().getFullYear();
<div class="flex flex-col gap-4">
<div class="flex flex-col md:flex-row justify-between">
<div class="flex flex-col items-start gap-1">
<p class="text-xl font-medium mb-1">Share</p>
<p class="text-xl font-medium mb-1 underline">Share</p>
{
shareLinks.map(([type, logo]) => {
return (
Expand All @@ -40,16 +40,16 @@ const year = new Date().getFullYear();
})
}
</div>
<div class="flex flex-col gap-1 items-start">
<span class="text-lg font-medium mb-1">Follow Us</span>
<div class="flex flex-col gap-1 items-start md:pt-0 pt-4">
<span class="text-lg font-medium mb-1 underline">Follow Us</span>
{
pagesLinks.map(([url, type]) => {
return url.length > 0 && <LinkButton href={url} logo={type} />;
})
}
</div>
<div class="flex flex-col gap-1 items-start">
<span class="text-lg font-medium mb-1">Policies</span>
<div class="flex flex-col gap-1 items-start md:pt-0 pt-4">
<span class="text-lg font-medium mb-1 underline">Policies</span>
<a target="_blank" href="https://www.iubenda.com/privacy-policy/86405163" class="cursor-pointer hover:opacity-75 transition-opacity">Privacy Policy</a>
<a href="https://www.iubenda.com/privacy-policy/86405163/cookie-policy" class="cursor-pointer hover:opacity-75 transition-opacity">Cookie Policy</a>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/Common/PageHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { WebsiteConfig } from "../../config";
const { DEVFEST_NAME } = WebsiteConfig;
import { ViewTransitions } from 'astro:transitions';
import GlobalScripts from './GlobalScripts.astro';
import "../../assets/styles/multicolored-bg.scss";
interface Props {
title?: string;
Expand Down
24 changes: 13 additions & 11 deletions src/components/Home/Jumbo.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { WebsiteConfig } from "../../config";
import { getLangFromUrl, useTranslations } from "../../i18n/utils";
import Skyline from "../../assets/vectors/skyline.svg?raw";
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
---
Expand All @@ -28,16 +28,18 @@ const t = useTranslations(lang);
>
</div>
</div>
<img
src="/assets/vectors/skyline-parts/skyline-base.png"
alt=""
class="mt-auto absolute bottom-0 left-0 right-0 w-full"
/>
<img
src="/assets/vectors/skyline-parts/skyline-inner-wheel.png"
alt=""
class="mt-auto absolute bottom-0 left-0 right-0 w-full wheel-rotate-animation"
/>
<div class="overflow-hidden">
<img
src="/assets/vectors/skyline-parts/skyline-base.png"
alt=""
class="mt-auto absolute bottom-0 left-0 right-0 w-full"
/>
<img
src="/assets/vectors/skyline-parts/skyline-inner-wheel.png"
alt=""
class="mt-auto absolute bottom-0 left-0 right-0 w-full wheel-rotate-animation"
/>
</div>

</div>
</div>
2 changes: 1 addition & 1 deletion src/components/Home/TicketSection.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const t = useTranslations(lang);
<p class="text-3xl font-medium">{t('ticket.title')}</p>
<p class="text-6xl font-bold my-8 text-red">{t('ticket.free')}</p>

<a class="btn btn-primary" href={WebsiteConfig.DEVFEST_EVENT_LINK}>{t('ticket.cta')}</a>
<a class="btn btn-primary" target="_blank" href={WebsiteConfig.DEVFEST_EVENT_LINK}>{t('ticket.cta')}</a>
</div>
</div>
</div>
117 changes: 117 additions & 0 deletions src/components/Schedule/Pages/ScheduleList.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
import ScheduleCard from "../ScheduleCard.astro";
import { getSchedule } from "../../../scripts/api/sessionize_api";
import { getLangFromUrl, useTranslations } from "../../../i18n/utils";
const schedule = await getSchedule();
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
---
<div class="text-white">
{
schedule.map((s) => {
const totalScheduleCols = s.rooms.length + 1;
const totalScheduleRows = s.timeSlots.length;
let skipPadding: {[key:string]:number} = s.rooms.map((room) => ({[room.id]:0})).reduce((a,b)=>({...a,...b}),{})
return (
<div class="mb-5">
<p class="text-3xl font-bold mb-5">
{new Date(s.date).toLocaleDateString("en-US", {
day: "numeric",
month: "long",
weekday: "long",
})}
</p>
<div
class={`grid grid-flow-row xl:grid-cols-[90px_repeat(5,_minmax(0,_1fr))] xl:grid-rows-${totalScheduleRows} grid-cols-1 gap-4`}
>
{s.timeSlots.map((ts,ts_idx) => {

const hasServiceSession = ts.rooms.some(
(tsr) => tsr.session.isServiceSession,
);

const sessionsInTimeSlot = ts.rooms.map((tsr) => {
const endDate = new Date(tsr.session.endsAt);
endDate.setSeconds(0)
endDate.setMilliseconds(0)
const slots = !hasServiceSession? (
//Function that calculate the rows to take for this session
(()=>{
//Calculate the space to take (how many timeSlot takes this session (until a service session))
let session_len = 1
let last_is_service = false
for (let i = ts_idx+1; i < s.timeSlots.length; i++){
//No sessions
if (s.timeSlots[i].rooms.length == 0) continue
//Take time from one of the sessions
//Get next start date
const next_date = new Date(s.timeSlots[i].rooms[0].session.startsAt)
next_date.setSeconds(0)
next_date.setMilliseconds(0)
//If it's a service session, can't take this space
if (s.timeSlots[i].rooms.some( (tsr) => tsr.session.isServiceSession)){
last_is_service = true
continue //We need to check if replicate this session for the next timeSlot that is not a service session
}
if (last_is_service){ //We stopped at a service session and need to check if replicate this session in next timeSlots
if (next_date < endDate){
s.timeSlots[i].rooms.push(tsr) //Replicate
}
break
}
//Continue to get space until this session ends
if (next_date < endDate){
session_len ++
}else{
break
}
}
return session_len
})()
) : 1;
if (slots > 1){
skipPadding[tsr.id.toString()] = slots-1
}
return {
data: tsr,
html: <div class={`xl:col-span-${ hasServiceSession ? totalScheduleCols - 1 : 1 } row-span-${slots}`}>
<ScheduleCard value={tsr} />
</div>
};
});

const orderedSessions = (
!hasServiceSession?
s.rooms.map(
(room) => {
let session = sessionsInTimeSlot.find((target) => room.id == target.data.id)
if (!session){
if (skipPadding[room.id.toString()]){
skipPadding[room.id.toString()]--
return null
}
return <div />
}
return session?.html
}
).filter((ele)=>ele!=null) : sessionsInTimeSlot.map((session) => session.html)
)

return [
<div class="font-medium text-2xl">
<p>{ts.slotStart.substring(0, 5)}</p>
</div>,
...orderedSessions
];
})}
</div>
</div>
);
})
}
{schedule.length == 0?<h3 class="underline">{t("scheduling.noschedule")}</h3>:null}

</div>
Loading

0 comments on commit 1204d05

Please sign in to comment.