Skip to content

Commit b0a2f9b

Browse files
committed
Change column size and fonts
1 parent 8f93a20 commit b0a2f9b

23 files changed

+5082
-5119
lines changed

Gemfile

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ group :test do
1717
gem "rack-test"
1818
end
1919

20-
group :development do
2120
gem "middleman", "~>3.3.2"
2221
gem "middleman-livereload", "~> 3.1.0"
2322
gem "bourbon"
@@ -26,7 +25,6 @@ group :development do
2625
gem 'dotenv'
2726
gem 'rmagick'
2827
gem 'sprite-factory'
29-
end
3028

3129
group :rake do
3230
gem "rake"

lib/rake/symbol_task.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def define
5656
end
5757

5858
task :resize => @name do
59-
system 'mogrify -path images/latex -thumbnail "70x50>" images/latex/*.png'
59+
system 'mogrify -path images/latex -thumbnail "60x40>" images/latex/*.png'
6060
end
6161

6262
desc "create png images from all symbols"

public/classify.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta content='An approach to simplify finding LaTeX symbols.' name='description'>
88
<meta content='math,LaTeX,productivity,typesetting,science,machine learning,PhD' name='keywords'>
99
<title>Detexify LaTeX handwritten symbol recognition</title>
10-
<link href="stylesheets/style-c4f7f4f6.css" rel="stylesheet" type="text/css" />
10+
<link href="stylesheets/style-984cded6.css" rel="stylesheet" type="text/css" />
1111
<script src="javascripts/shared-9402e458.js" type="text/javascript"></script>
1212
<script src="javascripts/classify-deb1263c.js" type="text/javascript"></script>
1313
</head>

public/images/symbols-3213900e.png

-656 KB
Binary file not shown.

public/images/symbols-a95e7763.png

522 KB
Loading

public/javascripts/symbols-6250dd63.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/javascripts/symbols-9e60fe82.js

-1
This file was deleted.

public/stylesheets/style-984cded6.css

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/stylesheets/style-c4f7f4f6.css

-4
This file was deleted.

public/stylesheets/symbols-84654617.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/stylesheets/symbols-87f7e5eb.css

-1
This file was deleted.

public/symbols.html

+14-11
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<meta content='List of supported LaTeX symbols to be trained and recognized by Detexify' name='description'>
88
<meta content='math,LaTeX,productivity,typesetting,science,machine learning,PhD' name='keywords'>
99
<title>Detexify LaTeX symbol table</title>
10-
<link href="stylesheets/style-c4f7f4f6.css" rel="stylesheet" type="text/css" />
10+
<link href="stylesheets/style-984cded6.css" rel="stylesheet" type="text/css" />
1111
<script src="javascripts/shared-9402e458.js" type="text/javascript"></script>
12-
<script src="javascripts/symbols-9e60fe82.js" type="text/javascript"></script>
12+
<script src="javascripts/symbols-6250dd63.js" type="text/javascript"></script>
1313
</head>
1414
<body class='symbols'>
1515
<div class='container'>
@@ -60,15 +60,18 @@ <h2>What is this?</h2>
6060
</div>
6161
<div id='symbols--list-area'>
6262
<div id='symbols--controls'>
63-
Sort by
64-
<select id='sort'>
65-
<option selected='' value='alpha'>command</option>
66-
<option value='package'>package</option>
67-
<!-- <option value='samples'>number of samples</option> -->
68-
</select>
69-
&mdash;
70-
Filter by
71-
<input id='filter' type='text'>
63+
<div id='sort'>
64+
Sort by
65+
<select>
66+
<option selected='' value='alpha'>command</option>
67+
<option value='package'>package</option>
68+
<!-- <option value='samples'>number of samples</option> -->
69+
</select>
70+
</div>
71+
<div id='filter'>
72+
Filter by
73+
<input type='text'>
74+
</div>
7275
</div>
7376
<div id='symbols--loading'>
7477
<div class='spinner'></div>

source/images/symbols.png

-134 KB
Loading

source/javascripts/symbols.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ ->
3737
populateSymbolList filtered(symbols), target
3838
return
3939

40-
$("#sort").change ->
40+
$("#sort input").change ->
4141
switch $(this).val()
4242
when "alpha"
4343
symbols.sort alphasort
@@ -110,7 +110,7 @@ $ ->
110110
# though we already fired the event because of the timeout
111111
fireChange $(this)
112112

