feat: finish main pages

This commit is contained in:
Ananth Venkatesh 2025-02-09 03:58:01 -05:00
parent 147da72331
commit 4b85ed5fb5
Signed by: ananthv
GPG key ID: 4BB578E748CFE4FF
9 changed files with 217 additions and 66 deletions

BIN
assets/img/belong.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
assets/img/brick.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 KiB

BIN
assets/img/free.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
assets/img/location.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 KiB

BIN
assets/img/tall.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

BIN
assets/img/view.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 KiB

View file

@ -6,7 +6,6 @@
"elm-explorations/webgl": "1.1.3", "elm-explorations/webgl": "1.1.3",
"elm/browser": "1.0.2", "elm/browser": "1.0.2",
"elm/core": "1.0.5", "elm/core": "1.0.5",
"elm/html": "1.0.0",
"elm/http": "2.0.0", "elm/http": "2.0.0",
"elm/time": "1.0.0", "elm/time": "1.0.0",
"ianmackenzie/elm-3d-camera": "3.1.0", "ianmackenzie/elm-3d-camera": "3.1.0",
@ -21,6 +20,7 @@
"elm-explorations/linear-algebra": "1.0.3", "elm-explorations/linear-algebra": "1.0.3",
"elm/bytes": "1.0.8", "elm/bytes": "1.0.8",
"elm/file": "1.0.5", "elm/file": "1.0.5",
"elm/html": "1.0.0",
"elm/json": "1.1.3", "elm/json": "1.1.3",
"elm/random": "1.0.0", "elm/random": "1.0.0",
"elm/url": "1.0.0", "elm/url": "1.0.0",

View file

@ -33,6 +33,7 @@
buildInputs = self.checks.${system}.pre-commit-check.enabledPackages ++ [ buildInputs = self.checks.${system}.pre-commit-check.enabledPackages ++ [
elmPackages.elm elmPackages.elm
elmPackages.elm-review elmPackages.elm-review
elmPackages.elm-json
entr entr
]; ];
}; };

View file

