Skip to content

Commit 3d212c9

Browse files
committed
Add services rules section
1 parent 7bab229 commit 3d212c9

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed

src/Main.elm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Route exposing (Route(..))
88
import Url exposing (Url)
99
import Views.Home as Home
1010
import Views.Rules as Rules
11+
import Views.ServicesRules as ServicesRules
1112

1213

1314
main : Program () Model Msg
@@ -103,6 +104,9 @@ view model =
103104
Rules ->
104105
Page.view Page.Rules (Rules.view { key = model.key })
105106

107+
ServicesRules ->
108+
Page.view Page.ServicesRules (ServicesRules.view { key = model.key })
109+
106110
Discord ->
107111
-- default to home, this should never happen
108112
Page.view Page.Home (Home.view { key = model.key })

src/Page.elm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Tailwind as Tw
99
type Page
1010
= Home
1111
| Rules
12+
| ServicesRules
1213

1314

1415
view : Page -> { title : String, content : Html msg } -> Document msg
@@ -28,6 +29,7 @@ navbar page =
2829
nav [ Tw.font_titillium, Tw.absolute, Tw.left_5, Tw.top_5, Tw.bg_gray_200, Tw.space_x_5, Tw.p_3, Tw.rounded_2xl, Tw.shadow_md, Tw.px_5 ]
2930
[ navbarLink page Route.Home "home"
3031
, navbarLink page Route.Rules "rules"
32+
, navbarLink page Route.ServicesRules "services rules"
3133
]
3234

3335

src/Route.elm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Url.Parser as Parser exposing ((</>), Parser, oneOf)
99
type Route
1010
= Home
1111
| Rules
12+
| ServicesRules
1213
| Discord
1314

1415

@@ -17,6 +18,7 @@ parser =
1718
oneOf
1819
[ Parser.map Home Parser.top
1920
, Parser.map Rules (Parser.s "rules")
21+
, Parser.map ServicesRules (Parser.s "services-rules")
2022
, Parser.map Discord (Parser.s "discord")
2123
]
2224

@@ -55,5 +57,8 @@ routeToPieces route =
5557
Rules ->
5658
[ "rules" ]
5759

60+
ServicesRules ->
61+
[ "services-rules" ]
62+
5863
Discord ->
5964
[ "discord" ]

src/Views/ServicesRules.elm

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
module Views.ServicesRules exposing (Model, Msg, view)
2+
3+
import Browser.Navigation as Nav
4+
import Html exposing (Html, a, b, div, h1, h2, h3, i, li, p, text, ul)
5+
import Html.Attributes exposing (class, href)
6+
import Tailwind as Tw
7+
8+
9+
type alias Model =
10+
{ key : Nav.Key
11+
}
12+
13+
14+
type alias Msg =
15+
()
16+
17+
18+
view : Model -> { title : String, content : Html Msg }
19+
view _ =
20+
{ title = "Services Rules"
21+
, content =
22+
div [ Tw.bg_opacity_80, Tw.bg_gray_700, Tw.w_full, Tw.flex_1, Tw.text_white, Tw.flex, Tw.flex_col ]
23+
[ div [ Tw.ml_16, Tw.mr_16, Tw.mb_20 ]
24+
[ h1 [ Tw.text_6xl, class "montserrat", Tw.mt_2, Tw.py_2, Tw.text_center ] [ text "Services Rules" ]
25+
, h2 [ Tw.text_2xl, Tw.py_2, Tw.font_titillium, Tw.text_center ] [ text "Rules for posting in ", inlineLink "#💰-paid-services" "https://discord.com/channels/821743100203368458/1024625154107654234", text " and ", inlineLink "🆓-free-services" "https://discord.com/channels/821743100203368458/1037763084485406760" ]
26+
, ruleHeader "Global Rules"
27+
, rulesList
28+
[ i [] [ text "In all rules, the term 'host' refers to someone offering their services and the term 'client' refers to anyone seeking the services of a host." ]
29+
, text "Only active members (Tier 3+) may create posts in these channels to reduce spam and abuse."
30+
, text "Posts should be appropriately tagged to describe the service(s)."
31+
, text "Posts should include a title concisely describing the host (if applicable) and/or the service(s)."
32+
, text "Only 1 post per service may be made per month."
33+
, text "Anyone may respond to a post (there are no activity requirements). This should be done in Direct Messages (or any other contact method described in the post), not as replies to a thread."
34+
, text "Hosts have no obligation to accept work offered by a client, and vice versa."
35+
, text "It is the host's responsibility to ensure that their clients are trustworthy."
36+
, text "Similarly, it is the client's responsibility to ensure the host is the right choice for their needs."
37+
, text "The Developer Den has no obligation to investigate or take action in the case of scams or disputes. We will attempt to do so if possible, but no action is guaranteed."
38+
, text "To request an investigation please send a message to @ModMail#5460 in the Discord Server"
39+
]
40+
, ruleHeader "Paid Services"
41+
, rulesList
42+
[ i [] [ text "These rules only apply to ", inlineLink "#💰-paid-services" "https://discord.com/channels/821743100203368458/1024625154107654234", text "." ]
43+
, div []
44+
[ text "This channel is for offering or requesting "
45+
, b [] [ text "paid" ]
46+
, text " services."
47+
]
48+
, text "Posts must include a price / maximum budget, which should be in $USD."
49+
, text "Budgets / payments must be a concrete amount, not something like \"10% of profits\"."
50+
, text "The Developer Den's only role is as a platform for finding clients / hosts. We do not act as a middleman for any funds except in exceptional circumstances."
51+
]
52+
, ruleHeader "Free Services"
53+
, rulesList
54+
[ i [] [ text "These rules only apply to ", inlineLink "🆓-free-services" "https://discord.com/channels/821743100203368458/1037763084485406760", text "." ]
55+
, div []
56+
[ text "This channel is only for "
57+
, b [] [ text "offering" ]
58+
, text " free services. To reduce spam, free requests are not allowed"
59+
]
60+
, text "Hosts or clients from this channel must not request any money for work. Optional donations are permitted, but they must be optional."
61+
, text "As work in this channel is free, scams are far less likely. However, to request an investigation please DM @ModMail#5460 in the Discord Server"
62+
]
63+
]
64+
]
65+
}
66+
67+
68+
ruleHeader body =
69+
h3 [ class "montserrat", Tw.text_2xl, Tw.py_2, Tw.mt_2 ] [ text body ]
70+
71+
72+
rulesList : List (Html Msg) -> Html Msg
73+
rulesList rules =
74+
ul [ Tw.space_y_1, Tw.list_disc ] (List.map (ruleLine << List.singleton) rules)
75+
76+
77+
ruleLine : List (Html Msg) -> Html Msg
78+
ruleLine text =
79+
li [ Tw.ml_8 ] [ p [ Tw.font_titillium, Tw.text_lg ] text ]
80+
81+
82+
inlineLink : String -> String -> Html Msg
83+
inlineLink val link =
84+
a [ Tw.text_indigo_300, Tw.underline, Tw.hover__text_blue_500, Tw.duration_300, Tw.ease_in_out, href link ] [ text val ]

0 commit comments

Comments
 (0)