Presentation.st 34 KB

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