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 {
|
systemPackages = builtins.attrValues {
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
git
|
git
|
||||||
|
grim
|
||||||
|
helix
|
||||||
|
just
|
||||||
pijul
|
pijul
|
||||||
sshfs
|
sshfs
|
||||||
tomb
|
tomb
|
||||||
just
|
|
||||||
virt-manager
|
virt-manager
|
||||||
helix
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
variables = {
|
variables = {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
module Config.Helpers.Response exposing
|
module Config.Helpers.Response exposing
|
||||||
( contentContainer
|
( contentContainer
|
||||||
|
, deviceLogic
|
||||||
, pageList
|
, pageList
|
||||||
, pageListCenter
|
, pageListCenter
|
||||||
, pageListFormat
|
, pageListFormat
|
||||||
|
|
@ -32,6 +33,33 @@ import Element.Background as B exposing (color)
|
||||||
import Html.Attributes exposing (style)
|
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 : Element msg -> Element msg
|
||||||
topLevelContainer =
|
topLevelContainer =
|
||||||
el
|
el
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ import Config.Helpers.Cards.Inner.Text exposing (detailBodyLink)
|
||||||
import Config.Helpers.Headers.Types exposing (Header)
|
import Config.Helpers.Headers.Types exposing (Header)
|
||||||
import Config.Helpers.Response
|
import Config.Helpers.Response
|
||||||
exposing
|
exposing
|
||||||
( pageListCenter
|
( deviceLogic
|
||||||
|
, pageListCenter
|
||||||
, topLevelContainer
|
, topLevelContainer
|
||||||
)
|
)
|
||||||
import Config.Helpers.Viewport exposing (resetViewport)
|
import Config.Helpers.Viewport exposing (resetViewport)
|
||||||
|
|
@ -163,28 +164,30 @@ homePage device image =
|
||||||
, centerY
|
, centerY
|
||||||
, E.spacing 20
|
, E.spacing 20
|
||||||
, E.width (E.fill |> minimum 100)
|
, 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
|
[ el
|
||||||
[ centerX
|
[ centerX
|
||||||
, E.width <|
|
, E.width <|
|
||||||
px <|
|
px <|
|
||||||
case device.class of
|
deviceLogic
|
||||||
Desktop ->
|
{ desktop = 675
|
||||||
675
|
, bigDesktop = 675
|
||||||
|
, tablet = 300
|
||||||
BigDesktop ->
|
, phone = 150
|
||||||
675
|
}
|
||||||
|
device
|
||||||
Tablet ->
|
|
||||||
case device.orientation of
|
|
||||||
_ ->
|
|
||||||
300
|
|
||||||
|
|
||||||
Phone ->
|
|
||||||
case device.orientation of
|
|
||||||
_ ->
|
|
||||||
150
|
|
||||||
]
|
]
|
||||||
<|
|
<|
|
||||||
html image
|
html image
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue