Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Tuesday, January 10, 2012

Jan Zwicky, Wittgenstein and Form


I was thinking that had PART ONE had the single line page headers and PART TWO had double-line page headers ... too obvious? A one unit and then a two unit length line as page headers? Golden ratio lengths? Imagine the unexplained subtle elegance of the book without the PART pages themselves being required as partitions.

§

What about a poem which opens with a left indent to
I wonder if it is the case that 
    [and then stanza(s),
    finally ending with
    a right indented ]
        I think that it is so.
Imagine starting to see this as a recurring form in poetry magazines, anthologies.

A paradigm case of  the ugly: a single quote from misguided Ernest Gellner Words and Things, 1st Ed. ?

Dal segno al coda would require us to use U+1D10B as the non-printing HTML UNICODE escape sequence &#1D10B;

The printer or the author was selective in the LW segno chosen?

It was not the segno



Repeat:
And then to the coda.


Sunday, December 11, 2011

Header Image

The blogger.com, i.e., blogspot.com simple template which we have been using has an option to add a background image and to have that image adjust its size to fit.

The result is not acceptable except for the mobile view.

But this one minor edit to the template HTML for the default CSS style gives a good result:

#header img {
width: 100%;
max-width:100%;
margin-$startSide: auto;
margin-$endSide: auto;
}


Select "Proceed" when warned about doing edits to the HTML. Be sure to preview the result before saving the template.

Saturday, July 7, 2007

Sciter, TiScript, DyBase and JSON

If you have ever looked at XUL for Mozilla, you owe it to yourself to look at an alternative way of declaring a UI with JavaScript.
TiScript is an extended-JavaScript with a few twists and it works with DyBase to provide scripting and persistence for Sciter.
Sciter is from Terra Informatica, whom you may know for BlockNote or their SqlLite wrapper.

What Sciter offers is an alternative to JavaScript+DOM. Instead of loading the DOM for an HTML page, the strategy is to use TiScript with a few extensions to CSS.

Sciter offers web developers 8 DOM and Window classes:
  • Element - DOM element. All HTML elements including the document root, frame, inputs, etc. are elements in Sciter.
  • Attributes - a collection of named attributes of any html element.
  • Style - a collection of style attributes applied to any element.
  • Image - bitmap image objects on which you can draw using Graphics methods
  • Graphics - an object wrapper for drawing primitives for drawing on any Element or Image
  • View - represents Sciter window (the main Sciter window and Dialog are views)
  • Event - represents the current UI event.
  • Sciter - a global object holding Sciter application specific methods.


Top level windows are represented by View objects in Sciter. Both the main window of the Sciter.exe application and the client area of the X-Sciter.dll sandbox window are views. Dialog windows also have their associated views.

Each view has a root property which is the root element of the loaded document. The root element in Sciter is the <HTML> element of the loaded document and there is no dedicated Document class because in Sciter the Document is an element tree composed of an element and its children.

Frames and framesets are also ordinary DOM elements. Each has a single child element: the root element of the loaded document. If the document is loaded into a frame, the parent property of the root element of the document will refer to that containing frame element.

These simplifications are intended to make up for inherent weaknesses in how CSS+Javascript is used in web layout to complement simple HTML.

This interests me while I am looking at the separation of concerns which is attempted by Mozilla with XUL for Firefox and for other XPCOM applications outside the browser which use the XPFE (Cross-platform front-end) framework. Sciter+TiScript+JSON is also interesting when contrasted to Rebol/View and the upcoming Liquid-GLayout marriage for Rebol (Rebol does not yet have a cross-platform IDE - which is something else Rebol shares with Oz and Mercury.)

The major change that you will find in TiScript is the use of type to define both classes and modules (namespaces) without the prototype-based emphasis of JavaScript. A class with a this() function has an instance constructor*. In TiScript the prototype field is a reference to a type or is undefined. TiScript also has a nice variant on C# properties to provide set and get accessors for field privacy. Sciter itself uses 'self' to refer to the root object as in self.myFunc()

Corporations in the far east which have used Curl will not want to migrate to XUL+rdf+dtd+css+js and it is hard to imagine ActionScript and Flash as being much more attractive. It would be interesting to know whether TiScript itself would obviate the need for the Google Web Toolkit as a JavaScript nostrum while also streamlining the scripting ( GWT is touted as a remedy for unintended JS closures causing memory leaks under IE - but I should add that GWT does have a fine inexpensive plugin to Eclipse by Instantiations.)

Another point of interest is that TiScript offers JSON persistence through a version of a DyBase library which has been modified to support 'native' TiScript. DyBase is said to have interfaces to PHP, Perl,Python, Rebol and Ruby but I could only find a Smalltalk alpha outside of the home archives of the DyBase author (and none at rebol.org, CPAN or the Python Cheese Shop and no RubyForge or sourceforge entries; the dybase site at garret.ru was off-line this weekend.)

Dybase could be as neglected as the database options offered by associative and hierarchical/network databases (MUMPS, DNS and LDAP are hierarchical) in the world of MySql and XBase. And there is Lazysoft, to which there are links at StumbleUpon and AboutUs.

Perhaps if an AltME group opens on DyBase there will be an opportunity to judge its merits across a few languages. Until then I will watch ltu.

* the author of TiScript is the author of Harmonia, an FLTK for the D language.