Presentation.st 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689
  1. Smalltalk current createPackage: 'Presentation' properties: #{}!
  2. Widget subclass: #PresentationNavigator
  3. instanceVariableNames: 'presentationBrush currentPresentation slideSelect'
  4. category: 'Presentation'!
  5. !PresentationNavigator methodsFor: 'accessing'!
  6. currentPresentation: aPresentation
  7. currentPresentation := aPresentation.
  8. !
  9. currentPresentation
  10. ^ currentPresentation ifNil: [currentPresentation := Presentation concretePresentations first new].
  11. !
  12. style
  13. ^ '
  14. #navigator {
  15. z-index: 1;
  16. position: fixed;
  17. top: 0;
  18. left: 50%;
  19. margin-left: -150px;
  20. padding: 5px;
  21. border-radius: 5px;
  22. -moz-border-radius: 5px;
  23. -webkit-border-radius: 5px;
  24. background: #333;
  25. opacity: 0.3;
  26. color: #eee;
  27. }
  28. #navigator a {
  29. font-weight: bold;
  30. color: #eee;
  31. text-decoration: none;
  32. cursor: pointer;
  33. padding: 0 2px;
  34. font-size: 14px;
  35. }
  36. #navigator:hover {
  37. opacity: 0.8;
  38. }
  39. '
  40. ! !
  41. !PresentationNavigator methodsFor: 'callbacks'!
  42. selectPresentation: aPresentationClass
  43. self currentPresentation: aPresentationClass new.
  44. self renderCurrentPresentation.
  45. !
  46. selectPresentationNamed: aString
  47. |presentationClass|
  48. presentationClass := (Smalltalk current at: aString).
  49. presentationClass ifNotNil: [ self selectPresentation: presentationClass ].
  50. !
  51. previousSlide
  52. self currentPresentation previousSlide.
  53. self updateHash.
  54. !
  55. nextSlide
  56. self currentPresentation nextSlide.
  57. self updateHash.
  58. !
  59. reload
  60. |slideIndex|
  61. slideIndex := self currentPresentation currentSlideIndex.
  62. self currentPresentation: self currentPresentation class new.
  63. self renderCurrentPresentation.
  64. self selectSlideAt: slideIndex.
  65. !
  66. selectSlideAt: anInteger
  67. self currentPresentation moveAt: anInteger.
  68. self updateHash.
  69. !
  70. updateHash
  71. document location hash: self currentPresentation class name, '-', self currentPresentation currentSlideIndex.
  72. ! !
  73. !PresentationNavigator methodsFor: 'hash'!
  74. checkHash
  75. | hash presentation |
  76. hash := (document location hash replace: '^#' with: '') tokenize: '-'.
  77. presentation := Presentation concretePresentations
  78. detect: [:aPresentationClass | aPresentationClass name == hash first]
  79. ifNone: [^ self].
  80. presentation == self currentPresentation class ifFalse: [
  81. self selectPresentationNamed: presentation.
  82. self selectSlideAt: hash last
  83. ].
  84. !
  85. checkHashChange
  86. (window jQuery: window) bind: 'hashchange' do: [self checkHash]
  87. ! !
  88. !PresentationNavigator methodsFor: 'keybindings'!
  89. setKeybindings
  90. (window jQuery: document) keyup: [:e || node |
  91. node := e target nodeName asLowercase.
  92. (node = 'textarea' or: [node = 'input']) ifFalse: [
  93. e keyCode = 39 ifTrue: [self nextSlide].
  94. e keyCode = 37 ifTrue: [self previousSlide]]]
  95. ! !
  96. !PresentationNavigator methodsFor: 'rendering'!
  97. renderToolsOn: html
  98. html a
  99. with: 'IDE';
  100. onClick: [TabManager current open].
  101. html a
  102. with: 'Reload';
  103. onClick: [self reload].
  104. html a
  105. with: '←';
  106. onClick: [self previousSlide].
  107. html a
  108. with: '→';
  109. onClick: [self nextSlide].
  110. !
  111. renderPresentationSelectOn: html
  112. |presentationSelect|
  113. presentationSelect := html select.
  114. presentationSelect
  115. onChange: [self selectPresentationNamed: presentationSelect asJQuery val];
  116. with: [ Presentation concretePresentationsDo: [:aPresentationClass |
  117. html option
  118. value: aPresentationClass name;
  119. with: aPresentationClass title ] ].
  120. !
  121. open
  122. (window jQuery: document) ready: [
  123. self
  124. appendToJQuery: 'body' asJQuery;
  125. setKeybindings;
  126. checkHashChange.
  127. ].
  128. !
  129. renderOn: html
  130. html style
  131. type: 'text/css';
  132. with: self style.
  133. html div
  134. id: 'navigator';
  135. with: [ self
  136. renderToolsOn: html;
  137. renderPresentationSelectOn: html;
  138. renderSlideSelectOn: html].
  139. presentationBrush := html div
  140. id: 'presentation';
  141. yourself.
  142. self checkHash.
  143. self renderCurrentPresentation.
  144. !
  145. renderCurrentPresentation
  146. presentationBrush contents: [:html |
  147. self currentPresentation renderOn: html.
  148. ].
  149. self updateSlideSelect.
  150. !
  151. renderSlideSelectOn: html
  152. slideSelect := html select.
  153. slideSelect onChange: [ self selectSlideAt: slideSelect asJQuery val ].
  154. self updateSlideSelect.
  155. !
  156. updateSlideSelect
  157. slideSelect contents: [:html| |index|
  158. index := 0.
  159. self currentPresentation slidesDo: [ :aSlide|
  160. index := index + 1.
  161. html option
  162. value: index;
  163. with: aSlide title ] ].
  164. ! !
  165. !PresentationNavigator class methodsFor: 'initialize'!
  166. initialize
  167. ^ self open
  168. !
  169. open
  170. ^ self new open
  171. ! !
  172. Widget subclass: #Presentation
  173. instanceVariableNames: 'currentSlide slides'
  174. category: 'Presentation'!
  175. !Presentation methodsFor: 'accessing'!
  176. title
  177. ^ self class title.
  178. !
  179. author
  180. ^'John Smith'
  181. !
  182. url
  183. ^'http://jtalk-project.org'
  184. !
  185. description
  186. ^'A presentation written in Jtalk'
  187. !
  188. email
  189. ^'john@smith.com'
  190. !
  191. slides
  192. slides ifNil: [self initSlides].
  193. ^slides
  194. !
  195. slideClasses
  196. ^self subclassResponsibility
  197. !
  198. currentSlide
  199. ^currentSlide
  200. !
  201. currentSlide: aSlide
  202. currentSlide := aSlide
  203. !
  204. slideTransition
  205. ^'fade'
  206. !
  207. style
  208. "Should return a CSS style"
  209. ^ ''
  210. ! !
  211. !Presentation methodsFor: 'actions'!
  212. nextSlide
  213. | next |
  214. self currentSlide ifNotNil: [
  215. next := self slides
  216. at: (self currentSlideIndex) + 1
  217. ifAbsent: [nil].
  218. next ifNotNil: [currentSlide := next. next show]]
  219. !
  220. showCurrentSlide
  221. self currentSlide ifNotNil: [
  222. '.slide' asJQuery hide.
  223. ('#', self currentSlide id) asJQuery show.
  224. 'title' asJQuery text: self title, ' - ', self currentSlide id.
  225. ]
  226. !
  227. previousSlide
  228. | next |
  229. self currentSlide ifNotNil: [
  230. next := self slides
  231. at: (self currentSlideIndex) - 1
  232. ifAbsent: [nil].
  233. next ifNotNil: [currentSlide := next. next show]]
  234. !
  235. moveAt: anInteger
  236. | next |
  237. next := self slides
  238. at: anInteger
  239. ifAbsent: [nil].
  240. next ifNotNil: [currentSlide := next. next show]
  241. !
  242. currentSlideIndex
  243. ^ self slides indexOf: self currentSlide ifAbsent: [1]
  244. ! !
  245. !Presentation methodsFor: 'enumerating'!
  246. slidesDo: aBlockWithArg
  247. self slides do: [:aSlide| aBlockWithArg value: aSlide].
  248. ! !
  249. !Presentation methodsFor: 'initialization'!
  250. initSlides
  251. slides := self slideClasses collect: [:each | each on: self]
  252. ! !
  253. !Presentation methodsFor: 'rendering'!
  254. renderOn: html
  255. html style
  256. type: 'text/css';
  257. with: self style.
  258. html div
  259. id: 'slides';
  260. with: [self renderSlidesOn: html]
  261. !
  262. renderSlidesOn: html
  263. self slides do: [:each |
  264. each renderOn: html].
  265. currentSlide ifNil: [currentSlide := self slides first].
  266. self showCurrentSlide
  267. ! !
  268. Presentation class instanceVariableNames: 'current'!
  269. !Presentation class methodsFor: 'accessing'!
  270. concretePresentations
  271. ^ self allSubclasses select: [:aPresentationClass| aPresentationClass isConcrete]
  272. !
  273. title
  274. ^ 'Slides'
  275. ! !
  276. !Presentation class methodsFor: 'enumerating'!
  277. concretePresentationsDo: aBlockWithArg
  278. self concretePresentations do: aBlockWithArg.
  279. ! !
  280. !Presentation class methodsFor: 'testing'!
  281. isConcrete
  282. ^false
  283. ! !
  284. Widget subclass: #Slide
  285. instanceVariableNames: 'presentation'
  286. category: 'Presentation'!
  287. !Slide methodsFor: 'accessing'!
  288. presentation
  289. ^presentation
  290. !
  291. presentation: aPresentation
  292. presentation := aPresentation
  293. !
  294. id
  295. ^ self class name
  296. !
  297. cssClass
  298. ^'slide'
  299. !
  300. backgroundColor
  301. ^'#555'
  302. !
  303. title
  304. ^ self id
  305. ! !
  306. !Slide methodsFor: 'actions'!
  307. show
  308. self backgroundColor ifNotNil: [
  309. (window jQuery: '#slides') css: 'background' color: self backgroundColor].
  310. (window jQuery: '.slide') hide: self presentation slideTransition options: #() duration: 300.
  311. (window jQuery: '#', self id) show: self presentation slideTransition options: #() duration: 300.
  312. ! !
  313. !Slide methodsFor: 'rendering'!
  314. renderOn: html
  315. html div class: self cssClass; id: self id; with: [
  316. self renderSlideOn: html.
  317. self renderMetaOn: html]
  318. !
  319. renderSlideOn: html
  320. !
  321. renderMetaOn: html
  322. html div
  323. id: 'meta';
  324. with: [
  325. html p class: 'title'; with: self presentation title.
  326. html p class: 'description'; with: self presentation description.
  327. html a class: 'author'; with: self presentation author; href: 'mailto:', self presentation email.
  328. html a class: 'url'; with: self presentation url; href: self presentation url]
  329. ! !
  330. !Slide class methodsFor: 'instance creation'!
  331. on: aPresentation
  332. ^self new
  333. presentation: aPresentation;
  334. yourself
  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. FOSDEMAmberBackend
  1293. }
  1294. ! !
  1295. !FOSDEM2012Presentation class methodsFor: 'testing'!
  1296. isConcrete
  1297. ^true
  1298. !
  1299. title
  1300. ^'Amber'
  1301. ! !
  1302. Slide subclass: #FOSDEMIntroSlide
  1303. instanceVariableNames: ''
  1304. category: 'Presentation'!
  1305. !FOSDEMIntroSlide methodsFor: 'not yet classified'!
  1306. renderSlideOn: html
  1307. html div class: 'section center animate'; with: [
  1308. html img src: 'fosdem2012/images/amber.png'.
  1309. html p: self presentation author.
  1310. html p: self presentation description.
  1311. html p: [
  1312. html with: self presentation email]].
  1313. ! !
  1314. Slide subclass: #FOSDEMBookletSlide
  1315. instanceVariableNames: ''
  1316. category: 'Presentation'!
  1317. !FOSDEMBookletSlide methodsFor: 'accessing'!
  1318. cssClass
  1319. ^ 'slide blue3d'
  1320. ! !
  1321. !FOSDEMBookletSlide methodsFor: 'rendering'!
  1322. renderSlideOn: html
  1323. self renderBookOn: html.
  1324. html link
  1325. rel:'stylesheet';
  1326. href: 'fosdem2012/lib/booklet/jquery.booklet.1.2.0.css'.
  1327. jQuery
  1328. getScript: 'fosdem2012/lib/booklet/jquery.booklet.1.2.0.min.js'
  1329. do: ['#book' asJQuery booklet: self bookletOptions].
  1330. !
  1331. renderBookOn: html
  1332. html div
  1333. id: 'book';
  1334. with: [ html div
  1335. class: 'b-load';
  1336. with: [ html
  1337. div: 'Amber makes it easy to plug existing javascript libraires';
  1338. div: 'Here is an example with the jQuery Booklet plugin';
  1339. div: 'Want to see how ?';
  1340. div: [ html button
  1341. onClick: [Browser openOn: FOSDEMBookletSlide ];
  1342. with: 'Just browse the code :)'. ]
  1343. ]
  1344. ].
  1345. !
  1346. bookletOptions
  1347. ^ #{
  1348. 'arrows' -> true.
  1349. 'keyboard' -> false.
  1350. 'pageNumbers' -> false.
  1351. 'closed' -> true
  1352. }
  1353. ! !
  1354. Slide subclass: #FOSDEMAmberBackend
  1355. instanceVariableNames: ''
  1356. category: 'Presentation'!
  1357. !FOSDEMAmberBackend methodsFor: 'accessing'!
  1358. cssClass
  1359. ^ 'slide green3d'
  1360. ! !
  1361. !FOSDEMAmberBackend methodsFor: 'rendering'!
  1362. renderSlideOn: html
  1363. html div
  1364. class: 'section center';
  1365. with: [ html h1: 'Need a backend ?'.
  1366. {'nodejs.png'. 'php.gif'. 'rails.png'. 'pharo.png'. 'ambrhino.jpg'} do: [:aString |
  1367. html img: 'fosdem2012/images/', aString.
  1368. ]
  1369. ]
  1370. ! !