在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):DuneSt/MaterialDesignLite开源软件地址(OpenSource Url):https://github.com/DuneSt/MaterialDesignLite开源编程语言(OpenSource Language):Smalltalk 100.0%开源软件介绍(OpenSource Introduction):MaterialDesignLite for SeasideCoverage: This project has as first goal to bind the Google's Material Design Lite project to Seaside and as second goal to build widgets on top of Material Design to help Seaside developers in creating fast web application with flat design. For a tutorial on Seaside check http://book.seaside.st. A migration guide from v1 to v2 can be found here. DocumentationVersion managementThis project use semantic versioning to define the releases. This means that each stable release of the project will be assigned a version number of the form
When a release contains only bug fixes, the patch number increases. When the release contains new features that are backward compatible, the minor version increases. When the release contains breaking changes, the major version increases. Thus, it should be safe to depend on a fixed major version and moving minor version of this project. Install MDL SeasideIn PharoTo install MaterialDesignLite on your Pharo image, execute the following script: Spotter Cloud Workspace Url. See Metacello new
githubUser: 'DuneSt' project: 'MaterialDesignLite' commitish: 'v2.x.x' path: 'src';
baseline: 'MaterialDesignLite';
onWarningLog;
load To add MaterialDesignLite Seaside to your baseline: spec
baseline: 'MaterialDesignLite'
with: [ spec repository: 'github://DuneSt/MaterialDesignLite:v2.x.x/src' ]
Note that you can replace the #master by another branch such as #development or a tag such as #v2.0.0, #v2.? or #v2.1.? . In GemStoneGemstone is only supported on v1 of the project. This does not mean no fix or feature can be added to it. We can still release new patch and feature version if asked. Metacello new
githubUser: 'DuneSt' project: 'MaterialDesignLite' commitish: 'v1.x.x' path: 'src';
baseline: 'MaterialDesignLite';
onWarningLog;
load To add MaterialDesignLite Seaside to your baseline just add this: spec
baseline: 'MaterialDesignLite'
with: [ spec repository: 'github://DuneSt/MaterialDesignLite:v1.x.x/src' ] Note that you can replace the #master by another branch such as #development or a tag such as #v1.0.0, #v1.? or #v1.2.? . Getting startedWe use as a base the files product by Google's Material Design Lite. To have a working Material Design Seaside application we need to add those files. Most of them can be easily added via a file library but one file need to be explicitely added because this file change depending on the colors you wish for your application. For now MDL Seaside is based on version 1.3.0 of Google's Material Design Lite. Add the right libraries and fileTo use MaterialDesign you will need to add JQuery and Material Design library to your application: (WAAdmin register: self asApplicationAt: 'myApplication')
addLibrary: JQDeploymentLibrary;
addLibrary: MDLLibrary Then you will need to add the css file with the colors. To do so, you will have two options:
You can find the files on https://getmdl.io/customize/index.html They are in the form of: https://storage.googleapis.com/code.getmdl.io/1.3.0/material.XXX-YYY.min.css Where
Add the css file in the updateRoot of your application: MyApplication>>updateRoot: anHtmlRoot
super updateRoot: anHtmlRoot.
anHtmlRoot beHtml5.
anHtmlRoot stylesheet url: (WAUrl absolute: 'https://storage.googleapis.com/code.getmdl.io/1.3.0/material.XXX-YYY.min.css'). Add specific style for extensionsIn order to make the extentions work properly, you should define some colors specific rules for your application in your css. To do so, just define: .mdl-pagination__current{
box-shadow: inset 0px -4px 0px 0px #XXXXXX !important;
} Where Subclassing MDLApplicationAnother simple way to start with MDL is to subclass MDLApplication to create your root component. MDLApplication is a class to help you to start an application easily. It will keep in a FileLibrary most of MDL's files. Since MaterialDesignLite works with a primary color and an accent color you will need to set them. To do so you will need to add this to your #initialize method: self primaryColor: MDLColor indigo secondaryColor: MDLColor pink You can find the possible colors into the class MDLColor class. ExamplesYou can find multiple examples when the application will be installed at the url: http://localhost:8080/MDLDemo When you install in a plain Pharo image you need to start the seaside server first by opening Since v2 you can also open the demo from the menu bar under You can find a demo at: https://mdl.ferlicot.fr/ ZnWorkspaceIf you look at a cloud workspace page, you'll see it mentions a Gofer it
squeaksource: 'ZincHTTPComponents';
package: 'Zinc-WWS-Client';
load. To open one, just do a ZnWorkspace openUrl: 'http://ws.stfx.eu/1JIZRQS7OI00' Latest supported DependenciesSmalltalk versions compatibility
(*) This version of Gemstone is tested. Older versions might work but we did not tested it. (**) The compatibility is not total. MaterialDesignLite uses Pharo's Traits to provide the users composables components. Thus, if the Gemstone users wants to use those components they will have to flatten themself the Traits in their Seaside application PortsA port of MDL for Seaside to Dolphin Smalltalk has been made and can be found at: Under the hoodUnderstanding what is going on under the hood is always useful. Have a look at (http://www.tutorialspark.com/Google_MaterialDesignLite_Tutorials/index.php) for a tutorial. ContactIf you have any questions or problems do not hesitate to open an issue or contact cyril (a) ferlicot.me |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论