finetune style and add liga info

This commit is contained in:
Koen Lageveen 2017-07-30 12:12:34 +02:00
parent a46b64cf58
commit bdf940801d
3 changed files with 41 additions and 21 deletions

View File

@ -84,15 +84,14 @@ section.select-list {
overflow: auto;
}
section.select-list .entry {
display: flex;
flex-direction: row;
position: relative;
display: block;
padding: .5em 1em;
}
section.select-list .entry:hover {
background: #fff;
}
section.select-list a[data-value] {
flex: 1;
display: block;
position: relative;
overflow: hidden;
@ -104,24 +103,36 @@ section.select-list a:active .name {
section.select-list .active .name {
font-weight: bold;
}
section.select-list a[rel="external"] {
position: relative;
section.select-list a.website {
position: absolute;
top: 5px;
right: 20px;
opacity: 0;
transition: all .2s ease-in-out;
flex: 0;
font-size: 10px;
padding: 2px 1ex;
}
section.select-list .entry:hover a[rel="external"] {
opacity: .5;
section.select-list a.website span {
display: inline-block;
padding-right: 1ex;
}
section.select-list .entry a[rel="external"]:hover,
section.select-list .entry a[rel="external"]:active {
section.select-list .entry:hover a.website {
color: #e4e4e4;
opacity: 1;
}
section.select-list .entry a[rel="external"]:active {
top: 1px;
section.select-list .entry .active + a.website,
section.select-list .entry .active + a.website,
section.select-list .entry a.website:hover,
section.select-list .entry a.website:active {
background: #e4e4e4;
color: #777;
opacity: 1;
}
section.select-list a.website:active {
margin-top: 1px;
}
section.select-list .details {
opacity: .6;
color: #777;
font-style: italic;
display: block;
font-size: 10px;
@ -227,14 +238,17 @@ label[for="select-theme"] {
.article-wrapper,
form {
width: 100%;
height: 50%;
min-height: 50%;
height: 50vh;
min-height: 50vh;
float: none;
}
section.select-list .entry {
padding: 0 1em;
}
footer h1 + p {
}
@media screen and (max-width: 56em) and (max-height: 36em) {
footer p:first-of-type,
footer p:first-of-type + p {
display: none;
}
}

View File

@ -169,13 +169,15 @@
</section>
<footer>
<h1>Programming Fonts</h1>
<h1><a href="http://programmingfonts.org">Programming Fonts</a></h1>
<p>Test drive over 50 free programming fonts!</p>
<p>
<a href="https://github.com/braver/programmingfonts"><svg class="octicon octicon-mark-github" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a>
</p>
<p>
<a href="http://programmingfonts.org">Blog</a> -
<a href="http://programmingfonts.org/list" rel="external">The full list</a> -
<a href="http://atom.io/packages/fonts" rel="external">Atom package</a> -
<a href="https://github.com/braver/programmingfonts">Github</a>
<a href="https://www.sublimetext.com/docs/3/font.html" rel="external">Sublime Text docs</a>
</p>
</footer>

View File

@ -103,12 +103,16 @@ $(document).ready(function(){
$.getJSON("fonts.json", function(data) {
$.each(data, function(k,v) {
var liga_info = "";
if (v.ligatures) {
liga_info = ", ligatures";
}
$("#select-font").append(
"<div class='entry'><a href='#" + v.alias + "' data-value=\"" + v.alias + "\">" +
"<span class='name'>" + v.name + "</span>" +
"<span class='details'>" + v.author + " (" + v.year + ") — " + v.style + ", " + v.rendering + "</span>" +
"<span class='details'>" + v.author + " (" + v.year + ") — " + v.style + ", " + v.rendering + liga_info + "</span>" +
"</a>" +
"<a href='" + v.website + "' rel=external> " + icon + "</a></div>"
"<a class='website' href='" + v.website + "' rel=external> <span>Info & Download</span>" + icon + "</a></div>"
);
});
selectFont();