Collection of themes/skins for the Fossil SCM

⌈⌋ ⎇ branch:  Fossil Skins Extra


Update of "GitHub"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: a3ef45346e263bbc947e789f29e465af2165f908
Page Name:GitHub
Date: 2015-02-04 01:56:54
Original User: mario
Mimetype:text/x-markdown
Parent: e49ad50dba6c16dfdc8fd6ebf44cebba731bab86 (diff)
Next 3dd3e342d0cb4dc9d9d2a049ff54ef1681d22d62
Content

GitHub style template

For conveniencing new users, there's now a theme that similates GitHub to some extend.

It provides following features:

  • Now uses the Fossil built-in search function.

  • The avowed file box on the index and wiki pages.

    • Link subdirectories to /wiki/$dirname per default, so they're displayed in unison.
    • File links directly go to /artifact views.

  • An auto-collapsing right side function bar; using Unicode glyphs instead of icons.

  • The clickable language-bar is similar to what GitHub shows, uses fx_stats as source.

  • Social media links within the ★ Star button. The counts are fetched over a remote image API.

  • Most gimmicks implemented as TH1 functions.

Browser support

The styling works well on following browser engines:

  • Gecko (Firefox): ☑

  • WebKit (Chrome): ☑

  • Presto (Opera): ☑

  • Trident (MSIE): who cares?

File box implementation

ui::recent_files outputs table rows according to the passed directory base. It groups directories and files, and cuts out their basenames.

Directories now always link to /wiki?name=$dirname pages. Thus it gets displayed alongside an existing Wiki page on a directory name. - That's backwards to how GitHub works. There the filebox is always there, and a README.md [or whatever] displayed alongside. (The old behaviour was to link to fossils tree/ view for non-existent Wiki pages. But now that the search has been separated from the wiki/ view; that's no longer necessary.)

Social media links API

Upon clicking the ★ Star button, previously hidden links to common sharing sites pop out. They reside in th1x ui::social_media_links.

The numeric display is just a remote image for simplicity.

 http://api.include-once.org/links/social.img.php?url=http://localhost/

Albeit an AJAX call would work too.

 http://api.include-once.org/links/social.ajax.php?url=http://localhost/

Which returns a {name:value,..} list for the mentioned link sharing sites.

Obvious ToDo: Now that the search table building is redundant, implementing the social media API score retrieval in the fossil-stats cron job makes more sense. The remote image request is too sluggish.

CSS

The stylesheet varies upon a simple class= attribute in the <body> tag. It's set to page-index or page-wiki, page-tree, page-timeline etc. according to the current output.

Thus the .optional class for instance can vary the width the of the main pane. It defaults to 82%, but expands to 91% (and the sidebar just 6%) on non-index pages. The sidebar link names disappear through .optional and the .page-TYPE combination as well.