File tree Expand file tree Collapse file tree 5 files changed +71
-1
lines changed Expand file tree Collapse file tree 5 files changed +71
-1
lines changed Original file line number Diff line number Diff line change 11FreeCodeCamp Python Curriculum
2+ https://freecodecamp.github.io/python-coding-challenges
23=============
34
45To run locally:
Original file line number Diff line number Diff line change 6060 < i class ="fa fa-refresh "> </ i >
6161 </ button >
6262
63- < button id ="map-button " class ="btn ">
63+ < button id ="map-button " class ="btn " onclick =" toggleMap() " >
6464 Map
6565 < i class ="fa fa-list "> </ i >
6666 </ button >
6969
7070 </ div >
7171
72+ < div id ="map " class ="map ">
73+ < a href ="javascript:void(0) " class ="close-map " onclick ="toggleMap() "> ×</ a >
74+ < div class ="challenge-list ">
75+ < a href ="# " onclick ="loadChallengeFromMap('a') "> Addition</ a >
76+ < a href ="# " onclick ="loadChallengeFromMap('b') "> Subtraction</ a >
77+ < a href ="# " onclick ="loadChallengeFromMap('c') "> Dummy 1</ a >
78+ < a href ="# " onclick ="loadChallengeFromMap('d') "> Dummy 2</ a >
79+ </ div >
80+ </ div >
81+
7282 < script src ="load-challenges.js "> </ script >
83+ < script src ="map.js "> </ script >
7384</ body >
7485</ html >
Original file line number Diff line number Diff line change @@ -101,6 +101,16 @@ function startLoadChallenge() {
101101 if ( ! foundIncomplete ) courseComplete ( challenges , challenges . length - 1 ) ;
102102}
103103
104+ function loadChallengeFromMap ( id ) {
105+ const challenges = getChallengeList ( ) ;
106+ for ( const i in challenges ) {
107+ let c = challenges [ i ] ;
108+ if ( c . id === id ) {
109+ loadChallenge ( challenges , i ) ;
110+ }
111+ }
112+ }
113+
104114( ( ) => {
105115 if ( localStorage . getItem ( 'fcc-python-challenges' ) ) {
106116 startLoadChallenge ( ) ;
Original file line number Diff line number Diff line change 1+ function toggleMap ( ) {
2+ const mapRef = document . getElementById ( "map" ) ;
3+ const currentWidth = mapRef . style . width ;
4+ mapRef . style . width = currentWidth === "250px" ? "0" : "250px" ;
5+ }
Original file line number Diff line number Diff line change @@ -172,3 +172,46 @@ h2 {
172172 cursor : pointer;
173173 text-decoration : underline;
174174}
175+
176+ .map {
177+ height : 100% ;
178+ width : 0 ;
179+ position : fixed;
180+ z-index : 1 ;
181+ top : 0 ;
182+ right : 0 ;
183+ background-color : # eee ;
184+ overflow-x : hidden;
185+ padding-top : 60px ;
186+ transition : 0.5s ;
187+ }
188+
189+ .map a {
190+ padding : 8px 8px 8px 32px ;
191+ text-decoration : none;
192+ font-size : 25px ;
193+ color : # 818181 ;
194+ display : block;
195+ transition : 0.3s ;
196+ }
197+
198+ .map a : hover , .offcanvas a : focus {
199+ color : # 006400 ;
200+ }
201+
202+ .map .close-map {
203+ position : absolute;
204+ top : 0 ;
205+ right : 25px ;
206+ font-size : 36px ;
207+ margin-left : 50px ;
208+ }
209+
210+ @media screen and (max-height : 450px ) {
211+ .map {padding-top : 15px ;}
212+ .map a {font-size : 18px ;}
213+ }
214+
215+ .challenge-list {
216+ border-top : 2px solid # 006400 ;
217+ }
You can’t perform that action at this time.
0 commit comments