Skip to content

Commit

Permalink
Refactor things
Browse files Browse the repository at this point in the history
- Refactor and condense CSS
- Rebuild primary navigation bar to something more logical and accessible on touch devices
- Optimize logotext font loading by preloading new WOFF2 font file
- Replace logos for Discord and GitHub with officially provided ones
- Replace `apple-touch-icon` with better composed version
- Add maskable icons
- Move manifest file to site root and specify maskable icons
- Fix formatting issue on FAQ page for BibTeX entries
- Make first list entry not huge
- Remove redundant files
- Update production Hugo version to `0.86.0`
  • Loading branch information
EricHallahan committed Aug 10, 2021
1 parent 22d8f4d commit 28da230
Show file tree
Hide file tree
Showing 26 changed files with 170 additions and 235 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ googleAnalytics = "G-9KCLV8BK53"
url="https://github.com/EleutherAI"
[params.label]
icon = "/images/libre.svg"
iconHeight = "45"
iconHeight = "48"
[params.assets]
disableHLJS = true
favicon="favicon.ico"
Expand Down
12 changes: 6 additions & 6 deletions content/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ How should I cite your models?
author={Gao, Leo and Biderman, Stella and Black, Sid and Golding, Laurence and Hoppe, Travis and Foster, Charles and Phang, Jason and He, Horace and Thite, Anish and Nabeshima, Noa and Presser, Shawn and Leahy, Connor},
journal={arXiv preprint arXiv:2101.00027},
year={2020}
}
@software{gpt-neo,
}
@software{gpt-neo,
author = {Black, Sid and Gao, Leo and Wang, Phil and Leahy, Connor and Biderman, Stella},
title = {{GPT-Neo}: Large Scale Autoregressive Language Modeling with Mesh-Tensorflow},
url = {http:https://github.com/eleutherai/gpt-neo},
version = {1.0},
year = {2021}
}{{< /highlight >}}
url = {http:https://github.com/eleutherai/gpt-neo},
version = {1.0},
year = {2021}
}{{< /highlight >}}

## The Pile

Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[context.production.environment]
HUGO_VERSION = "0.83.1"
HUGO_VERSION = "0.86.0"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
Binary file modified static/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon/maskable_icon_x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon/maskable_icon_x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion static/favicon/site.webmanifest

This file was deleted.

32 changes: 32 additions & 0 deletions static/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"icons": [
{
"src": "/favicon/android-chrome-192x192.png",
"sizes":"192x192",
"type":"image/png",
"purpose": "any"
},
{
"src":"/favicon/android-chrome-512x512.png",
"sizes":"512x512",
"type":"image/png",
"purpose": "any"
},
{
"src": "/favicon/maskable_icon_x192.png",
"sizes":"192x192",
"type":"image/png",
"purpose": "maskable"
},
{
"src":"/favicon/maskable_icon_x512.png",
"sizes":"512x512",
"type":"image/png",
"purpose": "maskable"
}
],
"start_url": "/",
"theme_color":"#000000",
"background_color":"#000000",
"display":"standalone"
}
105 changes: 55 additions & 50 deletions themes/eai-base/assets/css/common/header.css
Original file line number Diff line number Diff line change
@@ -1,97 +1,102 @@
.nav {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
max-width: calc(var(--nav-width) + var(--gap) * 2);
margin-inline-start: auto;
margin-inline-end: auto;
line-height: var(--header-height);
@font-face {
font-family: 'Eleuther';
src: url('/fonts/eleuther.woff2') format('woff2'),
url('/fonts/eleuther.ttf') format('truetype');
font-display: swap;
}

.nav a {
display: block;
header.header {
background-color: black;
color-scheme: dark;
}

.logo,
#menu {
header.header * {
color: white;
}

.nav-container {
display: flex;
margin: auto var(--gap);
flex-wrap: wrap;
justify-content: space-between;
max-width: var(--nav-width);
overflow-x: auto;
margin-inline-start: auto;
margin-inline-end: auto;
position: relative;
}

.logo {
flex-wrap: inherit;
margin: var(--min-keepout) calc(4*var(--min-keepout)) var(--min-keepout) calc(2*var(--min-keepout));
}

.logo a {
font-size: 24px;
font-weight: 700;
.logo {
font-size: 26px;
font-family: 'Eleuther', sans-serif;
font-weight: normal;
}

.logo a img {
.logo img {
display: inline;
vertical-align: middle;
pointer-events: none;
transform: translate(0, -10%);
border-radius: 6px;
margin-inline-end: 8px;
}

#theme-toggle svg {
height: 18px;
}

button#theme-toggle {
font-size: 26px;
margin: auto 4px;
.nav {
display: inline-block;
display: flex;
margin: auto 0;
overflow-x: clip;
flex-wrap: wrap;
}

body.dark #moon {
vertical-align: middle;
display: none;
.nav::after {
display: inline-block;
content: '';
width: var(--min-touch);
height: 0;
}

body:not(.dark) #sun {
display: none;
.nav a {
line-height: var(--min-touch);
display: block;
}

#menu {
display: flex;
list-style: none;
word-break: keep-all;
overflow-x: auto;
white-space: nowrap;
}

#menu li + li {
margin-inline-start: var(--gap);
#menu li {
margin-inline-start: 1em;
}

#menu li:last-child {
margin-inline-end: 1em;
}

