PageSourceSearch

https://yani.ai/js/publications.js

js yani.ai collected 2026-10-05 13:20:01 UTC 3,066 bytes, 57 lines download raw bytes

1"use strict";
2var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4    return new (P || (P = Promise))(function (resolve, reject) {
5        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8        step((generator = generator.apply(thisArg, _arguments || [])).next());
9    });
10};
11function loadPublications() {
12    return __awaiter(this, void 0, void 0, function* () {
13        try {
14            const response = yield fetch('_data/publications.yml');
15            if (!response.ok) {
16                throw new Error(`HTTP error! status: ${response.status}`);
17            }
18            const yamlText = yield response.text();
19            const publications = jsyaml.load(yamlText);
20            const publicationsContainer = document.querySelector('#publications .row');
21            if (!publicationsContainer) {
22                console.error('Publications container not found');
23                return;
24            }
25            // Clear existing publications
26            publicationsContainer.innerHTML = '';
27            // Generate and append new publication entries
28            for (const pub of publications) {
29                const linksHtml = pub.links.map(link => `<a href="${link.url}">${link.name}</a>`).join(', ');
30                const publicationElement = document.createElement('div');
31                publicationElement.className = 'col-md-6 mb-4';
32                publicationElement.innerHTML = `
33                <div class="card">
34                    <div class="d-flex g-0">
35                        <div class="col-3 flex-shrink-0 pub-thumbnail-card">
36                            <a href="${pub.url}"><img src="${pub.thumbnail}" class="img-fluid rounded-start pub-thumbnail-img" alt="Paper coverpage"></a>
37                        </div>
38                        <div class="col-9 flex-grow-1">
39                            <div class="card-body">
40                                <h5 class="card-title">${pub.title}</h5>
41                                <p class="card-text"><small class="text-muted">${pub.authors}</small></p>
42                                <p class="card-text">${pub.venue}<br>${linksHtml}</p>
43                                ${pub.notes ? `<p class="card-text"><small class="text-muted">${pub.notes}</small></p>` : ''}
44                            </div>
45                        </div>
46                    </div>
47                </div>
48            `;
49                publicationsContainer.appendChild(publicationElement);
50            }
51        }
52        catch (error) {
53            console.error('Failed to load publications:', error);
54        }
55    });
56}
57document.addEventListener('DOMContentLoaded', loadPublications);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.