Skip to content

Commit

Permalink
Minor style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MuTsunTsai committed Aug 15, 2022
1 parent ef5c331 commit 5af22fe
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
26 changes: 16 additions & 10 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,25 @@
<table class="w-100">
<tr v-if="store.font.description">
<td>Description</td>
<td :class="{'small':store.font.description.length>200}">{{store.font.description}}</td>
<td :class="{'small':store.font.description.length>200}">
{{store.font.description}}
</td>
</tr>
<tr v-if="store.font.designer">
<td>Designer</td>
<td>
<a :href="store.font.designerURL"
v-if="store.font.designerURL">{{store.font.designer}}</a>
<a :href="store.font.designerURL" v-if="store.font.designerURL">
{{store.font.designer}}
</a>
<span v-else>{{store.font.designer}}</span>
</td>
</tr>
<tr v-if="store.font.manufacturer">
<td>Manufacturer</td>
<td>
<a :href="store.font.vendorURL"
v-if="store.font.vendorURL">{{store.font.manufacturer}}</a>
<a :href="store.font.vendorURL" v-if="store.font.vendorURL">
{{store.font.manufacturer}}
</a>
<span v-else>{{store.font.manufacturer}}</span>
</td>
</tr>
Expand All @@ -113,7 +117,9 @@
</tr>
<tr v-if="store.font.license">
<td>license</td>
<td :class="{'small':store.font.license.length>200}">{{store.font.license}}</td>
<td :class="{'small':store.font.license.length>200}">
{{store.font.license}}
</td>
</tr>
</table>
</div>
Expand All @@ -129,16 +135,16 @@ <h5>Variations</h5>
<div class="d-flex mb-3">
<label class="col-form-label pe-3">Predefined instances:</label>
<div class="flex-grow-1">
<select @change="setInstance(instances[$el.value])" class="form-control">
<option hidden></option>
<select @change="setInstance(instances[$el.value])" class="form-select" required>
<option value="" hidden>Select a predefined instance</option>
<option v-for="(i, j) in instances" :key="i.name+j" :value="j">
{{i.name}}</button>
</select>
</div>
</div>
<div v-for="a in axes" class="mb-1" :key="a">
<input type="range" class="form-range me-4" style="width:10rem;" v-model.number="store.variations[a.tag]"
:min="a.min" :max="a.max" :step="getStep(a)" @input="clear">
<input type="range" class="form-range me-4" style="width:10rem;" @input="clear"
v-model.number="store.variations[a.tag]" :min="a.min" :max="a.max" :step="getStep(a)">
<input type="number" class="form-control form-control-sm d-inline-block me-4" style="width:5rem;"
v-model="store.variations[a.tag]" :min="a.min" :max="a.max" :step="getStep(a)" @input="clear">
<label>{{getAxisName(a)}}</label>
Expand Down
4 changes: 2 additions & 2 deletions docs/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ addEventListener('DOMContentLoaded', () => createApp({
.filter(g => store.features[g] !== false)
.map(g => `'${g}' ${store.features[g] ? "on" : "off"}`)
.join(',');
const vari = !store.font.fvar ? "normal" :
const variation = !store.font.fvar ? "normal" :
store.font.fvar.axes
.map(a => `'${a.tag}' ${store.variations[a.tag]}`)
.join(',');
return `
white-space: pre-line;
font-family: preview${store.previewIndex};
font-feature-settings: ${feat};
font-variation-settings: ${vari};
font-variation-settings: ${variation};
font-size: ${store.previewSize}pt;`;
},
get more() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fontfreeze",
"version": "1.2.2",
"version": "1.2.3",
"description": "Freeze variations and features in font.",
"scripts": {
"serve": "npx serve docs"
Expand Down

0 comments on commit 5af22fe

Please sign in to comment.