| @ -1,301 +1,33 @@ | |||
| <a href="https://www.htmly.com" target="_blank"></a> | |||
| HTMLy is an open source Databaseless Blogging Platform or Flat-File Blog prioritizes simplicity and speed written in PHP. HTMLy can be referred to as Flat-File CMS either since it will also manage your content. | |||
| TUMBLy is a fork of HTMLy with a refurbished admin dashboard. The dashboard is optimized for instant blogging similar to tumblr. | |||
| You do not need to use a VPS to run HTMLy, shared hosting or even [free hosting](https://github.com/danpros/htmly#openshift) should work as long as the host supports at least PHP 5.3. | |||
| Please check the [HTMLY](http://htmly.com) website for all further informations. HTMLy is an open source Databaseless Blogging Platform or Flat-File Blog prioritizes simplicity and speed written in PHP. | |||
| Demo | |||
| ---- | |||
| Visit <a href="https://demo.htmly.com" target="_blank">HTMLy demo</a> as blog. | |||
| Features | |||
| --------- | |||
| - Admin Panel | |||
| - Markdown editor with live preview and image upload | |||
| - Categorization with category and tags (multiple tagging support) | |||
| - Static Pages (e.g. Contact Page, About Page) | |||
| - Meta canonical, description, and rich snippets for SEO | |||
| - Pagination | |||
| - Author Page | |||
| - Multi author support | |||
| - Social Links | |||
| - Disqus Comments (optional) | |||
| - Facebook Comments (optional) | |||
| - Google Analytics | |||
| - Built-in Search | |||
| - Related Posts | |||
| - Per Post Navigation (previous and next post) | |||
| - Body class for easy theming | |||
| - Breadcrumb | |||
| - Archive page (by year, year-month, or year-month-day) | |||
| - JSON API | |||
| - OPML | |||
| - RSS Feed | |||
| - RSS 2.0 Importer (basic) | |||
| - Sitemap.xml | |||
| - Archive and Tag Cloud Widget | |||
| - SEO Friendly URLs | |||
| - Teaser thumbnail for images and Youtube videos | |||
| - Responsive Design | |||
| - User Roles | |||
| - Online Backup | |||
| - File Caching | |||
| - Auto Update | |||
| - Post Draft | |||
| Requirements | |||
| ------------ | |||
| HTMLy requires PHP 5.3 or greater and php-xml package. | |||
| Installations | |||
| ------------- | |||
| If you have an OpenSSL enabled server (usually enabled by default), use the [installer.php](https://github.com/danpros/htmly/releases/latest) and read the following [instructions](https://docs.htmly.com/basics/installations) to get started. If you don't have OpenSSL, please download the latest version, extract it, then upload the extracted files to your server. Also, make sure the installation folder is writeable by your server. | |||
| Configurations | |||
| -------------- | |||
| Set written permission for the `cache` and `content` directories. | |||
| Rename `config.ini.example` inside the `config` folder to `config.ini` (or you can create a new `config/config.ini` file) then change the site settings there. | |||
| Create `YourUsername.ini` inside the `config/users` folder or simply rename the `username.ini.example` file and write down your password there: | |||
| ````cfg | |||
| password = YourPassword | |||
| ```` | |||
| In addition, HTMLy support admin user role. To do so, simply add the following line to your choosen user: | |||
| ````cfg | |||
| role = admin | |||
| ```` | |||
| Users assigned with the admin role can edit/delete all users' posts. | |||
| To access the admin panel, add `/login` to the end of your site's URL. | |||
| e.g. `www.yoursite.com/login` | |||
| ### Lighttpd | |||
| The following is an example configuration for lighttpd: | |||
| ````php | |||
| $HTTP["url"] =~ "^/config" { | |||
| url.access-deny = ( "" ) | |||
| } | |||
| $HTTP["url"] =~ "^/system/includes" { | |||
| url.access-deny = ( "" ) | |||
| } | |||
| $HTTP["url"] =~ "^/system/admin/views" { | |||
| url.access-deny = ( "" ) | |||
| } | |||
| url.rewrite-once = ( | |||
| "^/(themes|system|vendor)/(.*)" => "$0", | |||
| "^/(.*\.php)" => "$0", | |||
| # Everything else is handles by htmly | |||
| "^/(.*)$" => "/index.php/$1" | |||
| ) | |||
| ```` | |||
| ### Nginx | |||
| The following is a basic configuration for Nginx: | |||
| ````nginx | |||
| server { | |||
| listen 80; | |||
| server_name example.com www.example.com; | |||
| root /usr/share/nginx/html; | |||
| access_log /var/log/nginx/access.log; | |||
| error_log /var/log/nginx/error.log error; | |||
| index index.php; | |||
| location ~ /config/ { | |||
| deny all; | |||
| } | |||
| location / { | |||
| try_files $uri $uri/ /index.php?$args; | |||
| } | |||
| location ~ \.php$ { | |||
| fastcgi_pass 127.0.0.1:9000; | |||
| fastcgi_index index.php; | |||
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |||
| include fastcgi_params; | |||
| } | |||
| } | |||
| ```` | |||
| OpenShift | |||
| Changes | |||
| ---- | |||
| - Clean and reduced design of the dashboard. | |||
| - Main menu is focused on posts, pages and drafts now. | |||
| - Post and pages are visually separated now. | |||
| - In the main menuy, many less important features are hidden under "tools". | |||
| - Startpage of the dashboard is now focused on creating new blog posts. | |||
| - Select post types with font awesome icons now. | |||
| - Formatting buttons now with font awesome icons. | |||
| - You can hide and show format buttons now (with JavaScript). | |||
| - Input forms are reduced to title, featured content and main content. | |||
| - You can still add all other input fields (categories, tags, date, url) in the config area. | |||
| - Several minor changes. | |||
| Be Aware of Downsides!! | |||
| --------- | |||
| Need a free server to test HTMLy? try [OpenShift](https://www.openshift.com) using the [HTMLy OpenShift QuickStart](https://hub.openshift.com/quickstarts/219-htmly) for easy deployment. | |||
| **Quick install:** | |||
| [](https://hub.openshift.com/quickstarts/deploy/219-htmly) | |||
| Making a secure password | |||
| ---------------------- | |||
| Passwords can be stored in `username.ini` (where "username" is the user's username) in either plaintext, encryption algorithms supported by php `hash` or bcrypt (recommended). To generate a bcrypt encrypted password: | |||
| ```` | |||
| $ php -a | |||
| > echo password_hash('desiredpassword', PASSWORD_BCRYPT); | |||
| ```` | |||
| This will produce a hash which is to be placed in the `password` field in `username.ini`. Ensure that the `encryption` field is set to `bcrypt`. | |||
| Both Online or Offline | |||
| ---------------------- | |||
| The built-in editor found in the admin panel, also provides you the ability to write to Markdown files offline by uploading them (see naming convention below) into the `content/username/blog/category/type/`: | |||
| * `username` must match `config/users/username.ini`. | |||
| * `category` must match the `category.md` inside `content/data/category/category.md` except the `uncategorized` category. | |||
| * `type` is the content type. Available content type `post`, `video`, `audio`, `link`, `quote`. | |||
| For static pages you can upload it to the `content/static` folder. | |||
| Category | |||
| -------- | |||
| The default category is `Uncategorized` with slug `uncategorized` and you do not need to creating it inside `content/data/category/` folder. But if you write it offline and want to assign new category to specific post you need to creating it first before you can use those category, example `content/data/category/new-category.md` with the following content: | |||
| ```html | |||
| <!--t New category title t--> | |||
| <!--d New category meta description d--> | |||
| These changes are hard-coded in the systems-folder of HTMLy. You cannot update to new versions of HTMLy anymore. | |||
| New category info etc. | |||
| ```` | |||
| The slug for the new category is `new-category` (htmly removing the file extension). And for full file directory: | |||
| ```` | |||
| content/username/new-category/post/file.md | |||
| ```` | |||
| File Naming Convention | |||
| ---------------------- | |||
| When you write a blog post and save it via the admin panel, HTMLy automatically create a .md file extension with the following name, example: | |||
| ```` | |||
| 2014-01-31-12-56-40_tag1,tag2,tag3_databaseless-blogging-platform-flat-file-blog.md | |||
| ```` | |||
| Here's the explanation (separated by an underscore): | |||
| - `2014-01-31-12-56-40` is the published date. The date format is `yyyy-mm-dd-hh-mm-ss` | |||
| - `tag1,tag2,tag3` are the tags, separated by commas | |||
| - `databaseless-blogging-platform-flat-file-blog` is the URL | |||
| For static pages, use the following format: | |||
| ```` | |||
| content/static/about.md | |||
| ```` | |||
| In the example above, the `/about.md` creates the URL: `www.yourblog.com/about` | |||
| Thus, if you write/create files offline, you must name the .md file in the format above. | |||
| For static subpages, use the following format: | |||
| ```` | |||
| content/static/about/me.md | |||
| ```` | |||
| This will create the URL: `www.yourblog.com/about/me` | |||
| Content Tags | |||
| ------------- | |||
| If you are writing offline, you need specify the content tags below: | |||
| **Title** | |||
| ```html | |||
| <!--t Title t--> | |||
| ```` | |||
| **Meta description** | |||
| ```html | |||
| <!--d The meta description d--> | |||
| ```` | |||
| **Tags** | |||
| This is just the tags display and for the slug is in the filename. | |||
| ```html | |||
| <!--tag Tag1,Tag2 tag--> | |||
| ```` | |||
| **Featured image** | |||
| Post with featured image. | |||
| ```html | |||
| <!--image http://www.example.com/image-url/image.jpg image--> | |||
| ```` | |||
| **Featured youtube video** | |||
| Post with featured youtube video. | |||
| ```html | |||
| <!--video https://www.youtube.com/watch?v=xxxxxxx video--> | |||
| ```` | |||
| **Featured soundcloud audio** | |||
| Post with featured soundcloud audio. | |||
| ```html | |||
| <!--audio https://soundcloud.com/xxxx/audio-url audio--> | |||
| ```` | |||
| **Featured link** | |||
| Post with featured link. | |||
| ```html | |||
| <!--link https://github.com/danpros/htmly link--> | |||
| ```` | |||
| **Featured quote** | |||
| Post with featured quote. | |||
| ```html | |||
| <!--quote Premature Optimization is The Root of All Evil quote--> | |||
| ```` | |||
| **Example** | |||
| Example of how your post would look like: | |||
| ```html | |||
| <!--t Here is the post title t--> | |||
| <!--d The meta description d--> | |||
| <!--tag Tag1,Tag2 tag--> | |||
| <!--video https://www.youtube.com/watch?v=xxxxxxx video--> | |||
| Paragraph 1 | |||
| Paragraph 2 etc. | |||
| ``` | |||
| Credit | |||
| ------ | |||
| * [Martin Angelov](http://tutorialzine.com) | |||
| * [Xiaoying Riley](http://themes.3rdwavemedia.com) | |||
| Contribute | |||
| ---------- | |||
| 1. Fork and edit | |||
| 2. Submit pull request for consideration | |||
| Contributors | |||
| ---------- | |||
| - [danpros](https://github.com/danpros) - [Weblog](http://www.danpros.com) | |||
| - [Kanti](https://github.com/Kanti) - [Weblog](https://kanti.de) | |||
| - [fahmi182](https://github.com/fahmi182) - [Weblog](http://ifahmi.com) | |||
| - [fanningert](https://github.com/fanningert) - [Weblog](http://thomas.fanninger.at) | |||
| - [BlackCodec](https://github.com/BlackCodec) | |||
| - [mlncn](https://github.com/mlncn) | |||
| - [Tea23](https://github.com/Tea23) | |||
| - [greenphp](https://github.com/greenphp) | |||
| The same with the markdown editor "pagedown". The changes are hardcoded, so you cannot update the library anymore. Pagedown hasn't been updated since 2015, so it shouldn't be a big problem. | |||
| Copyright / License | |||
| ------------------- | |||
| For copyright notice please read [COPYRIGHT.txt](https://github.com/danpros/htmly/blob/master/COPYRIGHT.txt). HTMLy is licensed under the GNU General Public License Version 2.0 (or later). | |||
| ## Screenshots | |||
| @ -0,0 +1,9 @@ | |||
| ;Password | |||
| password = yourpassword | |||
| encryption = clear | |||
| ; encryption: not set, leave blank or set to clear or none to use plain text password for the user, | |||
| ; else set to encryption algoritm supported by hash function of php to use the selected | |||
| ; encryption | |||
| ;Role | |||
| role = admin | |||
| @ -0,0 +1,12 @@ | |||
| Font license info | |||
| ## Font Awesome | |||
| Copyright (C) 2016 by Dave Gandy | |||
| Author: Dave Gandy | |||
| License: SIL () | |||
| Homepage: http://fortawesome.github.com/Font-Awesome/ | |||
| @ -0,0 +1,75 @@ | |||
| This webfont is generated by http://fontello.com open source project. | |||
| ================================================================================ | |||
| Please, note, that you should obey original font licenses, used to make this | |||
| webfont pack. Details available in LICENSE.txt file. | |||
| - Usually, it's enough to publish content of LICENSE.txt file somewhere on your | |||
| site in "About" section. | |||
| - If your project is open-source, usually, it will be ok to make LICENSE.txt | |||
| file publicly available in your repository. | |||
| - Fonts, used in Fontello, don't require a clickable link on your site. | |||
| But any kind of additional authors crediting is welcome. | |||
| ================================================================================ | |||
| Comments on archive content | |||
| --------------------------- | |||
| - /font/* - fonts in different formats | |||
| - /css/* - different kinds of css, for all situations. Should be ok with | |||
| twitter bootstrap. Also, you can skip <i> style and assign icon classes | |||
| directly to text elements, if you don't mind about IE7. | |||
| - demo.html - demo file, to show your webfont content | |||
| - LICENSE.txt - license info about source fonts, used to build your one. | |||
| - config.json - keeps your settings. You can import it back into fontello | |||
| anytime, to continue your work | |||
| Why so many CSS files ? | |||
| ----------------------- | |||
| Because we like to fit all your needs :) | |||
| - basic file, <your_font_name>.css - is usually enough, it contains @font-face | |||
| and character code definitions | |||
| - *-ie7.css - if you need IE7 support, but still don't wish to put char codes | |||
| directly into html | |||
| - *-codes.css and *-ie7-codes.css - if you like to use your own @font-face | |||
| rules, but still wish to benefit from css generation. That can be very | |||
| convenient for automated asset build systems. When you need to update font - | |||
| no need to manually edit files, just override old version with archive | |||
| content. See fontello source code for examples. | |||
| - *-embedded.css - basic css file, but with embedded WOFF font, to avoid | |||
| CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain. | |||
| We strongly recommend to resolve this issue by `Access-Control-Allow-Origin` | |||
| server headers. But if you ok with dirty hack - this file is for you. Note, | |||
| that data url moved to separate @font-face to avoid problems with <IE9, when | |||
| string is too long. | |||
| - animate.css - use it to get ideas about spinner rotation animation. | |||
| Attention for server setup | |||
| -------------------------- | |||
| You MUST setup server to reply with proper `mime-types` for font files - | |||
| otherwise some browsers will fail to show fonts. | |||
| Usually, `apache` already has necessary settings, but `nginx` and other | |||
| webservers should be tuned. Here is list of mime types for our file extensions: | |||
| - `application/vnd.ms-fontobject` - eot | |||
| - `application/x-font-woff` - woff | |||
| - `application/x-font-ttf` - ttf | |||
| - `image/svg+xml` - svg | |||
| @ -0,0 +1,82 @@ | |||
| { | |||
| "name": "", | |||
| "css_prefix_text": "icon-", | |||
| "css_use_suffix": false, | |||
| "hinting": true, | |||
| "units_per_em": 1000, | |||
| "ascent": 850, | |||
| "glyphs": [ | |||
| { | |||
| "uid": "381da2c2f7fd51f8de877c044d7f439d", | |||
| "css": "picture", | |||
| "code": 59392, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "0ddd3e8201ccc7d41f7b7c9d27eca6c1", | |||
| "css": "link", | |||
| "code": 59394, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "7034e4d22866af82bef811f52fb1ba46", | |||
| "css": "code", | |||
| "code": 61729, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "ab95e1351ebaec5850101097cbf7097f", | |||
| "css": "quote-left", | |||
| "code": 61709, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "bc71f4c6e53394d5ba46b063040014f1", | |||
| "css": "cw", | |||
| "code": 59395, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "f9c3205df26e7778abac86183aefdc99", | |||
| "css": "ccw", | |||
| "code": 59396, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "f6766a8b042c2453a4e153af03294383", | |||
| "css": "list-numbered", | |||
| "code": 61643, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "a2a74f5e7b7d9ba054897d8c795a326a", | |||
| "css": "list-bullet", | |||
| "code": 61642, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "02cca871bb69da75e8ee286b7055832c", | |||
| "css": "bold", | |||
| "code": 59398, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "a8cb1c217f02b073db3670c061cc54d2", | |||
| "css": "italic", | |||
| "code": 59399, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "861ab06e455e2de3232ebef67d60d708", | |||
| "css": "minus", | |||
| "code": 59393, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "0c708edd8fae2376b3370aa56d40cf9e", | |||
| "css": "header", | |||
| "code": 61916, | |||
| "src": "fontawesome" | |||
| } | |||
| ] | |||
| } | |||
| @ -0,0 +1,85 @@ | |||
| /* | |||
| Animation example, for spinners | |||
| */ | |||
| .animate-spin { | |||
| -moz-animation: spin 2s infinite linear; | |||
| -o-animation: spin 2s infinite linear; | |||
| -webkit-animation: spin 2s infinite linear; | |||
| animation: spin 2s infinite linear; | |||
| display: inline-block; | |||
| } | |||
| @-moz-keyframes spin { | |||
| 0% { | |||
| -moz-transform: rotate(0deg); | |||
| -o-transform: rotate(0deg); | |||
| -webkit-transform: rotate(0deg); | |||
| transform: rotate(0deg); | |||
| } | |||
| 100% { | |||
| -moz-transform: rotate(359deg); | |||
| -o-transform: rotate(359deg); | |||
| -webkit-transform: rotate(359deg); | |||
| transform: rotate(359deg); | |||
| } | |||
| } | |||
| @-webkit-keyframes spin { | |||
| 0% { | |||
| -moz-transform: rotate(0deg); | |||
| -o-transform: rotate(0deg); | |||
| -webkit-transform: rotate(0deg); | |||
| transform: rotate(0deg); | |||
| } | |||
| 100% { | |||
| -moz-transform: rotate(359deg); | |||
| -o-transform: rotate(359deg); | |||
| -webkit-transform: rotate(359deg); | |||
| transform: rotate(359deg); | |||
| } | |||
| } | |||
| @-o-keyframes spin { | |||
| 0% { | |||
| -moz-transform: rotate(0deg); | |||
| -o-transform: rotate(0deg); | |||
| -webkit-transform: rotate(0deg); | |||
| transform: rotate(0deg); | |||
| } | |||
| 100% { | |||
| -moz-transform: rotate(359deg); | |||
| -o-transform: rotate(359deg); | |||
| -webkit-transform: rotate(359deg); | |||
| transform: rotate(359deg); | |||
| } | |||
| } | |||
| @-ms-keyframes spin { | |||
| 0% { | |||
| -moz-transform: rotate(0deg); | |||
| -o-transform: rotate(0deg); | |||
| -webkit-transform: rotate(0deg); | |||
| transform: rotate(0deg); | |||
| } | |||
| 100% { | |||
| -moz-transform: rotate(359deg); | |||
| -o-transform: rotate(359deg); | |||
| -webkit-transform: rotate(359deg); | |||
| transform: rotate(359deg); | |||
| } | |||
| } | |||
| @keyframes spin { | |||
| 0% { | |||
| -moz-transform: rotate(0deg); | |||
| -o-transform: rotate(0deg); | |||
| -webkit-transform: rotate(0deg); | |||
| transform: rotate(0deg); | |||
| } | |||
| 100% { | |||
| -moz-transform: rotate(359deg); | |||
| -o-transform: rotate(359deg); | |||
| -webkit-transform: rotate(359deg); | |||
| transform: rotate(359deg); | |||
| } | |||
| } | |||
| @ -0,0 +1,13 @@ | |||
| .icon-picture:before { content: '\e800'; } /* '' */ | |||
| .icon-minus:before { content: '\e801'; } /* '' */ | |||
| .icon-link:before { content: '\e802'; } /* '' */ | |||
| .icon-cw:before { content: '\e803'; } /* '' */ | |||
| .icon-ccw:before { content: '\e804'; } /* '' */ | |||
| .icon-bold:before { content: '\e806'; } /* '' */ | |||
| .icon-italic:before { content: '\e807'; } /* '' */ | |||
| .icon-list-bullet:before { content: '\f0ca'; } /* '' */ | |||
| .icon-list-numbered:before { content: '\f0cb'; } /* '' */ | |||
| .icon-quote-left:before { content: '\f10d'; } /* '' */ | |||
| .icon-code:before { content: '\f121'; } /* '' */ | |||
| .icon-header:before { content: '\f1dc'; } /* '' */ | |||
| @ -0,0 +1,13 @@ | |||
| .icon-picture { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-link { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-cw { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-ccw { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-bold { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-italic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-list-bullet { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-list-numbered { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-quote-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-header { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| @ -0,0 +1,24 @@ | |||
| [class^="icon-"], [class*=" icon-"] { | |||
| font-family: 'fontello'; | |||
| font-style: normal; | |||
| font-weight: normal; | |||
| /* fix buttons height */ | |||
| line-height: 1em; | |||
| /* you can be more comfortable with increased icons size */ | |||
| /* font-size: 120%; */ | |||
| } | |||
| .icon-picture { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-link { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-cw { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-ccw { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-bold { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-italic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-list-bullet { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-list-numbered { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-quote-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-header { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| @ -0,0 +1,69 @@ | |||
| @font-face { | |||
| font-family: 'fontello'; | |||
| src: url('../font/fontello.eot?81231758'); | |||
| src: url('../font/fontello.eot?81231758#iefix') format('embedded-opentype'), | |||
| url('../font/fontello.woff2?81231758') format('woff2'), | |||
| url('../font/fontello.woff?81231758') format('woff'), | |||
| url('../font/fontello.ttf?81231758') format('truetype'), | |||
| url('../font/fontello.svg?81231758#fontello') format('svg'); | |||
| font-weight: normal; | |||
| font-style: normal; | |||
| } | |||
| /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ | |||
| /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ | |||
| /* | |||
| @media screen and (-webkit-min-device-pixel-ratio:0) { | |||
| @font-face { | |||
| font-family: 'fontello'; | |||
| src: url('../font/fontello.svg?81231758#fontello') format('svg'); | |||
| } | |||
| } | |||
| */ | |||
| [class^="icon-"]:before, [class*=" icon-"]:before { | |||
| font-family: "fontello"; | |||
| font-style: normal; | |||
| font-weight: normal; | |||
| speak: none; | |||
| display: inline-block; | |||
| text-decoration: inherit; | |||
| width: 1em; | |||
| margin-right: .2em; | |||
| text-align: center; | |||
| /* opacity: .8; */ | |||
| /* For safety - reset parent styles, that can break glyph codes*/ | |||
| font-variant: normal; | |||
| text-transform: none; | |||
| /* fix buttons height, for twitter bootstrap */ | |||
| line-height: 1em; | |||
| /* Animation center compensation - margins should be symmetric */ | |||
| /* remove if not needed */ | |||
| margin-left: .2em; | |||
| /* you can be more comfortable with increased icons size */ | |||
| /* font-size: 120%; */ | |||
| /* Font smoothing. That was taken from TWBS */ | |||
| -webkit-font-smoothing: antialiased; | |||
| -moz-osx-font-smoothing: grayscale; | |||
| /* Uncomment for 3D effect */ | |||
| /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ | |||
| } | |||
| .icon-picture:before { content: '\e800'; } /* '' */ | |||
| .icon-minus:before { content: '\e801'; } /* '' */ | |||
| .icon-link:before { content: '\e802'; } /* '' */ | |||
| .icon-cw:before { content: '\e803'; } /* '' */ | |||
| .icon-ccw:before { content: '\e804'; } /* '' */ | |||
| .icon-bold:before { content: '\e806'; } /* '' */ | |||
| .icon-italic:before { content: '\e807'; } /* '' */ | |||
| .icon-list-bullet:before { content: '\f0ca'; } /* '' */ | |||
| .icon-list-numbered:before { content: '\f0cb'; } /* '' */ | |||
| .icon-quote-left:before { content: '\f10d'; } /* '' */ | |||
| .icon-code:before { content: '\f121'; } /* '' */ | |||
| .icon-header:before { content: '\f1dc'; } /* '' */ | |||
| @ -0,0 +1,324 @@ | |||
| <!DOCTYPE html> | |||
| <html> | |||
| <head><!--[if lt IE 9]><script language="javascript" type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> | |||
| <meta charset="UTF-8"><style>/* | |||
| * Bootstrap v2.2.1 | |||
| * | |||
| * Copyright 2012 Twitter, Inc | |||
| * Licensed under the Apache License v2.0 | |||
| * http://www.apache.org/licenses/LICENSE-2.0 | |||
| * | |||
| * Designed and built with all the love in the world @twitter by @mdo and @fat. | |||
| */ | |||
| .clearfix { | |||
| *zoom: 1; | |||
| } | |||
| .clearfix:before, | |||
| .clearfix:after { | |||
| display: table; | |||
| content: ""; | |||
| line-height: 0; | |||
| } | |||
| .clearfix:after { | |||
| clear: both; | |||
| } | |||
| html { | |||
| font-size: 100%; | |||
| -webkit-text-size-adjust: 100%; | |||
| -ms-text-size-adjust: 100%; | |||
| } | |||
| a:focus { | |||
| outline: thin dotted #333; | |||
| outline: 5px auto -webkit-focus-ring-color; | |||
| outline-offset: -2px; | |||
| } | |||
| a:hover, | |||
| a:active { | |||
| outline: 0; | |||
| } | |||
| button, | |||
| input, | |||
| select, | |||
| textarea { | |||
| margin: 0; | |||
| font-size: 100%; | |||
| vertical-align: middle; | |||
| } | |||
| button, | |||
| input { | |||
| *overflow: visible; | |||
| line-height: normal; | |||
| } | |||
| button::-moz-focus-inner, | |||
| input::-moz-focus-inner { | |||
| padding: 0; | |||
| border: 0; | |||
| } | |||
| body { | |||
| margin: 0; | |||
| font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |||
| font-size: 14px; | |||
| line-height: 20px; | |||
| color: #333; | |||
| background-color: #fff; | |||
| } | |||
| a { | |||
| color: #08c; | |||
| text-decoration: none; | |||
| } | |||
| a:hover { | |||
| color: #005580; | |||
| text-decoration: underline; | |||
| } | |||
| .row { | |||
| margin-left: -20px; | |||
| *zoom: 1; | |||
| } | |||
| .row:before, | |||
| .row:after { | |||
| display: table; | |||
| content: ""; | |||
| line-height: 0; | |||
| } | |||
| .row:after { | |||
| clear: both; | |||
| } | |||
| [class*="span"] { | |||
| float: left; | |||
| min-height: 1px; | |||
| margin-left: 20px; | |||
| } | |||
| .container, | |||
| .navbar-static-top .container, | |||
| .navbar-fixed-top .container, | |||
| .navbar-fixed-bottom .container { | |||
| width: 940px; | |||
| } | |||
| .span12 { | |||
| width: 940px; | |||
| } | |||
| .span11 { | |||
| width: 860px; | |||
| } | |||
| .span10 { | |||
| width: 780px; | |||
| } | |||
| .span9 { | |||
| width: 700px; | |||
| } | |||
| .span8 { | |||
| width: 620px; | |||
| } | |||
| .span7 { | |||
| width: 540px; | |||
| } | |||
| .span6 { | |||
| width: 460px; | |||
| } | |||
| .span5 { | |||
| width: 380px; | |||
| } | |||
| .span4 { | |||
| width: 300px; | |||
| } | |||
| .span3 { | |||
| width: 220px; | |||
| } | |||
| .span2 { | |||
| width: 140px; | |||
| } | |||
| .span1 { | |||
| width: 60px; | |||
| } | |||
| [class*="span"].pull-right, | |||
| .row-fluid [class*="span"].pull-right { | |||
| float: right; | |||
| } | |||
| .container { | |||
| margin-right: auto; | |||
| margin-left: auto; | |||
| *zoom: 1; | |||
| } | |||
| .container:before, | |||
| .container:after { | |||
| display: table; | |||
| content: ""; | |||
| line-height: 0; | |||
| } | |||
| .container:after { | |||
| clear: both; | |||
| } | |||
| p { | |||
| margin: 0 0 10px; | |||
| } | |||
| .lead { | |||
| margin-bottom: 20px; | |||
| font-size: 21px; | |||
| font-weight: 200; | |||
| line-height: 30px; | |||
| } | |||
| small { | |||
| font-size: 85%; | |||
| } | |||
| h1 { | |||
| margin: 10px 0; | |||
| font-family: inherit; | |||
| font-weight: bold; | |||
| line-height: 20px; | |||
| color: inherit; | |||
| text-rendering: optimizelegibility; | |||
| } | |||
| h1 small { | |||
| font-weight: normal; | |||
| line-height: 1; | |||
| color: #999; | |||
| } | |||
| h1 { | |||
| line-height: 40px; | |||
| } | |||
| h1 { | |||
| font-size: 38.5px; | |||
| } | |||
| h1 small { | |||
| font-size: 24.5px; | |||
| } | |||
| body { | |||
| margin-top: 90px; | |||
| } | |||
| .header { | |||
| position: fixed; | |||
| top: 0; | |||
| left: 50%; | |||
| margin-left: -480px; | |||
| background-color: #fff; | |||
| border-bottom: 1px solid #ddd; | |||
| padding-top: 10px; | |||
| z-index: 10; | |||
| } | |||
| .footer { | |||
| color: #ddd; | |||
| font-size: 12px; | |||
| text-align: center; | |||
| margin-top: 20px; | |||
| } | |||
| .footer a { | |||
| color: #ccc; | |||
| text-decoration: underline; | |||
| } | |||
| .the-icons { | |||
| font-size: 14px; | |||
| line-height: 24px; | |||
| } | |||
| .switch { | |||
| position: absolute; | |||
| right: 0; | |||
| bottom: 10px; | |||
| color: #666; | |||
| } | |||
| .switch input { | |||
| margin-right: 0.3em; | |||
| } | |||
| .codesOn .i-name { | |||
| display: none; | |||
| } | |||
| .codesOn .i-code { | |||
| display: inline; | |||
| } | |||
| .i-code { | |||
| display: none; | |||
| } | |||
| @font-face { | |||
| font-family: 'fontello'; | |||
| src: url('./font/fontello.eot?33744593'); | |||
| src: url('./font/fontello.eot?33744593#iefix') format('embedded-opentype'), | |||
| url('./font/fontello.woff?33744593') format('woff'), | |||
| url('./font/fontello.ttf?33744593') format('truetype'), | |||
| url('./font/fontello.svg?33744593#fontello') format('svg'); | |||
| font-weight: normal; | |||
| font-style: normal; | |||
| } | |||
| .demo-icon | |||
| { | |||
| font-family: "fontello"; | |||
| font-style: normal; | |||
| font-weight: normal; | |||
| speak: none; | |||
| display: inline-block; | |||
| text-decoration: inherit; | |||
| width: 1em; | |||
| margin-right: .2em; | |||
| text-align: center; | |||
| /* opacity: .8; */ | |||
| /* For safety - reset parent styles, that can break glyph codes*/ | |||
| font-variant: normal; | |||
| text-transform: none; | |||
| /* fix buttons height, for twitter bootstrap */ | |||
| line-height: 1em; | |||
| /* Animation center compensation - margins should be symmetric */ | |||
| /* remove if not needed */ | |||
| margin-left: .2em; | |||
| /* You can be more comfortable with increased icons size */ | |||
| /* font-size: 120%; */ | |||
| /* Font smoothing. That was taken from TWBS */ | |||
| -webkit-font-smoothing: antialiased; | |||
| -moz-osx-font-smoothing: grayscale; | |||
| /* Uncomment for 3D effect */ | |||
| /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ | |||
| } | |||
| </style> | |||
| <link rel="stylesheet" href="css/animation.css"><!--[if IE 7]><link rel="stylesheet" href="css/fontello-ie7.css"><![endif]--> | |||
| <script> | |||
| function toggleCodes(on) { | |||
| var obj = document.getElementById('icons'); | |||
| if (on) { | |||
| obj.className += ' codesOn'; | |||
| } else { | |||
| obj.className = obj.className.replace(' codesOn', ''); | |||
| } | |||
| } | |||
| </script> | |||
| </head> | |||
| <body> | |||
| <div class="container header"> | |||
| <h1> | |||
| fontello | |||
| <small>font demo</small> | |||
| </h1> | |||
| <label class="switch"> | |||
| <input type="checkbox" onclick="toggleCodes(this.checked)">show codes | |||
| </label> | |||
| </div> | |||
| <div id="icons" class="container"> | |||
| <div class="row"> | |||
| <div title="Code: 0xe800" class="the-icons span3"><i class="demo-icon icon-picture"></i> <span class="i-name">icon-picture</span><span class="i-code">0xe800</span></div> | |||
| <div title="Code: 0xe801" class="the-icons span3"><i class="demo-icon icon-minus"></i> <span class="i-name">icon-minus</span><span class="i-code">0xe801</span></div> | |||
| <div title="Code: 0xe802" class="the-icons span3"><i class="demo-icon icon-link"></i> <span class="i-name">icon-link</span><span class="i-code">0xe802</span></div> | |||
| <div title="Code: 0xe803" class="the-icons span3"><i class="demo-icon icon-cw"></i> <span class="i-name">icon-cw</span><span class="i-code">0xe803</span></div> | |||
| </div> | |||
| <div class="row"> | |||
| <div title="Code: 0xe804" class="the-icons span3"><i class="demo-icon icon-ccw"></i> <span class="i-name">icon-ccw</span><span class="i-code">0xe804</span></div> | |||
| <div title="Code: 0xe806" class="the-icons span3"><i class="demo-icon icon-bold"></i> <span class="i-name">icon-bold</span><span class="i-code">0xe806</span></div> | |||
| <div title="Code: 0xe807" class="the-icons span3"><i class="demo-icon icon-italic"></i> <span class="i-name">icon-italic</span><span class="i-code">0xe807</span></div> | |||
| <div title="Code: 0xf0ca" class="the-icons span3"><i class="demo-icon icon-list-bullet"></i> <span class="i-name">icon-list-bullet</span><span class="i-code">0xf0ca</span></div> | |||
| </div> | |||
| <div class="row"> | |||
| <div title="Code: 0xf0cb" class="the-icons span3"><i class="demo-icon icon-list-numbered"></i> <span class="i-name">icon-list-numbered</span><span class="i-code">0xf0cb</span></div> | |||
| <div title="Code: 0xf10d" class="the-icons span3"><i class="demo-icon icon-quote-left"></i> <span class="i-name">icon-quote-left</span><span class="i-code">0xf10d</span></div> | |||
| <div title="Code: 0xf121" class="the-icons span3"><i class="demo-icon icon-code"></i> <span class="i-name">icon-code</span><span class="i-code">0xf121</span></div> | |||
| <div title="Code: 0xf1dc" class="the-icons span3"><i class="demo-icon icon-header"></i> <span class="i-name">icon-header</span><span class="i-code">0xf1dc</span></div> | |||
| </div> | |||
| </div> | |||
| <div class="container footer">Generated by <a href="http://fontello.com">fontello.com</a></div> | |||
| </body> | |||
| </html> | |||
| @ -0,0 +1,34 @@ | |||
| <?xml version="1.0" standalone="no"?> | |||
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |||
| <svg xmlns="http://www.w3.org/2000/svg"> | |||
| <metadata>Copyright (C) 2017 by original authors @ fontello.com</metadata> | |||
| <defs> | |||
| <font id="fontello" horiz-adv-x="1000" > | |||
| <font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" /> | |||
| <missing-glyph horiz-adv-x="1000" /> | |||
| <glyph glyph-name="picture" unicode="" d="M357 529q0-45-31-76t-76-32-76 32-31 76 31 76 76 31 76-31 31-76z m572-215v-250h-786v107l178 179 90-89 285 285z m53 393h-893q-7 0-12-5t-6-13v-678q0-7 6-13t12-5h893q7 0 13 5t5 13v678q0 8-5 13t-13 5z m89-18v-678q0-37-26-63t-63-27h-893q-36 0-63 27t-26 63v678q0 37 26 63t63 27h893q37 0 63-27t26-63z" horiz-adv-x="1071.4" /> | |||
| <glyph glyph-name="minus" unicode="" d="M786 439v-107q0-22-16-38t-38-15h-678q-23 0-38 15t-16 38v107q0 23 16 38t38 16h678q23 0 38-16t16-38z" horiz-adv-x="785.7" /> | |||
| <glyph glyph-name="link" unicode="" d="M813 171q0 23-16 38l-116 116q-16 16-38 16-24 0-40-18 1-1 10-10t12-12 9-11 7-14 2-15q0-23-16-38t-38-16q-8 0-15 2t-14 7-11 9-12 12-10 10q-19-17-19-40 0-23 16-38l115-116q15-15 38-15 22 0 38 15l82 81q16 16 16 37z m-393 394q0 22-15 38l-115 115q-16 16-38 16-22 0-38-15l-82-82q-16-15-16-37 0-22 16-38l116-116q15-15 38-15 23 0 40 17-2 2-11 11t-12 12-8 10-7 14-2 16q0 22 15 38t38 15q9 0 16-2t14-7 11-8 12-12 10-11q18 17 18 41z m500-394q0-66-48-113l-82-81q-46-47-113-47-68 0-114 48l-115 115q-46 47-46 114 0 68 49 116l-49 49q-48-49-116-49-67 0-114 47l-116 116q-47 47-47 114t47 113l82 82q47 46 114 46 67 0 114-47l115-116q46-46 46-113 0-69-49-117l49-49q48 49 116 49 67 0 114-47l116-116q47-47 47-114z" horiz-adv-x="928.6" /> | |||
| <glyph glyph-name="cw" unicode="" d="M857 707v-250q0-14-10-25t-26-11h-250q-23 0-32 23-10 22 7 38l77 77q-82 77-194 77-58 0-111-23t-91-61-61-91-23-111 23-111 61-91 91-61 111-23q66 0 125 29t100 82q4 6 13 7 8 0 14-5l76-77q5-4 6-11t-5-13q-60-74-147-114t-182-41q-87 0-167 34t-136 92-92 137-34 166 34 166 92 137 136 92 167 34q82 0 158-31t137-88l72 72q17 18 39 8 22-9 22-33z" horiz-adv-x="857.1" /> | |||
| <glyph glyph-name="ccw" unicode="" d="M857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z" horiz-adv-x="857.1" /> | |||
| <glyph glyph-name="bold" unicode="" d="M310 1q41-18 78-18 210 0 210 187 0 64-23 101-15 24-34 41t-38 26-45 14-47 6-53 1q-40 0-56-6 0-29 0-88t-1-88q0-5 0-38t0-54 2-47 7-37z m-8 417q23-4 61-4 46 0 80 7t61 25 42 50 14 79q0 39-16 68t-45 46-60 24-69 8q-28 0-73-7 0-28 3-84t2-85q0-15 0-45t-1-44q0-26 1-38z m-302-497l1 53q9 2 48 9t59 15q4 7 7 15t4 19 4 18 1 21 0 19v36q0 548-12 572-2 5-12 8t-25 6-28 4-27 3-17 2l-2 46q55 1 190 6t208 6q13 0 38-1t38 0q39 0 76-7t72-24 60-39 41-59 16-76q0-29-9-54t-22-40-36-32-41-25-47-22q86-20 144-75t57-138q0-56-20-101t-52-72-77-48-91-27-98-8q-25 0-74 2t-74 1q-59 0-171-6t-129-7z" horiz-adv-x="785.7" /> | |||
| <glyph glyph-name="italic" unicode="" d="M0-78l10 48q12 4 34 9t40 11 33 13q16 19 23 56 1 4 35 162t63 303 29 165v14q-13 8-30 11t-39 4-32 3l10 58q19-1 67-4t84-4 67-1q27 0 55 1t68 4 54 4q-2-22-10-50-17-6-57-16t-60-19q-5-10-8-23t-5-23-4-25-4-24q-15-82-49-234t-43-198q-1-5-7-32t-11-51-9-46-4-32l1-10q9-3 103-18-2-24-9-55-6 0-18-1t-18-1q-16 0-49 6t-48 6q-77 1-115 1-28 0-79-5t-68-7z" horiz-adv-x="571.4" /> | |||
| <glyph glyph-name="list-bullet" unicode="" d="M214 64q0-44-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m0 286q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232v-107q0-7-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 7 5 12t13 6h678q7 0 13-6t5-12z m-786 518q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" /> | |||
| <glyph glyph-name="list-numbered" unicode="" d="M213-54q0-45-31-70t-75-26q-60 0-96 37l31 49q28-25 60-25 16 0 28 8t12 24q0 35-59 31l-14 31q4 6 18 24t24 31 20 21v1q-9 0-27-1t-27 0v-30h-59v85h186v-49l-53-65q28-6 45-27t17-49z m1 350v-89h-202q-4 20-4 30 0 29 14 52t31 38 37 27 31 24 14 25q0 14-9 22t-22 7q-25 0-45-32l-47 33q13 28 40 44t59 16q40 0 68-23t28-63q0-28-19-51t-42-36-42-28-20-30h71v34h59z m786-178v-107q0-7-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 8 5 13t13 5h678q7 0 13-6t5-12z m-786 502v-56h-187v56h60q0 22 0 67t1 68v7h-1q-5-10-28-30l-40 42 76 71h59v-225h60z m786-216v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" /> | |||
| <glyph glyph-name="quote-left" unicode="" d="M429 314v-214q0-45-32-76t-76-31h-214q-44 0-76 31t-31 76v393q0 58 23 111t61 91 91 61 111 23h35q15 0 26-11t10-25v-72q0-14-10-25t-26-10h-35q-59 0-101-42t-42-101v-18q0-22 16-38t37-16h125q45 0 76-31t32-76z m500 0v-214q0-45-32-76t-76-31h-214q-44 0-76 31t-31 76v393q0 58 23 111t61 91 91 61 111 23h35q15 0 26-11t10-25v-72q0-14-10-25t-26-10h-35q-59 0-101-42t-42-101v-18q0-22 16-38t37-16h125q45 0 76-31t32-76z" horiz-adv-x="928.6" /> | |||
| <glyph glyph-name="code" unicode="" d="M344 69l-28-28q-5-5-12-5t-13 5l-260 261q-6 5-6 12t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13t-6-12l-219-220 219-219q6-6 6-13t-6-13z m330 596l-208-721q-2-7-9-11t-13-1l-34 9q-8 3-11 9t-2 14l209 720q2 8 8 11t13 2l35-10q7-2 11-9t1-13z m367-363l-260-261q-6-5-13-5t-13 5l-28 28q-5 6-5 13t5 13l219 219-219 220q-5 5-5 12t5 13l28 28q6 6 13 6t13-6l260-260q5-5 5-13t-5-12z" horiz-adv-x="1071.4" /> | |||
| <glyph glyph-name="header" unicode="" d="M939-79q-25 0-74 2t-75 2q-24 0-73-2t-74-2q-13 0-21 12t-7 25q0 18 9 26t22 9 29 4 25 9q18 11 18 78l0 218q0 12-1 17-7 3-28 3h-376q-22 0-29-3 0-5 0-17l-1-207q0-79 21-91 9-6 26-8t32-2 25-8 11-26q0-14-6-26t-21-13q-26 0-78 2t-77 2q-24 0-71-2t-71-2q-13 0-20 12t-7 25q0 17 9 25t20 10 26 4 24 9q18 13 18 80l-1 31v454q0 2 1 15t0 20-1 21-2 24-4 20-6 18-9 10q-8 5-25 7t-29 1-23 7-10 26q0 14 6 26t20 13q26 0 78-2t77-2q23 0 71 2t70 2q14 0 21-13t7-26q0-17-9-25t-22-8-27-2-24-7q-20-12-20-90l1-178q0-12 0-18 7-2 22-2h390q14 0 21 2 1 6 1 18l0 178q0 78-19 90-10 6-33 7t-37 7-14 28q0 14 7 26t21 13q24 0 74-2t73-2q24 0 72 2t72 2q14 0 21-13t7-26q0-17-10-25t-22-8-29-2-24-7q-20-13-20-90l1-526q0-66 19-78 9-6 25-8t30-2 23-9 10-25q0-14-6-26t-20-13z" horiz-adv-x="1000" /> | |||
| </font> | |||
| </defs> | |||
| </svg> | |||
| @ -1,67 +1,122 @@ | |||
| (function () { | |||
| var converter = new Markdown.Converter(); | |||
| Markdown.Extra.init(converter); | |||
| var editor = new Markdown.Editor(converter); | |||
| imageEditor = document.getElementById("wmd-input-image"); | |||
| linkEditor = document.getElementById("wmd-input-link"); | |||
| quoteEditor = document.getElementById("quoteEditor"); | |||
| videoEditor = document.getElementById("videoEditor"); | |||
| audioEditor = document.getElementById("audioEditor"); | |||
| if(imageEditor) | |||
| { | |||
| var converterImage = new Markdown.Converter(); | |||
| Markdown.Extra.init(converterImage); | |||
| var options = { strings: { "toolbar": ["image", "undo", "redo"] } }; | |||
| var editorImage = new Markdown.Editor(converterImage, "-image", options); | |||
| var converter = new Markdown.Converter(); | |||
| Markdown.Extra.init(converter); | |||
| var options = { strings: { "toolbar": ["bold", "italic", "link", "undo", "redo", "olist", "ulist"] } }; | |||
| var editor = new Markdown.Editor(converter, false, options); | |||
| addImageDialog(editorImage); | |||
| } | |||
| else if(linkEditor) | |||
| { | |||
| var converterLink = new Markdown.Converter(); | |||
| Markdown.Extra.init(converterLink); | |||
| var options = { strings: { "toolbar": ["link"] } }; | |||
| var editorLink = new Markdown.Editor(converterLink, "-link", options); | |||
| var $dialog = $('#insertImageDialog').dialog({ | |||
| autoOpen: false, | |||
| closeOnEscape: false, | |||
| open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); } | |||
| }); | |||
| var converter = new Markdown.Converter(); | |||
| Markdown.Extra.init(converter); | |||
| var options = { strings: { "toolbar": ["bold", "italic", "undo", "redo", "olist", "ulist"] } }; | |||
| var editor = new Markdown.Editor(converter, false, options); | |||
| } | |||
| else if(quoteEditor || videoEditor || audioEditor) | |||
| { | |||
| var converterFeature = new Markdown.Converter(); | |||
| Markdown.Extra.init(converterFeature); | |||
| var options = { strings: { "toolbar": [] } }; | |||
| var editorFeature = new Markdown.Editor(converterFeature, "-feature",options); | |||
| var converter = new Markdown.Converter(); | |||
| Markdown.Extra.init(converter); | |||
| var options = { strings: { "toolbar": ["bold", "italic", "undo", "redo", "olist", "ulist", "link"] } }; | |||
| var editor = new Markdown.Editor(converter, false, options); | |||
| } | |||
| else | |||
| { | |||
| var converter = new Markdown.Converter(); | |||
| Markdown.Extra.init(converter); | |||
| var editor = new Markdown.Editor(converter); | |||
| addImageDialog(editor); | |||
| } | |||
| function addImageDialog(editor) | |||
| { | |||
| var $dialog = $('#insertImageDialog').dialog({ | |||
| autoOpen: false, | |||
| closeOnEscape: false, | |||
| open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); } | |||
| }); | |||
| var $url = $('input[type=text]', $dialog); | |||
| var $file = $('input[type=file]', $dialog); | |||
| var $url = $('input[type=text]', $dialog); | |||
| var $file = $('input[type=file]', $dialog); | |||
| editor.hooks.set('insertImageDialog', function(callback) { | |||
| editor.hooks.set('insertImageDialog', function(callback) { | |||
| var dialogClose = function() { | |||
| $url.val(''); | |||
| $file.val(''); | |||
| $dialog.dialog('close'); | |||
| }; | |||
| var dialogClose = function() { | |||
| $url.val(''); | |||
| $file.val(''); | |||
| $dialog.dialog('close'); | |||
| }; | |||
| $dialog.dialog({ | |||
| buttons : { | |||
| "Insert" : { | |||
| text: "Insert", | |||
| id: "insert", | |||
| click: function(){ | |||
| callback($url.val().length > 0 ? $url.val(): null); | |||
| dialogClose(); | |||
| } | |||
| }, | |||
| "Cancel" : { | |||
| text: "Cancel", | |||
| id: "cancel", | |||
| click: function(){ | |||
| dialogClose(); | |||
| callback(null); | |||
| } | |||
| } | |||
| } | |||
| }); | |||
| $dialog.dialog({ | |||
| buttons : { | |||
| "Insert" : { | |||
| text: "Insert", | |||
| id: "insert", | |||
| click: function(){ | |||
| callback($url.val().length > 0 ? $url.val(): null); | |||
| dialogClose(); | |||
| } | |||
| }, | |||
| "Cancel" : { | |||
| text: "Cancel", | |||
| id: "cancel", | |||
| click: function(){ | |||
| dialogClose(); | |||
| callback(null); | |||
| } | |||
| } | |||
| } | |||
| }); | |||
| var uploadComplete = function(response) { | |||
| if (response.error == '0') { | |||
| $url.val(base_path + response.path); | |||
| $("#insert").trigger('click'); | |||
| } else { | |||
| alert(response.error); | |||
| $file.val(''); | |||
| } | |||
| }; | |||
| var uploadComplete = function(response) { | |||
| if (response.error == '0') { | |||
| $url.val(base_path + response.path); | |||
| $("#insert").trigger('click'); | |||
| } else { | |||
| alert(response.error); | |||
| $file.val(''); | |||
| } | |||
| }; | |||
| $file.ajaxfileupload({ | |||
| 'action': base_path + 'upload.php', | |||
| 'onComplete': uploadComplete, | |||
| }); | |||
| $file.ajaxfileupload({ | |||
| 'action': base_path + 'upload.php', | |||
| 'onComplete': uploadComplete, | |||
| }); | |||
| $dialog.dialog('open'); | |||
| $dialog.dialog('open'); | |||
| return true; // tell the editor that we'll take care of getting the image url | |||
| }); | |||
| return true; // tell the editor that we'll take care of getting the image url | |||
| }); | |||
| } | |||
| if(imageEditor){ editorImage.run(); } | |||
| if(linkEditor){ editorLink.run(); } | |||
| if(quoteEditor || videoEditor || audioEditor){ editorFeature.run() ;} | |||
| editor.run(); | |||
| })(); | |||
| @ -1,58 +1,12 @@ | |||
| <link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/admin/editor/css/editor.css"/> | |||
| <script src="<?php echo site_url() ?>system/resources/js/jquery.min.js"></script> | |||
| <script src="<?php echo site_url() ?>system/resources/js/jquery-ui.min.js"></script> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/Markdown.Converter.js"></script> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/Markdown.Sanitizer.js"></script> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/Markdown.Editor.js"></script> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/Markdown.Extra.js"></script> | |||
| <link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/jquery-ui.css"> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/jquery.ajaxfileupload.js"></script> | |||
| <?php if (isset($error)) { ?> | |||
| <div class="error-message"><?php echo $error ?></div> | |||
| <?php } ?> | |||
| <div class="wmd-panel"> | |||
| <form method="POST"> | |||
| Title <span class="required">*</span> | |||
| <br> | |||
| <input type="text" class="text <?php if (isset($postTitle)) {if (empty($postTitle)) {echo 'error';}} ?>" name="title" value="<?php if (isset($postTitle)) {echo $postTitle;} ?>"/> | |||
| <br><br> | |||
| Url (optional)<br><input type="text" class="text" name="url" value="<?php if (isset($postUrl)) {echo $postUrl;} ?>"/> | |||
| <br> | |||
| <span class="help">If the url leave empty we will use the page title.</span> | |||
| <br><br> | |||
| Meta Description (optional) | |||
| <br> | |||
| <textarea name="description" rows="3" cols="20"><?php if (isset($p->description)) {echo $p->description;} ?></textarea> | |||
| <br><br> | |||
| <div id="wmd-button-bar" class="wmd-button-bar"></div> | |||
| <textarea id="wmd-input" class="wmd-input <?php if (isset($postContent)) {if (empty($postContent)) {echo 'error';}} ?>" name="content" cols="20" rows="10"><?php if (isset($postContent)) {echo $postContent;} ?></textarea> | |||
| <br/> | |||
| <input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>"> | |||
| <?php if ($type == 'is_page') :?> | |||
| <input type="submit" name="submit" class="submit" value="Publish"/> | |||
| <?php endif;?> | |||
| <?php if ($type == 'is_category') :?> | |||
| <input type="submit" name="submit" class="submit" value="Add category"/> | |||
| <?php endif;?> | |||
| </form> | |||
| </div> | |||
| <style> | |||
| #insertImageDialog { display:none; padding: 10px; font-size:12px;} | |||
| .wmd-prompt-background {z-index:10!important;} | |||
| </style> | |||
| <div id="insertImageDialog" title="Insert Image"> | |||
| <h4>URL</h4> | |||
| <input type="text" placeholder="Enter image URL" /> | |||
| <h4>Upload</h4> | |||
| <form method="post" action="" enctype="multipart/form-data"> | |||
| <input type="file" name="file" id="file" /> | |||
| </form> | |||
| <div class="creatorMenu"> | |||
| <?php if($type == 'is_category') : ?> | |||
| <h2>Add category</h2> | |||
| <a href="<?php echo site_url();?>admin/categories">Back to category-list</a> | |||
| <?php else : ?> | |||
| <h2>Add page</h2> | |||
| <a href="<?php echo site_url();?>admin/content">Back to page-list</a> | |||
| <?php endif; ?> | |||
| </div> | |||
| <div id="wmd-preview" class="wmd-panel wmd-preview"></div> | |||
| <!-- Declare the base path. Important --> | |||
| <script type="text/javascript">var base_path = '<?php echo site_url() ?>';</script> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/editor.js"></script> | |||
| <?php include('partials/input-fields.html.php'); ?> | |||
| @ -1,25 +1,32 @@ | |||
| <?php $desc = get_category_info(null); ?> | |||
| <a href="<?php echo site_url();?>add/category">Add category</a> | |||
| <table class="category-list"> | |||
| <tr class="head"> | |||
| <th>Name</th> | |||
| <th>Description</th> | |||
| <th>Contents</th> | |||
| <th>Operations</th> | |||
| </tr> | |||
| <tr> | |||
| <td><a href="<?php echo site_url();?>category/uncategorized" target="_blank">Uncategorized</a></td> | |||
| <td><p>Topics that don't need a category, or don't fit into any other existing category.</p></td> | |||
| <td><?php $total = get_draftcount('uncategorized') + get_categorycount('uncategorized'); echo $total?></td> | |||
| <td></td> | |||
| </tr> | |||
| <?php foreach ($desc as $d):?> | |||
| <tr> | |||
| <td><a href="<?php echo $d->url;?>" target="_blank"><?php echo $d->title;?></a></td> | |||
| <td><?php echo $d->body;?></td> | |||
| <td><?php $total = get_draftcount($d->md) + get_categorycount($d->md); echo $total?></td> | |||
| <td><a href="<?php echo $d->url;?>/edit?destination=admin/categories">Edit</a> <?php if (get_categorycount($d->md) == 0 && get_draftcount($d->md) == 0 ){echo '<a href="' . $d->url . '/delete?destination=admin/categories">Delete</a>';}?></td> | |||
| </tr> | |||
| <?php endforeach;?> | |||
| </table> | |||
| <div class="creatorMenu"> | |||
| <h2>Categories</h2> | |||
| <a href="<?php echo site_url();?>add/category">Add category</a> | |||
| </div> | |||
| <div class="content-list"> | |||
| <table class="category-list"> | |||
| <tr class="head"> | |||
| <th>Name</th> | |||
| <th>Description</th> | |||
| <th>Contents</th> | |||
| <th>Operations</th> | |||
| </tr> | |||
| <tr> | |||
| <td><a href="<?php echo site_url();?>category/uncategorized" target="_blank">Uncategorized</a></td> | |||
| <td><p>Topics that don't need a category, or don't fit into any other existing category.</p></td> | |||
| <td><?php $total = get_draftcount('uncategorized') + get_categorycount('uncategorized'); echo $total?></td> | |||
| <td></td> | |||
| </tr> | |||
| <?php foreach ($desc as $d):?> | |||
| <tr> | |||
| <td><a href="<?php echo $d->url;?>" target="_blank"><?php echo $d->title;?></a></td> | |||
| <td><?php echo $d->body;?></td> | |||
| <td><?php $total = get_draftcount($d->md) + get_categorycount($d->md); echo $total?></td> | |||
| <td><a href="<?php echo $d->url;?>/edit?destination=admin/categories">Edit</a> <?php if (get_categorycount($d->md) == 0 && get_draftcount($d->md) == 0 ){echo '<a href="' . $d->url . '/delete?destination=admin/categories">Delete</a>';}?></td> | |||
| </tr> | |||
| <?php endforeach;?> | |||
| </table> | |||
| </div> | |||
| @ -1,50 +1,53 @@ | |||
| <h2>Your Settings:</h2> | |||
| <p> | |||
| <u>hint:</u> Use <code>Ctrl</code>/<code>CMD⌘</code> + <code>F</code> to search for your config key or value. | |||
| </p> | |||
| <p> | |||
| <u>pro tips:</u> You can creating custom config key and print out your config key value anywhere in your template. | |||
| </p> | |||
| <pre><code><?php echo config('your.key'); ?></code></pre> | |||
| <hr style="margin:30px 0;border:1px solid #e3e3e3;"> | |||
| <form method="POST"> | |||
| <input type="hidden" name="csrf_token" value="<?php echo get_csrf(); ?>"> | |||
| <input type="submit"> | |||
| <table id="config"> | |||
| <tr> | |||
| <td><input type="text" name="newKey" placeholder="Your New Config Key"></td> | |||
| <td><input type="text" name="newValue" placeholder="Your New Value"></td> | |||
| </tr> | |||
| <?php | |||
| global $config_file; | |||
| $array = array( | |||
| "google.wmt" => "hallo", | |||
| ); | |||
| if (file_exists($config_file)) { | |||
| $array = parse_ini_file($config_file, true); | |||
| } | |||
| function valueMaker($value) | |||
| { | |||
| if (is_string($value)) | |||
| return htmlspecialchars($value); | |||
| <div class="creatorMenu"> | |||
| <h2>Your Settings:</h2> | |||
| <p> | |||
| <u>hint:</u> Use <code>Ctrl</code>/<code>CMD⌘</code> + <code>F</code> to search for your config key or value. | |||
| </p> | |||
| <p> | |||
| <u>pro tips:</u> You can creating custom config key and print out your config key value anywhere in your template. | |||
| </p> | |||
| <pre><code><?php echo config('your.key'); ?></code></pre> | |||
| </div> | |||
| <div class="content-list"> | |||
| <form method="POST"> | |||
| <input type="hidden" name="csrf_token" value="<?php echo get_csrf(); ?>"> | |||
| <input type="submit"> | |||
| <table id="config"> | |||
| <tr> | |||
| <td><input type="text" name="newKey" placeholder="Your New Config Key"></td> | |||
| <td><input type="text" name="newValue" placeholder="Your New Value"></td> | |||
| </tr> | |||
| <?php | |||
| global $config_file; | |||
| $array = array( | |||
| "google.wmt" => "hallo", | |||
| ); | |||
| if (file_exists($config_file)) { | |||
| $array = parse_ini_file($config_file, true); | |||
| } | |||
| function valueMaker($value) | |||
| { | |||
| if (is_string($value)) | |||
| return htmlspecialchars($value); | |||
| if ($value === true) | |||
| return "true"; | |||
| if ($value === false) | |||
| return "false"; | |||
| if ($value === true) | |||
| return "true"; | |||
| if ($value === false) | |||
| return "false"; | |||
| if ($value == false) | |||
| return "0"; | |||
| return (string)$value; | |||
| } | |||
| if ($value == false) | |||
| return "0"; | |||
| return (string)$value; | |||
| } | |||
| foreach ($array as $key => $value) { | |||
| echo '<tr>'; | |||
| echo '<td><label for="' . $key . '">' . $key . '</label></td>'; | |||
| echo '<td><input type="text" name="-config-' . $key . '" value="' . valueMaker($value) . '"></td>'; | |||
| echo '</tr>'; | |||
| } | |||
| ?> | |||
| </table> | |||
| <input type="submit"> | |||
| </form> | |||
| foreach ($array as $key => $value) { | |||
| echo '<tr>'; | |||
| echo '<td><label for="' . $key . '">' . $key . '</label></td>'; | |||
| echo '<td><input type="text" name="-config-' . $key . '" value="' . valueMaker($value) . '"></td>'; | |||
| echo '</tr>'; | |||
| } | |||
| ?> | |||
| </table> | |||
| <input type="submit"> | |||
| </form> | |||
| </div> | |||
| @ -1,9 +1,8 @@ | |||
| <h2>Add content</h2> | |||
| <div class="creatorMenu"> | |||
| <h2>Pages</h2> | |||
| <a href="<?php echo site_url();?>add/page">add page</a> | |||
| </div> | |||
| <p><a href="<?php echo site_url();?>add/content?type=post">Regular post</a><br>Creating regular blog post.</p> | |||
| <p><a href="<?php echo site_url();?>add/content?type=image">Image post</a><br>Creating blog post with featured image.</p> | |||
| <p><a href="<?php echo site_url();?>add/content?type=video">Video post</a><br>Creating blog post with featured video.</p> | |||
| <p><a href="<?php echo site_url();?>add/content?type=audio">Audio post</a><br>Creating blog post with featured audio.</p> | |||
| <p><a href="<?php echo site_url();?>add/content?type=link">Link post</a><br>Creating blog post with featured link.</p> | |||
| <p><a href="<?php echo site_url();?>add/content?type=quote">Quote post</a><br>Creating blog post with featured quote.</p> | |||
| <p><a href="<?php echo site_url();?>add/page">Static page</a><br>Creating static page.</p> | |||
| <div class="content-list"> | |||
| <?php get_user_pages(); ?> | |||
| </div> | |||
| @ -1 +1,4 @@ | |||
| <h1>You don't have permission to access this page</h1> | |||
| <div class="creatorMenu"> | |||
| <h1>Access denied</h1> | |||
| <p>You don't have permission to access this page</p> | |||
| </div> | |||
| @ -1,15 +1,17 @@ | |||
| <?php if (isset($error)) { ?> | |||
| <div class="error-message"><?php echo $error ?></div> | |||
| <?php } ?> | |||
| <h1>Import RSS Feed 2.0</h1> | |||
| <p>By using this importer you are agree if the feed is yours, or at least you have the authority to publish it.</p> | |||
| <form method="POST"> | |||
| Feed Url <span class="required">*</span> <br><input type="url" class="text <?php if (isset($url)) { | |||
| if (empty($url)) { | |||
| echo 'error'; | |||
| } | |||
| } ?>" name="url"/><br><br> | |||
| Add source link (optional) <input type="checkbox" class="checkbox" name="credit" value="yes"/><br><br> | |||
| <input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>"> | |||
| <input type="submit" name="submit" class="submit" value="Import"/> | |||
| </form> | |||
| <div class="content-list"> | |||
| <h1>Import RSS Feed 2.0</h1> | |||
| <p>By using this importer you are agree if the feed is yours, or at least you have the authority to publish it.</p> | |||
| <form method="POST"> | |||
| Feed Url <span class="required">*</span> <br><input type="url" class="text <?php if (isset($url)) { | |||
| if (empty($url)) { | |||
| echo 'error'; | |||
| } | |||
| } ?>" name="url"/><br><br> | |||
| Add source link (optional) <input type="checkbox" class="checkbox" name="credit" value="yes"/><br><br> | |||
| <input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>"> | |||
| <input type="submit" name="submit" class="submit" value="Import"/> | |||
| </form> | |||
| </div> | |||
| @ -1,5 +1,20 @@ | |||
| <?php include('partials/post-type-navi.html.php'); ?> | |||
| <?php | |||
| echo '<h2>Your recent posts</h2>'; | |||
| get_user_posts(); | |||
| echo '<h2>Static pages</h2>'; | |||
| get_user_pages(); ?> | |||
| /* Get All Posts */ | |||
| $page = from($_GET, 'page'); | |||
| $page = $page ? (int)$page : 1; | |||
| $perpage = config('posts.perpage'); | |||
| $posts = get_posts(null, $page, $perpage); | |||
| ?> | |||
| <div class="content-list"> | |||
| <?php if (!empty($posts)) : ?> | |||
| <?php $actionDestination = 'admin'; ?> | |||
| <?php include('partials/post-list.html.php'); ?> | |||
| <?php else : ?> | |||
| <p>No posts found!</p> | |||
| <?php endif; ?> | |||
| </div> | |||
| @ -1 +1,6 @@ | |||
| <h1>No posts found!</h1> | |||
| <?php include('partials/post-type-navi.html.php'); ?> | |||
| <div class="content-list"> | |||
| <h2>No posts found!</h2> | |||
| <p>Use the menu above to create a new post!</p> | |||
| </div> | |||
| @ -0,0 +1,10 @@ | |||
| <div class="creatorMenu"> | |||
| <h2>Delete</h2> | |||
| <p>Are you sure want to delete <strong><?php echo $p->title; ?></strong>?</p> | |||
| <form method="POST"> | |||
| <input type="hidden" name="file" value="<?php echo $p->file ?>"/><br> | |||
| <input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>"> | |||
| <input type="submit" name="submit" value="Delete"/> | |||
| <span><a href="<?php echo $back ?>">Cancel</a></span> | |||
| </form> | |||
| </div> | |||
| @ -0,0 +1,209 @@ | |||
| <?php | |||
| /* create a variable for quick check if type post, page or category */ | |||
| $globalType = false; | |||
| if($type == 'is_page' || $type == 'staticPage'){ $globalType = 'page'; } | |||
| if($type == 'is_category'){ $globalType = 'category'; } | |||
| if($type == 'is_post' || $type == 'is_video' || $type == 'is_audio' || $type == 'is_link' || $type == 'is_quote' || $type == 'is_image'){ $globalType = 'post'; } | |||
| ?> | |||
| <link rel="stylesheet" type="text/css" href="<?php echo site_url() ?>system/admin/editor/css/editor.css"/> | |||
| <script src="<?php echo site_url() ?>system/resources/js/jquery.min.js"></script> | |||
| <script src="<?php echo site_url() ?>system/resources/js/jquery-ui.min.js"></script> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/Markdown.Converter.js"></script> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/Markdown.Sanitizer.js"></script> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/Markdown.Editor.js"></script> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/Markdown.Extra.js"></script> | |||
| <link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/jquery-ui.css"> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/jquery.ajaxfileupload.js"></script> | |||
| <?php if (isset($error)) { ?> | |||
| <div class="error-message"><?php echo $error ?></div> | |||
| <?php } ?> | |||
| <div class="content-creator"> | |||
| <div class="wmd-panel"> | |||
| <form method="POST"> | |||
| <div class="formElement"> | |||
| <label for="name">Title <span class="required">*</span></label> | |||
| <input type="text" class="text <?php if (isset($postTitle)) {if (empty($postTitle)) {echo 'error';}} ?>" name="title" value="<?php if (isset($postTitle)) {echo $postTitle;} elseif(isset($oldtitle)){ echo $oldtitle; }?>"/> | |||
| </div> | |||
| <div class="formElement <?php if(config('input.showUrl') == "false"){ echo 'hide'; } ?>"> | |||
| <label for="url">Url (optional) | |||
| <input type="text" class="text" name="url" value="<?php if (isset($postUrl)) {echo $postUrl;} elseif(isset($oldmd)){echo $oldmd;} ?>"/> | |||
| <span class="help">If the url leave empty we will use the page title.</span> | |||
| </div> | |||
| <?php if($globalType == 'post') : ?> | |||
| <div class="formElement <?php if(config('input.showCat') == "false"){ echo 'hide'; } ?>"> | |||
| <label for="category">Category <span class="required">*</span></label> | |||
| <select name="category"> | |||
| <option value="uncategorized">Uncategorized</option> | |||
| <?php foreach ($desc as $d):?> | |||
| <option value="<?php echo $d->md;?>" <?php if($category === $d->md) { echo 'selected="selected"';} ?>><?php echo $d->title;?></option> | |||
| <?php endforeach;?> | |||
| </select> | |||
| </div> | |||
| <div class="formElement <?php if(config('input.showTag') == "false"){ echo 'hide'; } ?>"> | |||
| <label for="tag">Tag <span class="required">*</span></label> | |||
| <input type="text" class="text <?php if (isset($postTag)) { if (empty($postTag)) { echo 'error';}} ?>" name="tag" value="<?php if (isset($postTag)) { echo $postTag; } elseif(isset($oldtag)){ echo $oldtag; } else { echo 'hidden'; } ?>"/> | |||
| </div> | |||
| <?php if(config('input.showDate') == "true" && isset($postdate)) : ?> | |||
| <div class="formElement"> | |||
| <label for="date">Year, Month, Day</label> | |||
| <input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"> | |||
| </div> | |||
| <?php endif; ?> | |||
| <?php if(config('input.showDate') == "true" && isset($time)) : ?> | |||
| <div class="formElement"> | |||
| <label for="time">Hour, Minute, Second</label> | |||
| <input type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"> | |||
| </div> | |||
| <?php endif; ?> | |||
| <?php endif; ?> | |||
| <?php if($globalType == 'post' || $globalType == 'page') : ?> | |||
| <?php if(config('input.showMeta') == "true") : ?> | |||
| <div class="formElement"> | |||
| <label for="description">Meta Description (optional)</label> | |||
| <textarea name="description" rows="3" cols="20"><?php if (isset($p->description)) { echo $p->description; } elseif(isset($olddescription)){ echo $olddescription;} ?></textarea> | |||
| </div> | |||
| <?php endif; ?> | |||
| <?php endif; ?> | |||
| <?php if($globalType == 'post') : ?> | |||
| <?php if ($type == 'is_audio'):?> | |||
| <div id="audioEditor" class="formElement"> | |||
| <label for="audio">Featured Audio <span class="required">*</span> <span class="inforight"> (iframe-code of soundcloud)</span></label> | |||
| <textarea id="wmd-input-feature" rows="3" cols="20" class="text <?php if (isset($postAudio)) { if (empty($postAudio)) { echo 'error';} } ?>" name="audio"><?php if (isset($postAudio)) { echo $postAudio;} elseif(isset($oldaudio)){ echo $oldaudio; } ?></textarea> | |||
| <input type="hidden" name="is_audio" value="is_audio"> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if ($type == 'is_video'):?> | |||
| <div id="videoEditor" class="formElement"> | |||
| <label for="video">Featured Video <span class="required">*</span> <span class="inforight"> (iframe-code of YouTube/vimeo)</span></label> | |||
| <textarea id="wmd-input-feature" rows="3" cols="20" class="text <?php if (isset($postVideo)) { if (empty($postVideo)) { echo 'error';} } ?>" name="video"><?php if (isset($postVideo)) { echo $postVideo;} elseif(isset($oldvideo)){echo $oldvideo; } ?></textarea> | |||
| <input type="hidden" name="is_video" value="is_video"> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if ($type == 'is_image'):?> | |||
| <div id="imageEditor" class="formElement"> | |||
| <label>Featured Image <span class="required">*</span></label> | |||
| <div id="wmd-button-bar-image" class="wmd-button-bar"></div> | |||
| <textarea id="wmd-input-image" rows="3" cols="20" class="text <?php if (isset($postImage)) { if (empty($postImage)) { echo 'error';} } ?>" name="image"><?php if (isset($postImage)) { echo $postImage;} elseif(isset($oldimage)){echo $oldimage;} ?></textarea> | |||
| <input type="hidden" name="is_image" value="is_image"> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if ($type == 'is_quote'):?> | |||
| <div id="quoteEditor" class="formElement"> | |||
| <label>Featured Quote <span class="required">*</span></label> | |||
| <textarea rows="3" id="wmd-input-feature" cols="20" class="text <?php if (isset($postQuote)) { if (empty($postQuote)) { echo 'error';} } ?>" name="quote"><?php if (isset($postQuote)) { echo $postQuote;} elseif(isset($oldquote)){echo $oldquote;} ?></textarea> | |||
| <input type="hidden" name="is_quote" value="is_quote"> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if ($type == 'is_link'):?> | |||
| <div id="linkEditor" class="formElement"> | |||
| <label>Featured Link <span class="required">*</span></label> | |||
| <div id="wmd-button-bar-link" class="wmd-button-bar"></div> | |||
| <textarea rows="3" id="wmd-input-link" cols="20" class="text <?php if (isset($postLink)) { if (empty($postLink)) { echo 'error';} } ?>" name="link"><?php if (isset($postLink)) { echo $postLink;} elseif(isset($oldlink)){ echo $oldlink; } ?></textarea> | |||
| <input type="hidden" name="is_link" value="is_link"> | |||
| </div> | |||
| <?php endif;?> | |||
| <?php if ($type == 'is_post'):?> | |||
| <input type="hidden" name="is_post" value="is_post"> | |||
| <?php endif;?> | |||
| <?php endif; ?> | |||
| <div class="formElement"> | |||
| <label for="content">Main-Content</label> | |||
| <div id="wmd-button-bar" class="wmd-button-bar"></div> | |||
| <textarea id="wmd-input" class="wmd-input <?php if (isset($postContent)) {if (empty($postContent)) {echo 'error';}} ?>" name="content" cols="20" rows="10"><?php if (isset($postContent)) {echo $postContent;} elseif(isset($oldcontent)){ echo $oldcontent; } ?></textarea> | |||
| <input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>"> | |||
| <?php if ($globalType == 'post') : ?> | |||
| <?php if (isset($isdraft[4]) AND $isdraft[4] == 'draft') : ?> | |||
| <input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/> | |||
| <input type="submit" name="publishdraft" class="submit" value="Publish draft"/> | |||
| <input type="submit" name="updatedraft" class="draft" value="Update draft"/> | |||
| <a href="<?php echo $delete ?>">Delete</a> | |||
| <?php elseif(isset($isupdate)) : ?> | |||
| <input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/> | |||
| <input type="submit" name="updatepost" class="submit" value="Update"/> | |||
| <input type="submit" name="revertpost" class="revert" value="Revert to draft"/> | |||
| <a href="<?php echo $delete ?>">Delete</a> | |||
| <?php else: ?> | |||
| <input type="submit" name="draft" class="draft" value="Save as draft"/> | |||
| <input type="submit" name="publish" class="submit" value="Publish"/> | |||
| <?php endif; ?> | |||
| <?php endif; ?> | |||
| <?php if ($globalType == 'page') : ?> | |||
| <?php if(isset($isupdate)) : ?> | |||
| <input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/> | |||
| <input type="submit" name="submit" class="submit" value="Update"/> | |||
| <a href="<?php echo $delete ?>">Delete</a> | |||
| <?php else: ?> | |||
| <input type="submit" name="submit" class="submit" value="Publish"/> | |||
| <?php endif; ?> | |||
| <?php endif;?> | |||
| <?php if ($globalType == 'category') :?> | |||
| <?php if(isset($isupdate)) : ?> | |||
| <input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/> | |||
| <input type="submit" name="submit" class="submit" value="Update"/> | |||
| <?php else: ?> | |||
| <input type="submit" name="submit" class="submit" value="Add category"/> | |||
| <?php endif; ?> | |||
| <?php endif;?> | |||
| <?php if($type == 'is_frontpage' || $type == 'is_profile') : ?> | |||
| <input type="submit" name="submit" class="submit" value="Save"/> | |||
| <?php endif; ?> | |||
| </div> | |||
| </form> | |||
| </div> | |||
| <style> | |||
| #insertImageDialog { display:none; padding: 10px; font-size:12px;} | |||
| .wmd-prompt-background {z-index:10!important;} | |||
| </style> | |||
| <div id="insertImageDialog" title="Insert Image"> | |||
| <h4>URL</h4> | |||
| <input type="text" placeholder="Enter image URL" /> | |||
| <h4>Upload</h4> | |||
| <form method="post" action="" enctype="multipart/form-data"> | |||
| <input type="file" name="file" id="file" /> | |||
| </form> | |||
| </div> | |||
| <div class="content-preview"> | |||
| <?php if($type == 'is_image' || $type == 'is_post') : ?> | |||
| <div id="wmd-preview-image" class="wmd-panel wmd-preview"></div> | |||
| <?php elseif($type == 'is_video' || $type == 'is_audio' || $type == 'is_quote') : ?> | |||
| <div id="wmd-preview-feature" class="wmd-panel wmd-preview"></div> | |||
| <?php elseif($type == 'is_link'): ?> | |||
| <div id="wmd-preview-link" class="wmd-panel wmd-preview"></div> | |||
| <?php endif; ?> | |||
| <div id="wmd-preview" class="wmd-panel wmd-preview"></div> | |||
| </div> | |||
| <!-- Declare the base path. Important --> | |||
| <script type="text/javascript">var base_path = '<?php echo site_url() ?>';</script> | |||
| <script type="text/javascript" src="<?php echo site_url() ?>system/admin/editor/js/editor.js"></script> | |||
| </div> | |||
| @ -0,0 +1,49 @@ | |||
| <table class="post-list"> | |||
| <tr class="head"> | |||
| <th>Title</th> | |||
| <th>Created or Published</th> | |||
| <?php if (config("views.counter") == "true"): ?> | |||
| <th>Views</th> | |||
| <?php endif; ?> | |||
| <th>Author</th> | |||
| <?php if (config("input.showTag") == "true"): ?> | |||
| <th>Tags</th> | |||
| <?php endif; ?> | |||
| <th>Operations</th> | |||
| </tr> | |||
| <?php $i = 0; $len = count($posts); ?> | |||
| <?php foreach ($posts as $p): ?> | |||
| <?php | |||
| if ($i == 0) { | |||
| $class = 'item first'; | |||
| } elseif ($i == $len - 1) { | |||
| $class = 'item last'; | |||
| } else { | |||
| $class = 'item'; | |||
| } | |||
| $i++; | |||
| ?> | |||
| <tr class="<?php echo $class ?>"> | |||
| <td><a href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td> | |||
| <td><?php echo date('d F Y', $p->date) ?></td> | |||
| <?php if (config("views.counter") == "true"): ?> | |||
| <td><?php echo $p->views ?></td> | |||
| <?php endif; ?> | |||
| <td><a href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></td> | |||
| <?php if (config("input.showTag") == "true"): ?> | |||
| <td><?php echo $p->tag ?></td> | |||
| <?php endif; ?> | |||
| <td><a href="<?php echo $p->url ?>/edit?destination=<?php echo $actionDestination; ?>">Edit</a> | <a href="<?php echo $p->url ?>/delete?destination=<?php echo $actionDestination; ?>">Delete</a></td> | |||
| </tr> | |||
| <?php endforeach; ?> | |||
| </table> | |||
| <?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?> | |||
| <div class="pager"> | |||
| <?php if (!empty($pagination['prev'])): ?> | |||
| <span><a href="?page=<?php echo $page - 1 ?>" class="pagination-arrow newer" rel="prev">Newer</a></span> | |||
| <?php endif; ?> | |||
| <?php if (!empty($pagination['next'])): ?> | |||
| <span><a href="?page=<?php echo $page + 1 ?>" class="pagination-arrow older" rel="next">Older</a></span> | |||
| <?php endif; ?> | |||
| </div> | |||
| <?php endif; ?> | |||
| @ -0,0 +1,12 @@ | |||
| <div class="createPost"> | |||
| <h2>Add Post</h2> | |||
| <ul class="addPost"> | |||
| <li <?php if (isset($type) && $type == 'is_post'){ echo ' class="active"';}?>><a href="<?php echo site_url(); ?>add/content?type=post"><i class="icon-doc-text"></i>Text</a></li> | |||
| <li <?php if (isset($type) && $type == 'is_image'){ echo ' class="active"';}?>><a href="<?php echo site_url(); ?>add/content?type=image"><i class="icon-camera"></i>Image</a></li> | |||
| <li <?php if (isset($type) && $type == 'is_video'){ echo ' class="active"';}?>><a href="<?php echo site_url(); ?>add/content?type=video"><i class="icon-videocam"></i>Video</a></li> | |||
| <li <?php if (isset($type) && $type == 'is_audio'){ echo ' class="active"';}?>><a href="<?php echo site_url(); ?>add/content?type=audio"><i class="icon-music"></i>Audio</a></li> | |||
| <li <?php if (isset($type) && $type == 'is_link'){ echo ' class="active"';}?>><a href="<?php echo site_url(); ?>add/content?type=link"><i class="icon-link"></i>Link</a></li> | |||
| <li <?php if (isset($type) && $type == 'is_quote'){ echo ' class="active"';}?>><a href="<?php echo site_url(); ?>add/content?type=quote"><i class="icon-chat-empty"></i>Quote</a></li> | |||
| </ul> | |||
| </div> | |||
| @ -0,0 +1,38 @@ | |||
| <?php | |||
| $user = $_SESSION[config("site.url")]['user']; | |||
| $role = user('role', $user); | |||
| $base = site_url(); | |||
| ?> | |||
| <div id="toolbar"> | |||
| <div class="toolbarInner"> | |||
| <ul class="mainTools"> | |||
| <li><a href="<?php echo $base ; ?>admin">Posts</a></li> | |||
| <li><a href="<?php echo $base ; ?>admin/content">Pages</a></li> | |||
| <li><a href="<?php echo $base ; ?>admin/draft">Drafts</a></li> | |||
| <?php if (config('input.showCat') == 'true') : ?> | |||
| <li><a href="<?php echo $base ; ?>admin/categories">Categories</a></li> | |||
| <?php endif; ?> | |||
| </ul> | |||
| <ul class="adminTools"> | |||
| <li><a href="<?php echo $base ; ?>">Go to Front</a></li> | |||
| <li class="dropDown"><a href="#">Tools</a> | |||
| <ul class="dropDownItems"> | |||
| <li><a href="<?php echo $base; ?>admin/clear-cache">Clear cache</a></li> | |||
| <li><a href="<?php echo $base ; ?>edit/profile">Profile</a></li> | |||
| <li><a href="<?php echo $base ; ?>admin/mine">Mine</a></li> | |||
| <?php if (config('views.counter') == 'true') : ?> | |||
| <li><a href="<?php echo $base ; ?>admin/popular">Popular</a></li> | |||
| <?php endif; ?> | |||
| <?php if ($role == 'admin') : ?> | |||
| <li><a href="<?php echo $base; ?>admin/config">Config</a></li> | |||
| <li><a href="<?php echo $base ; ?>admin/update">Update</a></li> | |||
| <li><a href="<?php echo $base ; ?>admin/import">Import</a></li> | |||
| <li><a href="<?php echo $base ; ?>admin/backup">Backup</a></li> | |||
| <?php endif; ?> | |||
| </ul> | |||
| </li> | |||
| <li><a href="<?php echo $base; ?>logout">Logout</a></li> | |||
| </ul> | |||
| </div> | |||
| </div> | |||
| @ -1,39 +1,14 @@ | |||
| <h2 class="post-index"><?php echo $heading ?></h2> | |||
| <?php if (!empty($posts)) { ?> | |||
| <table class="post-list"> | |||
| <tr class="head"> | |||
| <th>Title</th> | |||
| <th>Published</th><?php if (config("views.counter") == "true"): ?> | |||
| <th>Views</th><?php endif; ?> | |||
| <th>Author</th> | |||
| <th>Tag</th> | |||
| <th>Operations</th> | |||
| </tr> | |||
| <?php $i = 0; | |||
| $len = count($posts); ?> | |||
| <?php foreach ($posts as $p): ?> | |||
| <?php | |||
| if ($i == 0) { | |||
| $class = 'item first'; | |||
| } elseif ($i == $len - 1) { | |||
| $class = 'item last'; | |||
| } else { | |||
| $class = 'item'; | |||
| } | |||
| $i++; | |||
| ?> | |||
| <tr class="<?php echo $class ?>"> | |||
| <td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td> | |||
| <td><?php echo date('d F Y', $p->date) ?></td> | |||
| <?php if (config("views.counter") == "true"): ?> | |||
| <td><?php echo $p->views ?></td><?php endif; ?> | |||
| <td><a target="_blank" href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></td> | |||
| <td><?php echo $p->tag ?></td> | |||
| <td><a href="<?php echo $p->url ?>/edit?destination=admin/posts">Edit</a> <a | |||
| href="<?php echo $p->url ?>/delete?destination=admin/posts">Delete</a></td> | |||
| </tr> | |||
| <?php endforeach; ?> | |||
| </table> | |||
| <?php } else { | |||
| echo 'No posts found!'; | |||
| } ?> | |||
| <div class="creatorMenu"> | |||
| <h2 class="post-index"><?php echo $heading ?></h2> | |||
| </div> | |||
| <div class="content-list"> | |||
| <?php if (!empty($posts)) : ?> | |||
| <?php $actionDestination = 'admin/posts'; ?> | |||
| <?php include('partials/post-list.html.php'); ?> | |||
| <?php else : ?> | |||
| <p>No posts found!</p> | |||
| <?php endif; ?> | |||
| </div> | |||
| @ -1,33 +1,15 @@ | |||
| <h2 class="post-index"><?php echo $heading ?></h2> | |||
| <?php if (!empty($posts)) { ?> | |||
| <table class="post-list"> | |||
| <tr class="head"> | |||
| <th>Title</th> | |||
| <th>Created</th> | |||
| <th>Tag</th> | |||
| <th>Operations</th> | |||
| </tr> | |||
| <?php $i = 0; | |||
| $len = count($posts); ?> | |||
| <?php foreach ($posts as $p): ?> | |||
| <?php | |||
| if ($i == 0) { | |||
| $class = 'item first'; | |||
| } elseif ($i == $len - 1) { | |||
| $class = 'item last'; | |||
| } else { | |||
| $class = 'item'; | |||
| } | |||
| $i++; | |||
| ?> | |||
| <tr class="<?php echo $class ?>"> | |||
| <td><?php echo $p->title ?></td> | |||
| <td><?php echo date('d F Y', $p->date) ?></td> | |||
| <td><?php echo strip_tags($p->tag) ?></td> | |||
| <td><a href="<?php echo $p->url ?>/edit?destination=admin/draft">Edit</a> <a href="<?php echo $p->url ?>/delete?destination=admin/draft">Delete</a></td> | |||
| </tr> | |||
| <?php endforeach; ?> | |||
| </table> | |||
| <?php } else { | |||
| echo 'No draft found!'; | |||
| } ?> | |||
| <div class="creatorMenu"> | |||
| <h2><?php echo $heading ?></h2> | |||
| </div> | |||
| <div class="content-list"> | |||
| <?php if (!empty($posts)) : ?> | |||
| <?php $actionDestination = 'admin/draft'; ?> | |||
| <?php include('partials/post-list.html.php'); ?> | |||
| <?php else : ?> | |||
| <p>No posts found!</p> | |||
| <?php endif; ?> | |||
| </div> | |||
| @ -1,49 +1,12 @@ | |||
| <h2 class="post-index"><?php echo $heading ?></h2> | |||
| <?php if (!empty($posts)) { ?> | |||
| <table class="post-list"> | |||
| <tr class="head"> | |||
| <th>Title</th> | |||
| <th>Published</th> | |||
| <?php if (config("views.counter") == "true"): ?> | |||
| <th>Views</th> | |||
| <?php endif; ?> | |||
| <th>Tag</th> | |||
| <th>Operations</th> | |||
| </tr> | |||
| <?php $i = 0; | |||
| $len = count($posts); ?> | |||
| <?php foreach ($posts as $p): ?> | |||
| <?php | |||
| if ($i == 0) { | |||
| $class = 'item first'; | |||
| } elseif ($i == $len - 1) { | |||
| $class = 'item last'; | |||
| } else { | |||
| $class = 'item'; | |||
| } | |||
| $i++; | |||
| ?> | |||
| <tr class="<?php echo $class ?>"> | |||
| <td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td> | |||
| <td><?php echo date('d F Y', $p->date) ?></td> | |||
| <?php if (config("views.counter") == "true"): ?> | |||
| <td><?php echo $p->views ?></td> | |||
| <?php endif; ?> | |||
| <td><?php echo $p->tag ?></td> | |||
| <td><a href="<?php echo $p->url ?>/edit?destination=admin/mine">Edit</a> <a href="<?php echo $p->url ?>/delete?destination=admin/mine">Delete</a></td> | |||
| </tr> | |||
| <?php endforeach; ?> | |||
| </table> | |||
| <?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?> | |||
| <div class="pager"> | |||
| <?php if (!empty($pagination['prev'])): ?> | |||
| <span><a href="?page=<?php echo $page - 1 ?>" class="pagination-arrow newer" rel="prev">Newer</a></span> | |||
| <?php endif; ?> | |||
| <?php if (!empty($pagination['next'])): ?> | |||
| <span><a href="?page=<?php echo $page + 1 ?>" class="pagination-arrow older" rel="next">Older</a></span> | |||
| <?php endif; ?> | |||
| </div> | |||
| <?php endif; ?> | |||
| <?php } else { | |||
| echo 'No posts found!'; | |||
| } ?> | |||
| <div class="creatorMenu"> | |||
| <h2><?php echo $heading ?></h2> | |||
| </div> | |||
| <div class="content-list"> | |||
| <?php if (!empty($posts)) : ?> | |||
| <?php $actionDestination = 'admin/mine'; ?> | |||
| <?php include('partials/post-list.html.php'); ?> | |||
| <?php else : ?> | |||
| <p>No posts found!</p> | |||
| <?php endif; ?> | |||
| </div> | |||
| @ -0,0 +1,21 @@ | |||
| <?php | |||
| class trendschau{ | |||
| // Return edit tab on post | |||
| public function editLink($p) | |||
| { | |||
| $user = $_SESSION[config("site.url")]['user']; | |||
| $role = user('role', $user); | |||
| if (isset($p->author)) { | |||
| if ($user === $p->author || $role === 'admin') { | |||
| echo '<div class="edit"><a href="' . $p->url . '">View</a></li><li></li></ul></div>'; | |||
| } | |||
| } else { | |||
| echo '<div class="tab"><ul class="nav nav-tabs"><li role="presentation" class="active"><a href="' . $p->url . '">View</a></li><li><a href="' . $p->url . '/edit?destination=post">Edit</a></li></ul></div>'; | |||
| } | |||
| } | |||
| } | |||
| ?> | |||
| @ -0,0 +1,3 @@ | |||
| vendor | |||
| composer.phar | |||
| composer.lock | |||
| @ -0,0 +1,15 @@ | |||
| language: php | |||
| php: | |||
| - 5.3 | |||
| - 5.4 | |||
| - 5.5 | |||
| - 5.6 | |||
| - 7.0 | |||
| - hhvm | |||
| before_script: | |||
| - composer install --no-interaction --prefer-source | |||
| script: | |||
| - phpunit --coverage-text --verbose | |||
| @ -0,0 +1,10 @@ | |||
| To install URLify, you can add it as a dependency ar by downloading the composer.phar executable. | |||
| $ curl -s http://getcomposer.org/installer | php | |||
| and run install | |||
| $ php composer.phar install | |||
| For more details, see http://getcomposer.org. | |||
| @ -0,0 +1,27 @@ | |||
| Copyright (c) Django Software Foundation and individual contributors. | |||
| All rights reserved. | |||
| Redistribution and use in source and binary forms, with or without modification, | |||
| are permitted provided that the following conditions are met: | |||
| 1. Redistributions of source code must retain the above copyright notice, | |||
| this list of conditions and the following disclaimer. | |||
| 2. Redistributions in binary form must reproduce the above copyright | |||
| notice, this list of conditions and the following disclaimer in the | |||
| documentation and/or other materials provided with the distribution. | |||
| 3. Neither the name of Django nor the names of its contributors may be used | |||
| to endorse or promote products derived from this software without | |||
| specific prior written permission. | |||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | |||
| ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |||
| WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |||
| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | |||
| ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |||
| (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |||
| LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |||
| ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |||
| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |||
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
| @ -0,0 +1,94 @@ | |||
| # URLify for PHP | |||
| A PHP port of [URLify.js](https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/urlify.js) | |||
| from the Django project. Handles symbols from Latin languages as well as Arabic, Azerbaijani, Czech, German, Greek, | |||
| Latvian, Lithuanian, Polish, Romanian, Bulgarian, Russian, Serbian, Turkish, Ukrainian and Vietnamese. Symbols it cannot | |||
| transliterate it will simply omit. | |||
| ## Usage: | |||
| To generate slugs for URLs: | |||
| ```php | |||
| <?php | |||
| echo URLify::filter (' J\'étudie le français '); | |||
| // "jetudie-le-francais" | |||
| echo URLify::filter ('Lo siento, no hablo español.'); | |||
| // "lo-siento-no-hablo-espanol" | |||
| ?> | |||
| ``` | |||
| To generate slugs for file names: | |||
| ```php | |||
| <?php | |||
| echo URLify::filter ('фото.jpg', 60, "", true); | |||
| // "foto.jpg" | |||
| ?> | |||
| ``` | |||
| To simply transliterate characters: | |||
| ```php | |||
| <?php | |||
| echo URLify::downcode ('J\'étudie le français'); | |||
| // "J'etudie le francais" | |||
| echo URLify::downcode ('Lo siento, no hablo español.'); | |||
| // "Lo siento, no hablo espanol." | |||
| /* Or use transliterate() alias: */ | |||
| echo URLify::transliterate ('Lo siento, no hablo español.'); | |||
| // "Lo siento, no hablo espanol." | |||
| ?> | |||
| ``` | |||
| To extend the character list: | |||
| ```php | |||
| <?php | |||
| URLify::add_chars (array ( | |||
| '¿' => '?', '®' => '(r)', '¼' => '1/4', | |||
| '½' => '1/2', '¾' => '3/4', '¶' => 'P' | |||
| )); | |||
| echo URLify::downcode ('¿ ® ¼ ¼ ¾ ¶'); | |||
| // "? (r) 1/2 1/2 3/4 P" | |||
| ?> | |||
| ``` | |||
| To extend the list of words to remove: | |||
| ```php | |||
| <?php | |||
| URLify::remove_words (array ('remove', 'these', 'too')); | |||
| ?> | |||
| ``` | |||
| To prioritize a certain language map: | |||
| ```php | |||
| <?php | |||
| echo URLify::filter (' Ägypten und Österreich besitzen wie üblich ein Übermaß an ähnlich öligen Attachés ',60,"de"); | |||
| // "aegypten-und-oesterreich-besitzen-wie-ueblich-ein-uebermass-aehnlich-oeligen-attaches" | |||
| echo URLify::filter ('Cağaloğlu, çalıştığı, müjde, lazım, mahkûm',60,"tr"); | |||
| // "cagaloglu-calistigi-mujde-lazim-mahkum" | |||
| ?> | |||
| ``` | |||
| Please note that the "ü" is transliterated to "ue" in the first case, whereas it results in a simple "u" in the latter. | |||
| @ -0,0 +1,268 @@ | |||
| <?php | |||
| /** | |||
| * A PHP port of URLify.js from the Django project | |||
| * (https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/urlify.js). | |||
| * Handles symbols from Latin languages, Greek, Turkish, Bulgarian, Russian, | |||
| * Ukrainian, Czech, Polish, Romanian, Latvian, Lithuanian, Vietnamese, Arabic, | |||
| * Serbian, Azerbaijani, and Slovakian. Symbols it cannot transliterate | |||
| * it will simply omit. | |||
| * | |||
| * Usage: | |||
| * | |||
| * echo URLify::filter (' J\'étudie le français '); | |||
| * // "jetudie-le-francais" | |||
| * | |||
| * echo URLify::filter ('Lo siento, no hablo español.'); | |||
| * // "lo-siento-no-hablo-espanol" | |||
| */ | |||
| class URLify { | |||
| public static $maps = array ( | |||
| 'de' => array ( /* German */ | |||
| 'Ä' => 'Ae', 'Ö' => 'Oe', 'Ü' => 'Ue', 'ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'ss', | |||
| 'ẞ' => 'SS' | |||
| ), | |||
| 'latin' => array ( | |||
| 'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A','Ă' => 'A', 'Æ' => 'AE', 'Ç' => | |||
| 'C', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', | |||
| 'Ï' => 'I', 'Ð' => 'D', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' => | |||
| 'O', 'Ő' => 'O', 'Ø' => 'O','Ș' => 'S','Ț' => 'T', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ű' => 'U', | |||
| 'Ý' => 'Y', 'Þ' => 'TH', 'ß' => 'ss', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' => | |||
| 'a', 'å' => 'a', 'ă' => 'a', 'æ' => 'ae', 'ç' => 'c', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', | |||
| 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'ð' => 'd', 'ñ' => 'n', 'ò' => 'o', 'ó' => | |||
| 'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', 'ő' => 'o', 'ø' => 'o', 'ș' => 's', 'ț' => 't', 'ù' => 'u', 'ú' => 'u', | |||
| 'û' => 'u', 'ü' => 'u', 'ű' => 'u', 'ý' => 'y', 'þ' => 'th', 'ÿ' => 'y' | |||
| ), | |||
| 'latin_symbols' => array ( | |||
| '©' => '(c)' | |||
| ), | |||
| 'el' => array ( /* Greek */ | |||
| 'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'h', 'θ' => '8', | |||
| 'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => '3', 'ο' => 'o', 'π' => 'p', | |||
| 'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y', 'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'w', | |||
| 'ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'y', 'ή' => 'h', 'ώ' => 'w', 'ς' => 's', | |||
| 'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i', | |||
| 'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'H', 'Θ' => '8', | |||
| 'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => '3', 'Ο' => 'O', 'Π' => 'P', | |||
| 'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'PS', 'Ω' => 'W', | |||
| 'Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y', 'Ή' => 'H', 'Ώ' => 'W', 'Ϊ' => 'I', | |||
| 'Ϋ' => 'Y' | |||
| ), | |||
| 'tr' => array ( /* Turkish */ | |||
| 'ş' => 's', 'Ş' => 'S', 'ı' => 'i', 'İ' => 'I', 'ç' => 'c', 'Ç' => 'C', 'ü' => 'u', 'Ü' => 'U', | |||
| 'ö' => 'o', 'Ö' => 'O', 'ğ' => 'g', 'Ğ' => 'G' | |||
| ), | |||
| 'bg' => array( /* Bulgarian */ | |||
| "Щ" => 'Sht', "Ш" => 'Sh', "Ч" => 'Ch', "Ц" => 'C', "Ю" => 'Yu', "Я" => 'Ya', | |||
| "Ж" => 'J', "А" => 'A', "Б" => 'B', "В" => 'V', "Г" => 'G', "Д" => 'D', | |||
| "Е" => 'E', "З" => 'Z', "И" => 'I', "Й" => 'Y', "К" => 'K', "Л" => 'L', | |||
| "М" => 'M', "Н" => 'N', "О" => 'O', "П" => 'P', "Р" => 'R', "С" => 'S', | |||
| "Т" => 'T', "У" => 'U', "Ф" => 'F', "Х" => 'H', "Ь" => '', "Ъ" => 'A', | |||
| "щ" => 'sht', "ш" => 'sh', "ч" => 'ch', "ц" => 'c', "ю" => 'yu', "я" => 'ya', | |||
| "ж" => 'j', "а" => 'a', "б" => 'b', "в" => 'v', "г" => 'g', "д" => 'd', | |||
| "е" => 'e', "з" => 'z', "и" => 'i', "й" => 'y', "к" => 'k', "л" => 'l', | |||
| "м" => 'm', "н" => 'n', "о" => 'o', "п" => 'p', "р" => 'r', "с" => 's', | |||
| "т" => 't', "у" => 'u', "ф" => 'f', "х" => 'h', "ь" => '', "ъ" => 'a' | |||
| ), | |||
| 'ru' => array ( /* Russian */ | |||
| 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ё' => 'yo', 'ж' => 'zh', | |||
| 'з' => 'z', 'и' => 'i', 'й' => 'j', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o', | |||
| 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', | |||
| 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sh', 'ъ' => '', 'ы' => 'y', 'ь' => '', 'э' => 'e', 'ю' => 'yu', | |||
| 'я' => 'ya', | |||
| 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'Yo', 'Ж' => 'Zh', | |||
| 'З' => 'Z', 'И' => 'I', 'Й' => 'J', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O', | |||
| 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', | |||
| 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sh', 'Ъ' => '', 'Ы' => 'Y', 'Ь' => '', 'Э' => 'E', 'Ю' => 'Yu', | |||
| 'Я' => 'Ya', | |||
| '№' => 'No' | |||
| ), | |||
| 'uk' => array ( /* Ukrainian */ | |||
| 'Є' => 'Ye', 'І' => 'I', 'Ї' => 'Yi', 'Ґ' => 'G', 'є' => 'ye', 'і' => 'i', 'ї' => 'yi', 'ґ' => 'g' | |||
| ), | |||
| 'cs' => array ( /* Czech */ | |||
| 'č' => 'c', 'ď' => 'd', 'ě' => 'e', 'ň' => 'n', 'ř' => 'r', 'š' => 's', 'ť' => 't', 'ů' => 'u', | |||
| 'ž' => 'z', 'Č' => 'C', 'Ď' => 'D', 'Ě' => 'E', 'Ň' => 'N', 'Ř' => 'R', 'Š' => 'S', 'Ť' => 'T', | |||
| 'Ů' => 'U', 'Ž' => 'Z' | |||
| ), | |||
| 'pl' => array ( /* Polish */ | |||
| 'ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ś' => 's', 'ź' => 'z', | |||
| 'ż' => 'z', 'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'e', 'Ł' => 'L', 'Ń' => 'N', 'Ó' => 'O', 'Ś' => 'S', | |||
| 'Ź' => 'Z', 'Ż' => 'Z' | |||
| ), | |||
| 'ro' => array ( /* Romanian */ | |||
| 'ă' => 'a', 'â' => 'a', 'î' => 'i', 'ș' => 's', 'ț' => 't', 'Ţ' => 'T', 'ţ' => 't' | |||
| ), | |||
| 'lv' => array ( /* Latvian */ | |||
| 'ā' => 'a', 'č' => 'c', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i', 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n', | |||
| 'š' => 's', 'ū' => 'u', 'ž' => 'z', 'Ā' => 'A', 'Č' => 'C', 'Ē' => 'E', 'Ģ' => 'G', 'Ī' => 'i', | |||
| 'Ķ' => 'k', 'Ļ' => 'L', 'Ņ' => 'N', 'Š' => 'S', 'Ū' => 'u', 'Ž' => 'Z' | |||
| ), | |||
| 'lt' => array ( /* Lithuanian */ | |||
| 'ą' => 'a', 'č' => 'c', 'ę' => 'e', 'ė' => 'e', 'į' => 'i', 'š' => 's', 'ų' => 'u', 'ū' => 'u', 'ž' => 'z', | |||
| 'Ą' => 'A', 'Č' => 'C', 'Ę' => 'E', 'Ė' => 'E', 'Į' => 'I', 'Š' => 'S', 'Ų' => 'U', 'Ū' => 'U', 'Ž' => 'Z' | |||
| ), | |||
| 'vn' => array ( /* Vietnamese */ | |||
| 'Á' => 'A', 'À' => 'A', 'Ả' => 'A', 'Ã' => 'A', 'Ạ' => 'A', 'Ă' => 'A', 'Ắ' => 'A', 'Ằ' => 'A', 'Ẳ' => 'A', 'Ẵ' => 'A', 'Ặ' => 'A', 'Â' => 'A', 'Ấ' => 'A', 'Ầ' => 'A', 'Ẩ' => 'A', 'Ẫ' => 'A', 'Ậ' => 'A', | |||
| 'á' => 'a', 'à' => 'a', 'ả' => 'a', 'ã' => 'a', 'ạ' => 'a', 'ă' => 'a', 'ắ' => 'a', 'ằ' => 'a', 'ẳ' => 'a', 'ẵ' => 'a', 'ặ' => 'a', 'â' => 'a', 'ấ' => 'a', 'ầ' => 'a', 'ẩ' => 'a', 'ẫ' => 'a', 'ậ' => 'a', | |||
| 'É' => 'E', 'È' => 'E', 'Ẻ' => 'E', 'Ẽ' => 'E', 'Ẹ' => 'E', 'Ê' => 'E', 'Ế' => 'E', 'Ề' => 'E', 'Ể' => 'E', 'Ễ' => 'E', 'Ệ' => 'E', | |||
| 'é' => 'e', 'è' => 'e', 'ẻ' => 'e', 'ẽ' => 'e', 'ẹ' => 'e', 'ê' => 'e', 'ế' => 'e', 'ề' => 'e', 'ể' => 'e', 'ễ' => 'e', 'ệ' => 'e', | |||
| 'Í' => 'I', 'Ì' => 'I', 'Ỉ' => 'I', 'Ĩ' => 'I', 'Ị' => 'I', 'í' => 'i', 'ì' => 'i', 'ỉ' => 'i', 'ĩ' => 'i', 'ị' => 'i', | |||
| 'Ó' => 'O', 'Ò' => 'O', 'Ỏ' => 'O', 'Õ' => 'O', 'Ọ' => 'O', 'Ô' => 'O', 'Ố' => 'O', 'Ồ' => 'O', 'Ổ' => 'O', 'Ỗ' => 'O', 'Ộ' => 'O', 'Ơ' => 'O', 'Ớ' => 'O', 'Ờ' => 'O', 'Ở' => 'O', 'Ỡ' => 'O', 'Ợ' => 'O', | |||
| 'ó' => 'o', 'ò' => 'o', 'ỏ' => 'o', 'õ' => 'o', 'ọ' => 'o', 'ô' => 'o', 'ố' => 'o', 'ồ' => 'o', 'ổ' => 'o', 'ỗ' => 'o', 'ộ' => 'o', 'ơ' => 'o', 'ớ' => 'o', 'ờ' => 'o', 'ở' => 'o', 'ỡ' => 'o', 'ợ' => 'o', | |||
| 'Ú' => 'U', 'Ù' => 'U', 'Ủ' => 'U', 'Ũ' => 'U', 'Ụ' => 'U', 'Ư' => 'U', 'Ứ' => 'U', 'Ừ' => 'U', 'Ử' => 'U', 'Ữ' => 'U', 'Ự' => 'U', | |||
| 'ú' => 'u', 'ù' => 'u', 'ủ' => 'u', 'ũ' => 'u', 'ụ' => 'u', 'ư' => 'u', 'ứ' => 'u', 'ừ' => 'u', 'ử' => 'u', 'ữ' => 'u', 'ự' => 'u', | |||
| 'Ý' => 'Y', 'Ỳ' => 'Y', 'Ỷ' => 'Y', 'Ỹ' => 'Y', 'Ỵ' => 'Y', 'ý' => 'y', 'ỳ' => 'y', 'ỷ' => 'y', 'ỹ' => 'y', 'ỵ' => 'y', | |||
| 'Đ' => 'D', 'đ' => 'd' | |||
| ), | |||
| 'sr' => array ( /* Serbian */ | |||
| 'ђ' => 'dj', 'ј' => 'j', 'љ' => 'lj', 'њ' => 'nj', 'ћ' => 'c', 'џ' => 'dz', 'đ' => 'd', | |||
| 'Ђ' => 'Dj', 'Ј' => 'j', 'Љ' => 'Lj', 'Њ' => 'Nj', 'Ћ' => 'C', 'Џ' => 'Dz', 'Đ' => 'D' | |||
| ), | |||
| 'az' => array ( /* Azerbaijani */ | |||
| 'ç' => 'c', 'ə' => 'e', 'ğ' => 'g', 'ı' => 'i', 'ö' => 'o', 'ş' => 's', 'ü' => 'u', | |||
| 'Ç' => 'C', 'Ə' => 'E', 'Ğ' => 'G', 'İ' => 'I', 'Ö' => 'O', 'Ş' => 'S', 'Ü' => 'U' | |||
| ), | |||
| 'slo' => array ( /* Slovakian */ | |||
| 'DZ' => 'DZ', 'dz' => 'dz', 'DŽ' => 'DZ', 'dž' => 'dz', 'CH' => 'CH', 'Ĺ' => 'L', 'ĺ' => 'l', 'Ľ' => 'L', | |||
| 'ľ' => 'l', 'Ŕ' => 'R', 'ŕ' => 'r' | |||
| ), | |||
| 'cus' => array ( /* Custom */ | |||
| 'Ĉ' => 'C', 'ĉ' => 'c', 'Ċ' => 'C', 'ċ' => 'c', 'Ď' => 'D', 'ď' => 'd', 'Ĕ' => 'E', 'ĕ' => 'e', 'Ĝ' => 'G', 'ĝ' => 'g', | |||
| 'Ġ' => 'G', 'ġ' => 'g', 'Ĥ' => 'H', 'ĥ' => 'h', 'Ħ' => 'H', 'ħ' => 'h', 'Ĭ' => 'I', 'ĭ' => 'i', 'IJ' => 'J', 'ij' => 'j', | |||
| 'Ĵ' => 'J', 'ĵ' => 'j', 'Ŀ' => 'L', 'ŀ' => 'l', 'ʼn' => 'n', 'Ō' => 'O', 'ō' => 'o', 'Ŏ' => 'O', 'ŏ' => 'o', 'Œ' => 'OE', | |||
| 'œ' => 'oe', 'Ŗ' => 'R', 'ŗ' => 'r', 'Ŝ' => 'S', 'ŝ' => 's', 'Ŧ' => 'T', 'ŧ' => 't', 'Ŭ' => 'U', 'ŭ' => 'u', 'Ŵ' => 'W', | |||
| 'ŵ' => 'w', 'Ŷ' => 'Y', 'ŷ' => 'y', 'Ÿ' => 'Y', 'ſ' => 'S', 'Ƒ' => 'F', 'ƒ' => 'f', 'Ǎ' => 'A', 'ǎ' => 'a', 'Ǐ' => 'I', | |||
| 'ǐ' => 'i', 'Ǒ' => 'O', 'ǒ' => 'o', 'Ǔ' => 'U', 'ǔ' => 'u', 'Ǖ' => 'U', 'ǖ' => 'u', 'Ǘ' => 'U', 'ǘ' => 'u', 'Ǚ' => 'U', | |||
| 'ǚ' => 'u', 'Ǜ' => 'U', 'ǜ' => 'u', 'Ǻ' => 'A', 'ǻ' => 'a', 'Ǽ' => 'AE', 'ǽ' => 'ae', 'Ǿ' => 'O', 'ǿ' => 'o' | |||
| ) | |||
| ); | |||
| /** | |||
| * List of words to remove from URLs. | |||
| */ | |||
| public static $remove_list = array ( | |||
| 'a', 'an', 'as', 'at', 'before', 'but', 'by', 'for', 'from', | |||
| 'is', 'in', 'into', 'like', 'of', 'off', 'on', 'onto', 'per', | |||
| 'since', 'than', 'the', 'this', 'that', 'to', 'up', 'via', | |||
| 'with' | |||
| ); | |||
| /** | |||
| * The character map. | |||
| */ | |||
| private static $map = array (); | |||
| /** | |||
| * The character list as a string. | |||
| */ | |||
| private static $chars = ''; | |||
| /** | |||
| * The character list as a regular expression. | |||
| */ | |||
| private static $regex = ''; | |||
| /** | |||
| * The current language | |||
| */ | |||
| private static $language = ''; | |||
| /** | |||
| * Initializes the character map. | |||
| */ | |||
| private static function init ($language = "") { | |||
| if (count (self::$map) > 0 && (($language == "") || ($language == self::$language))) { | |||
| return; | |||
| } | |||
| /* Is a specific map associated with $language ? */ | |||
| if (isset(self::$maps[$language]) && is_array(self::$maps[$language])) { | |||
| /* Move this map to end. This means it will have priority over others */ | |||
| $m = self::$maps[$language]; | |||
| unset(self::$maps[$language]); | |||
| self::$maps[$language] = $m; | |||
| } | |||
| /* Reset static vars */ | |||
| self::$language = $language; | |||
| self::$map = array(); | |||
| self::$chars = ''; | |||
| foreach (self::$maps as $map) { | |||
| foreach ($map as $orig => $conv) { | |||
| self::$map[$orig] = $conv; | |||
| self::$chars .= $orig; | |||
| } | |||
| } | |||
| self::$regex = '/[' . self::$chars . ']/u'; | |||
| } | |||
| /** | |||
| * Add new characters to the list. `$map` should be a hash. | |||
| */ | |||
| public static function add_chars ($map) { | |||
| if (! is_array ($map)) { | |||
| throw new LogicException ('$map must be an associative array.'); | |||
| } | |||
| self::$maps[] = $map; | |||
| self::$map = array (); | |||
| self::$chars = ''; | |||
| } | |||
| /** | |||
| * Append words to the remove list. Accepts either single words | |||
| * or an array of words. | |||
| */ | |||
| public static function remove_words ($words) { | |||
| $words = is_array ($words) ? $words : array ($words); | |||
| self::$remove_list = array_merge (self::$remove_list, $words); | |||
| } | |||
| /** | |||
| * Transliterates characters to their ASCII equivalents. | |||
| * $language specifies a priority for a specific language. | |||
| * The latter is useful if languages have different rules for the same character. | |||
| */ | |||
| public static function downcode ($text, $language = "") { | |||
| self::init ($language); | |||
| if (preg_match_all (self::$regex, $text, $matches)) { | |||
| for ($i = 0; $i < count ($matches[0]); $i++) { | |||
| $char = $matches[0][$i]; | |||
| if (isset (self::$map[$char])) { | |||
| $text = str_replace ($char, self::$map[$char], $text); | |||
| } | |||
| } | |||
| } | |||
| return $text; | |||
| } | |||
| /** | |||
| * Filters a string, e.g., "Petty theft" to "petty-theft" | |||
| */ | |||
| public static function filter ($text, $length = 60, $language = "", $file_name = false, $use_remove_list = true) { | |||
| $text = self::downcode ($text,$language); | |||
| if ($use_remove_list) { | |||
| // remove all these words from the string before urlifying | |||
| $text = preg_replace ('/\b(' . join ('|', self::$remove_list) . ')\b/i', '', $text); | |||
| } | |||
| // if downcode doesn't hit, the char will be stripped here | |||
| $remove_pattern = ($file_name) ? '/[^_\-.\-a-zA-Z0-9\s]/u' : '/[^\s_\-a-zA-Z0-9]/u'; | |||
| $text = preg_replace ($remove_pattern, '', $text); // remove unneeded chars | |||
| $text = str_replace ('_', ' ', $text); // treat underscores as spaces | |||
| $text = preg_replace ('/^\s+|\s+$/u', '', $text); // trim leading/trailing spaces | |||
| $text = preg_replace ('/[-\s]+/u', '-', $text); // convert spaces to hyphens | |||
| $text = strtolower ($text); // convert to lowercase | |||
| return trim (substr ($text, 0, $length), '-'); // trim to first $length chars | |||
| } | |||
| /** | |||
| * Alias of `URLify::downcode()`. | |||
| */ | |||
| public static function transliterate ($text) { | |||
| return self::downcode ($text); | |||
| } | |||
| } | |||
| @ -0,0 +1,26 @@ | |||
| { | |||
| "name": "jbroadway/urlify", | |||
| "type": "library", | |||
| "description": "PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.", | |||
| "keywords": ["urlify","transliterate","translit","transliteration","url","encode","slug","link","iconv"], | |||
| "homepage": "https://github.com/jbroadway/urlify", | |||
| "license": "BSD", | |||
| "authors": [ | |||
| { | |||
| "name": "Johnny Broadway", | |||
| "email": "johnny@johnnybroadway.com", | |||
| "homepage": "http://www.johnnybroadway.com/" | |||
| } | |||
| ], | |||
| "require": { | |||
| "php": ">=5.3.0" | |||
| }, | |||
| "autoload": { | |||
| "psr-0": { "URLify": "" } | |||
| }, | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "1.0-dev" | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,8 @@ | |||
| <phpunit bootstrap="tests/bootstrap.php"> | |||
| <testsuite name="URLify Test Suite"> | |||
| <directory>tests</directory> | |||
| </testsuite> | |||
| <logging> | |||
| <log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/> | |||
| </logging> | |||
| </phpunit> | |||
| @ -0,0 +1,20 @@ | |||
| <?php | |||
| //Downcode the provided argument or stdin if the argument was not present | |||
| require_once dirname (__DIR__) . '/URLify.php'; | |||
| //Print usage and exit if arguments are invalid | |||
| if($argc < 1 || $argc > 2) { | |||
| die ("Usage (argument): php " . basename(__FILE__) . " \"<text to downcode>\"\nUsage (pipe): <Arbitrary command> | php " . basename(__FILE__) . "\n"); | |||
| } | |||
| //Process the provided argument | |||
| if($argc === 2) { | |||
| $s = $argv[1]; | |||
| //Or read from stdin if the argument wasn't present | |||
| } else { | |||
| $piped = true; | |||
| $s = file_get_contents("php://stdin"); | |||
| } | |||
| echo URLify::downcode ($s) . ($piped ? "\n" : ""); | |||
| @ -0,0 +1,20 @@ | |||
| <?php | |||
| //Filter the provided argument or stdin if the argument was not present | |||
| require_once dirname (__DIR__) . '/URLify.php'; | |||
| //Print usage and exit if arguments are invalid | |||
| if($argc < 1 || $argc > 2) { | |||
| die ("Usage (argument): php " . basename(__FILE__) . " \"<text to filter>\"\nUsage (pipe): <Arbitrary command> | php " . basename(__FILE__) . "\n"); | |||
| } | |||
| //Process the provided argument | |||
| if($argc === 2) { | |||
| $s = $argv[1]; | |||
| //Or read from stdin if the argument wasn't present | |||
| } else { | |||
| $piped = true; | |||
| $s = file_get_contents("php://stdin"); | |||
| } | |||
| echo URLify::filter ($s) . ($piped ? "\n" : ""); | |||
| @ -0,0 +1,20 @@ | |||
| <?php | |||
| //Transliterate the provided argument or stdin if the argument was not present | |||
| require_once dirname (__DIR__) . '/URLify.php'; | |||
| //Print usage and exit if arguments are invalid | |||
| if($argc < 1 || $argc > 2) { | |||
| die ("Usage (argument): php " . basename(__FILE__) . " \"<text to transliterate>\"\nUsage (pipe): <Arbitrary command> | php " . basename(__FILE__) . "\n"); | |||
| } | |||
| //Process the provided argument | |||
| if($argc === 2) { | |||
| $s = $argv[1]; | |||
| //Or read from stdin if the argument wasn't present | |||
| } else { | |||
| $piped = true; | |||
| $s = file_get_contents("php://stdin"); | |||
| } | |||
| echo URLify::transliterate($s) . ($piped ? "\n" : ""); | |||
| @ -0,0 +1,54 @@ | |||
| <?php | |||
| class URLifyTest extends PHPUnit_Framework_TestCase { | |||
| function test_downcode () { | |||
| $this->assertEquals (' J\'etudie le francais ', URLify::downcode (' J\'étudie le français ')); | |||
| $this->assertEquals ('Lo siento, no hablo espanol.', URLify::downcode ('Lo siento, no hablo español.')); | |||
| $this->assertEquals ('F3PWS', URLify::downcode ('ΦΞΠΏΣ')); | |||
| $this->assertEquals ('foo-bar', URLify::filter ('_foo_bar_')); | |||
| } | |||
| function test_filter () { | |||
| $this->assertEquals ('jetudie-le-francais', URLify::filter (' J\'étudie le français ')); | |||
| $this->assertEquals ('lo-siento-no-hablo-espanol', URLify::filter ('Lo siento, no hablo español.')); | |||
| $this->assertEquals ('f3pws', URLify::filter ('ΦΞΠΏΣ')); | |||
| $this->assertEquals ('', URLify::filter('大般若經')); | |||
| $this->assertEquals ('test-.txt', URLify::filter('test-大般若經.txt', 60, "", $file_name = true)); | |||
| $this->assertEquals ('ykrhy-ltoytr', URLify::filter('ياكرهي لتويتر')); | |||
| $this->assertEquals ('foto.jpg', URLify::filter ('фото.jpg', 60, "", $file_name = true)); | |||
| // priorization of language-specific maps | |||
| $this->assertEquals ('aouaou', URLify::filter ('ÄÖÜäöü',60,"tr")); | |||
| $this->assertEquals ('aeoeueaeoeue', URLify::filter ('ÄÖÜäöü',60,"de")); | |||
| $this->assertEquals ('bobby-mcferrin-dont-worry-be-happy', URLify::filter ("Bobby McFerrin — Don't worry be happy",600,"en")); | |||
| // test stripping and conversion of UTF-8 spaces | |||
| $this->assertEquals ('test-mahito-mukai', URLify::filter('向井 真人test (Mahito Mukai)')); | |||
| } | |||
| function test_add_chars () { | |||
| $this->assertEquals ('¿ ® ¼ ¼ ¾ ¶', URLify::downcode ('¿ ® ¼ ¼ ¾ ¶')); | |||
| URLify::add_chars (array ( | |||
| '¿' => '?', '®' => '(r)', '¼' => '1/4', | |||
| '¼' => '1/2', '¾' => '3/4', '¶' => 'P' | |||
| )); | |||
| $this->assertEquals ('? (r) 1/2 1/2 3/4 P', URLify::downcode ('¿ ® ¼ ¼ ¾ ¶')); | |||
| } | |||
| function test_remove_words () { | |||
| $this->assertEquals ('foo-bar', URLify::filter ('foo bar')); | |||
| URLify::remove_words (array ('foo', 'bar')); | |||
| $this->assertEquals ('', URLify::filter ('foo bar')); | |||
| } | |||
| function test_many_rounds_with_unknown_language_code () { | |||
| for ($i = 0; $i < 1000; $i++) { | |||
| URLify::downcode ('Lo siento, no hablo español.',-1); | |||
| } | |||
| } | |||
| function test_remove_words_disable () { | |||
| URLify::remove_words (array ('foo', 'bar')); | |||
| $this->assertEquals ('foo-bar', URLify::filter ('foo bar', 60, '', false, false)); | |||
| } | |||
| } | |||
| ?> | |||
| @ -0,0 +1,9 @@ | |||
| <?php | |||
| set_error_handler(function () { | |||
| echo file_get_contents(dirname(__DIR__).'/INSTALL'); | |||
| exit(1); | |||
| }, E_ALL); | |||
| require_once dirname(__DIR__) . '/vendor/autoload.php'; | |||
| restore_error_handler(); | |||
| @ -0,0 +1,12 @@ | |||
| Font license info | |||
| ## Font Awesome | |||
| Copyright (C) 2016 by Dave Gandy | |||
| Author: Dave Gandy | |||
| License: SIL () | |||
| Homepage: http://fortawesome.github.com/Font-Awesome/ | |||
| @ -0,0 +1,75 @@ | |||
| This webfont is generated by http://fontello.com open source project. | |||
| ================================================================================ | |||
| Please, note, that you should obey original font licenses, used to make this | |||
| webfont pack. Details available in LICENSE.txt file. | |||
| - Usually, it's enough to publish content of LICENSE.txt file somewhere on your | |||
| site in "About" section. | |||
| - If your project is open-source, usually, it will be ok to make LICENSE.txt | |||
| file publicly available in your repository. | |||
| - Fonts, used in Fontello, don't require a clickable link on your site. | |||
| But any kind of additional authors crediting is welcome. | |||
| ================================================================================ | |||
| Comments on archive content | |||
| --------------------------- | |||
| - /font/* - fonts in different formats | |||
| - /css/* - different kinds of css, for all situations. Should be ok with | |||
| twitter bootstrap. Also, you can skip <i> style and assign icon classes | |||
| directly to text elements, if you don't mind about IE7. | |||
| - demo.html - demo file, to show your webfont content | |||
| - LICENSE.txt - license info about source fonts, used to build your one. | |||
| - config.json - keeps your settings. You can import it back into fontello | |||
| anytime, to continue your work | |||
| Why so many CSS files ? | |||
| ----------------------- | |||
| Because we like to fit all your needs :) | |||
| - basic file, <your_font_name>.css - is usually enough, it contains @font-face | |||
| and character code definitions | |||
| - *-ie7.css - if you need IE7 support, but still don't wish to put char codes | |||
| directly into html | |||
| - *-codes.css and *-ie7-codes.css - if you like to use your own @font-face | |||
| rules, but still wish to benefit from css generation. That can be very | |||
| convenient for automated asset build systems. When you need to update font - | |||
| no need to manually edit files, just override old version with archive | |||
| content. See fontello source code for examples. | |||
| - *-embedded.css - basic css file, but with embedded WOFF font, to avoid | |||
| CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain. | |||
| We strongly recommend to resolve this issue by `Access-Control-Allow-Origin` | |||
| server headers. But if you ok with dirty hack - this file is for you. Note, | |||
| that data url moved to separate @font-face to avoid problems with <IE9, when | |||
| string is too long. | |||
| - animate.css - use it to get ideas about spinner rotation animation. | |||
| Attention for server setup | |||
| -------------------------- | |||
| You MUST setup server to reply with proper `mime-types` for font files - | |||
| otherwise some browsers will fail to show fonts. | |||
| Usually, `apache` already has necessary settings, but `nginx` and other | |||
| webservers should be tuned. Here is list of mime types for our file extensions: | |||
| - `application/vnd.ms-fontobject` - eot | |||
| - `application/x-font-woff` - woff | |||
| - `application/x-font-ttf` - ttf | |||
| - `image/svg+xml` - svg | |||
| @ -0,0 +1,130 @@ | |||
| { | |||
| "name": "", | |||
| "css_prefix_text": "icon-", | |||
| "css_use_suffix": false, | |||
| "hinting": true, | |||
| "units_per_em": 1000, | |||
| "ascent": 850, | |||
| "glyphs": [ | |||
| { | |||
| "uid": "381da2c2f7fd51f8de877c044d7f439d", | |||
| "css": "picture", | |||
| "code": 59392, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "0ddd3e8201ccc7d41f7b7c9d27eca6c1", | |||
| "css": "link", | |||
| "code": 59394, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "7034e4d22866af82bef811f52fb1ba46", | |||
| "css": "code", | |||
| "code": 61729, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "ab95e1351ebaec5850101097cbf7097f", | |||
| "css": "quote-left", | |||
| "code": 61709, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "bc71f4c6e53394d5ba46b063040014f1", | |||
| "css": "cw", | |||
| "code": 59395, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "f9c3205df26e7778abac86183aefdc99", | |||
| "css": "ccw", | |||
| "code": 59396, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "f6766a8b042c2453a4e153af03294383", | |||
| "css": "list-numbered", | |||
| "code": 61643, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "a2a74f5e7b7d9ba054897d8c795a326a", | |||
| "css": "list-bullet", | |||
| "code": 61642, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "02cca871bb69da75e8ee286b7055832c", | |||
| "css": "bold", | |||
| "code": 59398, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "a8cb1c217f02b073db3670c061cc54d2", | |||
| "css": "italic", | |||
| "code": 59399, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "861ab06e455e2de3232ebef67d60d708", | |||
| "css": "minus", | |||
| "code": 59393, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "0c708edd8fae2376b3370aa56d40cf9e", | |||
| "css": "header", | |||
| "code": 61916, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "9dd9e835aebe1060ba7190ad2b2ed951", | |||
| "css": "search", | |||
| "code": 59397, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "0f99ab40ab0b4d64a74f2d0deeb03e42", | |||
| "css": "videocam", | |||
| "code": 59400, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "9ea0a737ccc45d6c510dcbae56058849", | |||
| "css": "music", | |||
| "code": 59401, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "bf882b30900da12fca090d9796bc3030", | |||
| "css": "mail", | |||
| "code": 59402, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "dc3f1d5b1d006f7f7b3b6295eccab9da", | |||
| "css": "camera", | |||
| "code": 59403, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "41087bc74d4b20b55059c60a33bf4008", | |||
| "css": "edit", | |||
| "code": 59404, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "5408be43f7c42bccee419c6be53fdef5", | |||
| "css": "doc-text", | |||
| "code": 61686, | |||
| "src": "fontawesome" | |||
| }, | |||
| { | |||
| "uid": "31951fbb9820ed0690f675b3d495c8da", | |||
| "css": "chat-empty", | |||
| "code": 61670, | |||
| "src": "fontawesome" | |||
| } | |||
| ] | |||
| } | |||
| @ -0,0 +1,85 @@ | |||
| /* | |||
| Animation example, for spinners | |||
| */ | |||
| .animate-spin { | |||
| -moz-animation: spin 2s infinite linear; | |||
| -o-animation: spin 2s infinite linear; | |||
| -webkit-animation: spin 2s infinite linear; | |||
| animation: spin 2s infinite linear; | |||
| display: inline-block; | |||
| } | |||
| @-moz-keyframes spin { | |||
| 0% { | |||
| -moz-transform: rotate(0deg); | |||
| -o-transform: rotate(0deg); | |||
| -webkit-transform: rotate(0deg); | |||
| transform: rotate(0deg); | |||
| } | |||
| 100% { | |||
| -moz-transform: rotate(359deg); | |||
| -o-transform: rotate(359deg); | |||
| -webkit-transform: rotate(359deg); | |||
| transform: rotate(359deg); | |||
| } | |||
| } | |||
| @-webkit-keyframes spin { | |||
| 0% { | |||
| -moz-transform: rotate(0deg); | |||
| -o-transform: rotate(0deg); | |||
| -webkit-transform: rotate(0deg); | |||
| transform: rotate(0deg); | |||
| } | |||
| 100% { | |||
| -moz-transform: rotate(359deg); | |||
| -o-transform: rotate(359deg); | |||
| -webkit-transform: rotate(359deg); | |||
| transform: rotate(359deg); | |||
| } | |||
| } | |||
| @-o-keyframes spin { | |||
| 0% { | |||
| -moz-transform: rotate(0deg); | |||
| -o-transform: rotate(0deg); | |||
| -webkit-transform: rotate(0deg); | |||
| transform: rotate(0deg); | |||
| } | |||
| 100% { | |||
| -moz-transform: rotate(359deg); | |||
| -o-transform: rotate(359deg); | |||
| -webkit-transform: rotate(359deg); | |||
| transform: rotate(359deg); | |||
| } | |||
| } | |||
| @-ms-keyframes spin { | |||
| 0% { | |||
| -moz-transform: rotate(0deg); | |||
| -o-transform: rotate(0deg); | |||
| -webkit-transform: rotate(0deg); | |||
| transform: rotate(0deg); | |||
| } | |||
| 100% { | |||
| -moz-transform: rotate(359deg); | |||
| -o-transform: rotate(359deg); | |||
| -webkit-transform: rotate(359deg); | |||
| transform: rotate(359deg); | |||
| } | |||
| } | |||
| @keyframes spin { | |||
| 0% { | |||
| -moz-transform: rotate(0deg); | |||
| -o-transform: rotate(0deg); | |||
| -webkit-transform: rotate(0deg); | |||
| transform: rotate(0deg); | |||
| } | |||
| 100% { | |||
| -moz-transform: rotate(359deg); | |||
| -o-transform: rotate(359deg); | |||
| -webkit-transform: rotate(359deg); | |||
| transform: rotate(359deg); | |||
| } | |||
| } | |||
| @ -0,0 +1,21 @@ | |||
| .icon-picture:before { content: '\e800'; } /* '' */ | |||
| .icon-minus:before { content: '\e801'; } /* '' */ | |||
| .icon-link:before { content: '\e802'; } /* '' */ | |||
| .icon-cw:before { content: '\e803'; } /* '' */ | |||
| .icon-ccw:before { content: '\e804'; } /* '' */ | |||
| .icon-search:before { content: '\e805'; } /* '' */ | |||
| .icon-bold:before { content: '\e806'; } /* '' */ | |||
| .icon-italic:before { content: '\e807'; } /* '' */ | |||
| .icon-videocam:before { content: '\e808'; } /* '' */ | |||
| .icon-music:before { content: '\e809'; } /* '' */ | |||
| .icon-mail:before { content: '\e80a'; } /* '' */ | |||
| .icon-camera:before { content: '\e80b'; } /* '' */ | |||
| .icon-edit:before { content: '\e80c'; } /* '' */ | |||
| .icon-list-bullet:before { content: '\f0ca'; } /* '' */ | |||
| .icon-list-numbered:before { content: '\f0cb'; } /* '' */ | |||
| .icon-chat-empty:before { content: '\f0e6'; } /* '' */ | |||
| .icon-doc-text:before { content: '\f0f6'; } /* '' */ | |||
| .icon-quote-left:before { content: '\f10d'; } /* '' */ | |||
| .icon-code:before { content: '\f121'; } /* '' */ | |||
| .icon-header:before { content: '\f1dc'; } /* '' */ | |||
| @ -0,0 +1,21 @@ | |||
| .icon-picture { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-link { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-cw { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-ccw { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-search { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-bold { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-italic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-videocam { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-music { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-mail { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-camera { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-edit { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-list-bullet { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-list-numbered { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-chat-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-doc-text { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-quote-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-header { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| @ -0,0 +1,32 @@ | |||
| [class^="icon-"], [class*=" icon-"] { | |||
| font-family: 'fontello'; | |||
| font-style: normal; | |||
| font-weight: normal; | |||
| /* fix buttons height */ | |||
| line-height: 1em; | |||
| /* you can be more comfortable with increased icons size */ | |||
| /* font-size: 120%; */ | |||
| } | |||
| .icon-picture { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-link { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-cw { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-ccw { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-search { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-bold { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-italic { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-videocam { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-music { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-mail { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-camera { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-edit { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-list-bullet { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-list-numbered { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-chat-empty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-doc-text { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-quote-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| .icon-header { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } | |||
| @ -0,0 +1,77 @@ | |||
| @font-face { | |||
| font-family: 'fontello'; | |||
| src: url('../font/fontello.eot?26872188'); | |||
| src: url('../font/fontello.eot?26872188#iefix') format('embedded-opentype'), | |||
| url('../font/fontello.woff2?26872188') format('woff2'), | |||
| url('../font/fontello.woff?26872188') format('woff'), | |||
| url('../font/fontello.ttf?26872188') format('truetype'), | |||
| url('../font/fontello.svg?26872188#fontello') format('svg'); | |||
| font-weight: normal; | |||
| font-style: normal; | |||
| } | |||
| /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ | |||
| /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ | |||
| /* | |||
| @media screen and (-webkit-min-device-pixel-ratio:0) { | |||
| @font-face { | |||
| font-family: 'fontello'; | |||
| src: url('../font/fontello.svg?26872188#fontello') format('svg'); | |||
| } | |||
| } | |||
| */ | |||
| [class^="icon-"]:before, [class*=" icon-"]:before { | |||
| font-family: "fontello"; | |||
| font-style: normal; | |||
| font-weight: normal; | |||
| speak: none; | |||
| display: inline-block; | |||
| text-decoration: inherit; | |||
| width: 1em; | |||
| margin-right: .2em; | |||
| text-align: center; | |||
| /* opacity: .8; */ | |||
| /* For safety - reset parent styles, that can break glyph codes*/ | |||
| font-variant: normal; | |||
| text-transform: none; | |||
| /* fix buttons height, for twitter bootstrap */ | |||
| line-height: 1em; | |||
| /* Animation center compensation - margins should be symmetric */ | |||
| /* remove if not needed */ | |||
| margin-left: .2em; | |||
| /* you can be more comfortable with increased icons size */ | |||
| /* font-size: 120%; */ | |||
| /* Font smoothing. That was taken from TWBS */ | |||
| -webkit-font-smoothing: antialiased; | |||
| -moz-osx-font-smoothing: grayscale; | |||
| /* Uncomment for 3D effect */ | |||
| /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ | |||
| } | |||
| .icon-picture:before { content: '\e800'; } /* '' */ | |||
| .icon-minus:before { content: '\e801'; } /* '' */ | |||
| .icon-link:before { content: '\e802'; } /* '' */ | |||
| .icon-cw:before { content: '\e803'; } /* '' */ | |||
| .icon-ccw:before { content: '\e804'; } /* '' */ | |||
| .icon-search:before { content: '\e805'; } /* '' */ | |||
| .icon-bold:before { content: '\e806'; } /* '' */ | |||
| .icon-italic:before { content: '\e807'; } /* '' */ | |||
| .icon-videocam:before { content: '\e808'; } /* '' */ | |||
| .icon-music:before { content: '\e809'; } /* '' */ | |||
| .icon-mail:before { content: '\e80a'; } /* '' */ | |||
| .icon-camera:before { content: '\e80b'; } /* '' */ | |||
| .icon-edit:before { content: '\e80c'; } /* '' */ | |||
| .icon-list-bullet:before { content: '\f0ca'; } /* '' */ | |||
| .icon-list-numbered:before { content: '\f0cb'; } /* '' */ | |||
| .icon-chat-empty:before { content: '\f0e6'; } /* '' */ | |||
| .icon-doc-text:before { content: '\f0f6'; } /* '' */ | |||
| .icon-quote-left:before { content: '\f10d'; } /* '' */ | |||
| .icon-code:before { content: '\f121'; } /* '' */ | |||
| .icon-header:before { content: '\f1dc'; } /* '' */ | |||
| @ -0,0 +1,336 @@ | |||
| <!DOCTYPE html> | |||
| <html> | |||
| <head><!--[if lt IE 9]><script language="javascript" type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> | |||
| <meta charset="UTF-8"><style>/* | |||
| * Bootstrap v2.2.1 | |||
| * | |||
| * Copyright 2012 Twitter, Inc | |||
| * Licensed under the Apache License v2.0 | |||
| * http://www.apache.org/licenses/LICENSE-2.0 | |||
| * | |||
| * Designed and built with all the love in the world @twitter by @mdo and @fat. | |||
| */ | |||
| .clearfix { | |||
| *zoom: 1; | |||
| } | |||
| .clearfix:before, | |||
| .clearfix:after { | |||
| display: table; | |||
| content: ""; | |||
| line-height: 0; | |||
| } | |||
| .clearfix:after { | |||
| clear: both; | |||
| } | |||
| html { | |||
| font-size: 100%; | |||
| -webkit-text-size-adjust: 100%; | |||
| -ms-text-size-adjust: 100%; | |||
| } | |||
| a:focus { | |||
| outline: thin dotted #333; | |||
| outline: 5px auto -webkit-focus-ring-color; | |||
| outline-offset: -2px; | |||
| } | |||
| a:hover, | |||
| a:active { | |||
| outline: 0; | |||
| } | |||
| button, | |||
| input, | |||
| select, | |||
| textarea { | |||
| margin: 0; | |||
| font-size: 100%; | |||
| vertical-align: middle; | |||
| } | |||
| button, | |||
| input { | |||
| *overflow: visible; | |||
| line-height: normal; | |||
| } | |||
| button::-moz-focus-inner, | |||
| input::-moz-focus-inner { | |||
| padding: 0; | |||
| border: 0; | |||
| } | |||
| body { | |||
| margin: 0; | |||
| font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |||
| font-size: 14px; | |||
| line-height: 20px; | |||
| color: #333; | |||
| background-color: #fff; | |||
| } | |||
| a { | |||
| color: #08c; | |||
| text-decoration: none; | |||
| } | |||
| a:hover { | |||
| color: #005580; | |||
| text-decoration: underline; | |||
| } | |||
| .row { | |||
| margin-left: -20px; | |||
| *zoom: 1; | |||
| } | |||
| .row:before, | |||
| .row:after { | |||
| display: table; | |||
| content: ""; | |||
| line-height: 0; | |||
| } | |||
| .row:after { | |||
| clear: both; | |||
| } | |||
| [class*="span"] { | |||
| float: left; | |||
| min-height: 1px; | |||
| margin-left: 20px; | |||
| } | |||
| .container, | |||
| .navbar-static-top .container, | |||
| .navbar-fixed-top .container, | |||
| .navbar-fixed-bottom .container { | |||
| width: 940px; | |||
| } | |||
| .span12 { | |||
| width: 940px; | |||
| } | |||
| .span11 { | |||
| width: 860px; | |||
| } | |||
| .span10 { | |||
| width: 780px; | |||
| } | |||
| .span9 { | |||
| width: 700px; | |||
| } | |||
| .span8 { | |||
| width: 620px; | |||
| } | |||
| .span7 { | |||
| width: 540px; | |||
| } | |||
| .span6 { | |||
| width: 460px; | |||
| } | |||
| .span5 { | |||
| width: 380px; | |||
| } | |||
| .span4 { | |||
| width: 300px; | |||
| } | |||
| .span3 { | |||
| width: 220px; | |||
| } | |||
| .span2 { | |||
| width: 140px; | |||
| } | |||
| .span1 { | |||
| width: 60px; | |||
| } | |||
| [class*="span"].pull-right, | |||
| .row-fluid [class*="span"].pull-right { | |||
| float: right; | |||
| } | |||
| .container { | |||
| margin-right: auto; | |||
| margin-left: auto; | |||
| *zoom: 1; | |||
| } | |||
| .container:before, | |||
| .container:after { | |||
| display: table; | |||
| content: ""; | |||
| line-height: 0; | |||
| } | |||
| .container:after { | |||
| clear: both; | |||
| } | |||
| p { | |||
| margin: 0 0 10px; | |||
| } | |||
| .lead { | |||
| margin-bottom: 20px; | |||
| font-size: 21px; | |||
| font-weight: 200; | |||
| line-height: 30px; | |||
| } | |||
| small { | |||
| font-size: 85%; | |||
| } | |||
| h1 { | |||
| margin: 10px 0; | |||
| font-family: inherit; | |||
| font-weight: bold; | |||
| line-height: 20px; | |||
| color: inherit; | |||
| text-rendering: optimizelegibility; | |||
| } | |||
| h1 small { | |||
| font-weight: normal; | |||
| line-height: 1; | |||
| color: #999; | |||
| } | |||
| h1 { | |||
| line-height: 40px; | |||
| } | |||
| h1 { | |||
| font-size: 38.5px; | |||
| } | |||
| h1 small { | |||
| font-size: 24.5px; | |||
| } | |||
| body { | |||
| margin-top: 90px; | |||
| } | |||
| .header { | |||
| position: fixed; | |||
| top: 0; | |||
| left: 50%; | |||
| margin-left: -480px; | |||
| background-color: #fff; | |||
| border-bottom: 1px solid #ddd; | |||
| padding-top: 10px; | |||
| z-index: 10; | |||
| } | |||
| .footer { | |||
| color: #ddd; | |||
| font-size: 12px; | |||
| text-align: center; | |||
| margin-top: 20px; | |||
| } | |||
| .footer a { | |||
| color: #ccc; | |||
| text-decoration: underline; | |||
| } | |||
| .the-icons { | |||
| font-size: 14px; | |||
| line-height: 24px; | |||
| } | |||
| .switch { | |||
| position: absolute; | |||
| right: 0; | |||
| bottom: 10px; | |||
| color: #666; | |||
| } | |||
| .switch input { | |||
| margin-right: 0.3em; | |||
| } | |||
| .codesOn .i-name { | |||
| display: none; | |||
| } | |||
| .codesOn .i-code { | |||
| display: inline; | |||
| } | |||
| .i-code { | |||
| display: none; | |||
| } | |||
| @font-face { | |||
| font-family: 'fontello'; | |||
| src: url('./font/fontello.eot?410473'); | |||
| src: url('./font/fontello.eot?410473#iefix') format('embedded-opentype'), | |||
| url('./font/fontello.woff?410473') format('woff'), | |||
| url('./font/fontello.ttf?410473') format('truetype'), | |||
| url('./font/fontello.svg?410473#fontello') format('svg'); | |||
| font-weight: normal; | |||
| font-style: normal; | |||
| } | |||
| .demo-icon | |||
| { | |||
| font-family: "fontello"; | |||
| font-style: normal; | |||
| font-weight: normal; | |||
| speak: none; | |||
| display: inline-block; | |||
| text-decoration: inherit; | |||
| width: 1em; | |||
| margin-right: .2em; | |||
| text-align: center; | |||
| /* opacity: .8; */ | |||
| /* For safety - reset parent styles, that can break glyph codes*/ | |||
| font-variant: normal; | |||
| text-transform: none; | |||
| /* fix buttons height, for twitter bootstrap */ | |||
| line-height: 1em; | |||
| /* Animation center compensation - margins should be symmetric */ | |||
| /* remove if not needed */ | |||
| margin-left: .2em; | |||
| /* You can be more comfortable with increased icons size */ | |||
| /* font-size: 120%; */ | |||
| /* Font smoothing. That was taken from TWBS */ | |||
| -webkit-font-smoothing: antialiased; | |||
| -moz-osx-font-smoothing: grayscale; | |||
| /* Uncomment for 3D effect */ | |||
| /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ | |||
| } | |||
| </style> | |||
| <link rel="stylesheet" href="css/animation.css"><!--[if IE 7]><link rel="stylesheet" href="css/fontello-ie7.css"><![endif]--> | |||
| <script> | |||
| function toggleCodes(on) { | |||
| var obj = document.getElementById('icons'); | |||
| if (on) { | |||
| obj.className += ' codesOn'; | |||
| } else { | |||
| obj.className = obj.className.replace(' codesOn', ''); | |||
| } | |||
| } | |||
| </script> | |||
| </head> | |||
| <body> | |||
| <div class="container header"> | |||
| <h1> | |||
| fontello | |||
| <small>font demo</small> | |||
| </h1> | |||
| <label class="switch"> | |||
| <input type="checkbox" onclick="toggleCodes(this.checked)">show codes | |||
| </label> | |||
| </div> | |||
| <div id="icons" class="container"> | |||
| <div class="row"> | |||
| <div title="Code: 0xe800" class="the-icons span3"><i class="demo-icon icon-picture"></i> <span class="i-name">icon-picture</span><span class="i-code">0xe800</span></div> | |||
| <div title="Code: 0xe801" class="the-icons span3"><i class="demo-icon icon-minus"></i> <span class="i-name">icon-minus</span><span class="i-code">0xe801</span></div> | |||
| <div title="Code: 0xe802" class="the-icons span3"><i class="demo-icon icon-link"></i> <span class="i-name">icon-link</span><span class="i-code">0xe802</span></div> | |||
| <div title="Code: 0xe803" class="the-icons span3"><i class="demo-icon icon-cw"></i> <span class="i-name">icon-cw</span><span class="i-code">0xe803</span></div> | |||
| </div> | |||
| <div class="row"> | |||
| <div title="Code: 0xe804" class="the-icons span3"><i class="demo-icon icon-ccw"></i> <span class="i-name">icon-ccw</span><span class="i-code">0xe804</span></div> | |||
| <div title="Code: 0xe805" class="the-icons span3"><i class="demo-icon icon-search"></i> <span class="i-name">icon-search</span><span class="i-code">0xe805</span></div> | |||
| <div title="Code: 0xe806" class="the-icons span3"><i class="demo-icon icon-bold"></i> <span class="i-name">icon-bold</span><span class="i-code">0xe806</span></div> | |||
| <div title="Code: 0xe807" class="the-icons span3"><i class="demo-icon icon-italic"></i> <span class="i-name">icon-italic</span><span class="i-code">0xe807</span></div> | |||
| </div> | |||
| <div class="row"> | |||
| <div title="Code: 0xe808" class="the-icons span3"><i class="demo-icon icon-videocam"></i> <span class="i-name">icon-videocam</span><span class="i-code">0xe808</span></div> | |||
| <div title="Code: 0xe809" class="the-icons span3"><i class="demo-icon icon-music"></i> <span class="i-name">icon-music</span><span class="i-code">0xe809</span></div> | |||
| <div title="Code: 0xe80a" class="the-icons span3"><i class="demo-icon icon-mail"></i> <span class="i-name">icon-mail</span><span class="i-code">0xe80a</span></div> | |||
| <div title="Code: 0xe80b" class="the-icons span3"><i class="demo-icon icon-camera"></i> <span class="i-name">icon-camera</span><span class="i-code">0xe80b</span></div> | |||
| </div> | |||
| <div class="row"> | |||
| <div title="Code: 0xe80c" class="the-icons span3"><i class="demo-icon icon-edit"></i> <span class="i-name">icon-edit</span><span class="i-code">0xe80c</span></div> | |||
| <div title="Code: 0xf0ca" class="the-icons span3"><i class="demo-icon icon-list-bullet"></i> <span class="i-name">icon-list-bullet</span><span class="i-code">0xf0ca</span></div> | |||
| <div title="Code: 0xf0cb" class="the-icons span3"><i class="demo-icon icon-list-numbered"></i> <span class="i-name">icon-list-numbered</span><span class="i-code">0xf0cb</span></div> | |||
| <div title="Code: 0xf0e6" class="the-icons span3"><i class="demo-icon icon-chat-empty"></i> <span class="i-name">icon-chat-empty</span><span class="i-code">0xf0e6</span></div> | |||
| </div> | |||
| <div class="row"> | |||
| <div title="Code: 0xf0f6" class="the-icons span3"><i class="demo-icon icon-doc-text"></i> <span class="i-name">icon-doc-text</span><span class="i-code">0xf0f6</span></div> | |||
| <div title="Code: 0xf10d" class="the-icons span3"><i class="demo-icon icon-quote-left"></i> <span class="i-name">icon-quote-left</span><span class="i-code">0xf10d</span></div> | |||
| <div title="Code: 0xf121" class="the-icons span3"><i class="demo-icon icon-code"></i> <span class="i-name">icon-code</span><span class="i-code">0xf121</span></div> | |||
| <div title="Code: 0xf1dc" class="the-icons span3"><i class="demo-icon icon-header"></i> <span class="i-name">icon-header</span><span class="i-code">0xf1dc</span></div> | |||
| </div> | |||
| </div> | |||
| <div class="container footer">Generated by <a href="http://fontello.com">fontello.com</a></div> | |||
| </body> | |||
| </html> | |||
| @ -0,0 +1,50 @@ | |||
| <?xml version="1.0" standalone="no"?> | |||
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |||
| <svg xmlns="http://www.w3.org/2000/svg"> | |||
| <metadata>Copyright (C) 2017 by original authors @ fontello.com</metadata> | |||
| <defs> | |||
| <font id="fontello" horiz-adv-x="1000" > | |||
| <font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" /> | |||
| <missing-glyph horiz-adv-x="1000" /> | |||
| <glyph glyph-name="picture" unicode="" d="M357 529q0-45-31-76t-76-32-76 32-31 76 31 76 76 31 76-31 31-76z m572-215v-250h-786v107l178 179 90-89 285 285z m53 393h-893q-7 0-12-5t-6-13v-678q0-7 6-13t12-5h893q7 0 13 5t5 13v678q0 8-5 13t-13 5z m89-18v-678q0-37-26-63t-63-27h-893q-36 0-63 27t-26 63v678q0 37 26 63t63 27h893q37 0 63-27t26-63z" horiz-adv-x="1071.4" /> | |||
| <glyph glyph-name="minus" unicode="" d="M786 439v-107q0-22-16-38t-38-15h-678q-23 0-38 15t-16 38v107q0 23 16 38t38 16h678q23 0 38-16t16-38z" horiz-adv-x="785.7" /> | |||
| <glyph glyph-name="link" unicode="" d="M813 171q0 23-16 38l-116 116q-16 16-38 16-24 0-40-18 1-1 10-10t12-12 9-11 7-14 2-15q0-23-16-38t-38-16q-8 0-15 2t-14 7-11 9-12 12-10 10q-19-17-19-40 0-23 16-38l115-116q15-15 38-15 22 0 38 15l82 81q16 16 16 37z m-393 394q0 22-15 38l-115 115q-16 16-38 16-22 0-38-15l-82-82q-16-15-16-37 0-22 16-38l116-116q15-15 38-15 23 0 40 17-2 2-11 11t-12 12-8 10-7 14-2 16q0 22 15 38t38 15q9 0 16-2t14-7 11-8 12-12 10-11q18 17 18 41z m500-394q0-66-48-113l-82-81q-46-47-113-47-68 0-114 48l-115 115q-46 47-46 114 0 68 49 116l-49 49q-48-49-116-49-67 0-114 47l-116 116q-47 47-47 114t47 113l82 82q47 46 114 46 67 0 114-47l115-116q46-46 46-113 0-69-49-117l49-49q48 49 116 49 67 0 114-47l116-116q47-47 47-114z" horiz-adv-x="928.6" /> | |||
| <glyph glyph-name="cw" unicode="" d="M857 707v-250q0-14-10-25t-26-11h-250q-23 0-32 23-10 22 7 38l77 77q-82 77-194 77-58 0-111-23t-91-61-61-91-23-111 23-111 61-91 91-61 111-23q66 0 125 29t100 82q4 6 13 7 8 0 14-5l76-77q5-4 6-11t-5-13q-60-74-147-114t-182-41q-87 0-167 34t-136 92-92 137-34 166 34 166 92 137 136 92 167 34q82 0 158-31t137-88l72 72q17 18 39 8 22-9 22-33z" horiz-adv-x="857.1" /> | |||
| <glyph glyph-name="ccw" unicode="" d="M857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z" horiz-adv-x="857.1" /> | |||
| <glyph glyph-name="search" unicode="" d="M643 386q0 103-73 176t-177 74-177-74-73-176 73-177 177-73 177 73 73 177z m286-465q0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 84-84 125-31 153 31 152 84 126 125 84 153 31 153-31 125-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" /> | |||
| <glyph glyph-name="bold" unicode="" d="M310 1q41-18 78-18 210 0 210 187 0 64-23 101-15 24-34 41t-38 26-45 14-47 6-53 1q-40 0-56-6 0-29 0-88t-1-88q0-5 0-38t0-54 2-47 7-37z m-8 417q23-4 61-4 46 0 80 7t61 25 42 50 14 79q0 39-16 68t-45 46-60 24-69 8q-28 0-73-7 0-28 3-84t2-85q0-15 0-45t-1-44q0-26 1-38z m-302-497l1 53q9 2 48 9t59 15q4 7 7 15t4 19 4 18 1 21 0 19v36q0 548-12 572-2 5-12 8t-25 6-28 4-27 3-17 2l-2 46q55 1 190 6t208 6q13 0 38-1t38 0q39 0 76-7t72-24 60-39 41-59 16-76q0-29-9-54t-22-40-36-32-41-25-47-22q86-20 144-75t57-138q0-56-20-101t-52-72-77-48-91-27-98-8q-25 0-74 2t-74 1q-59 0-171-6t-129-7z" horiz-adv-x="785.7" /> | |||
| <glyph glyph-name="italic" unicode="" d="M0-78l10 48q12 4 34 9t40 11 33 13q16 19 23 56 1 4 35 162t63 303 29 165v14q-13 8-30 11t-39 4-32 3l10 58q19-1 67-4t84-4 67-1q27 0 55 1t68 4 54 4q-2-22-10-50-17-6-57-16t-60-19q-5-10-8-23t-5-23-4-25-4-24q-15-82-49-234t-43-198q-1-5-7-32t-11-51-9-46-4-32l1-10q9-3 103-18-2-24-9-55-6 0-18-1t-18-1q-16 0-49 6t-48 6q-77 1-115 1-28 0-79-5t-68-7z" horiz-adv-x="571.4" /> | |||
| <glyph glyph-name="videocam" unicode="" d="M1000 654v-608q0-23-22-32-7-3-14-3-15 0-25 10l-225 225v-92q0-67-47-114t-113-47h-393q-67 0-114 47t-47 114v392q0 67 47 114t114 47h393q66 0 113-47t47-114v-92l225 225q10 10 25 10 7 0 14-2 22-10 22-33z" horiz-adv-x="1000" /> | |||
| <glyph glyph-name="music" unicode="" d="M857 725v-625q0-28-19-50t-48-33-58-18-53-6-54 6-58 18-48 33-19 50 19 50 48 33 58 18 54 6q58 0 107-22v300l-429-132v-396q0-28-19-50t-48-33-58-18-53-6-54 6-58 18-48 33-19 50 19 50 48 34 58 17 54 6q58 0 107-21v539q0 17 10 32t28 20l464 142q7 3 16 3 22 0 38-16t15-38z" horiz-adv-x="857.1" /> | |||
| <glyph glyph-name="mail" unicode="" d="M929 11v428q-18-20-39-36-149-115-238-189-28-24-46-37t-48-28-57-13h-2q-26 0-57 13t-48 28-46 37q-88 74-238 189-21 16-39 36v-428q0-7 6-13t12-5h822q7 0 12 5t6 13z m0 586v14t-1 7-1 7-3 5-5 4-8 2h-822q-7 0-12-6t-6-12q0-94 83-159 107-84 223-176 4-3 20-17t25-21 25-17 28-16 24-5h2q11 0 24 5t28 16 25 17 25 21 20 17q116 92 224 176 30 24 56 65t26 73z m71 21v-607q0-37-26-63t-63-27h-822q-36 0-63 27t-26 63v607q0 37 26 63t63 26h822q37 0 63-26t26-63z" horiz-adv-x="1000" /> | |||
| <glyph glyph-name="camera" unicode="" d="M536 475q66 0 113-47t47-114-47-113-113-47-114 47-47 113 47 114 114 47z m393 232q59 0 101-42t41-101v-500q0-59-41-101t-101-42h-786q-59 0-101 42t-42 101v500q0 59 42 101t101 42h125l28 76q11 27 39 47t58 20h286q29 0 57-20t39-47l29-76h125z m-393-643q103 0 176 74t74 176-74 177-176 73-177-73-73-177 73-176 177-74z" horiz-adv-x="1071.4" /> | |||
| <glyph glyph-name="edit" unicode="" d="M496 189l64 65-85 85-64-65v-31h53v-54h32z m245 402q-9 9-18 0l-196-196q-9-9 0-18t18 0l196 196q9 9 0 18z m45-331v-106q0-67-47-114t-114-47h-464q-67 0-114 47t-47 114v464q0 66 47 113t114 48h464q35 0 65-14 9-4 10-13 2-10-5-16l-27-28q-8-8-18-4-13 3-25 3h-464q-37 0-63-26t-27-63v-464q0-37 27-63t63-27h464q37 0 63 27t26 63v70q0 7 5 12l36 36q8 8 20 4t11-16z m-54 411l161-160-375-375h-161v160z m248-73l-51-52-161 161 51 52q16 15 38 15t38-15l85-85q16-16 16-38t-16-38z" horiz-adv-x="1000" /> | |||
| <glyph glyph-name="list-bullet" unicode="" d="M214 64q0-44-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m0 286q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232v-107q0-7-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 7 5 12t13 6h678q7 0 13-6t5-12z m-786 518q0-45-31-76t-76-31-76 31-31 76 31 76 76 31 76-31 31-76z m786-232v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" /> | |||
| <glyph glyph-name="list-numbered" unicode="" d="M213-54q0-45-31-70t-75-26q-60 0-96 37l31 49q28-25 60-25 16 0 28 8t12 24q0 35-59 31l-14 31q4 6 18 24t24 31 20 21v1q-9 0-27-1t-27 0v-30h-59v85h186v-49l-53-65q28-6 45-27t17-49z m1 350v-89h-202q-4 20-4 30 0 29 14 52t31 38 37 27 31 24 14 25q0 14-9 22t-22 7q-25 0-45-32l-47 33q13 28 40 44t59 16q40 0 68-23t28-63q0-28-19-51t-42-36-42-28-20-30h71v34h59z m786-178v-107q0-7-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 8 5 13t13 5h678q7 0 13-6t5-12z m-786 502v-56h-187v56h60q0 22 0 67t1 68v7h-1q-5-10-28-30l-40 42 76 71h59v-225h60z m786-216v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" /> | |||
| <glyph glyph-name="chat-empty" unicode="" d="M393 636q-85 0-160-29t-118-79-44-107q0-45 30-88t83-73l54-32-19-46q19 11 34 21l25 18 30-6q43-8 85-8 85 0 160 29t118 79 43 106-43 107-118 79-160 29z m0 71q106 0 197-38t143-104 53-144-53-143-143-104-197-38q-48 0-98 9-70-49-155-72-21-5-48-9h-2q-6 0-12 5t-6 12q-1 1-1 3t1 4 1 3l1 3t2 3 2 3 3 3 2 2q3 3 13 14t15 16 12 17 14 21 11 25q-69 40-108 98t-40 125q0 78 53 144t143 104 197 38z m459-652q5-14 11-25t14-21 13-16 14-17 13-14q0 0 2-2t3-3 2-3 2-3l1-3t1-3 1-4-1-3q-2-8-7-13t-12-4q-28 4-48 9-86 23-156 72-50-9-98-9-151 0-263 74 32-3 49-3 90 0 172 25t148 72q69 52 107 119t37 141q0 43-13 85 72-39 114-99t42-128q0-67-40-126t-108-98z" horiz-adv-x="1000" /> | |||
| <glyph glyph-name="doc-text" unicode="" d="M819 638q16-16 27-42t11-50v-642q0-23-15-38t-38-16h-750q-23 0-38 16t-16 38v892q0 23 16 38t38 16h500q22 0 49-11t42-27z m-248 136v-210h210q-5 17-12 23l-175 175q-6 7-23 12z m215-853v572h-232q-23 0-38 16t-16 37v233h-429v-858h715z m-572 483q0 7 5 12t13 5h393q8 0 13-5t5-12v-36q0-8-5-13t-13-5h-393q-8 0-13 5t-5 13v36z m411-125q8 0 13-5t5-13v-36q0-8-5-13t-13-5h-393q-8 0-13 5t-5 13v36q0 8 5 13t13 5h393z m0-143q8 0 13-5t5-13v-36q0-8-5-13t-13-5h-393q-8 0-13 5t-5 13v36q0 8 5 13t13 5h393z" horiz-adv-x="857.1" /> | |||
| <glyph glyph-name="quote-left" unicode="" d="M429 314v-214q0-45-32-76t-76-31h-214q-44 0-76 31t-31 76v393q0 58 23 111t61 91 91 61 111 23h35q15 0 26-11t10-25v-72q0-14-10-25t-26-10h-35q-59 0-101-42t-42-101v-18q0-22 16-38t37-16h125q45 0 76-31t32-76z m500 0v-214q0-45-32-76t-76-31h-214q-44 0-76 31t-31 76v393q0 58 23 111t61 91 91 61 111 23h35q15 0 26-11t10-25v-72q0-14-10-25t-26-10h-35q-59 0-101-42t-42-101v-18q0-22 16-38t37-16h125q45 0 76-31t32-76z" horiz-adv-x="928.6" /> | |||
| <glyph glyph-name="code" unicode="" d="M344 69l-28-28q-5-5-12-5t-13 5l-260 261q-6 5-6 12t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13t-6-12l-219-220 219-219q6-6 6-13t-6-13z m330 596l-208-721q-2-7-9-11t-13-1l-34 9q-8 3-11 9t-2 14l209 720q2 8 8 11t13 2l35-10q7-2 11-9t1-13z m367-363l-260-261q-6-5-13-5t-13 5l-28 28q-5 6-5 13t5 13l219 219-219 220q-5 5-5 12t5 13l28 28q6 6 13 6t13-6l260-260q5-5 5-13t-5-12z" horiz-adv-x="1071.4" /> | |||
| <glyph glyph-name="header" unicode="" d="M939-79q-25 0-74 2t-75 2q-24 0-73-2t-74-2q-13 0-21 12t-7 25q0 18 9 26t22 9 29 4 25 9q18 11 18 78l0 218q0 12-1 17-7 3-28 3h-376q-22 0-29-3 0-5 0-17l-1-207q0-79 21-91 9-6 26-8t32-2 25-8 11-26q0-14-6-26t-21-13q-26 0-78 2t-77 2q-24 0-71-2t-71-2q-13 0-20 12t-7 25q0 17 9 25t20 10 26 4 24 9q18 13 18 80l-1 31v454q0 2 1 15t0 20-1 21-2 24-4 20-6 18-9 10q-8 5-25 7t-29 1-23 7-10 26q0 14 6 26t20 13q26 0 78-2t77-2q23 0 71 2t70 2q14 0 21-13t7-26q0-17-9-25t-22-8-27-2-24-7q-20-12-20-90l1-178q0-12 0-18 7-2 22-2h390q14 0 21 2 1 6 1 18l0 178q0 78-19 90-10 6-33 7t-37 7-14 28q0 14 7 26t21 13q24 0 74-2t73-2q24 0 72 2t72 2q14 0 21-13t7-26q0-17-10-25t-22-8-29-2-24-7q-20-13-20-90l1-526q0-66 19-78 9-6 25-8t30-2 23-9 10-25q0-14-6-26t-20-13z" horiz-adv-x="1000" /> | |||
| </font> | |||
| </defs> | |||
| </svg> | |||
| @ -0,0 +1,39 @@ | |||
| <?php | |||
| namespace Kanti; | |||
| class CacheOneFile | |||
| { | |||
| protected $fileName = ""; | |||
| protected $holdTime = 43200; //12h | |||
| public function __construct($fileName, $holdTime = 43200) | |||
| { | |||
| $this->fileName = $fileName; | |||
| $this->holdTime = $holdTime; | |||
| } | |||
| public function is() | |||
| { | |||
| if (! HelperClass::fileExists($this->fileName)) { | |||
| return false; | |||
| } | |||
| if (filemtime($this->fileName) < ( time() - $this->holdTime )) { | |||
| unlink($this->fileName); | |||
| return false; | |||
| } | |||
| return true; | |||
| } | |||
| public function get() | |||
| { | |||
| return file_get_contents($this->fileName); | |||
| } | |||
| public function set($content) | |||
| { | |||
| file_put_contents($this->fileName, $content); | |||
| } | |||
| } | |||
| @ -0,0 +1,12 @@ | |||
| <?php | |||
| namespace Kanti; | |||
| class HelperClass{ | |||
| static public function fileExists($file){ | |||
| return file_exists(dirname($_SERVER["SCRIPT_FILENAME"]) . "/" . $file); | |||
| } | |||
| static public function isInPhar() { | |||
| return substr(__FILE__,0,7) === "phar://"; | |||
| } | |||
| } | |||
| @ -0,0 +1,293 @@ | |||
| <?php | |||
| namespace Kanti; | |||
| class HubUpdater | |||
| { | |||
| protected $options = array( | |||
| "cacheFile" => "downloadInfo.json", | |||
| "holdTime" => 43200, | |||
| "versionFile" => "installedVersion.json", | |||
| "zipFile" => "tmpZipFile.zip", | |||
| "updateignore" => ".updateignore", | |||
| "name" => "", | |||
| "branch" => "master", | |||
| "cache" => "cache/", | |||
| "save" => "", | |||
| "prerelease" => false, | |||
| "exceptions" => false, | |||
| ); | |||
| protected $allRelease = array(); | |||
| protected $streamContext = null; | |||
| public function __construct($option) | |||
| { | |||
| //options | |||
| if (is_array($option)) { | |||
| if (!isset($option['name'])) { | |||
| throw new \Exception('No Name in Option Set'); | |||
| } | |||
| $this->options = $option + $this->options; | |||
| } elseif (is_string($option)) { | |||
| $this->options['name'] = $option; | |||
| } else { | |||
| throw new \Exception('No Option Set'); | |||
| } | |||
| $this->options['save'] = rtrim($this->options['save'], '/'); | |||
| if ($this->options['save'] !== '') { | |||
| $this->options['save'] .= '/'; | |||
| if (!HelperClass::fileExists($this->options['save'])) { | |||
| mkdir($this->options['save']); | |||
| } | |||
| } | |||
| $this->options['cache'] = $this->options['save'] . rtrim($this->options['cache'], '/'); | |||
| if ($this->options['cache'] !== '') { | |||
| $this->options['cache'] .= '/'; | |||
| if (!HelperClass::fileExists($this->options['cache'])) { | |||
| mkdir($this->options['cache']); | |||
| } | |||
| } | |||
| $caBundleDir = dirname(__FILE__); | |||
| if (HelperClass::isInPhar()) { | |||
| $caBundleDir = dirname($_SERVER["SCRIPT_FILENAME"]) . "/" . $this->options['cache']; | |||
| if (!HelperClass::fileExists($this->options['cache'] . "ca_bundle.crt")) { | |||
| copy(dirname(__FILE__) . "/ca_bundle.crt", $caBundleDir . "ca_bundle.crt"); | |||
| } | |||
| } | |||
| $this->cachedInfo = new CacheOneFile(dirname($_SERVER["SCRIPT_FILENAME"]) . "/" . $this->options['cache'] . $this->options['cacheFile'], $this->options['holdTime']); | |||
| $this->streamContext = stream_context_create( | |||
| array( | |||
| 'http' => array( | |||
| 'header' => "User-Agent: Awesome-Update-My-Self-" . $this->options['name'] . "\r\nAccept: application/vnd.github.v3+json\r\n", | |||
| ), | |||
| 'ssl' => array( | |||
| 'cafile' => $caBundleDir . '/ca_bundle.crt', | |||
| 'verify_peer' => true, | |||
| ), | |||
| ) | |||
| ); | |||
| $this->streamContext2 = stream_context_create( | |||
| array( | |||
| 'http' => array( | |||
| 'header' => "User-Agent: Awesome-Update-My-Self-" . $this->options['name'] . "\r\n", | |||
| ), | |||
| 'ssl' => array( | |||
| 'cafile' => $caBundleDir . '/ca_bundle.crt', | |||
| 'verify_peer' => true, | |||
| ), | |||
| ) | |||
| ); | |||
| $this->allRelease = $this->getRemoteInfos(); | |||
| } | |||
| protected function getRemoteInfos() | |||
| { | |||
| $path = "https://api.github.com/repos/" . $this->options['name'] . "/releases"; | |||
| if ($this->cachedInfo->is()) { | |||
| $fileContent = $this->cachedInfo->get(); | |||
| } else { | |||
| if (!in_array('https', stream_get_wrappers())) { | |||
| if ($this->options["exceptions"]) { | |||
| throw new \Exception("No HTTPS Wrapper Exception"); | |||
| } else { | |||
| return array(); | |||
| } | |||
| } | |||
| $fileContent = @file_get_contents($path, false, $this->streamContext); | |||
| if ($fileContent === false) { | |||
| if ($this->options["exceptions"]) { | |||
| throw new \Exception("No Internet Exception"); | |||
| } else { | |||
| return array(); | |||
| } | |||
| } | |||
| $json = json_decode($fileContent, true); | |||
| if (isset($json['message'])) { | |||
| if ($this->options["exceptions"]) { | |||
| throw new \Exception("API Exception[" . $json['message'] . "]"); | |||
| } else { | |||
| $json = array(); | |||
| } | |||
| } | |||
| if (defined("JSON_PRETTY_PRINT")) { | |||
| $fileContent = json_encode($json, JSON_PRETTY_PRINT); | |||
| } else { | |||
| $fileContent = json_encode($json); | |||
| } | |||
| $this->cachedInfo->set($fileContent); | |||
| return $json; | |||
| } | |||
| return json_decode($fileContent, true); | |||
| } | |||
| public function able() | |||
| { | |||
| if (!in_array('https', stream_get_wrappers())) { | |||
| return false; | |||
| } | |||
| if (empty($this->allRelease)) { | |||
| return false; | |||
| } | |||
| $this->getNewestInfo(); | |||
| if (HelperClass::fileExists($this->options['cache'] . $this->options['versionFile'])) { | |||
| $fileContent = file_get_contents($this->options['cache'] . $this->options['versionFile']); | |||
| $current = json_decode($fileContent, true); | |||
| if (isset($current['id']) && $current['id'] == $this->newestInfo['id']) { | |||
| return false; | |||
| } | |||
| if (isset($current['tag_name']) && $current['tag_name'] == $this->newestInfo['tag_name']) { | |||
| return false; | |||
| } | |||
| } | |||
| return true; | |||
| } | |||
| public function update() | |||
| { | |||
| $newestRelease = $this->getNewestInfo(); | |||
| if ($this->able()) { | |||
| if ($this->download($newestRelease['zipball_url'])) { | |||
| if ($this->unZip()) { | |||
| unlink($this->options['cache'] . $this->options['zipFile']); | |||
| if (defined("JSON_PRETTY_PRINT")) { | |||
| file_put_contents($this->options['cache'] . $this->options['versionFile'], json_encode(array( | |||
| "id" => $newestRelease['id'], | |||
| "tag_name" => $newestRelease['tag_name'] | |||
| ), JSON_PRETTY_PRINT)); | |||
| } else { | |||
| file_put_contents($this->options['cache'] . $this->options['versionFile'], json_encode(array( | |||
| "id" => $newestRelease['id'], | |||
| "tag_name" => $newestRelease['tag_name'] | |||
| ))); | |||
| } | |||
| return true; | |||
| } | |||
| } | |||
| } | |||
| return false; | |||
| } | |||
| protected function download($url) | |||
| { | |||
| $file = @fopen($url, 'r', false, $this->streamContext2); | |||
| if ($file == false) { | |||
| if ($this->options["exceptions"]) { | |||
| throw new \Exception("Download faild Exception"); | |||
| } else { | |||
| return false; | |||
| } | |||
| } | |||
| file_put_contents( | |||
| dirname($_SERVER['SCRIPT_FILENAME']) . "/" . $this->options['cache'] . $this->options['zipFile'], | |||
| $file | |||
| ); | |||
| fclose($file); | |||
| return true; | |||
| } | |||
| protected function unZip() | |||
| { | |||
| $path = dirname($_SERVER['SCRIPT_FILENAME']) . "/" . $this->options['cache'] . $this->options['zipFile']; | |||
| $updateIgnore = array(); | |||
| if (HelperClass::fileExists($this->options['updateignore'])) { | |||
| $updateIgnore = file($this->options['updateignore']); | |||
| foreach ($updateIgnore as &$ignore) { | |||
| $ignore = $this->options['save'] . trim($ignore); | |||
| } | |||
| } | |||
| $zip = new \ZipArchive(); | |||
| if ($zip->open($path) === true) { | |||
| $cutLength = strlen($zip->getNameIndex(0)); | |||
| for ($i = 1; $i < $zip->numFiles; $i++) {//iterate throw the Zip | |||
| $name = $this->options['save'] . substr($zip->getNameIndex($i), $cutLength); | |||
| $do = true; | |||
| foreach ($updateIgnore as $ignore) { | |||
| if (substr($name, 0, strlen($ignore)) == $ignore) { | |||
| $do = false; | |||
| break; | |||
| } | |||
| } | |||
| if ($do) { | |||
| $stat = $zip->statIndex($i); | |||
| if ($stat["crc"] == 0) { | |||
| if (!HelperClass::fileExists($name)) { | |||
| mkdir($name); | |||
| } | |||
| } else { | |||
| copy("zip://" . $path . "#" . $zip->getNameIndex($i), $name); | |||
| } | |||
| } | |||
| } | |||
| $zip->close(); | |||
| return true; | |||
| } else { | |||
| return false; | |||
| } | |||
| } | |||
| public function getCurrentInfo() | |||
| { | |||
| if (isset($this->currentInfo)) { | |||
| return $this->currentInfo; | |||
| } | |||
| $this->currentInfo = null; | |||
| if (HelperClass::fileExists($this->options['cache'] . $this->options['versionFile'])) { | |||
| $fileContent = file_get_contents($this->options['cache'] . $this->options['versionFile']); | |||
| $current = json_decode($fileContent, true); | |||
| foreach ($this->allRelease as $release) { | |||
| if (isset($current['id']) && $current['id'] == $release['id']) { | |||
| $this->currentInfo = $release; | |||
| break; | |||
| } | |||
| if (isset($current['tag_name']) && $current['tag_name'] == $release['tag_name']) { | |||
| $this->currentInfo = $release; | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| return $this->currentInfo; | |||
| } | |||
| public function getNewestInfo() | |||
| { | |||
| if (isset($this->newestInfo)) { | |||
| return $this->newestInfo; | |||
| } | |||
| foreach ($this->allRelease as $release) { | |||
| if (!$this->options['prerelease'] && $release['prerelease']) { | |||
| continue; | |||
| } | |||
| if ($this->options['branch'] !== $release['target_commitish']) { | |||
| continue; | |||
| } | |||
| $this->newestInfo = $release; | |||
| break; | |||
| } | |||
| return $this->newestInfo; | |||
| } | |||
| } | |||
| @ -0,0 +1,974 @@ | |||
| { | |||
| "_readme": [ | |||
| "This file locks the dependencies of your project to a known state", | |||
| "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | |||
| "This file is @generated automatically" | |||
| ], | |||
| "hash": "b8e4efa9ea29bd0bab50ed2191d4b9cb", | |||
| "packages": [], | |||
| "packages-dev": [ | |||
| { | |||
| "name": "doctrine/instantiator", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/doctrine/instantiator.git", | |||
| "reference": "3d9669e597439e8d205baf315efb757038fb4dea" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/doctrine/instantiator/zipball/3d9669e597439e8d205baf315efb757038fb4dea", | |||
| "reference": "3d9669e597439e8d205baf315efb757038fb4dea", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3,<8.0-DEV" | |||
| }, | |||
| "require-dev": { | |||
| "athletic/athletic": "~0.1.8", | |||
| "ext-pdo": "*", | |||
| "ext-phar": "*", | |||
| "phpunit/phpunit": "~4.0", | |||
| "squizlabs/php_codesniffer": "~2.0" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "1.0.x-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "psr-4": { | |||
| "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" | |||
| } | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "MIT" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Marco Pivetta", | |||
| "email": "ocramius@gmail.com", | |||
| "homepage": "http://ocramius.github.com/" | |||
| } | |||
| ], | |||
| "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", | |||
| "homepage": "https://github.com/doctrine/instantiator", | |||
| "keywords": [ | |||
| "constructor", | |||
| "instantiate" | |||
| ], | |||
| "time": "2015-01-16 19:29:51" | |||
| }, | |||
| { | |||
| "name": "phpdocumentor/reflection-docblock", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", | |||
| "reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/fd0ac2007401505fb596fdfb859ec4e103d69e55", | |||
| "reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3.3" | |||
| }, | |||
| "require-dev": { | |||
| "phpunit/phpunit": "~4.0" | |||
| }, | |||
| "suggest": { | |||
| "dflydev/markdown": "~1.0", | |||
| "erusev/parsedown": "~1.0" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "2.0.x-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "psr-0": { | |||
| "phpDocumentor": [ | |||
| "src/" | |||
| ] | |||
| } | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "MIT" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Mike van Riel", | |||
| "email": "mike.vanriel@naenius.com" | |||
| } | |||
| ], | |||
| "time": "2014-09-02 14:26:20" | |||
| }, | |||
| { | |||
| "name": "phpspec/prophecy", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/phpspec/prophecy.git", | |||
| "reference": "d647e27524f9f7edc37baf63a114b52f5975808f" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d647e27524f9f7edc37baf63a114b52f5975808f", | |||
| "reference": "d647e27524f9f7edc37baf63a114b52f5975808f", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "doctrine/instantiator": "^1.0.2", | |||
| "phpdocumentor/reflection-docblock": "~2.0", | |||
| "sebastian/comparator": "~1.1" | |||
| }, | |||
| "require-dev": { | |||
| "phpspec/phpspec": "~2.0" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "1.3.x-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "psr-0": { | |||
| "Prophecy\\": "src/" | |||
| } | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "MIT" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Konstantin Kudryashov", | |||
| "email": "ever.zet@gmail.com", | |||
| "homepage": "http://everzet.com" | |||
| }, | |||
| { | |||
| "name": "Marcello Duarte", | |||
| "email": "marcello.duarte@gmail.com" | |||
| } | |||
| ], | |||
| "description": "Highly opinionated mocking framework for PHP 5.3+", | |||
| "homepage": "https://github.com/phpspec/prophecy", | |||
| "keywords": [ | |||
| "Double", | |||
| "Dummy", | |||
| "fake", | |||
| "mock", | |||
| "spy", | |||
| "stub" | |||
| ], | |||
| "time": "2015-01-26 10:50:16" | |||
| }, | |||
| { | |||
| "name": "phpunit/php-code-coverage", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/php-code-coverage.git", | |||
| "reference": "34cc484af1ca149188d0d9e91412191e398e0b67" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/34cc484af1ca149188d0d9e91412191e398e0b67", | |||
| "reference": "34cc484af1ca149188d0d9e91412191e398e0b67", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3.3", | |||
| "phpunit/php-file-iterator": "~1.3", | |||
| "phpunit/php-text-template": "~1.2", | |||
| "phpunit/php-token-stream": "~1.3", | |||
| "sebastian/environment": "~1.0", | |||
| "sebastian/version": "~1.0" | |||
| }, | |||
| "require-dev": { | |||
| "ext-xdebug": ">=2.1.4", | |||
| "phpunit/phpunit": "~4" | |||
| }, | |||
| "suggest": { | |||
| "ext-dom": "*", | |||
| "ext-xdebug": ">=2.2.1", | |||
| "ext-xmlwriter": "*" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "2.0.x-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "classmap": [ | |||
| "src/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sb@sebastian-bergmann.de", | |||
| "role": "lead" | |||
| } | |||
| ], | |||
| "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", | |||
| "homepage": "https://github.com/sebastianbergmann/php-code-coverage", | |||
| "keywords": [ | |||
| "coverage", | |||
| "testing", | |||
| "xunit" | |||
| ], | |||
| "time": "2015-01-24 10:06:35" | |||
| }, | |||
| { | |||
| "name": "phpunit/php-file-iterator", | |||
| "version": "1.3.4", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/php-file-iterator.git", | |||
| "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", | |||
| "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3.3" | |||
| }, | |||
| "type": "library", | |||
| "autoload": { | |||
| "classmap": [ | |||
| "File/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "include-path": [ | |||
| "" | |||
| ], | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sb@sebastian-bergmann.de", | |||
| "role": "lead" | |||
| } | |||
| ], | |||
| "description": "FilterIterator implementation that filters files based on a list of suffixes.", | |||
| "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", | |||
| "keywords": [ | |||
| "filesystem", | |||
| "iterator" | |||
| ], | |||
| "time": "2013-10-10 15:34:57" | |||
| }, | |||
| { | |||
| "name": "phpunit/php-text-template", | |||
| "version": "1.2.0", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/php-text-template.git", | |||
| "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", | |||
| "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3.3" | |||
| }, | |||
| "type": "library", | |||
| "autoload": { | |||
| "classmap": [ | |||
| "Text/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "include-path": [ | |||
| "" | |||
| ], | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sb@sebastian-bergmann.de", | |||
| "role": "lead" | |||
| } | |||
| ], | |||
| "description": "Simple template engine.", | |||
| "homepage": "https://github.com/sebastianbergmann/php-text-template/", | |||
| "keywords": [ | |||
| "template" | |||
| ], | |||
| "time": "2014-01-30 17:20:04" | |||
| }, | |||
| { | |||
| "name": "phpunit/php-timer", | |||
| "version": "1.0.5", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/php-timer.git", | |||
| "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", | |||
| "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3.3" | |||
| }, | |||
| "type": "library", | |||
| "autoload": { | |||
| "classmap": [ | |||
| "PHP/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "include-path": [ | |||
| "" | |||
| ], | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sb@sebastian-bergmann.de", | |||
| "role": "lead" | |||
| } | |||
| ], | |||
| "description": "Utility class for timing", | |||
| "homepage": "https://github.com/sebastianbergmann/php-timer/", | |||
| "keywords": [ | |||
| "timer" | |||
| ], | |||
| "time": "2013-08-02 07:42:54" | |||
| }, | |||
| { | |||
| "name": "phpunit/php-token-stream", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/php-token-stream.git", | |||
| "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74", | |||
| "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "ext-tokenizer": "*", | |||
| "php": ">=5.3.3" | |||
| }, | |||
| "require-dev": { | |||
| "phpunit/phpunit": "~4.2" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "1.4-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "classmap": [ | |||
| "src/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sebastian@phpunit.de" | |||
| } | |||
| ], | |||
| "description": "Wrapper around PHP's tokenizer extension.", | |||
| "homepage": "https://github.com/sebastianbergmann/php-token-stream/", | |||
| "keywords": [ | |||
| "tokenizer" | |||
| ], | |||
| "time": "2015-01-17 09:51:32" | |||
| }, | |||
| { | |||
| "name": "phpunit/phpunit", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/phpunit.git", | |||
| "reference": "e85198bbce24ea11075ce8bdfc2cfffb818aae8c" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e85198bbce24ea11075ce8bdfc2cfffb818aae8c", | |||
| "reference": "e85198bbce24ea11075ce8bdfc2cfffb818aae8c", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "ext-dom": "*", | |||
| "ext-json": "*", | |||
| "ext-pcre": "*", | |||
| "ext-reflection": "*", | |||
| "ext-spl": "*", | |||
| "php": ">=5.3.3", | |||
| "phpspec/prophecy": "~1.3.1", | |||
| "phpunit/php-code-coverage": "~2.0", | |||
| "phpunit/php-file-iterator": "~1.3", | |||
| "phpunit/php-text-template": "~1.2", | |||
| "phpunit/php-timer": "~1.0", | |||
| "phpunit/phpunit-mock-objects": "~2.3", | |||
| "sebastian/comparator": "~1.1", | |||
| "sebastian/diff": "~1.2", | |||
| "sebastian/environment": "~1.2", | |||
| "sebastian/exporter": "~1.2", | |||
| "sebastian/global-state": "~1.0", | |||
| "sebastian/version": "~1.0", | |||
| "symfony/yaml": "~2.1|~3.0" | |||
| }, | |||
| "suggest": { | |||
| "phpunit/php-invoker": "~1.1" | |||
| }, | |||
| "bin": [ | |||
| "phpunit" | |||
| ], | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "4.6.x-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "classmap": [ | |||
| "src/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sebastian@phpunit.de", | |||
| "role": "lead" | |||
| } | |||
| ], | |||
| "description": "The PHP Unit Testing framework.", | |||
| "homepage": "https://phpunit.de/", | |||
| "keywords": [ | |||
| "phpunit", | |||
| "testing", | |||
| "xunit" | |||
| ], | |||
| "time": "2015-01-27 07:32:25" | |||
| }, | |||
| { | |||
| "name": "phpunit/phpunit-mock-objects", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", | |||
| "reference": "b752b41e3fead4feee99f3a2f2972cef517abb8b" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b752b41e3fead4feee99f3a2f2972cef517abb8b", | |||
| "reference": "b752b41e3fead4feee99f3a2f2972cef517abb8b", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "doctrine/instantiator": "~1.0,>=1.0.2", | |||
| "php": ">=5.3.3", | |||
| "phpunit/php-text-template": "~1.2" | |||
| }, | |||
| "require-dev": { | |||
| "phpunit/phpunit": "4.4.*@dev" | |||
| }, | |||
| "suggest": { | |||
| "ext-soap": "*" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "2.4.x-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "classmap": [ | |||
| "src/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sb@sebastian-bergmann.de", | |||
| "role": "lead" | |||
| } | |||
| ], | |||
| "description": "Mock Object library for PHPUnit", | |||
| "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", | |||
| "keywords": [ | |||
| "mock", | |||
| "xunit" | |||
| ], | |||
| "time": "2015-01-18 10:44:19" | |||
| }, | |||
| { | |||
| "name": "sebastian/comparator", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/comparator.git", | |||
| "reference": "6a1e846331bb3cc1a305168125d047fb86260e3d" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1e846331bb3cc1a305168125d047fb86260e3d", | |||
| "reference": "6a1e846331bb3cc1a305168125d047fb86260e3d", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3.3", | |||
| "sebastian/diff": "~1.1", | |||
| "sebastian/exporter": "~1.0" | |||
| }, | |||
| "require-dev": { | |||
| "phpunit/phpunit": "~4.1" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "1.1.x-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "classmap": [ | |||
| "src/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Jeff Welch", | |||
| "email": "whatthejeff@gmail.com" | |||
| }, | |||
| { | |||
| "name": "Volker Dusch", | |||
| "email": "github@wallbash.com" | |||
| }, | |||
| { | |||
| "name": "Bernhard Schussek", | |||
| "email": "bschussek@2bepublished.at" | |||
| }, | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sebastian@phpunit.de" | |||
| } | |||
| ], | |||
| "description": "Provides the functionality to compare PHP values for equality", | |||
| "homepage": "http://www.github.com/sebastianbergmann/comparator", | |||
| "keywords": [ | |||
| "comparator", | |||
| "compare", | |||
| "equality" | |||
| ], | |||
| "time": "2015-01-05 16:29:00" | |||
| }, | |||
| { | |||
| "name": "sebastian/diff", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/diff.git", | |||
| "reference": "6dc90302a4cdf8486c221a0ad3a4da53859fcfa5" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/6dc90302a4cdf8486c221a0ad3a4da53859fcfa5", | |||
| "reference": "6dc90302a4cdf8486c221a0ad3a4da53859fcfa5", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3.3" | |||
| }, | |||
| "require-dev": { | |||
| "phpunit/phpunit": "~4.2" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "1.2-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "classmap": [ | |||
| "src/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Kore Nordmann", | |||
| "email": "mail@kore-nordmann.de" | |||
| }, | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sebastian@phpunit.de" | |||
| } | |||
| ], | |||
| "description": "Diff implementation", | |||
| "homepage": "http://www.github.com/sebastianbergmann/diff", | |||
| "keywords": [ | |||
| "diff" | |||
| ], | |||
| "time": "2015-01-01 09:20:29" | |||
| }, | |||
| { | |||
| "name": "sebastian/environment", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/environment.git", | |||
| "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", | |||
| "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3.3" | |||
| }, | |||
| "require-dev": { | |||
| "phpunit/phpunit": "~4.4" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "1.3.x-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "classmap": [ | |||
| "src/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sebastian@phpunit.de" | |||
| } | |||
| ], | |||
| "description": "Provides functionality to handle HHVM/PHP environments", | |||
| "homepage": "http://www.github.com/sebastianbergmann/environment", | |||
| "keywords": [ | |||
| "Xdebug", | |||
| "environment", | |||
| "hhvm" | |||
| ], | |||
| "time": "2015-01-01 10:01:08" | |||
| }, | |||
| { | |||
| "name": "sebastian/exporter", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/exporter.git", | |||
| "reference": "84839970d05254c73cde183a721c7af13aede943" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", | |||
| "reference": "84839970d05254c73cde183a721c7af13aede943", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3.3", | |||
| "sebastian/recursion-context": "~1.0" | |||
| }, | |||
| "require-dev": { | |||
| "phpunit/phpunit": "~4.4" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "1.2.x-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "classmap": [ | |||
| "src/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Jeff Welch", | |||
| "email": "whatthejeff@gmail.com" | |||
| }, | |||
| { | |||
| "name": "Volker Dusch", | |||
| "email": "github@wallbash.com" | |||
| }, | |||
| { | |||
| "name": "Bernhard Schussek", | |||
| "email": "bschussek@2bepublished.at" | |||
| }, | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sebastian@phpunit.de" | |||
| }, | |||
| { | |||
| "name": "Adam Harvey", | |||
| "email": "aharvey@php.net" | |||
| } | |||
| ], | |||
| "description": "Provides the functionality to export PHP variables for visualization", | |||
| "homepage": "http://www.github.com/sebastianbergmann/exporter", | |||
| "keywords": [ | |||
| "export", | |||
| "exporter" | |||
| ], | |||
| "time": "2015-01-27 07:23:06" | |||
| }, | |||
| { | |||
| "name": "sebastian/global-state", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/global-state.git", | |||
| "reference": "007c441df427cf0e175372fcbb9d196bce7eb743" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/007c441df427cf0e175372fcbb9d196bce7eb743", | |||
| "reference": "007c441df427cf0e175372fcbb9d196bce7eb743", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3.3" | |||
| }, | |||
| "require-dev": { | |||
| "phpunit/phpunit": "~4.2" | |||
| }, | |||
| "suggest": { | |||
| "ext-uopz": "*" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "1.0-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "classmap": [ | |||
| "src/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sebastian@phpunit.de" | |||
| } | |||
| ], | |||
| "description": "Snapshotting of global state", | |||
| "homepage": "http://www.github.com/sebastianbergmann/global-state", | |||
| "keywords": [ | |||
| "global state" | |||
| ], | |||
| "time": "2015-01-20 04:09:31" | |||
| }, | |||
| { | |||
| "name": "sebastian/recursion-context", | |||
| "version": "dev-master", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/recursion-context.git", | |||
| "reference": "3989662bbb30a29d20d9faa04a846af79b276252" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", | |||
| "reference": "3989662bbb30a29d20d9faa04a846af79b276252", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.3.3" | |||
| }, | |||
| "require-dev": { | |||
| "phpunit/phpunit": "~4.4" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "1.0.x-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "classmap": [ | |||
| "src/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Jeff Welch", | |||
| "email": "whatthejeff@gmail.com" | |||
| }, | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sebastian@phpunit.de" | |||
| }, | |||
| { | |||
| "name": "Adam Harvey", | |||
| "email": "aharvey@php.net" | |||
| } | |||
| ], | |||
| "description": "Provides functionality to recursively process PHP variables", | |||
| "homepage": "http://www.github.com/sebastianbergmann/recursion-context", | |||
| "time": "2015-01-24 09:48:32" | |||
| }, | |||
| { | |||
| "name": "sebastian/version", | |||
| "version": "1.0.4", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/sebastianbergmann/version.git", | |||
| "reference": "a77d9123f8e809db3fbdea15038c27a95da4058b" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/a77d9123f8e809db3fbdea15038c27a95da4058b", | |||
| "reference": "a77d9123f8e809db3fbdea15038c27a95da4058b", | |||
| "shasum": "" | |||
| }, | |||
| "type": "library", | |||
| "autoload": { | |||
| "classmap": [ | |||
| "src/" | |||
| ] | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "BSD-3-Clause" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Sebastian Bergmann", | |||
| "email": "sebastian@phpunit.de", | |||
| "role": "lead" | |||
| } | |||
| ], | |||
| "description": "Library that helps with managing the version number of Git-hosted PHP projects", | |||
| "homepage": "https://github.com/sebastianbergmann/version", | |||
| "time": "2014-12-15 14:25:24" | |||
| }, | |||
| { | |||
| "name": "symfony/yaml", | |||
| "version": "dev-master", | |||
| "target-dir": "Symfony/Component/Yaml", | |||
| "source": { | |||
| "type": "git", | |||
| "url": "https://github.com/symfony/Yaml.git", | |||
| "reference": "13ef40ee1437582f86fa805445363d0c694dae3a" | |||
| }, | |||
| "dist": { | |||
| "type": "zip", | |||
| "url": "https://api.github.com/repos/symfony/Yaml/zipball/13ef40ee1437582f86fa805445363d0c694dae3a", | |||
| "reference": "13ef40ee1437582f86fa805445363d0c694dae3a", | |||
| "shasum": "" | |||
| }, | |||
| "require": { | |||
| "php": ">=5.5.9" | |||
| }, | |||
| "type": "library", | |||
| "extra": { | |||
| "branch-alias": { | |||
| "dev-master": "3.0-dev" | |||
| } | |||
| }, | |||
| "autoload": { | |||
| "psr-0": { | |||
| "Symfony\\Component\\Yaml\\": "" | |||
| } | |||
| }, | |||
| "notification-url": "https://packagist.org/downloads/", | |||
| "license": [ | |||
| "MIT" | |||
| ], | |||
| "authors": [ | |||
| { | |||
| "name": "Symfony Community", | |||
| "homepage": "http://symfony.com/contributors" | |||
| }, | |||
| { | |||
| "name": "Fabien Potencier", | |||
| "email": "fabien@symfony.com" | |||
| } | |||
| ], | |||
| "description": "Symfony Yaml Component", | |||
| "homepage": "http://symfony.com", | |||
| "time": "2015-01-25 04:42:01" | |||
| } | |||
| ], | |||
| "aliases": [], | |||
| "minimum-stability": "dev", | |||
| "stability-flags": { | |||
| "phpunit/phpunit": 20 | |||
| }, | |||
| "prefer-stable": false, | |||
| "prefer-lowest": false, | |||
| "platform": { | |||
| "php": ">=5.3.0" | |||
| }, | |||
| "platform-dev": [] | |||
| } | |||
| @ -0,0 +1,189 @@ | |||
| <?php | |||
| namespace Suin\RSSWriter; | |||
| use \Suin\RSSWriter\SimpleXMLElement; | |||
| class Channel implements \Suin\RSSWriter\ChannelInterface | |||
| { | |||
| /** @var string */ | |||
| protected $title; | |||
| /** @var string */ | |||
| protected $url; | |||
| /** @var string */ | |||
| protected $description; | |||
| /** @var string */ | |||
| protected $language; | |||
| /** @var string */ | |||
| protected $copyright; | |||
| /** @var int */ | |||
| protected $pubDate; | |||
| /** @var int */ | |||
| protected $lastBuildDate; | |||
| /** @var int */ | |||
| protected $ttl; | |||
| /** @var \Suin\RSSWriter\ItemInterface[] */ | |||
| protected $items = array(); | |||
| /** | |||
| * Set channel title | |||
| * @param string $title | |||
| * @return $this | |||
| */ | |||
| public function title($title) | |||
| { | |||
| $this->title = $title; | |||
| return $this; | |||
| } | |||
| /** | |||
| * Set channel URL | |||
| * @param string $url | |||
| * @return $this | |||
| */ | |||
| public function url($url) | |||
| { | |||
| $this->url = $url; | |||
| return $this; | |||
| } | |||
| /** | |||
| * Set channel description | |||
| * @param string $description | |||
| * @return $this | |||
| */ | |||
| public function description($description) | |||
| { | |||
| $this->description = $description; | |||
| return $this; | |||
| } | |||
| /** | |||
| * Set ISO639 language code | |||
| * | |||
| * The language the channel is written in. This allows aggregators to group all | |||
| * Italian language sites, for example, on a single page. A list of allowable | |||
| * values for this element, as provided by Netscape, is here. You may also use | |||
| * values defined by the W3C. | |||
| * | |||
| * @param string $language | |||
| * @return $this | |||
| */ | |||
| public function language($language) | |||
| { | |||
| $this->language = $language; | |||
| return $this; | |||
| } | |||
| /** | |||
| * Set channel copyright | |||
| * @param string $copyright | |||
| * @return $this | |||
| */ | |||
| public function copyright($copyright) | |||
| { | |||
| $this->copyright = $copyright; | |||
| return $this; | |||
| } | |||
| /** | |||
| * Set channel published date | |||
| * @param int $pubDate Unix timestamp | |||
| * @return $this | |||
| */ | |||
| public function pubDate($pubDate) | |||
| { | |||
| $this->pubDate = $pubDate; | |||
| return $this; | |||
| } | |||
| /** | |||
| * Set channel last build date | |||
| * @param int $lastBuildDate Unix timestamp | |||
| * @return $this | |||
| */ | |||
| public function lastBuildDate($lastBuildDate) | |||
| { | |||
| $this->lastBuildDate = $lastBuildDate; | |||
| return $this; | |||
| } | |||
| /** | |||
| * Set channel ttl (minutes) | |||
| * @param int $ttl | |||
| * @return $this | |||
| */ | |||
| public function ttl($ttl) | |||
| { | |||
| $this->ttl = $ttl; | |||
| return $this; | |||
| } | |||
| /** | |||
| * Add item object | |||
| * @param \Suin\RSSWriter\ItemInterface $item | |||
| * @return $this | |||
| */ | |||
| public function addItem(ItemInterface $item) | |||
| { | |||
| $this->items[] = $item; | |||
| return $this; | |||
| } | |||
| /** | |||
| * Append to feed | |||
| * @param \Suin\RSSWriter\FeedInterface $feed | |||
| * @return $this | |||
| */ | |||
| public function appendTo(FeedInterface $feed) | |||
| { | |||
| $feed->addChannel($this); | |||
| return $this; | |||
| } | |||
| /** | |||
| * Return XML object | |||
| * @return \Suin\RSSWriter\SimpleXMLElement | |||
| */ | |||
| public function asXML() | |||
| { | |||
| $xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?><channel></channel>', LIBXML_NOERROR|LIBXML_ERR_NONE|LIBXML_ERR_FATAL); | |||
| $xml->addChild('title', $this->title); | |||
| $xml->addChild('link', $this->url); | |||
| $xml->addChild('description', $this->description); | |||
| if ( $this->language !== null ) | |||
| { | |||
| $xml->addChild('language', $this->language); | |||
| } | |||
| if ( $this->copyright !== null ) | |||
| { | |||
| $xml->addChild('copyright', $this->copyright); | |||
| } | |||
| if ( $this->pubDate !== null ) | |||
| { | |||
| $xml->addChild('pubDate', date(DATE_RSS, $this->pubDate)); | |||
| } | |||
| if ( $this->lastBuildDate !== null ) | |||
| { | |||
| $xml->addChild('lastBuildDate', date(DATE_RSS, $this->lastBuildDate)); | |||
| } | |||
| if ( $this->ttl !== null ) | |||
| { | |||
| $xml->addChild('ttl', $this->ttl); | |||
| } | |||
| foreach ( $this->items as $item ) | |||
| { | |||
| $toDom = dom_import_simplexml($xml); | |||
| $fromDom = dom_import_simplexml($item->asXML()); | |||
| $toDom->appendChild($toDom->ownerDocument->importNode($fromDom, true)); | |||
| } | |||
| return $xml; | |||
| } | |||
| } | |||
| @ -0,0 +1,91 @@ | |||
| <?php | |||
| namespace Suin\RSSWriter; | |||
| use \Suin\RSSWriter\FeedInterface; | |||
| use \Suin\RSSWriter\ItemInterface; | |||
| interface ChannelInterface | |||
| { | |||
| /** | |||
| * Set channel title | |||
| * @param string $title | |||
| * @return $this | |||
| */ | |||
| public function title($title); | |||
| /** | |||
| * Set channel URL | |||
| * @param string $url | |||
| * @return $this | |||
| */ | |||
| public function url($url); | |||
| /** | |||
| * Set channel description | |||
| * @param string $description | |||
| * @return $this | |||
| */ | |||
| public function description($description); | |||
| /** | |||
| * Set ISO639 language code | |||
| * | |||
| * The language the channel is written in. This allows aggregators to group all | |||
| * Italian language sites, for example, on a single page. A list of allowable | |||
| * values for this element, as provided by Netscape, is here. You may also use | |||
| * values defined by the W3C. | |||
| * | |||
| * @param string $language | |||
| * @return $this | |||
| */ | |||
| public function language($language); | |||
| /** | |||
| * Set channel copyright | |||
| * @param string $copyright | |||
| * @return $this | |||
| */ | |||
| public function copyright($copyright); | |||
| /** | |||
| * Set channel published date | |||
| * @param int $pubDate Unix timestamp | |||
| * @return $this | |||
| */ | |||
| public function pubDate($pubDate); | |||
| /** | |||
| * Set channel last build date | |||
| * @param int $lastBuildDate Unix timestamp | |||
| * @return $this | |||
| */ | |||
| public function lastBuildDate($lastBuildDate); | |||
| /** | |||
| * Set channel ttl (minutes) | |||
| * @param int $ttl | |||
| * @return $this | |||
| */ | |||
| public function ttl($ttl); | |||
| /** | |||
| * Add item object | |||
| * @param \Suin\RSSWriter\ItemInterface $item | |||
| * @return $this | |||
| */ | |||
| public function addItem(ItemInterface $item); | |||
| /** | |||
| * Append to feed | |||
| * @param \Suin\RSSWriter\FeedInterface $feed | |||
| * @return $this | |||
| */ | |||
| public function appendTo(FeedInterface $feed); | |||
| /** | |||
| * Return XML object | |||
| * @return \Suin\RSSWriter\SimpleXMLElement | |||
| */ | |||
| public function asXML(); | |||
| } | |||