113-
$("#filter").handleKeyboardChange(300).change ->
113+
$("#filter input").handleKeyboardChange(300).change ->
114114
filter = $(this).val()
115115
populateSymbolListWrapper symbols, target
116116
return

source/stylesheets/_canvas.sass

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.canvas
55
width: $canvas-width
66
height: $canvas-height
7+
margin: auto
78
border: 1px solid black
89
z-index: 1
910

@@ -25,7 +26,7 @@
2526
position: absolute
2627
display: inline-block
2728
top: 0
28-
right: 0
29+
right: ($single-column-width - $canvas-width)/2
2930
@extend .fa, .fa-times
3031
color: red
3132
text-decoration: none

source/stylesheets/_layout.sass

+20-16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
=when-two-columns
2+
+min-screen($double-column-width + 2*$outer-padding)
3+
@content
4+
5+
=left-column
6+
width: $single-column-width
7+
float: left
8+
margin: 0 0 $default-margin 0
9+
+when-two-columns
10+
margin-right: $divide
11+
12+
=right-column
13+
width: $single-column-width
14+
float: right
15+
margin: 0 0 $default-margin 0
16+
117
*, *::before, *::after
218
+box-sizing(border-box)
319

@@ -8,21 +24,9 @@ body
824
padding-top: $default-margin
925

1026
.container
11-
padding: 0 $default-margin
27+
padding: 0 $outer-padding
1228
position: relative
1329
margin: 0 auto
14-
width: $width + 2*$default-margin
15-
+min-screen($double-column + 2*$default-margin)
16-
width: $double-column + 2*$default-margin
17-
18-
=left-column
19-
width: $width
20-
float: left
21-
margin: 0 0 $default-margin 0
22-
+min-screen($double-column)
23-
margin-right: $divide
24-
25-
=right-column
26-
width: $width
27-
float: right
28-
margin: 0 0 $default-margin 0
30+
width: $single-column-width + 2*$outer-padding
31+
+when-two-columns
32+
width: $double-column-width + 2*$outer-padding

source/stylesheets/_navigation.sass

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
ul.nav
2+
list-style: none
3+
padding: 0
4+
margin: 0
5+
6+
ul.nav li
7+
display: inline-block
8+
font-size: rem(14)
9+
10+
ul.nav li a:link, ul.nav li a:visited
11+
text-decoration: none
12+
113
ul.nav li.classify
214
border: 1px solid gray
315
padding: 3px 6px

source/stylesheets/_symbol-list.sass

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
ul.symbol-list
2+
display: table
3+
border-collapse: collapse
4+
margin: 0
5+
padding: 0
6+
width: 100%
7+
8+
li
9+
display: table-row
10+
border-top: 1px dotted gray
11+
list-style: none
12+
padding: 0
13+
overflow: hidden
14+
15+
.info
16+
display: table-cell
17+
vertical-align: middle
18+
text-align: left
19+
padding: 1em 0 1em 1em
20+
font-size: rem(12)
21+
code.command
22+
font-size: rem(14)
23+
line-height: rem(30)
24+
code.package
25+
font-size: rem(12)
26+
27+
.symbol
28+
display: table-cell
29+
text-align: center
30+
vertical-align: middle
31+
width: 60px
32+
33+
.symbol img
34+
display: block
35+
border: none
36+
max-width: 60px
37+
max-height: 40px
38+
margin: auto
39+
40+
&:hover
41+
background-color: whitesmoke
42+
43+
&.active:hover,
44+
&.active
45+
background-color: cornsilk

source/stylesheets/_typography.sass

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
body, td
22
font-family: 'Open Sans', sans-serif
3+
font-size: rem(14)
4+
5+
h1, h2, h3, h4
6+
margin-top: 0
37

4-
// FIXME
58
h1
6-
font-size: 31px
7-
line-height: 31px
9+
font-size: rem(30)
10+
line-height: rem(30)
811

912
a:link, a:visited
1013
color: $link-color

source/stylesheets/_variables.sass

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
$link-color: royalblue
22

3-
$width: 400px
3+
$single-column-width: 300px
4+
$outer-padding: 10px
45
$divide: 20px
5-
$double-column: 2 * $width + $divide
6+
$double-column-width: 2 * $single-column-width + $divide
67

7-
$canvas-width: $width
8-
$canvas-height: $width
8+
$canvas-width: $single-column-width - 20px
9+
$canvas-height: $single-column-width - 20px
910

1011
$default-margin: $divide

0 commit comments

Comments
 (0)