Presentation.st 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928
  1. Smalltalk current createPackage: 'Presentation' properties: #{}!
  2. Widget subclass: #Slide
  3. instanceVariableNames: 'presentation'
  4. category: 'Presentation'!
  5. !Slide methodsFor: 'accessing'!
  6. presentation
  7. ^presentation
  8. !
  9. presentation: aPresentation
  10. presentation := aPresentation
  11. !
  12. id
  13. ^ self class name
  14. !
  15. cssClass
  16. ^'slide'
  17. !
  18. backgroundColor
  19. ^'#555'
  20. !
  21. title
  22. ^ self id
  23. ! !
  24. !Slide methodsFor: 'actions'!
  25. show
  26. self backgroundColor ifNotNil: [
  27. (window jQuery: '#slides') css: 'background' color: self backgroundColor].
  28. (window jQuery: '.slide') hide: self presentation slideTransition options: #() duration: 300.
  29. (window jQuery: '#', self id) show: self presentation slideTransition options: #() duration: 300.
  30. ! !
  31. !Slide methodsFor: 'rendering'!
  32. renderOn: html
  33. html div class: self cssClass; id: self id; with: [
  34. self renderSlideOn: html.
  35. self renderMetaOn: html]
  36. !
  37. renderSlideOn: html
  38. !
  39. renderMetaOn: html
  40. html div
  41. id: 'meta';
  42. with: [
  43. html p class: 'title'; with: self presentation title.
  44. html p class: 'description'; with: self presentation description.
  45. html a class: 'author'; with: self presentation author; href: 'mailto:', self presentation email.
  46. html a class: 'url'; with: self presentation url; href: self presentation url]
  47. ! !
  48. !Slide class methodsFor: 'instance creation'!
  49. on: aPresentation
  50. ^self new
  51. presentation: aPresentation;
  52. yourself
  53. ! !
  54. Slide subclass: #FOSDEMSlide
  55. instanceVariableNames: ''
  56. category: 'Presentation'!
  57. !FOSDEMSlide methodsFor: 'accessing'!
  58. codeSnippet
  59. self subclassResponsibility
  60. ! !
  61. !FOSDEMSlide methodsFor: 'rendering'!
  62. renderSnippet: aString on: html
  63. (SourceArea new
  64. renderOn: html;
  65. editor) setValue: aString.
  66. !
  67. renderCodeSnippetOn: html
  68. (SourceArea new
  69. renderOn: html;
  70. editor) setValue: self codeSnippet.
  71. ! !
  72. FOSDEMSlide subclass: #FOSDEMREPLSlide
  73. instanceVariableNames: ''
  74. category: 'Presentation'!
  75. !FOSDEMREPLSlide methodsFor: 'rendering'!
  76. renderSlideOn: html
  77. html h1: 'REPL'.
  78. self renderCodeSnippetOn: html.
  79. !
  80. codeSnippet
  81. ^
  82. './bin/amber
  83. fs := require value: ''fs''.
  84. fs readdir: ''/tmp'' do: [:err :file| console log: file]'.
  85. ! !
  86. FOSDEMSlide subclass: #FOSDEMJSToSmalltalk
  87. instanceVariableNames: ''
  88. category: 'Presentation'!
  89. !FOSDEMJSToSmalltalk methodsFor: 'accessing'!
  90. cssClass
  91. ^ 'slide blue3d'
  92. !
  93. codeSnippet
  94. ^
  95. 'var counter = window.smalltalk.Counter._new();
  96. counter._appendToJQuery_($(''#jsToSmalltalk''));'.
  97. ! !
  98. !FOSDEMJSToSmalltalk methodsFor: 'rendering'!
  99. renderSlideOn: html
  100. html h1: 'Call Smalltalk from Javascript'.
  101. html div
  102. id: 'jsToSmalltalk';
  103. style: 'float: left'.
  104. self renderCodeSnippetOn: html.
  105. ! !
  106. FOSDEMSlide subclass: #FOSDEMCanvasSlide
  107. instanceVariableNames: 'c2d canvas'
  108. category: 'Presentation'!
  109. !FOSDEMCanvasSlide methodsFor: 'accessing'!
  110. cssClass
  111. ^ 'slide red3d'
  112. ! !
  113. !FOSDEMCanvasSlide methodsFor: 'drawing'!
  114. drawOnCanvas
  115. |c2d|
  116. c2d := canvas element getContext: '2d'.
  117. c2d
  118. clearRect: 0
  119. y: 0
  120. width: canvas element width
  121. height: canvas element height.
  122. 40 atRandom timesRepeat: [ |rgba|
  123. rgba := ',' join: {255 atRandom. 255 atRandom. 255 atRandom. 10 atRandom / 10}.
  124. c2d at: 'fillStyle' put: 'rgba(', rgba, ')'.
  125. c2d
  126. fillRect: 600 atRandom
  127. y: 300 atRandom
  128. width: 200 atRandom
  129. height: 200 atRandom ]
  130. ! !
  131. !FOSDEMCanvasSlide methodsFor: 'rendering'!
  132. renderSlideOn: html
  133. html h1: 'Playing with canvas'.
  134. canvas := html canvas
  135. width: 700;
  136. height: 400.
  137. self updateCanvas.
  138. ! !
  139. !FOSDEMCanvasSlide methodsFor: 'updating'!
  140. updateCanvas
  141. self drawOnCanvas.
  142. window setTimeout: [self updateCanvas] delay: 500.
  143. ! !
  144. FOSDEMSlide subclass: #FOSDEMJSPlayGroundSlide
  145. instanceVariableNames: ''
  146. category: 'Presentation'!
  147. !FOSDEMJSPlayGroundSlide methodsFor: 'accessing'!
  148. codeSnippet
  149. ^'|logo|
  150. logo:=''img#amberlogo'' asJQuery.
  151. logo
  152. css:''-webkit-transition'' put:''all 10s ease-in-out''.
  153. <logo.css(''-webkit-transform'', ''rotateY(360deg)'');>.
  154. logo click: [window alert: ''This is cool !!''].
  155. logo inspect'.
  156. ! !
  157. !FOSDEMJSPlayGroundSlide methodsFor: 'rendering'!
  158. renderSlideOn: html
  159. html div
  160. class: 'section center';
  161. with: [
  162. self renderCodeSnippetOn: html.
  163. html img
  164. id: 'amberlogo';
  165. src: 'fosdem2012/images/amber.png' ]
  166. ! !
  167. FOSDEMSlide subclass: #FOSDEMAmberBackend
  168. instanceVariableNames: ''
  169. category: 'Presentation'!
  170. !FOSDEMAmberBackend methodsFor: 'accessing'!
  171. cssClass
  172. ^ 'slide green3d'
  173. ! !
  174. !FOSDEMAmberBackend methodsFor: 'rendering'!
  175. renderSlideOn: html
  176. html div
  177. class: 'section center';
  178. with: [ html h1: 'Need a backend ?'.
  179. {'nodejs.png'. 'php.gif'. 'rails.png'. 'pharo.png'. 'ambrhino.jpg'} do: [:aString |
  180. html img: 'fosdem2012/images/', aString.
  181. ]
  182. ]
  183. ! !
  184. FOSDEMSlide subclass: #FOSDEMBookletSlide
  185. instanceVariableNames: ''
  186. category: 'Presentation'!
  187. !FOSDEMBookletSlide methodsFor: 'accessing'!
  188. cssClass
  189. ^ 'slide blue3d'
  190. ! !
  191. !FOSDEMBookletSlide methodsFor: 'css'!
  192. style
  193. ^ '
  194. #book { font-size: 1.4em; }
  195. #book .b-load .b-wrap-right { background-color: #DEC3A9;}
  196. #book .b-load .b-wrap-left { background-color: #DDD;}
  197. '
  198. ! !
  199. !FOSDEMBookletSlide methodsFor: 'rendering'!
  200. renderSlideOn: html
  201. self renderBookOn: html.
  202. html link
  203. rel:'stylesheet';
  204. href: 'fosdem2012/lib/booklet/jquery.booklet.1.2.0.css'.
  205. html style: self style.
  206. jQuery
  207. getScript: 'fosdem2012/lib/booklet/jquery.booklet.1.2.0.min.js'
  208. do: ['#book' asJQuery booklet: self bookletOptions].
  209. !
  210. renderBookOn: html
  211. html div
  212. id: 'book';
  213. with: [ html div
  214. class: 'b-load';
  215. with: [ html
  216. div: 'Amber makes it easy to plug existing javascript libraires';
  217. div: 'Here is an example with the jQuery Booklet plugin';
  218. div: 'Want to see how ?';
  219. div: [ html button
  220. onClick: [Browser openOn: FOSDEMBookletSlide ];
  221. with: 'Just browse the code :)'. ]
  222. ]
  223. ].
  224. !
  225. bookletOptions
  226. ^ #{
  227. 'arrows' -> true.
  228. 'keyboard' -> false.
  229. 'pageNumbers' -> false.
  230. 'closed' -> true
  231. }
  232. ! !
  233. FOSDEMSlide subclass: #FOSDEMIntroSlide
  234. instanceVariableNames: ''
  235. category: 'Presentation'!
  236. !FOSDEMIntroSlide methodsFor: 'not yet classified'!
  237. renderSlideOn: html
  238. html div class: 'section center animate'; with: [
  239. html img src: 'fosdem2012/images/amber.png'.
  240. html p: self presentation author.
  241. html p: self presentation description.
  242. html p: [
  243. html with: self presentation email]].
  244. ! !
  245. Widget subclass: #PresentationNavigator
  246. instanceVariableNames: 'presentationBrush currentPresentation slideSelect'
  247. category: 'Presentation'!
  248. !PresentationNavigator methodsFor: 'accessing'!
  249. currentPresentation: aPresentation
  250. currentPresentation := aPresentation.
  251. !
  252. currentPresentation
  253. ^ currentPresentation ifNil: [currentPresentation := Presentation concretePresentations first new].
  254. !
  255. style
  256. ^ '
  257. #navigator {
  258. z-index: 1;
  259. position: fixed;
  260. top: 0;
  261. left: 50%;
  262. margin-left: -150px;
  263. padding: 5px;
  264. border-radius: 5px;
  265. -moz-border-radius: 5px;
  266. -webkit-border-radius: 5px;
  267. background: #333;
  268. opacity: 0.3;
  269. color: #eee;
  270. }
  271. #navigator a {
  272. font-weight: bold;
  273. color: #eee;
  274. text-decoration: none;
  275. cursor: pointer;
  276. padding: 0 2px;
  277. font-size: 14px;
  278. }
  279. #navigator:hover {
  280. opacity: 0.8;
  281. }
  282. '
  283. ! !
  284. !PresentationNavigator methodsFor: 'callbacks'!
  285. selectPresentation: aPresentationClass
  286. self currentPresentation: aPresentationClass new.
  287. self renderCurrentPresentation.
  288. !
  289. selectPresentationNamed: aString
  290. |presentationClass|
  291. presentationClass := (Smalltalk current at: aString).
  292. presentationClass ifNotNil: [ self selectPresentation: presentationClass ].
  293. !
  294. previousSlide
  295. self currentPresentation previousSlide.
  296. self updateHash.
  297. !
  298. nextSlide
  299. self currentPresentation nextSlide.
  300. self updateHash.
  301. !
  302. reload
  303. |slideIndex|
  304. slideIndex := self currentPresentation currentSlideIndex.
  305. self currentPresentation: self currentPresentation class new.
  306. self renderCurrentPresentation.
  307. self selectSlideAt: slideIndex.
  308. !
  309. selectSlideAt: anInteger
  310. self currentPresentation moveAt: anInteger.
  311. self updateHash.
  312. !
  313. updateHash
  314. document location hash: self currentPresentation class name, '-', self currentPresentation currentSlideIndex.
  315. ! !
  316. !PresentationNavigator methodsFor: 'hash'!
  317. checkHash
  318. | hash presentation |
  319. hash := (document location hash replace: '^#' with: '') tokenize: '-'.
  320. presentation := Presentation concretePresentations
  321. detect: [:aPresentationClass | aPresentationClass name == hash first]
  322. ifNone: [^ self].
  323. presentation == self currentPresentation class ifFalse: [
  324. self selectPresentationNamed: presentation.
  325. self selectSlideAt: hash last
  326. ].
  327. !
  328. checkHashChange
  329. (window jQuery: window) bind: 'hashchange' do: [self checkHash]
  330. ! !
  331. !PresentationNavigator methodsFor: 'keybindings'!
  332. setKeybindings
  333. (window jQuery: document) keyup: [:e || node |
  334. node := e target nodeName asLowercase.
  335. (node = 'textarea' or: [node = 'input']) ifFalse: [
  336. e keyCode = 39 ifTrue: [self nextSlide].
  337. e keyCode = 37 ifTrue: [self previousSlide]]]
  338. ! !
  339. !PresentationNavigator methodsFor: 'rendering'!
  340. renderToolsOn: html
  341. html a
  342. with: 'IDE';
  343. onClick: [TabManager current open].
  344. html a
  345. with: 'Reload';
  346. onClick: [self reload].
  347. html a
  348. with: '←';
  349. onClick: [self previousSlide].
  350. html a
  351. with: '→';
  352. onClick: [self nextSlide].
  353. !
  354. renderPresentationSelectOn: html
  355. |presentationSelect|
  356. presentationSelect := html select.
  357. presentationSelect
  358. onChange: [self selectPresentationNamed: presentationSelect asJQuery val];
  359. with: [ Presentation concretePresentationsDo: [:aPresentationClass |
  360. html option
  361. value: aPresentationClass name;
  362. with: aPresentationClass title ] ].
  363. !
  364. open
  365. (window jQuery: document) ready: [
  366. self
  367. appendToJQuery: 'body' asJQuery;
  368. setKeybindings;
  369. checkHashChange.
  370. ].
  371. !
  372. renderOn: html
  373. html style
  374. type: 'text/css';
  375. with: self style.
  376. html div
  377. id: 'navigator';
  378. with: [ self
  379. renderToolsOn: html;
  380. renderPresentationSelectOn: html;
  381. renderSlideSelectOn: html].
  382. presentationBrush := html div
  383. id: 'presentation';
  384. yourself.
  385. self checkHash.
  386. self renderCurrentPresentation.
  387. !
  388. renderCurrentPresentation
  389. presentationBrush contents: [:html |
  390. self currentPresentation renderOn: html.
  391. ].
  392. self updateSlideSelect.
  393. !
  394. renderSlideSelectOn: html
  395. slideSelect := html select.
  396. slideSelect onChange: [ self selectSlideAt: slideSelect asJQuery val ].
  397. self updateSlideSelect.
  398. !
  399. updateSlideSelect
  400. slideSelect contents: [:html| |index|
  401. index := 0.
  402. self currentPresentation slidesDo: [ :aSlide|
  403. index := index + 1.
  404. html option
  405. value: index;
  406. with: aSlide title ] ].
  407. ! !
  408. !PresentationNavigator class methodsFor: 'initialize'!
  409. initialize
  410. ^ self open
  411. !
  412. open
  413. ^ self new open
  414. ! !
  415. Widget subclass: #Presentation
  416. instanceVariableNames: 'currentSlide slides'
  417. category: 'Presentation'!
  418. !Presentation methodsFor: 'accessing'!
  419. title
  420. ^ self class title.
  421. !
  422. author
  423. ^'John Smith'
  424. !
  425. url
  426. ^'http://jtalk-project.org'
  427. !
  428. description
  429. ^'A presentation written in Jtalk'
  430. !
  431. email
  432. ^'john@smith.com'
  433. !
  434. slides
  435. slides ifNil: [self initSlides].
  436. ^slides
  437. !
  438. slideClasses
  439. ^self subclassResponsibility
  440. !
  441. currentSlide
  442. ^currentSlide
  443. !
  444. currentSlide: aSlide
  445. currentSlide := aSlide
  446. !
  447. slideTransition
  448. ^'fade'
  449. !
  450. style
  451. "Should return a CSS style"
  452. ^ ''
  453. ! !
  454. !Presentation methodsFor: 'actions'!
  455. nextSlide
  456. | next |
  457. self currentSlide ifNotNil: [
  458. next := self slides
  459. at: (self currentSlideIndex) + 1
  460. ifAbsent: [nil].
  461. next ifNotNil: [currentSlide := next. next show]]
  462. !
  463. showCurrentSlide
  464. self currentSlide ifNotNil: [
  465. '.slide' asJQuery hide.
  466. ('#', self currentSlide id) asJQuery show.
  467. 'title' asJQuery text: self title, ' - ', self currentSlide id.
  468. ]
  469. !
  470. previousSlide
  471. | next |
  472. self currentSlide ifNotNil: [
  473. next := self slides
  474. at: (self currentSlideIndex) - 1
  475. ifAbsent: [nil].
  476. next ifNotNil: [currentSlide := next. next show]]
  477. !
  478. moveAt: anInteger
  479. | next |
  480. next := self slides
  481. at: anInteger
  482. ifAbsent: [nil].
  483. next ifNotNil: [currentSlide := next. next show]
  484. !
  485. currentSlideIndex
  486. ^ self slides indexOf: self currentSlide ifAbsent: [1]
  487. ! !
  488. !Presentation methodsFor: 'enumerating'!
  489. slidesDo: aBlockWithArg
  490. self slides do: [:aSlide| aBlockWithArg value: aSlide].
  491. ! !
  492. !Presentation methodsFor: 'initialization'!
  493. initSlides
  494. slides := self slideClasses collect: [:each | each on: self]
  495. ! !
  496. !Presentation methodsFor: 'rendering'!
  497. renderOn: html
  498. html style
  499. type: 'text/css';
  500. with: self style.
  501. html div
  502. id: 'slides';
  503. with: [self renderSlidesOn: html]
  504. !
  505. renderSlidesOn: html
  506. self slides do: [:each |
  507. each renderOn: html].
  508. currentSlide ifNil: [currentSlide := self slides first].
  509. self showCurrentSlide
  510. ! !
  511. Presentation class instanceVariableNames: 'current'!
  512. !Presentation class methodsFor: 'accessing'!
  513. concretePresentations
  514. ^ self allSubclasses select: [:aPresentationClass| aPresentationClass isConcrete]
  515. !
  516. title
  517. ^ 'Slides'
  518. ! !
  519. !Presentation class methodsFor: 'enumerating'!
  520. concretePresentationsDo: aBlockWithArg
  521. self concretePresentations do: aBlockWithArg.
  522. ! !
  523. !Presentation class methodsFor: 'testing'!
  524. isConcrete
  525. ^false
  526. ! !
  527. Widget subclass: #Slide
  528. instanceVariableNames: 'presentation'
  529. category: 'Presentation'!
  530. !Slide methodsFor: 'accessing'!
  531. presentation
  532. ^presentation
  533. !
  534. presentation: aPresentation
  535. presentation := aPresentation
  536. !
  537. id
  538. ^ self class name
  539. !
  540. cssClass
  541. ^'slide'
  542. !
  543. backgroundColor
  544. ^'#555'
  545. !
  546. title
  547. ^ self id
  548. ! !
  549. !Slide methodsFor: 'actions'!
  550. show
  551. self backgroundColor ifNotNil: [
  552. (window jQuery: '#slides') css: 'background' color: self backgroundColor].
  553. (window jQuery: '.slide') hide: self presentation slideTransition options: #() duration: 300.
  554. (window jQuery: '#', self id) show: self presentation slideTransition options: #() duration: 300.
  555. ! !
  556. !Slide methodsFor: 'rendering'!
  557. renderOn: html
  558. html div class: self cssClass; id: self id; with: [
  559. self renderSlideOn: html.
  560. self renderMetaOn: html]
  561. !
  562. renderSlideOn: html
  563. !
  564. renderMetaOn: html
  565. html div
  566. id: 'meta';
  567. with: [
  568. html p class: 'title'; with: self presentation title.
  569. html p class: 'description'; with: self presentation description.
  570. html a class: 'author'; with: self presentation author; href: 'mailto:', self presentation email.
  571. html a class: 'url'; with: self presentation url; href: self presentation url]
  572. ! !
  573. !Slide class methodsFor: 'instance creation'!
  574. on: aPresentation
  575. ^self new
  576. presentation: aPresentation;
  577. yourself
  578. ! !
  579. Presentation subclass: #ESUG2011Presentation
  580. instanceVariableNames: ''
  581. category: 'Presentation'!
  582. !ESUG2011Presentation methodsFor: 'accessing'!
  583. description
  584. ^'ESUG 2011, Edinburgh'
  585. !
  586. author
  587. ^'Nicolas Petton'
  588. !
  589. email
  590. ^'nico@objectfusion.fr'
  591. !
  592. url
  593. ^'http://jtalk-project.org'
  594. !
  595. slideClasses
  596. ^Array new
  597. add: IntroSlide;
  598. add: AboutSlide;
  599. add: WhatIsJtalkSlide;
  600. add: JtalkFeaturesSlide;
  601. add: WorkspaceSlide;
  602. add: IDESlide;
  603. add: CountersSlide;
  604. add: JtalkAndJavascriptSlide;
  605. add: JtalkAndJavascriptSlide2;
  606. add: JtalkAndJavascriptSlide3;
  607. add: JtalkAndJavascriptSlide4;
  608. add: JtalkAndCLI;
  609. add: JtalkAndNode;
  610. add: JtalkAndNode2;
  611. add: JtalkAndNode3;
  612. add: JtalkAndWebOS;
  613. add: JtalkAndEnyo;
  614. add: ContributionsSlide;
  615. yourself
  616. !
  617. style
  618. ^'
  619. body {
  620. font-family: Helvetica,Arial,sans;
  621. }
  622. #slides {
  623. width: 100%;
  624. height: 100%;
  625. overflow: hidden;
  626. position: absolute;
  627. top: 0;
  628. bottom: 0;
  629. left: 0;
  630. right: 0;
  631. background: #555;
  632. }
  633. .slide {
  634. background: #fff;
  635. color: #444;
  636. text-align: left;
  637. font-size: 20px;
  638. line-height: 1.8em;
  639. height: 500px;
  640. width: 700px;
  641. padding: 60px;
  642. position: absolute;
  643. left: 50%;
  644. top: 50%;
  645. margin-left: -420px;
  646. margin-top: -320px;
  647. box-shadow: 0 0 20px #111;
  648. -moz-box-shadow: 0 0 20px #111;
  649. -webkit-box-shadow: 0 0 20px #111;
  650. }
  651. .slide.transparent {
  652. background: transparent;
  653. box-shadow: 0 0 0 none;
  654. -moz-box-shadow: 0 0 0 transparent;
  655. -webkit-box-shadow: 0 0 0 transparent;
  656. color: #fff !!important;
  657. }
  658. .slide.black {
  659. background: black;
  660. background-image: -webkit-gradient(
  661. linear,
  662. left bottom,
  663. left top,
  664. color-stop(0.38, rgb(79,79,79)),
  665. color-stop(0.69, rgb(33,33,33)),
  666. color-stop(0.86, rgb(4,4,4))
  667. );
  668. background-image: -moz-linear-gradient(
  669. center bottom,
  670. rgb(79,79,79) 38%,
  671. rgb(33,33,33) 69%,
  672. rgb(4,4,4) 86%
  673. );
  674. color: #fff !!important;
  675. }
  676. .slide.black h1, .slide.black h2, .slide.black h3,
  677. .slide.transparent h1, .slide.transparent h2, .slide.transparent h3 {
  678. color: #fff;
  679. text-shadow: 0 1px 4px #aaa;
  680. }
  681. .slide.black a, .slide.transparent a {
  682. color: #ccc;
  683. }
  684. .slide.white {
  685. color: #333 !!important;
  686. }
  687. .slide.white h1, .slide.white h2, .slide.white h3 {
  688. color: #333;
  689. }
  690. .slide.white a {
  691. color: #333;
  692. }
  693. .slide h1, .slide h2, .slide h3 {
  694. color: #333;
  695. /* text-align: center; */
  696. }
  697. .slide h1 {
  698. font-family: "Droid Sans";
  699. font-size: 36px;
  700. text-shadow: 0 1px 4px #aaa;
  701. margin-top: 30px;
  702. margin-bottom: 50px;
  703. }
  704. /* .slide ul, .slide li { */
  705. /* padding: 0; */
  706. /* margin: 0; */
  707. /* } */
  708. .slide button {
  709. font-size: 18px;
  710. }
  711. .slide a {
  712. color: #555;
  713. text-decoration: none;
  714. cursor: pointer;
  715. }
  716. .slide a:hover {
  717. color: #fff;
  718. background: #555;
  719. }
  720. .slide .right {
  721. text-align: right;
  722. }
  723. .slide .section.center {
  724. text-align: center;
  725. display: table-cell;
  726. vertical-align: middle;
  727. width: 700px;
  728. height: 500px;
  729. }
  730. .slide code {
  731. font-family: "Droid Sans Mono";
  732. color: #444;
  733. border: 1px solid #ddd;
  734. background: #eee;
  735. border-radius: 4px;
  736. padding: 2px;
  737. font-size: 16px;
  738. }
  739. .slide .code2 {
  740. font-family: "Droid Sans Mono";
  741. line-height: 1.2em;
  742. color: #444;
  743. padding: 2px;
  744. font-size: 16px;
  745. }
  746. .slide .CodeMirror {
  747. width: 500px;
  748. height: 300px;
  749. text-align: left;
  750. }
  751. .slide .CodeMirror-scroll {
  752. text-align: left;
  753. }
  754. .slide .fancy {
  755. margin-top: 30px;
  756. -webkit-transform: rotate(-10deg);
  757. -moz-transform: rotate(-10deg);
  758. transform: rotate(-10deg);
  759. color: red;
  760. }
  761. .slide .comment {
  762. opacity: 0.6;
  763. font-weight: normal;
  764. }
  765. .slide .red {
  766. color: red;
  767. }
  768. .slide .blue {
  769. color: blue;
  770. }
  771. .slide#WhatIsJtalk {
  772. background: white url("esug2011/images/balloon.jpg") 650px 50px no-repeat;
  773. }
  774. .slide#ide {
  775. background: black url("esug2011/images/ide_star_wars.png") center center no-repeat;
  776. }
  777. .slide#JtalkAndCLI {
  778. background: white url("esug2011/images/terminal.png") 620px 20px no-repeat;
  779. }
  780. .slide#JtalkAndNode {
  781. background: white url("esug2011/images/nodejs.png") 580px 40px no-repeat;
  782. }
  783. .slide#JtalkAndNode2 {
  784. background: white url("esug2011/images/nodejs.png") 580px 40px no-repeat;
  785. }
  786. .slide#JtalkAndNode3 {
  787. background: white url("esug2011/images/nodejs.png") 580px 40px no-repeat;
  788. }
  789. .slide#JtalkAndWebOS {
  790. background: white url("esug2011/images/devices.jpg") 380px 280px no-repeat;
  791. }
  792. .slide#JtalkAndEnyo {
  793. background: white url("esug2011/images/enyo.png") 130px 150px no-repeat;
  794. }
  795. .slide#links {
  796. background: white url("esug2011/images/asterix.png") 30px 130px no-repeat;
  797. }
  798. .slide#links .section {
  799. margin-left: 250px;
  800. margin-top: 200px;
  801. font-family: "Droid Sans";
  802. font-size: 26px;
  803. font-weight: bold;
  804. }
  805. #meta {
  806. position: absolute;
  807. font-size: 12px;
  808. opacity: 0.6;
  809. bottom: 0;
  810. right: 0;
  811. z-index: 2;
  812. background: #333;
  813. text-align: right;
  814. padding: 0 10px;
  815. line-height: 1.8em;
  816. color: #eee;
  817. border-top-left-radius: 5px;
  818. }
  819. #meta:hover {
  820. opacity: 0.8;
  821. }
  822. #meta p {
  823. display: inline;
  824. padding: 0 5px;
  825. }
  826. #meta a {
  827. //background: #ccc;
  828. color: #ccc;
  829. text-decoration: none;
  830. padding: 0 5px;
  831. }
  832. .slide {
  833. }
  834. '
  835. ! !
  836. ESUG2011Presentation class instanceVariableNames: 'current'!
  837. !ESUG2011Presentation class methodsFor: 'accessing'!
  838. title
  839. ^'Jtalk'
  840. ! !
  841. !ESUG2011Presentation class methodsFor: 'testing'!
  842. isConcrete
  843. ^true
  844. ! !
  845. Slide subclass: #IntroSlide
  846. instanceVariableNames: ''
  847. category: 'Presentation'!
  848. !IntroSlide methodsFor: 'accessing'!
  849. id
  850. ^'intro'
  851. !
  852. cssClass
  853. ^'slide black'
  854. ! !
  855. !IntroSlide methodsFor: 'rendering'!
  856. renderSlideOn: html
  857. html div class: 'section center'; with: [
  858. html h1 with: 'Jtalk, the Smalltalk for Web developers'.
  859. html p with: self presentation author, ' & Göran Krampe - ', self presentation description.
  860. html p with: [
  861. html a
  862. with: self presentation email;
  863. href: 'mailto:', self presentation email].
  864. html p with: [
  865. html a
  866. with: 'goran@krampe.se';
  867. href: 'mailto:goran@krampe.se'].
  868. html p with: [
  869. html a
  870. with: 'objectfusion.fr';
  871. href: 'http://www.objectfusion.fr']]
  872. ! !
  873. Slide subclass: #WhatIsJtalkSlide
  874. instanceVariableNames: ''
  875. category: 'Presentation'!
  876. !WhatIsJtalkSlide methodsFor: 'accessing'!
  877. id
  878. ^'WhatIsJtalk'
  879. ! !
  880. !WhatIsJtalkSlide methodsFor: 'rendering'!
  881. renderSlideOn: html
  882. html div class: 'section center'; with: [
  883. html h1 with: 'Jtalk in a nutshell'.
  884. html h2 with: 'Jtalk is an implementation of Smalltalk'.
  885. html h2 with: 'Jtalk runs on top of the JavaScript runtime'.
  886. html h2 with: 'Jtalk is an opensource project (MIT)'.
  887. html h2 class: 'fancy'; with: 'Jtalk is cool!!']
  888. ! !
  889. Slide subclass: #JtalkFeaturesSlide
  890. instanceVariableNames: ''
  891. category: 'Presentation'!
  892. !JtalkFeaturesSlide methodsFor: 'accessing'!
  893. id
  894. ^'features'
  895. ! !
  896. !JtalkFeaturesSlide methodsFor: 'rendering'!
  897. renderSlideOn: html
  898. html h1 with: 'Jtalk features'.
  899. html ul with: [
  900. html li with: 'Jtalk is (mostly) written in itself, including the parser & compiler'.
  901. html li with: 'Full Smalltalk object system, including classes & metaclasses, etc'.
  902. html li with: 'Core libraries (streams, collections, RegExp, etc)'.
  903. html li with: 'Web related libraries: HTML Canvas, DOM manipulation'.
  904. html li with: 'Full featured IDE'.
  905. html li with: [
  906. html with:'Advanced Smalltalk features, including '.
  907. html code with: '#doesNotUnderstand:'.
  908. html with: ' support and '.
  909. html code with: 'thisContext']]
  910. ! !
  911. Slide subclass: #AboutSlide
  912. instanceVariableNames: ''
  913. category: 'Presentation'!
  914. !AboutSlide methodsFor: 'accessing'!
  915. id
  916. ^'about'
  917. !
  918. cssClass
  919. ^'slide transparent white'
  920. !
  921. backgroundColor
  922. ^'white'
  923. ! !
  924. !AboutSlide methodsFor: 'rendering'!
  925. renderSlideOn: html
  926. html div class: 'section center'; with: [
  927. html h1 with: 'About this presentation'.
  928. html p with: 'This presentation is entirely written in Jtalk and is licensed under CC BY-SA.'.
  929. html p with: [
  930. html with: 'Press '.
  931. html code with: '←'.
  932. html with: ' to move backward and '.
  933. html code with: ' →'.
  934. html with: ' to move forward.'].
  935. html p with: [
  936. html with: 'Open a '.
  937. html button
  938. with: 'browser';
  939. onClick: [Browser openOn: Presentation].
  940. html with: ' to edit the source code.']]
  941. ! !
  942. Slide subclass: #JtalkAndJavascriptSlide3
  943. instanceVariableNames: ''
  944. category: 'Presentation'!
  945. !JtalkAndJavascriptSlide3 methodsFor: 'accessing'!
  946. id
  947. ^'jtalkAndJs3'
  948. !
  949. backgroundColor
  950. ^'#08C'
  951. ! !
  952. !JtalkAndJavascriptSlide3 methodsFor: 'rendering'!
  953. renderSlideOn: html
  954. html h1 with: [
  955. html with: 'Smalltalk '.
  956. html span class: 'red'; with: '♥'.
  957. html with: ' JavaScript'].
  958. html h2 with: 'Smalltalk ⇒ JavaScript'.
  959. html ol with: [
  960. html li
  961. with: 'Unary messages begin with an underscore: ';
  962. with: [html code with: 'yourself'];
  963. with: ' becomes ';
  964. with: [html code with: '_yourself()'].
  965. html li
  966. with: 'Binary messages are prefixed with 2 underscores: ';
  967. with: [html code with: '3@4'];
  968. with: ' becomes ';
  969. with: [html code with: '(3).__at(4)'].
  970. html li
  971. with: 'Keyword message follow the same rules as unary messages, with a final underscore: ';
  972. with: [html code with: 'aDictionary at: 3 put: 4'];
  973. with: ' becomes ';
  974. with: [html code with: 'aDictionary._at_put_(3, 4)']]
  975. ! !
  976. Slide subclass: #JtalkAndJavascriptSlide2
  977. instanceVariableNames: ''
  978. category: 'Presentation'!
  979. !JtalkAndJavascriptSlide2 methodsFor: 'accessing'!
  980. id
  981. ^'jtalkAndJs2'
  982. !
  983. backgroundColor
  984. ^'#08C'
  985. ! !
  986. !JtalkAndJavascriptSlide2 methodsFor: 'rendering'!
  987. renderSlideOn: html
  988. html h1 with: [
  989. html with: 'Smalltalk '.
  990. html span class: 'red'; with: '♥'.
  991. html with: ' JavaScript'].
  992. html h2 with: 'Jtalk maps one to one with the JavaScript equivalent:'.
  993. html ul with: [
  994. html li with: 'String ⇔ String'.
  995. html li with: 'Number ⇔ Number'.
  996. html li with: 'BlockClosure ⇔ function'.
  997. html li with: 'Dictionary ⇔ Object'.
  998. html li with: 'Error ⇔ Error'.
  999. html li with: 'etc.']
  1000. ! !
  1001. Slide subclass: #JtalkAndJavascriptSlide
  1002. instanceVariableNames: ''
  1003. category: 'Presentation'!
  1004. !JtalkAndJavascriptSlide methodsFor: 'accessing'!
  1005. id
  1006. ^'jtalkAndJs'
  1007. !
  1008. cssClass
  1009. ^'slide transparent'
  1010. !
  1011. backgroundColor
  1012. ^'#08C'
  1013. ! !
  1014. !JtalkAndJavascriptSlide methodsFor: 'rendering'!
  1015. renderSlideOn: html
  1016. html div class: 'section center'; with: [
  1017. html h1 with: [
  1018. html with: 'Smalltalk '.
  1019. html span class: 'red'; with: '♥'.
  1020. html with: ' JavaScript']]
  1021. ! !
  1022. Slide subclass: #WorkspaceSlide
  1023. instanceVariableNames: ''
  1024. category: 'Presentation'!
  1025. !WorkspaceSlide methodsFor: 'accessing'!
  1026. id
  1027. ^'workspace'
  1028. !
  1029. backgroundColor
  1030. ^'#18bd7d'
  1031. !
  1032. renderSlideOn: html
  1033. | workspace |
  1034. workspace := SourceArea new.
  1035. html div class: 'section center'; with: [
  1036. html h1 with: 'Give Jtalk a try!!'.
  1037. workspace renderOn: html.
  1038. html div with: [
  1039. html button
  1040. with: 'DoIt';
  1041. onClick: [workspace doIt].
  1042. html button
  1043. with: 'PrintIt';
  1044. onClick: [workspace printIt].
  1045. html button
  1046. with: 'InspectIt';
  1047. onClick: [workspace inspectIt]]]
  1048. ! !
  1049. Slide subclass: #CountersSlide
  1050. instanceVariableNames: ''
  1051. category: 'Presentation'!
  1052. !CountersSlide methodsFor: 'accessing'!
  1053. id
  1054. ^'counters'
  1055. !
  1056. backgroundColor
  1057. ^'#18bd7d'
  1058. ! !
  1059. !CountersSlide methodsFor: 'rendering'!
  1060. renderSlideOn: html
  1061. html div class: 'section center'; with: [
  1062. html h1 with: 'The counter example'.
  1063. html div with: [
  1064. 2 timesRepeat: [Counter new renderOn: html]]]
  1065. ! !
  1066. Slide subclass: #JtalkAndJavascriptSlide4
  1067. instanceVariableNames: ''
  1068. category: 'Presentation'!
  1069. !JtalkAndJavascriptSlide4 methodsFor: 'accessing'!
  1070. id
  1071. ^'jtalkAndJs4'
  1072. !
  1073. backgroundColor
  1074. ^'#08C'
  1075. ! !
  1076. !JtalkAndJavascriptSlide4 methodsFor: 'rendering'!
  1077. renderSlideOn: html
  1078. html h1 with: [
  1079. html with: 'JavaScript '.
  1080. html span class: 'red'; with: '♥'.
  1081. html with: ' Smalltalk too!! ';
  1082. with: [html span class: 'comment'; with: '(how cute)']].
  1083. html h2 with: 'JavaScript ⇒ Smalltalk'.
  1084. html ol with: [
  1085. html li
  1086. with: [html code with: 'someUser.name'];
  1087. with: ' becomes ';
  1088. with: [html code with: 'someUser name'].
  1089. html li
  1090. with: [html code with: 'someUser name = "John"'];
  1091. with: ' becomes ';
  1092. with: [html code with: 'someUser name: ''John'''].
  1093. html li
  1094. with: [html code with: 'console.log(''hello world'')'];
  1095. with: ' becomes ';
  1096. with: [html code with: 'console log: ''hello world'''].
  1097. html li
  1098. with: [html code with: 'window.jQuery(''foo'').css(''background'', ''red'')'];
  1099. with: ' becomes ';
  1100. with: [html br];
  1101. with: [html code with: '(window jQuery: ''foo'') css: ''background'' color: ''red''']]
  1102. ! !
  1103. Slide subclass: #IDESlide
  1104. instanceVariableNames: ''
  1105. category: 'Presentation'!
  1106. !IDESlide methodsFor: 'accessing'!
  1107. id
  1108. ^'ide'
  1109. !
  1110. backgroundColor
  1111. ^'black'
  1112. !
  1113. cssClass
  1114. ^'slide transparent'
  1115. ! !
  1116. !IDESlide methodsFor: 'rendering'!
  1117. renderSlideOn: html
  1118. " html div class: 'section center'; with: [
  1119. html h1
  1120. with: 'The wonderful Jtalk ';
  1121. with: [
  1122. html a
  1123. with: 'development tools';
  1124. onClick: [TabManager current open]];
  1125. with: '.']
  1126. "
  1127. ! !
  1128. Slide subclass: #ContributionsSlide
  1129. instanceVariableNames: ''
  1130. category: 'Presentation'!
  1131. !ContributionsSlide methodsFor: 'accessing'!
  1132. id
  1133. ^'links'
  1134. ! !
  1135. !ContributionsSlide methodsFor: 'rendering'!
  1136. renderSlideOn: html
  1137. html div class: 'section'; with: [
  1138. html p with: [
  1139. html a href: 'http://jtalk-project.org'; with: 'jtalk-project.org'].
  1140. html p with: [
  1141. html a href: 'https://github.com/NicolasPetton/jtalk'; with: 'github.com/NicolasPetton/jtalk'].
  1142. html p with: [
  1143. html a href: 'http://http://groups.google.com/group/jtalk-project'; with: 'groups.google.com/group/jtalk-project']]
  1144. ! !
  1145. Slide subclass: #JtalkAndCLI
  1146. instanceVariableNames: ''
  1147. category: 'Presentation'!
  1148. !JtalkAndCLI methodsFor: 'not yet classified'!
  1149. backgroundColor
  1150. ^'#0A1'
  1151. !
  1152. id
  1153. ^'JtalkAndCLI'
  1154. !
  1155. renderSlideOn: html
  1156. html h1 with: [
  1157. html with: 'Jtalk and '.
  1158. html span class: 'blue'; with: 'the command line'].
  1159. html h2 with: 'jtalkc - a fairly elaborate bash script that:'.
  1160. html ul with: [
  1161. html li with: 'Uses Node.js to run the Jtalk Compiler'.
  1162. html li with: 'Compiles .st files to .js'.
  1163. html li with: 'Links .js files into a single one'.
  1164. html li with: 'Adds class initilization and/or call to main'.
  1165. html li with: 'Optionally runs Google Closure compiler']
  1166. ! !
  1167. Slide subclass: #JtalkAndNode
  1168. instanceVariableNames: ''
  1169. category: 'Presentation'!
  1170. !JtalkAndNode methodsFor: 'not yet classified'!
  1171. backgroundColor
  1172. ^'#0A1'
  1173. !
  1174. id
  1175. ^'JtalkAndNode'
  1176. !
  1177. renderSlideOn: html
  1178. html h1 with: [
  1179. html with: 'Jtalk and '.
  1180. html span class: 'blue'; with: 'Node.js'].
  1181. html h2 with: 'Hello.st:'.
  1182. html pre with: [
  1183. html div class: 'code2'; with: 'Object subclass: #Hello
  1184. instanceVariableNames: ''''
  1185. category: ''Hello''!!
  1186. !!Hello class methodsFor: ''main''!!
  1187. main
  1188. console log: ''Hello world from JTalk in Node.js''
  1189. !! !!']
  1190. ! !
  1191. Slide subclass: #JtalkAndNode2
  1192. instanceVariableNames: ''
  1193. category: 'Presentation'!
  1194. !JtalkAndNode2 methodsFor: 'not yet classified'!
  1195. backgroundColor
  1196. ^'#0A1'
  1197. !
  1198. id
  1199. ^'JtalkAndNode2'
  1200. !
  1201. renderSlideOn: html
  1202. html h1 with: [
  1203. html with: 'Jtalk and '.
  1204. html span class: 'blue'; with: 'Node.js'].
  1205. html h2 with: 'Makefile:'.
  1206. html pre with: [
  1207. html div class: 'code2'; with: 'Program.js: Hello.st
  1208. ../../bin/jtalkc -N -m Hello Hello.st Program
  1209. run: Program.js
  1210. ./hello
  1211. clean:
  1212. rm -f Program.js Hello.js
  1213. '].
  1214. html h2 with: 'hello:'.
  1215. html pre with: [
  1216. html div class: 'code2'; with: 'node Program.js $@']
  1217. ! !
  1218. Slide subclass: #JtalkAndNode3
  1219. instanceVariableNames: ''
  1220. category: 'Presentation'!
  1221. !JtalkAndNode3 methodsFor: 'not yet classified'!
  1222. backgroundColor
  1223. ^'#0A1'
  1224. !
  1225. id
  1226. ^'JtalkAndNode3'
  1227. !
  1228. renderSlideOn: html
  1229. html h1 with: [
  1230. html with: 'Jtalk and '.
  1231. html span class: 'blue'; with: 'Node.js'].
  1232. html h2 with: 'make clean && make run:'.
  1233. html pre with: [
  1234. html div class: 'code2'; with: 'rm -f Program.js Hello.js
  1235. ../../bin/jtalkc -N -m Hello Hello.st Program
  1236. Loading libraries /home/gokr/jtalk/js/boot.js /home/gokr/jtalk/js/Kernel.js
  1237. /home/gokr/jtalk/js/Parser.js /home/gokr/jtalk/js/Compiler.js
  1238. /home/gokr/jtalk/js/init.js /home/gokr/jtalk/nodejs/nodecompile.js
  1239. and compiling ...
  1240. Compiling in debugMode: false
  1241. Reading file Hello.st
  1242. Exporting category Hello as Hello.js
  1243. Adding libraries /home/gokr/jtalk/js/boot.js /home/gokr/jtalk/js/Kernel.js ...
  1244. Adding Jtalk code Hello.js ...
  1245. Adding initializer /home/gokr/jtalk/js/init.js ...
  1246. Adding call to Hello class >> main ...
  1247. Writing Program.js ...
  1248. Done.
  1249. ./hello'.
  1250. html span class: 'blue'; with:'Hello world from JTalk in Node.js']
  1251. ! !
  1252. Slide subclass: #JtalkAndWebOS
  1253. instanceVariableNames: ''
  1254. category: 'Presentation'!
  1255. !JtalkAndWebOS methodsFor: 'not yet classified'!
  1256. backgroundColor
  1257. ^'#0A1'
  1258. !
  1259. id
  1260. ^'JtalkAndWebOS'
  1261. !
  1262. renderSlideOn: html
  1263. html h1 with: [
  1264. html with: 'Jtalk and '.
  1265. html span class: 'blue'; with: 'webOS'].
  1266. html h2 with: 'A really cool mobile OS based on Linux:'.
  1267. html ul with: [
  1268. html li with: 'The primary language in webOS is Javascript'.
  1269. html li with: 'The new UI framework for webOS 3.0 is called Enyo'.
  1270. html li with: 'Regular apps run in V8 + Webkit'.
  1271. html li with: 'Background services run in Node.js']
  1272. ! !
  1273. Slide subclass: #JtalkAndEnyo
  1274. instanceVariableNames: ''
  1275. category: 'Presentation'!
  1276. !JtalkAndEnyo methodsFor: 'not yet classified'!
  1277. id
  1278. ^'JtalkAndEnyo'
  1279. !
  1280. backgroundColor
  1281. ^'#0A1'
  1282. !
  1283. renderSlideOn: html
  1284. html h1 with: [
  1285. html with: 'Jtalk and '.
  1286. html span class: 'blue'; with: 'Enyo'].
  1287. ! !
  1288. Presentation subclass: #FOSDEM2012Presentation
  1289. instanceVariableNames: ''
  1290. category: 'Presentation'!
  1291. !FOSDEM2012Presentation methodsFor: 'accessing'!
  1292. description
  1293. ^'FOSDEM 2012, Brussels'
  1294. !
  1295. author
  1296. ^'Laurent Laffont, Johnny Thornton'
  1297. !
  1298. email
  1299. ^'laurent.laffont@gmail.com, johnnyt@xan.do'
  1300. !
  1301. url
  1302. ^'http://amber-lang.net'
  1303. !
  1304. style
  1305. ^'
  1306. body {
  1307. font-family: Helvetica,Arial,sans;
  1308. }
  1309. #slides {
  1310. width: 100%;
  1311. height: 100%;
  1312. overflow: hidden;
  1313. position: absolute;
  1314. top: 0;
  1315. bottom: 0;
  1316. left: 0;
  1317. right: 0;
  1318. background: #555;
  1319. }
  1320. .slide {
  1321. background: #fff;
  1322. color: #444;
  1323. text-align: left;
  1324. font-size: 20px;
  1325. line-height: 1.8em;
  1326. height: 500px;
  1327. width: 700px;
  1328. padding: 60px;
  1329. position: absolute;
  1330. left: 50%;
  1331. top: 50%;
  1332. margin-left: -420px;
  1333. margin-top: -320px;
  1334. box-shadow: 0 0 20px #111;
  1335. -moz-box-shadow: 0 0 20px #111;
  1336. -webkit-box-shadow: 0 0 20px #111;
  1337. }
  1338. .slide.transparent {
  1339. background: transparent;
  1340. box-shadow: 0 0 0 none;
  1341. -moz-box-shadow: 0 0 0 transparent;
  1342. -webkit-box-shadow: 0 0 0 transparent;
  1343. color: #fff !!important;
  1344. }
  1345. .slide.black {
  1346. background: black;
  1347. background-image: -webkit-gradient(
  1348. linear,
  1349. left bottom,
  1350. left top,
  1351. color-stop(0.38, rgb(79,79,79)),
  1352. color-stop(0.69, rgb(33,33,33)),
  1353. color-stop(0.86, rgb(4,4,4))
  1354. );
  1355. background-image: -moz-linear-gradient(
  1356. center bottom,
  1357. rgb(79,79,79) 38%,
  1358. rgb(33,33,33) 69%,
  1359. rgb(4,4,4) 86%
  1360. );
  1361. color: #fff !!important;
  1362. }
  1363. .slide.black h1, .slide.black h2, .slide.black h3,
  1364. .slide.transparent h1, .slide.transparent h2, .slide.transparent h3 {
  1365. color: #fff;
  1366. text-shadow: 0 1px 4px #aaa;
  1367. }
  1368. .slide.black a, .slide.transparent a {
  1369. color: #ccc;
  1370. }
  1371. .slide.white {
  1372. color: #333 !!important;
  1373. }
  1374. .slide.white h1, .slide.white h2, .slide.white h3 {
  1375. color: #333;
  1376. }
  1377. .slide.white a {
  1378. color: #333;
  1379. }
  1380. .slide h1, .slide h2, .slide h3 {
  1381. color: #333;
  1382. /* text-align: center; */
  1383. }
  1384. .slide h1 {
  1385. font-family: "Droid Sans";
  1386. font-size: 36px;
  1387. text-shadow: 0 1px 4px #aaa;
  1388. margin-top: 30px;
  1389. margin-bottom: 50px;
  1390. }
  1391. .slide button {
  1392. font-size: 18px;
  1393. }
  1394. .slide a {
  1395. color: #555;
  1396. text-decoration: none;
  1397. cursor: pointer;
  1398. }
  1399. .slide a:hover {
  1400. color: #fff;
  1401. background: #555;
  1402. }
  1403. .slide .right {
  1404. text-align: right;
  1405. }
  1406. .slide .section.center {
  1407. text-align: center;
  1408. display: table-cell;
  1409. vertical-align: middle;
  1410. width: 700px;
  1411. height: 500px;
  1412. }
  1413. .slide code {
  1414. font-family: "Droid Sans Mono";
  1415. color: #444;
  1416. border: 1px solid #ddd;
  1417. background: #eee;
  1418. border-radius: 4px;
  1419. padding: 2px;
  1420. font-size: 16px;
  1421. }
  1422. .slide .code2 {
  1423. font-family: "Droid Sans Mono";
  1424. line-height: 1.2em;
  1425. color: #444;
  1426. padding: 2px;
  1427. font-size: 16px;
  1428. }
  1429. .slide .CodeMirror {
  1430. width: 700px;
  1431. height: 300px;
  1432. text-align: left;
  1433. }
  1434. .slide .CodeMirror-scroll {
  1435. text-align: left;
  1436. }
  1437. .slide .fancy {
  1438. margin-top: 30px;
  1439. -webkit-transform: rotate(-10deg);
  1440. -moz-transform: rotate(-10deg);
  1441. transform: rotate(-10deg);
  1442. color: red;
  1443. }
  1444. .slide .comment {
  1445. opacity: 0.6;
  1446. font-weight: normal;
  1447. }
  1448. .slide .red {
  1449. color: red;
  1450. }
  1451. .slide .blue {
  1452. color: blue;
  1453. }
  1454. #meta {
  1455. position: absolute;
  1456. font-size: 12px;
  1457. opacity: 0.6;
  1458. bottom: 0;
  1459. right: 0;
  1460. z-index: 2;
  1461. background: #333;
  1462. text-align: right;
  1463. padding: 0 10px;
  1464. line-height: 1.8em;
  1465. color: #eee;
  1466. border-top-left-radius: 5px;
  1467. }
  1468. #meta:hover {
  1469. opacity: 0.8;
  1470. }
  1471. #meta p {
  1472. display: inline;
  1473. padding: 0 5px;
  1474. }
  1475. #meta a {
  1476. //background: #ccc;
  1477. color: #ccc;
  1478. text-decoration: none;
  1479. padding: 0 5px;
  1480. }
  1481. .slide {
  1482. }
  1483. .slide.blue3d {
  1484. background: #feffff;
  1485. background: -moz-linear-gradient(top, #feffff 0%, #d2ebf9 100%);
  1486. background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#feffff), color-stop(100%,#d2ebf9));
  1487. background: -webkit-linear-gradient(top, #feffff 0%,#d2ebf9 100%);
  1488. background: -o-linear-gradient(top, #feffff 0%,#d2ebf9 100%);
  1489. background: -ms-linear-gradient(top, #feffff 0%,#d2ebf9 100%);
  1490. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#feffff", endColorstr="#d2ebf9",GradientType=0 );
  1491. background: linear-gradient(top, #feffff 0%,#d2ebf9 100%);
  1492. }
  1493. .slide.red3d {
  1494. background: #febbbb;
  1495. background: -moz-linear-gradient(top, #febbbb 0%, #fe9090 71%, #ff5c5c 95%);
  1496. background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#febbbb), color-stop(71%,#fe9090), color-stop(95%,#ff5c5c));
  1497. background: -webkit-linear-gradient(top, #febbbb 0%,#fe9090 71%,#ff5c5c 95%);
  1498. background: -o-linear-gradient(top, #febbbb 0%,#fe9090 71%,#ff5c5c 95%);
  1499. background: -ms-linear-gradient(top, #febbbb 0%,#fe9090 71%,#ff5c5c 95%);
  1500. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#febbbb", endColorstr="#ff5c5c",GradientType=0 );
  1501. background: linear-gradient(top, #febbbb 0%,#fe9090 71%,#ff5c5c 95%);
  1502. }
  1503. .slide.green3d {
  1504. background: #cdeb8e;
  1505. background: -moz-linear-gradient(top, #cdeb8e 0%, #a5c956 100%);
  1506. background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cdeb8e), color-stop(100%,#a5c956));
  1507. background: -webkit-linear-gradient(top, #cdeb8e 0%,#a5c956 100%);
  1508. background: -o-linear-gradient(top, #cdeb8e 0%,#a5c956 100%);
  1509. background: -ms-linear-gradient(top, #cdeb8e 0%,#a5c956 100%);
  1510. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#cdeb8e", endColorstr="#a5c956",GradientType=0 );
  1511. background: linear-gradient(top, #cdeb8e 0%,#a5c956 100%);
  1512. }
  1513. @-webkit-keyframes rotate-horizontal {
  1514. 0% { -webkit-transform: perspective(1000px) rotateY(-10deg);}
  1515. 100% { -webkit-transform: perspective(1000px) rotateY(10deg);}
  1516. }
  1517. .animate p{
  1518. -webkit-animation: rotate-horizontal 2s infinite alternate ease-in-out;
  1519. }
  1520. #FOSDEMAmberBackend img {
  1521. margin: 5px;
  1522. -webkit-animation: rotate-horizontal 2s infinite alternate ease-in-out;
  1523. }
  1524. .slide#ide {
  1525. background: black url("esug2011/images/ide_star_wars.png") center center no-repeat;
  1526. }
  1527. '
  1528. !
  1529. slideClasses
  1530. ^ {
  1531. FOSDEMIntroSlide.
  1532. CountersSlide.
  1533. IDESlide.
  1534. JtalkAndJavascriptSlide.
  1535. FOSDEMJSPlayGroundSlide.
  1536. FOSDEMJSToSmalltalk.
  1537. FOSDEMBookletSlide.
  1538. FOSDEMCanvasSlide.
  1539. FOSDEMAmberBackend.
  1540. FOSDEMREPLSlide
  1541. }
  1542. ! !
  1543. !FOSDEM2012Presentation class methodsFor: 'testing'!
  1544. isConcrete
  1545. ^true
  1546. !
  1547. title
  1548. ^'Amber'
  1549. ! !