@@ -102,43 +102,43 @@ model with
102102 } ;
103103
104104 private static Node ArticleMeta ( Conduit . Page . Home . Article article , bool showEditDelete = false ) =>
105- div ( [ @class ( "article-meta" ) ] , [ a ( [ href ( $ "/profile/{ article . Author . Username } ") ] , [
105+ div ( [ class_ ( "article-meta" ) ] , [ a ( [ href ( $ "/profile/{ article . Author . Username } ") ] , [
106106 img ( [ src ( article . Author . Image ) ] )
107- ] ) , div ( [ @class ( "info" ) ] , [
107+ ] ) , div ( [ class_ ( "info" ) ] , [
108108 a ( [ href ( $ "/profile/{ article . Author . Username } ") ] , [
109109 text ( article . Author . Username )
110110 ] ) ,
111- span ( [ @class ( "date" ) ] , [ text ( article . CreatedAt ) ] )
111+ span ( [ class_ ( "date" ) ] , [ text ( article . CreatedAt ) ] )
112112 ] ) ,
113113 showEditDelete
114- ? div ( [ ] , [ a ( [ @class ( "btn btn-outline-secondary btn-sm" ) ,
114+ ? div ( [ ] , [ a ( [ class_ ( "btn btn-outline-secondary btn-sm" ) ,
115115 href ( $ "/editor/{ article . Slug } ") ] ,
116116 [
117- i ( [ @class ( "ion-edit" ) ] , [ ] ) ,
117+ i ( [ class_ ( "ion-edit" ) ] , [ ] ) ,
118118 text ( " Edit Article" )
119- ] ) , button ( [ @class ( "btn btn-outline-danger btn-sm" ) ,
119+ ] ) , button ( [ class_ ( "btn btn-outline-danger btn-sm" ) ,
120120 onclick ( new Message . DeleteArticle ( ) ) ] ,
121121 [
122- i ( [ @class ( "ion-trash-a" ) ] , [ ] ) ,
122+ i ( [ class_ ( "ion-trash-a" ) ] , [ ] ) ,
123123 text ( " Delete Article" )
124124 ] )
125125 ] )
126- : div ( [ ] , [ button ( [ @class ( article . Author . Following
126+ : div ( [ ] , [ button ( [ class_ ( article . Author . Following
127127 ? "btn btn-sm btn-secondary"
128128 : "btn btn-sm btn-outline-secondary" ) ,
129129 onclick ( new Message . ToggleFollow ( ) ) ] ,
130130 [
131- i ( [ @class ( "ion-plus-round" ) ] , [ ] ) ,
131+ i ( [ class_ ( "ion-plus-round" ) ] , [ ] ) ,
132132 text ( article . Author . Following
133133 ? $ " Unfollow { article . Author . Username } "
134134 : $ " Follow { article . Author . Username } ")
135135 ] ) ,
136- text ( " " ) , button ( [ @class ( article . Favorited
136+ text ( " " ) , button ( [ class_ ( article . Favorited
137137 ? "btn btn-sm btn-primary"
138138 : "btn btn-sm btn-outline-primary" ) ,
139139 onclick ( new Message . ToggleFavorite ( ) ) ] ,
140140 [
141- i ( [ @class ( "ion-heart" ) ] , [ ] ) ,
141+ i ( [ class_ ( "ion-heart" ) ] , [ ] ) ,
142142 text ( article . Favorited
143143 ? $ " Unfavorite Article ({ article . FavoritesCount } )"
144144 : $ " Favorite Article ({ article . FavoritesCount } )")
@@ -147,75 +147,75 @@ private static Node ArticleMeta(Conduit.Page.Home.Article article, bool showEdit
147147 ] ) ;
148148
149149 private static Node ArticleBanner ( Conduit . Page . Home . Article article , bool isAuthor ) =>
150- div ( [ @class ( "banner" ) ] , [
151- div ( [ @class ( "container" ) ] , [
150+ div ( [ class_ ( "banner" ) ] , [
151+ div ( [ class_ ( "container" ) ] , [
152152 h1 ( [ ] , [ text ( article . Title ) ] ) ,
153153 ArticleMeta ( article , isAuthor )
154154 ] )
155155 ] ) ;
156156
157157 private static Node ArticleContent ( Conduit . Page . Home . Article article ) =>
158- div ( [ @class ( "row article-content" ) ] , [
159- div ( [ @class ( "col-md-12" ) ] , [
160- p ( [ ] , [ text ( article . Body ) ] ) , ul ( [ @class ( "tag-list" ) ] ,
158+ div ( [ class_ ( "row article-content" ) ] , [
159+ div ( [ class_ ( "col-md-12" ) ] , [
160+ p ( [ ] , [ text ( article . Body ) ] ) , ul ( [ class_ ( "tag-list" ) ] ,
161161 article . TagList . ConvertAll ( tag =>
162- li ( [ @class ( "tag-default tag-pill tag-outline" ) ] , [ text ( tag ) ] )
162+ li ( [ class_ ( "tag-default tag-pill tag-outline" ) ] , [ text ( tag ) ] )
163163 ) . ToArray ( )
164164 )
165165 ] )
166166 ] ) ;
167167
168168 private static Node CommentForm ( Model model , User ? currentUser ) =>
169169 currentUser == null
170- ? div ( [ @class ( "row" ) ] , [
171- div ( [ @class ( "col-xs-12 col-md-8 offset-md-2" ) ] , [
170+ ? div ( [ class_ ( "row" ) ] , [
171+ div ( [ class_ ( "col-xs-12 col-md-8 offset-md-2" ) ] , [
172172 p ( [ ] , [ a ( [ href ( "/login" ) ] , [ text ( "Sign in" ) ] ) ,
173173 text ( " or " ) ,
174174 a ( [ href ( "/register" ) ] , [ text ( "sign up" ) ] ) ,
175175 text ( " to add comments on this article." )
176176 ] )
177177 ] )
178178 ] )
179- : form ( [ @class ( "card comment-form" ) ] , [
180- div ( [ @class ( "card-block" ) ] , [ textarea ( [ @class ( "form-control" ) ,
179+ : form ( [ class_ ( "card comment-form" ) ] , [
180+ div ( [ class_ ( "card-block" ) ] , [ textarea ( [ class_ ( "form-control" ) ,
181181 placeholder ( "Write a comment..." ) ,
182182 rows ( "3" ) ,
183183 value ( model . CommentInput ) ,
184184 oninput ( new Message . CommentInputChanged ( model . CommentInput ) ) ] ,
185185 [ ]
186186 )
187187 ] ) ,
188- div ( [ @class ( "card-footer" ) ] , [ img ( [ @class ( "comment-author-img" ) , src ( "" ) ] ) , button ( [ @class ( "btn btn-sm btn-primary" ) ,
188+ div ( [ class_ ( "card-footer" ) ] , [ img ( [ class_ ( "comment-author-img" ) , src ( "" ) ] ) , button ( [ class_ ( "btn btn-sm btn-primary" ) ,
189189 disabled ( ( string . IsNullOrWhiteSpace ( model . CommentInput ) || model . SubmittingComment ) . ToString ( ) ) ,
190190 onclick ( new Message . SubmitComment ( ) ) ] ,
191191 [ text ( "Post Comment" ) ] )
192192 ] )
193193 ] ) ;
194194
195195 private static Node CommentCard ( Comment comment , User ? currentUser ) =>
196- div ( [ @class ( "card" ) ] , [
197- div ( [ @class ( "card-block" ) ] , [
198- p ( [ @class ( "card-text" ) ] , [ text ( comment . Body ) ] )
196+ div ( [ class_ ( "card" ) ] , [
197+ div ( [ class_ ( "card-block" ) ] , [
198+ p ( [ class_ ( "card-text" ) ] , [ text ( comment . Body ) ] )
199199 ] ) ,
200- div ( [ @class ( "card-footer" ) ] , [ a ( [ @class ( "comment-author" ) , href ( $ "/profile/{ comment . Author . Username } ") ] , [
201- img ( [ @class ( "comment-author-img" ) , src ( comment . Author . Image ) ] )
200+ div ( [ class_ ( "card-footer" ) ] , [ a ( [ class_ ( "comment-author" ) , href ( $ "/profile/{ comment . Author . Username } ") ] , [
201+ img ( [ class_ ( "comment-author-img" ) , src ( comment . Author . Image ) ] )
202202 ] ) ,
203203 text ( " " ) ,
204- a ( [ @class ( "comment-author" ) , href ( $ "/profile/{ comment . Author . Username } ") ] , [
204+ a ( [ class_ ( "comment-author" ) , href ( $ "/profile/{ comment . Author . Username } ") ] , [
205205 text ( comment . Author . Username )
206206 ] ) ,
207- span ( [ @class ( "date-posted" ) ] , [ text ( comment . CreatedAt ) ] ) ,
207+ span ( [ class_ ( "date-posted" ) ] , [ text ( comment . CreatedAt ) ] ) ,
208208 comment . Author . Username == ( currentUser ? . Username . Value ?? "" )
209- ? span ( [ @class ( "mod-options" ) ] , [ i ( [ @class ( "ion-trash-a" ) ,
209+ ? span ( [ class_ ( "mod-options" ) ] , [ i ( [ class_ ( "ion-trash-a" ) ,
210210 onclick ( new Message . DeleteComment ( comment . Id ) ) ] , [ ] )
211211 ] )
212212 : text ( "" )
213213 ] )
214214 ] ) ;
215215
216216 private static Node CommentSection ( Model model , User ? currentUser ) =>
217- div ( [ @class ( "row" ) ] , [
218- div ( [ @class ( "col-xs-12 col-md-8 offset-md-2" ) ] , [
217+ div ( [ class_ ( "row" ) ] , [
218+ div ( [ class_ ( "col-xs-12 col-md-8 offset-md-2" ) ] , [
219219 CommentForm ( model , currentUser ) ,
220220 ..( model . Comments ? . ConvertAll ( c => CommentCard ( c , currentUser ) ) ??
221221 new List < Node > { text ( "Loading comments..." ) } )
@@ -224,19 +224,19 @@ private static Node CommentSection(Model model, User? currentUser) =>
224224
225225 public static Node View ( Model model ) =>
226226 model . IsLoading || model . Article == null
227- ? div ( [ @class ( "article-page" ) ] , [
228- div ( [ @class ( "container" ) ] , [
229- div ( [ @class ( "row" ) ] , [
230- div ( [ @class ( "col-md-10 offset-md-1" ) ] , [
227+ ? div ( [ class_ ( "article-page" ) ] , [
228+ div ( [ class_ ( "container" ) ] , [
229+ div ( [ class_ ( "row" ) ] , [
230+ div ( [ class_ ( "col-md-10 offset-md-1" ) ] , [
231231 text ( "Loading article..." )
232232 ] )
233233 ] )
234234 ] )
235235 ] )
236- : div ( [ @class ( "article-page" ) ] , [
237- ArticleBanner ( model . Article , false ) , div ( [ @class ( "container page" ) ] , [ div ( [ ] , [ ArticleContent ( model . Article ) ] ) ,
238- hr ( [ @class ( "hr" ) ] ) ,
239- div ( [ @class ( "article-actions" ) ] , [
236+ : div ( [ class_ ( "article-page" ) ] , [
237+ ArticleBanner ( model . Article , false ) , div ( [ class_ ( "container page" ) ] , [ div ( [ ] , [ ArticleContent ( model . Article ) ] ) ,
238+ hr ( [ class_ ( "hr" ) ] ) ,
239+ div ( [ class_ ( "article-actions" ) ] , [
240240 ArticleMeta ( model . Article , false )
241241 ] ) ,
242242 CommentSection ( model , null )
0 commit comments