File tree 2 files changed +42
-4
lines changed
2 files changed +42
-4
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE HTML>
2
+ < html >
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1, shrink-to-fit=no ">
6
+
7
+ < title > Hello Elm!</ title >
8
+
9
+ < link rel ="stylesheet " href ="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css " integrity ="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh " crossorigin ="anonymous ">
10
+ < script src ="main.js "> </ script >
11
+ </ head >
12
+ < body >
13
+ < script > var app = Elm . Main . init ( ) ; </ script >
14
+ </ body >
15
+ </ html >
Original file line number Diff line number Diff line change @@ -81,9 +81,33 @@ view : Model -> Browser.Document Msg
81
81
view model =
82
82
{ title = " URL Interceptor"
83
83
, body =
84
- [ text " The current URL is: "
85
- , b [] [ text ( Url . toString model. url) ]
86
- , ul []
84
+ pageContainer
85
+ [ mainHeader model
86
+ , mainContents
87
+ ]
88
+ }
89
+
90
+
91
+ pageContainer : List (Html Msg ) -> List (Html Msg )
92
+ pageContainer contents =
93
+ [ div [ class " container" ] contents ]
94
+
95
+
96
+ mainHeader : Model -> Html Msg
97
+ mainHeader model =
98
+ header []
99
+ [ h1 [] [ text " URL Interceptor" ]
100
+ , p []
101
+ [ text " The current URL is: "
102
+ , b [] [ text ( Url . toString model. url) ]
103
+ ]
104
+ ]
105
+
106
+
107
+ mainContents : Html Msg
108
+ mainContents =
109
+ main_ []
110
+ [ ul []
87
111
[ viewLink " /home"
88
112
, viewLink " /profile"
89
113
, viewLink " /reviews/the-century-of-the-self"
@@ -92,7 +116,6 @@ view model =
92
116
, viewLink " https://example.com/"
93
117
]
94
118
]
95
- }
96
119
97
120
98
121
viewLink : String -> Html Msg
You can’t perform that action at this time.
0 commit comments