@ -13,7 +13,6 @@ import Element.Background as Background
import Element.Border as Border import Element.Border as Border
import Element.Font as Font import Element.Font as Font
import Element.Input exposing (button) import Element.Input exposing (button)
import Html exposing (Html)
import Http import Http
import Length import Length
import Obj.Decode import Obj.Decode
@ -158,11 +157,6 @@ subscribe _ =
] ]
htmlify : List (Element Msg) -> List (Html Msg)
htmlify =
List.map (Element.layout [])
vw : Model -> Float -> Float vw : Model -> Float -> Float
vw model percent = vw model percent =
Basics.toFloat model.w * percent / 100 Basics.toFloat model.w * percent / 100
@ -186,7 +180,7 @@ black =
btnStyle : List (Attribute msg) btnStyle : List (Attribute msg)
btnStyle = btnStyle =
[ padding 10 [ padding 10
, Font.color (rgb255 255 255 255) , Font.color white
, Font.family [ Font.typeface "Rubik" ] , Font.family [ Font.typeface "Rubik" ]
, Font.semiBold , Font.semiBold
, Font.size 20 , Font.size 20
@ -226,77 +220,233 @@ vh2px model ratio =
px (vh2pt model ratio) px (vh2pt model ratio)
heading : List (Attr () msg)
heading =
[ Font.color white
, Font.family [ Font.typeface "Imbue" ]
, Font.size 96
]
subheading : List (Attr () msg)
subheading =
[ Font.color white
, Font.family [ Font.typeface "Imbue" ]
, Font.size 72
, width (px 600)
]
bodyText : List (Attr () msg)
bodyText =
[ Font.color white
, Font.family [ Font.typeface "Inter" ]
, Font.size 20
, width (px 600)
]
page : Model -> List (Attr () msg)
page model =
[ width fill
, height (vh2px model 100)
, spacing (vh2pt model -100)
, Background.color black
]
fullImage : Model -> List (Attr () msg)
fullImage model =
[ width fill
, height (vh2px model 100)
, alpha 0.5
]
pageText : Model -> List (Attr () msg)
pageText model =
[ spacing 30
, alignLeft
, alignTop
, width (vw2px model 50)
, height (vh2px model 100)
, paddingEach
{ top = vh2pt model 50 - 96
, bottom = 0
, left = vw2pt model 10
, right = 0
}
]
inlineLink : String -> String -> Element msg
inlineLink disp addr =
newTabLink
[ Font.underline
, Font.bold
]
{ url = addr
, label = text disp
}
view : Model -> Browser.Document Msg view : Model -> Browser.Document Msg
view model = view model =
{ title = "MacGregor House" { title = "MacGregor House"
, body = , body =
htmlify [ Element.layout
[ column [ width fill
[ width fill ]
, height fill (column [ width fill ]
, spacing (vh2pt model -100) [ column
]
[ el
[ width fill [ width fill
, height (vh2px model 100) , height fill
, Background.color (rgb255 0 0 0) , spacing (vh2pt model -100)
] ]
Element.none [ el
, animatedEl crossfadeIn [ width fill
[ width fill , height (vh2px model 100)
, height (vh2px model 100) , Background.color black
, Background.gradient { angle = 45, steps = [ rgb255 200 0 100, rgb255 100 0 200 ] }
]
Element.none
, animatedEl crossfadeOut
[ width fill
, height (vh2px model 100)
, Background.gradient { angle = 45, steps = [ rgb255 0 100 200, rgb255 0 200 100 ] }
]
Element.none
, el
[ alignLeft
, alignTop
, width (vw2px model 50)
, height (vh2px model 100)
, paddingEach
{ top = vh2pt model 50 - 96
, bottom = 0
, left = vw2pt model 10
, right = 0
}
, Font.color (rgb255 255 255 255)
, Font.family [ Font.typeface "Imbue" ]
, Font.size 96
]
(column
[ spacing 20
] ]
[ text "MacGregor House" Element.none
, row , animatedEl crossfadeIn
[ width fill
, height (vh2px model 100)
, Background.gradient { angle = 45, steps = [ rgb255 200 0 100, rgb255 100 0 200 ] }
]
Element.none
, animatedEl crossfadeOut
[ width fill
, height (vh2px model 100)
, Background.gradient { angle = 45, steps = [ rgb255 0 100 200, rgb255 0 200 100 ] }
]
Element.none
, el
([ alignLeft
, alignTop
, width (vw2px model 50)
, height (vh2px model 100)
, paddingEach
{ top = vh2pt model 50 - 96
, bottom = 0
, left = vw2pt model 10
, right = 0
}
]
++ heading
)
(column
[ spacing 20 [ spacing 20
] ]
[ linkBtn "Events" "https://calendar.google.com/calendar/embed?src=c_c9fb13003264d5becb74cf9ba42a087d8a4a180d927441994458a07ac146eb88%40group.calendar.google.com&ctz=America%2FNew_York" [ text "MacGregor House"
, linkBtn "Space" "https://forms.gle/KxFAG65TQuPxdYak8" , row
, btn "iCal" (Copy "https://calendar.google.com/calendar/ical/c_c9fb13003264d5becb74cf9ba42a087d8a4a180d927441994458a07ac146eb88%40group.calendar.google.com/public/basic.ics") [ spacing 20
]
[ linkBtn "Events" "https://calendar.google.com/calendar/embed?src=c_c9fb13003264d5becb74cf9ba42a087d8a4a180d927441994458a07ac146eb88%40group.calendar.google.com&ctz=America%2FNew_York"
, linkBtn "Space" "https://forms.gle/KxFAG65TQuPxdYak8"
, btn "iCal" (Copy "https://calendar.google.com/calendar/ical/c_c9fb13003264d5becb74cf9ba42a087d8a4a180d927441994458a07ac146eb88%40group.calendar.google.com/public/basic.ics")
]
]
)
, el
[ alignRight
, alignTop
, width (vw2px model 60)
, height (vh2px model 100)
, paddingEach
{ top = vh2pt model 25
, bottom = vh2pt model 25
, left = 0
, right = 0
}
]
(view3D model)
]
, column
(page model)
[ image (fullImage model)
{ src = "../assets/img/tall.jpg"
, description = "the imposing macgregor superstructure stands tall in defiance of strong winds"
}
, column (pageText model)
[ paragraph subheading [ text "The tallest undergraduate dormitory." ]
, paragraph bodyText
[ text "Enrico Fermi once said, \"Before I came here I was confused about this subject. Having listened to your lecture, I am still confused, but on a higher level.\" "
, inlineLink "Pietro Belluschi" "https://listart.mit.edu/art-artists/macgregor-house-1970"
, text " attended that lecture."
]
]
]
, column
(page model)
[ image (fullImage model)
{ src = "../assets/img/view.jpg"
, description = "the macgregor pov just hits different"
}
, column (pageText model)
[ paragraph subheading [ text "Stunning vistas are just the beginning." ]
, paragraph bodyText
[ text "A view from MacGregor is like looking down on Earth from the stars. MacGregor's prime waterfront real estate offers breathtaking views of the Charles and the Boston skyline beyond."
]
]
]
, column
(page model)
[ image (fullImage model)
{ src = "../assets/img/free.jpg"
, description = "macgregor is often seen as the gateway to new worlds, especially briggs field"
}
, column (pageText model)
[ paragraph subheading [ text "Free as in freedom." ]
, paragraph bodyText
[ text "This website's source code and infrastructure, the ability to cook, your choice of living community and room assignmentsthey operate in the public interest of all MacGregorites. You won't get this freedom at many other undergraduate dormitories at MIT."
]
]
]
, column
(page model)
[ image (fullImage model)
{ src = "../assets/img/location.jpg"
, description = "the bright lights of the macgregor high rise shine down upon the glossy snow-covered surface of briggs field"
}
, column (pageText model)
[ paragraph subheading [ text "Nestled between Kendall and Cambridgeport." ]
, paragraph bodyText
[ text "Between "
, inlineLink "the innovative spirit of Kendall" "https://kendallsquare.org/kendalls-history-orientation/"
, text " and the industrial crossroads of Cambridgeport, there is a placeon a tiny stretch of street called Amherst Alleythat fills the quiet void with a voracious intellectual appetite and an unparalleled creative vision."
]
]
]
, column
(page model)
[ image (fullImage model)
{ src = "../assets/img/brick.jpg"
, description = "multicolored bricks shine in the limelight of macgregorian festivities"
}
, column (pageText model)
[ paragraph subheading [ text "We like the ", el [ Font.bold, Font.size 96 ] (text "brick"), text "." ]
, paragraph bodyText
[ text "The bricks are everywhereby far the most recognizable feature of MacGregor. You'll find them protecting the building's exterior from harsh Bostonian winters, lining its fabled corridors, and in your room, as much an architectural statement as they are a testament to the people of MacGregor."
]
]
]
, column
(page model)
[ image (fullImage model)
{ src = "../assets/img/belong.jpg"
, description = "the cultural murals of macgregor breathe life into its ancient pedestrian thoroughfares"
}
, column (pageText model)
[ paragraph subheading [ text "You belong here." ]
, paragraph bodyText
[ text "MacGregor's greatness is the greatness of its people. Living in MacGregor inevitably connects you to its people and its cultureone of the most diverse, unique, and historic of any MIT dormspanning nine entries, countless murals and traditions, and a couple hundred current residents."
] ]
] ]
)
, el
[ alignRight
, alignTop
, width (vw2px model 60)
, height (vh2px model 100)
, paddingEach
{ top = vh2pt model 25
, bottom = vh2pt model 25
, left = 0
, right = 0
}
] ]
(view3D model)
] ]
] )
]
} }