mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
fix: unfucked responsiveness on homepage
This commit is contained in:
parent
d6206ba667
commit
3731621402
3 changed files with 52 additions and 20 deletions
|
|
@ -13,12 +13,13 @@ in
|
|||
systemPackages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
git
|
||||
grim
|
||||
helix
|
||||
just
|
||||
pijul
|
||||
sshfs
|
||||
tomb
|
||||
just
|
||||
virt-manager
|
||||
helix
|
||||
;
|
||||
};
|
||||
variables = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
module Config.Helpers.Response exposing
|
||||
( contentContainer
|
||||
, deviceLogic
|
||||
, pageList
|
||||
, pageListCenter
|
||||
, pageListFormat
|
||||
|
|
@ -32,6 +33,33 @@ import Element.Background as B exposing (color)
|
|||
import Html.Attributes exposing (style)
|
||||
|
||||
|
||||
deviceLogic :
|
||||
{ desktop : a
|
||||
, bigDesktop : a
|
||||
, tablet : a
|
||||
, phone : a
|
||||
}
|
||||
-> Device
|
||||
-> a
|
||||
deviceLogic values device =
|
||||
case device.class of
|
||||
Desktop ->
|
||||
values.desktop
|
||||
|
||||
BigDesktop ->
|
||||
values.bigDesktop
|
||||
|
||||
Tablet ->
|
||||
case device.orientation of
|
||||
_ ->
|
||||
values.tablet
|
||||
|
||||
Phone ->
|
||||
case device.orientation of
|
||||
_ ->
|
||||
values.phone
|
||||
|
||||
|
||||
topLevelContainer : Element msg -> Element msg
|
||||
topLevelContainer =
|
||||
el
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import Config.Helpers.Cards.Inner.Text exposing (detailBodyLink)
|
|||
import Config.Helpers.Headers.Types exposing (Header)
|
||||
import Config.Helpers.Response
|
||||
exposing
|
||||
( pageListCenter
|
||||
( deviceLogic
|
||||
, pageListCenter
|
||||
, topLevelContainer
|
||||
)
|
||||
import Config.Helpers.Viewport exposing (resetViewport)
|
||||
|
|
@ -163,28 +164,30 @@ homePage device image =
|
|||
, centerY
|
||||
, E.spacing 20
|
||||
, E.width (E.fill |> minimum 100)
|
||||
, E.width (E.fill |> maximum 875)
|
||||
, E.width
|
||||
(E.fill
|
||||
|> maximum
|
||||
(deviceLogic
|
||||
{ desktop = 875
|
||||
, bigDesktop = 875
|
||||
, tablet = 500
|
||||
, phone = 325
|
||||
}
|
||||
device
|
||||
)
|
||||
)
|
||||
]
|
||||
[ el
|
||||
[ centerX
|
||||
, E.width <|
|
||||
px <|
|
||||
case device.class of
|
||||
Desktop ->
|
||||
675
|
||||
|
||||
BigDesktop ->
|
||||
675
|
||||
|
||||
Tablet ->
|
||||
case device.orientation of
|
||||
_ ->
|
||||
300
|
||||
|
||||
Phone ->
|
||||
case device.orientation of
|
||||
_ ->
|
||||
150
|
||||
deviceLogic
|
||||
{ desktop = 675
|
||||
, bigDesktop = 675
|
||||
, tablet = 300
|
||||
, phone = 150
|
||||
}
|
||||
device
|
||||
]
|
||||
<|
|
||||
html image
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue