diff --git a/src/static/css/page.css b/src/static/css/page.css index 324ec2c36ea..31a46489ab1 100644 --- a/src/static/css/page.css +++ b/src/static/css/page.css @@ -292,6 +292,7 @@ } .authors, +.citation-box h2, .authors h2, .chapter-links, .chapter-links h2, @@ -382,6 +383,20 @@ margin-right: 0.25rem; } +.citation-box pre { + padding: 16px; + border: 1px solid #e0e0e0; + border-radius: 4px; + background-color: #ffffff; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + margin-bottom: 20px; + font-family: monospace; + background-color: #f9f9f9; + overflow-x: auto; + white-space: pre-wrap; /* Allow wrapping of long lines */ + margin: 0; +} + #chapter-navigation { padding: 16px 36px 50px 36px; padding: 1rem 2.25rem 3.125rem 2.25rem; @@ -772,7 +787,7 @@ figure .fig-desktop { .index-box ul { max-height: 0; display: none; - border-top: 0 solid #fff; + border-top: 0 solid #ffffff; transition: max-height 0.15s ease-out; overflow: hidden; } diff --git a/src/templates/base/base_chapter.html b/src/templates/base/base_chapter.html index 0d460d42164..ee41147f3b0 100644 --- a/src/templates/base/base_chapter.html +++ b/src/templates/base/base_chapter.html @@ -318,6 +318,31 @@
+@inbook{WebAlmanac.{{ year }}.{{ metadata.get('title').replace(' ', '') }}, +author = "{% for author in metadata.get('authors') -%} + {%- set authordata = config.contributors.get(author, None) -%} + {%- if authordata %} + {%- set full_name = authordata.name.split(' ') -%} + {{ full_name[-1] }}, {{ full_name[0] }}{% if full_name|length > 2 %} {{ full_name[1:-1]|join(' ') }}{% endif %}{% if not loop.last %} and {% endif %} + {%- else %} + {%- set full_name = author.split(' ') -%} + {{ full_name[-1] }}, {{ full_name[0] }}{% if full_name|length > 2 %} {{ full_name[1:-1]|join(' ') }}{% endif %}{% if not loop.last %} and {% endif %} + {%- endif %} +{%- endfor %}", +title = "{{ metadata.get('title') }}", +booktitle = "The {{ year }} Web Almanac", +chapter = {{ chapter_config.chapter_number }}, +publisher = "HTTP Archive", +year = "{{ year }}", +url = "https://almanac.httparchive.org/en/{{ year }}/{{ metadata.get('chapter') }}" +}+{% endmacro %} + {% macro render_prevnext() %} {% if prev_chapter %} {% if chapter_lang_exists(lang, year, prev_chapter['slug']) %} @@ -423,6 +448,8 @@