JuliaGizmos / Escher.jl

Composable Web UIs in Julia
https://juliagizmos.github.io/Escher.jl
Other
337 stars 63 forks source link

website has no title tag #63

Open waldyrious opened 9 years ago

waldyrious commented 9 years ago

In the browser tab, it shows up as the page URL, "http://escher-jl.org/".

Btw, a favicon would be nice too.

NOTtheMessiah commented 9 years ago

For a static title and favicon, you add the following lines to src/cli/serve.jl under # Include the basics

write(io, "<title> Escher.jl </title>")
write(io, """<link rel="shortcut icon" href="assets/favicon.ico" />""")

and the icon to the assets folder. Maybe something like a penrose triangle or a blivet in the shape of an E?

I think long-term, we need to make the title into its own signal. but how to do so I'm not currently sure.

NOTtheMessiah commented 9 years ago

With improved asset loading, it opens the door for custom favicons. As for the default one, maybe I can suggest this Penrose icon as a placeholder or some variant of it? penrose , generated by this Compose code:

using Compose
using Colors

Compose.set_default_graphic_size(4inch, 4inch)

w = 1/8
h = (√3/2) * w
l = (√3/2)

bgpath = [(w,0),(w,2h),(1-w,2h),(1-w,0)]

face = ( [
    (1/2*w, h),    #left
    (1/2*(1-w),l-h),  #top
    (1 - 2w, 2h),    #right
    (1 - 3w, 2h),    #inright
    (1/2*(1-w),l-3h), #intop
    ( w, 0)         #bottom
])

cols = linspace(LCHab(25,15,0+80),LCHab(75,15,120+80),3)

penrose = compose( context(),
compose(context(),polygon( face),fill(cols[1])),
compose(context(rotation=Rotation(-deg2rad(120),(1/2,l/3))),polygon(face),fill(cols[2])),
compose(context(rotation=Rotation(-deg2rad(-120),(1/2,l/3))),polygon(face),fill(cols[3])),
compose(context(),polygon(bgpath)),
compose(context(rotation=Rotation(deg2rad(120),(1/2,l/3))),polygon(bgpath)),
compose(context(rotation=Rotation(-deg2rad(120),(1/2,l/3))),polygon(bgpath)),
)