#menu a {
font-size: 16px;
font-size: 1em;
}

#menu .active {
font-weight: 500;
border-bottom: 2px solid currentColor;
}

.lang-switch li,
.lang-switch ul,
.logo-switches {
display: inline-flex;
margin: auto 4px;
}

.lang-switch {
display: flex;
flex-wrap: inherit;
}

.lang-switch a {
margin: auto 3px;
font-size: 16px;
font-weight: 500;
}

.logo-switches {
flex-wrap: inherit;
button#theme-toggle {
font-size: 24px;
position: absolute;
height: var(--min-touch);
width: var(--min-touch);
top: var(--min-keepout);
right: var(--min-keepout);
}
2 changes: 1 addition & 1 deletion themes/eai-base/assets/css/common/post-entry.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
display: flex;
flex-direction: column;
justify-content: center;
min-height: 320px;
min-height: auto;
margin: var(--gap) 0 calc(var(--gap) * 2) 0;
}

Expand Down
24 changes: 10 additions & 14 deletions themes/eai-base/assets/css/common/post-single.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

.post-title {
margin-bottom: 2px;
font-size: 40px;
font-size: 2.5em;
}

.post-description {
Expand All @@ -16,7 +16,7 @@
.post-meta,
.breadcrumbs {
color: var(--secondary);
font-size: 14px;
font-size: 0.875em;
display: flex;
flex-wrap: wrap;
}
Expand All @@ -29,7 +29,7 @@
}

.breadcrumbs a {
font-size: 16px;
font-size: 1em;
}

.post-content {
Expand Down Expand Up @@ -61,13 +61,6 @@
font-size: 1.33em;
}

.post-content h5 {
font-size: 14px;
}

.post-content h6 {
font-size: 12px;
}

.post-content a,
.toc a:hover {
Expand Down Expand Up @@ -199,9 +192,9 @@

.post-content code {
margin: auto 4px;
padding: 4px 6px;
font-size: 0.78em;
line-height: 1.5;
font-size: inherit;
padding: 0.1em;
margin: 0;
background: var(--code-bg);
border-radius: 2px;
}
Expand All @@ -210,11 +203,14 @@
display: block;
margin: auto 0;
padding: 10px;
color: rgba(255, 255, 255, 0.8);
color: white;
background: 0 0;
border-radius: 0;
overflow-x: auto;
word-break: break-all;
font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", "Ubuntu Mono", "Roboto Mono", Menlo, Monaco, Consolas, monospace;
font-size: 0.875em;
color-scheme: dark;
}

.post-content blockquote {
Expand Down
3 changes: 2 additions & 1 deletion themes/eai-base/assets/css/core/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ h6 {

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 18px;
font-size: 16px;
line-height: 1.6;
word-break: break-word;
background: var(--theme);
Expand All @@ -43,6 +43,7 @@ table {
display: block;
}


h1,
h2,
h3,
Expand Down
9 changes: 6 additions & 3 deletions themes/eai-base/assets/css/core/theme-vars.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
:root {
--gap: 24px;
--gap: clamp(1em,calc(100vw / 4 - 176px),24px);
--content-gap: 20px;
--min-touch: 48px;
--min-keepout: 8px;
--nav-width: 1024px;
--main-width: 720px;
--header-height: 60px;
--main-width: 800px;
--header-height: 65px;
--footer-height: 60px;
--radius: 8px;
--theme: #ffffff;
Expand All @@ -27,6 +29,7 @@
--hljs-bg: #2e2e33;
--code-bg: #37383e;
--border: #333;
color-scheme: dark;
}

.list {
Expand Down
4 changes: 0 additions & 4 deletions themes/eai-base/assets/css/core/zmedia.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
@media screen and (max-width: 768px) {
/* theme-vars */
:root {
--gap: 14px;
}

/* profile-mode */
.profile img {
Expand Down
16 changes: 4 additions & 12 deletions themes/eai-base/assets/css/extended/discord.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ article.discord {
padding-bottom: 1em;
margin-top: 0.5em;
margin-bottom: 0.5em;
color-scheme: dark;
}

div.chat-message {
Expand Down Expand Up @@ -121,6 +122,7 @@ div.chat-message > div.contents > div.messageContent a{
}

.mention{
white-space: nowrap;
font-size: 100%;
border-radius: 3px;
padding: 0 2px;
Expand All @@ -131,22 +133,12 @@ div.chat-message > div.contents > div.messageContent a{
color: hsl(235,66.7%,58.8%);
}

body.dark .mention{
font-size: 100%;
border-radius: 3px;
padding: 0 2px;
font-weight: 500;
unicode-bidi: plaintext;
position: relative;
body.dark .mention,
div.chat-message > div.contents > div.messageContent .mention{
background: hsla(235,85.6%,64.7%,0.3);
color: hsl(236,83.3%,92.9%);
}

div.chat-message > div.contents > div.messageContent .mention{
background: hsla(235,calc(1*85.6%),64.7%,0.3);
color: hsl(236,calc(1*83.3%),92.9%);
}

div.chat-message > div.contents > div.messageContent blockquote {
border-left: 4px solid #4f545c;
padding: 0 8px 0 12px;
Expand Down
Loading

0 comments on commit 28da230

Please sign in to comment.