css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <link rel="stylesheet" href="https://unpkg.com/qiita-widget@0.4.2/dist/style.css">

<!-- Widget挿入位置 -->
<section class="qiita-widget js-qiita-widget">
  <header class="qiita-widget__header qiita-user js-qiita-user"></header>
  <section class="qiita-widget__articles">
    <h2 class="qiita-widget__articles-head transition transition--s4"><span class="transition__inner js-subject"></span>
    <ul class="qiita-article-list js-qiita-article"></ul>
<!-- Widget挿入位置 -->

<!-- HTMLテンプレート -->
<template id="qiita-user-tpl">
  <p class="qiita-user__image transition transition--s1"><img class="qiita-user__img js-profile-image-url transition__inner" src="" alt="" /></p>

  <div class="qiita-user__title">
    <a class="qiita-user__url js-url transition transition--s2" target="_blank"><h1 class="qiita-user__id js-id transition__inner"></h1></a>

    <p class="qiita-user__items transition transition--s3">
      <span class="qiita-user__items-num js-items-count transition__inner"></span>
      <span class="qiita-user__items-unit transition__inner">Items</span>

    <p class="qiita-user__likes transition transition--s3">
      <span class="qiita-user__likes-num js-likes-count transition__inner"></span>
      <span class="qiita-user__likes-unit transition__inner">Contribution</span>


<template id="qiita-article-tpl">
  <li class="qiita-article-list__item transition transition--s5">
    <a class="qiita-article js-url transition transition__inner" target="_blank">
      <h3 class="qiita-article__title js-title"></h3>
<!-- HTMLテンプレート -->

<script src="https://unpkg.com/qiita-widget@0.4.2/dist/lib.bundled.js"></script>

              // already reseted by reset.css

.qiita-widget {
  border: 1px solid #ddd;
  padding: 1em;
  margin: 1em;
  width: 320px;
              const container = document.querySelector('.js-qiita-widget');
new QiitaWidget(container, {
  // 見出し
  subject: '人気の記事',
  // QiitaのユーザーID
  userId: 'qiita',
  // trueで表示記事をランダムに選択する
  useShuffle: false,
  // trueで投稿を「いいね」数順でソートする
  sortByLike: true,
  // trueでロード直後のアニメーションを表示
  useTransition: true,
  // 表示する記事の最低いいね数(0でフィルタ無効)
  filterByLikesFrom: 0,
  // 最終的に表示する記事の件数
  maxToShow: 5,
  // JSONレスポンスのキャッシュ有効時間(ミリ秒)
  cacheAge: 15 * 60 * 1000,
  // 一度のリクエストで取得する記事数(1〜100)
  perPage: 100,
  // perPage * maxRequest = 取得を試みる最大記事件数 
  maxRequest: 10
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................