Skip to content

Commit cbefa24

Browse files
committed
fixed citation box
1 parent d4de32b commit cbefa24

File tree

2 files changed

+158
-23
lines changed

2 files changed

+158
-23
lines changed

index.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,12 @@ <h2 id="video">Video</h2>
9797
<iframe height="528" src="#" title="Supplemental video" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
9898
</section> -->
9999

100-
<section>
101-
<h2 id="citation">Citation</h2>
102-
<pre><button class="copy" onclick="copyText()"><i class="fa fa-clipboard"></i></button><span id="citation-content">@article{Anonymous2024,
100+
<section class="section" id="citation">
101+
<div class="container is-max-desktop content">
102+
<h2 class="title">Citation</h2>
103+
<div class="citation-box">
104+
<button class="copy" onclick="copyText()"><i class="fa fa-clipboard"></i></button>
105+
<pre><code id="citation-content">@article{Anonymous2024,
103106
author = {Anonymous User 123 and Anonymous User 456 and Anonymous User 789 and Anonymous User 101},
104107
title = {Anonymous Research Paper},
105108
year = {2024},
@@ -108,19 +111,21 @@ <h2 id="citation">Citation</h2>
108111
number = {1},
109112
pages = {1--10},
110113
doi = {10.0000/0000000}
111-
}</span></pre>
114+
}</code></pre>
115+
</div>
116+
</div>
112117
</section>
113118

114119
<section>
115120
<h2 id="acknowledgments">Acknowledgments</h2>
116121
<p>Coming soon</p>
117-
<p><em>Note: This website template is inspired by <a href="https://nerfies.github.io/">Nerfies</a> and <a href="https://imaging.cs.cmu.edu/">CMU Computational Imaging Lab</a> research pages.</em></p>
118122
</section>
119123
</main>
120124

121125
<footer>
122126
<p class="license">This website is licensed under a <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>
123127
<p class="license">This means you are free to borrow the source code of this website, we just ask that you link back to this page in the footer. Please remember to remove the analytics code included in the header of the website which you do not want on your website.</p>
128+
<p class="license">This website template is inspired by <a href="https://nerfies.github.io/">Nerfies</a> and <a href="https://imaging.cs.cmu.edu/">CMU Computational Imaging Lab</a> research pages.</p>
124129
<p class="license">Website template from <a href="https://github.com/zzigak/research-project-website">research-project-website</a>.</p>
125130
</footer>
126131
</body>

style.css

Lines changed: 148 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -354,49 +354,65 @@ model-viewer {
354354
/* Authors section */
355355
.authors {
356356
text-align: center;
357-
margin: 1.5em 0;
357+
margin: 1.5em auto;
358358
font-size: 1.1em;
359+
width: 100%;
360+
max-width: 100%;
361+
overflow-x: hidden;
362+
padding: 0 1em;
363+
box-sizing: border-box;
359364
}
360365

361366
.author-names {
362367
margin-bottom: 0.5em;
368+
display: flex;
369+
flex-wrap: wrap;
370+
justify-content: center;
371+
gap: 0.15em;
372+
width: 100%;
373+
max-width: 100%;
363374
}
364375

365376
.author-block {
366377
display: inline-block;
367-
margin: 0 0.25em;
378+
margin: 0;
379+
white-space: normal;
380+
font-size: 0.95em;
381+
max-width: 100%;
382+
word-wrap: break-word;
368383
}
369384

370385
.author-block a {
371386
color: #1772d0;
372387
text-decoration: none;
373388
font-weight: bold;
374-
}
375-
376-
.author-block a:hover {
377-
color: #f09228;
378-
}
379-
380-
.author-block sup {
381-
color: #666;
382-
font-size: 0.8em;
383-
vertical-align: super;
389+
padding: 0 0.1em;
390+
word-wrap: break-word;
384391
}
385392

386393
.author-affiliations {
387-
font-size: 1em;
394+
font-size: 0.9em;
388395
color: #666;
396+
display: flex;
397+
flex-wrap: wrap;
398+
justify-content: center;
399+
gap: 0.3em;
400+
width: 100%;
401+
max-width: 100%;
389402
}
390403

391404
.affiliation-block {
392405
display: inline-block;
393-
margin: 0 0.5em;
406+
margin: 0;
407+
white-space: normal;
408+
word-wrap: break-word;
394409
}
395410

396-
.affiliation-block sup {
397-
color: #666;
398-
font-size: 0.8em;
399-
vertical-align: super;
411+
.author-notes {
412+
margin-top: 0.5em;
413+
font-size: 0.85em;
414+
width: 100%;
415+
max-width: 100%;
400416
}
401417

402418
/* Navigation */
@@ -461,4 +477,118 @@ nav > ul > li {
461477

462478
.theme-switch:hover i {
463479
color: #1772d0;
480+
}
481+
482+
/* Citation section styles */
483+
.section {
484+
padding: 3rem 1.5rem;
485+
}
486+
487+
.container {
488+
margin: 0 auto;
489+
position: relative;
490+
width: 100%;
491+
}
492+
493+
.is-max-desktop {
494+
max-width: 960px;
495+
}
496+
497+
.content {
498+
margin-top: 0;
499+
}
500+
501+
.title {
502+
color: #363636;
503+
font-size: 2rem;
504+
font-weight: 600;
505+
line-height: 1.125;
506+
margin-bottom: 1.5rem;
507+
text-align: center;
508+
}
509+
510+
.citation-box {
511+
position: relative;
512+
background-color: #f5f5f5;
513+
border-radius: 6px;
514+
padding: 1.25rem 1.5rem;
515+
}
516+
517+
#citation pre {
518+
margin: 0;
519+
padding: 0;
520+
background: none;
521+
border: none;
522+
overflow-x: auto;
523+
white-space: pre;
524+
word-wrap: normal;
525+
}
526+
527+
#citation code {
528+
font-family: monospace;
529+
font-size: 0.9em;
530+
line-height: 1.4;
531+
color: #4a4a4a;
532+
background: none;
533+
padding: 0;
534+
border: none;
535+
text-decoration: none;
536+
}
537+
538+
#citation .copy {
539+
position: absolute;
540+
right: 1rem;
541+
top: 1rem;
542+
background: none;
543+
border: none;
544+
color: #666;
545+
cursor: pointer;
546+
padding: 0.25rem;
547+
border-radius: 0.25rem;
548+
transition: background-color 0.2s;
549+
}
550+
551+
#citation .copy:hover {
552+
background-color: #e0e0e0;
553+
color: #1772d0;
554+
}
555+
556+
@media screen and (max-width: 768px) {
557+
.section {
558+
padding: 1.5rem 1rem;
559+
}
560+
561+
.title {
562+
font-size: 1.5rem;
563+
}
564+
565+
.citation-box {
566+
padding: 1rem;
567+
}
568+
569+
#citation code {
570+
font-size: 0.8em;
571+
}
572+
}
573+
574+
@media screen and (max-width: 600px) {
575+
.authors {
576+
font-size: 0.9em;
577+
padding: 0 0.5em;
578+
width: 100%;
579+
max-width: 100%;
580+
}
581+
582+
.author-block {
583+
font-size: 0.85em;
584+
white-space: normal;
585+
}
586+
587+
.author-affiliations {
588+
font-size: 0.8em;
589+
}
590+
591+
.author-notes {
592+
font-size: 0.8em;
593+
}
464594
}

0 commit comments

Comments
 (0)