Articles Tagged with sleek
You are currently browsing 9 articles tagged with sleek.
jQuery 3D Circle
Published Monday 12th of December 2011
I wanted to learn more about CSS 3D transforms so I started experimenting with the login page on SleekPHP.
It all turned into a jQuery Plugin called "3D Circle". I haven't uploaded it to the site yet but you can find both the CSS and the JS (beta) on Google code.
There's also a demo you can try out here (only tested in Chrome).
It's just a save of the HTML, CSS and JS on that page so you won't actually be able to sign up or do anything else. That's not the point of the demo though so.
I've only tried it in Chrome but use all vendor prefixes in the CSS so if your browser supports them all it should work in it too.
It took me a while to get everything the way I wanted it. The circle is automatically generated based on the items on the page. So if you add or remove items the circle adapts.
First I tried calculating the positions myself using sin and cos and apply them to the item's translateX and translateZ values. This worked fine before I started rotating the items as well. Without rotation the items were all facing the screen but they were at least in a circle.
When I started rotating the items all hell broke lose and nothing looked right. After some debugging I noticed that the rotation's origin is always from the 0, 0, 0 position. So the item would no longer rotate around itself but around the point at 0, 0, 0.
Thanks to this, though, it was much easier than having to calculate the circle positions myself. All I needed to do was place all the items at z: radie and then rotate them by 360 deg / num items.
Doing that placed all my items in a nice circle. Now to rotate this circle all I needed to do was rotate the parent element of all the items.
The problem with this, though, is that some items will be "in front" of the 0 z pane. That means they will look pretty much twice their size and that's not what we want.
My first thought was to simply move the wrapper of the items in the z pane, but doing that introduced the same problem I had before with the items themselves; now the rotation of the wrapper would go around its 0, 0, 0 position while it's sitting at 0, 0, -radie.
The only solution I could come up with was to wrap the circle in yet another element used only to move the circle in x, y or z.
So the final HTML requires quite a lot of wrapping elements. If you're doing this to a list of elements though you'll already have a
uland possibly a wrappingnavorsectionso you'd only need to add one extra element.The outer wrapper is the "stage" for the circle. It contains the perspective and perspective-origin properties. Without these the transforms will all be flat.
The second wrapper is the "mover" for the circle. It is only used for moving the entire circle its radie in the z pane. This way we avoid having elements twice their size.
The third wrapper is the actual circle and its direct descendants are the circle items.
As you can see the demo is from SleekPHP's login page, you can check out SleekPHP's logger at the bottom of the page. I've got loads of other work atm so progress has been a bit slow lately.
Be the first to post a comment
SleekPHP User Handling
Published Thursday 1st of December 2011
SleekPHP development has gone a bit slow lately but last night I managed to get quite a lot of work done on the user management.

SleekPHP's user management is database driven and allows any number of users with any number of authorization levels (as opposed to aFramework's that wasn't DB driven and only two users and two auth levels could exist).
In addition to writing the Model, DB, User, UserModel and UsersModel classes I've also written a Form class which all three modules on the login page use.
The form class is used to generate, submit and validate forms consistently across SleekPHP sites.
It's not a core class and could really be used in any project. If you want to see it in action you can check out the RegisterModule. You'll also see how the different model classes are used there.
I'm severely tired so sorry if this doesn't make sense :P
Join 4 others and post a comment
SleekCMS Progress
Published Monday 17th of October 2011
Since releasing SleekPHP.com to the public I've been hard at work on SleekCMS.

With SleekCMS I'm aiming to create a very flexible CMS that allows users to create any number of content types (similar to node types in Drupal). Each content type can have any number of user defined "fields" (like "thumbnail", or "email" or "whatever").
Contents can be places in hierarchies as each row has a parent_id. The idea is to provide an API so that users easily can display content rows in a number of ways.
There will also be support for tags and attachments (a media library pretty much).
I'm also planning on making the SleekCMS admin a bit of a hub for all kinds of information about your SleekPHP site as well as SleekPHP news and whatnot.
There's loads of work left before it is functional but I hope to finish it and convert AndreasLagerkvist.com too SleekPHP before Christmas. We'll see how that goes :)
Btw: I know it currently looks almost identical to Google+ :P
Join 2 others and post a comment
SleekPHP.com is Live
Published Wednesday 28th of September 2011
After a month or so of some seriously late nights (early mornings) I've now gone live with SleekPHP.com.
Everything about SleekPHP kan be found there so I won't write any more here.
SleekPHP.com. Oh yea, SleekMobile too.
Be the first to post a comment
SleekPHP Progress
Published Wednesday 21st of September 2011
SleekPHP is the new name for aFramework and it is as usual a complete rewrite with loads of improvements.

