summary refs log blame commit diff stats
path: root/web/assets/index.js
blob: f10dc603d0e019538fef1eb7a46d9be44fe82fb1 (plain) (tree)

































                                                                     
"use strict";

var timer;
var prevIndex = 0;
var slideCount = 2;

function setSlideShow(index, short) {
  if (index >= slideCount) index = 0;
  document.getElementById("slide"+prevIndex).className = "";
  document.getElementById("slide"+index).className = "active";
  document.getElementById("slideControl"+prevIndex).className = "";
  document.getElementById("slideControl"+index).className = "active";
  prevIndex = index;
  startTimer(short ? 8000 : 32000);
}

function nextSlide() { setSlideShow(prevIndex + 1, true); }
function startTimer(t) { timer = setTimeout(nextSlide, t); }

function slideshow_enter() { clearTimeout(timer); }
function slideshow_exit () { startTimer(16000); }

function slideshow_click(index) {
  clearTimeout(timer);
  setSlideShow(index, false);
}

window.onload = function() {
  var slideshow = document.getElementById("slideshow");
  slideshow.onmouseenter = slideshow_enter;
  slideshow.onmouseleave = slideshow_exit;
  slideCount = slideshow.children.length;
  startTimer(8000);
};
uos)" @exit 1 endif ifeq ($(ucpu),i386) mycpu = i386 endif ifeq ($(ucpu),i486) mycpu = i386 endif ifeq ($(ucpu),i586) mycpu = i386 endif ifeq ($(ucpu),i686) mycpu = i386 endif ifeq ($(ucpu),bepc) mycpu = i386 endif ifeq ($(ucpu),i86pc) mycpu = i386 endif ifeq ($(ucpu),amd64) mycpu = amd64 endif ifeq ($(ucpu),x86-64) mycpu = amd64 endif ifeq ($(ucpu),x86_64) mycpu = amd64 endif ifeq ($(ucpu),sparc) mycpu = sparc endif ifeq ($(ucpu),sun) mycpu = sparc endif ifeq ($(ucpu),ppc64) mycpu = powerpc64 ifeq ($(myos),linux) COMP_FLAGS += -m64 LINK_FLAGS += -m64 endif endif ifeq ($(ucpu),powerpc) mycpu = powerpc endif ifeq ($(ucpu),ppc) mycpu = ppc endif ifeq ($(ucpu),mips) mycpu = mips endif ifeq ($(ucpu),arm) mycpu = arm endif ifeq ($(ucpu),armeb) mycpu = arm endif ifeq ($(ucpu),armel) mycpu = arm endif ifeq ($(ucpu),armv6l) mycpu = arm endif ifndef ucpu @echo "Error: unknown processor : $(ucpu)" @exit 1 endif # for osA in 1..c.oses.len: ifeq ($(myos),?{c.oses[osA-1]}) # for cpuA in 1..c.cpus.len: ifeq ($(mycpu),?{c.cpus[cpuA-1]}) # var oFiles = "" # for ff in c.cfiles[osA][cpuA].items: # oFiles.add(" " & changeFileExt(ff.toUnix, "o")) # end for oFiles =?oFiles endif # end for endif # end for ifeq ($(strip $(oFiles)),) @echo "Error: no C code generated for: [$(myos): $(mycpu)]" @exit 1 endif %.o: %.c $(CC) $(COMP_FLAGS) -Ic_code -c $< -o $@ ?{"$(binDir)/" & toLower(c.name)}: $(oFiles) @mkdir -p $(binDir) $(LINKER) -o $@ $^ $(LINK_FLAGS) @echo "SUCCESS" .PHONY: clean clean: rm -f $(oFiles) ?{"$(binDir)/" & toLower(c.name)}