File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ <h5 class="modal-title"></h5><button type="button"
3535 < h1 class ="display-3 mb-0 "> RSS агрегатор</ h1 >
3636 < p class ="lead "> Начните читать RSS сегодня! Это легко, это красиво.
3737 </ p >
38- < form action ="" class ="rss-form text-body ">
38+ < form action ="" id =" rss-form " class ="rss-form text-body ">
3939 < div class ="row ">
4040 < div class ="col ">
4141 < div class ="form-floating "> < input id ="url-input " autofocus =""
@@ -44,7 +44,7 @@ <h1 class="display-3 mb-0">RSS агрегатор</h1>
4444 autocomplete ="off "> < label for ="url-input "> Ссылка
4545 RSS</ label > </ div >
4646 </ div >
47- < div class ="col-auto "> < button type ="submit " aria-label ="add "
47+ < div class ="col-auto "> < button id =" add-feed-btn " type ="submit " aria-label ="add "
4848 class ="h-100 btn btn-lg btn-primary px-sm-5 "> Добавить</ button >
4949 </ div >
5050 </ div >
Original file line number Diff line number Diff line change 1+ import { updateInputValue , addRssFeed } from "./model" ;
2+
3+ const input = document . querySelector ( "#url-input" ) ;
4+ const form = document . querySelector ( "#rss-form" ) ;
5+
6+ input . addEventListener ( 'input' , ( e ) => {
7+ updateInputValue ( e . target . value ) ;
8+ } ) ;
9+
10+ form . addEventListener ( 'submit' , ( e ) => {
11+ e . preventDefault ( ) ;
12+ addRssFeed ( ) ;
13+ } ) ;
14+
15+
16+
17+
18+
19+
You can’t perform that action at this time.
0 commit comments