Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions SUBMISSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Use this md to tell us the bugs you solved and also explain the approach you had while solving them. Make them bulleted like

1. Accessibility - **Something here**
2. Aesthetics - **Something here**
3. Testing - **Something here**
4. Technicality Improvements - **Something here**
1. Accessibility - No Improvement
2. Aesthetics - No Improvement
3. Testing - No Improvement
4. Technicality Improvements - Makes Feeds Dynamic using api. Chages the app.js fetch Feed Section and added 10 feeds in feed class
14 changes: 9 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,18 @@ function loadFeed(id, cb) {
rss_url: 'http://feeds.feedburner.com/CssTricks'
},
success: function (result, status) {
if (cb) {
cb( /*something*/ );
if(status == "success"){
var feedData = result.items;
$.each(feedData,function(index,feedData){
$('.feed').append('<a class="entry-link" href=' + feedData.link + '> <article class="entry"><h2>' + feedData.title +'</h2><p>'+ feedData.author +'</p></article></a>');
});
}
},
error: function (result, status, err) {
//run only the callback without attempting to parse result due to error
if (cb) {
cb();
if (status) {
console.log(err);
$('.feed').append('<center>Something Went Wrong<center/>');
}
},
dataType: "json"
Expand All @@ -55,7 +59,7 @@ $(function () {

feedList.on('click', function () {
var item = $(this);
$('body').addClass( /*A class here*/ );
$('body').addClass('.feed');
loadFeed(item.data('id'));
return false;
});
Expand Down
72 changes: 1 addition & 71 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,77 +25,7 @@ <h1 class="header-title" aria-describedby="The heading of the present feed">Feed
<ul class="feed-list"></ul>
</div>

<div class="feed">
<a class="entry-link" href="https://css-tricks.com/the-magic-of-react-based-multi-step-forms/">
<article class="entry">
<h2>The Magic of React-Based Multi-Step Forms</h2>
<p>Nathan Sebhastian</p>
</article>
</a>

<a class="entry-link" href="https://medium.com/@sachagreif/announcing-the-state-of-css-2019-survey-e1e4268df64d">
<article class="entry">
<h2>The #StateOfCSS 2019 Survey</h2>
<p>Geoff Graham</p>
</article>
</a>

<a class="entry-link" href="https://css-tricks.com/getting-to-grips-with-the-airtable-api/">
<article class="entry">
<h2>Getting to Grips with the Airtable API</h2>
<p>Robin Rendle</p>
</article>
</a>

<a class="entry-link" href="https://synd.co/2GemPNV">
<article class="entry">
<h2>Use monday.com to manage and share projects all in one place</h2>
<p>Geoff Graham</p>
</article>
</a>

<a class="entry-link" href="https://css-tricks.com/the-smart-ways-to-correct-mistakes-in-git/">
<article class="entry">
<h2>The Smart Ways to Correct Mistakes in Git</h2>
<p>Tobias Günther</p>
</article>
</a>

<a class="entry-link" href="https://cloudinary.com/blog/a_chaotic_good_guide_to_image_performance_part_1">
<article class="entry">
<h2>“the closest thing web standards have to a golden rule”</h2>
<p>Chris Coyier</p>
</article>
</a>

<a class="entry-link" href="https://css-tricks.com/%e2%80%8b%e2%80%8bavoiding-those-dang-cannot-read-property-of-undefined-errors/">
<article class="entry">
<h2>​​Avoiding those dang cannot read property of undefined errors</h2>
<p>Adam Giese</p>
</article>
</a>

<a class="entry-link" href="https://css-tricks.com/a-site-for-front-end-development-conferences-built-with-11ty-on-netlify/">
<article class="entry">
<h2>A Site for Front-End Development Conferences (Built with 11ty on Netlify)</h2>
<p>Chris Coyier</p>
</article>
</a>

<a class="entry-link" href="https://css-tricks.com/quick-whats-the-difference-between-flexbox-and-grid/">
<article class="entry">
<h2>Quick! What’s the Difference Between Flexbox and Grid?</h2>
<p>Chris Coyier</p>
</article>
</a>

<a class="entry-link" href="https://css-tricks.com/a-funny-thing-happened-on-the-way-to-the-javascript/">
<article class="entry">
<h2>A Funny Thing Happened on the Way to the JavaScript</h2>
<p>Jason Rodriguez</p>
</article>
</a>
</div>
<div class="feed"></div>

<script class="tpl-feed-list-item" type="text/x-handlebars-template">
<li>
Expand Down
2 changes: 2 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,6 @@ h2 {
border-bottom: 1px solid #ddd;
padding: 1em;
margin: 0.5em 0;
transform: translate3d(12em, 0, 0);
transition: transform 0.2s;
}