Skip to content

Commit 82aa62f

Browse files
committed
Updating Bear style
1 parent 9c74f6a commit 82aa62f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+45986
-110
lines changed

Bear.css

+57-49
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ body {
1616
padding: 0;
1717
background: #fff;
1818
color: #303030;
19-
font-size: 12px;
20-
line-height: 1.5
19+
font-size: 13px;
20+
line-height: 1.5;
2121
}
2222

2323
#wrapper {
24-
padding: 20px;
24+
padding: 40px 20px 600px!important;
2525
margin: 0 auto;
26+
max-width: 700px!important;
2627
}
2728

2829
li {
@@ -84,14 +85,23 @@ a {
8485
transition: color .2s ease-in-out
8586
}
8687

88+
.footnote {
89+
color: rgb(222, 84, 86)!important;
90+
}
91+
8792
a:hover {
8893
color: #3593d9
8994
}
9095

9196
h1, h2, h3, h4, h5 {
92-
margin: 2.75rem 0 2rem;
97+
margin: 2.75rem 0 .5rem;
98+
font-weight: 600;
99+
line-height: 1.15;
100+
}
101+
102+
h4, h5 {
93103
font-weight: 500;
94-
line-height: 1.15
104+
margin: 1rem 0 .5rem;
95105
}
96106

97107
h1 {
@@ -100,19 +110,19 @@ h1 {
100110
}
101111

102112
h2 {
103-
font-size: 1.7em
113+
font-size: 1.8em
104114
}
105115

106116
h3 {
107-
font-size: 1.2em
117+
font-size: 1.5em
108118
}
109119

110120
h4 {
111-
font-size: 1.563em
121+
font-size: 1.2em
112122
}
113123

114124
h5 {
115-
font-size: 1.25em
125+
font-size: 1.2em
116126
}
117127

118128
ul, ol, pre, table, blockquote {
@@ -122,6 +132,8 @@ ul, ol, pre, table, blockquote {
122132

123133
mark {
124134
background: rgb(211, 255, 164);
135+
padding: 0 4px;
136+
border-radius: 4px;
125137
}
126138

127139
blockquote {
@@ -184,12 +196,12 @@ ul ul, ul ol, ol ul, ol ol {
184196
padding-left: 2em;
185197
}
186198

187-
ul li {
199+
ul>li {
188200
list-style-type: none;
189201
position: relative;
190202
}
191203

192-
ul li:not(.task-list-item)::before {
204+
ul>li:not(.task-list-item)::before {
193205
color: rgb(222, 84, 86);
194206
content: '●';
195207
display: inline;
@@ -203,12 +215,12 @@ ol {
203215
counter-reset: list;
204216
}
205217

206-
ol li {
218+
ol>li {
207219
counter-increment: list;
208220
list-style-type: none;
209221
position: relative;
210222
}
211-
ol li:before {
223+
ol>li:before {
212224
color: rgb(222, 84, 86);
213225
content: counter(list) ".";
214226
left:-32px;
@@ -228,7 +240,9 @@ table {
228240
empty-cells: hide;
229241
margin: -1px 0 1.3125em;
230242
padding: 0;
231-
table-layout: fixed
243+
table-layout: fixed;
244+
border-radius: 8px;
245+
width: 100%;
232246
}
233247

234248
caption {
@@ -245,59 +259,64 @@ colgroup {
245259
}
246260

247261
tbody {
248-
display: table-row-group
262+
display: table-row-group;
249263
}
250264

251265
tfoot {
252-
display: table-footer-group
266+
display: table-footer-group;
253267
}
254268

255269
thead {
256-
display: table-header-group
270+
display: table-header-group;
257271
}
258272

259273
td, th {
260-
display: table-cell
274+
display: table-cell;
261275
}
262276

263277
tr {
264-
display: table-row
278+
display: table-row;
265279
}
266280

267-
table th, table td {
268-
font-size: 1.1em;
269-
line-height: 1.3;
270-
padding: .5em 1em 0
281+
table th {
282+
background: #f3f5f7;
283+
font-weight: 600;
271284
}
272285

273-
table thead {
274-
background: rgba(0, 0, 0, 0.15);
275-
border: 1px solid rgba(0, 0, 0, 0.15);
276-
border-bottom: 1px solid rgba(0, 0, 0, 0.2)
286+
table tr:nth-child(even) {
287+
background: #f3f5f7
277288
}
278289

279-
table tbody {
280-
background: rgba(0, 0, 0, 0.05)
290+
291+
table th, table td {
292+
font-size: 1.1em;
293+
line-height: 1.3;
294+
padding: .5em 1.5em;
295+
border: solid 1px #ddd;
281296
}
282297

283298
table tfoot {
284299
background: rgba(0, 0, 0, 0.15);
285300
border: 1px solid rgba(0, 0, 0, 0.15);
286-
border-top: 1px solid rgba(0, 0, 0, 0.2)
301+
border-top: 1px solid rgba(0, 0, 0, 0.2);
287302
}
288303

289304
figure {
290305
display: inline-block;
291306
overflow: hidden;
292307
position: relative;
293-
margin: 1em 0 2em
308+
margin: 1em 0 2em;
294309
}
295310

296311
figcaption {
297312
font-style: italic;
298313
text-align: center;
299314
background: white;
300-
color: #666
315+
color: #666;
316+
}
317+
318+
.underline {
319+
border-bottom: 1px solid rgb(222, 84, 86);
301320
}
302321

303322
.poetry pre {
@@ -306,7 +325,7 @@ figcaption {
306325
font-size: 110% !important;
307326
font-style: italic;
308327
line-height: 1.6em;
309-
margin-left: 1em
328+
margin-left: 1em;
310329
}
311330

312331
.poetry pre code {
@@ -316,19 +335,15 @@ figcaption {
316335
-webkit-hyphens: auto;
317336
-moz-hyphens: auto;
318337
hyphens: auto;
319-
white-space: pre-wrap
320-
}
321-
322-
blockquote p {
323-
338+
white-space: pre-wrap;
324339
}
325340

326341
sup, sub, a.footnote {
327342
font-size: 1.4ex;
328343
height: 0;
329344
line-height: 1;
330345
position: relative;
331-
vertical-align: super
346+
vertical-align: super;
332347
}
333348

334349
sub {
@@ -339,19 +354,12 @@ sub {
339354
p {
340355
font-size: 1.1429em;
341356
line-height: 1.72em;
342-
margin: 1.3125em 0
357+
margin: 0 0 1.3125em;
343358
}
344359

345360
dt, th {
346-
font-weight: 700
347-
}
348-
349-
table tr:nth-child(odd), table th:nth-child(odd), table td:nth-child(odd) {
350-
background: rgba(255, 255, 255, 0.06)
351-
}
352-
353-
table tr:nth-child(even), table td:nth-child(even) {
354-
background: rgba(200, 200, 200, 0.25)
361+
font-weight: 700;
362+
padding: 4px 1em!important;
355363
}
356364

357365
@media print {

brettterpstra-2023.css

+38
Original file line numberDiff line numberDiff line change
@@ -1350,3 +1350,41 @@ body,#wrapper {
13501350
text-align: left;
13511351
text-indent: 0;
13521352
}
1353+
1354+
.inverted,
1355+
.inverted #wrapper {
1356+
background: #333;
1357+
color: #eee!important;
1358+
}
1359+
1360+
.inverted #wrapper h1,
1361+
.inverted #wrapper h2,
1362+
.inverted #wrapper h3,
1363+
.inverted #wrapper h4,
1364+
.inverted #wrapper h5,
1365+
.inverted #wrapper h6 {
1366+
color: #eee;
1367+
}
1368+
1369+
.inverted #wrapper p,
1370+
.inverted #wrapper strong,
1371+
.inverted #wrapper b,
1372+
.inverted #wrapper em,
1373+
.inverted #wrapper th,
1374+
.inverted #wrapper td,
1375+
.inverted #wrapper li {
1376+
color: #eee;
1377+
}
1378+
1379+
.inverted #wrapper pre {
1380+
background: #383838;
1381+
}
1382+
1383+
.inverted #wrapper blockquote {
1384+
background: #555;
1385+
}
1386+
1387+
.inverted #wrapper figcaption {
1388+
background: #4a4a4a;
1389+
color: #eee;
1390+
}

generate_examples/generate.rb

+4-10
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,13 @@ def get_meta(file)
1212
'description' => ''
1313
}
1414
title = content.match(/^\s*Title:(.*?)$/i)
15-
if (title)
16-
data['title'] = title[1].strip
17-
end
15+
data['title'] = title[1].strip if title
1816

1917
author = content.match(/^\s*Author:(.*?)$/i)
20-
if (author)
21-
data['author'] = author[1].strip
22-
end
18+
data['author'] = author[1].strip if author
2319

2420
description = content.match(/^\s*Description:(.*?)$/i)
25-
if (description)
26-
data['description'] = description[1].strip
27-
end
21+
data['description'] = description[1].strip if description
2822

2923
data
3024
end
@@ -33,7 +27,7 @@ def generate_options
3327
metadata = {}
3428
options = []
3529
previews = []
36-
ignored_styles = ["Header.css", "Custom.css"]
30+
ignored_styles = ['Header.css', 'Custom.css']
3731
files = Dir.glob('../*.css').sort_by(&:downcase)
3832
# files.concat(Dir.glob('../*/*.css'))
3933
files.each do |f|

generate_examples/generate_url.cgi

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ end
2323

2424
begin
2525
css = IO.read(File.expand_path(url)).force_encoding('utf-8');
26-
encoded = URI.encode(css.strip).gsub(/=/,'%3D').gsub(/&/,'%26')
27-
print %Q{{"success": true, "url": "x-marked://addstyle?name=#{URI.encode(title)}&css=#{encoded}" }}
26+
encoded = CGI.escape(css.strip).gsub(/=/,'%3D').gsub(/&/,'%26').gsub(/\+/, '%20')
27+
print %({"success": true, "url": "x-marked://addstyle?name=#{CGI.escape(title)}&css=#{encoded}" })
2828
rescue Exception => e
2929
die_error("Failed to read style", e.message)
3030
end

generate_examples/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ <h2>Marked Custom Styles</h2>
7373
<li class="preview"><figure><h3><a href="preview#amj-academic" title="Academic AMJ">Academic AMJ</a></h3><span class="actions"><button data-url="preview#amj-academic" class="button-preview" title="Preview amj-academic">Preview</button><button data-title="Academic AMJ" data-style="styles/amj-academic.css" class="button-add" title="Add to Marked">Install</button></span><a href="preview#amj-academic" title="Academic AMJ"><img src="previews/amj-academic.png"></a><figcaption><p class="byline">by Xule Lin</p><p class="description">Academic style adjusted for Academy of Management Journal</p></figcaption></figure></li>
7474
<li class="preview"><figure><h3><a href="preview#Avenue" title="Avenue">Avenue</a></h3><span class="actions"><button data-url="preview#Avenue" class="button-preview" title="Preview Avenue">Preview</button><button data-title="Avenue" data-style="styles/Avenue.css" class="button-add" title="Add to Marked">Install</button></span><a href="preview#Avenue" title="Avenue"><img src="previews/Avenue.png"></a><figcaption><p class="byline">by Bram de Haan <http://atelierbramdehaan.nl></p><p class="description">modern retro</p></figcaption></figure></li>
7575
<li class="preview"><figure><h3><a href="preview#Bear" title="Bear">Bear</a></h3><span class="actions"><button data-url="preview#Bear" class="button-preview" title="Preview Bear">Preview</button><button data-title="Bear" data-style="styles/Bear.css" class="button-add" title="Add to Marked">Install</button></span><a href="preview#Bear" title="Bear"><img src="previews/Bear.png"></a><figcaption><p class="byline">by Brett Terpstra</p><p class="description">A simulation of Bear.app</p></figcaption></figure></li>
76+
<li class="preview"><figure><h3><a href="preview#brettterpstra-2023" title="BrettTerpstra.com 2023">BrettTerpstra.com 2023</a></h3><span class="actions"><button data-url="preview#brettterpstra-2023" class="button-preview" title="Preview brettterpstra-2023">Preview</button><button data-title="BrettTerpstra.com 2023" data-style="styles/brettterpstra-2023.css" class="button-add" title="Add to Marked">Install</button></span><a href="preview#brettterpstra-2023" title="BrettTerpstra.com 2023"><img src="previews/brettterpstra-2023.png"></a><figcaption><p class="byline">by Brett Terpstra</p><p class="description">Borrowed from brettterpstra.com</p></figcaption></figure></li>
7677
<li class="preview"><figure><h3><a href="preview#brettterpstra" title="BrettTerpstra.com 2020">BrettTerpstra.com 2020</a></h3><span class="actions"><button data-url="preview#brettterpstra" class="button-preview" title="Preview brettterpstra">Preview</button><button data-title="BrettTerpstra.com 2020" data-style="styles/brettterpstra.css" class="button-add" title="Add to Marked">Install</button></span><a href="preview#brettterpstra" title="BrettTerpstra.com 2020"><img src="previews/brettterpstra.png"></a><figcaption><p class="byline">by Brett Terpstra</p><p class="description">Borrowed from from https://brettterpstra.com/</p></figcaption></figure></li>
7778
<li class="preview"><figure><h3><a href="preview#Chicago Academic" title="Chicago Academic">Chicago Academic</a></h3><span class="actions"><button data-url="preview#Chicago+Academic" class="button-preview" title="Preview Chicago Academic">Preview</button><button data-title="Chicago Academic" data-style="styles/Chicago Academic.css" class="button-add" title="Add to Marked">Install</button></span><a href="preview#Chicago+Academic" title="Chicago Academic"><img src="previews/ChicagoAcademic.png"></a><figcaption><p class="byline">by Xule Lin</p><p class="description">Adjusted for Academy of Management Journal</p></figcaption></figure></li>
7879
<li class="preview"><figure><h3><a href="preview#Crim" title="Crim">Crim</a></h3><span class="actions"><button data-url="preview#Crim" class="button-preview" title="Preview Crim">Preview</button><button data-title="Crim" data-style="styles/Crim.css" class="button-add" title="Add to Marked">Install</button></span><a href="preview#Crim" title="Crim"><img src="previews/Crim.png"></a><figcaption><p class="byline">by Michael Chabon</p><p class="description">Typeset novel</p></figcaption></figure></li>
Loading
Loading

0 commit comments

Comments
 (0)