diff --git a/src/elm/DappInterface/CommonViews.elm b/src/elm/DappInterface/CommonViews.elm index 371f3a4..3796d2f 100644 --- a/src/elm/DappInterface/CommonViews.elm +++ b/src/elm/DappInterface/CommonViews.elm @@ -179,11 +179,13 @@ pageHeader userLanguage page connectedWallet account _ governanceState _ = v2MarketsExternalLink = "https://app.compound.finance/markets?market=v2" v3VoteExternalLink = "https://app.compound.finance/vote" swapLink = "https://swap.harmony.one" + getOneLink = "/#getone" in [ a (class homeClass :: href PageNavigation (getHrefUrl Home)) [ text (Translations.dashboard userLanguage) ] -- , a (href External (v2MarketsExternalLink)) [ text (Translations.markets userLanguage) ] -- , a (href External (v3VoteExternalLink)) [ text (Translations.vote userLanguage) ] , a ([target "_blank"] ++ href External swapLink) [text ("Swap")] + , a ([target "_self"] ++ href External getOneLink) [text ("Get ONE")] ] in header [ class "dapp" ] diff --git a/src/elm/DappInterface/GetOne.elm b/src/elm/DappInterface/GetOne.elm new file mode 100644 index 0000000..c39b2cc --- /dev/null +++ b/src/elm/DappInterface/GetOne.elm @@ -0,0 +1,21 @@ +module DappInterface.GetOne exposing (view) + +import CompoundComponents.Utils.CompoundHtmlAttributes exposing (HrefLinkType(..), class, href, id, type_) +import Html exposing (Html, a, b, div, h2, h4, label, li, ol, p, section, span, text, u, iframe) +import Html.Attributes exposing (name, width, height, src) +import Strings.Terms as Terms +import Strings.Translations as Translations + + +view : Translations.Lang -> Html msg +view userLanguage = + div [ id "getone", class "exchange-container" ] + [ + iframe [ + id "simpleswap-frame" + ,name "SimpleSwap Widget" + ,width 528 + ,height 600 + ,src "https://simpleswap.io/widget/62d3bc7d-58e0-4815-87da-36fa3bd878ac" + ] [] + ] diff --git a/src/elm/DappInterface/Page.elm b/src/elm/DappInterface/Page.elm index c26cc73..b51d3fd 100644 --- a/src/elm/DappInterface/Page.elm +++ b/src/elm/DappInterface/Page.elm @@ -13,6 +13,7 @@ type Page | CrowdPropose | TermsOfService | Vote + | GetOne buildTitle : Translations.Lang -> Maybe String -> String @@ -49,6 +50,9 @@ getPageTitle userLanguage page = Vote -> buildTitle userLanguage (Just (Translations.site_title_vote userLanguage)) + GetOne -> + buildTitle userLanguage (Just (Translations.site_title_v2 userLanguage)) + getHrefUrl : Page -> String getHrefUrl page = @@ -74,6 +78,9 @@ getHrefUrl page = Vote -> "#vote" + GetOne -> + "#getone" + getPage : Url.Url -> Page getPage location = @@ -85,6 +92,9 @@ getPage location = Just [ "admin" ] -> Admin + Just [ "getone" ] -> + GetOne + Just [ "liquidate" ] -> Home diff --git a/src/elm/Main.elm b/src/elm/Main.elm index 130c3ea..4dd5a7e 100644 --- a/src/elm/Main.elm +++ b/src/elm/Main.elm @@ -26,6 +26,7 @@ import DappInterface.Page exposing (Page(..), getPage, getPageTitle) import DappInterface.PrimaryActionModal import DappInterface.Propose as Propose import DappInterface.Terms as DappTerms +import DappInterface.GetOne as GetOne import DappInterface.Vote as Vote import Decimal exposing (Decimal) import Dict exposing (Dict) @@ -1195,6 +1196,13 @@ viewFull ({ page, liquidateModel, transactionState, compoundState, tokenState, o , replFooter ] + GetOne -> + [ header + , GetOne.view userLanguage + , footer + , replFooter + ] + Vote -> [ alertView model , header diff --git a/src/scss/main.scss b/src/scss/main.scss index 3bba211..fa46a7b 100644 --- a/src/scss/main.scss +++ b/src/scss/main.scss @@ -950,6 +950,22 @@ body { margin: 0 0; } +.exchange-container { + width: 100%; + height: 100%; + border: none !important; + display: flex; + justify-content: center; + align-items: center; + + iframe { + margin-top: 100px; + border: none !important; + width: 528px; + height: 600px; + } +} + @media (max-width: $device-sm) { .mobile-hide { display: none;