It builds on the same structure as aFramework where a Site can extend many other Sites and each Site consists of many Pages which each have many Modules.
One of the things I wanted to focus on with SleekPHP was to try and write better OOP. For example all of the previously mentioned components are now classes with handy functionality. Where before the aFramework-class would handle almost everything there are now 3 main classes that make up a page:
- SleekPHP - ties everything together and holds instances of DB, Router, User etc
- Site - represents a Site (a directory in the Sites/-directory along with a mandatory SiteName.info-file)
- Page - represents a Page (an .xml file in a Site's Pages/-directory)
I've been scratching my head quite frequently lately trying to figure out where each method should reside. For example, should it be Site->renderPage(pageName) or Page->render()? I think it's ok as it is now, and these things can quite easily be changed without having to change third party code afterwards.
I've also tried to focus a lot on keeping the core stuff really clean and properly commented and also try to move as much as possible to external modules and plug-ins.
Plug-ins is another new feature as well and all they really are are functions that run at a certain points in the execution of the framework. I've for example moved the HTML packing and debug logging to plug-ins instead of keeping them somewhere in core.
There's still a lot to be done but core is getting close to being "finished" and after that I'm gonna focus on getting sleekphp.com as well as mobile.sleekphp.com (SleekMobile) up and running. After that I need to convert andreaslagerkvist.com to the new code. Which is a massive project so it may take some time.
If you're interested in the code you can as always find it on Google code.
I'd start with the index.php file, then check out the SleekPHP class which should lead you to the Site class and finally the Page class.
There's a total of 15 files in core but some of them are almost empty at the moment. Almost all of the meat is done in the files mentioned above.
Be the first to post a comment
Server Problems and More
Published Wednesday 21st of September 2011
You may have noticed the site's been down a few days (weeks even perhaps) and because I've been a bit lazy it's taken me 'til today to fix it.
Me and a couple of mates have had our own VPS for a while now but a while back it suddenly went down and because there's really nothing crucial on it no one's been in the mood to sort it out.
Today I set up my own brand new server and will start using that for future projects. I've also spent the evening backing up data from the old server.
When doing the DB-dumps I noticed that one of my sites (one I've completely stopped working on ages ago) had gone from a 300kb dump to a 30mb dump in a matter of weeks. Which is most likely the root of our problems.
I was using a modified version of Jonathan Snook's spam checker and apparently the damn bots have now found a way around that too. Luckily it has yet to affect any of my other sites using the same spam tool.
Anyway, I got into the cleaning up spirit and decided to drop quite a few of my sites. In fact I deleted all my personal projects except for this site and will be moving a couple of other projects away from the server (and aFramework) soon as well.
The reason I've taken down a-framework.org (along with the demo and bugtracker) is that I've started work on the new version of the framework; SleekPHP.
My plan for the future is:
- Move all sites off the old server
- Archive aFramework and all of its sites
- Convert andreaslagerkvist.com to SleekPHP
- Remove old server, have only andreaslagerkvist.com and sleekphp.com on new server (both running SleekPHP)
The biggest problem is converting this site to SleekPHP. SleekPHP's engine is pretty much finished but I haven't built any of the many sites that come with aFramework yet (like aCMS and aBlog etc). In fact, I haven't even set up the DB-stuff in SleekPHP yet.
I'm not sure yet whether I should try to create at least something basic to put on this domain before I remove the old server or if I might just let andreaslagerkvist.com rest for a while and then reboot in a few months with the new framework (and most likely a new design as well). I guess I'll lose all my Google ranking in that time but wtf all that leads to is bug reports on jQuery plugins anyway :P
Be the first to post a comment
Sleek 1.0 and a New Design
Published Friday 11th of March 2011
I've started sketching out ideas for a new version of Sleek. Sleek 0.1 really didn't get very far although the foundation is pretty solid.

Version 1.0 will follow the same structure as aFramework has since the first version.
Join 2 others and post a comment
Sleek/aFramework and Drupal
Published Monday 26th of April 2010
I've never really checked out Drupal properly before (or any other framework for that matter) but tonight (16/4) I spent a few hours reading the docs.

It's almost scary how many things are similar, and in some cases completely identical, to aFramework/Sleek.
Join 2 others and post a comment
aFramework 4.0 a.k.a. SleekPHP
Published Wednesday 21st of April 2010
As usual when I've finished building 5 or 6 sites and ~80 modules for one version of aFramework I want to start the next, non-backwards-compatible, version of it :P

This year is no different and I've begun development on aFramework 4.0 or Sleek 0.1.
Join 2 others and post a comment
