_feed

In this example below you will see how to do a _feed with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by yoko0180, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright yoko0180 ©

Technologies

  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>_feed</title>
  
  
  <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'>

      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div class="container ">
  <div id="example" class="row col-md-12">
    <table class="table">
      <tr v-for="row in rows">
        <td v-for="col in cols">
          <input type="text" v-model="row[col]" class="n"/>
        </td>
      </tr>
    </table>
  </div>
</div>
  <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://cdn.jsdelivr.net/vue/1.0.16/vue.min.js'></script>
<script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script>

  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/yoko0180/_feed-aBBxWm */
*{
  font-size:24px;
}
.n{
  width:90px
}

/*Downloaded from https://www.codeseek.co/yoko0180/_feed-aBBxWm */
var app = new Vue({
  el: '#example',
  data: {
    rows:[{id:1, name:'foo'}, {id:2, name:'baa'}],
    cols:['id', 'name'],
  },
  ready:function(){
    console.log('--- start ---')
    
    var FEED_URL = 'https://b.hatena.ne.jp/entrylist?sort=hot&threshold=&mode=rss'
    $.get(FEED_URL, function (data) {
      console.log(data)
        $(data).find("entry").each(function () { // or "item"
            var el = $(this);
              console.log(el.find("link").text());
              console.log(el.find("title").text());
        });
    });
  },  
  methods: {

  },
})

Comments