CoolFace
Datasetpublic

SALT-NLP/Design2Code

This dataset consists of 484 webpages from the C4 validation set, serving the purpose of testing multimodal LLMs on converting visual designs into code implementations. Each example is a pair of source HTML and screenshot ({id}.html and {id}.png). See the dataset in the huggingface format here. Note that all images in these webpages are replaced by a placeholder image (rick.jpg) Please refer to our project page and our paper for more information. Example Usage For example, you… See the full description on the dataset page: https://huggingface.co/datasets/SALT-NLP/Design2Code.

sourceHugging Faceodc-byupdated 3y agoView on Hugging Face
22likes1.8kdownloads
12427.html898 linesDownload Raw Back to root
1<!DOCTYPE html>2<html lang="en">3 <head>4  <style>5   /* Source: https://github.com/huangyz0918/moving */6@charset "UTF-8";7/**8 * Reset some basic elements9 */10body,11h1,12h2,13h3,14h4,15h5,16h6,17p,18blockquote,19pre,20hr,21dl,22dd,23ol,24ul,25figure {26  margin: 0;27  padding: 0;28}29 30/**31  * Basic styling32  */33body {34  font: 400 15.3px/1.6 "Bitter", "Times New Roman", "FangSong", "仿宋", STFangSong, "华文仿宋", serif;35  color: #111;36  background-color: #fdfdfd;37  -webkit-text-size-adjust: 100%;38  -webkit-font-feature-settings: "kern" 1;39  -moz-font-feature-settings: "kern" 1;40  -o-font-feature-settings: "kern" 1;41  font-feature-settings: "kern" 1;42  font-kerning: normal;43  display: flex;44  min-height: 100vh;45  flex-direction: column;46  padding: 0 2%;47}48@media screen and (min-width: 600px) {49  body {50    padding: 0 5%;51    font: 400 18px/1.8 "Bitter", "Times New Roman", "FangSong", "仿宋", STFangSong, "华文仿宋", serif;52  }53}54 55/**56  * Set `margin-bottom` to maintain vertical rhythm57  */58h1,59h2,60h3,61h4,62h5,63h6,64p,65blockquote,66pre,67ul,68ol,69dl,70figure {71  margin-bottom: 15px;72}73 74/**75  * `main` element76  */77main {78  display: block;79  /* Default value of `display` of `main` element is 'inline' in IE 11. */80}81 82/**83  * Divider84  */85hr {86  margin-top: 20px;87  margin-bottom: 20px;88  border: 0;89  height: 1px;90  background: -webkit-linear-gradient(left, transparent, rgba(0, 0, 0, 0.5), transparent);91  background: linear-gradient(left, transparent, rgba(0, 0, 0, 0.5), transparent);92}93 94/**95  * Images96  */97img {98  margin-bottom: 5px;99  margin-top: 5px;100  padding: 2px 2px;101  border-radius: 3px;102  background-color: #f0f0f0;103  max-width: 100%;104  vertical-align: middle;105}106 107/**108  * Figures109  */110figure > img {111  display: block;112}113 114figcaption {115  font-size: 15.3px;116}117 118/**119  * Lists120  */121ul,122ol {123  margin-left: 30px;124}125 126li > ul,127li > ol {128  margin-bottom: 0;129}130 131/**132  * Headings133  */134h1,135h2,136h3,137h4,138h5,139h6 {140  margin-top: 2rem;141  font-weight: 400;142}143 144/**145  * Links146  */147a {148  color: #2a7ae2;149  text-decoration: none;150}151a:hover {152  text-decoration: underline;153}154 155/**156  * Blockquotes157  */158blockquote {159  color: #828282;160  border-left: 4px solid #e8e8e8;161  padding-left: 15px;162  font-size: 18px;163  letter-spacing: -1px;164  font-style: italic;165}166blockquote > :last-child {167  margin-bottom: 0;168}169 170/**171  * Code formatting172  */173pre,174code {175  font-size: 16.2px;176  border: 1px solid #e0e0e0;177  border-radius: 3px;178  background-color: #f0f0f0;179}180 181code {182  padding: 1px 1px;183}184 185pre {186  padding: 2px 2px;187  overflow-x: auto;188}189pre > code {190  border: 0;191  padding-right: 0;192  padding-left: 0;193}194 195/**196  * Wrapper197  */198.wrapper {199  max-width: -webkit-calc(800px - (30px));200  max-width: calc(800px - (30px));201  margin-right: auto;202  margin-left: auto;203  padding-right: 15px;204  padding-left: 15px;205}206@media screen and (min-width: 800px) {207  .wrapper {208    max-width: -webkit-calc(800px - (30px * 2));209    max-width: calc(800px - (30px * 2));210    padding-right: 30px;211    padding-left: 30px;212  }213}214 215/**216  * Clearfix217  */218.wrapper:after {219  content: "";220  display: table;221  clear: both;222}223 224/**225  * Icons226  */227.orange {228  color: #f66a0a;229}230 231.grey {232  color: #828282;233}234 235.svg-icon {236  width: 16px;237  height: 16px;238  display: inline-block;239  fill: currentColor;240  padding: 5px 3px 2px 5px;241  vertical-align: text-bottom;242}243 244/**245  * Tables246  */247table {248  margin-bottom: 30px;249  width: 100%;250  text-align: left;251  color: #3f3f3f;252  border-collapse: collapse;253  border: 1px solid #e8e8e8;254}255table tr:nth-child(even) {256  background-color: #f7f7f7;257}258table th,259table td {260  padding: 10px 15px;261}262table th {263  background-color: #f0f0f0;264  border: 1px solid #dedede;265  border-bottom-color: #c9c9c9;266}267table td {268  border: 1px solid #e8e8e8;269}270 271/**272 * Site header273 */274.site-header {275  border-top: 5px solid #424242;276  border-bottom: 1px solid #e8e8e8;277  min-height: 55.95px;278  line-height: 72.9px;279  position: relative;280}281 282.site-nav {283  position: absolute;284  top: 9px;285  right: 15px;286  background-color: #fdfdfd;287  border: 1px solid #e8e8e8;288  border-radius: 5px;289  text-align: right;290}291.site-nav .nav-trigger {292  display: none;293}294.site-nav .menu-icon {295  float: right;296  width: 36px;297  height: 26px;298  line-height: 0;299  padding-top: 10px;300  text-align: center;301}302.site-nav .menu-icon > svg path {303  fill: #424242;304}305.site-nav label[for=nav-trigger] {306  display: block;307  float: right;308  width: 36px;309  height: 36px;310  z-index: 2;311  cursor: pointer;312}313.site-nav input ~ .trigger {314  clear: both;315  display: none;316}317.site-nav input:checked ~ .trigger {318  display: block;319  padding-bottom: 5px;320}321.site-nav .page-link {322  color: #111;323  line-height: 1.8;324  display: block;325  padding: 5px 10px;326  margin-left: 20px;327}328.site-nav .page-link:not(:last-child) {329  margin-right: 0;330}331@media screen and (min-width: 600px) {332  .site-nav {333    position: static;334    float: right;335    border: none;336    background-color: inherit;337  }338  .site-nav label[for=nav-trigger] {339    display: none;340  }341  .site-nav .menu-icon {342    display: none;343  }344  .site-nav input ~ .trigger {345    display: block;346  }347  .site-nav .page-link {348    display: inline;349    padding: 0;350    margin-left: auto;351  }352  .site-nav .page-link:not(:last-child) {353    margin-right: 20px;354  }355}356 357/**358 * Site footer359 */360.site-footer {361  padding: 20px 0;362}363 364.footer-heading {365  font-size: 20.25px;366  margin-bottom: 15px;367}368 369@media (max-width: 500px) {370  .p-name {371    font-size: 16.2px;372  }373}374 375@media (max-width: 500px) {376  .u-email {377    font-size: 16.2px;378  }379}380 381.contact-list,382.social-media-list {383  list-style: none;384  margin-left: 0;385}386 387/**388 * Page content389 */390.page-content {391  padding: 30px 0;392  flex: 1 0 auto;393}394 395.page-heading {396  font-size: 36px;397}398 399.home-title {400  margin-top: -10px;401}402 403.home-heading {404  font-weight: 1000;405  color: #373737;406  font-size: 39.6px;407}408@media (max-width: 500px) {409  .home-heading {410    margin-top: 20px;411    font-size: 30.6px;412  }413}414 415.home-sub-heading {416  margin-top: -0.6rem;417  color: #515151;418  font-size: 18px;419}420@media (max-width: 500px) {421  .home-sub-heading {422    font-size: 14.4px;423  }424}425 426.post-list {427  margin-top: 2.5rem;428  margin-left: 0;429  list-style: none;430}431.post-list li {432  margin-bottom: 2.5px;433}434 435.post-year {436  margin-top: 2rem;437  margin-bottom: 0.25rem;438  font-weight: 700;439  color: #373737;440  font-size: 27px;441}442@media (max-width: 500px) {443  .post-year {444    font-size: 21.6px;445  }446}447 448.post-meta {449  display: inline-block;450  min-width: 60px;451  font-size: 18px;452  color: #515151;453}454@media (max-width: 500px) {455  .post-meta {456    font-size: 14.4px;457  }458}459 460.post-link-layout {461  margin-left: 10%;462  display: inline;463  font-size: 21.6px;464}465@media (max-width: 500px) {466  .post-link-layout {467    font-size: 18px;468  }469}470 471.black-link {472  color: #111;473  text-decoration: none;474}475.black-link:hover {476  color: #111;477  text-decoration: underline;478}479 480.post-back {481  margin-bottom: 20px;482  color: #515151;483}484 485/**486 * Posts487 */488.post-header {489  margin-bottom: 30px;490}491 492.post-title,493.post-content h1 {494  font-size: 39.6px;495  line-height: 1.3;496  font-weight: 1000;497  margin-top: -0.5rem;498}499@media (max-width: 500px) {500  .post-title,501.post-content h1 {502    font-size: 32.4px;503  }504}505@media screen and (min-width: 800px) {506  .post-title,507.post-content h1 {508    font-size: 39.6px;509  }510}511 512.post-content {513  margin-top: 3.2rem;514  margin-bottom: 30px;515}516.post-content h2 {517  font-size: 31.5px;518}519@media screen and (min-width: 800px) {520  .post-content h2 {521    font-size: 36px;522  }523}524.post-content h3 {525  font-size: 24.75px;526}527@media screen and (min-width: 800px) {528  .post-content h3 {529    font-size: 29.25px;530  }531}532.post-content h4 {533  font-size: 20.25px;534}535@media screen and (min-width: 800px) {536  .post-content h4 {537    font-size: 22.5px;538  }539}540 541.social-media-list {542  margin-top: -1rem;543  display: flex;544  font-size: 18px;545}546.social-media-list li {547  float: left;548}549.social-media-list li a {550  padding-right: 6px;551}552 553/**554 * Grid helpers555 */556@media screen and (min-width: 800px) {557  .one-half {558    width: -webkit-calc(50% - (30px / 2));559    width: calc(50% - (30px / 2));560  }561}562/**563 * About Page564 */565.about-page {566  display: inline-block;567}568.about-page .about-header {569  display: flex;570  flex-direction: row;571  flex-wrap: wrap;572}573.about-page .about-header .about-avatar {574  padding: 1px;575  border: 1px solid #e8e8e8;576  width: 10rem;577  height: 10rem;578  margin: 0 2rem 0 0;579}580.about-page .about-header .about-info {581  align-self: center;582}583.about-page .about-header .about-info .about-your-name {584  display: flex;585  flex-direction: row;586  margin-top: 1rem;587  font-size: 27px;588}589.about-page .about-header .about-info .about-description {590  margin-top: -0.6rem;591  font-size: 18px;592  color: #515151;593}594.about-page .about-content {595  margin-top: 2rem;596}597 598 599 600/*!601 * Agate by Taufik Nurrohman <https://github.com/tovic>602 * ----------------------------------------------------603 *604 * #ade5fc605 * #a2fca2606 * #c6b4f0607 * #d36363608 * #fcc28c609 * #fc9b9b610 * #ffa611 * #fff612 * #333613 * #62c8f3614 * #888615 *616 */617 618.hljs {619  display: block;620  overflow-x: auto;621  padding: 0.5em;622  background: #333;623  color: white;624}625 626.hljs-name,627.hljs-strong {628  font-weight: bold;629}630 631.hljs-code,632.hljs-emphasis {633  font-style: italic;634}635 636.hljs-tag {637  color: #62c8f3;638}639 640.hljs-variable,641.hljs-template-variable,642.hljs-selector-id,643.hljs-selector-class {644  color: #ade5fc;645}646 647.hljs-string,648.hljs-bullet {649  color: #a2fca2;650}651 652.hljs-type,653.hljs-title,654.hljs-section,655.hljs-attribute,656.hljs-quote,657.hljs-built_in,658.hljs-builtin-name {659  color: #ffa;660}661 662.hljs-number,663.hljs-symbol,664.hljs-bullet {665  color: #d36363;666}667 668.hljs-keyword,669.hljs-selector-tag,670.hljs-literal {671  color: #fcc28c;672}673 674.hljs-comment,675.hljs-deletion,676.hljs-code {677  color: #888;678}679 680.hljs-regexp,681.hljs-link {682  color: #c6b4f0;683}684 685.hljs-meta {686  color: #fc9b9b;687}688 689.hljs-deletion {690  background-color: #fc9b9b;691  color: #333;692}693 694.hljs-addition {695  background-color: #a2fca2;696  color: #333;697}698 699.hljs a {700  color: inherit;701}702 703.hljs a:focus,704.hljs a:hover {705  color: inherit;706  text-decoration: underline;707}708  </style>709  <meta charset="utf-8">710  <meta content="IE=edge" http-equiv="X-UA-Compatible">711  <meta content="width=device-width, initial-scale=1" name="viewport">712  <meta content="Unix and Me :)" property="og:title">713  <meta content="Dmitry Rocha" name="author">714  <meta content="en" property="og:locale">715  <meta content="Annoying, annoying, annoying. This is Thunar without icons" name="description">716  <meta content="Annoying, annoying, annoying. This is Thunar without icons" property="og:description">717  <meta content="" property="og:url">718  <meta content="Unix and Me :)" property="og:site_name">719  <meta content="article" property="og:type">720  <meta content="2017-11-02T10:23:00-03:00" property="article:published_time">721 </head>722 <body>723  <main aria-label="Content" class="page-content">724   <div class="wrapper">725    <article class="post h-entry" itemscope itemtype="">726     <title>727      How to fix thunar missing icons728     </title>729     <header class="post-header">730      <div class="post-back">731       <a class="black-link">732        &larr; Home733       </a>734      </div>735      <h1 class="post-title p-name" itemprop="name headline">736       How to fix thunar missing icons737      </h1>738      <p class="post-meta">739       <time class="dt-published" datetime="2017-11-02 10:23:00 -0300 -0300" itemprop="datePublished" title="2017-11-02 10:23:00 -0300 -0300">740        Nov 2, 2017741       </time>742       &bull; #unix #desktop743      </p>744     </header>745     <div class="post-content e-content" itemprop="articleBody">746      <section>747       <hr>748       <h1>749        <abbr title="too long; didn't read">750         tl;dr751        </abbr>752       </h1>753       <p>754        Edit755        <code>756         ~/.gtkrc-2.0757        </code>758        with something like:759       </p>760       <pre><code class="hljs ini"><span class="hljs-attr">gtk-icon-theme-name</span> = <span class="hljs-string">"Tango"</span>761</code></pre>762       <p>763        And that is it :)764       </p>765       <hr>766      </section>767      <p>768       <img alt="Thunar without icons" src="rick.jpg">769      </p>770      <p>771       I'm still looking for a perfect filebrowser, nautilus is good I wish I could use it, but nautilus has so many dependencies that I always give up installing.772      </p>773      <p>774       I tried thunar in a docker image (it is775       <a>776        here777       </a>778       if you want to use it), but you know we don't get many integrations in this way.779      </p>780      <p>781       Like I said I tried first to use it in a Docker image, fixed this problem but I could not create the habit of using it. Then I moved to install it in my desktop.782      </p>783      <h1 id="fix-it">784       Fix it!785      </h1>786      <p>787       This &ldquo;missing icons&rdquo; problem happens only when there is no icons in your system (which is a rare case) or when your system is not configured properly.788      </p>789      <h2 id="if-you-dont-have-a-icon-theme">790       If you don't have a icon theme791      </h2>792      <p>793       In the first case you will have to install a icon pac to find &ldquo;instalables&rdquo; pacs type:794      </p>795      <div class="highlight">796       <pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell hljs" data-lang="shell"><span class="hljs-meta">$</span><span class="bash"> apt-cache search icon-theme</span>797</code></pre>798      </div>799      <p>800       In Ubuntu, or801      </p>802      <div class="highlight">803       <pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell hljs" data-lang="shell"><span class="hljs-meta">$</span><span class="bash"> pacman -Ss icon-theme</span>804</code></pre>805      </div>806      <p>807       In Arch.808      </p>809      <p>810       Install it using811       <code>812        apt-get install ICON-THEME813       </code>814       or815       <code>816        pacman -S ICON-THEME817       </code>818       .819      </p>820      <h2 id="configure-it">821       Configure it822      </h2>823      <p>824       If you had installed or you already had a icon theme in order to fix this problem you have to create or edit this file:825       <code>826        ~/.gtkrc-2.0827       </code>828       to something like:829      </p>830      <pre><code class="hljs ini"><span class="hljs-attr">gtk-icon-theme-name</span>=<span class="hljs-string">"ICON-THEME"</span>831</code></pre>832      <p>833       And that is it!834      </p>835      <footer>836       <div class="references">837        <h3>838         Reference839        </h3>840        <ul>841         <li>842          "Icons for Thunar file manager"843          <a>844           https://www.linuxquestions.org/questions/slackware-14/icons-for-thunar-file-manager-773501/845          </a>846          .847                    Accessed Nov 2, 2017.848         </li>849        </ul>850       </div>851       <div id="disqus_thread">852       </div>853      </footer>854     </div>855    </article>856   </div>857  </main>858  <noscript>859   Please enable JavaScript to view the860   <a>861    comments powered by Disqus.862   </a>863  </noscript>864  <footer class="site-footer h-card">865   <div class="wrapper">866    <div class="footer-col-wrapper">867     <div class="footer-col">868      <ul class="contact-list">869       <li class="p-name">870        <a class="black-link">871         github.com/dmitryrck872        </a>873       </li>874       <li class="p-name">875        <a class="black-link">876         linkedin.com/in/dmitryrck877        </a>878       </li>879       <li class="p-name">880        <a class="black-link">881         speakerdeck.com/dmitryrck882        </a>883       </li>884       <li class="p-name">885        <a class="black-link">886         twitter.com/dmitryrck887        </a>888       </li>889      </ul>890     </div>891    </div>892   </div>893  </footer>894  <div class="pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links ad-text adSense adBlock adContent adBanner" style="width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;">895  </div>896 </body>897</html>898