TYPO free

home

fighting for TYPO free code

graphical header

constants

  1.  
  2. # cat=lib.header/file; type=options[beach.skeleton.png,cube_boy.png,groene.bedstee.jpg,husk.jpg,headlight.sunset.png,jeanet.sunset.png,peppie.of.kokkie.jpg,stockholm.metro.jpg,wood.jpg]; label= Background image: Background image for the header
  3. headerImage = cube_boy.png
  4.  
  5. headerFont   = Share-Regular.ttf
  6.  
  7. # cat=lib.header/color/1; type=color; label= Dark color: This is the dark color for the word TYPO
  8. headerDarkColor   = #999999
  9. # cat=lib.header/color/2; type=color; label= Light color: This is the light color for the header texts
  10. headerLightColor  = #EEEEEE
  11. # cat=lib.header/color/3; type=color; label= Shadow color: This is the shadow color
  12. headerShadowColor = #000000
  13.  
  14. headerSlogan        = fighting for typo free code
  15. headerSloganXoffset = 717

setup

  1.  
  2. lib.newstitle = COA
  3. lib.newstitle {
  4.     wrap = |
  5.     10 = RECORDS
  6.     10 {
  7.         dontCheckPid = 1
  8.         tables = tt_news
  9.         source.data = GPvar:tx_ttnews|tt_news
  10.         source.insertData = 1
  11.         conf.tt_news = TEXT
  12.         conf.tt_news.field = title
  13.         conf.tt_news.required = 1
  14.     }
  15. }
  16.  
  17. /* testing snippets
  18.  
  19. lib.test = TEXT
  20. lib.test < lib.newstitle
  21.  
  22. lib.rootMenu.2 = RECORDS
  23. lib.rootMenu.2 {
  24.         tables = tt_news
  25.         source.data = GPvar:tx_ttnews|tt_news
  26.         conf.tt_news = TEXT
  27.         conf.tt_news.field = title
  28.         conf.tt_news.dataWrap = <li title="{field:short // field:title}">|</li>
  29.         conf.tt_news.htmlSpecialChars = 1
  30. }
  31.  
  32. */
  33.  
  34. lib.headerBaseImage = IMAGE
  35. lib.headerBaseImage {
  36.         file = GIFBUILDER
  37.         file {
  38.                 XY = 990,190
  39.                 format = png
  40.                 quality = 100
  41.                        
  42.                 10 = IMAGE
  43.                 10.file = {$imagePath}header/{$headerImage}
  44.  
  45.                 20 = TEXT
  46.                 20.text = TYPO
  47.                 20.offset = -80,52
  48.                 20.align = right
  49.                 20.niceText = 1
  50.                 20.fontSize = 32
  51.                 20.fontColor = {$headerDarkColor}
  52.                 20.fontFile = {$fontPath}{$headerFont}
  53.                 20.shadow.offset = 2,2
  54.                 20.shadow.blur = 14
  55.                 20.shadow.opacity = 70
  56.                 20.shadow.color = {$headerShadowColor}
  57.  
  58.                 30 = TEXT
  59.                 30.text = free
  60.                 30.offset = 918,52
  61.                 30.niceText = 1
  62.                 30.fontSize = 32
  63.                 30.fontColor = {$headerLightColor}
  64.                 30.fontFile = {$fontPath}{$headerFont}
  65.                 30.shadow.offset = 2,2
  66.                 30.shadow.blur = 14
  67.                 30.shadow.opacity = 70
  68.                 30.shadow.color = {$headerShadowColor}
  69.  
  70.                 40 = TEXT
  71.                 40.text = {$headerSlogan}
  72.                 40.offset = {$headerSloganXoffset},80
  73.                 40.niceText = 1
  74.                 40.fontSize = 24
  75.                 40.fontColor = {$headerLightColor}
  76.                 40.fontFile = {$fontPath}{$headerFont}
  77.                 40.shadow.offset = 2,2
  78.                 40.shadow.blur = 12
  79.                 40.shadow.opacity = 100
  80.                 40.shadow.color = {$headerShadowColor}
  81.         }
  82. }
  83.  
  84.  
  85. lib.headerImage = IMG_RESOURCE
  86. lib.headerImage {
  87.         file = GIFBUILDER
  88.         file {
  89.                 XY = 990,190
  90.                 format = jpg
  91.                 quality = 85
  92.                        
  93.                 10 = IMAGE
  94.                 10 < lib.headerBaseImage
  95.  
  96.                 50 = TEXT
  97.                 #50.text.data = register:newsKeywords
  98.                 #50.text.data = date:Y
  99.                 50.text.data = page:subtitle // page:title
  100.                 #50.text.cObject < lib.newstitle
  101.                 #50.text = register:newsKeywords
  102.                 50.offset = 20,165
  103.                 50.niceText = 1
  104.                 50.fontSize = 24
  105.                 50.fontColor = {$headerLightColor}
  106.                 50.fontFile = {$fontPath}{$headerFont}
  107.                 50.shadow.offset = 2,2
  108.                 50.shadow.blur = 12
  109.                 50.shadow.opacity = 100
  110.                 50.shadow.color = {$headerShadowColor}
  111.         }
  112. }
  113.  
  114.  
  115. #lib.HeadLine = TEXT
  116. #lib.HeadLine.dataWrap = {leveltitle: -2} - {page:title}
  117.  
  118. [globalVar = TSFE:id = {$newsArchive}]
  119.         lib.headerImage.file.50.text >
  120.         #lib.headerImage.file.50.text.data < DB:tt_news:12:title
  121. [global]
  122.  
  123.   // Nice news title header on the single view page
  124. [globalVar = TSFE:id = {$newsSingle}]
  125.         lib.headerImage.file.50.text.cObject < lib.newstitle
  126. [global]
  127.  
  128.  
  129. lib.description = TEXT
  130. lib.description.value = <div id="description" class="hide"><h1><img src="{$imagePath}TYPOfree.png" alt="{$title}" /></h1></div>
  131.  
  132.  
  133. lib.logo = TEXT
  134. lib.logo.value = <div id="logo" class="hide"><a href="/"><img src="{$imagePath}TYPOfree.small.png" alt="{$title}"/></a></div><div id="slogan" class="hide"><h2>{$slogan}</h2></div>
  135.  
  136.  
  137. lib.home = TEXT
  138. lib.home.value = <div id="home"><a href="/"><img src="{$imagePath}trance.gif" width="988" height="188" alt="home"/></a></div>
  139.  
  140.  
  141. lib.header = COA
  142. lib.header {
  143.         wrap=
  144.         1 = TEXT
  145.         1.value = <div id="headerWrap" style="background: top url(
  146.         5 = TEXT
  147.         5 < lib.headerImage
  148.         7 = TEXT
  149. !!.=)>
  150.         10 = TEXT
  151.         10 < lib.description
  152.         11 = TEXT
  153.         11 < lib.skip
  154.         12 = TEXT
  155.         12.value = <div class="header">
  156.         13 = TEXT
  157.         13 < lib.home
  158.         14 = TEXT
  159.         14 < lib.logo
  160.         15 = TEXT
  161.         15 < lib.nav-top
  162.         16 = TEXT
  163.         16.value = </div></div>
  164. }