| @ -0,0 +1 @@ | |||
| /nbproject/private/ | |||
| @ -0,0 +1,9 @@ | |||
| ;Password | |||
| password = admin | |||
| 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,7 @@ | |||
| include.path=${php.global.include.path} | |||
| php.version=PHP_70 | |||
| source.encoding=UTF-8 | |||
| src.dir=. | |||
| tags.asp=false | |||
| tags.short=false | |||
| web.root=. | |||
| @ -0,0 +1,9 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <project xmlns="http://www.netbeans.org/ns/project/1"> | |||
| <type>org.netbeans.modules.php.project</type> | |||
| <configuration> | |||
| <data xmlns="http://www.netbeans.org/ns/php-project/1"> | |||
| <name>htmly</name> | |||
| </data> | |||
| </configuration> | |||
| </project> | |||
| @ -0,0 +1,62 @@ | |||
| <!DOCTYPE html> | |||
| <html> | |||
| <anuan></anuan> | |||
| <head> | |||
| <?php echo head_contents() ?> | |||
| <title><?php echo $title;?></title> | |||
| <meta name="description" content="<?php echo $description; ?>"/> | |||
| <?php if($canonical): ?> | |||
| <link rel="canonical" href="<?php echo $canonical; ?>" /> | |||
| <?php endif; ?> | |||
| <link href="<?php echo site_url() ?>system/resources/css/admin.css" rel="stylesheet"/> | |||
| <link href="//fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css"> | |||
| <?php if (publisher()): ?> | |||
| <link href="<?php echo publisher() ?>" rel="publisher" /><?php endif; ?> | |||
| <!--[if lt IE 9]> | |||
| <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |||
| <![endif]--> | |||
| </head> | |||
| <body class="admin <?php echo $bodyclass; ?>" itemscope="itemscope" itemtype="http://schema.org/Blog"> | |||
| <div class="hide"> | |||
| <meta content="<?php echo blog_title() ?>" itemprop="name"/> | |||
| <meta content="<?php echo blog_description() ?>" itemprop="description"/> | |||
| </div> | |||
| <?php if (login()) { | |||
| toolbar(); | |||
| } ?> | |||
| <div id="outer-wrapper"> | |||
| <div id="menu-wrapper"> | |||
| <div class="container"> | |||
| <nav id="menu"> | |||
| <?php echo search() ?> | |||
| </nav> | |||
| </div> | |||
| </div> | |||
| <div id="header-wrapper"> | |||
| <div class="container"> | |||
| <header id="header"> | |||
| <section id="branding"> | |||
| <h1 class="blog-title"><a href="<?php echo site_url() ?>"><?php echo blog_title() ?></a></h1> | |||
| <div class="blog-tagline"><p><?php echo blog_tagline() ?></p></div> | |||
| </section> | |||
| </header> | |||
| </div> | |||
| </div> | |||
| <div id="content-wrapper"> | |||
| <div class="container"> | |||
| <section id="content"> | |||
| <?php echo content() ?> | |||
| </section> | |||
| </div> | |||
| </div> | |||
| <div id="footer-wrapper"> | |||
| <div class="container"> | |||
| <footer id="footer"> | |||
| <div class="copyright"><?php echo copyright() ?></div> | |||
| </footer> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <?php if (analytics()): ?><?php echo analytics() ?><?php endif; ?> | |||
| </body> | |||
| </html> | |||
| @ -1,62 +1,69 @@ | |||
| <!DOCTYPE html> | |||
| <html> | |||
| <head> | |||
| <html lang="en"> | |||
| <head> | |||
| <?php echo head_contents() ?> | |||
| <title><?php echo $title;?></title> | |||
| <meta name="description" content="<?php echo $description; ?>"/> | |||
| <?php if($canonical): ?> | |||
| <link rel="canonical" href="<?php echo $canonical; ?>" /> | |||
| <?php endif; ?> | |||
| <link href="<?php echo site_url() ?>system/resources/css/admin.css" rel="stylesheet"/> | |||
| <link href="//fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css"> | |||
| <link href="<?php echo site_url() ?>system/resources/css/bootstrap.min.css" rel="stylesheet"> | |||
| <link href="<?php echo site_url() ?>system/resources/css/ie10-viewport-bug-workaround.css" rel="stylesheet"> | |||
| <link href="<?php echo site_url() ?>system/resources/css/dashboard.css" rel="stylesheet"> | |||
| <!--[if lt IE 9]><script src="<?php echo site_url() ?>system/resources/js/ie8-responsive-file-warning.js"></script><![endif]--> | |||
| <script src="<?php echo site_url() ?>system/resources/js/ie-emulation-modes-warning.js"></script> | |||
| <?php if (publisher()): ?> | |||
| <link href="<?php echo publisher() ?>" rel="publisher" /><?php endif; ?> | |||
| <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | |||
| <!--[if lt IE 9]> | |||
| <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |||
| <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> | |||
| <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |||
| <![endif]--> | |||
| </head> | |||
| <body class="admin <?php echo $bodyclass; ?>" itemscope="itemscope" itemtype="http://schema.org/Blog"> | |||
| <div class="hide"> | |||
| <meta content="<?php echo blog_title() ?>" itemprop="name"/> | |||
| <meta content="<?php echo blog_description() ?>" itemprop="description"/> | |||
| </div> | |||
| <?php if (login()) { | |||
| toolbar(); | |||
| } ?> | |||
| <div id="outer-wrapper"> | |||
| <div id="menu-wrapper"> | |||
| <div class="container"> | |||
| <nav id="menu"> | |||
| <?php echo menu() ?> | |||
| <?php echo search() ?> | |||
| </nav> | |||
| </head> | |||
| <body> | |||
| <nav class="navbar navbar-inverse navbar-fixed-top"> | |||
| <div class="container-fluid"> | |||
| <div class="navbar-header"> | |||
| <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | |||
| <span class="sr-only">Toggle navigation</span> | |||
| <span class="icon-bar"></span> | |||
| <span class="icon-bar"></span> | |||
| <span class="icon-bar"></span> | |||
| </button> | |||
| <a class="navbar-brand" href="<?php echo site_url() ?>admin">Dashboard</a> | |||
| </div> | |||
| </div> | |||
| <div id="header-wrapper"> | |||
| <div class="container"> | |||
| <header id="header"> | |||
| <section id="branding"> | |||
| <h1 class="blog-title"><a href="<?php echo site_url() ?>"><?php echo blog_title() ?></a></h1> | |||
| <div class="blog-tagline"><p><?php echo blog_tagline() ?></p></div> | |||
| </section> | |||
| </header> | |||
| <div id="navbar" class="navbar-collapse collapse"> | |||
| <ul class="nav navbar-nav navbar-right"> | |||
| <?php | |||
| if (login()) { | |||
| newToolBar(); | |||
| } | |||
| ?> | |||
| </ul> | |||
| <?php echo search() ?> | |||
| </div> | |||
| </div> | |||
| <div id="content-wrapper"> | |||
| <div class="container"> | |||
| <section id="content"> | |||
| <?php echo content() ?> | |||
| </section> | |||
| </div> | |||
| </nav> | |||
| <div class="container-fluid"> | |||
| <div class="row"> | |||
| <div class="col-sm-3 col-md-2 sidebar list-group"> | |||
| <?php echo sideBar(); ?> | |||
| </div> | |||
| </div> | |||
| <div id="footer-wrapper"> | |||
| <div class="container"> | |||
| <footer id="footer"> | |||
| <div class="copyright"><?php echo copyright() ?></div> | |||
| </footer> | |||
| <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"> | |||
| <?php echo content() ?> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <?php if (analytics()): ?><?php echo analytics() ?><?php endif; ?> | |||
| </body> | |||
| </html> | |||
| <!-- Bootstrap core JavaScript | |||
| ================================================== --> | |||
| <!-- Placed at the end of the document so the pages load faster --> | |||
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |||
| <script>window.jQuery || document.write('<script src="<?php echo site_url() ?>system/resources/js/jquery.min.js"><\/script>')</script> | |||
| <script src="<?php echo site_url() ?>system/resources/js/bootstrap.min.js"></script> | |||
| <script src="<?php echo site_url() ?>system/resources/js/holder.min.js"></script> | |||
| <script src="<?php echo site_url() ?>system/resources/js/ie10-viewport-bug-workaround.js"></script> | |||
| </body> | |||
| </html> | |||
| @ -1,29 +1,49 @@ | |||
| <?php if (isset($error)) { ?> | |||
| <div class="error-message"><?php echo $error ?></div> | |||
| <?php } ?> | |||
| <?php if (!login()) { ?> | |||
| <h1>Login</h1> | |||
| <form method="POST" action="login"> | |||
| User <span class="required">*</span> <br> | |||
| <input type="text" class="<?php if (isset($username)) { | |||
| if (empty($username)) { | |||
| echo 'error'; | |||
| } | |||
| } ?>" name="user"/><br><br> | |||
| Password <span class="required">*</span> <br> | |||
| <input type="password" class="<?php if (isset($password)) { | |||
| if (empty($password)) { | |||
| echo 'error'; | |||
| } | |||
| } ?>" name="password"/><br><br> | |||
| <input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>"> | |||
| <?php if (config('google.reCaptcha') === 'true'): ?> | |||
| <script src='https://www.google.com/recaptcha/api.js'></script> | |||
| <div class="g-recaptcha" data-sitekey="<?php echo config("google.reCaptcha.public"); ?>"></div> | |||
| <br/> | |||
| <!DOCTYPE html> | |||
| <html lang="en"> | |||
| <head> | |||
| <?php echo head_contents() ?> | |||
| <meta name="description" content=""> | |||
| <?php if($canonical): ?> | |||
| <link rel="canonical" href="<?php echo $canonical; ?>" /> | |||
| <?php endif; ?> | |||
| <input type="submit" name="submit" value="Login"/> | |||
| </form> | |||
| <link href="<?php echo site_url() ?>system/resources/css/bootstrap.min.css" rel="stylesheet"> | |||
| <link href="<?php echo site_url() ?>system/resources/css/ie10-viewport-bug-workaround.css" rel="stylesheet"> | |||
| <link href="<?php echo site_url() ?>system/resources/css/signin.css" rel="stylesheet"> | |||
| <!--[if lt IE 9]><script src="<?php echo site_url() ?>system/resources/js/ie8-responsive-file-warning.js"></script><![endif]--> | |||
| <script src="<?php echo site_url() ?>system/resources/js/ie-emulation-modes-warning.js"></script> | |||
| <script src="<?php echo site_url() ?>system/resources/js/ie-emulation-modes-warning.js"></script> | |||
| <?php if (publisher()): ?> | |||
| <link href="<?php echo publisher() ?>" rel="publisher" /><?php endif; ?> | |||
| <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | |||
| <!--[if lt IE 9]> | |||
| <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> | |||
| <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |||
| <![endif]--> | |||
| </head> | |||
| <body> | |||
| <div class="container"> | |||
| <?php if (isset($error)) { ?> | |||
| <div class="alert alert-danger alert-dismissible" role="alert"> | |||
| <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> | |||
| <strong>ERROR!</strong> <?php echo $error ?> | |||
| </div> | |||
| <?php } ?> | |||
| <form class="form-signin" method="POST" action="login"> | |||
| <h2 class="form-signin-heading">Please sign in</h2> | |||
| <label for="inputUsername" class="sr-only">Username</label> | |||
| <input name="user" type="username" id="inputUsername" class="form-control" placeholder="your username ..." required autofocus> | |||
| <label for="inputPassword" class="sr-only">Password</label> | |||
| <input name="password" type="password" id="inputPassword" class="form-control" placeholder="your password" required> | |||
| <input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>"> | |||
| <button class="btn btn-lg btn-primary btn-block" type="submit" value="login">Sign in</button> | |||
| <br/> | |||
| <a type="button" href="<?php echo site_url() ?>"><< Return to Blog</a> | |||
| </form> | |||
| </div> | |||
| <script src="<?php echo site_url() ?>system/resources/js/ie10-viewport-bug-workaround.js"></script> | |||
| </body> | |||
| </html> | |||
| <?php } else { | |||
| header('location: admin'); | |||
| } ?> | |||
| @ -0,0 +1,29 @@ | |||
| <?php if (isset($error)) { ?> | |||
| <div class="error-message"><?php echo $error ?></div> | |||
| <?php } ?> | |||
| <?php if (!login()) { ?> | |||
| <h1>Login</h1> | |||
| <form method="POST" action="login"> | |||
| User <span class="required">*</span> <br> | |||
| <input type="text" class="<?php if (isset($username)) { | |||
| if (empty($username)) { | |||
| echo 'error'; | |||
| } | |||
| } ?>" name="user"/><br><br> | |||
| Password <span class="required">*</span> <br> | |||
| <input type="password" class="<?php if (isset($password)) { | |||
| if (empty($password)) { | |||
| echo 'error'; | |||
| } | |||
| } ?>" name="password"/><br><br> | |||
| <input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>"> | |||
| <?php if (config('google.reCaptcha') === 'true'): ?> | |||
| <script src='https://www.google.com/recaptcha/api.js'></script> | |||
| <div class="g-recaptcha" data-sitekey="<?php echo config("google.reCaptcha.public"); ?>"></div> | |||
| <br/> | |||
| <?php endif; ?> | |||
| <input type="submit" name="submit" value="Login"/> | |||
| </form> | |||
| <?php } else { | |||
| header('location: admin'); | |||
| } ?> | |||
| @ -0,0 +1,153 @@ | |||
| <h1 class="page-header">Dashboard</h1> | |||
| <div class="row placeholders"> | |||
| <div class="col-xs-6 col-sm-3 placeholder"> | |||
| <img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail"> | |||
| <h4>Label</h4> | |||
| <span class="text-muted">Something else</span> | |||
| </div> | |||
| <div class="col-xs-6 col-sm-3 placeholder"> | |||
| <img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail"> | |||
| <h4>Label</h4> | |||
| <span class="text-muted">Something else</span> | |||
| </div> | |||
| <div class="col-xs-6 col-sm-3 placeholder"> | |||
| <img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail"> | |||
| <h4>Label</h4> | |||
| <span class="text-muted">Something else</span> | |||
| </div> | |||
| <div class="col-xs-6 col-sm-3 placeholder"> | |||
| <img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail"> | |||
| <h4>Label</h4> | |||
| <span class="text-muted">Something else</span> | |||
| </div> | |||
| </div> | |||
| <h2 class="sub-header">Section title</h2> | |||
| <div class="table-responsive"> | |||
| <table class="table table-striped"> | |||
| <thead> | |||
| <tr> | |||
| <th>#</th> | |||
| <th>Header</th> | |||
| <th>Header</th> | |||
| <th>Header</th> | |||
| <th>Header</th> | |||
| </tr> | |||
| </thead> | |||
| <tbody> | |||
| <tr> | |||
| <td>1,001</td> | |||
| <td>Lorem</td> | |||
| <td>ipsum</td> | |||
| <td>dolor</td> | |||
| <td>sit</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,002</td> | |||
| <td>amet</td> | |||
| <td>consectetur</td> | |||
| <td>adipiscing</td> | |||
| <td>elit</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,003</td> | |||
| <td>Integer</td> | |||
| <td>nec</td> | |||
| <td>odio</td> | |||
| <td>Praesent</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,003</td> | |||
| <td>libero</td> | |||
| <td>Sed</td> | |||
| <td>cursus</td> | |||
| <td>ante</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,004</td> | |||
| <td>dapibus</td> | |||
| <td>diam</td> | |||
| <td>Sed</td> | |||
| <td>nisi</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,005</td> | |||
| <td>Nulla</td> | |||
| <td>quis</td> | |||
| <td>sem</td> | |||
| <td>at</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,006</td> | |||
| <td>nibh</td> | |||
| <td>elementum</td> | |||
| <td>imperdiet</td> | |||
| <td>Duis</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,007</td> | |||
| <td>sagittis</td> | |||
| <td>ipsum</td> | |||
| <td>Praesent</td> | |||
| <td>mauris</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,008</td> | |||
| <td>Fusce</td> | |||
| <td>nec</td> | |||
| <td>tellus</td> | |||
| <td>sed</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,009</td> | |||
| <td>augue</td> | |||
| <td>semper</td> | |||
| <td>porta</td> | |||
| <td>Mauris</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,010</td> | |||
| <td>massa</td> | |||
| <td>Vestibulum</td> | |||
| <td>lacinia</td> | |||
| <td>arcu</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,011</td> | |||
| <td>eget</td> | |||
| <td>nulla</td> | |||
| <td>Class</td> | |||
| <td>aptent</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,012</td> | |||
| <td>taciti</td> | |||
| <td>sociosqu</td> | |||
| <td>ad</td> | |||
| <td>litora</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,013</td> | |||
| <td>torquent</td> | |||
| <td>per</td> | |||
| <td>conubia</td> | |||
| <td>nostra</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,014</td> | |||
| <td>per</td> | |||
| <td>inceptos</td> | |||
| <td>himenaeos</td> | |||
| <td>Curabitur</td> | |||
| </tr> | |||
| <tr> | |||
| <td>1,015</td> | |||
| <td>sodales</td> | |||
| <td>ligula</td> | |||
| <td>in</td> | |||
| <td>libero</td> | |||
| </tr> | |||
| </tbody> | |||
| </table> | |||
| </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,587 @@ | |||
| /*! | |||
| * Bootstrap v3.3.7 (http://getbootstrap.com) | |||
| * Copyright 2011-2016 Twitter, Inc. | |||
| * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |||
| */ | |||
| .btn-default, | |||
| .btn-primary, | |||
| .btn-success, | |||
| .btn-info, | |||
| .btn-warning, | |||
| .btn-danger { | |||
| text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); | |||
| -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); | |||
| box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); | |||
| } | |||
| .btn-default:active, | |||
| .btn-primary:active, | |||
| .btn-success:active, | |||
| .btn-info:active, | |||
| .btn-warning:active, | |||
| .btn-danger:active, | |||
| .btn-default.active, | |||
| .btn-primary.active, | |||
| .btn-success.active, | |||
| .btn-info.active, | |||
| .btn-warning.active, | |||
| .btn-danger.active { | |||
| -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); | |||
| box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); | |||
| } | |||
| .btn-default.disabled, | |||
| .btn-primary.disabled, | |||
| .btn-success.disabled, | |||
| .btn-info.disabled, | |||
| .btn-warning.disabled, | |||
| .btn-danger.disabled, | |||
| .btn-default[disabled], | |||
| .btn-primary[disabled], | |||
| .btn-success[disabled], | |||
| .btn-info[disabled], | |||
| .btn-warning[disabled], | |||
| .btn-danger[disabled], | |||
| fieldset[disabled] .btn-default, | |||
| fieldset[disabled] .btn-primary, | |||
| fieldset[disabled] .btn-success, | |||
| fieldset[disabled] .btn-info, | |||
| fieldset[disabled] .btn-warning, | |||
| fieldset[disabled] .btn-danger { | |||
| -webkit-box-shadow: none; | |||
| box-shadow: none; | |||
| } | |||
| .btn-default .badge, | |||
| .btn-primary .badge, | |||
| .btn-success .badge, | |||
| .btn-info .badge, | |||
| .btn-warning .badge, | |||
| .btn-danger .badge { | |||
| text-shadow: none; | |||
| } | |||
| .btn:active, | |||
| .btn.active { | |||
| background-image: none; | |||
| } | |||
| .btn-default { | |||
| text-shadow: 0 1px 0 #fff; | |||
| background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); | |||
| background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); | |||
| background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
| background-repeat: repeat-x; | |||
| border-color: #dbdbdb; | |||
| border-color: #ccc; | |||
| } | |||
| .btn-default:hover, | |||
| .btn-default:focus { | |||
| background-color: #e0e0e0; | |||
| background-position: 0 -15px; | |||
| } | |||
| .btn-default:active, | |||
| .btn-default.active { | |||
| background-color: #e0e0e0; | |||
| border-color: #dbdbdb; | |||
| } | |||
| .btn-default.disabled, | |||
| .btn-default[disabled], | |||
| fieldset[disabled] .btn-default, | |||
| .btn-default.disabled:hover, | |||
| .btn-default[disabled]:hover, | |||
| fieldset[disabled] .btn-default:hover, | |||
| .btn-default.disabled:focus, | |||
| .btn-default[disabled]:focus, | |||
| fieldset[disabled] .btn-default:focus, | |||
| .btn-default.disabled.focus, | |||
| .btn-default[disabled].focus, | |||
| fieldset[disabled] .btn-default.focus, | |||
| .btn-default.disabled:active, | |||
| .btn-default[disabled]:active, | |||
| fieldset[disabled] .btn-default:active, | |||
| .btn-default.disabled.active, | |||
| .btn-default[disabled].active, | |||
| fieldset[disabled] .btn-default.active { | |||
| background-color: #e0e0e0; | |||
| background-image: none; | |||
| } | |||
| .btn-primary { | |||
| background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); | |||
| background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); | |||
| background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
| background-repeat: repeat-x; | |||
| border-color: #245580; | |||
| } | |||
| .btn-primary:hover, | |||
| .btn-primary:focus { | |||
| background-color: #265a88; | |||
| background-position: 0 -15px; | |||
| } | |||
| .btn-primary:active, | |||
| .btn-primary.active { | |||
| background-color: #265a88; | |||
| border-color: #245580; | |||
| } | |||
| .btn-primary.disabled, | |||
| .btn-primary[disabled], | |||
| fieldset[disabled] .btn-primary, | |||
| .btn-primary.disabled:hover, | |||
| .btn-primary[disabled]:hover, | |||
| fieldset[disabled] .btn-primary:hover, | |||
| .btn-primary.disabled:focus, | |||
| .btn-primary[disabled]:focus, | |||
| fieldset[disabled] .btn-primary:focus, | |||
| .btn-primary.disabled.focus, | |||
| .btn-primary[disabled].focus, | |||
| fieldset[disabled] .btn-primary.focus, | |||
| .btn-primary.disabled:active, | |||
| .btn-primary[disabled]:active, | |||
| fieldset[disabled] .btn-primary:active, | |||
| .btn-primary.disabled.active, | |||
| .btn-primary[disabled].active, | |||
| fieldset[disabled] .btn-primary.active { | |||
| background-color: #265a88; | |||
| background-image: none; | |||
| } | |||
| .btn-success { | |||
| background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); | |||
| background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); | |||
| background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
| background-repeat: repeat-x; | |||
| border-color: #3e8f3e; | |||
| } | |||
| .btn-success:hover, | |||
| .btn-success:focus { | |||
| background-color: #419641; | |||
| background-position: 0 -15px; | |||
| } | |||
| .btn-success:active, | |||
| .btn-success.active { | |||
| background-color: #419641; | |||
| border-color: #3e8f3e; | |||
| } | |||
| .btn-success.disabled, | |||
| .btn-success[disabled], | |||
| fieldset[disabled] .btn-success, | |||
| .btn-success.disabled:hover, | |||
| .btn-success[disabled]:hover, | |||
| fieldset[disabled] .btn-success:hover, | |||
| .btn-success.disabled:focus, | |||
| .btn-success[disabled]:focus, | |||
| fieldset[disabled] .btn-success:focus, | |||
| .btn-success.disabled.focus, | |||
| .btn-success[disabled].focus, | |||
| fieldset[disabled] .btn-success.focus, | |||
| .btn-success.disabled:active, | |||
| .btn-success[disabled]:active, | |||
| fieldset[disabled] .btn-success:active, | |||
| .btn-success.disabled.active, | |||
| .btn-success[disabled].active, | |||
| fieldset[disabled] .btn-success.active { | |||
| background-color: #419641; | |||
| background-image: none; | |||
| } | |||
| .btn-info { | |||
| background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); | |||
| background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); | |||
| background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
| background-repeat: repeat-x; | |||
| border-color: #28a4c9; | |||
| } | |||
| .btn-info:hover, | |||
| .btn-info:focus { | |||
| background-color: #2aabd2; | |||
| background-position: 0 -15px; | |||
| } | |||
| .btn-info:active, | |||
| .btn-info.active { | |||
| background-color: #2aabd2; | |||
| border-color: #28a4c9; | |||
| } | |||
| .btn-info.disabled, | |||
| .btn-info[disabled], | |||
| fieldset[disabled] .btn-info, | |||
| .btn-info.disabled:hover, | |||
| .btn-info[disabled]:hover, | |||
| fieldset[disabled] .btn-info:hover, | |||
| .btn-info.disabled:focus, | |||
| .btn-info[disabled]:focus, | |||
| fieldset[disabled] .btn-info:focus, | |||
| .btn-info.disabled.focus, | |||
| .btn-info[disabled].focus, | |||
| fieldset[disabled] .btn-info.focus, | |||
| .btn-info.disabled:active, | |||
| .btn-info[disabled]:active, | |||
| fieldset[disabled] .btn-info:active, | |||
| .btn-info.disabled.active, | |||
| .btn-info[disabled].active, | |||
| fieldset[disabled] .btn-info.active { | |||
| background-color: #2aabd2; | |||
| background-image: none; | |||
| } | |||
| .btn-warning { | |||
| background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); | |||
| background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); | |||
| background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
| background-repeat: repeat-x; | |||
| border-color: #e38d13; | |||
| } | |||
| .btn-warning:hover, | |||
| .btn-warning:focus { | |||
| background-color: #eb9316; | |||
| background-position: 0 -15px; | |||
| } | |||
| .btn-warning:active, | |||
| .btn-warning.active { | |||
| background-color: #eb9316; | |||
| border-color: #e38d13; | |||
| } | |||
| .btn-warning.disabled, | |||
| .btn-warning[disabled], | |||
| fieldset[disabled] .btn-warning, | |||
| .btn-warning.disabled:hover, | |||
| .btn-warning[disabled]:hover, | |||
| fieldset[disabled] .btn-warning:hover, | |||
| .btn-warning.disabled:focus, | |||
| .btn-warning[disabled]:focus, | |||
| fieldset[disabled] .btn-warning:focus, | |||
| .btn-warning.disabled.focus, | |||
| .btn-warning[disabled].focus, | |||
| fieldset[disabled] .btn-warning.focus, | |||
| .btn-warning.disabled:active, | |||
| .btn-warning[disabled]:active, | |||
| fieldset[disabled] .btn-warning:active, | |||
| .btn-warning.disabled.active, | |||
| .btn-warning[disabled].active, | |||
| fieldset[disabled] .btn-warning.active { | |||
| background-color: #eb9316; | |||
| background-image: none; | |||
| } | |||
| .btn-danger { | |||
| background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); | |||
| background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); | |||
| background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
| background-repeat: repeat-x; | |||
| border-color: #b92c28; | |||
| } | |||
| .btn-danger:hover, | |||
| .btn-danger:focus { | |||
| background-color: #c12e2a; | |||
| background-position: 0 -15px; | |||
| } | |||
| .btn-danger:active, | |||
| .btn-danger.active { | |||
| background-color: #c12e2a; | |||
| border-color: #b92c28; | |||
| } | |||
| .btn-danger.disabled, | |||
| .btn-danger[disabled], | |||
| fieldset[disabled] .btn-danger, | |||
| .btn-danger.disabled:hover, | |||
| .btn-danger[disabled]:hover, | |||
| fieldset[disabled] .btn-danger:hover, | |||
| .btn-danger.disabled:focus, | |||
| .btn-danger[disabled]:focus, | |||
| fieldset[disabled] .btn-danger:focus, | |||
| .btn-danger.disabled.focus, | |||
| .btn-danger[disabled].focus, | |||
| fieldset[disabled] .btn-danger.focus, | |||
| .btn-danger.disabled:active, | |||
| .btn-danger[disabled]:active, | |||
| fieldset[disabled] .btn-danger:active, | |||
| .btn-danger.disabled.active, | |||
| .btn-danger[disabled].active, | |||
| fieldset[disabled] .btn-danger.active { | |||
| background-color: #c12e2a; | |||
| background-image: none; | |||
| } | |||
| .thumbnail, | |||
| .img-thumbnail { | |||
| -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | |||
| box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | |||
| } | |||
| .dropdown-menu > li > a:hover, | |||
| .dropdown-menu > li > a:focus { | |||
| background-color: #e8e8e8; | |||
| background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); | |||
| background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); | |||
| background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .dropdown-menu > .active > a, | |||
| .dropdown-menu > .active > a:hover, | |||
| .dropdown-menu > .active > a:focus { | |||
| background-color: #2e6da4; | |||
| background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
| background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); | |||
| background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .navbar-default { | |||
| background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); | |||
| background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); | |||
| background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
| background-repeat: repeat-x; | |||
| border-radius: 4px; | |||
| -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); | |||
| box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); | |||
| } | |||
| .navbar-default .navbar-nav > .open > a, | |||
| .navbar-default .navbar-nav > .active > a { | |||
| background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); | |||
| background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); | |||
| background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); | |||
| box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); | |||
| } | |||
| .navbar-brand, | |||
| .navbar-nav > li > a { | |||
| text-shadow: 0 1px 0 rgba(255, 255, 255, .25); | |||
| } | |||
| .navbar-inverse { | |||
| background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); | |||
| background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); | |||
| background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | |||
| background-repeat: repeat-x; | |||
| border-radius: 4px; | |||
| } | |||
| .navbar-inverse .navbar-nav > .open > a, | |||
| .navbar-inverse .navbar-nav > .active > a { | |||
| background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); | |||
| background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); | |||
| background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); | |||
| box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); | |||
| } | |||
| .navbar-inverse .navbar-brand, | |||
| .navbar-inverse .navbar-nav > li > a { | |||
| text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); | |||
| } | |||
| .navbar-static-top, | |||
| .navbar-fixed-top, | |||
| .navbar-fixed-bottom { | |||
| border-radius: 0; | |||
| } | |||
| @media (max-width: 767px) { | |||
| .navbar .navbar-nav .open .dropdown-menu > .active > a, | |||
| .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, | |||
| .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { | |||
| color: #fff; | |||
| background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
| background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); | |||
| background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| } | |||
| .alert { | |||
| text-shadow: 0 1px 0 rgba(255, 255, 255, .2); | |||
| -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); | |||
| box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); | |||
| } | |||
| .alert-success { | |||
| background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); | |||
| background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); | |||
| background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| border-color: #b2dba1; | |||
| } | |||
| .alert-info { | |||
| background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); | |||
| background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); | |||
| background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| border-color: #9acfea; | |||
| } | |||
| .alert-warning { | |||
| background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); | |||
| background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); | |||
| background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| border-color: #f5e79e; | |||
| } | |||
| .alert-danger { | |||
| background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); | |||
| background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); | |||
| background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| border-color: #dca7a7; | |||
| } | |||
| .progress { | |||
| background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); | |||
| background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); | |||
| background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .progress-bar { | |||
| background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); | |||
| background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); | |||
| background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .progress-bar-success { | |||
| background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); | |||
| background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); | |||
| background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .progress-bar-info { | |||
| background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); | |||
| background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); | |||
| background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .progress-bar-warning { | |||
| background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); | |||
| background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); | |||
| background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .progress-bar-danger { | |||
| background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); | |||
| background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); | |||
| background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .progress-bar-striped { | |||
| background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); | |||
| background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); | |||
| background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); | |||
| } | |||
| .list-group { | |||
| border-radius: 4px; | |||
| -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | |||
| box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | |||
| } | |||
| .list-group-item.active, | |||
| .list-group-item.active:hover, | |||
| .list-group-item.active:focus { | |||
| text-shadow: 0 -1px 0 #286090; | |||
| background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); | |||
| background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); | |||
| background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| border-color: #2b669a; | |||
| } | |||
| .list-group-item.active .badge, | |||
| .list-group-item.active:hover .badge, | |||
| .list-group-item.active:focus .badge { | |||
| text-shadow: none; | |||
| } | |||
| .panel { | |||
| -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); | |||
| box-shadow: 0 1px 2px rgba(0, 0, 0, .05); | |||
| } | |||
| .panel-default > .panel-heading { | |||
| background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); | |||
| background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); | |||
| background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .panel-primary > .panel-heading { | |||
| background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
| background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); | |||
| background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .panel-success > .panel-heading { | |||
| background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); | |||
| background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); | |||
| background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .panel-info > .panel-heading { | |||
| background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); | |||
| background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); | |||
| background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .panel-warning > .panel-heading { | |||
| background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); | |||
| background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); | |||
| background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .panel-danger > .panel-heading { | |||
| background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); | |||
| background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); | |||
| background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| } | |||
| .well { | |||
| background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); | |||
| background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); | |||
| background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); | |||
| background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); | |||
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); | |||
| background-repeat: repeat-x; | |||
| border-color: #dcdcdc; | |||
| -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); | |||
| box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); | |||
| } | |||
| /*# sourceMappingURL=bootstrap-theme.css.map */ | |||
| @ -0,0 +1,105 @@ | |||
| /* | |||
| * Base structure | |||
| */ | |||
| /* Move down content because we have a fixed navbar that is 50px tall */ | |||
| body { | |||
| padding-top: 50px; | |||
| } | |||
| /* | |||
| * Global add-ons | |||
| */ | |||
| .sub-header { | |||
| padding-bottom: 10px; | |||
| border-bottom: 1px solid #eee; | |||
| } | |||
| /* | |||
| * Top navigation | |||
| * Hide default border to remove 1px line. | |||
| */ | |||
| .navbar-fixed-top { | |||
| border: 0; | |||
| } | |||
| /* | |||
| * Sidebar | |||
| */ | |||
| /* Hide for mobile, show later */ | |||
| .sidebar { | |||
| display: none; | |||
| } | |||
| @media (min-width: 768px) { | |||
| .sidebar { | |||
| position: fixed; | |||
| top: 51px; | |||
| bottom: 0; | |||
| left: 0; | |||
| z-index: 1000; | |||
| display: block; | |||
| padding: 20px; | |||
| overflow-x: hidden; | |||
| overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ | |||
| background-color: #f5f5f5; | |||
| border-right: 1px solid #eee; | |||
| } | |||
| } | |||
| /* Sidebar navigation */ | |||
| .nav-sidebar { | |||
| margin-right: -21px; /* 20px padding + 1px border */ | |||
| margin-bottom: 20px; | |||
| margin-left: -20px; | |||
| } | |||
| .nav-sidebar > li > a { | |||
| padding-right: 20px; | |||
| padding-left: 20px; | |||
| } | |||
| .nav-sidebar > .active > a, | |||
| .nav-sidebar > .active > a:hover, | |||
| .nav-sidebar > .active > a:focus { | |||
| color: #fff; | |||
| background-color: #428bca; | |||
| } | |||
| /* | |||
| * Main content | |||
| */ | |||
| .main { | |||
| padding: 20px; | |||
| } | |||
| @media (min-width: 768px) { | |||
| .main { | |||
| padding-right: 40px; | |||
| padding-left: 40px; | |||
| } | |||
| } | |||
| .main .page-header { | |||
| margin-top: 0; | |||
| } | |||
| /* | |||
| * Placeholder dashboard ideas | |||
| */ | |||
| .placeholders { | |||
| margin-bottom: 30px; | |||
| text-align: center; | |||
| } | |||
| .placeholders h4 { | |||
| margin-bottom: 0; | |||
| } | |||
| .placeholder { | |||
| margin-bottom: 20px; | |||
| } | |||
| .placeholder img { | |||
| display: inline-block; | |||
| border-radius: 50%; | |||
| } | |||
| @ -0,0 +1,13 @@ | |||
| /*! | |||
| * IE10 viewport hack for Surface/desktop Windows 8 bug | |||
| * Copyright 2014-2015 Twitter, Inc. | |||
| * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |||
| */ | |||
| /* | |||
| * See the Getting Started docs for more information: | |||
| * http://getbootstrap.com/getting-started/#support-ie10-width | |||
| */ | |||
| @-ms-viewport { width: device-width; } | |||
| @-o-viewport { width: device-width; } | |||
| @viewport { width: device-width; } | |||
| @ -0,0 +1,40 @@ | |||
| body { | |||
| padding-top: 40px; | |||
| padding-bottom: 40px; | |||
| background-color: #eee; | |||
| } | |||
| .form-signin { | |||
| max-width: 330px; | |||
| padding: 15px; | |||
| margin: 0 auto; | |||
| } | |||
| .form-signin .form-signin-heading, | |||
| .form-signin .checkbox { | |||
| margin-bottom: 10px; | |||
| } | |||
| .form-signin .checkbox { | |||
| font-weight: normal; | |||
| } | |||
| .form-signin .form-control { | |||
| position: relative; | |||
| height: auto; | |||
| -webkit-box-sizing: border-box; | |||
| -moz-box-sizing: border-box; | |||
| box-sizing: border-box; | |||
| padding: 10px; | |||
| font-size: 16px; | |||
| } | |||
| .form-signin .form-control:focus { | |||
| z-index: 2; | |||
| } | |||
| .form-signin input[type="email"] { | |||
| margin-bottom: -1px; | |||
| border-bottom-right-radius: 0; | |||
| border-bottom-left-radius: 0; | |||
| } | |||
| .form-signin input[type="password"] { | |||
| margin-bottom: 10px; | |||
| border-top-left-radius: 0; | |||
| border-top-right-radius: 0; | |||
| } | |||
| @ -0,0 +1,51 @@ | |||
| // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT | |||
| // IT'S JUST JUNK FOR OUR DOCS! | |||
| // ++++++++++++++++++++++++++++++++++++++++++ | |||
| /*! | |||
| * Copyright 2014-2015 Twitter, Inc. | |||
| * | |||
| * Licensed under the Creative Commons Attribution 3.0 Unported License. For | |||
| * details, see https://creativecommons.org/licenses/by/3.0/. | |||
| */ | |||
| // Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes. | |||
| (function () { | |||
| 'use strict'; | |||
| function emulatedIEMajorVersion() { | |||
| var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent) | |||
| if (groups === null) { | |||
| return null | |||
| } | |||
| var ieVersionNum = parseInt(groups[1], 10) | |||
| var ieMajorVersion = Math.floor(ieVersionNum) | |||
| return ieMajorVersion | |||
| } | |||
| function actualNonEmulatedIEMajorVersion() { | |||
| // Detects the actual version of IE in use, even if it's in an older-IE emulation mode. | |||
| // IE JavaScript conditional compilation docs: https://msdn.microsoft.com/library/121hztk3%28v=vs.94%29.aspx | |||
| // @cc_on docs: https://msdn.microsoft.com/library/8ka90k2e%28v=vs.94%29.aspx | |||
| var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // jshint ignore:line | |||
| if (jscriptVersion === undefined) { | |||
| return 11 // IE11+ not in emulation mode | |||
| } | |||
| if (jscriptVersion < 9) { | |||
| return 8 // IE8 (or lower; haven't tested on IE<8) | |||
| } | |||
| return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode | |||
| } | |||
| var ua = window.navigator.userAgent | |||
| if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) { | |||
| return // Opera, which might pretend to be IE | |||
| } | |||
| var emulated = emulatedIEMajorVersion() | |||
| if (emulated === null) { | |||
| return // Not IE | |||
| } | |||
| var nonEmulated = actualNonEmulatedIEMajorVersion() | |||
| if (emulated !== nonEmulated) { | |||
| window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!') | |||
| } | |||
| })(); | |||
| @ -0,0 +1,23 @@ | |||
| /*! | |||
| * IE10 viewport hack for Surface/desktop Windows 8 bug | |||
| * Copyright 2014-2015 Twitter, Inc. | |||
| * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |||
| */ | |||
| // See the Getting Started docs for more information: | |||
| // http://getbootstrap.com/getting-started/#support-ie10-width | |||
| (function () { | |||
| 'use strict'; | |||
| if (navigator.userAgent.match(/IEMobile\/10\.0/)) { | |||
| var msViewportStyle = document.createElement('style') | |||
| msViewportStyle.appendChild( | |||
| document.createTextNode( | |||
| '@-ms-viewport{width:auto!important}' | |||
| ) | |||
| ) | |||
| document.querySelector('head').appendChild(msViewportStyle) | |||
| } | |||
| })(); | |||
| @ -0,0 +1,13 @@ | |||
| // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT | |||
| // IT'S JUST JUNK FOR OUR DOCS! | |||
| // ++++++++++++++++++++++++++++++++++++++++++ | |||
| /*! | |||
| * Copyright 2011-2015 Twitter, Inc. | |||
| * | |||
| * Licensed under the Creative Commons Attribution 3.0 Unported License. For | |||
| * details, see https://creativecommons.org/licenses/by/3.0/. | |||
| */ | |||
| // Intended to prevent false-positive bug reports about responsive styling supposedly not working in IE8. | |||
| if (window.location.protocol == 'file:') { | |||
| window.alert('ERROR: Bootstrap\'s responsive CSS is disabled!\nSee getbootstrap.com/getting-started/#respond-file-proto for details.') | |||
| } | |||