设为首页 收藏本站
查看: 516|回复: 0

[经验分享] Coyote

[复制链接]
发表于 2017-1-7 10:22:10 | 显示全部楼层 |阅读模式
  When I started this blog I choose the Apache Rollerblog application as back end. A couple of years ago I had the pleasure of evaluating several blog solutions for my employee and the Apache Roller blog did stand out in its architecture already then and now it's even more solid and flexible. It's easy to install, it's secure, it has agood architecture and it does scale(not that I think this blog will be that popular).
Key features
  I'm not going to dig into the issues which I did not agree with in the default Roller templates. In a way the default Roller templates are finebut personally I wanted to address some issues.
  Pages shall validate
The Coyote theme does validate as xhtml 1.0 strictwith one exception. This exception are caused by links containing unescaped & characters in URL's generated by Roller core. These links does only occur in the calendar when an specific date on a tag areselected.
  Pages shall use a dtd which does not put the browser in quirks mode
The Coyote theme does, as mentioned, use the xhtml 1.0 strict dtd which puts Opera, Mozilla and Safari in standard compliant mode and IE 6 and 7in Almost Standard Compliant Mode. The only difference between these modes are the calculation of the hight on table cells.
  The markup should separate structure and content and be as clean as possible
The Coyote theme use div tags only for structure. Content use html's appropriate tags which gives the pages a natural semantic. As few class and id CSS selectors as possible are used. The different parts of the page are given styling with a wider use and combination of CSS selectors.
  Optimized for fast download and rendering
The Coyote theme use different technique to reduce the amount of data transferred from server to browser. Markup are made as small as possibleand static content which are common for all pages are put into separateCSS and JS files to ensure that only changing data are sent from serverto browser when user navigate between pages on a site. Techniques to reduce the amount of http requeststo the server are also used.
  Optimized for search engines
The Coyote theme consist of a natural structure giving the pages a good semantic. It also implement support for meta keywords and meta description. It does also hold the possibility to define verification codes for the Google Webmaster Toolsand the Microsoft Live Search Webmaster Tools.
  No hacks and nicely degradation in older browsers
The markup and CSS in the Coyote theme does not use any hacks to target any browser. Only web-standards are in use. The CSS implement an reset featurewhich put most new browser in an equal state making it easier to apply an more identical style amongst them. The design also use the approach that older browser are presented with a degraded design instead of trying to "hack" certain features for those browsers (the world must move forwards).
Mock-ups
  Before I build dynamic templates or integrate against an system I prefer, when possible, to write static mock-ups and then implement design against those static mock-ups. So are done with the Coyote theme.
  Roller consists basically of tree “pages” and have tree mock-ups;
- a weblog page
- a permalink page
- a search result page
  NOTE: The Coyote theme contains a compressed version of the CSS and JS files where all comments and unnecessary whitespace are removed. This renders them fast to download but pretty difficult to read for a human. The mock-ups contain a non-compressed version of the same CSS and JS files where all comments and whitespace are intact. If you would like todig into those files I recommend you to look at the mock-ups.
Download
  The Coyote theme can be downloaded as a zip file here.
Installation
  The installation are a little bit more complex than an ordinary Roller theme you'll find around. The reason are due to some changes in most of the macros which Roller use for pulling data from the business layer. Roller has a nice way to extend these macros and the Coyote theme use this function for extending the macros so the macros located in Coyote does not collide with the default macros shipped with Roller.
  There was also some need to extend and change some language properties for the Coyote theme. Because there is no language files for themes in Roller these language properties must be added to the Roller core properties files.
  To install the Coyote them, do the following steps:
1– Download the Coyote themeand extract the zip file to an temporary place. You will then have two directories: /themesand /WEB-INF
2– In the directory where you extracted the Coyote theme; copy themes/coyote/to /themes/in your installation of Roller.
3– Copy /WEB-INF/velocity/coyote-custom.vmto /WEB-INF/velocity/in your installation of Roller.
4- If you do NOT have an file named roller-custom.vmin your /WEB-INF/velocity/directory in your installation of Roller, rename coyote-custom.vmto roller-custom.vm.
OR
If you DO have an file named roller-custom.vmin your /WEB-INF/velocity/directory in your installation of Roller, open coyote-custom.vmin an text editor and copy the content of the file at the end of your current existing roller-custom.vm.
5- In the directory where you extracted the Coyote theme; open /WEB-INF/classes/ApplicationResources.properties.additionalin an text editor and copy the content of this file to the end of /WEB-INF/classes/ApplicationResources.propertiesin your installation of Roller.
6– Restart the application running Roller and you should see the Coyote theme in Rollers administration interface.
Know issues and future improvements
  The Coyote theme are an work in progress and I have some improvements I want to do and some new features I want to add in the near future. Theseare:
  - Putt all language into properties files - The templates does contain English language. They do also use language properties from the "common"Roller properties file. This shall go into separate language propertiesfor the Coyote theme.
- Improve the calendar markup - The default calendar shipped with Rollerare produced by an component outside the Velocity template system Roller use for templating. This made it a bit hard to make an calendar which I could pack and ship and I need to be a bit more familiar with Velocity before implementing the calendar as a Velocity template. Due tothis, the calendar has a bit of an overkill in markup and renders 1.5 kb more markup than I would like to.
- Fix some minor visual IE issues in submit comment form - IE do strangethings all the time. I just need to sort them out without introducing IE hacks.
- Fix script on permalink page which fails. - The scripts used in the Coyote theme are basically copied from one of the basic themes shipped with Roller. After changing some markup one of them started to throw an exception. I'll go trough all scripts and clean them up.
- Add "Share This" functions to blog posts - There are several services out there which makes it possible to promote the content on a blog. I'lladd some of the most popular.
- Add better compression on CSS and JavaScript file. - Today I just remove comments and linebreaks in CSS files. I'll add JSMin and CSSMincompression to the CSS and JavaScript files during packaging of the theme.
- Add CSS for hand held, targeting iPhone and Opera Mini/Mobile.
- Improve formating of different elements in blog post. - The first functions in the CSS does reset all markup in the browser to ensure equal presentation between browsers. This does also set some formating of certain markup elements to none and renders them more or less useless. I need to apply an style making these nice and have a function again.
- Add Google Analytics
- Add Google Sitemap
- Enhance the tags into an "tag cloud".
  转自【http://www.trygve-lie.com/blog/entry/coyote_an_roller_theme】

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-324998-1-1.html 上篇帖子: apache重写URL的Substitution| RewriteRule指令 下篇帖子: apache log4j API自身log输出设置
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表