mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 11:01:54 +00:00
add prose.css for manual prose styles
This commit is contained in:
parent
f4d0225b75
commit
cb34321d69
8 changed files with 197 additions and 28 deletions
|
@ -18,31 +18,13 @@ module.exports = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
extend: {
|
extend: {
|
||||||
typography: (theme) => ({
|
|
||||||
DEFAULT: {
|
},
|
||||||
css: {
|
|
||||||
h1: {
|
|
||||||
fontFamily: theme("fontFamily.display").join(", ")
|
|
||||||
},
|
|
||||||
h2: {
|
|
||||||
fontFamily: theme("fontFamily.display").join(", ")
|
|
||||||
},
|
|
||||||
h3: {
|
|
||||||
fontFamily: theme("fontFamily.display").join(", ")
|
|
||||||
},
|
|
||||||
h4: {
|
|
||||||
fontFamily: theme("fontFamily.display").join(", ")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
variants: {
|
variants: {
|
||||||
},
|
},
|
||||||
plugins: [
|
|
||||||
require('@tailwindcss/typography'),
|
|
||||||
],
|
|
||||||
purge: [
|
purge: [
|
||||||
"../server/templates/**/*.hbs"
|
"../server/templates/**/*.hbs"
|
||||||
]
|
]
|
||||||
|
|
91
server/static/prose.css
Normal file
91
server/static/prose.css
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
article.prose,
|
||||||
|
.type-prose {
|
||||||
|
font-family: "Spectral", "Constantia", "Lucida Bright", "Lucidabright", "Lucida Serif", "Lucida", "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", "Georgia", "serif", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", serif;
|
||||||
|
margin-bottom: 2.5rem;
|
||||||
|
letter-spacing: -0.05rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose h1,
|
||||||
|
article.prose h2,
|
||||||
|
article.prose h3,
|
||||||
|
article.prose h4,
|
||||||
|
.type-prose h1,
|
||||||
|
.type-prose h2,
|
||||||
|
.type-prose h3,
|
||||||
|
.type-prose h4 {
|
||||||
|
margin: 3rem 0 1rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose p,
|
||||||
|
article.prose a,
|
||||||
|
.type-prose p,
|
||||||
|
.type-prose a {
|
||||||
|
color: #ddd;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
line-height: 2.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose a:not(img),
|
||||||
|
.type-prose a:not(img) {
|
||||||
|
text-decoration: underline;
|
||||||
|
text-underline-offset: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose strong,
|
||||||
|
.type-prose strong {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose i,
|
||||||
|
.type-prose i {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose p:not(:last-of-type),
|
||||||
|
.type-prose p:not(:last-of-type) {
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose img, article.prose pre,
|
||||||
|
.type-prose img,
|
||||||
|
.type-prose pre {
|
||||||
|
margin: 1.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose ul,
|
||||||
|
.type-prose ul {
|
||||||
|
margin-left: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose ul li,
|
||||||
|
.type-prose ul li {
|
||||||
|
list-style-type: disc;
|
||||||
|
list-style-position: outside;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose ul li:not(:last-of-type),
|
||||||
|
.type-prose ul li:not(:last-of-type) {
|
||||||
|
margin-bottom: 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose pre,
|
||||||
|
.type-prose pre {
|
||||||
|
background-color: rgba(255, 255, 255, 0.15);
|
||||||
|
padding: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose code,
|
||||||
|
.type-prose code {
|
||||||
|
font-family: "JetBrains Mono", "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", monospace;
|
||||||
|
font-size: 0.96rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.prose p code,
|
||||||
|
article.prose li code,
|
||||||
|
.type-prose p code,
|
||||||
|
.type-prose li code {
|
||||||
|
background-color: rgba(255, 255, 255, 0.15);
|
||||||
|
padding: 0.2rem 0.4rem;
|
||||||
|
}
|
||||||
|
/*# sourceMappingURL=prose.css.map */
|
9
server/static/prose.css.map
Normal file
9
server/static/prose.css.map
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"mappings": "AAIA,AAAA,OAAO,AAAA,MAAM;AACb,WAAW,CAAC;EACV,WAAW,EAAE,wPAGmD;EAChE,aAAa,EAAE,MAAM;EACrB,cAAc,EAAE,QAAQ;CA0EzB;;AAjFD,AASE,OATK,AAAA,MAAM,CASX,EAAE;AATJ,OAAO,AAAA,MAAM,CAUX,EAAE;AAVJ,OAAO,AAAA,MAAM,CAWX,EAAE;AAXJ,OAAO,AAAA,MAAM,CAYX,EAAE;AAXJ,WAAW,CAQT,EAAE;AARJ,WAAW,CAST,EAAE;AATJ,WAAW,CAUT,EAAE;AAVJ,WAAW,CAWT,EAAE,CAAC;EACD,MAAM,EAAE,aAAa;CACtB;;AAdH,AAqBE,OArBK,AAAA,MAAM,CAqBX,CAAC;AArBH,OAAO,AAAA,MAAM,CAsBX,CAAC;AArBH,WAAW,CAoBT,CAAC;AApBH,WAAW,CAqBT,CAAC,CAAC;EACA,KAAK,EAAE,IAAI;EACX,SAAS,EAAE,MAAM;EACjB,WAAW,EAAE,MAAM;CACpB;;AA1BH,AA4BE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A,MAAM,CA8DX,GAAG;AA7DL,WAAW,CA6DT,GAAG,CAAC;EACF,gBAAgB,EAAE,yBAAyB;EAC3C,OAAO,EAAE,MAAM;CAChB;;AAjEH,AAmEE,OAnEK,AAAA,MAAM,CAmEX,IAAI;AAlEN,WAAW,CAkET,IAAI,CAAC;EACH,WAAW,EAAE,yRAIkB;EAC/B,SAAS,EAAE,OAAO;CACnB;;AA1EH,AA4EE,OA5EK,AAAA,MAAM,CA4EX,CAAC,CAAC,IAAI;AA5ER,OAAO,AAAA,MAAM,CA6EX,EAAE,CAAC,IAAI;AA5ET,WAAW,CA2ET,CAAC,CAAC,IAAI;AA3ER,WAAW,CA4ET,EAAE,CAAC,IAAI,CAAC;EACN,gBAAgB,EAAE,yBAAyB;EAC3C,OAAO,EAAE,cAAc;CACxB",
|
||||||
|
"sources": [
|
||||||
|
"prose.scss"
|
||||||
|
],
|
||||||
|
"names": [],
|
||||||
|
"file": "prose.css"
|
||||||
|
}
|
86
server/static/prose.scss
Normal file
86
server/static/prose.scss
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
// Style prose by hand
|
||||||
|
// add .prose to any <article> to activate prose styles
|
||||||
|
// or .type-prose to any element
|
||||||
|
|
||||||
|
article.prose,
|
||||||
|
.type-prose {
|
||||||
|
font-family: "Spectral", "Constantia", "Lucida Bright", "Lucidabright",
|
||||||
|
"Lucida Serif", "Lucida", "DejaVu Serif", "Bitstream Vera Serif",
|
||||||
|
"Liberation Serif", "Georgia", "serif", "Apple Color Emoji",
|
||||||
|
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", serif;
|
||||||
|
margin-bottom: 2.5rem;
|
||||||
|
letter-spacing: -0.05rem;
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4 {
|
||||||
|
margin: 3rem 0 1rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p,
|
||||||
|
li {
|
||||||
|
// max-width: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
p,
|
||||||
|
a {
|
||||||
|
color: #ddd;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
line-height: 2.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not(img) {
|
||||||
|
text-decoration: underline;
|
||||||
|
text-underline-offset: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
p:not(:last-of-type) {
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
img, pre {
|
||||||
|
margin: 1.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
margin-left: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul li {
|
||||||
|
list-style-type: disc;
|
||||||
|
list-style-position: outside;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
&:not(:last-of-type) {
|
||||||
|
margin-bottom: 0.2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background-color: rgba(255, 255, 255, 0.15);
|
||||||
|
padding: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: "JetBrains Mono", "Andale Mono WT", "Andale Mono",
|
||||||
|
"Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono",
|
||||||
|
"Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L",
|
||||||
|
"Courier New", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
|
||||||
|
"Noto Color Emoji", monospace;
|
||||||
|
font-size: 0.96rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
p code,
|
||||||
|
li code {
|
||||||
|
background-color: rgba(255, 255, 255, 0.15);
|
||||||
|
padding: 0.2rem 0.4rem;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
/* This file is compiled to /assets/styles/tailwind.css via script/tailwind */
|
/* This file is compiled to /assets/styles/tailwind.css via script/tailwind */
|
||||||
|
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,200;0,300;1,200;1,300&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,200;0,300;1,200;1,300&display=swap');
|
||||||
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100;0,300;1,100;1,300&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100;0,300;0,600;1,100;1,300;1,600&display=swap');
|
||||||
|
|
||||||
@tailwind base;
|
@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<link rel="icon" href="/static/images/favicon.png">
|
<link rel="icon" href="/static/images/favicon.png">
|
||||||
<link rel="stylesheet" href="/static/styles.css">
|
<link rel="stylesheet" href="/static/styles.css">
|
||||||
|
<link rel="stylesheet" href="/static/prose.css">
|
||||||
|
|
||||||
<title>Zed – a lightning fast, collaborative code editor written natively in Rust</title>
|
<title>Zed – a lightning fast, collaborative code editor written natively in Rust</title>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{#> layout }}
|
{{#> layout }}
|
||||||
|
|
||||||
<div class="container mx-auto max-w-screen-md p-10 pt-20">
|
<div class="container mx-auto max-w-screen-md p-10 pt-20">
|
||||||
<h1 class="text-white text-4xl font-display font-extralight mb-10">The Tech</h1>
|
<h1 class="text-white text-4xl font-display font-extralight mb-10">The Tech ~remove me~</h1>
|
||||||
|
|
||||||
<h2 class="font-display mt-10">Rust – wip</h2>
|
<h2 class="font-display mt-10">Rust – wip</h2>
|
||||||
<p>wip</p>
|
<p>wip</p>
|
||||||
|
|
|
@ -3,11 +3,10 @@
|
||||||
|
|
||||||
<div class="max-w-screen-lg mx-auto text-main font-extralight p-20">
|
<div class="max-w-screen-lg mx-auto text-main font-extralight p-20">
|
||||||
{{#if releases}}
|
{{#if releases}}
|
||||||
<h1 class="text-white text-4xl font-display font-extralight mb-10">Updates</h1>
|
<h1 class="font-display font-extralight mb-10">Updates</h1>
|
||||||
{{#each releases}}
|
{{#each releases}}
|
||||||
<article id="{{name}}" class="mb-20">
|
<article id="{{name}}" class="prose">
|
||||||
<h2 class="text-white font-display font-extralight">Zed {{name}}</h2>
|
<h2 class="font-display font-extralight">{{name}}—<a class="underline mt-5 leading-7" href="/releases/{{tag_name}}/{{assets.0.name}}">Download</a></h2>
|
||||||
<a class="underline mt-5 leading-7" href="/releases/{{tag_name}}/{{assets.0.name}}">Download</a>
|
|
||||||
<div class="mt-5">
|
<div class="mt-5">
|
||||||
{{{body}}}
|
{{{body}}}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue