tfrere HF Staff commited on
Commit
adb1d0d
·
1 Parent(s): 04f7530

update footer

Browse files
app/.astro/settings.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4c8899b8bb86e440bbb98ab000b4c5a0d30bd1a50a97745f7b6c971eca2f6616
3
  size 58
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87befa8721633060023d5ffe8c500c873f6f299aca8f4657ad2a2de43385af1f
3
  size 58
app/src/components/Footer.astro CHANGED
@@ -4,8 +4,10 @@ interface Props {
4
  bibtex: string;
5
  licence?: string;
6
  doi?: string;
 
 
7
  }
8
- const { citationText, bibtex, licence, doi } = Astro.props as Props;
9
  ---
10
  <footer class="footer">
11
  <div class="footer-inner">
@@ -17,11 +19,28 @@ const { citationText, bibtex, licence, doi } = Astro.props as Props;
17
  <p>BibTeX citation</p>
18
  <pre class="citation long">{bibtex}</pre>
19
  </section>
20
- {doi && (
21
- <section class="doi-block">
22
- <h3>DOI</h3>
23
- <p><a href={`https://doi.org/${doi}`} target="_blank" rel="noopener noreferrer">{doi}</a></p>
 
 
 
 
 
 
 
 
 
 
24
  </section>
 
 
 
 
 
 
 
25
  )}
