website/frontend/src/Pages/Platforms.elm

226 lines
10 KiB
Elm
Raw Normal View History

2024-11-11 03:57:54 -06:00
module Pages.Platforms exposing (Model, Msg, page)
2024-11-11 00:43:03 -06:00
import Config.Identity as ID exposing (..)
import Config.Theme as T exposing (..)
2024-11-11 03:57:54 -06:00
import Effect exposing (Effect)
2024-11-11 00:43:03 -06:00
import Element exposing (..)
import Element.Font as F
2024-11-11 03:57:54 -06:00
import Html.Attributes as H exposing (style)
import Layouts
import Page exposing (Page)
import Route exposing (Route)
import Shared
2024-11-11 00:43:03 -06:00
import View exposing (View)
2024-11-11 03:57:54 -06:00
page : Shared.Model -> Route () -> Page Model Msg
page shared route =
Page.new
{ init = init
, update = update
, subscriptions = subscriptions
, view = view
}
|> Page.withLayout toLayout
toLayout : Model -> Layouts.Layout Msg
toLayout model =
Layouts.Navbar {}
-- INIT
type alias Model =
{}
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
)
-- UPDATE
type Msg
= NoOp
update : Msg -> Model -> ( Model, Effect Msg )
update msg model =
case msg of
NoOp ->
( model
, Effect.none
)
-- SUBSCRIPTIONS
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
-- VIEW
view : Model -> View Msg
view model =
{ title = platformsName
, attributes = []
2024-11-11 00:43:03 -06:00
, element = platformsContainer
}
platformsContainer : Element msg
platformsContainer =
topLevelContainer platformsList
platformsList : Element msg
platformsList =
column
2024-11-11 18:57:51 -06:00
pageList
2024-11-11 00:43:03 -06:00
platforms
2024-11-11 03:57:54 -06:00
type alias MakeRowInput msg =
{ logoImage : String
, logoDescription : String
, platformsLink : String
, platformsTitle : String
, platformsParagraph1 : List (Element msg)
, platformsParagraph2 : List (Element msg)
, platformsRecommendedClientLink1 : String
, platformsRecommendedClientLabel1 : String
, platformsRecommendedClientText1 : String
, platformsRecommendedClientLink2 : String
, platformsRecommendedClientLabel2 : String
, platformsRecommendedClientText2 : String
, platformsRecommendedClientLink3 : String
, platformsRecommendedClientLabel3 : String
, platformsRecommendedClientText3 : String
, platformsRecommendedClientLink4 : String
, platformsRecommendedClientLabel4 : String
, platformsRecommendedClientText4 : String
}
makeRow : MakeRowInput msg -> Element msg
makeRow makeRowInput =
2024-11-11 00:43:03 -06:00
let
recommendedClients : Element msg
recommendedClients =
el [ F.bold ] (text "Recommended Clients: ")
platformImageFormat : List (Attribute msg)
platformImageFormat =
[ width <| px 150
, alignTop
]
in
2024-11-11 03:57:54 -06:00
row [ imageSpacer ]
[ image platformImageFormat
{ src = makeRowInput.logoImage
, description = makeRowInput.logoDescription
}
, column paragraphColumnFormat
2024-11-11 18:57:51 -06:00
[ newTabLink highlightedTitleFormat
2024-11-11 03:57:54 -06:00
{ url = makeRowInput.platformsLink
, label = text makeRowInput.platformsTitle
2024-11-11 00:43:03 -06:00
}
2024-11-11 03:57:54 -06:00
, paragraph paragraphFormat makeRowInput.platformsParagraph1
, paragraph paragraphFormat makeRowInput.platformsParagraph2
, paragraph paragraphFormat
[ recommendedClients
2024-11-11 18:57:51 -06:00
, paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink1, label = transitionHighlightedLinkHover <| text makeRowInput.platformsRecommendedClientLabel1 }
2024-11-11 03:57:54 -06:00
, text makeRowInput.platformsRecommendedClientText1
2024-11-11 18:57:51 -06:00
, paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink2, label = transitionHighlightedLinkHover <| text makeRowInput.platformsRecommendedClientLabel2 }
2024-11-11 03:57:54 -06:00
, text makeRowInput.platformsRecommendedClientText2
2024-11-11 18:57:51 -06:00
, paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink3, label = transitionHighlightedLinkHover <| text makeRowInput.platformsRecommendedClientLabel3 }
2024-11-11 03:57:54 -06:00
, text makeRowInput.platformsRecommendedClientText3
2024-11-11 18:57:51 -06:00
, paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink4, label = transitionHighlightedLinkHover <| text makeRowInput.platformsRecommendedClientLabel4 }
2024-11-11 03:57:54 -06:00
, text makeRowInput.platformsRecommendedClientText4
2024-11-11 00:43:03 -06:00
]
]
2024-11-11 03:57:54 -06:00
]
platforms : List (Element msg)
platforms =
List.map makeRow
2024-11-11 04:07:33 -06:00
[ { logoImage = "platforms/mastodon.png"
2024-11-11 03:57:54 -06:00
, logoDescription = "mastodon logo"
, platformsLink = "https://the-nutrivore.social/"
, platformsTitle = "MASTODON"
, platformsParagraph1 = [ text "Microblogging will now be posted to my own self-hosted Mastodon instance. I've kinda grown tired of microblogging on X, where political correctness and unclear ban policies force me to constantly self-censor. I considered and ultimately rejected several alternative platforms. Eventually, I realized the solution to this problem is to simply self-host my own spacesomewhere where I can be myself and speak as I please. And I recently obtained the necessary infrastructure to do this." ]
, platformsParagraph2 =
[ text "This instance is 100% mine, and I can't be censored or fucked with there. I invite everyone who values my content and interactions to follow me on this new platform (whether you agree with my views or not). My instance is a \"single-user\" instances, meaning I'm the only user. But you can still follow me! Just make an account on another instance, like "
, paragraphLinkFormat { url = "https://mastodon.social", label = text "Mastodon.social" }
, text " (alternatively, you can select whatever instance you wish from the "
, paragraphLinkFormat { url = "https://instances.social/", label = text "official index" }
, text "), follow me, and turn on notifications."
2024-11-11 00:43:03 -06:00
]
2024-11-11 03:57:54 -06:00
, platformsRecommendedClientLink1 = "https://github.com/LucasGGamerM/moshidon"
, platformsRecommendedClientLabel1 = "Moshidon"
, platformsRecommendedClientText1 = " (android) "
, platformsRecommendedClientLink2 = "https://github.com/mastodon/mastodon-android"
, platformsRecommendedClientLabel2 = "Official"
, platformsRecommendedClientText2 = " (android) "
, platformsRecommendedClientLink3 = "https://github.com/tuskyapp/Tusky"
, platformsRecommendedClientLabel3 = "Tusky"
, platformsRecommendedClientText3 = " (android) "
, platformsRecommendedClientLink4 = "https://apps.apple.com/us/app/mastodon/id1571998974"
, platformsRecommendedClientLabel4 = "Official"
, platformsRecommendedClientText4 = " (iOS)"
}
2024-11-11 04:07:33 -06:00
, { logoImage = "platforms/peertube.png"
2024-11-11 03:57:54 -06:00
, logoDescription = "peertube logo"
, platformsLink = "https://video.the-nutrivore.social/"
, platformsTitle = "PEERTUBE"
, platformsParagraph1 = [ text "I'm transitioning my video content from YouTube to my self-hosted PeerTube instance, because I strongly believe in freedom of speech, copyleft, and digital autonomy. YouTube has proven unreliable due to both censorship and copyright strikes levied against my channel. This shift allows me to better control my content and avoid these silly pitfalls." ]
, platformsParagraph2 = [ text "Full-length videos are now exclusively available on PeerTube, while YouTube will only host clips. By registering on PeerTube and subscribing to my channels, you'll have access to all content. Just be sure to enable email notifications to be alerted of new uploads. I believe that those who are truly fans of my work and want the best experience possible will see this as a positive change." ]
, platformsRecommendedClientLink1 = ""
, platformsRecommendedClientLabel1 = ""
, platformsRecommendedClientText1 = "Unfortunately, I can't recommend any mobile clients for PeerTube at this time. They're all trash. Please use your browser, either on your mobile device or personal computer. Just be use to enable email notifications in your account settings."
, platformsRecommendedClientLink2 = ""
, platformsRecommendedClientLabel2 = ""
, platformsRecommendedClientText2 = ""
, platformsRecommendedClientLink3 = ""
, platformsRecommendedClientLabel3 = ""
, platformsRecommendedClientText3 = ""
, platformsRecommendedClientLink4 = ""
, platformsRecommendedClientLabel4 = ""
, platformsRecommendedClientText4 = ""
}
2024-11-11 04:07:33 -06:00
, { logoImage = "platforms/discord.png"
2024-11-11 03:57:54 -06:00
, logoDescription = "discord logo"
, platformsLink = "https://discord.gg/eeYQ2wJknS"
, platformsTitle = "DISCORD"
, platformsParagraph1 = [ text "The Nutrivore Discord server is an evidence-based community dedicated to debunking pseudoscience, especially in the fields of nutrition, health and fitness. Casual discourse is welcome, and includes topics such as cooking, gaming, technology, and more. Current members span many disciplines and include both students and professionals, all levels of interest and expertise are welcome." ]
, platformsParagraph2 = [ text "The Discord server is not explicitly a debate server. However, we strongly encourage that disagreements be resolved using debate (preferably verbal), as long as it is conducted respectfully and in good faith. Though we also firmly believe that shaming sophistry and bad faith behaviour is a net good overall. The Discord server is planned to be replaced with a Matrix server in future." ]
, platformsRecommendedClientLink1 = "https://github.com/Vendicated/Vencord"
, platformsRecommendedClientLabel1 = "Vencord"
, platformsRecommendedClientText1 = " (desktop) "
, platformsRecommendedClientLink2 = "https://discord.com/download"
, platformsRecommendedClientLabel2 = "Official"
, platformsRecommendedClientText2 = " (multi-platform)"
, platformsRecommendedClientLink3 = ""
, platformsRecommendedClientLabel3 = ""
, platformsRecommendedClientText3 = ""
, platformsRecommendedClientLink4 = ""
, platformsRecommendedClientLabel4 = ""
, platformsRecommendedClientText4 = ""
}
2024-11-11 00:43:03 -06:00
]