Collection of themes/skins for the Fossil SCM

⌈⌋ ⎇ branch:  Fossil Skins Extra


Hex Artifact Content

Artifact b9197fda5971ff3b0e6186fd282feff6e8376e02:

  • File features/github.th1 — part of check-in [d933f24359] at 2021-04-04 22:51:56 on branch trunk — Enable upvar 1 for fx_stats query (user: mario size: 6977)

0000: 23 2d 2d 20 73 65 74 20 61 20 63 6f 75 70 6c 65  #-- set a couple
0010: 20 6f 66 20 76 61 72 69 61 62 6c 65 73 0a 70 72   of variables.pr
0020: 6f 63 20 75 69 3a 3a 76 61 72 73 20 7b 7d 20 7b  oc ui::vars {} {
0030: 0a 20 20 20 23 2d 2d 20 69 6d 70 6f 72 74 0a 20  .   #-- import. 
0040: 20 20 73 65 74 20 63 75 72 72 65 6e 74 5f 70 61    set current_pa
0050: 67 65 20 24 3a 3a 63 75 72 72 65 6e 74 5f 70 61  ge $::current_pa
0060: 67 65 0a 20 20 20 73 65 74 20 62 61 73 65 75 72  ge.   set baseur
0070: 6c 20 24 3a 3a 62 61 73 65 75 72 6c 0a 0a 20 20  l $::baseurl..  
0080: 20 23 2d 2d 20 65 78 70 6f 72 74 20 76 61 72 69   #-- export vari
0090: 61 62 6c 65 73 0a 20 20 20 75 70 76 61 72 20 31  ables.   upvar 1
00a0: 20 70 61 67 65 63 61 74 20 70 61 67 65 63 61 74   pagecat pagecat
00b0: 20 20 20 20 20 20 20 20 20 20 20 20 23 20 69 6e              # in
00c0: 64 65 78 20 7c 20 77 63 6f 6e 74 65 6e 74 20 7c  dex | wcontent |
00d0: 20 77 69 6b 69 20 7c 20 74 72 65 65 20 7c 20 74   wiki | tree | t
00e0: 69 6d 65 6c 69 6e 65 0a 20 20 20 75 70 76 61 72  imeline.   upvar
00f0: 20 31 20 70 61 67 65 6e 61 6d 65 20 70 61 67 65   1 pagename page
0100: 6e 61 6d 65 20 20 20 20 20 20 20 20 20 20 23 20  name          # 
0110: 73 72 63 2f 64 61 74 61 0a 20 20 20 75 70 76 61  src/data.   upva
0120: 72 20 31 20 62 61 73 65 64 6f 6d 61 69 6e 20 62  r 1 basedomain b
0130: 61 73 65 64 6f 6d 61 69 6e 0a 20 20 20 75 70 76  asedomain.   upv
0140: 61 72 20 31 20 73 74 61 74 73 5f 64 65 73 63 72  ar 1 stats_descr
0150: 69 70 74 69 6f 6e 20 73 74 61 74 73 5f 64 65 73  iption stats_des
0160: 63 72 69 70 74 69 6f 6e 0a 20 20 20 75 70 76 61  cription.   upva
0170: 72 20 31 20 73 74 61 74 73 5f 73 6f 63 69 61 6c  r 1 stats_social
0180: 20 73 74 61 74 73 5f 73 6f 63 69 61 6c 0a 20 20   stats_social.  
0190: 20 75 70 76 61 72 20 31 20 73 74 61 74 73 5f 66   upvar 1 stats_f
01a0: 6f 72 6b 73 20 73 74 61 74 73 5f 66 6f 72 6b 73  orks stats_forks
01b0: 0a 0a 20 20 20 23 2d 2d 20 44 65 74 65 72 6d 69  ..   #-- Determi
01c0: 6e 65 20 63 75 72 72 65 6e 74 20 70 61 67 65 20  ne current page 
01d0: 74 79 70 65 0a 20 20 20 73 65 74 20 70 61 67 65  type.   set page
01e0: 6e 61 6d 65 20 22 22 0a 20 20 20 69 66 20 7b 5b  name "".   if {[
01f0: 72 65 67 65 78 70 20 7b 5e 28 69 6e 64 65 78 7c  regexp {^(index|
0200: 68 6f 6d 65 29 5b 3f 5d 3f 7d 20 24 63 75 72 72  home)[?]?} $curr
0210: 65 6e 74 5f 70 61 67 65 5d 7d 20 7b 0a 20 20 20  ent_page]} {.   
0220: 20 20 20 73 65 74 20 70 61 67 65 63 61 74 20 22     set pagecat "
0230: 69 6e 64 65 78 22 0a 20 20 20 7d 20 65 6c 73 65  index".   } else
0240: 20 7b 20 69 66 20 7b 5b 72 65 67 65 78 70 20 7b   { if {[regexp {
0250: 5e 77 69 6b 69 5c 3f 6e 61 6d 65 3d 7d 20 24 63  ^wiki\?name=} $c
0260: 75 72 72 65 6e 74 5f 70 61 67 65 5d 7d 20 7b 0a  urrent_page]} {.
0270: 20 20 20 20 20 20 20 20 20 73 65 74 20 70 61 67           set pag
0280: 65 63 61 74 20 22 77 69 6b 69 22 0a 20 20 20 20  ecat "wiki".    
0290: 20 20 20 20 20 73 65 74 20 70 61 67 65 6e 61 6d       set pagenam
02a0: 65 20 5b 73 74 72 69 6e 67 20 72 61 6e 67 65 20  e [string range 
02b0: 24 63 75 72 72 65 6e 74 5f 70 61 67 65 20 31 30  $current_page 10
02c0: 20 32 30 34 38 5d 0a 20 20 20 7d 20 65 6c 73 65   2048].   } else
02d0: 20 7b 0a 20 20 20 20 20 20 73 65 74 20 70 61 67   {.      set pag
02e0: 65 63 61 74 20 24 63 75 72 72 65 6e 74 5f 70 61  ecat $current_pa
02f0: 67 65 0a 20 20 20 7d 20 7d 0a 0a 20 20 20 23 2d  ge.   } }..   #-
0300: 2d 20 53 70 6c 69 74 20 64 6f 6d 61 69 6e 20 6e  - Split domain n
0310: 61 6d 65 20 66 72 6f 6d 20 62 61 73 65 75 72 6c  ame from baseurl
0320: 0a 20 20 20 73 65 74 20 62 61 73 65 64 6f 6d 61  .   set basedoma
0330: 69 6e 20 5b 73 74 72 69 6e 67 20 72 61 6e 67 65  in [string range
0340: 20 24 62 61 73 65 75 72 6c 20 5b 65 78 70 72 20   $baseurl [expr 
0350: 37 2b 5b 65 78 70 72 20 7b 5b 73 74 72 69 6e 67  7+[expr {[string
0360: 20 72 61 6e 67 65 20 24 62 61 73 65 75 72 6c 20   range $baseurl 
0370: 34 20 34 5d 20 65 71 20 22 73 22 7d 5d 5d 20 5b  4 4] eq "s"}]] [
0380: 65 78 70 72 20 37 2b 5b 73 74 72 69 6e 67 20 66  expr 7+[string f
0390: 69 72 73 74 20 22 2f 22 20 5b 73 74 72 69 6e 67  irst "/" [string
03a0: 20 72 61 6e 67 65 20 22 24 62 61 73 65 75 72 6c   range "$baseurl
03b0: 2f 22 20 38 20 35 30 5d 5d 5d 5d 0a 0a 20 20 20  /" 8 50]]]]..   
03c0: 23 2d 2d 20 50 72 6f 6a 65 63 74 20 73 74 61 74  #-- Project stat
03d0: 73 0a 20 20 20 73 65 74 20 73 74 61 74 73 5f 64  s.   set stats_d
03e0: 65 73 63 72 69 70 74 69 6f 6e 20 5b 73 65 74 74  escription [sett
03f0: 69 6e 67 20 70 72 6f 6a 65 63 74 2d 64 65 73 63  ing project-desc
0400: 72 69 70 74 69 6f 6e 5d 0a 20 20 20 73 65 74 20  ription].   set 
0410: 73 74 61 74 73 5f 73 6f 63 69 61 6c 20 30 0a 20  stats_social 0. 
0420: 20 20 73 65 74 20 73 74 61 74 73 5f 66 6f 72 6b    set stats_fork
0430: 73 20 31 0a 20 20 20 63 61 74 63 68 20 7b 20 71  s 1.   catch { q
0440: 75 65 72 79 20 7b 20 53 45 4c 45 43 54 20 6e 61  uery { SELECT na
0450: 6d 65 2c 76 61 6c 75 65 20 46 52 4f 4d 20 66 78  me,value FROM fx
0460: 5f 73 74 61 74 73 20 57 48 45 52 45 20 6e 61 6d  _stats WHERE nam
0470: 65 20 47 4c 4f 42 20 27 73 74 61 74 73 5f 2a 27  e GLOB 'stats_*'
0480: 20 7d 20 7b 0a 20 20 20 20 20 20 73 65 74 20 22   } {.      set "
0490: 24 6e 61 6d 65 22 20 22 24 76 61 6c 75 65 22 0a  $name" "$value".
04a0: 20 20 20 20 20 20 75 70 76 61 72 20 31 20 24 6e        upvar 1 $n
04b0: 61 6d 65 20 24 6e 61 6d 65 0a 20 20 20 7d 20 7d  ame $name.   } }
04c0: 0a 7d 0a 0a 0a 23 2d 2d 20 46 6f 72 20 6f 75 74  .}...#-- For out
04d0: 70 75 74 74 69 6e 67 20 63 6c 61 73 73 3d 63 75  putting class=cu
04e0: 72 72 65 6e 74 20 69 6e 20 23 73 69 64 65 62 61  rrent in #sideba
04f0: 72 0a 70 72 6f 63 20 63 75 72 72 65 6e 74 20 7b  r.proc current {
0500: 6e 61 6d 65 7d 20 7b 0a 20 20 20 75 70 76 61 72  name} {.   upvar
0510: 20 31 20 70 61 67 65 63 61 74 20 70 61 67 65 63   1 pagecat pagec
0520: 61 74 0a 20 20 20 69 66 20 5b 72 65 67 65 78 70  at.   if [regexp
0530: 20 22 5e 28 24 6e 61 6d 65 29 22 20 24 70 61 67   "^($name)" $pag
0540: 65 63 61 74 5d 20 7b 20 70 75 74 73 20 7b 20 63  ecat] { puts { c
0550: 6c 61 73 73 3d 63 75 72 72 65 6e 74 7d 20 7d 0a  lass=current} }.
0560: 7d 0a 0a 0a 23 2d 2d 20 54 75 72 6e 20 63 6f 6e  }...#-- Turn con
0570: 66 69 67 3a 73 69 74 65 6d 61 70 2d 2a 20 75 72  fig:sitemap-* ur
0580: 6c 73 20 69 6e 74 6f 20 62 75 74 74 6f 6e 20 6c  ls into button l
0590: 69 6e 6b 73 0a 70 72 6f 63 20 75 69 3a 3a 73 69  inks.proc ui::si
05a0: 74 65 6d 61 70 5f 6c 69 6e 6b 73 20 7b 7d 20 7b  temap_links {} {
05b0: 0a 20 20 20 73 65 74 20 63 6f 6c 6f 72 20 22 67  .   set color "g
05c0: 72 65 65 6e 22 0a 20 20 20 66 6f 72 65 61 63 68  reen".   foreach
05d0: 20 6e 61 6d 65 20 22 64 6f 77 6e 6c 6f 61 64 20   name "download 
05e0: 64 6f 63 69 64 78 20 6c 69 63 65 6e 73 65 20 63  docidx license c
05f0: 6f 6e 74 61 63 74 20 63 68 61 6e 67 65 6c 6f 67  ontact changelog
0600: 20 6e 65 77 73 20 66 72 65 73 68 63 6f 64 65 20   news freshcode 
0610: 72 65 70 6f 73 69 74 6f 72 79 20 64 6f 61 70 20  repository doap 
0620: 70 72 6f 6a 65 63 74 2e 6a 73 6f 6e 22 20 7b 0a  project.json" {.
0630: 20 20 20 20 20 20 73 65 74 20 75 72 6c 20 5b 73        set url [s
0640: 65 74 74 69 6e 67 20 73 69 74 65 6d 61 70 2d 24  etting sitemap-$
0650: 6e 61 6d 65 5d 0a 20 20 20 20 20 20 69 66 20 7b  name].      if {
0660: 5b 73 74 72 69 6e 67 20 6c 65 6e 67 74 68 20 24  [string length $
0670: 75 72 6c 5d 7d 20 7b 0a 20 20 20 20 20 20 20 20  url]} {.        
0680: 20 68 74 6d 6c 20 22 3c 61 20 68 72 65 66 3d 27   html "<a href='
0690: 24 75 72 6c 27 20 63 6c 61 73 73 3d 27 62 75 74  $url' class='but
06a0: 74 6f 6e 20 24 63 6f 6c 6f 72 20 70 72 6f 6a 2d  ton $color proj-
06b0: 73 69 74 65 6d 61 70 27 3e 24 6e 61 6d 65 3c 2f  sitemap'>$name</
06c0: 61 3e 22 0a 20 20 20 20 20 20 7d 0a 20 20 20 20  a>".      }.    
06d0: 20 20 73 65 74 20 63 6f 6c 6f 72 20 22 77 68 69    set color "whi
06e0: 74 65 22 0a 20 20 20 7d 0a 7d 0a 0a 23 2d 2d 20  te".   }.}..#-- 
06f0: 4f 72 64 65 72 65 64 20 6c 69 73 74 20 6f 66 20  Ordered list of 
0700: 70 72 6f 6a 65 63 74 20 73 74 61 74 69 73 74 69  project statisti
0710: 63 73 20 28 77 69 6c 6c 20 70 6f 70 75 6c 61 74  cs (will populat
0720: 65 20 67 6c 6f 62 61 6c 20 24 73 74 61 74 73 28  e global $stats(
0730: 29 20 61 72 72 61 79 29 0a 70 72 6f 63 20 75 69  ) array).proc ui
0740: 3a 3a 73 74 61 74 73 20 7b 7d 20 7b 0a 20 20 20  ::stats {} {.   
0750: 75 70 6c 65 76 65 6c 20 31 20 7b 20 71 75 65 72  uplevel 1 { quer
0760: 79 20 7b 53 45 4c 45 43 54 0a 20 20 20 20 20 28  y {SELECT.     (
0770: 53 45 4c 45 43 54 20 63 6f 75 6e 74 28 6f 62 6a  SELECT count(obj
0780: 69 64 29 20 46 52 4f 4d 20 65 76 65 6e 74 20 57  id) FROM event W
0790: 48 45 52 45 20 74 79 70 65 3d 27 63 69 27 20 4c  HERE type='ci' L
07a0: 49 4d 49 54 20 31 29 20 41 53 20 60 73 74 61 74  IMIT 1) AS `stat
07b0: 73 5f 63 68 65 63 6b 69 6e 73 60 2c 0a 20 20 20  s_checkins`,.   
07c0: 20 20 28 53 45 4c 45 43 54 20 63 6f 75 6e 74 28    (SELECT count(
07d0: 6e 61 6d 65 29 20 46 52 4f 4d 20 66 69 6c 65 6e  name) FROM filen
07e0: 61 6d 65 20 4c 49 4d 49 54 20 31 29 20 41 53 20  ame LIMIT 1) AS 
07f0: 60 73 74 61 74 73 5f 66 69 6c 65 73 60 2c 0a 20  `stats_files`,. 
0800: 20 20 20 20 28 53 45 4c 45 43 54 20 63 6f 75 6e      (SELECT coun
0810: 74 28 73 74 61 74 75 73 29 20 46 52 4f 4d 20 74  t(status) FROM t
0820: 69 63 6b 65 74 20 4c 49 4d 49 54 20 31 29 20 41  icket LIMIT 1) A
0830: 53 20 60 73 74 61 74 73 5f 74 69 63 6b 65 74 73  S `stats_tickets
0840: 60 2c 0a 20 20 20 20 20 28 53 45 4c 45 43 54 20  `,.     (SELECT 
0850: 63 6f 75 6e 74 28 44 49 53 54 49 4e 43 54 20 75  count(DISTINCT u
0860: 73 65 72 29 20 46 52 4f 4d 20 65 76 65 6e 74 20  ser) FROM event 
0870: 4c 49 4d 49 54 20 31 29 20 41 53 20 60 73 74 61  LIMIT 1) AS `sta
0880: 74 73 5f 64 65 76 65 6c 6f 70 65 72 73 60 2c 0a  ts_developers`,.
0890: 20 20 20 20 20 28 53 45 4c 45 43 54 20 63 6f 75       (SELECT cou
08a0: 6e 74 28 44 49 53 54 49 4e 43 54 20 76 61 6c 75  nt(DISTINCT valu
08b0: 65 29 20 46 52 4f 4d 20 74 61 67 78 72 65 66 20  e) FROM tagxref 
08c0: 57 48 45 52 45 20 74 61 67 69 64 3d 38 29 20 41  WHERE tagid=8) A
08d0: 53 20 60 73 74 61 74 73 5f 62 72 61 6e 63 68 65  S `stats_branche
08e0: 73 60 2c 0a 20 20 20 20 20 28 53 45 4c 45 43 54  s`,.     (SELECT
08f0: 20 63 6f 75 6e 74 28 74 61 67 6e 61 6d 65 29 20   count(tagname) 
0900: 46 52 4f 4d 20 74 61 67 20 57 48 45 52 45 20 74  FROM tag WHERE t
0910: 61 67 6e 61 6d 65 20 4c 49 4b 45 20 27 73 79 6d  agname LIKE 'sym
0920: 2d 25 27 29 20 41 53 20 60 73 74 61 74 73 5f 74  -%') AS `stats_t
0930: 61 67 73 60 2c 0a 20 20 20 20 20 28 53 45 4c 45  ags`,.     (SELE
0940: 43 54 20 63 6f 75 6e 74 28 74 61 67 6e 61 6d 65  CT count(tagname
0950: 29 20 46 52 4f 4d 20 74 61 67 20 57 48 45 52 45  ) FROM tag WHERE
0960: 20 74 61 67 6e 61 6d 65 20 52 45 47 45 58 50 20   tagname REGEXP 
0970: 27 5e 73 79 6d 5b 2d 61 2d 7a 30 2d 39 5f 2e 5d  '^sym[-a-z0-9_.]
0980: 2b 5c 64 2b 5c 2e 5c 64 2b 27 29 20 41 53 20 60  +\d+\.\d+') AS `
0990: 73 74 61 74 73 5f 72 65 6c 65 61 73 65 73 60 0a  stats_releases`.
09a0: 20 20 20 7d 20 7b 7d 20 7d 0a 7d 0a 0a 23 2d 2d     } {} }.}..#--
09b0: 20 4c 61 6e 67 75 61 67 65 2f 43 6f 6e 74 65 6e   Language/Conten
09c0: 74 20 73 74 61 74 69 73 74 69 63 73 20 28 6f 75  t statistics (ou
09d0: 74 70 75 74 73 20 63 6f 6c 6f 72 65 64 20 62 61  tputs colored ba
09e0: 72 20 67 72 61 70 68 29 0a 70 72 6f 63 20 75 69  r graph).proc ui
09f0: 3a 3a 6c 61 6e 67 5f 73 74 61 74 73 20 7b 7d 20  ::lang_stats {} 
0a00: 7b 0a 20 20 20 23 20 66 65 74 63 68 20 24 6c 61  {.   # fetch $la
0a10: 6e 67 28 6a 73 2f 2e 2e 2e 29 2c 20 24 6c 61 6e  ng(js/...), $lan
0a20: 67 5f 63 6f 6c 6f 72 28 6a 73 29 2c 20 24 6c 61  g_color(js), $la
0a30: 6e 67 5f 6c 69 73 74 2c 20 24 74 6f 74 61 6c 5f  ng_list, $total_
0a40: 73 69 7a 65 0a 20 20 20 71 75 65 72 79 20 7b 53  size.   query {S
0a50: 45 4c 45 43 54 20 6e 61 6d 65 2c 20 76 61 6c 75  ELECT name, valu
0a60: 65 20 46 52 4f 4d 20 66 78 5f 73 74 61 74 73 20  e FROM fx_stats 
0a70: 4f 52 44 45 52 20 62 79 20 56 41 4c 55 45 20 44  ORDER by VALUE D
0a80: 45 53 43 7d 20 7b 0a 20 20 20 20 20 20 73 65 74  ESC} {.      set
0a90: 20 24 6e 61 6d 65 20 24 76 61 6c 75 65 0a 20 20   $name $value.  
0aa0: 20 7d 0a 20 20 20 23 20 6f 75 74 70 75 74 20 63   }.   # output c
0ab0: 6f 6c 6f 72 20 62 61 72 20 66 6f 72 20 6c 61 6e  olor bar for lan
0ac0: 67 75 61 67 65 20 70 72 6f 70 6f 72 74 69 6f 6e  guage proportion
0ad0: 73 0a 20 20 20 23 68 74 6d 6c 20 22 3c 64 69 76  s.   #html "<div
0ae0: 20 63 6c 61 73 73 3d 6c 61 6e 67 75 61 67 65 2d   class=language-
0af0: 62 61 72 20 73 74 79 6c 65 3d 27 77 69 64 74 68  bar style='width
0b00: 3a 31 30 30 25 3b 20 68 65 69 67 68 74 3a 33 70  :100%; height:3p
0b10: 74 3b 20 62 6f 78 2d 73 69 7a 69 6e 67 3a 62 6f  t; box-sizing:bo
0b20: 72 64 65 72 2d 62 6f 78 3b 27 3e 22 0a 20 20 20  rder-box;'>".   
0b30: 66 6f 72 65 61 63 68 20 6e 61 6d 65 20 24 6c 61  foreach name $la
0b40: 6e 67 5f 6c 69 73 74 20 7b 0a 20 20 20 20 20 20  ng_list {.      
0b50: 73 65 74 20 70 65 72 63 65 6e 74 20 22 5b 65 78  set percent "[ex
0b60: 70 72 20 24 6c 61 6e 67 28 24 6e 61 6d 65 29 2a  pr $lang($name)*
0b70: 31 30 30 5d 25 22 0a 20 20 20 20 20 20 68 74 6d  100]%".      htm
0b80: 6c 20 22 3c 73 70 61 6e 20 63 6c 61 73 73 3d 63  l "<span class=c
0b90: 6f 64 65 2d 72 61 74 65 2d 24 6e 61 6d 65 20 73  ode-rate-$name s
0ba0: 74 79 6c 65 3d 27 68 65 69 67 68 74 3a 31 30 30  tyle='height:100
0bb0: 25 3b 20 77 69 64 74 68 3a 24 70 65 72 63 65 6e  %; width:$percen
0bc0: 74 3b 20 64 69 73 70 6c 61 79 3a 69 6e 6c 69 6e  t; display:inlin
0bd0: 65 2d 62 6c 6f 63 6b 3b 20 62 61 63 6b 67 72 6f  e-block; backgro
0be0: 75 6e 64 2d 63 6f 6c 6f 72 3a 23 24 6c 61 6e 67  und-color:#$lang
0bf0: 5f 63 6f 6c 6f 72 28 24 6e 61 6d 65 29 27 20 74  _color($name)' t
0c00: 69 74 6c 65 3d 27 24 70 65 72 63 65 6e 74 20 24  itle='$percent $
0c10: 6e 61 6d 65 27 3e 3c 2f 73 70 61 6e 3e 22 3b 0a  name'></span>";.
0c20: 20 20 20 7d 0a 20 20 20 23 68 74 6d 6c 20 22 3c     }.   #html "<
0c30: 2f 64 69 76 3e 22 3b 0a 7d 0a 0a 23 2d 2d 20 70  /div>";.}..#-- p
0c40: 72 69 6e 74 20 74 77 6f 20 74 61 62 6c 65 20 72  rint two table r
0c50: 6f 77 73 20 66 6f 72 20 6c 61 73 74 20 63 6f 6d  ows for last com
0c60: 6d 69 74 0a 70 72 6f 63 20 75 69 3a 3a 6c 61 73  mit.proc ui::las
0c70: 74 5f 63 6f 6d 6d 69 74 20 7b 7d 20 7b 0a 20 20  t_commit {} {.  
0c80: 20 71 75 65 72 79 20 7b 0a 20 20 20 20 20 20 20   query {.       
0c90: 53 45 4c 45 43 54 20 2a 2c 20 43 41 53 54 28 6a  SELECT *, CAST(j
0ca0: 75 6c 69 61 6e 64 61 79 28 27 6e 6f 77 27 29 2d  ulianday('now')-
0cb0: 6d 74 69 6d 65 20 41 53 20 49 4e 54 29 20 41 53  mtime AS INT) AS
0cc0: 20 61 67 65 2c 20 73 75 62 73 74 72 28 63 6f 6d   age, substr(com
0cd0: 6d 65 6e 74 2c 30 2c 31 39 39 29 20 41 53 20 6d  ment,0,199) AS m
0ce0: 73 67 2c 20 73 75 62 73 74 72 28 75 75 69 64 2c  sg, substr(uuid,
0cf0: 20 30 2c 20 31 30 29 20 41 53 20 73 68 6f 72 74   0, 10) AS short
0d00: 5f 75 75 69 64 0a 20 20 20 20 20 20 20 46 52 4f  _uuid.       FRO
0d10: 4d 20 65 76 65 6e 74 20 4a 4f 49 4e 20 62 6c 6f  M event JOIN blo
0d20: 62 20 4f 4e 20 62 6c 6f 62 2e 72 69 64 3d 65 76  b ON blob.rid=ev
0d30: 65 6e 74 2e 6f 62 6a 69 64 0a 20 20 20 20 20 20  ent.objid.      
0d40: 20 57 48 45 52 45 20 74 79 70 65 3d 27 63 69 27   WHERE type='ci'
0d50: 20 4f 52 44 45 52 20 42 59 20 6d 74 69 6d 65 20   ORDER BY mtime 
0d60: 44 45 53 43 20 4c 49 4d 49 54 20 31 0a 20 20 20  DESC LIMIT 1.   
0d70: 7d 20 7b 0a 20 20 20 20 20 20 68 74 6d 6c 20 22  } {.      html "
0d80: 20 20 3c 74 72 3e 3c 74 68 20 63 6f 6c 73 70 61    <tr><th colspa
0d90: 6e 3d 33 3e 24 6d 73 67 3c 2f 74 68 3e 3c 2f 74  n=3>$msg</th></t
0da0: 72 3e 22 3b 0a 20 20 20 20 20 20 68 74 6d 6c 20  r>";.      html 
0db0: 22 20 20 3c 74 72 3e 3c 74 68 20 63 6f 6c 73 70  "  <tr><th colsp
0dc0: 61 6e 3d 33 20 73 74 79 6c 65 3d 62 61 63 6b 67  an=3 style=backg
0dd0: 72 6f 75 6e 64 3a 23 66 66 66 3e 3c 61 20 68 72  round:#fff><a hr
0de0: 65 66 3d 27 74 69 6d 65 6c 69 6e 65 3f 75 3d 24  ef='timeline?u=$
0df0: 75 73 65 72 27 20 63 6c 61 73 73 3d 75 73 65 72  user' class=user
0e00: 3e 24 75 73 65 72 3c 2f 61 3e 20 61 75 74 68 6f  >$user</a> autho
0e10: 72 65 64 20 24 61 67 65 20 64 61 79 73 20 61 67  red $age days ag
0e20: 6f 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 73  o.            <s
0e30: 70 61 6e 20 73 74 79 6c 65 3d 66 6c 6f 61 74 3a  pan style=float:
0e40: 72 69 67 68 74 3e 6c 61 73 74 20 63 68 65 63 6b  right>last check
0e50: 69 6e 20 3c 61 20 68 72 65 66 3d 27 63 69 2f 24  in <a href='ci/$
0e60: 75 75 69 64 27 3e 24 73 68 6f 72 74 5f 75 75 69  uuid'>$short_uui
0e70: 64 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 67 6c  d <span class=gl
0e80: 79 70 68 3e 26 23 78 32 33 39 38 3b 3c 2f 73 70  yph>&#x2398;</sp
0e90: 61 6e 3e 3c 2f 61 3e 3c 2f 73 70 61 6e 3e 3c 2f  an></a></span></
0ea0: 74 68 3e 3c 2f 74 72 3e 22 3b 0a 20 20 20 7d 0a  th></tr>";.   }.
0eb0: 7d 0a 0a 23 2d 2d 20 6f 75 74 70 75 74 73 20 74  }..#-- outputs t
0ec0: 61 62 6c 65 20 72 6f 77 73 20 63 6f 6e 74 61 69  able rows contai
0ed0: 6e 69 6e 67 20 74 6f 70 2d 6c 65 76 65 6c 20 66  ning top-level f
0ee0: 69 6c 65 6e 61 6d 65 73 20 61 6e 64 20 72 65 63  ilenames and rec
0ef0: 65 6e 74 20 63 68 65 63 6b 69 6e 20 63 6f 6d 6d  ent checkin comm
0f00: 65 6e 74 73 0a 70 72 6f 63 20 75 69 3a 3a 72 65  ents.proc ui::re
0f10: 63 65 6e 74 5f 66 69 6c 65 73 20 7b 64 69 72 6e  cent_files {dirn
0f20: 61 6d 65 7d 20 7b 0a 20 20 20 73 65 74 20 73 65  ame} {.   set se
0f30: 65 6e 20 22 28 2e 67 69 74 69 67 6e 6f 72 65 29  en "(.gitignore)
0f40: 22 0a 20 20 20 0a 20 20 20 23 20 73 65 61 72 63  ".   .   # searc
0f50: 68 20 66 69 6c 65 73 20 75 73 69 6e 67 20 64 69  h files using di
0f60: 72 65 63 74 6f 72 79 20 61 73 20 62 61 73 65 20  rectory as base 
0f70: 70 61 74 68 0a 20 20 20 73 65 74 20 62 72 61 6e  path.   set bran
0f80: 63 68 20 22 74 72 75 6e 6b 22 0a 20 20 20 73 65  ch "trunk".   se
0f90: 74 20 63 75 74 6e 61 6d 65 20 30 0a 20 20 20 73  t cutname 0.   s
0fa0: 65 74 20 41 4e 44 5f 44 49 52 20 22 22 0a 20 20  et AND_DIR "".  
0fb0: 20 69 66 20 7b 5b 73 74 72 69 6e 67 20 6c 65 6e   if {[string len
0fc0: 67 74 68 20 24 64 69 72 6e 61 6d 65 5d 7d 20 7b  gth $dirname]} {
0fd0: 0a 20 20 20 20 20 20 20 73 65 74 20 64 69 72 6e  .       set dirn
0fe0: 61 6d 65 20 22 24 64 69 72 6e 61 6d 65 2f 22 0a  ame "$dirname/".
0ff0: 20 20 20 20 20 20 20 73 65 74 20 63 75 74 6e 61         set cutna
1000: 6d 65 20 5b 73 74 72 69 6e 67 20 6c 65 6e 67 74  me [string lengt
1010: 68 20 24 64 69 72 6e 61 6d 65 5d 0a 20 20 20 20  h $dirname].    
1020: 20 20 20 73 65 74 20 41 4e 44 5f 44 49 52 20 22     set AND_DIR "
1030: 20 41 4e 44 20 73 75 62 73 74 72 28 6e 61 6d 65   AND substr(name
1040: 2c 20 30 2c 20 5c 24 63 75 74 6e 61 6d 65 2b 31  , 0, \$cutname+1
1050: 29 20 3d 20 5c 24 64 69 72 6e 61 6d 65 20 22 0a  ) = \$dirname ".
1060: 20 20 20 7d 0a 0a 20 20 20 23 20 66 69 6c 65 73     }..   # files
1070: 20 20 20 2f 2f 20 76 63 61 63 68 65 2e 72 69 64     // vcache.rid
1080: 3d 6d 6c 69 6e 6b 2e 66 69 64 20 77 6f 75 6c 64  =mlink.fid would
1090: 20 62 65 20 65 61 73 69 65 72 20 74 6f 20 73 6b   be easier to sk
10a0: 69 70 20 64 65 6c 65 74 65 64 20 66 69 6c 65 73  ip deleted files
10b0: 2c 20 62 75 74 20 61 63 63 65 73 73 20 69 73 20  , but access is 
10c0: 70 72 6f 68 69 62 69 74 65 64 28 3f 29 0a 20 20  prohibited(?).  
10d0: 20 71 75 65 72 79 20 22 0a 20 20 20 20 20 20 20   query ".       
10e0: 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 0a  SELECT DISTINCT.
10f0: 20 20 20 20 20 20 20 20 20 20 6d 2e 66 6e 69 64            m.fnid
1100: 2c 20 6d 2e 66 69 64 2c 20 4d 41 58 28 6d 2e 6d  , m.fid, MAX(m.m
1110: 69 64 29 2c 0a 20 20 20 20 20 20 20 20 20 20 49  id),.          I
1120: 4e 53 54 52 28 53 55 42 53 54 52 28 6e 61 6d 65  NSTR(SUBSTR(name
1130: 2c 5c 24 63 75 74 6e 61 6d 65 2b 31 29 2c 27 2f  ,\$cutname+1),'/
1140: 27 29 3e 30 20 20 41 53 20 20 69 73 5f 64 69 72  ')>0  AS  is_dir
1150: 2c 0a 20 20 20 20 20 20 20 20 20 20 6e 61 6d 65  ,.          name
1160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
1170: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
1180: 41 53 20 20 70 61 74 68 6e 61 6d 65 2c 0a 20 20  AS  pathname,.  
1190: 20 20 20 20 20 20 20 20 62 66 2e 72 69 64 20 20          bf.rid  
11a0: 20 41 53 20 20 66 6e 5f 72 69 64 2c 20 20 20 20   AS  fn_rid,    
11b0: 20 62 66 2e 75 75 69 64 20 20 20 20 41 53 20 20   bf.uuid    AS  
11c0: 66 6e 5f 75 75 69 64 2c 0a 20 20 20 20 20 20 20  fn_uuid,.       
11d0: 20 20 20 62 6d 2e 72 69 64 20 20 20 41 53 20 20     bm.rid   AS  
11e0: 63 69 5f 72 69 64 2c 20 20 20 20 20 62 6d 2e 75  ci_rid,     bm.u
11f0: 75 69 64 20 20 20 20 41 53 20 20 63 69 5f 75 75  uid    AS  ci_uu
1200: 69 64 2c 0a 20 20 20 20 20 20 20 20 20 20 53 55  id,.          SU
1210: 42 53 54 52 28 63 6f 6d 6d 65 6e 74 2c 20 30 2c  BSTR(comment, 0,
1220: 20 37 30 29 20 20 20 20 20 20 20 20 20 20 20 20   70)            
1230: 20 20 41 53 20 20 63 6f 6d 6d 65 6e 74 2c 0a 20    AS  comment,. 
1240: 20 20 20 20 20 20 20 20 20 43 41 53 54 28 4a 55           CAST(JU
1250: 4c 49 41 4e 44 41 59 28 27 6e 6f 77 27 29 2d 65  LIANDAY('now')-e
1260: 2e 6d 74 69 6d 65 20 41 53 20 49 4e 54 29 20 41  .mtime AS INT) A
1270: 53 20 20 61 67 65 0a 20 20 20 20 20 20 20 46 52  S  age.       FR
1280: 4f 4d 0a 20 20 20 20 20 20 20 20 20 20 66 69 6c  OM.          fil
1290: 65 6e 61 6d 65 0a 20 20 20 20 20 20 20 20 20 20  ename.          
12a0: 4c 45 46 54 20 4a 4f 49 4e 20 6d 6c 69 6e 6b 20  LEFT JOIN mlink 
12b0: 6d 20 4f 4e 20 6d 2e 66 6e 69 64 20 3d 20 66 69  m ON m.fnid = fi
12c0: 6c 65 6e 61 6d 65 2e 66 6e 69 64 0a 20 20 20 20  lename.fnid.    
12d0: 20 20 20 20 20 20 4c 45 46 54 20 4a 4f 49 4e 20        LEFT JOIN 
12e0: 74 61 67 78 72 65 66 20 4f 4e 20 6d 2e 6d 69 64  tagxref ON m.mid
12f0: 20 3d 20 74 61 67 78 72 65 66 2e 72 69 64 0a 20   = tagxref.rid. 
1300: 20 20 20 20 20 20 20 20 20 4c 45 46 54 20 4a 4f           LEFT JO
1310: 49 4e 20 62 6c 6f 62 20 62 66 20 4f 4e 20 62 66  IN blob bf ON bf
1320: 2e 72 69 64 20 3d 20 6d 2e 66 69 64 0a 20 20 20  .rid = m.fid.   
1330: 20 20 20 20 20 20 20 4c 45 46 54 20 4a 4f 49 4e         LEFT JOIN
1340: 20 62 6c 6f 62 20 62 6d 20 4f 4e 20 62 6d 2e 72   blob bm ON bm.r
1350: 69 64 20 3d 20 6d 2e 6d 69 64 0a 20 20 20 20 20  id = m.mid.     
1360: 20 20 20 20 20 4c 45 46 54 20 4a 4f 49 4e 20 65       LEFT JOIN e
1370: 76 65 6e 74 20 65 20 4f 4e 20 65 2e 6f 62 6a 69  vent e ON e.obji
1380: 64 20 3d 20 6d 2e 6d 69 64 0a 20 20 20 20 20 20  d = m.mid.      
1390: 20 57 48 45 52 45 0a 20 20 20 20 20 20 20 20 20   WHERE.         
13a0: 20 74 61 67 78 72 65 66 2e 76 61 6c 75 65 20 3d   tagxref.value =
13b0: 20 5c 24 62 72 61 6e 63 68 0a 20 20 20 20 20 20   \$branch.      
13c0: 20 20 20 20 24 41 4e 44 5f 44 49 52 0a 20 20 20      $AND_DIR.   
13d0: 20 20 20 20 47 52 4f 55 50 20 42 59 0a 20 20 20      GROUP BY.   
13e0: 20 20 20 20 20 20 20 6e 61 6d 65 0a 20 20 20 20         name.    
13f0: 20 20 20 48 41 56 49 4e 47 0a 20 20 20 20 20 20     HAVING.      
1400: 20 20 20 20 66 69 64 20 3c 3e 20 30 0a 20 20 20      fid <> 0.   
1410: 20 20 20 20 4f 52 44 45 52 20 42 59 0a 20 20 20      ORDER BY.   
1420: 20 20 20 20 20 20 20 69 73 5f 64 69 72 20 44 45         is_dir DE
1430: 53 43 2c 20 6e 61 6d 65 20 41 53 43 2c 20 65 2e  SC, name ASC, e.
1440: 6d 74 69 6d 65 20 44 45 53 43 0a 20 20 20 22 20  mtime DESC.   " 
1450: 7b 0a 0a 20 20 20 20 20 20 23 20 73 65 70 61 72  {..      # separ
1460: 61 74 65 20 64 69 72 65 63 74 6f 72 69 65 73 20  ate directories 
1470: 61 6e 64 20 66 69 6c 65 73 0a 20 20 20 20 20 20  and files.      
1480: 73 65 74 20 6e 61 6d 65 20 5b 73 74 72 69 6e 67  set name [string
1490: 20 72 61 6e 67 65 20 24 70 61 74 68 6e 61 6d 65   range $pathname
14a0: 20 24 63 75 74 6e 61 6d 65 20 32 30 34 38 5d 0a   $cutname 2048].
14b0: 20 20 20 20 20 20 73 65 74 20 64 69 72 20 5b 73        set dir [s
14c0: 74 72 69 6e 67 20 66 69 72 73 74 20 22 2f 22 20  tring first "/" 
14d0: 24 6e 61 6d 65 5d 0a 20 20 20 20 20 20 69 66 20  $name].      if 
14e0: 7b 24 64 69 72 3e 30 7d 20 7b 20 73 65 74 20 6e  {$dir>0} { set n
14f0: 61 6d 65 20 5b 73 74 72 69 6e 67 20 72 61 6e 67  ame [string rang
1500: 65 20 24 6e 61 6d 65 20 30 20 5b 65 78 70 72 20  e $name 0 [expr 
1510: 24 64 69 72 2d 31 5d 5d 20 7d 0a 0a 20 20 20 20  $dir-1]] }..    
1520: 20 20 23 20 73 6b 69 70 20 73 65 65 6e 20 66 69    # skip seen fi
1530: 6c 65 73 0a 20 20 20 20 20 20 69 66 20 5b 73 74  les.      if [st
1540: 72 3a 3a 63 6f 6e 74 61 69 6e 73 20 22 28 24 6e  r::contains "($n
1550: 61 6d 65 29 22 20 24 73 65 65 6e 5d 20 7b 20 63  ame)" $seen] { c
1560: 6f 6e 74 69 6e 75 65 20 7d 20 65 6c 73 65 20 7b  ontinue } else {
1570: 20 73 65 74 20 73 65 65 6e 20 22 28 24 6e 61 6d   set seen "($nam
1580: 65 29 2c 24 73 65 65 6e 22 20 7d 0a 20 20 20 20  e),$seen" }.    
1590: 20 20 0a 20 20 20 20 20 20 23 20 6f 75 74 70 75    .      # outpu
15a0: 74 20 74 61 62 6c 65 20 65 6e 74 72 69 65 73 0a  t table entries.
15b0: 20 20 20 20 20 20 68 74 6d 6c 20 22 20 20 20 20        html "    
15c0: 20 20 20 20 20 20 20 20 20 20 20 3c 74 72 3e 3c             <tr><
15d0: 74 64 3e 22 3b 0a 20 20 20 20 20 20 69 66 20 7b  td>";.      if {
15e0: 24 64 69 72 3e 30 7d 20 7b 0a 20 20 20 20 20 20  $dir>0} {.      
15f0: 20 20 20 20 23 20 69 66 20 74 68 65 72 65 20 69      # if there i
1600: 73 20 61 6e 20 65 71 75 69 76 61 6c 65 6e 74 20  s an equivalent 
1610: 77 69 6b 69 20 70 61 67 65 20 66 6f 72 20 61 20  wiki page for a 
1620: 64 69 72 65 63 74 6f 72 79 2c 20 74 68 65 6e 20  directory, then 
1630: 77 65 20 6d 69 78 20 66 69 6c 65 62 6f 78 20 2b  we mix filebox +
1640: 20 77 69 6b 69 0a 20 20 20 20 20 20 20 20 20 20   wiki.          
1650: 73 65 74 20 64 69 73 70 6c 61 79 20 22 77 69 6b  set display "wik
1660: 69 22 0a 20 20 20 20 20 20 20 20 20 20 23 73 65  i".          #se
1670: 74 20 64 69 73 70 6c 61 79 20 5b 3f 3a 20 5b 73  t display [?: [s
1680: 71 6c 3a 3a 70 61 67 65 5f 65 78 69 73 74 73 20  ql::page_exists 
1690: 22 24 64 69 72 6e 61 6d 65 24 6e 61 6d 65 22 5d  "$dirname$name"]
16a0: 20 22 77 69 6b 69 22 20 22 74 72 65 65 22 5d 0a   "wiki" "tree"].
16b0: 20 20 20 20 20 20 20 20 20 20 68 74 6d 6c 20 22            html "
16c0: 3c 61 20 63 6c 61 73 73 3d 64 69 72 20 68 72 65  <a class=dir hre
16d0: 66 3d 27 24 64 69 73 70 6c 61 79 2f 5b 68 74 6d  f='$display/[htm
16e0: 6c 69 7a 65 20 24 64 69 72 6e 61 6d 65 24 6e 61  lize $dirname$na
16f0: 6d 65 5d 27 3e 3c 62 20 63 6c 61 73 73 3d 67 6c  me]'><b class=gl
1700: 79 70 68 3e f0 9f 93 82 3c 2f 62 3e 20 5b 68 74  yph>📂</b> [ht
1710: 6d 6c 69 7a 65 20 24 6e 61 6d 65 5d 3c 2f 61 3e  mlize $name]</a>
1720: 22 3b 0a 20 20 20 20 20 20 7d 20 65 6c 73 65 20  ";.      } else 
1730: 7b 0a 20 20 20 20 20 20 20 20 20 20 68 74 6d 6c  {.          html
1740: 20 22 3c 61 20 63 6c 61 73 73 3d 66 69 6c 65 20   "<a class=file 
1750: 68 72 65 66 3d 27 61 72 74 69 66 61 63 74 2f 24  href='artifact/$
1760: 66 6e 5f 75 75 69 64 27 3e 3c 62 20 63 6c 61 73  fn_uuid'><b clas
1770: 73 3d 67 6c 79 70 68 3e f0 9f 93 84 3c 2f 62 3e  s=glyph>📄</b>
1780: 20 5b 68 74 6d 6c 69 7a 65 20 24 6e 61 6d 65 5d   [htmlize $name]
1790: 3c 2f 61 3e 22 3b 0a 20 20 20 20 20 20 7d 0a 20  </a>";.      }. 
17a0: 20 20 20 20 20 68 74 6d 6c 20 22 3c 2f 74 64 3e       html "</td>
17b0: 20 3c 74 64 3e 5b 68 74 6d 6c 69 7a 65 20 24 63   <td>[htmlize $c
17c0: 6f 6d 6d 65 6e 74 5d 3c 61 20 68 72 65 66 3d 27  omment]<a href='
17d0: 63 69 2f 24 63 69 5f 75 75 69 64 27 3e e2 80 b9  ci/$ci_uuid'>‹
17e0: e2 80 ba 3c 2f 61 3e 3c 2f 74 64 3e 20 3c 74 64  ›</a></td> <td
17f0: 3e 5b 68 74 6d 6c 69 7a 65 20 24 61 67 65 5d 20  >[htmlize $age] 
1800: 64 61 79 73 20 61 67 6f 3c 2f 74 64 3e 3c 2f 74  days ago</td></t
1810: 72 3e 5c 6e 22 3b 0a 20 20 20 7d 0a 7d 0a 0a 23  r>\n";.   }.}..#
1820: 2d 2d 20 73 6f 63 69 61 6c 20 6d 65 64 69 61 20  -- social media 
1830: 73 68 61 72 65 20 6c 69 6e 6b 73 0a 70 72 6f 63  share links.proc
1840: 20 75 69 3a 3a 73 6f 63 69 61 6c 5f 6c 69 6e 6b   ui::social_link
1850: 73 20 7b 62 61 73 65 75 72 6c 7d 20 7b 0a 20 20  s {baseurl} {.  
1860: 68 74 6d 6c 20 22 0a 20 20 20 3c 61 20 63 6c 61  html ".   <a cla
1870: 73 73 3d 73 6d 6c 2d 67 6f 20 68 72 65 66 3d 27  ss=sml-go href='
1880: 68 74 74 70 73 3a 2f 2f 70 6c 75 73 2e 67 6f 6f  https://plus.goo
1890: 67 6c 65 2e 63 6f 6d 2f 73 68 61 72 65 3f 75 72  gle.com/share?ur
18a0: 6c 3d 24 62 61 73 65 75 72 6c 27 20 74 69 74 6c  l=$baseurl' titl
18b0: 65 3d 67 6f 6f 67 6c 65 2b 3e 67 2b 3c 2f 61 3e  e=google+>g+</a>
18c0: 20 26 6d 69 64 64 6f 74 3b 0a 20 20 20 3c 61 20   &middot;.   <a 
18d0: 63 6c 61 73 73 3d 73 6d 6c 2d 66 62 20 68 72 65  class=sml-fb hre
18e0: 66 3d 27 68 74 74 70 73 3a 2f 2f 77 77 77 2e 66  f='https://www.f
18f0: 61 63 65 62 6f 6f 6b 2e 63 6f 6d 2f 73 68 61 72  acebook.com/shar
1900: 65 72 2f 73 68 61 72 65 72 2e 70 68 70 3f 75 3d  er/sharer.php?u=
1910: 24 62 61 73 65 75 72 6c 27 20 74 69 74 6c 65 3d  $baseurl' title=
1920: 66 61 63 65 62 6f 6f 6b 3e 66 62 3c 2f 61 3e 20  facebook>fb</a> 
1930: 26 6d 69 64 64 6f 74 3b 0a 20 20 20 3c 61 20 63  &middot;.   <a c
1940: 6c 61 73 73 3d 73 6d 6c 2d 74 77 20 68 72 65 66  lass=sml-tw href
1950: 3d 27 68 74 74 70 73 3a 2f 2f 74 77 69 74 74 65  ='https://twitte
1960: 72 2e 63 6f 6d 2f 69 6e 74 65 6e 74 2f 74 77 65  r.com/intent/twe
1970: 65 74 3f 75 72 6c 3d 24 62 61 73 65 75 72 6c 27  et?url=$baseurl'
1980: 20 74 69 74 6c 65 3d 74 77 69 74 74 65 72 3e 74   title=twitter>t
1990: 77 3c 2f 61 3e 20 26 6d 69 64 64 6f 74 3b 0a 20  w</a> &middot;. 
19a0: 20 20 3c 61 20 63 6c 61 73 73 3d 73 6d 6c 2d 72    <a class=sml-r
19b0: 64 20 68 72 65 66 3d 27 68 74 74 70 3a 2f 2f 72  d href='http://r
19c0: 65 64 64 69 74 2e 63 6f 6d 2f 73 75 62 6d 69 74  eddit.com/submit
19d0: 3f 75 72 6c 3d 24 62 61 73 65 75 72 6c 27 20 74  ?url=$baseurl' t
19e0: 69 74 6c 65 3d 72 65 64 64 69 74 3e 72 64 3c 2f  itle=reddit>rd</
19f0: 61 3e 20 26 6d 69 64 64 6f 74 3b 0a 20 20 20 3c  a> &middot;.   <
1a00: 61 20 63 6c 61 73 73 3d 73 6d 6c 2d 69 6e 20 68  a class=sml-in h
1a10: 72 65 66 3d 27 68 74 74 70 73 3a 2f 2f 77 77 77  ref='https://www
1a20: 2e 6c 69 6e 6b 65 64 69 6e 2e 63 6f 6d 2f 73 68  .linkedin.com/sh
1a30: 61 72 65 41 72 74 69 63 6c 65 3f 6d 69 6e 69 3d  areArticle?mini=
1a40: 74 72 75 65 26 61 6d 70 3b 75 72 6c 3d 24 62 61  true&amp;url=$ba
1a50: 73 65 75 72 6c 27 20 74 69 74 6c 65 3d 6c 69 6e  seurl' title=lin
1a60: 6b 65 64 69 6e 3e 69 6e 3c 2f 61 3e 20 26 6d 69  kedin>in</a> &mi
1a70: 64 64 6f 74 3b 0a 20 20 20 3c 61 20 63 6c 61 73  ddot;.   <a clas
1a80: 73 3d 73 6d 6c 2d 73 75 20 68 72 65 66 3d 27 68  s=sml-su href='h
1a90: 74 74 70 73 3a 2f 2f 77 77 77 2e 73 74 75 6d 62  ttps://www.stumb
1aa0: 6c 65 75 70 6f 6e 2e 63 6f 6d 2f 73 75 62 6d 69  leupon.com/submi
1ab0: 74 3f 75 72 6c 3d 24 62 61 73 65 75 72 6c 27 20  t?url=$baseurl' 
1ac0: 74 69 74 6c 65 3d 73 74 75 6d 62 6c 65 75 70 6f  title=stumbleupo
1ad0: 6e 3e 73 75 3c 2f 61 3e 20 26 6d 69 64 64 6f 74  n>su</a> &middot
1ae0: 3b 0a 20 20 20 3c 61 20 63 6c 61 73 73 3d 73 6d  ;.   <a class=sm
1af0: 6c 2d 64 6c 20 68 72 65 66 3d 27 68 74 74 70 73  l-dl href='https
1b00: 3a 2f 2f 64 65 6c 2e 69 63 69 6f 2e 75 73 2f 70  ://del.icio.us/p
1b10: 6f 73 74 3f 75 72 6c 3d 24 62 61 73 65 75 72 6c  ost?url=$baseurl
1b20: 27 20 74 69 74 6c 65 3d 64 65 6c 69 63 69 6f 75  ' title=deliciou
1b30: 73 3e 64 6c 3c 2f 61 3e 0a 20 20 22 3b 0a 7d 0a  s>dl</a>.  ";.}.
1b40: 0a                                               .