26
  {licence && (
27
  <section class="reuse-block">
@@ -129,14 +148,16 @@ const { citationText, bibtex, licence, doi } = Astro.props as Props;
129
  .citation-block,
130
  .references-block,
131
  .reuse-block,
132
- .doi-block {
 
133
  display: contents;
134
  }
135
 
136
  .citation-block > h3,
137
  .references-block > h3,
138
  .reuse-block > h3,
139
- .doi-block > h3 {
 
140
  grid-column: 1;
141
  font-size: 15px;
142
  margin: 0;
@@ -147,7 +168,8 @@ const { citationText, bibtex, licence, doi } = Astro.props as Props;
147
  .citation-block > :not(h3),
148
  .references-block > :not(h3),
149
  .reuse-block > :not(h3),
150
- .doi-block > :not(h3) {
 
151
  grid-column: 2;
152
  }
153
 
@@ -166,6 +188,7 @@ const { citationText, bibtex, licence, doi } = Astro.props as Props;
166
  .citation-block p,
167
  .reuse-block p,
168
  .doi-block p,
 
169
  .footnotes ol,
170
  .footnotes ol p,
171
  .references {
 
4
  bibtex: string;
5
  licence?: string;
6
  doi?: string;
7
+ arxivEprint?: string;
8
+ arxivClass?: string;
9
  }
10
+ const { citationText, bibtex, licence, doi, arxivEprint, arxivClass } = Astro.props as Props;
11
  ---
12
  <footer class="footer">
13
  <div class="footer-inner">
 
19
  <p>BibTeX citation</p>
20
  <pre class="citation long">{bibtex}</pre>
21
  </section>
22
+ {/* Show arXiv section if we have arXiv info, otherwise show DOI section */}
23
+ {(arxivEprint || arxivClass) ? (
24
+ <section class="arxiv-block">
25
+ <h3>arXiv</h3>
26
+ {arxivEprint && (
27
+ <p>
28
+ <a href={`https://arxiv.org/abs/${arxivEprint}`} target="_blank" rel="noopener noreferrer">
29
+ {arxivClass ? `arXiv:${arxivEprint} [${arxivClass}]` : `arXiv:${arxivEprint}`}
30
+ </a>
31
+ </p>
32
+ )}
33
+ {!arxivEprint && arxivClass && (
34
+ <p>Class: {arxivClass}</p>
35
+ )}
36
  </section>
37
+ ) : (
38
+ doi && (
39
+ <section class="doi-block">
40
+ <h3>DOI</h3>
41
+ <p><a href={`https://doi.org/${doi}`} target="_blank" rel="noopener noreferrer">{doi}</a></p>
42
+ </section>
43
+ )
44
  )}
45
  {licence && (
46
  <section class="reuse-block">
 
148
  .citation-block,
149
  .references-block,
150
  .reuse-block,
151
+ .doi-block,
152
+ .arxiv-block {
153
  display: contents;
154
  }
155
 
156
  .citation-block > h3,
157
  .references-block > h3,
158
  .reuse-block > h3,
159
+ .doi-block > h3,
160
+ .arxiv-block > h3 {
161
  grid-column: 1;
162
  font-size: 15px;
163
  margin: 0;
 
168
  .citation-block > :not(h3),
169
  .references-block > :not(h3),
170
  .reuse-block > :not(h3),
171
+ .doi-block > :not(h3),
172
+ .arxiv-block > :not(h3) {
173
  grid-column: 2;
174
  }
175
 
 
188
  .citation-block p,
189
  .reuse-block p,
190
  .doi-block p,
191
+ .arxiv-block p,
192
  .footnotes ol,
193
  .footnotes ol p,
194
  .references {
app/src/content/article.mdx CHANGED
@@ -43,10 +43,12 @@ tags:
43
  - research
44
  - vision-language models
45
  - dataset
 
46
  seoThumbImage: "/thumb.png"
47
  tableOfContentsAutoCollapse: true
48
  ---
49
 
 
50
  import HtmlEmbed from "../components/HtmlEmbed.astro";
51
  import Wide from "../components/Wide.astro";
52
  import FullWidth from "../components/FullWidth.astro";
 
43
  - research
44
  - vision-language models
45
  - dataset
46
+ doi: https://arxiv.org/abs/2510.17269
47
  seoThumbImage: "/thumb.png"
48
  tableOfContentsAutoCollapse: true
49
  ---
50
 
51
+
52
  import HtmlEmbed from "../components/HtmlEmbed.astro";
53
  import Wide from "../components/Wide.astro";
54
  import FullWidth from "../components/FullWidth.astro";
app/src/pages/index.astro CHANGED
@@ -121,7 +121,40 @@ const keyAuthor = (authorNames[0] || 'article').split(/\s+/).slice(-1)[0].toLowe
121
  const keyTitle = titleFlat.toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/^_|_$/g, '');
122
  const bibKey = `${keyAuthor}${year ?? ''}_${keyTitle}`;
123
  const doi = (ArticleMod as any)?.frontmatter?.doi ? String((ArticleMod as any).frontmatter.doi) : undefined;
124
- const bibtex = `@misc{${bibKey},\n title={${titleFlat}},\n author={${authorsBib}},\n ${year ? `year={${year}},\n ` : ''}${doi ? `doi={${doi}}` : ''}\n}`;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  const envCollapse = false;
126
  const tableOfContentAutoCollapse = Boolean(
127
  (articleFM as any)?.tableOfContentAutoCollapse ?? (articleFM as any)?.tableOfContentsAutoCollapse ?? envCollapse
@@ -163,7 +196,7 @@ const licence = (articleFM as any)?.licence ?? (articleFM as any)?.license ?? (a
163
  </main>
164
  </section>
165
 
166
- <Footer citationText={citationText} bibtex={bibtex} licence={licence} doi={doi} />
167
 
168
 
169
  <script>
 
121
  const keyTitle = titleFlat.toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/^_|_$/g, '');
122
  const bibKey = `${keyAuthor}${year ?? ''}_${keyTitle}`;
123
  const doi = (ArticleMod as any)?.frontmatter?.doi ? String((ArticleMod as any).frontmatter.doi) : undefined;
124
+
125
+ // Extract arXiv information from DOI if it's an arXiv URL
126
+ const extractArxivInfo = (doiStr: string | undefined) => {
127
+ if (!doiStr) return { eprint: undefined, primaryClass: undefined };
128
+
129
+ // Check if it's an arXiv URL (like https://arxiv.org/abs/2510.17269)
130
+ const arxivMatch = doiStr.match(/arxiv\.org\/(?:abs|pdf)\/(\d{4}\.\d+)(?:v\d+)?/);
131
+ if (arxivMatch) {
132
+ return {
133
+ eprint: arxivMatch[1],
134
+ primaryClass: 'cs.CV' // You mentioned primaryClass={cs.CV} in your request
135
+ };
136
+ }
137
+
138
+ return { eprint: undefined, primaryClass: undefined };
139
+ };
140
+
141
+ const { eprint: arxivEprint, primaryClass: arxivClass } = extractArxivInfo(doi);
142
+
143
+ // Build BibTeX with proper formatting
144
+ let bibtexFields = [
145
+ `title={${titleFlat}}`,
146
+ `author={${authorsBib}}`
147
+ ];
148
+
149
+ if (year) bibtexFields.push(`year={${year}}`);
150
+ if (doi) bibtexFields.push(`doi={${doi}}`);
151
+ if (arxivEprint) {
152
+ bibtexFields.push(`eprint={${arxivEprint}}`);
153
+ bibtexFields.push(`archivePrefix={arXiv}`);
154
+ bibtexFields.push(`primaryClass={${arxivClass}}`);
155
+ }
156
+
157
+ const bibtex = `@misc{${bibKey},\n ${bibtexFields.join(',\n ')}\n}`;
158
  const envCollapse = false;
159
  const tableOfContentAutoCollapse = Boolean(
160
  (articleFM as any)?.tableOfContentAutoCollapse ?? (articleFM as any)?.tableOfContentsAutoCollapse ?? envCollapse
 
196
  </main>
197
  </section>
198
 
199
+ <Footer citationText={citationText} bibtex={bibtex} licence={licence} doi={doi} arxivEprint={arxivEprint} arxivClass={arxivClass} />
200
 
201
 
202
  <script>