indentation fix, start of changing font in editor

This commit is contained in:
Iam Naughton Phier 2015-03-26 18:15:38 +02:00
parent 4bcfeb755c
commit 6d5c51d0e5
3 changed files with 411 additions and 279 deletions

View file

@ -17,7 +17,7 @@ textarea {
}
pre {
font-family: 'TopazPlus a500a1000a2000','mOsOul',Monaco,monospace;
font-family: 'topaz500','mosoul',Monaco,monospace;
font-size: 16;
border: 2px inset #808080;
}
@ -56,12 +56,14 @@ div ul li{
display: inline-block;
}
# this does not actually change anything because the design is set by
# the jquery-ui bit. Altering in the script does work. Here for reference.
/* this does not actually change anything because the design is set by */
/* the jquery-ui bit. Altering in the script does work. Here for reference. */
/*
.45box {
width: 45%;
display: inline-block;
}
*/
div.groupbox p {
margin: .25 ex;
@ -79,7 +81,7 @@ div.groupbox p {
}
#sahlioutput {
font-family: 'TopazPlus a500a1000a2000','mOsOul',Monaco,monospace;
font-family: 'microknight','P0t-nOodle',Monaco,monospace;
font-size: 16;
background: aliceblue;
overflow-wrap: break-word;
@ -96,3 +98,134 @@ div.groupbox p {
padding: 0px;
}
@font-face {
font-family: 'P0t-nOodle';
src: url('fonts/P0T-NOoDLE_v1.0.woff2') format('woff2');
src: url('fonts/P0T-NOoDLE_v1.0.woff') format('woff');
}
@font-face {
font-family: 'MicroKnight';
src: url('fonts/MicroKnightPlus_v1.0.woff2') format('woff2');
src: url('fonts/MicroKnightPlus_v1.0.woff') format('woff');
}
@font-face {
font-family: 'mOsOul';
src: url('fonts/mOsOul_v1.0.woff2') format('woff2');
src: url('fonts/mOsOul_v1.0.woff') format('woff');
}
@font-face {
font-family: 'Topaz1200';
src: url('fonts/TopazPlusA1200.woff') format('woff2');
src: url('fonts/TopazPlusA1200.woff') format('woff');
}
@font-face {
font-family: 'Topaz500';
src: url('fonts/TopazPlusA500.woff2') format('woff2');
src: url('fonts/TopazPlusA500.woff') format('woff');
}
@font-face {
font-family: 'blockzone';
src: url('fonts/BlockZone.woff2') format('woff2');
src: url('fonts/BlockZone.woff') format('woff');
}
.mosoul {
font-family: mOsOul;
text-align: left;
}
.pot-noodle , .p0t-noodle {
font-family: 'P0t-nOodle';
text-align: left;
}
.topaz, .topaz500 {
font-family: 'Topaz500';
text-align: left;
}
.propaz, .topaz1200 {
font-family: 'Topaz1200';
text-align: left;
}
.microknight, .microknightplus {
font-family: 'MicroKnight';
text-align: left;
}
.blockzone, .pcansifont {
font-family: 'blockzone';
text-align: left;
}
@font-face {
font-family: 'P0t-nOodle';
src: url('../fonts/P0T-NOoDLE_v1.0.woff2') format('woff2');
src: url('../fonts/P0T-NOoDLE_v1.0.woff') format('woff');
}
@font-face {
font-family: 'MicroKnight';
src: url('../fonts/MicroKnightPlus_v1.0.woff2') format('woff2');
src: url('../fonts/MicroKnightPlus_v1.0.woff') format('woff');
}
@font-face {
font-family: 'mOsOul';
src: url('../fonts/mOsOul_v1.0.woff2') format('woff2');
src: url('../fonts/mOsOul_v1.0.woff') format('woff');
}
@font-face {
font-family: 'Topaz1200';
src: url('../fonts/TopazPlusA1200.woff') format('woff2');
src: url('../fonts/TopazPlusA1200.woff') format('woff');
}
@font-face {
font-family: 'Topaz500';
src: url('../fonts/TopazPlusA500.woff2') format('woff2');
src: url('../fonts/TopazPlusA500.woff') format('woff');
}
@font-face {
font-family: 'blockzone';
src: url('../fonts/BlockZone.woff2') format('woff2');
src: url('../fonts/BlockZone.woff') format('woff');
}
.mosoul {
font-family: mOsOul;
text-align: left;
}
.pot-noodle , .p0t-noodle {
font-family: 'P0t-nOodle';
text-align: left;
}
.topaz, .topaz500 {
font-family: 'Topaz500';
text-align: left;
}
.propaz, .topaz1200 {
font-family: 'Topaz1200';
text-align: left;
}
.microknight, .microknightplus {
font-family: 'MicroKnight';
text-align: left;
}
.blockzone, .pcansifont {
font-family: 'blockzone';
text-align: left;
}

View file

@ -51,6 +51,7 @@ Also hide the editor until needed, and initialize some elements.
.button { disabled: false}
.click -> loadsahli()
)
$(->
$(".hidden").hide()
$("#entryamiga").button {icons: {primary:"ui-icon-gear"}}
@ -64,14 +65,15 @@ Also hide the editor until needed, and initialize some elements.
@.value = "1"
$(".45box").css {width:'45%',display:'inline-block'}
$(".groupbox p").css {margin:"0 0 .25em 0"}
$(".colorbox").change =>
$(".colorbox").change ->
sahlicolor()
$("#entryfont").change ->
$('pre').css 'font-family',$('#entryfont').val()
$("#entryfilepick").change ->
if @.files[0]? then $("#entryfile").val @.files[0].name
$("#entryfile").click ->
$("#entryfilepick").click()
)
The sahli file definition format is as follows:
@ -85,7 +87,7 @@ The three remaining lines are informational and optional.
The slide format is currently unused, but consists of a background picture,
a html template, and a css file.
class emptyfiledef
class Emptyfiledef
constructor: ->
@file = ""
@name = ""
@ -103,7 +105,7 @@ a html template, and a css file.
class Sahli
constructor: ->
@emptyfiledef = new emptyfiledef
@emptyfiledef = new Emptyfiledef
@emptyslidesdef = {
"background": "",
"template": "",
@ -143,7 +145,7 @@ edit button.
getfilelist()
$('#listappend').button {icons: {primary:"ui-icon-1-n"}}
.click (event) =>
newentry = new emptyfiledef
newentry = new Emptyfiledef
@data.filedata.push newentry
@buildlist @data
$('#listdisplay').button {icons: {primary:"ui-icon-refresh"}}
@ -239,15 +241,12 @@ insert it into the array at end position. A la the draggon-dropping.
event.preventDefault()
@save()
event.currentTarget.previousElementSibling.click()
}]
}
data.amiga = booltoint data.amiga
fcol = colortoname arraytocolor data.color
bcol = colortoname arraytocolor data.bg
$("#entryindex").val pos
$("#entryname").val data.name
$("#entryauthor").val data.author
@ -309,8 +308,8 @@ Resolve ansi or ascii status
Color conversion from array to color item:
This decimal to hex conversion only handles 00-FF but it's fine for this purpose;
we actually _want_ that limitation in the output.
This decimal to hex conversion only handles 00-FF but it's fine for this
purpose; we actually _want_ that limitation in the output.
dec2hex = (num) ->
"#{('000'+num.toString 16).slice -2}"
@ -379,7 +378,8 @@ Similarly, need to be able to get the color index.
names[colorname]
A function for changing the fore and background colors of the sahli ascii example
A function for changing the fore and background colors of the sahli ascii
example
sahlicolor = ->
fg = $('#entrycolor').val()
@ -387,7 +387,8 @@ A function for changing the fore and background colors of the sahli ascii exampl
console.log 'sahlicolor',fg,bg
$('#sahliascii').css {'color':fg,'background':bg}
Function for loading the filelist from the specified directory on the server/filesystem.
Function for loading the filelist from the specified directory on the
server/filesystem.
getfilelist = ->
location = $("#dirlocation").val()
@ -395,16 +396,13 @@ Function for loading the filelist from the specified directory on the server/fil
console.log listing
)
When clicking 'New' we want to make a brand new Sahli, and then clear out
the buttons and create the editor bit as blank.
newsahli = ->
sahli = new Sahli
sahli.data = sahli.empty
newentry = new emptyfiledef
newentry = new Emptyfiledef
sahli.data.filedata.push newentry
sahli.edit()

View file

@ -138,10 +138,11 @@
</div>
<div class='45box'>
<pre id='sahliascii'>
________________________, ._____,
| ___|___ | | | | |_____|
|_____ | _ | | |__| |
|_____|_____|___|__|______|___|
ABCDEFGHIJKLMNOPQRSTUVWXYZ&gt;&lt;~`'"^&amp;eXmPl
abcdefghijklmnopqrstuvwxyz1234567890?+@
* | ___)___ 7 I | | \-~=#/ $
: |_____ | {~} ! | \__[ : #~%
; (_____j__"__l___|__|______]___; 0Oo
</pre>
</div>
</div>