Presentation.st 37 KB

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