aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-07-28 11:07:55 +0200
committerArthurHoaro <arthur@hoa.ro>2018-07-28 11:07:55 +0200
commit83faedadff76c5bdca036f39f13943f63b27e164 (patch)
tree6f44cede16ec6a60f10b9699e211e0818f06d2c8
parent1d9eb22a3df85b67fe6652c0876cd7382c2fb525 (diff)
parent658988f3aeba7a5a938783249ccf2765251e5597 (diff)
downloadShaarli-83faedadff76c5bdca036f39f13943f63b27e164.tar.gz
Shaarli-83faedadff76c5bdca036f39f13943f63b27e164.tar.zst
Shaarli-83faedadff76c5bdca036f39f13943f63b27e164.zip
Merge tag 'v0.9.7' into stable
Release v0.9.7
-rw-r--r--.docker/nginx.conf5
-rw-r--r--.docker/php-fpm.conf16
-rwxr-xr-x.docker/services.d/.s6-svscan/finish2
-rwxr-xr-x.docker/services.d/nginx/run2
-rwxr-xr-x.docker/services.d/php-fpm/run2
-rw-r--r--.docker/supervised.conf13
-rw-r--r--.dockerignore16
-rw-r--r--.editorconfig23
-rw-r--r--.gitattributes14
-rw-r--r--.github/mailmap17
-rw-r--r--.gitignore12
-rw-r--r--.htaccess16
-rw-r--r--.travis.yml8
-rw-r--r--AUTHORS51
-rw-r--r--CHANGELOG.md259
-rw-r--r--CONTRIBUTING.md10
-rw-r--r--COPYING34
-rw-r--r--Dockerfile65
-rw-r--r--Dockerfile.armhf50
-rw-r--r--Makefile120
-rw-r--r--README.md108
-rw-r--r--application/ApplicationUtils.php83
-rw-r--r--application/Base64Url.php34
-rw-r--r--application/Cache.php2
-rw-r--r--application/CachedPage.php4
-rw-r--r--application/FeedBuilder.php27
-rw-r--r--application/FileUtils.php81
-rw-r--r--application/History.php216
-rw-r--r--application/HttpUtils.php79
-rw-r--r--application/Languages.php169
-rw-r--r--application/LinkDB.php152
-rw-r--r--application/LinkFilter.php246
-rw-r--r--application/LinkUtils.php110
-rw-r--r--application/NetscapeBookmarkUtils.php61
-rw-r--r--application/PageBuilder.php40
-rw-r--r--application/PluginManager.php7
-rw-r--r--application/Router.php18
-rw-r--r--application/SessionManager.php83
-rw-r--r--application/ThemeUtils.php34
-rw-r--r--application/TimeZone.php101
-rw-r--r--application/Updater.php209
-rw-r--r--application/Url.php29
-rw-r--r--application/Utils.php284
-rw-r--r--application/api/ApiMiddleware.php138
-rw-r--r--application/api/ApiUtils.php137
-rw-r--r--application/api/controllers/ApiController.php71
-rw-r--r--application/api/controllers/History.php70
-rw-r--r--application/api/controllers/Info.php42
-rw-r--r--application/api/controllers/Links.php217
-rw-r--r--application/api/exceptions/ApiAuthorizationException.php34
-rw-r--r--application/api/exceptions/ApiBadParametersException.php19
-rw-r--r--application/api/exceptions/ApiException.php77
-rw-r--r--application/api/exceptions/ApiInternalException.php19
-rw-r--r--application/api/exceptions/ApiLinkNotFoundException.php32
-rw-r--r--application/config/ConfigIO.php7
-rw-r--r--application/config/ConfigJson.php28
-rw-r--r--application/config/ConfigManager.php73
-rw-r--r--application/config/ConfigPhp.php22
-rw-r--r--application/config/ConfigPlugin.php17
-rw-r--r--application/config/exception/MissingFieldConfigException.php23
-rw-r--r--application/config/exception/PluginConfigOrderException.php17
-rw-r--r--application/config/exception/UnauthorizedConfigException.php18
-rw-r--r--application/exceptions/IOException.php22
-rw-r--r--composer.json29
-rw-r--r--composer.lock2567
-rw-r--r--data/.htaccess12
-rw-r--r--doc/3rd-party-libraries.html86
-rw-r--r--doc/Backup,-restore,-import-and-export.html150
-rw-r--r--doc/Browsing-and-searching.html81
-rw-r--r--doc/Browsing-and-searching.md28
-rw-r--r--doc/Coding-guidelines.html73
-rw-r--r--doc/Coding-guidelines.md5
-rw-r--r--doc/Community-&-Related-software.html121
-rw-r--r--doc/Community-&-Related-software.md55
-rw-r--r--doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html163
-rw-r--r--doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md67
-rw-r--r--doc/Create-and-serve-multiple-Shaarlis-(farm).html157
-rw-r--r--doc/Create-and-serve-multiple-Shaarlis-(farm).md58
-rw-r--r--doc/Datastore-hacks.html122
-rw-r--r--doc/Datastore-hacks.md24
-rw-r--r--doc/Development.html110
-rw-r--r--doc/Development.md35
-rw-r--r--doc/Directory-structure.html133
-rw-r--r--doc/Docker.html242
-rw-r--r--doc/Docker.md157
-rw-r--r--doc/Download-CSS-styles-from-an-OPML-list.html255
-rw-r--r--doc/Download-CSS-styles-from-an-OPML-list.md155
-rw-r--r--doc/Download-and-Installation.html170
-rw-r--r--doc/Download-and-Installation.md102
-rw-r--r--doc/Example-patch---add-new-via-field-for-links.html252
-rw-r--r--doc/Example-patch---add-new-via-field-for-links.md190
-rw-r--r--doc/FAQ.html105
-rw-r--r--doc/Firefox-share.html93
-rw-r--r--doc/Firefox-share.md16
-rw-r--r--doc/GnuPG-signature.html173
-rw-r--r--doc/Home.html74
-rw-r--r--doc/Home.md14
-rw-r--r--doc/Plugin-System.html541
-rw-r--r--doc/Plugins.html154
-rw-r--r--doc/RSS-feeds.html97
-rw-r--r--doc/Release-Shaarli.html220
-rw-r--r--doc/Security.html133
-rw-r--r--doc/Security.md28
-rw-r--r--doc/Server-configuration.html443
-rw-r--r--doc/Server-requirements.html178
-rw-r--r--doc/Server-security.html173
-rw-r--r--doc/Shaarli-configuration.html295
-rw-r--r--doc/Shaarli-configuration.md211
-rw-r--r--doc/Sharing-button.html92
-rw-r--r--doc/Sharing-button.md31
-rw-r--r--doc/Static-analysis.html80
-rw-r--r--doc/Theming.html166
-rw-r--r--doc/Theming.md65
-rw-r--r--doc/Troubleshooting.html200
-rw-r--r--doc/Unit-tests.html212
-rw-r--r--doc/Upgrade-and-migration.html242
-rw-r--r--doc/Usage.html93
-rw-r--r--doc/Usage.md25
-rw-r--r--doc/_Footer.html68
-rw-r--r--doc/_Footer.md2
-rw-r--r--doc/_Sidebar.html115
-rw-r--r--doc/_Sidebar.md37
-rw-r--r--doc/config.json6
-rw-r--r--doc/github-markdown.css287
-rw-r--r--doc/md/3rd-party-libraries.md (renamed from doc/3rd-party-libraries.md)13
-rw-r--r--doc/md/Backup,-restore,-import-and-export.md (renamed from doc/Backup,-restore,-import-and-export.md)40
-rw-r--r--doc/md/Bookmarklet.md29
-rw-r--r--doc/md/Browsing-and-searching.md37
-rw-r--r--doc/md/Community-&-Related-software.md72
-rw-r--r--doc/md/Continuous-integration-tools.md28
-rw-r--r--doc/md/Development-guidelines.md10
-rw-r--r--doc/md/Directory-structure.md (renamed from doc/Directory-structure.md)3
-rw-r--r--doc/md/Download-and-Installation.md120
-rw-r--r--doc/md/FAQ.md (renamed from doc/FAQ.md)34
-rw-r--r--doc/md/Firefox-share.md20
-rw-r--r--doc/md/GnuPG-signature.md (renamed from doc/GnuPG-signature.md)31
-rw-r--r--doc/md/Plugin-System.md (renamed from doc/Plugin-System.md)299
-rw-r--r--doc/md/Plugins.md (renamed from doc/Plugins.md)22
-rw-r--r--doc/md/REST-API.md153
-rw-r--r--doc/md/RSS-feeds.md (renamed from doc/RSS-feeds.md)5
-rw-r--r--doc/md/Release-Shaarli.md (renamed from doc/Release-Shaarli.md)93
-rw-r--r--doc/md/Security.md25
-rw-r--r--doc/md/Server-configuration.md (renamed from doc/Server-configuration.md)104
-rw-r--r--doc/md/Server-requirements.md (renamed from doc/Server-requirements.md)43
-rw-r--r--doc/md/Server-security.md (renamed from doc/Server-security.md)16
-rw-r--r--doc/md/Shaarli-configuration.md244
-rw-r--r--doc/md/Static-analysis.md (renamed from doc/Static-analysis.md)13
-rw-r--r--doc/md/Theming.md85
-rw-r--r--doc/md/Translations.md152
-rw-r--r--doc/md/Troubleshooting.md (renamed from doc/Troubleshooting.md)95
-rw-r--r--doc/md/Unit-tests-Docker.md56
-rw-r--r--doc/md/Unit-tests.md (renamed from doc/Unit-tests.md)63
-rw-r--r--doc/md/Upgrade-and-migration.md (renamed from doc/Upgrade-and-migration.md)109
-rw-r--r--doc/md/Various-hacks.md33
-rw-r--r--doc/md/Versioning-and-Branches.md75
-rw-r--r--doc/md/docker/docker-101.md140
-rw-r--r--doc/md/docker/resources.md19
-rw-r--r--doc/md/docker/reverse-proxy-configuration.md120
-rw-r--r--doc/md/docker/shaarli-images.md95
-rw-r--r--doc/md/images/bookmarklet.png (renamed from doc/images/bookmarklet.png)bin53346 -> 53346 bytes
-rw-r--r--doc/md/images/doc-logo.png (renamed from doc/images/doc-logo.png)bin19543 -> 19543 bytes
-rw-r--r--doc/md/images/doc-logo.svg (renamed from doc/images/doc-logo.svg)0
-rw-r--r--doc/md/images/firefoxshare.png (renamed from doc/images/firefoxshare.png)bin757 -> 757 bytes
-rw-r--r--doc/md/images/install-shaarli.pngbin0 -> 44376 bytes
-rw-r--r--doc/md/images/poedit-1.jpgbin0 -> 72956 bytes
-rw-r--r--doc/md/images/rss-filter-1.png (renamed from doc/images/rss-filter-1.png)bin18682 -> 18682 bytes
-rw-r--r--doc/md/images/rss-filter-2.png (renamed from doc/images/rss-filter-2.png)bin15604 -> 15604 bytes
-rw-r--r--doc/md/index.md129
-rw-r--r--doc/sidebar.html50
-rw-r--r--images/squiggle.pngbin684 -> 0 bytes
-rw-r--r--inc/awesomplete-multiple-tags.js49
-rw-r--r--inc/awesomplete.js184
-rw-r--r--inc/awesomplete.min.js11
-rw-r--r--inc/languages/fr/LC_MESSAGES/shaarli.po1367
-rw-r--r--inc/plugin_admin.js50
-rw-r--r--index.php823
-rw-r--r--mkdocs.yml50
-rw-r--r--phpunit.xml20
-rw-r--r--plugins/TODO.md28
-rw-r--r--plugins/addlink_toolbar/addlink_toolbar.php19
-rw-r--r--plugins/archiveorg/archiveorg.html6
-rw-r--r--plugins/archiveorg/archiveorg.php11
-rw-r--r--plugins/demo_plugin/demo_plugin.php37
-rw-r--r--plugins/demo_plugin/languages/fr/LC_MESSAGES/demo.mobin0 -> 652 bytes
-rw-r--r--plugins/demo_plugin/languages/fr/LC_MESSAGES/demo.po21
-rw-r--r--plugins/isso/isso.php17
-rw-r--r--plugins/markdown/help.html6
-rw-r--r--plugins/markdown/markdown.css2
-rw-r--r--plugins/markdown/markdown.meta2
-rw-r--r--plugins/markdown/markdown.php58
-rw-r--r--plugins/piwik/piwik.html43
-rw-r--r--plugins/piwik/piwik.php36
-rw-r--r--plugins/playvideos/README.md2
-rw-r--r--plugins/playvideos/playvideos.php13
-rw-r--r--plugins/playvideos/youtube_playlist.js28
-rw-r--r--plugins/pubsubhubbub/README.md20
-rw-r--r--plugins/pubsubhubbub/hub.atom.xml1
-rw-r--r--plugins/pubsubhubbub/hub.rss.xml1
-rw-r--r--plugins/pubsubhubbub/pubsubhubbub.meta2
-rw-r--r--plugins/pubsubhubbub/pubsubhubbub.php111
-rw-r--r--plugins/qrcode/qrcode.meta2
-rw-r--r--plugins/qrcode/qrcode.php9
-rw-r--r--plugins/qrcode/shaarli-qrcode.js28
-rw-r--r--plugins/readityourself/book-open.pngbin568 -> 0 bytes
-rw-r--r--plugins/readityourself/readityourself.html1
-rw-r--r--plugins/readityourself/readityourself.meta2
-rw-r--r--plugins/readityourself/readityourself.php51
-rw-r--r--plugins/wallabag/WallabagInstance.php2
-rw-r--r--plugins/wallabag/wallabag.html6
-rw-r--r--plugins/wallabag/wallabag.php20
-rw-r--r--shaarli_version.php2
-rw-r--r--tests/ApplicationUtilsTest.php55
-rw-r--r--tests/FeedBuilderTest.php14
-rw-r--r--tests/FileUtilsTest.php108
-rw-r--r--tests/HistoryTest.php207
-rw-r--r--tests/HttpUtils/IsHttpsTest.php36
-rw-r--r--tests/HttpUtils/ServerUrlTest.php73
-rw-r--r--tests/LanguagesTest.php186
-rw-r--r--tests/LinkDBTest.php90
-rw-r--r--tests/LinkFilterTest.php102
-rw-r--r--tests/LinkUtilsTest.php269
-rw-r--r--tests/NetscapeBookmarkUtils/BookmarkImportTest.php144
-rw-r--r--tests/PluginManagerTest.php1
-rw-r--r--tests/SessionManagerTest.php149
-rw-r--r--tests/ThemeUtilsTest.php55
-rw-r--r--tests/TimeZoneTest.php83
-rw-r--r--tests/Updater/UpdaterTest.php187
-rw-r--r--tests/Url/CleanupUrlTest.php102
-rw-r--r--tests/Url/UrlTest.php8
-rw-r--r--tests/Url/WhitelistProtocolsTest.php63
-rw-r--r--tests/UtilsTest.php286
-rw-r--r--tests/api/ApiMiddlewareTest.php208
-rw-r--r--tests/api/ApiUtilsTest.php352
-rw-r--r--tests/api/controllers/DeleteLinkTest.php126
-rw-r--r--tests/api/controllers/GetLinkIdTest.php132
-rw-r--r--tests/api/controllers/GetLinksTest.php472
-rw-r--r--tests/api/controllers/HistoryTest.php216
-rw-r--r--tests/api/controllers/InfoTest.php115
-rw-r--r--tests/api/controllers/PostLinkTest.php216
-rw-r--r--tests/api/controllers/PutLinkTest.php222
-rw-r--r--tests/bootstrap.php6
-rw-r--r--tests/config/ConfigJsonTest.php13
-rw-r--r--tests/config/ConfigManagerTest.php9
-rw-r--r--tests/config/ConfigPhpTest.php19
-rw-r--r--tests/config/ConfigPluginTest.php10
-rw-r--r--tests/docker/alpine36/Dockerfile34
-rw-r--r--tests/docker/debian8/Dockerfile35
-rw-r--r--tests/docker/debian9/Dockerfile36
-rw-r--r--tests/docker/ubuntu16/Dockerfile36
-rw-r--r--tests/languages/bootstrap.php6
-rw-r--r--tests/languages/de/UtilsDeTest.php119
-rw-r--r--tests/languages/en/UtilsEnTest.php119
-rw-r--r--tests/languages/fr/LanguagesFrTest.php175
-rw-r--r--tests/languages/fr/UtilsFrTest.php119
-rw-r--r--tests/plugins/PluginAddlinkTest.php46
-rw-r--r--tests/plugins/PluginArchiveorgTest.php10
-rw-r--r--tests/plugins/PluginIssoTest.php15
-rw-r--r--tests/plugins/PluginMarkdownTest.php30
-rw-r--r--tests/plugins/PluginPlayvideosTest.php6
-rw-r--r--tests/plugins/PluginPubsubhubbubTest.php55
-rw-r--r--tests/plugins/PluginQrcodeTest.php (renamed from tests/plugins/PlugQrcodeTest.php)13
-rw-r--r--tests/plugins/PluginReadityourselfTest.php98
-rw-r--r--tests/plugins/PluginWallabagTest.php9
-rw-r--r--tests/plugins/WallabagInstanceTest.php8
-rw-r--r--tests/plugins/resources/markdown.html11
-rw-r--r--tests/plugins/resources/markdown.md12
-rw-r--r--tests/utils/FakeConfigManager.php12
-rw-r--r--tests/utils/ReferenceHistory.php82
-rw-r--r--tests/utils/ReferenceLinkDB.php51
-rw-r--r--tests/utils/config/configJson.json.php3
-rw-r--r--tests/utils/config/emptyConfigPhp.php1
-rw-r--r--tests/utils/languages/fr/LC_MESSAGES/test.mobin0 -> 456 bytes
-rw-r--r--tests/utils/languages/fr/LC_MESSAGES/test.po19
-rw-r--r--tpl/default/404.html16
-rw-r--r--tpl/default/addlink.html24
-rw-r--r--tpl/default/changepassword.html28
-rw-r--r--tpl/default/changetag.html40
-rw-r--r--tpl/default/configure.html256
-rw-r--r--tpl/default/css/font-awesome.css2086
-rw-r--r--tpl/default/css/font-awesome.min.css4
-rw-r--r--tpl/default/css/grids-responsive.css861
-rw-r--r--tpl/default/css/grids-responsive.min.css7
-rw-r--r--tpl/default/css/pure-extras.css262
-rw-r--r--tpl/default/css/pure.css1475
-rw-r--r--tpl/default/css/pure.min.css11
-rw-r--r--tpl/default/css/shaarli.css1348
-rw-r--r--tpl/default/daily.html113
-rw-r--r--tpl/default/dailyrss.html16
-rw-r--r--tpl/default/editlink.html80
-rw-r--r--tpl/default/export.bookmarks.html10
-rw-r--r--tpl/default/export.html68
-rw-r--r--tpl/default/feed.atom.html (renamed from tpl/feed.atom.html)11
-rw-r--r--tpl/default/feed.rss.html (renamed from tpl/feed.rss.html)10
-rw-r--r--tpl/default/fonts/FontAwesome.otfbin0 -> 134808 bytes
-rw-r--r--tpl/default/fonts/Roboto-Bold.woffbin0 -> 89584 bytes
-rw-r--r--tpl/default/fonts/Roboto-Bold.woff2bin0 -> 63320 bytes
-rw-r--r--tpl/default/fonts/Roboto-Regular.woffbin0 -> 89732 bytes
-rw-r--r--tpl/default/fonts/Roboto-Regular.woff2bin0 -> 63412 bytes
-rw-r--r--tpl/default/fonts/fontawesome-webfont.eotbin0 -> 165742 bytes
-rw-r--r--tpl/default/fonts/fontawesome-webfont.svg2671
-rw-r--r--tpl/default/fonts/fontawesome-webfont.ttfbin0 -> 165548 bytes
-rw-r--r--tpl/default/fonts/fontawesome-webfont.woffbin0 -> 98024 bytes
-rw-r--r--tpl/default/fonts/fontawesome-webfont.woff2bin0 -> 77160 bytes
-rw-r--r--tpl/default/img/apple-touch-icon.pngbin0 -> 18276 bytes
-rw-r--r--tpl/default/img/favicon.pngbin0 -> 41600 bytes
-rw-r--r--tpl/default/img/icon.pngbin0 -> 530 bytes
-rw-r--r--tpl/default/img/sad_star.pngbin0 -> 7099 bytes
-rw-r--r--tpl/default/import.html86
-rw-r--r--tpl/default/includes.html21
-rw-r--r--tpl/default/install.html168
-rw-r--r--tpl/default/js/shaarli.js664
-rw-r--r--tpl/default/linklist.html273
-rw-r--r--tpl/default/linklist.paging.html61
-rw-r--r--tpl/default/loginform.html51
-rw-r--r--tpl/default/opensearch.html (renamed from tpl/opensearch.html)0
-rw-r--r--tpl/default/page.footer.html43
-rw-r--r--tpl/default/page.header.html172
-rw-r--r--tpl/default/picwall.html45
-rw-r--r--tpl/default/pluginsadmin.html182
-rw-r--r--tpl/default/tag.cloud.html71
-rw-r--r--tpl/default/tag.list.html91
-rw-r--r--tpl/default/tag.sort.html8
-rw-r--r--tpl/default/tools.html166
-rw-r--r--tpl/install.html23
-rw-r--r--tpl/vintage/404.html (renamed from tpl/404.html)0
-rw-r--r--tpl/vintage/addlink.html (renamed from tpl/addlink.html)0
-rw-r--r--tpl/vintage/changepassword.html (renamed from tpl/changepassword.html)0
-rw-r--r--tpl/vintage/changetag.html (renamed from tpl/changetag.html)2
-rw-r--r--tpl/vintage/configure.html (renamed from tpl/configure.html)54
-rw-r--r--tpl/vintage/css/reset.css (renamed from inc/reset.css)0
-rw-r--r--tpl/vintage/css/shaarli.css (renamed from inc/shaarli.css)22
-rw-r--r--tpl/vintage/daily.html (renamed from tpl/daily.html)8
-rw-r--r--tpl/vintage/dailyrss.html (renamed from tpl/dailyrss.html)0
-rw-r--r--tpl/vintage/editlink.html (renamed from tpl/editlink.html)12
-rw-r--r--tpl/vintage/export.bookmarks.html (renamed from tpl/export.bookmarks.html)0
-rw-r--r--tpl/vintage/export.html (renamed from tpl/export.html)0
-rw-r--r--tpl/vintage/feed.atom.html42
-rw-r--r--tpl/vintage/feed.rss.html39
-rw-r--r--tpl/vintage/images/50pc_transparent.png (renamed from images/50pc_transparent.png)bin599 -> 599 bytes
-rw-r--r--tpl/vintage/images/Paper_texture_v5_by_bashcorpo_w1000.jpg (renamed from images/Paper_texture_v5_by_bashcorpo_w1000.jpg)bin127449 -> 127449 bytes
-rw-r--r--tpl/vintage/images/calendar.png (renamed from images/calendar.png)bin650 -> 650 bytes
-rw-r--r--tpl/vintage/images/floral_left.png (renamed from images/floral_left.png)bin1284 -> 1284 bytes
-rw-r--r--tpl/vintage/images/floral_right.png (renamed from images/floral_right.png)bin1309 -> 1309 bytes
-rw-r--r--tpl/vintage/images/private.png (renamed from images/private.png)bin813 -> 813 bytes
-rw-r--r--tpl/vintage/images/squiggle.png (renamed from images/squiggle2.png)bin720 -> 720 bytes
-rw-r--r--tpl/vintage/images/squiggle_closing.png (renamed from images/squiggle_closing.png)bin1244 -> 1244 bytes
-rw-r--r--tpl/vintage/images/tag_blue.png (renamed from images/tag_blue.png)bin714 -> 714 bytes
-rw-r--r--tpl/vintage/import.html (renamed from tpl/import.html)2
-rw-r--r--tpl/vintage/includes.html (renamed from tpl/includes.html)6
-rw-r--r--tpl/vintage/install.html59
-rw-r--r--tpl/vintage/js/shaarli.js32
-rw-r--r--tpl/vintage/linklist.html (renamed from tpl/linklist.html)14
-rw-r--r--tpl/vintage/linklist.paging.html (renamed from tpl/linklist.paging.html)0
-rw-r--r--tpl/vintage/loginform.html (renamed from tpl/loginform.html)4
-rw-r--r--tpl/vintage/opensearch.html45
-rw-r--r--tpl/vintage/page.footer.html (renamed from tpl/page.footer.html)1
-rw-r--r--tpl/vintage/page.header.html (renamed from tpl/page.header.html)4
-rw-r--r--tpl/vintage/page.html (renamed from tpl/page.html)0
-rw-r--r--tpl/vintage/picwall.html (renamed from tpl/picwall.html)0
-rw-r--r--tpl/vintage/pluginsadmin.html (renamed from tpl/pluginsadmin.html)0
-rw-r--r--tpl/vintage/readme.txt (renamed from tpl/readme.txt)0
-rw-r--r--tpl/vintage/tag.cloud.html (renamed from tpl/tagcloud.html)2
-rw-r--r--tpl/vintage/tools.html (renamed from tpl/tools.html)20
363 files changed, 27557 insertions, 9906 deletions
diff --git a/.docker/nginx.conf b/.docker/nginx.conf
index e8754d9b..07fba33f 100644
--- a/.docker/nginx.conf
+++ b/.docker/nginx.conf
@@ -1,6 +1,7 @@
1user www-data www-data; 1user nginx nginx;
2daemon off; 2daemon off;
3worker_processes 4; 3worker_processes 4;
4pid /var/run/nginx.pid;
4 5
5events { 6events {
6 worker_connections 768; 7 worker_connections 768;
@@ -59,7 +60,7 @@ http {
59 fastcgi_split_path_info ^(.+\.php)(/.+)$; 60 fastcgi_split_path_info ^(.+\.php)(/.+)$;
60 61
61 # filter and proxy PHP requests to PHP-FPM 62 # filter and proxy PHP requests to PHP-FPM
62 fastcgi_pass unix:/var/run/php5-fpm.sock; 63 fastcgi_pass unix:/var/run/php-fpm.sock;
63 fastcgi_index index.php; 64 fastcgi_index index.php;
64 include fastcgi.conf; 65 include fastcgi.conf;
65 } 66 }
diff --git a/.docker/php-fpm.conf b/.docker/php-fpm.conf
new file mode 100644
index 00000000..0843c164
--- /dev/null
+++ b/.docker/php-fpm.conf
@@ -0,0 +1,16 @@
1[global]
2daemonize = no
3
4[www]
5user = nginx
6group = nginx
7listen.owner = nginx
8listen.group = nginx
9catch_workers_output = yes
10listen = /var/run/php-fpm.sock
11pm = dynamic
12pm.max_children = 20
13pm.start_servers = 1
14pm.min_spare_servers = 1
15pm.max_spare_servers = 3
16pm.max_requests = 2048
diff --git a/.docker/services.d/.s6-svscan/finish b/.docker/services.d/.s6-svscan/finish
new file mode 100755
index 00000000..1dadeeaf
--- /dev/null
+++ b/.docker/services.d/.s6-svscan/finish
@@ -0,0 +1,2 @@
1#!/bin/sh
2/bin/true
diff --git a/.docker/services.d/nginx/run b/.docker/services.d/nginx/run
new file mode 100755
index 00000000..21e7b0d6
--- /dev/null
+++ b/.docker/services.d/nginx/run
@@ -0,0 +1,2 @@
1#!/bin/execlineb -P
2nginx
diff --git a/.docker/services.d/php-fpm/run b/.docker/services.d/php-fpm/run
new file mode 100755
index 00000000..21dd0107
--- /dev/null
+++ b/.docker/services.d/php-fpm/run
@@ -0,0 +1,2 @@
1#!/bin/execlineb -P
2php-fpm7 -F
diff --git a/.docker/supervised.conf b/.docker/supervised.conf
deleted file mode 100644
index 5acd9795..00000000
--- a/.docker/supervised.conf
+++ /dev/null
@@ -1,13 +0,0 @@
1[program:php5-fpm]
2command=/usr/sbin/php5-fpm -F
3priority=5
4autostart=true
5autorestart=true
6
7[program:nginx]
8command=/usr/sbin/nginx
9priority=10
10autostart=true
11autorestart=true
12stdout_events_enabled=true
13stderr_events_enabled=true
diff --git a/.dockerignore b/.dockerignore
index 9a18e085..cdd0a894 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,5 +1,7 @@
1# Docker-ignore 1# Docker-ignore
2# Note: .git/ is kept for HTML documentation generation 2.dev
3.git
4.github
3tests 5tests
4 6
5# Shaarli runtime resources 7# Shaarli runtime resources
@@ -17,12 +19,12 @@ tmp/*
17*.rtpl.php 19*.rtpl.php
18 20
19# 3rd-party dependencies 21# 3rd-party dependencies
20composer.lock
21vendor/ 22vendor/
22 23
23# Release archives 24# Release archives
24*.tar 25*.tar.gz
25*.zip 26*.zip
27inc/languages/*/LC_MESSAGES/shaarli.mo
26 28
27# Development and test resources 29# Development and test resources
28coverage 30coverage
@@ -32,3 +34,11 @@ phpmd.html
32 34
33# User plugin configuration 35# User plugin configuration
34plugins/*/config.php 36plugins/*/config.php
37
38# HTML documentation
39doc/html/
40
41# 3rd party themes
42tpl/*
43!tpl/default
44!tpl/vintage
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..4a6589a2
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,23 @@
1# EditorConfig: http://EditorConfig.org
2
3root = true
4
5[*]
6charset = utf-8
7end_of_line = lf
8insert_final_newline = true
9trim_trailing_whitespace = true
10indent_style = space
11indent_size = 4
12
13[*.{htaccess,html,xml}]
14indent_size = 2
15
16[*.php]
17max_line_length = 100
18
19[Dockerfile]
20max_line_length = 80
21
22[Makefile]
23indent_style = tab
diff --git a/.gitattributes b/.gitattributes
index a3a22a15..00070561 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -10,23 +10,33 @@
10*.php text diff=php 10*.php text diff=php
11Dockerfile text 11Dockerfile text
12 12
13# Do not alter images nor minified scripts 13# Do not alter images nor minified scripts nor fonts
14*.ico binary 14*.ico binary
15*.jpg binary 15*.jpg binary
16*.png binary 16*.png binary
17*.svg binary
18*.otf binary
19*.eot binary
20*.woff binary
21*.woff2 binary
22*.ttf binary
17*.min.css binary 23*.min.css binary
18*.min.js binary 24*.min.js binary
25*.mo binary
19 26
20# Exclude from Git archives 27# Exclude from Git archives
28.editorconfig export-ignore
21.gitattributes export-ignore 29.gitattributes export-ignore
30.github export-ignore
22.gitignore export-ignore 31.gitignore export-ignore
23.travis.yml export-ignore 32.travis.yml export-ignore
24doc/**/*.json export-ignore 33doc/**/*.json export-ignore
25doc/**/*.md export-ignore 34doc/**/*.md export-ignore
26.docker/ export-ignore 35.docker/ export-ignore
27.dockerignore export-ignore 36.dockerignore export-ignore
28Dockerfile export-ignore 37Dockerfile* export-ignore
29Doxyfile export-ignore 38Doxyfile export-ignore
30Makefile export-ignore 39Makefile export-ignore
40mkdocs.yml export-ignore
31phpunit.xml export-ignore 41phpunit.xml export-ignore
32tests/ export-ignore 42tests/ export-ignore
diff --git a/.github/mailmap b/.github/mailmap
new file mode 100644
index 00000000..7633afcf
--- /dev/null
+++ b/.github/mailmap
@@ -0,0 +1,17 @@
1ArthurHoaro <arthur@hoa.ro>
2Florian Eula <eula.florian@gmail.com> feula
3Florian Eula <eula.florian@gmail.com> <mr.pikzen@gmail.com>
4Immánuel Fodor <immanuelfactor+github@gmail.com>
5kalvn <kalvnthereal@gmail.com> <kalvn@users.noreply.github.com>
6Nicolas Danelon <hi@nicolasmd.com.ar> nicolasm
7Nicolas Danelon <hi@nicolasmd.com.ar> <nda@3818.com.ar>
8Nicolas Danelon <hi@nicolasmd.com.ar> <nicolasdanelon@gmail.com>
9Nicolas Danelon <hi@nicolasmd.com.ar> <nicolasdanelon@users.noreply.github.com>
10Sébastien Sauvage <sebsauvage@sebsauvage.net>
11Timo Van Neerden <fire@lehollandaisvolant.net>
12Timo Van Neerden <fire@lehollandaisvolant.net> lehollandaisvolant <levoltigeurhollandais@gmail.com>
13VirtualTam <virtualtam@flibidi.net> <tamisier.aurelien@gmail.com>
14VirtualTam <virtualtam@flibidi.net> <virtualtam+github@flibidi.net>
15VirtualTam <virtualtam@flibidi.net> <virtualtam@flibidi.org>
16Willi Eggeling <thewilli@gmail.com> <mail@wje-online.de>
17Willi Eggeling <thewilli@gmail.com> <thewilli@users.noreply.github.com>
diff --git a/.gitignore b/.gitignore
index 095aaded..3f6939a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,12 +13,12 @@ pagecache
13*.rtpl.php 13*.rtpl.php
14 14
15# 3rd-party dependencies 15# 3rd-party dependencies
16composer.lock
17vendor/ 16vendor/
18 17
19# Release archives 18# Release archives
20*.tar 19*.tar.gz
21*.zip 20*.zip
21inc/languages/*/LC_MESSAGES/shaarli.mo
22 22
23# Development and test resources 23# Development and test resources
24coverage 24coverage
@@ -28,3 +28,11 @@ phpmd.html
28 28
29# User plugin configuration 29# User plugin configuration
30plugins/*/config.php 30plugins/*/config.php
31
32# HTML documentation
33doc/html/
34
35# 3rd party themes
36tpl/*
37!tpl/default
38!tpl/vintage
diff --git a/.htaccess b/.htaccess
new file mode 100644
index 00000000..7ba4744b
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,16 @@
1# Disable directory listing
2Options -Indexes
3
4RewriteEngine On
5
6# Prevent accessing subdirectories not managed by SCM
7RewriteRule ^(.git|doxygen|vendor) - [F]
8
9# Forward the "Authorization" HTTP header
10RewriteCond %{HTTP:Authorization} ^(.*)
11RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
12
13# REST API
14RewriteCond %{REQUEST_FILENAME} !-f
15RewriteCond %{REQUEST_FILENAME} !-d
16RewriteRule ^ index.php [QSA,L]
diff --git a/.travis.yml b/.travis.yml
index e59c8f6a..322e4337 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,5 @@
1sudo: false 1sudo: false
2dist: trusty
2language: php 3language: php
3cache: 4cache:
4 directories: 5 directories:
@@ -8,12 +9,13 @@ php:
8 - 7.0 9 - 7.0
9 - 5.6 10 - 5.6
10 - 5.5 11 - 5.5
11 - 5.4
12 # - 5.3 # Not supported by Travis CI
13install: 12install:
14 - composer self-update 13 - composer self-update
15 - composer install --prefer-dist 14 - composer install --prefer-dist
15 - locale -a
16before_script:
17 - PATH=${PATH//:\.\/node_modules\/\.bin/}
16script: 18script:
17 - make clean 19 - make clean
18 - make check_permissions 20 - make check_permissions
19 - make test 21 - make all_tests
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 00000000..c0414c0e
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,51 @@
1 588 ArthurHoaro <arthur@hoa.ro>
2 283 VirtualTam <virtualtam@flibidi.net>
3 179 nodiscc <nodiscc@gmail.com>
4 56 Sébastien Sauvage <sebsauvage@sebsauvage.net>
5 15 Florian Eula <eula.florian@gmail.com>
6 13 Emilien Klein <emilien@klein.st>
7 12 Nicolas Danelon <hi@nicolasmd.com.ar>
8 9 Willi Eggeling <thewilli@gmail.com>
9 8 Christophe HENRY <christophe.henry@sbgodin.fr>
10 6 B. van Berkum <dev@dotmpe.com>
11 5 Lucas Cimon <lucas.cimon@gmail.com>
12 4 Alexandre Alapetite <alexandre@alapetite.fr>
13 4 David Sferruzza <david.sferruzza@gmail.com>
14 4 Immánuel Fodor <immanuelfactor+github@gmail.com>
15 4 kalvn <kalvnthereal@gmail.com>
16 3 Teromene <teromene@teromene.fr>
17 2 Chris Kuethe <chris.kuethe@gmail.com>
18 2 Knah Tsaeb <Knah-Tsaeb@knah-tsaeb.org>
19 2 Mathieu Chabanon <git@matchab.fr>
20 2 Miloš Jovanović <mjovanovic@gmail.com>
21 2 Qwerty <champlywood@free.fr>
22 2 Stephen Muth <smuth4@gmail.com>
23 2 Timo Van Neerden <fire@lehollandaisvolant.net>
24 2 julienCXX <software@chmodplusx.eu>
25 2 philipp-r <philipp-r@users.noreply.github.com>
26 1 Adrien Oliva <adrien.oliva@yapbreak.fr>
27 1 Alexis J <alexis@effingo.be>
28 1 BoboTiG <bobotig@gmail.com>
29 1 Bronco <bronco@warriordudimanche.net>
30 1 D Low <daniellowtw@gmail.com>
31 1 Daniel Jakots <vigdis@chown.me>
32 1 Dimtion <zizou.xena@gmail.com>
33 1 Fanch <fanch-github@qth.fr>
34 1 Felix Bartels <felix@host-consultants.de>
35 1 Felix Kästner <github.com-fpunktk@fpunktk.de>
36 1 Florian Voigt <flvoigt@me.com>
37 1 Franck Kerbiriou <FranckKe@users.noreply.github.com>
38 1 Gary Marigliano <gmarigliano93@gmail.com>
39 1 Guillaume Virlet <github@virlet.org>
40 1 Jonathan Druart <jonathan.druart@gmail.com>
41 1 Julien Pivotto <roidelapluie@inuits.eu>
42 1 Kevin Canévet <kevin@streamroot.io>
43 1 Knah Tsaeb <knah-tsaeb@knah-tsaeb.org>
44 1 Lionel Martin <renarddesmers@gmail.com>
45 1 Mark Gerarts <mark.gerarts@gmail.com>
46 1 Marsup <marsup@gmail.com>
47 1 Neros <contact@neros.fr>
48 1 Sbgodin <Sbgodin@users.noreply.github.com>
49 1 TsT <tst2005@gmail.com>
50 1 dimtion <zizou.xena@gmail.com>
51 1 durcheinandr <jochen@durcheinandr.de>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a945715d..9c1581d4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,179 @@ All notable changes to this project will be documented in this file.
4The format is based on [Keep a Changelog](http://keepachangelog.com/) 4The format is based on [Keep a Changelog](http://keepachangelog.com/)
5and this project adheres to [Semantic Versioning](http://semver.org/). 5and this project adheres to [Semantic Versioning](http://semver.org/).
6 6
7## [v0.9.7](https://github.com/shaarli/Shaarli/releases/tag/v0.9.7) - 2018-06-20
8### Changed
9- Build the Docker images from the local Git sources
10
11
12## [v0.9.6](https://github.com/shaarli/Shaarli/releases/tag/v0.9.6) - 2018-03-25
13### Changed
14- htaccess: prevent accessing resources not managed by SCM
15- htaccess: always forward the 'Authorization' HTTP header
16
17
18## [v0.9.5](https://github.com/shaarli/Shaarli/releases/tag/v0.9.5) - 2018-02-02
19### Fixed
20- Fix a warning happening when `php-intl` is not installed on the system
21- Fix warnings happening when updating from legacy SebSauvage version
22
23## [v0.9.4](https://github.com/shaarli/Shaarli/releases/tag/v0.9.4) - 2018-01-30
24### Added
25- Enable translations: Shaarli is now also available in French. Other language translations are welcome!
26- Add EditorConfig configuration
27- Add favicons for mobile devices
28- Add Alpine Linux arm32v7 Dockerfiles (master, latest)
29
30### Changed
31- Do not write bookmark edition history during file imports (performance)
32- Migrate Docker images (master, latest) to Alpine Linux
33- Improve unitary tests and code coverage
34- Improve thumbnail display
35- Improve theme ergonomics
36- Improve messages if there is no plugin or parameter available in the admin page
37- Increase buffer size for cURL download
38- Force HTTPS if the original port is 443 behind a reverse proxy (workaround)
39- Improve page title retrieval performances
40
41### Removed
42- Remove redirector setting from Configure page
43
44### Fixed
45- Fix broken links in the documentation
46- Enable access to `data/user.css` (Apache 2.2 & 2.4)
47- Don't URL encode description links if parameter `redirector.encode_url` is set to false
48- Fix an issue preventing the Save button to appear for plugin parameters
49
50
51## [v0.9.3](https://github.com/shaarli/Shaarli/releases/tag/v0.9.3) - 2018-01-04
52**XSS vulnerability fixed. Please update.**
53
54## Security
55- Fix an XSS (cross-site-scripting) vulnerability in `index.php` -
56 [CVE-2018-5249](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-5249)
57
58
59## [v0.9.2](https://github.com/shaarli/Shaarli/releases/tag/v0.9.2) - 2017-10-07
60
61**Major security issue fixed. Please update.**
62
63### Added
64- Tag search now supports wildcards `*`
65- New setting `privacy.force_login` which can be used with `privacy.hide_public_links` to redirect anonymous users to the login page.
66- New setting `general.default_note_title` used to override default `Note:` title prefix for notes.
67- Add a version hash for asset loading to prevent browser's cache issue
68
69### Changed
70- The "Remember me" checkbox is unchecked by default
71- The default value of the "Remember me" checkbox can be configured under `data/config.json.php`
72
73### Removed
74- Remove obsolete PHP magic quote support
75
76### Fixed
77- Generates a permalink URL if the URL is set to blank
78- Replace links to the old GitHub wiki with ReadTheDocs URIs
79- Use single quotes in the note bookmarklet
80- Daily page if there is no link
81- Bulk link deletion with a single link
82- HTTPS detection behind a reverse proxy
83- Travis tests environment and localization
84- Improve template paths robustness (trailing slash)
85- Robustness: safer gzinflate/zlib usage
86- Description links parsing with parenthesis (without Markdown)
87- Templates:
88 - Sort the tag cloud alphabetically
89 - Firefox social title
90 - Improved visited link color
91 - Fix jumpy textarea with long content in post edit
92
93### Security
94
95- Fixed reflected XSS vulnerability introduced in v0.9.1, discovered by @chb9 ([CVE-2017-15215](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-15215)).
96
97
98## [v0.9.1](https://github.com/shaarli/Shaarli/releases/tag/v0.9.1) - 2017-08-23
99
100The documentation has been migrated to ReadTheDocs:
101- https://shaarli.readthedocs.io/
102- edits are submitted as pull requests
103
104### Added
105- Allow bulk link deletion
106- Display subtags in the tag cloud
107- Add an endpoint to refresh the token
108- Add a token on every page
109- Add a tag list view for management
110- Add Note bookmarklet
111- Add creation date when editing a link
112
113### Changed
114- Documentation:
115 - Generate static HTML documentation with [mkdocs](http://www.mkdocs.org/)
116 - Host documentation on [ReadTheDocs](http://www.mkdocs.org/)
117 - Update documentation structure
118 - Update Makefile targets to:
119 - Build the docs locally
120 - Include the generated docs in the release archives
121- Theme:
122 - Use the new theme as the default
123 - Rename the tag cloud template to `tag.cloud.html`
124 - Display visited links in grey
125 - Use only one search form in `linklist.html`
126 - Hide the "search links with these tags" option when an empty `searchtags` is passed to `tag.list.html`
127- Improve HTTP header handling when hosting Shaarli with Docker behind a reverse proxy
128- Searching for tags with an empty value returns untagged links only
129- Set Travis environment to `precise` until the new `trusty` environment is ready
130
131### Removed
132- Remove dead Pubsubhubbub code
133- Disable the GitHub wiki (see changed/documentation)
134- Remove Docker `dev` image and resources
135- Theme:
136 - Remove the bottom "Sort by" menu in `tag.list.html`
137
138### Fixed
139- Fix file existence check for `user.css`
140- Limit selection to 2k characters when using the bookmarklet
141- Fix JS error `uncaught type error`
142- Fix Firefox Social button
143- Use pinned PHP dependencies when generating release archives
144- Make sure that the tag exists before altering/removing it
145
146### Security
147- Add a whitelist for protocols for URLs
148
149
150## [v0.9.0](https://github.com/shaarli/Shaarli/releases/tag/v0.9.0) - 2017-05-07
151
152This release introduces the REST API, and requires updating HTTP server
153configuration to enable URL rewriting, see:
154- https://shaarli.github.io/api-documentation/
155- https://shaarli.readthedocs.io/en/master/Server-configuration/
156
157**WARNING**: Shaarli now requires PHP 5.5+.
158
159### Added
160- REST API v1
161 - [Slim](https://www.slimframework.com/) framework
162 - [JSON Web Token](https://jwt.io/introduction/) (JWT) authentication
163 - versioned API endpoints:
164 - `/api/v1/info`: get general information on the Shaarli instance
165 - `/api/v1/links`: get a list of shaared links
166 - `/api/v1/history`: get a list of latest actions
167Theming:
168 - Introduce a new theme
169 - Allow selecting themes/templates from the configuration page
170 - New/Edit link form can be submitted using CTRL+Enter in the textarea
171 - Shaarli version is displayed in the footer when logged in
172- Add plugin placeholders to Atom/RSS feed templates
173- Add OpenSearch to feed templates
174- Add `campaign_` to the URL cleanup pattern list
175- Add an AUTHORS file and Makefile target to list authors from Git commit data
176- Link imports are now logged in `data/` folder, and can be debug using `dev.debug=true` setting.
177- `composer.lock` is now included in git file to allow proper `composer install`
178- History mechanism which logs link addition/modification/deletion
179
7## [v0.8.7](https://github.com/shaarli/Shaarli/releases/tag/v0.8.7) - 2018-06-20 180## [v0.8.7](https://github.com/shaarli/Shaarli/releases/tag/v0.8.7) - 2018-06-20
8### Changed 181### Changed
9- Build the Docker image from the local Git sources 182- Build the Docker image from the local Git sources
@@ -11,9 +184,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
11### Removed 184### Removed
12- Disable PHP 5.3 Travis build (unsupported) 185- Disable PHP 5.3 Travis build (unsupported)
13 186
14
15## [v0.8.6](https://github.com/shaarli/Shaarli/releases/tag/v0.8.6) - 2018-02-19 187## [v0.8.6](https://github.com/shaarli/Shaarli/releases/tag/v0.8.6) - 2018-02-19
16### Changed 188### Changed
189<<<<<<< HEAD
17- Run version check tests against the 'stable' branch 190- Run version check tests against the 'stable' branch
18 191
19 192
@@ -37,14 +210,80 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
37- PHP 7.1 compatibility: add ConfigManager parameter to anti-bruteforce function call in login template. 210- PHP 7.1 compatibility: add ConfigManager parameter to anti-bruteforce function call in login template.
38 211
39## [v0.8.2](https://github.com/shaarli/Shaarli/releases/tag/v0.8.2) - 2016-12-15 212## [v0.8.2](https://github.com/shaarli/Shaarli/releases/tag/v0.8.2) - 2016-12-15
213=======
214- Docker: enable nginx URL rewriting for the REST API
215- Theming:
216 - Move `user.css` to the `data` folder
217 - Move default template files to a subfolder (`default`)
218 - Rename the legacy theme to `vintage`
219 - Private only filter is now displayed as a search parameter
220 - Autocomplete: pre-select the first element
221 - Display daily date in the page title (browser title)
222 - Timezone lists are now passed as an array instead of raw HTML
223- Move PubSubHub to a dedicated plugin
224- Coding style:
225 - explicit method visibility
226 - safe boolean comparisons
227 - remove unused variables
228- The updater now keeps custom theme preferences
229- Simplify the COPYING information
230- Improved client locale detection
231- Improved date time display depending on the locale
232- Partial namespace support for Shaarli classes
233- Shaarli version is now only present in `shaarli_version.php`
234- Human readable maximum file size upload
235>>>>>>> v0.9.7
236
237
238### Removed
239- PHP < 5.5 compatibility
240- ReadItYourself plugin
241
242### Fixed
243- Ignore generated release tarballs
244- Hide default port when behind a reverse proxy
245- Fix a typo in the Markdown plugin description
246- Fix the presence of empty tags for private tags and in search results
247- Fix a fatal error during the install
248- Fix permalink image alignment in daily page
249- Fix the delete button in `editlink`
250- Fix redirection after link deletion
251- Do not access LinkDB links by ID before the Updater applies migrations
252- Remove extra spaces in the bookmarklet's name
253- Piwik plugin: Piwik URL protocol can now be set (http or https)
254- All inline JS has been moved to dedicated JS files
255- Keep tags after login redirection
40 256
257### Security
258- Markdown plugin: escape HTML entities by default
259
260
261## [v0.8.5](https://github.com/shaarli/Shaarli/releases/tag/v0.8.5) - 2018-01-04
262**XSS vulnerability fixed. Please update.**
263
264## Security
265- Fix an XSS (cross-site-scripting) vulnerability in `index.php` -
266 [CVE-2018-5249](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-5249)
267
268## [v0.8.4](https://github.com/shaarli/Shaarli/releases/tag/v0.8.4) - 2017-03-04
269### Security
270- Markdown plugin: escape HTML entities by default
271
272## [v0.8.3](https://github.com/shaarli/Shaarli/releases/tag/v0.8.3) - 2017-01-20
41### Fixed 273### Fixed
274- PHP 7.1 compatibility: add ConfigManager parameter to anti-bruteforce function call in login template.
42 275
276<<<<<<< HEAD
277=======
278## [v0.8.2](https://github.com/shaarli/Shaarli/releases/tag/v0.8.2) - 2016-12-15
279### Fixed
280
281>>>>>>> v0.9.7
43- Editing a link created before the new ID system would change its permalink. 282- Editing a link created before the new ID system would change its permalink.
44 283
45## [v0.8.1](https://github.com/shaarli/Shaarli/releases/tag/v0.8.1) - 2016-12-12 284## [v0.8.1](https://github.com/shaarli/Shaarli/releases/tag/v0.8.1) - 2016-12-12
46 285
47> Note: this version will create an automatic backup of your database if anything goes wrong. 286> Note: this version will create an automatic backup of your database if anything goes wrong.
48 287
49### Added 288### Added
50- Add CHANGELOG.md to track the whole project's history 289- Add CHANGELOG.md to track the whole project's history
@@ -61,7 +300,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
61- Link ID complete refactoring: 300- Link ID complete refactoring:
62 - Links now have a numeric ID instead of dates 301 - Links now have a numeric ID instead of dates
63 - Short URLs are now created once and can't change over time (previous URL are kept) 302 - Short URLs are now created once and can't change over time (previous URL are kept)
64- Templates: 303- Templates:
65 - Changed placeholder behaviour for: `buttons_toolbar`, `fields_toolbar` and `action_plugin` 304 - Changed placeholder behaviour for: `buttons_toolbar`, `fields_toolbar` and `action_plugin`
66 - Cleanup `{loop}` declarations in templates 305 - Cleanup `{loop}` declarations in templates
67 - Tools: hide Firefox Social button when not in HTTPS 306 - Tools: hide Firefox Social button when not in HTTPS
@@ -79,7 +318,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
79- Plugins: 318- Plugins:
80 - Tools: only display parameter description when it exists 319 - Tools: only display parameter description when it exists
81 - archive.org: do not propose archival of private notes 320 - archive.org: do not propose archival of private notes
82 - Markdown: 321 - Markdown:
83 - render links properly in code blocks 322 - render links properly in code blocks
84 - bug regarding the `nomarkdown` tag 323 - bug regarding the `nomarkdown` tag
85 - W3C compliance 324 - W3C compliance
@@ -127,6 +366,10 @@ Please use our release archives, or follow the
127- XSRF token now generated each time a page is rendered 366- XSRF token now generated each time a page is rendered
128 367
129 368
369## [v0.7.1](https://github.com/shaarli/Shaarli/releases/tag/v0.7.1) - 2017-03-08
370### Security
371- Markdown plugin: escape HTML entities by default
372
130## [v0.7.0](https://github.com/shaarli/Shaarli/releases/tag/v0.7.0) - 2016-05-14 373## [v0.7.0](https://github.com/shaarli/Shaarli/releases/tag/v0.7.0) - 2016-05-14
131### Added 374### Added
132- Adds an option to encode redirector URL parameter 375- Adds an option to encode redirector URL parameter
@@ -214,7 +457,7 @@ Please use our release archives, or follow the
214### Fixed 457### Fixed
215- Fix a bug where renaming a tag was causing a 404 458- Fix a bug where renaming a tag was causing a 404
216- Fix a bug allowing to search blank terms 459- Fix a bug allowing to search blank terms
217- Fix a bug preventing to remove a tag with special chars when searching 460- Fix a bug preventing to remove a tag with special chars when searching
218 461
219 462
220## [v0.6.2](https://github.com/shaarli/Shaarli/releases/tag/v0.6.2) - 2015-12-23 463## [v0.6.2](https://github.com/shaarli/Shaarli/releases/tag/v0.6.2) - 2015-12-23
@@ -520,7 +763,7 @@ Initial release on GitHub.
520- When you click the key to see only private links, it turns yellow 763- When you click the key to see only private links, it turns yellow
521 764
522### Changed 765### Changed
523- The "Daily" page now automatically skips empty days. 766- The "Daily" page now automatically skips empty days.
524 767
525### Fixed 768### Fixed
526- Corrected the tag encoding (there was a bug when selecting a second tag which contains accented characters) 769- Corrected the tag encoding (there was a bug when selecting a second tag which contains accented characters)
@@ -818,7 +1061,7 @@ Initial release on GitHub.
818- Nicer timezone selection patch by killruana 1061- Nicer timezone selection patch by killruana
819 1062
820### Fixed 1063### Fixed
821- New lines now appear correctly in the RSS feed descriptions. 1064- New lines now appear correctly in the RSS feed descriptions.
822 1065
823 1066
824## [v0.0.17beta](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history) 1067## [v0.0.17beta](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history)
@@ -872,7 +1115,7 @@ Initial release on GitHub.
872## [v0.0.14beta](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history) 1115## [v0.0.14beta](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history)
873### Added 1116### Added
874- You no longer need to disable `magic_quotes` on your host. 1117- You no longer need to disable `magic_quotes` on your host.
875 Shaarli will cope with this option beeing activated. 1118 Shaarli will cope with this option beeing activated.
876 1119
877 1120
878## [v0.0.13beta](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history) 1121## [v0.0.13beta](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b1be656a..03564fd2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -17,14 +17,10 @@ Check the [milestones](https://github.com/shaarli/Shaarli/milestones) to see wha
17 * You can also join instant discussion at https://gitter.im/shaarli/Shaarli, or via IRC as described [here](https://github.com/shaarli/Shaarli/issues/44#issuecomment-77745105) 17 * You can also join instant discussion at https://gitter.im/shaarli/Shaarli, or via IRC as described [here](https://github.com/shaarli/Shaarli/issues/44#issuecomment-77745105)
18 18
19### Documentation 19### Documentation
20**the [wiki](https://github.com/shaarli/Shaarli/wiki) is world-writable** - anyone can edit or add chapters and pages.
21 20
22 * Large changes should preferably be discussed in [General discussion](https://github.com/shaarli/Shaarli/issues/44) beforehand (you can post a draft there and edit it). 21The [official documentation](http://shaarli.readthedocs.io/en/rtfd/) is generated from [Markdown](https://daringfireball.net/projects/markdown/syntax) documents in the `doc/md/` directory. HTML documentation is generated using [Mkdocs](http://www.mkdocs.org/). [Read the Docs](https://readthedocs.org/) provides hosting for the online documentation.
23 * If you create a new page, please link it from the new page (eg from the [Other links](https://github.com/shaarli/Shaarli/wiki#other-links) section.
24 * The wiki is a general documentation about Shaarli: usage, development, hacks, usage tricks, related links, projects. Try to keep it organized.
25 * The wiki will be synced to Shaarli's `doc/` directory on each release. Keep that in mind when reviewing the quality of your edits.
26 22
27You can make the project known by publishing blog posts/articles/videos about it and adding them to the links section in the wiki. 23To edit the documentation, please edit the appropriate `doc/md/*.md` files (and optionally `make htmlpages` to preview changes to HTML files). Then submit your changes as a Pull Request. Have a look at the MkDocs documentation and configuration file `mkdocs.yml` if you need to add/remove/rename/reorder pages.
28 24
29### Translations 25### Translations
30Currently Shaarli has no translation/internationalization/localization system available and is single-language. You can help by proposing an i18n system (issue https://github.com/shaarli/Shaarli/issues/121) 26Currently Shaarli has no translation/internationalization/localization system available and is single-language. You can help by proposing an i18n system (issue https://github.com/shaarli/Shaarli/issues/121)
@@ -58,7 +54,7 @@ Please report any problem you might find.
58 * starting from branch ` master`, switch to a new branch (eg. `git checkout -b my-awesome-feature`) 54 * starting from branch ` master`, switch to a new branch (eg. `git checkout -b my-awesome-feature`)
59 * edit the required files (from the Github web interface or your text editor) 55 * edit the required files (from the Github web interface or your text editor)
60 * add and commit your changes with a meaningful commit message (eg `Cool new feature, fixes issue #1001`) 56 * add and commit your changes with a meaningful commit message (eg `Cool new feature, fixes issue #1001`)
61 * run unit tests against your patched version, see [Running unit tests](https://github.com/shaarli/Shaarli/wiki/Running-unit-tests) 57 * run unit tests against your patched version, see [Running unit tests](https://shaarli.readthedocs.io/en/master/Unit-tests/#run-unit-tests)
62 * Open your fork in the Github web interface and click the "Compare and Pull Request" button, enter required info and submit your Pull Request. 58 * Open your fork in the Github web interface and click the "Compare and Pull Request" button, enter required info and submit your Pull Request.
63 59
64All changes you will do on the `my-awesome-feature` in the future will be added to your Pull Request. Don't work directly on the master branch, don't do unrelated work on your `my-awesome-feature` branch. 60All changes you will do on the `my-awesome-feature` in the future will be added to your Pull Request. Don't work directly on the master branch, don't do unrelated work on your `my-awesome-feature` branch.
diff --git a/COPYING b/COPYING
index 22929463..05202152 100644
--- a/COPYING
+++ b/COPYING
@@ -1,33 +1,7 @@
1Files: * 1Files: *
2License: zlib/libpng 2License: zlib/libpng
3Copyright: (c) 2011-2015 Sébastien SAUVAGE <sebsauvage@sebsauvage.net> 3Copyright: (c) 2011-2015 Sébastien SAUVAGE <sebsauvage@sebsauvage.net>
4 (c) 2011-2015 Alexandre Alapetite <alexandre@alapetite.fr> 4 (c) 2011-2017 The Shaarli Community, see AUTHORS
5 (c) 2011-2015 David Sferruzza <david.sferruzza@gmail.com>
6 (c) 2011-2015 Christophe HENRY <christophe.henry@sbgodin.fr>
7 (c) 2011-2015 Mathieu Chabanon <git@matchab.fr>
8 (c) 2011-2015 BoboTiG <bobotig@gmail.com>
9 (c) 2011-2015 Bronco <bronco@warriordudimanche.net>
10 (c) 2011-2015 Emilien Klein <emilien@klein.st>
11 (c) 2011-2015 Knah Tsaeb <knah-tsaeb@knah-tsaeb.org>
12 (c) 2011-2015 Lionel Martin <renarddesmers@gmail.com>
13 (c) 2011-2015 lehollandaisvolant <levoltigeurhollandais@gmail.com>
14 (c) 2011-2015 timo van neerden <fire@lehollandaisvolant.net>
15 (c) 2011-2015 nodiscc <nodiscc@gmail.com>
16 (c) 2011-2015 Florian Eula <mr.pikzen@gmail.com>
17 (c) 2011-2015 Arthur Hoaro <arthur@hoa.ro>
18 (c) 2011-2015 Aurélien "VirtualTam" Tamisier <virtualtam@flibidi.net>
19 (c) 2011-2015 qwertygc <champlywood@free.fr>
20 (c) 2011-2015 idleman <idleman@idleman.fr>
21 (c) 2015 Alexis Ju <alexis@effingo.be>
22 (c) 2015 dimtion <zizou.xena@gmail.com>
23 (c) 2015 Fanch <fanch-github@qth.fr>
24 (c) 2015 Guillaume Virlet <github@virlet.org>
25 (c) 2015 Felix Bartels <felix@host-consultants.de>
26 (c) 2015 Marsup <marsup@gmail.com>
27 (c) 2015 Miloš Jovanović <mjovanovic@gmail.com>
28 (c) 2015 Nicolás Danelón <hola@nicolasdanelon.com.ar>
29 (c) 2015 TsT <tst2005@gmail.com>
30
31 5
32Files: inc/reset.css 6Files: inc/reset.css
33License: BSD (http://opensource.org/licenses/BSD-3-Clause) 7License: BSD (http://opensource.org/licenses/BSD-3-Clause)
@@ -43,7 +17,7 @@ License: CC-BY (http://creativecommons.org/licenses/by/3.0/)
43Copyright: (c) 2014 Designmodo 17Copyright: (c) 2014 Designmodo
44Source: http://designmodo.com/linecons-free/ 18Source: http://designmodo.com/linecons-free/
45 19
46Files: images/floral_left.png, images/floral_right.png, images/squiggle.png, images/squiggle2.png, images/squiggle_closing.png 20Files: images/floral_left.png, images/floral_right.png, images/squiggle.png, images/squiggle_closing.png
47Licence: Public Domain 21Licence: Public Domain
48Source: https://openclipart.org/people/j4p4n/j4p4n_ornimental_bookend_-_left.svg 22Source: https://openclipart.org/people/j4p4n/j4p4n_ornimental_bookend_-_left.svg
49 23
@@ -72,6 +46,10 @@ Files: plugins/wallabag/wallabag.png
72License: MIT License (http://opensource.org/licenses/MIT) 46License: MIT License (http://opensource.org/licenses/MIT)
73Copyright: (C) 2015 Nicolas Lœuillet - https://github.com/wallabag/wallabag 47Copyright: (C) 2015 Nicolas Lœuillet - https://github.com/wallabag/wallabag
74 48
49Files: tpl/default/sad_star.png
50License: MIT License (http://opensource.org/licenses/MIT)
51Copyright: (C) 2015 kalvn - https://github.com/kalvn/Shaarli-Material
52
75---------------------------------------------------- 53----------------------------------------------------
76ZLIB/LIBPNG LICENSE 54ZLIB/LIBPNG LICENSE
77 55
diff --git a/Dockerfile b/Dockerfile
index e8067031..93146c52 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,50 +1,61 @@
1# Stage 1: 1# Stage 1:
2# - Get Shaarli sources 2# - Copy Shaarli sources
3# - Build documentation 3# - Build documentation
4FROM dalibo/pandocker:stable as docs 4FROM python:3-alpine as docs
5ADD . /pandoc/shaarli 5ADD . /usr/src/app/shaarli
6RUN cd /pandoc/shaarli \ 6RUN cd /usr/src/app/shaarli \
7 && make htmldoc \ 7 && pip install --no-cache-dir mkdocs \
8 && rm -rf .git 8 && mkdocs build
9 9
10# Stage 2: 10# Stage 2:
11# - Resolve PHP dependencies with Composer 11# - Resolve PHP dependencies with Composer
12FROM composer:latest as composer 12FROM composer:latest as composer
13COPY --from=docs /pandoc/shaarli /app/shaarli 13COPY --from=docs /usr/src/app/shaarli /app/shaarli
14RUN cd shaarli \ 14RUN cd shaarli \
15 && composer --prefer-dist --no-dev install 15 && composer --prefer-dist --no-dev install
16 16
17# Stage 3: 17# Stage 3:
18# - Shaarli image 18# - Shaarli image
19FROM debian:jessie 19FROM alpine:3.6
20LABEL maintainer="Shaarli Community" 20LABEL maintainer="Shaarli Community"
21 21
22ENV TERM dumb 22RUN apk --update --no-cache add \
23RUN apt-get update \ 23 ca-certificates \
24 && apt-get install --no-install-recommends -y \ 24 nginx \
25 ca-certificates \ 25 php7 \
26 curl \ 26 php7-ctype \
27 nginx-light \ 27 php7-curl \
28 php5-curl \ 28 php7-fpm \
29 php5-fpm \ 29 php7-gd \
30 php5-gd \ 30 php7-iconv \
31 php5-intl \ 31 php7-intl \
32 supervisor \ 32 php7-json \
33 && apt-get clean 33 php7-mbstring \
34 34 php7-openssl \
35RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini \ 35 php7-session \
36 && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini 36 php7-xml \
37 php7-zlib \
38 s6
37 39
38COPY .docker/nginx.conf /etc/nginx/nginx.conf 40COPY .docker/nginx.conf /etc/nginx/nginx.conf
39COPY .docker/supervised.conf /etc/supervisor/conf.d/supervised.conf 41COPY .docker/php-fpm.conf /etc/php7/php-fpm.conf
42COPY .docker/services.d /etc/services.d
43
44RUN rm -rf /etc/php7/php-fpm.d/www.conf \
45 && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \
46 && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini
47
40 48
41WORKDIR /var/www 49WORKDIR /var/www
42COPY --from=composer /app/shaarli shaarli 50COPY --from=composer /app/shaarli shaarli
43RUN rm -rf html \ 51
44 && chown -R www-data:www-data . 52RUN chown -R nginx:nginx . \
53 && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \
54 && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log
45 55
46VOLUME /var/www/shaarli/data 56VOLUME /var/www/shaarli/data
47 57
48EXPOSE 80 58EXPOSE 80
49 59
50CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] 60ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"]
61CMD []
diff --git a/Dockerfile.armhf b/Dockerfile.armhf
new file mode 100644
index 00000000..24695633
--- /dev/null
+++ b/Dockerfile.armhf
@@ -0,0 +1,50 @@
1FROM lsiobase/alpine.armhf:3.6
2LABEL maintainer="Shaarli Community"
3MAINTAINER Shaarli Community
4
5RUN apk --update --no-cache add \
6 ca-certificates \
7 curl \
8 nginx \
9 php7 \
10 php7-ctype \
11 php7-curl \
12 php7-fpm \
13 php7-gd \
14 php7-iconv \
15 php7-intl \
16 php7-json \
17 php7-mbstring \
18 php7-openssl \
19 php7-phar \
20 php7-session \
21 php7-xml \
22 php7-zlib \
23 s6
24
25COPY .docker/nginx.conf /etc/nginx/nginx.conf
26COPY .docker/php-fpm.conf /etc/php7/php-fpm.conf
27COPY .docker/services.d /etc/services.d
28
29RUN curl -sS https://getcomposer.org/installer | php7 -- --install-dir=/usr/local/bin --filename=composer \
30 && rm -rf /etc/php7/php-fpm.d/www.conf \
31 && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \
32 && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini
33
34
35WORKDIR /var/www
36RUN curl -L https://github.com/shaarli/Shaarli/archive/latest.tar.gz | tar xzf - \
37 && mv Shaarli-latest shaarli \
38 && cd shaarli \
39 && composer --prefer-dist --no-dev install \
40 && rm -rf ~/.composer \
41 && chown -R nginx:nginx . \
42 && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \
43 && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log
44
45VOLUME /var/www/shaarli/data
46
47EXPOSE 80
48
49ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"]
50CMD []
diff --git a/Makefile b/Makefile
index 47f3530f..0ae03226 100644
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,6 @@
1# The personal, minimalist, super-fast, database free, bookmarking service. 1# The personal, minimalist, super-fast, database free, bookmarking service.
2# Makefile for PHP code analysis & testing, documentation and release generation 2# Makefile for PHP code analysis & testing, documentation and release generation
3 3
4# Prerequisites:
5# - install Composer, either:
6# - from your distro's package manager;
7# - from the official website (https://getcomposer.org/download/);
8# - install/update test dependencies:
9# $ composer install # 1st setup
10# $ composer update
11# - install Xdebug for PHPUnit code coverage reports:
12# - see http://xdebug.org/docs/install
13# - enable in php.ini
14SHELL := /bin/bash
15
16BIN = vendor/bin 4BIN = vendor/bin
17PHP_SOURCE = index.php application tests plugins 5PHP_SOURCE = index.php application tests plugins
18PHP_COMMA_SOURCE = index.php,application,tests,plugins 6PHP_COMMA_SOURCE = index.php,application,tests,plugins
@@ -20,6 +8,16 @@ PHP_COMMA_SOURCE = index.php,application,tests,plugins
20all: static_analysis_summary check_permissions test 8all: static_analysis_summary check_permissions test
21 9
22## 10##
11# Docker test adapter
12#
13# Shaarli sources and vendored libraries are copied from a shared volume
14# to a user-owned directory to enable running tests as a non-root user.
15##
16docker_%:
17 rsync -az /shaarli/ ~/shaarli/
18 cd ~/shaarli && make $*
19
20##
23# Concise status of the project 21# Concise status of the project
24# These targets are non-blocking: || exit 0 22# These targets are non-blocking: || exit 0
25## 23##
@@ -106,7 +104,7 @@ check_permissions:
106 @echo "----------------------" 104 @echo "----------------------"
107 @echo "Check file permissions" 105 @echo "Check file permissions"
108 @echo "----------------------" 106 @echo "----------------------"
109 @for file in `git ls-files`; do \ 107 @for file in `git ls-files | grep -v docker`; do \
110 if [ -x $$file ]; then \ 108 if [ -x $$file ]; then \
111 errors=true; \ 109 errors=true; \
112 echo "$${file} is executable"; \ 110 echo "$${file} is executable"; \
@@ -121,12 +119,24 @@ check_permissions:
121# See phpunit.xml for configuration 119# See phpunit.xml for configuration
122# https://phpunit.de/manual/current/en/appendixes.configuration.html 120# https://phpunit.de/manual/current/en/appendixes.configuration.html
123## 121##
124test: 122test: translate
125 @echo "-------" 123 @echo "-------"
126 @echo "PHPUNIT" 124 @echo "PHPUNIT"
127 @echo "-------" 125 @echo "-------"
128 @mkdir -p sandbox 126 @mkdir -p sandbox coverage
129 @$(BIN)/phpunit tests 127 @$(BIN)/phpunit --coverage-php coverage/main.cov --bootstrap tests/bootstrap.php --testsuite unit-tests
128
129locale_test_%:
130 @UT_LOCALE=$*.utf8 \
131 $(BIN)/phpunit \
132 --coverage-php coverage/$(firstword $(subst _, ,$*)).cov \
133 --bootstrap tests/languages/bootstrap.php \
134 --testsuite language-$(firstword $(subst _, ,$*))
135
136all_tests: test locale_test_de_DE locale_test_en_US locale_test_fr_FR
137 @$(BIN)/phpcov merge --html coverage coverage
138 @# --text doesn't work with phpunit 4.* (v5 requires PHP 5.6)
139 @#$(BIN)/phpcov merge --text coverage/txt coverage
130 140
131## 141##
132# Custom release archive generation 142# Custom release archive generation
@@ -144,19 +154,22 @@ release_archive: release_tar release_zip
144 154
145### download 3rd-party PHP libraries 155### download 3rd-party PHP libraries
146composer_dependencies: clean 156composer_dependencies: clean
147 composer update --no-dev 157 composer install --no-dev --prefer-dist
148 find vendor/ -name ".git" -type d -exec rm -rf {} + 158 find vendor/ -name ".git" -type d -exec rm -rf {} +
149 159
150### generate a release tarball and include 3rd-party dependencies 160### generate a release tarball and include 3rd-party dependencies and translations
151release_tar: composer_dependencies 161release_tar: composer_dependencies htmldoc translate
152 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).tar HEAD 162 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).tar HEAD
153 tar rvf $(ARCHIVE_VERSION).tar --transform "s|^vendor|$(ARCHIVE_PREFIX)vendor|" vendor/ 163 tar rvf $(ARCHIVE_VERSION).tar --transform "s|^vendor|$(ARCHIVE_PREFIX)vendor|" vendor/
164 tar rvf $(ARCHIVE_VERSION).tar --transform "s|^doc/html|$(ARCHIVE_PREFIX)doc/html|" doc/html/
154 gzip $(ARCHIVE_VERSION).tar 165 gzip $(ARCHIVE_VERSION).tar
155 166
156### generate a release zip and include 3rd-party dependencies 167### generate a release zip and include 3rd-party dependencies and translations
157release_zip: composer_dependencies 168release_zip: composer_dependencies htmldoc translate
158 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).zip -9 HEAD 169 git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).zip -9 HEAD
159 mkdir $(ARCHIVE_PREFIX) 170 mkdir -p $(ARCHIVE_PREFIX)/{doc,vendor}
171 rsync -a doc/html/ $(ARCHIVE_PREFIX)doc/html/
172 zip -r $(ARCHIVE_VERSION).zip $(ARCHIVE_PREFIX)doc/
160 rsync -a vendor/ $(ARCHIVE_PREFIX)vendor/ 173 rsync -a vendor/ $(ARCHIVE_PREFIX)vendor/
161 zip -r $(ARCHIVE_VERSION).zip $(ARCHIVE_PREFIX)vendor/ 174 zip -r $(ARCHIVE_VERSION).zip $(ARCHIVE_PREFIX)vendor/
162 rm -rf $(ARCHIVE_PREFIX) 175 rm -rf $(ARCHIVE_PREFIX)
@@ -170,53 +183,26 @@ clean:
170 @git clean -df 183 @git clean -df
171 @rm -rf sandbox 184 @rm -rf sandbox
172 185
186### generate the AUTHORS file from Git commit information
187authors:
188 @cp .github/mailmap .mailmap
189 @git shortlog -sne > AUTHORS
190 @rm .mailmap
191
173### generate Doxygen documentation 192### generate Doxygen documentation
174doxygen: clean 193doxygen: clean
175 @rm -rf doxygen 194 @rm -rf doxygen
176 @( cat Doxyfile ; echo "PROJECT_NUMBER=`git describe`" ) | doxygen - 195 @( cat Doxyfile ; echo "PROJECT_NUMBER=`git describe`" ) | doxygen -
177 196
178### update the local copy of the documentation 197### generate HTML documentation from Markdown pages with MkDocs
179doc: clean 198htmldoc:
180 @rm -rf doc 199 python3 -m venv venv/
181 @git clone https://github.com/shaarli/Shaarli.wiki.git doc 200 bash -c 'source venv/bin/activate; \
182 @rm -rf doc/.git 201 pip install mkdocs; \
183 202 mkdocs build'
184### Generate a custom sidebar 203 find doc/html/ -type f -exec chmod a-x '{}' \;
185# 204 rm -r venv
186# Sidebar content: 205
187# - convert GitHub-flavoured relative links to standard Markdown 206### Generate Shaarli's translation compiled file (.mo)
188# - trim HTML, only keep the list (<ul>[...]</ul>) part 207translate:
189htmlsidebar: 208 @find inc/languages/ -name shaarli.po -execdir msgfmt shaarli.po -o shaarli.mo \;
190 @echo '<div id="local-sidebar">' > doc/sidebar.html
191 @awk 'BEGIN { FS = "[\\[\\]]{2}" }'\
192 'm = /\[/ { t=$$2; gsub(/ /, "-", $$2); print $$1"["t"]("$$2".html)"$$3 }'\
193 '!m { print $$0 }' doc/_Sidebar.md > doc/tmp.md
194 @pandoc -f markdown -t html5 -s doc/tmp.md | awk '/(ul>|li>)/' >> doc/sidebar.html
195 @echo '</div>' >> doc/sidebar.html
196 @rm doc/tmp.md
197
198### Convert local markdown documentation to HTML
199#
200# For all pages:
201# - infer title from the file name
202# - convert GitHub-flavoured relative links to standard Markdown
203# - insert the sidebar menu
204htmlpages:
205 @for file in `find doc/ -maxdepth 1 -name "*.md"`; do \
206 base=`basename $$file .md`; \
207 sed -i "1i # $${base//-/ }" $$file; \
208 awk 'BEGIN { FS = "[\\[\\]]{2}" }'\
209 'm = /\[/ { t=$$2; gsub(/ /, "-", $$2); print $$1"["t"]("$$2".html)"$$3 }'\
210 '!m { print $$0 }' $$file > doc/tmp.md; \
211 mv doc/tmp.md $$file; \
212 pandoc -f gfm \
213 -t html5 \
214 -s \
215 -c "github-markdown.css" \
216 -T Shaarli \
217 -M pagetitle:"$${base//-/ }" \
218 -B doc/sidebar.html \
219 -o doc/$$base.html $$file; \
220 done;
221
222htmldoc: doc htmlsidebar htmlpages
diff --git a/README.md b/README.md
index 21062b9b..7744d2f6 100644
--- a/README.md
+++ b/README.md
@@ -1,115 +1,37 @@
1![Shaarli logo](doc/images/doc-logo.png) 1![Shaarli logo](doc/md/images/doc-logo.png)
2 2
3The personal, minimalist, super-fast, database free, bookmarking service. 3The personal, minimalist, super-fast, database free, bookmarking service.
4 4
5_Do you want to share the links you discover?_ 5_Do you want to share the links you discover?_
6_Shaarli is a minimalist delicious clone that you can install on your own server._ 6_Shaarli is a minimalist link sharing service that you can install on your own server._
7_It is designed to be personal (single-user), fast and handy._ 7_It is designed to be personal (single-user), fast and handy._
8 8
9[![](https://img.shields.io/travis/shaarli/Shaarli.svg?label=master)](https://travis-ci.org/shaarli/Shaarli) 9[![](https://img.shields.io/badge/stable-v0.8.5-blue.svg)](https://github.com/shaarli/Shaarli/releases/tag/v0.8.5)
10[![](https://img.shields.io/travis/shaarli/Shaarli/stable.svg?label=stable)](https://travis-ci.org/shaarli/Shaarli) 10[![](https://img.shields.io/travis/shaarli/Shaarli/stable.svg?label=stable)](https://travis-ci.org/shaarli/Shaarli)
11[![](https://img.shields.io/github/release/shaarli/shaarli.svg)](https://github.com/shaarli/Shaarli/releases/latest/) 11&bull;
12[![Docker repository](https://img.shields.io/docker/pulls/shaarli/shaarli.svg)](https://hub.docker.com/r/shaarli/shaarli/) 12[![](https://img.shields.io/badge/latest-v0.9.4-blue.svg)](https://github.com/shaarli/Shaarli/releases/tag/v0.9.4)
13[![](https://img.shields.io/travis/shaarli/Shaarli/latest.svg?label=latest)](https://travis-ci.org/shaarli/Shaarli)
14&bull;
15[![](https://img.shields.io/badge/master-v0.10.x-blue.svg)](https://github.com/shaarli/Shaarli)
16[![](https://img.shields.io/travis/shaarli/Shaarli.svg?label=master)](https://travis-ci.org/shaarli/Shaarli)
13 17
14[![Join the chat at https://gitter.im/shaarli/Shaarli](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shaarli/Shaarli) 18[![Join the chat at https://gitter.im/shaarli/Shaarli](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shaarli/Shaarli)
15[![Bountysource](https://www.bountysource.com/badge/team?team_id=19583&style=bounties_received)](https://www.bountysource.com/teams/shaarli/issues) 19[![Bountysource](https://www.bountysource.com/badge/team?team_id=19583&style=bounties_received)](https://www.bountysource.com/teams/shaarli/issues)
20[![Docker repository](https://img.shields.io/docker/pulls/shaarli/shaarli.svg)](https://hub.docker.com/r/shaarli/shaarli/)
16 21
17## Quickstart 22## Quickstart
18- [Wiki/documentation](https://github.com/shaarli/Shaarli/wiki) 23
24- [Documentation](https://shaarli.readthedocs.io)
19- [Change log](CHANGELOG.md) 25- [Change log](CHANGELOG.md)
20- [Bugs/Feature requests/Discussion](https://github.com/shaarli/Shaarli/issues/) 26- [Bugs/Feature requests/Discussion](https://github.com/shaarli/Shaarli/issues/)
21 27
22### Demo 28### Demo
23You can use this [public demo instance of Shaarli](http://shaarlidemo.tuxfamily.org/Shaarli). 29
30You can use this [public demo instance of Shaarli](https://demo.shaarli.org).
24It runs the latest development version of Shaarli and is updated/reset daily. 31It runs the latest development version of Shaarli and is updated/reset daily.
25 32
26Login: `demo`; Password: `demo` 33Login: `demo`; Password: `demo`
27 34
28### Installation & upgrade
29- [Download and installation](https://github.com/shaarli/Shaarli/wiki/Download-and-Installation)
30- [Upgrade and migration](https://github.com/shaarli/Shaarli/wiki/Upgrade-and-migration)
31- [Server requirements](https://github.com/shaarli/Shaarli/wiki/Server-requirements)
32- [Server configuration](https://github.com/shaarli/Shaarli/wiki/Server-configuration)
33- [Shaarli configuration](https://github.com/shaarli/Shaarli/wiki/Shaarli-configuration)
34
35## Features
36### Interface
37- minimalist design (simple is beautiful)
38- FAST
39- ATOM and RSS feeds
40- views:
41 - paginated link list
42 - tag cloud
43 - picture wall: image and video thumbnails
44 - daily: newspaper-like daily digest
45 - daily RSS feed
46- permalinks for easy reference
47- links can be public or private
48- extensible through [plugins](https://github.com/shaarli/Shaarli/wiki/Plugins#plugin-usage)
49
50### Tag, view and search your links!
51- add a custom title and description to archived links
52- add tags to classify and search links
53 - features tag autocompletion, renaming, merging and deletion
54- full-text and tag search
55
56### Easy setup
57- dead-simple installation: drop the files, open the page
58- links are stored in a file
59 - compact storage
60 - no database required
61 - easy backup: simply copy the datastore file
62- import and export links as Netscape bookmarks
63
64### Accessibility
65- Firefox bookmarlet to share links in one click
66- support for mobile browsers
67- works with Javascript disabled
68- easy page customization through HTML/CSS/RainTPL
69
70### Security
71- bruteforce-proof login form
72- protected against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
73and session cookie hijacking
74
75### Goodies
76- thumbnail generation for images and video services:
77dailymotion, flickr, imageshack, imgur, vimeo, xkcd, youtube...
78 - lazy-loading with [bLazy](http://dinbror.dk/blazy/)
79- [PubSubHubbub](https://code.google.com/p/pubsubhubbub/) protocol support
80- URL cleanup: automatic removal of `?utm_source=...`, `fb=...`
81- discreet pop-up notification when a new release is available
82
83### Other usages
84Though Shaarli is primarily a bookmarking application, it can serve other purposes
85(see [usage examples](https://github.com/shaarli/Shaarli/wiki#usage-examples)):
86- micro-blogging
87- pastebin
88- online notepad
89- snippet archive
90
91## About
92### Shaarli community fork
93This friendly fork is maintained by the Shaarli community at https://github.com/shaarli/Shaarli
94
95This is a community fork of the original [Shaarli](https://github.com/sebsauvage/Shaarli/) project by [Sébastien Sauvage](http://sebsauvage.net/).
96
97The original project is currently unmaintained, and the developer [has informed us](https://github.com/sebsauvage/Shaarli/issues/191)
98that he would have no time to work on Shaarli in the near future.
99The Shaarli community has carried on the work to provide
100[many patches](https://github.com/shaarli/Shaarli/compare/sebsauvage:master...master)
101for [bug fixes and enhancements](https://github.com/shaarli/Shaarli/issues?q=is%3Aclosed+)
102in this repository, and will keep maintaining the project for the foreseeable future, while keeping Shaarli simple and efficient.
103
104### Contributing
105If you'd like to help, please:
106- have a look at the open [issues](https://github.com/shaarli/Shaarli/issues)
107and [pull requests](https://github.com/shaarli/Shaarli/pulls)
108- feel free to report bugs (feedback is much appreciated)
109- suggest new features and improvements to both code and [documentation](https://github.com/shaarli/Shaarli/wiki)
110- propose solutions to existing problems
111- submit pull requests :-)
112
113
114### License 35### License
36
115Shaarli is [Free Software](http://en.wikipedia.org/wiki/Free_software). See [COPYING](COPYING) for a detail of the contributors and licenses for each individual component. 37Shaarli is [Free Software](http://en.wikipedia.org/wiki/Free_software). See [COPYING](COPYING) for a detail of the contributors and licenses for each individual component.
diff --git a/application/ApplicationUtils.php b/application/ApplicationUtils.php
index 7f963e97..911873a0 100644
--- a/application/ApplicationUtils.php
+++ b/application/ApplicationUtils.php
@@ -4,9 +4,13 @@
4 */ 4 */
5class ApplicationUtils 5class ApplicationUtils
6{ 6{
7 /**
8 * @var string File containing the current version
9 */
10 public static $VERSION_FILE = 'shaarli_version.php';
11
7 private static $GIT_URL = 'https://raw.githubusercontent.com/shaarli/Shaarli'; 12 private static $GIT_URL = 'https://raw.githubusercontent.com/shaarli/Shaarli';
8 private static $GIT_BRANCHES = array('master', 'stable'); 13 private static $GIT_BRANCHES = array('latest', 'stable');
9 private static $VERSION_FILE = 'shaarli_version.php';
10 private static $VERSION_START_TAG = '<?php /* '; 14 private static $VERSION_START_TAG = '<?php /* ';
11 private static $VERSION_END_TAG = ' */ ?>'; 15 private static $VERSION_END_TAG = ' */ ?>';
12 16
@@ -29,6 +33,30 @@ class ApplicationUtils
29 return false; 33 return false;
30 } 34 }
31 35
36 return $data;
37 }
38
39 /**
40 * Retrieve the version from a remote URL or a file.
41 *
42 * @param string $remote URL or file to fetch.
43 * @param int $timeout For URLs fetching.
44 *
45 * @return bool|string The version or false if it couldn't be retrieved.
46 */
47 public static function getVersion($remote, $timeout = 2)
48 {
49 if (startsWith($remote, 'http')) {
50 if (($data = static::getLatestGitVersionCode($remote, $timeout)) === false) {
51 return false;
52 }
53 } else {
54 if (! is_file($remote)) {
55 return false;
56 }
57 $data = file_get_contents($remote);
58 }
59
32 return str_replace( 60 return str_replace(
33 array(self::$VERSION_START_TAG, self::$VERSION_END_TAG, PHP_EOL), 61 array(self::$VERSION_START_TAG, self::$VERSION_END_TAG, PHP_EOL),
34 array('', '', ''), 62 array('', '', ''),
@@ -65,13 +93,10 @@ class ApplicationUtils
65 $isLoggedIn, 93 $isLoggedIn,
66 $branch='stable') 94 $branch='stable')
67 { 95 {
68 if (! $isLoggedIn) { 96 // Do not check versions for visitors
69 // Do not check versions for visitors 97 // Do not check if the user doesn't want to
70 return false; 98 // Do not check with dev version
71 } 99 if (! $isLoggedIn || empty($enableCheck) || $currentVersion === 'dev') {
72
73 if (empty($enableCheck)) {
74 // Do not check if the user doesn't want to
75 return false; 100 return false;
76 } 101 }
77 102
@@ -93,7 +118,7 @@ class ApplicationUtils
93 118
94 // Late Static Binding allows overriding within tests 119 // Late Static Binding allows overriding within tests
95 // See http://php.net/manual/en/language.oop5.late-static-bindings.php 120 // See http://php.net/manual/en/language.oop5.late-static-bindings.php
96 $latestVersion = static::getLatestGitVersionCode( 121 $latestVersion = static::getVersion(
97 self::$GIT_URL . '/' . $branch . '/' . self::$VERSION_FILE 122 self::$GIT_URL . '/' . $branch . '/' . self::$VERSION_FILE
98 ); 123 );
99 124
@@ -124,12 +149,13 @@ class ApplicationUtils
124 public static function checkPHPVersion($minVersion, $curVersion) 149 public static function checkPHPVersion($minVersion, $curVersion)
125 { 150 {
126 if (version_compare($curVersion, $minVersion) < 0) { 151 if (version_compare($curVersion, $minVersion) < 0) {
127 throw new Exception( 152 $msg = t(
128 'Your PHP version is obsolete!' 153 'Your PHP version is obsolete!'
129 .' Shaarli requires at least PHP '.$minVersion.', and thus cannot run.' 154 . ' Shaarli requires at least PHP %s, and thus cannot run.'
130 .' Your PHP version has known security vulnerabilities and should be' 155 . ' Your PHP version has known security vulnerabilities and should be'
131 .' updated as soon as possible.' 156 . ' updated as soon as possible.'
132 ); 157 );
158 throw new Exception(sprintf($msg, $minVersion));
133 } 159 }
134 } 160 }
135 161
@@ -143,16 +169,18 @@ class ApplicationUtils
143 public static function checkResourcePermissions($conf) 169 public static function checkResourcePermissions($conf)
144 { 170 {
145 $errors = array(); 171 $errors = array();
172 $rainTplDir = rtrim($conf->get('resource.raintpl_tpl'), '/');
146 173
147 // Check script and template directories are readable 174 // Check script and template directories are readable
148 foreach (array( 175 foreach (array(
149 'application', 176 'application',
150 'inc', 177 'inc',
151 'plugins', 178 'plugins',
152 $conf->get('resource.raintpl_tpl'), 179 $rainTplDir,
180 $rainTplDir.'/'.$conf->get('resource.theme'),
153 ) as $path) { 181 ) as $path) {
154 if (! is_readable(realpath($path))) { 182 if (! is_readable(realpath($path))) {
155 $errors[] = '"'.$path.'" directory is not readable'; 183 $errors[] = '"'.$path.'" '. t('directory is not readable');
156 } 184 }
157 } 185 }
158 186
@@ -164,10 +192,10 @@ class ApplicationUtils
164 $conf->get('resource.raintpl_tmp'), 192 $conf->get('resource.raintpl_tmp'),
165 ) as $path) { 193 ) as $path) {
166 if (! is_readable(realpath($path))) { 194 if (! is_readable(realpath($path))) {
167 $errors[] = '"'.$path.'" directory is not readable'; 195 $errors[] = '"'.$path.'" '. t('directory is not readable');
168 } 196 }
169 if (! is_writable(realpath($path))) { 197 if (! is_writable(realpath($path))) {
170 $errors[] = '"'.$path.'" directory is not writable'; 198 $errors[] = '"'.$path.'" '. t('directory is not writable');
171 } 199 }
172 } 200 }
173 201
@@ -185,13 +213,28 @@ class ApplicationUtils
185 } 213 }
186 214
187 if (! is_readable(realpath($path))) { 215 if (! is_readable(realpath($path))) {
188 $errors[] = '"'.$path.'" file is not readable'; 216 $errors[] = '"'.$path.'" '. t('file is not readable');
189 } 217 }
190 if (! is_writable(realpath($path))) { 218 if (! is_writable(realpath($path))) {
191 $errors[] = '"'.$path.'" file is not writable'; 219 $errors[] = '"'.$path.'" '. t('file is not writable');
192 } 220 }
193 } 221 }
194 222
195 return $errors; 223 return $errors;
196 } 224 }
225
226 /**
227 * Returns a salted hash representing the current Shaarli version.
228 *
229 * Useful for assets browser cache.
230 *
231 * @param string $currentVersion of Shaarli
232 * @param string $salt User personal salt, also used for the authentication
233 *
234 * @return string version hash
235 */
236 public static function getVersionHash($currentVersion, $salt)
237 {
238 return hash_hmac('sha256', $currentVersion, $salt);
239 }
197} 240}
diff --git a/application/Base64Url.php b/application/Base64Url.php
new file mode 100644
index 00000000..61590e43
--- /dev/null
+++ b/application/Base64Url.php
@@ -0,0 +1,34 @@
1<?php
2
3namespace Shaarli;
4
5
6/**
7 * URL-safe Base64 operations
8 *
9 * @see https://en.wikipedia.org/wiki/Base64#URL_applications
10 */
11class Base64Url
12{
13 /**
14 * Base64Url-encodes data
15 *
16 * @param string $data Data to encode
17 *
18 * @return string Base64Url-encoded data
19 */
20 public static function encode($data) {
21 return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
22 }
23
24 /**
25 * Decodes Base64Url-encoded data
26 *
27 * @param string $data Data to decode
28 *
29 * @return string Decoded data
30 */
31 public static function decode($data) {
32 return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT));
33 }
34}
diff --git a/application/Cache.php b/application/Cache.php
index 5d050165..e5d43e61 100644
--- a/application/Cache.php
+++ b/application/Cache.php
@@ -13,7 +13,7 @@
13function purgeCachedPages($pageCacheDir) 13function purgeCachedPages($pageCacheDir)
14{ 14{
15 if (! is_dir($pageCacheDir)) { 15 if (! is_dir($pageCacheDir)) {
16 $error = 'Cannot purge '.$pageCacheDir.': no directory'; 16 $error = sprintf(t('Cannot purge %s: no directory'), $pageCacheDir);
17 error_log($error); 17 error_log($error);
18 return $error; 18 return $error;
19 } 19 }
diff --git a/application/CachedPage.php b/application/CachedPage.php
index 5087d0c4..e11cc52d 100644
--- a/application/CachedPage.php
+++ b/application/CachedPage.php
@@ -7,9 +7,6 @@ class CachedPage
7 // Directory containing page caches 7 // Directory containing page caches
8 private $cacheDir; 8 private $cacheDir;
9 9
10 // Full URL of the page to cache -typically the value returned by pageUrl()
11 private $url;
12
13 // Should this URL be cached (boolean)? 10 // Should this URL be cached (boolean)?
14 private $shouldBeCached; 11 private $shouldBeCached;
15 12
@@ -27,7 +24,6 @@ class CachedPage
27 { 24 {
28 // TODO: check write access to the cache directory 25 // TODO: check write access to the cache directory
29 $this->cacheDir = $cacheDir; 26 $this->cacheDir = $cacheDir;
30 $this->url = $url;
31 $this->filename = $this->cacheDir.'/'.sha1($url).'.cache'; 27 $this->filename = $this->cacheDir.'/'.sha1($url).'.cache';
32 $this->shouldBeCached = $shouldBeCached; 28 $this->shouldBeCached = $shouldBeCached;
33 } 29 }
diff --git a/application/FeedBuilder.php b/application/FeedBuilder.php
index fedd90e6..ebae18b4 100644
--- a/application/FeedBuilder.php
+++ b/application/FeedBuilder.php
@@ -63,11 +63,6 @@ class FeedBuilder
63 protected $hideDates; 63 protected $hideDates;
64 64
65 /** 65 /**
66 * @var string PubSub hub URL.
67 */
68 protected $pubsubhubUrl;
69
70 /**
71 * @var string server locale. 66 * @var string server locale.
72 */ 67 */
73 protected $locale; 68 protected $locale;
@@ -102,6 +97,11 @@ class FeedBuilder
102 */ 97 */
103 public function buildData() 98 public function buildData()
104 { 99 {
100 // Search for untagged links
101 if (isset($this->userInput['searchtags']) && empty($this->userInput['searchtags'])) {
102 $this->userInput['searchtags'] = false;
103 }
104
105 // Optionally filter the results: 105 // Optionally filter the results:
106 $linksToDisplay = $this->linkDB->filterSearch($this->userInput); 106 $linksToDisplay = $this->linkDB->filterSearch($this->userInput);
107 107
@@ -120,7 +120,6 @@ class FeedBuilder
120 } 120 }
121 121
122 $data['language'] = $this->getTypeLanguage(); 122 $data['language'] = $this->getTypeLanguage();
123 $data['pubsubhub_url'] = $this->pubsubhubUrl;
124 $data['last_update'] = $this->getLatestDateFormatted(); 123 $data['last_update'] = $this->getLatestDateFormatted();
125 $data['show_dates'] = !$this->hideDates || $this->isLoggedIn; 124 $data['show_dates'] = !$this->hideDates || $this->isLoggedIn;
126 // Remove leading slash from REQUEST_URI. 125 // Remove leading slash from REQUEST_URI.
@@ -149,11 +148,11 @@ class FeedBuilder
149 $link['url'] = $pageaddr . $link['url']; 148 $link['url'] = $pageaddr . $link['url'];
150 } 149 }
151 if ($this->usePermalinks === true) { 150 if ($this->usePermalinks === true) {
152 $permalink = '<a href="'. $link['url'] .'" title="Direct link">Direct link</a>'; 151 $permalink = '<a href="'. $link['url'] .'" title="'. t('Direct link') .'">'. t('Direct link') .'</a>';
153 } else { 152 } else {
154 $permalink = '<a href="'. $link['guid'] .'" title="Permalink">Permalink</a>'; 153 $permalink = '<a href="'. $link['guid'] .'" title="'. t('Permalink') .'">'. t('Permalink') .'</a>';
155 } 154 }
156 $link['description'] = format_description($link['description'], '', $pageaddr); 155 $link['description'] = format_description($link['description'], '', false, $pageaddr);
157 $link['description'] .= PHP_EOL .'<br>&#8212; '. $permalink; 156 $link['description'] .= PHP_EOL .'<br>&#8212; '. $permalink;
158 157
159 $pubDate = $link['created']; 158 $pubDate = $link['created'];
@@ -183,16 +182,6 @@ class FeedBuilder
183 } 182 }
184 183
185 /** 184 /**
186 * Assign PubSub hub URL.
187 *
188 * @param string $pubsubhubUrl PubSub hub url.
189 */
190 public function setPubsubhubUrl($pubsubhubUrl)
191 {
192 $this->pubsubhubUrl = $pubsubhubUrl;
193 }
194
195 /**
196 * Set this to true to use permalinks instead of direct links. 185 * Set this to true to use permalinks instead of direct links.
197 * 186 *
198 * @param boolean $usePermalinks true to force permalinks. 187 * @param boolean $usePermalinks true to force permalinks.
diff --git a/application/FileUtils.php b/application/FileUtils.php
index 6cac9825..918cb83b 100644
--- a/application/FileUtils.php
+++ b/application/FileUtils.php
@@ -1,21 +1,82 @@
1<?php 1<?php
2
3require_once 'exceptions/IOException.php';
4
2/** 5/**
3 * Exception class thrown when a filesystem access failure happens 6 * Class FileUtils
7 *
8 * Utility class for file manipulation.
4 */ 9 */
5class IOException extends Exception 10class FileUtils
6{ 11{
7 private $path; 12 /**
13 * @var string
14 */
15 protected static $phpPrefix = '<?php /* ';
8 16
9 /** 17 /**
10 * Construct a new IOException 18 * @var string
19 */
20 protected static $phpSuffix = ' */ ?>';
21
22 /**
23 * Write data into a file (Shaarli database format).
24 * The data is stored in a PHP file, as a comment, in compressed base64 format.
25 *
26 * The file will be created if it doesn't exist.
27 *
28 * @param string $file File path.
29 * @param mixed $content Content to write.
11 * 30 *
12 * @param string $path path to the resource that cannot be accessed 31 * @return int|bool Number of bytes written or false if it fails.
13 * @param string $message Custom exception message. 32 *
33 * @throws IOException The destination file can't be written.
14 */ 34 */
15 public function __construct($path, $message = '') 35 public static function writeFlatDB($file, $content)
16 { 36 {
17 $this->path = $path; 37 if (is_file($file) && !is_writeable($file)) {
18 $this->message = empty($message) ? 'Error accessing' : $message; 38 // The datastore exists but is not writeable
19 $this->message .= PHP_EOL . $this->path; 39 throw new IOException($file);
40 } else if (!is_file($file) && !is_writeable(dirname($file))) {
41 // The datastore does not exist and its parent directory is not writeable
42 throw new IOException(dirname($file));
43 }
44
45 return file_put_contents(
46 $file,
47 self::$phpPrefix.base64_encode(gzdeflate(serialize($content))).self::$phpSuffix
48 );
49 }
50
51 /**
52 * Read data from a file containing Shaarli database format content.
53 *
54 * If the file isn't readable or doesn't exist, default data will be returned.
55 *
56 * @param string $file File path.
57 * @param mixed $default The default value to return if the file isn't readable.
58 *
59 * @return mixed The content unserialized, or default if the file isn't readable, or false if it fails.
60 */
61 public static function readFlatDB($file, $default = null)
62 {
63 // Note that gzinflate is faster than gzuncompress.
64 // See: http://www.php.net/manual/en/function.gzdeflate.php#96439
65 if (! is_readable($file)) {
66 return $default;
67 }
68
69 $data = file_get_contents($file);
70 if ($data == '') {
71 return $default;
72 }
73
74 return unserialize(
75 gzinflate(
76 base64_decode(
77 substr($data, strlen(self::$phpPrefix), -strlen(self::$phpSuffix))
78 )
79 )
80 );
20 } 81 }
21} 82}
diff --git a/application/History.php b/application/History.php
new file mode 100644
index 00000000..35ec016a
--- /dev/null
+++ b/application/History.php
@@ -0,0 +1,216 @@
1<?php
2
3/**
4 * Class History
5 *
6 * Handle the history file tracing events in Shaarli.
7 * The history is stored as JSON in a file set by 'resource.history' setting.
8 *
9 * Available data:
10 * - event: event key
11 * - datetime: event date, in ISO8601 format.
12 * - id: event item identifier (currently only link IDs).
13 *
14 * Available event keys:
15 * - CREATED: new link
16 * - UPDATED: link updated
17 * - DELETED: link deleted
18 * - SETTINGS: the settings have been updated through the UI.
19 * - IMPORT: bulk links import
20 *
21 * Note: new events are put at the beginning of the file and history array.
22 */
23class History
24{
25 /**
26 * @var string Action key: a new link has been created.
27 */
28 const CREATED = 'CREATED';
29
30 /**
31 * @var string Action key: a link has been updated.
32 */
33 const UPDATED = 'UPDATED';
34
35 /**
36 * @var string Action key: a link has been deleted.
37 */
38 const DELETED = 'DELETED';
39
40 /**
41 * @var string Action key: settings have been updated.
42 */
43 const SETTINGS = 'SETTINGS';
44
45 /**
46 * @var string Action key: a bulk import has been processed.
47 */
48 const IMPORT = 'IMPORT';
49
50 /**
51 * @var string History file path.
52 */
53 protected $historyFilePath;
54
55 /**
56 * @var array History data.
57 */
58 protected $history;
59
60 /**
61 * @var int History retention time in seconds (1 month).
62 */
63 protected $retentionTime = 2678400;
64
65 /**
66 * History constructor.
67 *
68 * @param string $historyFilePath History file path.
69 * @param int $retentionTime History content rentention time in seconds.
70 *
71 * @throws Exception if something goes wrong.
72 */
73 public function __construct($historyFilePath, $retentionTime = null)
74 {
75 $this->historyFilePath = $historyFilePath;
76 if ($retentionTime !== null) {
77 $this->retentionTime = $retentionTime;
78 }
79 }
80
81 /**
82 * Initialize: read history file.
83 *
84 * Allow lazy loading (don't read the file if it isn't necessary).
85 */
86 protected function initialize()
87 {
88 $this->check();
89 $this->read();
90 }
91
92 /**
93 * Add Event: new link.
94 *
95 * @param array $link Link data.
96 */
97 public function addLink($link)
98 {
99 $this->addEvent(self::CREATED, $link['id']);
100 }
101
102 /**
103 * Add Event: update existing link.
104 *
105 * @param array $link Link data.
106 */
107 public function updateLink($link)
108 {
109 $this->addEvent(self::UPDATED, $link['id']);
110 }
111
112 /**
113 * Add Event: delete existing link.
114 *
115 * @param array $link Link data.
116 */
117 public function deleteLink($link)
118 {
119 $this->addEvent(self::DELETED, $link['id']);
120 }
121
122 /**
123 * Add Event: settings updated.
124 */
125 public function updateSettings()
126 {
127 $this->addEvent(self::SETTINGS);
128 }
129
130 /**
131 * Add Event: bulk import.
132 *
133 * Note: we don't store links add/update one by one since it can have a huge impact on performances.
134 */
135 public function importLinks()
136 {
137 $this->addEvent(self::IMPORT);
138 }
139
140 /**
141 * Save a new event and write it in the history file.
142 *
143 * @param string $status Event key, should be defined as constant.
144 * @param mixed $id Event item identifier (e.g. link ID).
145 */
146 protected function addEvent($status, $id = null)
147 {
148 if ($this->history === null) {
149 $this->initialize();
150 }
151
152 $item = [
153 'event' => $status,
154 'datetime' => new DateTime(),
155 'id' => $id !== null ? $id : '',
156 ];
157 $this->history = array_merge([$item], $this->history);
158 $this->write();
159 }
160
161 /**
162 * Check that the history file is writable.
163 * Create the file if it doesn't exist.
164 *
165 * @throws Exception if it isn't writable.
166 */
167 protected function check()
168 {
169 if (! is_file($this->historyFilePath)) {
170 FileUtils::writeFlatDB($this->historyFilePath, []);
171 }
172
173 if (! is_writable($this->historyFilePath)) {
174 throw new Exception(t('History file isn\'t readable or writable'));
175 }
176 }
177
178 /**
179 * Read JSON history file.
180 */
181 protected function read()
182 {
183 $this->history = FileUtils::readFlatDB($this->historyFilePath, []);
184 if ($this->history === false) {
185 throw new Exception(t('Could not parse history file'));
186 }
187 }
188
189 /**
190 * Write JSON history file and delete old entries.
191 */
192 protected function write()
193 {
194 $comparaison = new DateTime('-'. $this->retentionTime . ' seconds');
195 foreach ($this->history as $key => $value) {
196 if ($value['datetime'] < $comparaison) {
197 unset($this->history[$key]);
198 }
199 }
200 FileUtils::writeFlatDB($this->historyFilePath, array_values($this->history));
201 }
202
203 /**
204 * Get the History.
205 *
206 * @return array
207 */
208 public function getHistory()
209 {
210 if ($this->history === null) {
211 $this->initialize();
212 }
213
214 return $this->history;
215 }
216}
diff --git a/application/HttpUtils.php b/application/HttpUtils.php
index e705cfd6..83a4c5e2 100644
--- a/application/HttpUtils.php
+++ b/application/HttpUtils.php
@@ -3,9 +3,11 @@
3 * GET an HTTP URL to retrieve its content 3 * GET an HTTP URL to retrieve its content
4 * Uses the cURL library or a fallback method 4 * Uses the cURL library or a fallback method
5 * 5 *
6 * @param string $url URL to get (http://...) 6 * @param string $url URL to get (http://...)
7 * @param int $timeout network timeout (in seconds) 7 * @param int $timeout network timeout (in seconds)
8 * @param int $maxBytes maximum downloaded bytes (default: 4 MiB) 8 * @param int $maxBytes maximum downloaded bytes (default: 4 MiB)
9 * @param callable|string $curlWriteFunction Optional callback called during the download (cURL CURLOPT_WRITEFUNCTION).
10 * Can be used to add download conditions on the headers (response code, content type, etc.).
9 * 11 *
10 * @return array HTTP response headers, downloaded content 12 * @return array HTTP response headers, downloaded content
11 * 13 *
@@ -29,7 +31,7 @@
29 * @see http://stackoverflow.com/q/9183178 31 * @see http://stackoverflow.com/q/9183178
30 * @see http://stackoverflow.com/q/1462720 32 * @see http://stackoverflow.com/q/1462720
31 */ 33 */
32function get_http_response($url, $timeout = 30, $maxBytes = 4194304) 34function get_http_response($url, $timeout = 30, $maxBytes = 4194304, $curlWriteFunction = null)
33{ 35{
34 $urlObj = new Url($url); 36 $urlObj = new Url($url);
35 $cleanUrl = $urlObj->idnToAscii(); 37 $cleanUrl = $urlObj->idnToAscii();
@@ -75,8 +77,12 @@ function get_http_response($url, $timeout = 30, $maxBytes = 4194304)
75 curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); 77 curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
76 curl_setopt($ch, CURLOPT_USERAGENT, $userAgent); 78 curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
77 79
80 if (is_callable($curlWriteFunction)) {
81 curl_setopt($ch, CURLOPT_WRITEFUNCTION, $curlWriteFunction);
82 }
83
78 // Max download size management 84 // Max download size management
79 curl_setopt($ch, CURLOPT_BUFFERSIZE, 1024); 85 curl_setopt($ch, CURLOPT_BUFFERSIZE, 1024*16);
80 curl_setopt($ch, CURLOPT_NOPROGRESS, false); 86 curl_setopt($ch, CURLOPT_NOPROGRESS, false);
81 curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, 87 curl_setopt($ch, CURLOPT_PROGRESSFUNCTION,
82 function($arg0, $arg1, $arg2, $arg3, $arg4 = 0) use ($maxBytes) 88 function($arg0, $arg1, $arg2, $arg3, $arg4 = 0) use ($maxBytes)
@@ -122,7 +128,7 @@ function get_http_response($url, $timeout = 30, $maxBytes = 4194304)
122 $content = substr($response, $headSize); 128 $content = substr($response, $headSize);
123 $headers = array(); 129 $headers = array();
124 foreach (preg_split('~[\r\n]+~', $rawHeadersLastRedir) as $line) { 130 foreach (preg_split('~[\r\n]+~', $rawHeadersLastRedir) as $line) {
125 if (empty($line) or ctype_space($line)) { 131 if (empty($line) || ctype_space($line)) {
126 continue; 132 continue;
127 } 133 }
128 $splitLine = explode(': ', $line, 2); 134 $splitLine = explode(': ', $line, 2);
@@ -297,13 +303,40 @@ function server_url($server)
297 // Keep forwarded port 303 // Keep forwarded port
298 if (strpos($server['HTTP_X_FORWARDED_PORT'], ',') !== false) { 304 if (strpos($server['HTTP_X_FORWARDED_PORT'], ',') !== false) {
299 $ports = explode(',', $server['HTTP_X_FORWARDED_PORT']); 305 $ports = explode(',', $server['HTTP_X_FORWARDED_PORT']);
300 $port = ':' . trim($ports[0]); 306 $port = trim($ports[0]);
307 } else {
308 $port = $server['HTTP_X_FORWARDED_PORT'];
309 }
310
311 // This is a workaround for proxies that don't forward the scheme properly.
312 // Connecting over port 443 has to be in HTTPS.
313 // See https://github.com/shaarli/Shaarli/issues/1022
314 if ($port == '443') {
315 $scheme = 'https';
316 }
317
318 if (($scheme == 'http' && $port != '80')
319 || ($scheme == 'https' && $port != '443')
320 ) {
321 $port = ':' . $port;
301 } else { 322 } else {
302 $port = ':' . $server['HTTP_X_FORWARDED_PORT']; 323 $port = '';
303 } 324 }
304 } 325 }
305 326
306 return $scheme.'://'.$server['SERVER_NAME'].$port; 327 if (isset($server['HTTP_X_FORWARDED_HOST'])) {
328 // Keep forwarded host
329 if (strpos($server['HTTP_X_FORWARDED_HOST'], ',') !== false) {
330 $hosts = explode(',', $server['HTTP_X_FORWARDED_HOST']);
331 $host = trim($hosts[0]);
332 } else {
333 $host = $server['HTTP_X_FORWARDED_HOST'];
334 }
335 } else {
336 $host = $server['SERVER_NAME'];
337 }
338
339 return $scheme.'://'.$host.$port;
307 } 340 }
308 341
309 // SSL detection 342 // SSL detection
@@ -381,3 +414,31 @@ function getIpAddressFromProxy($server, $trustedIps)
381 414
382 return array_pop($ips); 415 return array_pop($ips);
383} 416}
417
418/**
419 * Returns true if Shaarli's currently browsed in HTTPS.
420 * Supports reverse proxies (if the headers are correctly set).
421 *
422 * @param array $server $_SERVER.
423 *
424 * @return bool true if HTTPS, false otherwise.
425 */
426function is_https($server)
427{
428
429 if (isset($server['HTTP_X_FORWARDED_PORT'])) {
430 // Keep forwarded port
431 if (strpos($server['HTTP_X_FORWARDED_PORT'], ',') !== false) {
432 $ports = explode(',', $server['HTTP_X_FORWARDED_PORT']);
433 $port = trim($ports[0]);
434 } else {
435 $port = $server['HTTP_X_FORWARDED_PORT'];
436 }
437
438 if ($port == '443') {
439 return true;
440 }
441 }
442
443 return ! empty($server['HTTPS']);
444}
diff --git a/application/Languages.php b/application/Languages.php
index c8b0a25a..3eb3388f 100644
--- a/application/Languages.php
+++ b/application/Languages.php
@@ -1,21 +1,166 @@
1<?php 1<?php
2 2
3namespace Shaarli;
4
5use Gettext\GettextTranslator;
6use Gettext\Merge;
7use Gettext\Translations;
8use Gettext\Translator;
9use Gettext\TranslatorInterface;
10use Shaarli\Config\ConfigManager;
11
3/** 12/**
4 * Wrapper function for translation which match the API 13 * Class Languages
5 * of gettext()/_() and ngettext(). 14 *
15 * Load Shaarli translations using 'gettext/gettext'.
16 * This class allows to either use PHP gettext extension, or a PHP implementation of gettext,
17 * with a fixed language, or dynamically using autoLocale().
6 * 18 *
7 * Not doing translation for now. 19 * Translation files PO/MO files follow gettext standard and must be placed under:
20 * <translation path>/<language>/LC_MESSAGES/<domain>.[po|mo]
8 * 21 *
9 * @param string $text Text to translate. 22 * Pros/cons:
10 * @param string $nText The plural message ID. 23 * - gettext extension is faster
11 * @param int $nb The number of items for plural forms. 24 * - gettext is very system dependent (PHP extension, the locale must be installed, and web server reloaded)
12 * 25 *
13 * @return String Text translated. 26 * Settings:
27 * - translation.mode:
28 * - auto: use default setting (PHP implementation)
29 * - php: use PHP implementation
30 * - gettext: use gettext wrapper
31 * - translation.language:
32 * - auto: use autoLocale() and the language change according to user HTTP headers
33 * - fixed language: e.g. 'fr'
34 * - translation.extensions:
35 * - domain => translation_path: allow plugins and themes to extend the defaut extension
36 * The domain must be unique, and translation path must be relative, and contains the tree mentioned above.
37 *
38 * @package Shaarli
14 */ 39 */
15function t($text, $nText = '', $nb = 0) { 40class Languages
16 if (empty($nText)) { 41{
17 return $text; 42 /**
43 * Core translations domain
44 */
45 const DEFAULT_DOMAIN = 'shaarli';
46
47 /**
48 * @var TranslatorInterface
49 */
50 protected $translator;
51
52 /**
53 * @var string
54 */
55 protected $language;
56
57 /**
58 * @var ConfigManager
59 */
60 protected $conf;
61
62 /**
63 * Languages constructor.
64 *
65 * @param string $language lang determined by autoLocale(), can be overridden.
66 * @param ConfigManager $conf instance.
67 */
68 public function __construct($language, $conf)
69 {
70 $this->conf = $conf;
71 $confLanguage = $this->conf->get('translation.language', 'auto');
72 // Auto mode or invalid parameter, use the detected language.
73 // If the detected language is invalid, it doesn't matter, it will use English.
74 if ($confLanguage === 'auto' || ! $this->isValidLanguage($confLanguage)) {
75 $this->language = substr($language, 0, 5);
76 } else {
77 $this->language = $confLanguage;
78 }
79
80 if (! extension_loaded('gettext')
81 || in_array($this->conf->get('translation.mode', 'auto'), ['auto', 'php'])
82 ) {
83 $this->initPhpTranslator();
84 } else {
85 $this->initGettextTranslator();
86 }
87
88 // Register default functions (e.g. '__()') to use our Translator
89 $this->translator->register();
90 }
91
92 /**
93 * Initialize the translator using php gettext extension (gettext dependency act as a wrapper).
94 */
95 protected function initGettextTranslator ()
96 {
97 $this->translator = new GettextTranslator();
98 $this->translator->setLanguage($this->language);
99 $this->translator->loadDomain(self::DEFAULT_DOMAIN, 'inc/languages');
100
101 foreach ($this->conf->get('translation.extensions', []) as $domain => $translationPath) {
102 if ($domain !== self::DEFAULT_DOMAIN) {
103 $this->translator->loadDomain($domain, $translationPath, false);
104 }
105 }
106 }
107
108 /**
109 * Initialize the translator using a PHP implementation of gettext.
110 *
111 * Note that if language po file doesn't exist, errors are ignored (e.g. not installed language).
112 */
113 protected function initPhpTranslator()
114 {
115 $this->translator = new Translator();
116 $translations = new Translations();
117 // Core translations
118 try {
119 /** @var Translations $translations */
120 $translations = $translations->addFromPoFile('inc/languages/'. $this->language .'/LC_MESSAGES/shaarli.po');
121 $translations->setDomain('shaarli');
122 $this->translator->loadTranslations($translations);
123 } catch (\InvalidArgumentException $e) {}
124
125
126 // Extension translations (plugins, themes, etc.).
127 foreach ($this->conf->get('translation.extensions', []) as $domain => $translationPath) {
128 if ($domain === self::DEFAULT_DOMAIN) {
129 continue;
130 }
131
132 try {
133 /** @var Translations $extension */
134 $extension = Translations::fromPoFile($translationPath . $this->language .'/LC_MESSAGES/'. $domain .'.po');
135 $extension->setDomain($domain);
136 $this->translator->loadTranslations($extension);
137 } catch (\InvalidArgumentException $e) {}
138 }
139 }
140
141 /**
142 * Checks if a language string is valid.
143 *
144 * @param string $language e.g. 'fr' or 'en_US'
145 *
146 * @return bool true if valid, false otherwise
147 */
148 protected function isValidLanguage($language)
149 {
150 return preg_match('/^[a-z]{2}(_[A-Z]{2})?/', $language) === 1;
151 }
152
153 /**
154 * Get the list of available languages for Shaarli.
155 *
156 * @return array List of available languages, with their label.
157 */
158 public static function getAvailableLanguages()
159 {
160 return [
161 'auto' => t('Automatic'),
162 'en' => t('English'),
163 'fr' => t('French'),
164 ];
18 } 165 }
19 $actualForm = $nb > 1 ? $nText : $text;
20 return sprintf($actualForm, $nb);
21} 166}
diff --git a/application/LinkDB.php b/application/LinkDB.php
index 1e13286a..c1661d52 100644
--- a/application/LinkDB.php
+++ b/application/LinkDB.php
@@ -50,12 +50,6 @@ class LinkDB implements Iterator, Countable, ArrayAccess
50 // Link date storage format 50 // Link date storage format
51 const LINK_DATE_FORMAT = 'Ymd_His'; 51 const LINK_DATE_FORMAT = 'Ymd_His';
52 52
53 // Datastore PHP prefix
54 protected static $phpPrefix = '<?php /* ';
55
56 // Datastore PHP suffix
57 protected static $phpSuffix = ' */ ?>';
58
59 // List of links (associative array) 53 // List of links (associative array)
60 // - key: link date (e.g. "20110823_124546"), 54 // - key: link date (e.g. "20110823_124546"),
61 // - value: associative array (keys: title, description...) 55 // - value: associative array (keys: title, description...)
@@ -139,16 +133,16 @@ class LinkDB implements Iterator, Countable, ArrayAccess
139 { 133 {
140 // TODO: use exceptions instead of "die" 134 // TODO: use exceptions instead of "die"
141 if (!$this->loggedIn) { 135 if (!$this->loggedIn) {
142 die('You are not authorized to add a link.'); 136 die(t('You are not authorized to add a link.'));
143 } 137 }
144 if (!isset($value['id']) || empty($value['url'])) { 138 if (!isset($value['id']) || empty($value['url'])) {
145 die('Internal Error: A link should always have an id and URL.'); 139 die(t('Internal Error: A link should always have an id and URL.'));
146 } 140 }
147 if ((! empty($offset) && ! is_int($offset)) || ! is_int($value['id'])) { 141 if (($offset !== null && ! is_int($offset)) || ! is_int($value['id'])) {
148 die('You must specify an integer as a key.'); 142 die(t('You must specify an integer as a key.'));
149 } 143 }
150 if (! empty($offset) && $offset !== $value['id']) { 144 if ($offset !== null && $offset !== $value['id']) {
151 die('Array offset and link ID must be equal.'); 145 die(t('Array offset and link ID must be equal.'));
152 } 146 }
153 147
154 // If the link exists, we reuse the real offset, otherwise new entry 148 // If the link exists, we reuse the real offset, otherwise new entry
@@ -254,13 +248,13 @@ class LinkDB implements Iterator, Countable, ArrayAccess
254 $this->links = array(); 248 $this->links = array();
255 $link = array( 249 $link = array(
256 'id' => 1, 250 'id' => 1,
257 'title'=>' Shaarli: the personal, minimalist, super-fast, no-database delicious clone', 251 'title'=> t('The personal, minimalist, super-fast, database free, bookmarking service'),
258 'url'=>'https://github.com/shaarli/Shaarli/wiki', 252 'url'=>'https://shaarli.readthedocs.io',
259 'description'=>'Welcome to Shaarli! This is your first public bookmark. To edit or delete me, you must first login. 253 'description'=>t('Welcome to Shaarli! This is your first public bookmark. To edit or delete me, you must first login.
260 254
261To learn how to use Shaarli, consult the link "Help/documentation" at the bottom of this page. 255To learn how to use Shaarli, consult the link "Documentation" at the bottom of this page.
262 256
263You use the community supported version of the original Shaarli project, by Sebastien Sauvage.', 257You use the community supported version of the original Shaarli project, by Sebastien Sauvage.'),
264 'private'=>0, 258 'private'=>0,
265 'created'=> new DateTime(), 259 'created'=> new DateTime(),
266 'tags'=>'opensource software' 260 'tags'=>'opensource software'
@@ -270,9 +264,9 @@ You use the community supported version of the original Shaarli project, by Seba
270 264
271 $link = array( 265 $link = array(
272 'id' => 0, 266 'id' => 0,
273 'title'=>'My secret stuff... - Pastebin.com', 267 'title'=> t('My secret stuff... - Pastebin.com'),
274 'url'=>'http://sebsauvage.net/paste/?8434b27936c09649#bR7XsXhoTiLcqCpQbmOpBi3rq2zzQUC5hBI7ZT1O3x8=', 268 'url'=>'http://sebsauvage.net/paste/?8434b27936c09649#bR7XsXhoTiLcqCpQbmOpBi3rq2zzQUC5hBI7ZT1O3x8=',
275 'description'=>'Shhhh! I\'m a private link only YOU can see. You can delete me too.', 269 'description'=> t('Shhhh! I\'m a private link only YOU can see. You can delete me too.'),
276 'private'=>1, 270 'private'=>1,
277 'created'=> new DateTime('1 minute ago'), 271 'created'=> new DateTime('1 minute ago'),
278 'tags'=>'secretstuff', 272 'tags'=>'secretstuff',
@@ -295,22 +289,15 @@ You use the community supported version of the original Shaarli project, by Seba
295 return; 289 return;
296 } 290 }
297 291
298 // Read data 292 $this->urls = [];
299 // Note that gzinflate is faster than gzuncompress. 293 $this->ids = [];
300 // See: http://www.php.net/manual/en/function.gzdeflate.php#96439 294 $this->links = FileUtils::readFlatDB($this->datastore, []);
301 $this->links = array();
302
303 if (file_exists($this->datastore)) {
304 $this->links = unserialize(gzinflate(base64_decode(
305 substr(file_get_contents($this->datastore),
306 strlen(self::$phpPrefix), -strlen(self::$phpSuffix)))));
307 }
308 295
309 $toremove = array(); 296 $toremove = array();
310 foreach ($this->links as $key => &$link) { 297 foreach ($this->links as $key => &$link) {
311 if (! $this->loggedIn && $link['private'] != 0) { 298 if (! $this->loggedIn && $link['private'] != 0) {
312 // Transition for not upgraded databases. 299 // Transition for not upgraded databases.
313 $toremove[] = $key; 300 unset($this->links[$key]);
314 continue; 301 continue;
315 } 302 }
316 303
@@ -344,14 +331,10 @@ You use the community supported version of the original Shaarli project, by Seba
344 } 331 }
345 $link['shorturl'] = smallHash($link['linkdate']); 332 $link['shorturl'] = smallHash($link['linkdate']);
346 } 333 }
347 }
348 334
349 // If user is not logged in, filter private links. 335 $this->urls[$link['url']] = $key;
350 foreach ($toremove as $offset) { 336 $this->ids[$link['id']] = $key;
351 unset($this->links[$offset]);
352 } 337 }
353
354 $this->reorder();
355 } 338 }
356 339
357 /** 340 /**
@@ -361,19 +344,8 @@ You use the community supported version of the original Shaarli project, by Seba
361 */ 344 */
362 private function write() 345 private function write()
363 { 346 {
364 if (is_file($this->datastore) && !is_writeable($this->datastore)) { 347 $this->reorder();
365 // The datastore exists but is not writeable 348 FileUtils::writeFlatDB($this->datastore, $this->links);
366 throw new IOException($this->datastore);
367 } else if (!is_file($this->datastore) && !is_writeable(dirname($this->datastore))) {
368 // The datastore does not exist and its parent directory is not writeable
369 throw new IOException(dirname($this->datastore));
370 }
371
372 file_put_contents(
373 $this->datastore,
374 self::$phpPrefix.base64_encode(gzdeflate(serialize($this->links))).self::$phpSuffix
375 );
376
377 } 349 }
378 350
379 /** 351 /**
@@ -443,50 +415,37 @@ You use the community supported version of the original Shaarli project, by Seba
443 * - searchtags: list of tags 415 * - searchtags: list of tags
444 * - searchterm: term search 416 * - searchterm: term search
445 * @param bool $casesensitive Optional: Perform case sensitive filter 417 * @param bool $casesensitive Optional: Perform case sensitive filter
446 * @param bool $privateonly Optional: Returns private links only if true. 418 * @param string $visibility return only all/private/public links
419 * @param string $untaggedonly return only untagged links
447 * 420 *
448 * @return array filtered links, all links if no suitable filter was provided. 421 * @return array filtered links, all links if no suitable filter was provided.
449 */ 422 */
450 public function filterSearch($filterRequest = array(), $casesensitive = false, $privateonly = false) 423 public function filterSearch($filterRequest = array(), $casesensitive = false, $visibility = 'all', $untaggedonly = false)
451 { 424 {
452 // Filter link database according to parameters. 425 // Filter link database according to parameters.
453 $searchtags = !empty($filterRequest['searchtags']) ? escape($filterRequest['searchtags']) : ''; 426 $searchtags = isset($filterRequest['searchtags']) ? escape($filterRequest['searchtags']) : '';
454 $searchterm = !empty($filterRequest['searchterm']) ? escape($filterRequest['searchterm']) : ''; 427 $searchterm = isset($filterRequest['searchterm']) ? escape($filterRequest['searchterm']) : '';
455 428
456 // Search tags + fullsearch. 429 // Search tags + fullsearch - blank string parameter will return all links.
457 if (! empty($searchtags) && ! empty($searchterm)) { 430 $type = LinkFilter::$FILTER_TAG | LinkFilter::$FILTER_TEXT; // == "vuotext"
458 $type = LinkFilter::$FILTER_TAG | LinkFilter::$FILTER_TEXT; 431 $request = [$searchtags, $searchterm];
459 $request = array($searchtags, $searchterm);
460 }
461 // Search by tags.
462 elseif (! empty($searchtags)) {
463 $type = LinkFilter::$FILTER_TAG;
464 $request = $searchtags;
465 }
466 // Fulltext search.
467 elseif (! empty($searchterm)) {
468 $type = LinkFilter::$FILTER_TEXT;
469 $request = $searchterm;
470 }
471 // Otherwise, display without filtering.
472 else {
473 $type = '';
474 $request = '';
475 }
476 432
477 $linkFilter = new LinkFilter($this); 433 $linkFilter = new LinkFilter($this);
478 return $linkFilter->filter($type, $request, $casesensitive, $privateonly); 434 return $linkFilter->filter($type, $request, $casesensitive, $visibility, $untaggedonly);
479 } 435 }
480 436
481 /** 437 /**
482 * Returns the list of all tags 438 * Returns the list tags appearing in the links with the given tags
483 * Output: associative array key=tags, value=0 439 * @param $filteringTags: tags selecting the links to consider
440 * @param $visibility: process only all/private/public links
441 * @return: a tag=>linksCount array
484 */ 442 */
485 public function allTags() 443 public function linksCountPerTag($filteringTags = [], $visibility = 'all')
486 { 444 {
445 $links = empty($filteringTags) ? $this->links : $this->filterSearch(['searchtags' => $filteringTags], false, $visibility);
487 $tags = array(); 446 $tags = array();
488 $caseMapping = array(); 447 $caseMapping = array();
489 foreach ($this->links as $link) { 448 foreach ($links as $link) {
490 foreach (preg_split('/\s+/', $link['tags'], 0, PREG_SPLIT_NO_EMPTY) as $tag) { 449 foreach (preg_split('/\s+/', $link['tags'], 0, PREG_SPLIT_NO_EMPTY) as $tag) {
491 if (empty($tag)) { 450 if (empty($tag)) {
492 continue; 451 continue;
@@ -505,6 +464,39 @@ You use the community supported version of the original Shaarli project, by Seba
505 } 464 }
506 465
507 /** 466 /**
467 * Rename or delete a tag across all links.
468 *
469 * @param string $from Tag to rename
470 * @param string $to New tag. If none is provided, the from tag will be deleted
471 *
472 * @return array|bool List of altered links or false on error
473 */
474 public function renameTag($from, $to)
475 {
476 if (empty($from)) {
477 return false;
478 }
479 $delete = empty($to);
480 // True for case-sensitive tag search.
481 $linksToAlter = $this->filterSearch(['searchtags' => $from], true);
482 foreach($linksToAlter as $key => &$value)
483 {
484 $tags = preg_split('/\s+/', trim($value['tags']));
485 if (($pos = array_search($from, $tags)) !== false) {
486 if ($delete) {
487 unset($tags[$pos]); // Remove tag.
488 } else {
489 $tags[$pos] = trim($to);
490 }
491 $value['tags'] = trim(implode(' ', array_unique($tags)));
492 $this[$value['id']] = $value;
493 }
494 }
495
496 return $linksToAlter;
497 }
498
499 /**
508 * Returns the list of days containing articles (oldest first) 500 * Returns the list of days containing articles (oldest first)
509 * Output: An array containing days (in format YYYYMMDD). 501 * Output: An array containing days (in format YYYYMMDD).
510 */ 502 */
@@ -535,8 +527,8 @@ You use the community supported version of the original Shaarli project, by Seba
535 return $a['created'] < $b['created'] ? 1 * $order : -1 * $order; 527 return $a['created'] < $b['created'] ? 1 * $order : -1 * $order;
536 }); 528 });
537 529
538 $this->urls = array(); 530 $this->urls = [];
539 $this->ids = array(); 531 $this->ids = [];
540 foreach ($this->links as $key => $link) { 532 foreach ($this->links as $key => $link) {
541 $this->urls[$link['url']] = $key; 533 $this->urls[$link['url']] = $key;
542 $this->ids[$link['id']] = $key; 534 $this->ids[$link['id']] = $key;
diff --git a/application/LinkFilter.php b/application/LinkFilter.php
index daa6d9cc..12376e27 100644
--- a/application/LinkFilter.php
+++ b/application/LinkFilter.php
@@ -51,55 +51,73 @@ class LinkFilter
51 * @param string $type Type of filter (eg. tags, permalink, etc.). 51 * @param string $type Type of filter (eg. tags, permalink, etc.).
52 * @param mixed $request Filter content. 52 * @param mixed $request Filter content.
53 * @param bool $casesensitive Optional: Perform case sensitive filter if true. 53 * @param bool $casesensitive Optional: Perform case sensitive filter if true.
54 * @param bool $privateonly Optional: Only returns private links if true. 54 * @param string $visibility Optional: return only all/private/public links
55 * @param string $untaggedonly Optional: return only untagged links. Applies only if $type includes FILTER_TAG
55 * 56 *
56 * @return array filtered link list. 57 * @return array filtered link list.
57 */ 58 */
58 public function filter($type, $request, $casesensitive = false, $privateonly = false) 59 public function filter($type, $request, $casesensitive = false, $visibility = 'all', $untaggedonly = false)
59 { 60 {
61 if (! in_array($visibility, ['all', 'public', 'private'])) {
62 $visibility = 'all';
63 }
64
60 switch($type) { 65 switch($type) {
61 case self::$FILTER_HASH: 66 case self::$FILTER_HASH:
62 return $this->filterSmallHash($request); 67 return $this->filterSmallHash($request);
63 case self::$FILTER_TAG | self::$FILTER_TEXT: 68 case self::$FILTER_TAG | self::$FILTER_TEXT: // == "vuotext"
64 if (!empty($request)) { 69 $noRequest = empty($request) || (empty($request[0]) && empty($request[1]));
65 $filtered = $this->links; 70 if ($noRequest) {
66 if (isset($request[0])) { 71 if ($untaggedonly) {
67 $filtered = $this->filterTags($request[0], $casesensitive, $privateonly); 72 return $this->filterUntagged($visibility);
68 } 73 }
69 if (isset($request[1])) { 74 return $this->noFilter($visibility);
70 $lf = new LinkFilter($filtered);
71 $filtered = $lf->filterFulltext($request[1], $privateonly);
72 }
73 return $filtered;
74 } 75 }
75 return $this->noFilter($privateonly); 76 if ($untaggedonly) {
77 $filtered = $this->filterUntagged($visibility);
78 } else {
79 $filtered = $this->links;
80 }
81 if (!empty($request[0])) {
82 $filtered = (new LinkFilter($filtered))->filterTags($request[0], $casesensitive, $visibility);
83 }
84 if (!empty($request[1])) {
85 $filtered = (new LinkFilter($filtered))->filterFulltext($request[1], $visibility);
86 }
87 return $filtered;
76 case self::$FILTER_TEXT: 88 case self::$FILTER_TEXT:
77 return $this->filterFulltext($request, $privateonly); 89 return $this->filterFulltext($request, $visibility);
78 case self::$FILTER_TAG: 90 case self::$FILTER_TAG:
79 return $this->filterTags($request, $casesensitive, $privateonly); 91 if ($untaggedonly) {
92 return $this->filterUntagged($visibility);
93 } else {
94 return $this->filterTags($request, $casesensitive, $visibility);
95 }
80 case self::$FILTER_DAY: 96 case self::$FILTER_DAY:
81 return $this->filterDay($request); 97 return $this->filterDay($request);
82 default: 98 default:
83 return $this->noFilter($privateonly); 99 return $this->noFilter($visibility);
84 } 100 }
85 } 101 }
86 102
87 /** 103 /**
88 * Unknown filter, but handle private only. 104 * Unknown filter, but handle private only.
89 * 105 *
90 * @param bool $privateonly returns private link only if true. 106 * @param string $visibility Optional: return only all/private/public links
91 * 107 *
92 * @return array filtered links. 108 * @return array filtered links.
93 */ 109 */
94 private function noFilter($privateonly = false) 110 private function noFilter($visibility = 'all')
95 { 111 {
96 if (! $privateonly) { 112 if ($visibility === 'all') {
97 return $this->links; 113 return $this->links;
98 } 114 }
99 115
100 $out = array(); 116 $out = array();
101 foreach ($this->links as $key => $value) { 117 foreach ($this->links as $key => $value) {
102 if ($value['private']) { 118 if ($value['private'] && $visibility === 'private') {
119 $out[$key] = $value;
120 } else if (! $value['private'] && $visibility === 'public') {
103 $out[$key] = $value; 121 $out[$key] = $value;
104 } 122 }
105 } 123 }
@@ -151,14 +169,14 @@ class LinkFilter
151 * - see https://github.com/shaarli/Shaarli/issues/75 for examples 169 * - see https://github.com/shaarli/Shaarli/issues/75 for examples
152 * 170 *
153 * @param string $searchterms search query. 171 * @param string $searchterms search query.
154 * @param bool $privateonly return only private links if true. 172 * @param string $visibility Optional: return only all/private/public links.
155 * 173 *
156 * @return array search results. 174 * @return array search results.
157 */ 175 */
158 private function filterFulltext($searchterms, $privateonly = false) 176 private function filterFulltext($searchterms, $visibility = 'all')
159 { 177 {
160 if (empty($searchterms)) { 178 if (empty($searchterms)) {
161 return $this->links; 179 return $this->noFilter($visibility);
162 } 180 }
163 181
164 $filtered = array(); 182 $filtered = array();
@@ -189,8 +207,12 @@ class LinkFilter
189 foreach ($this->links as $id => $link) { 207 foreach ($this->links as $id => $link) {
190 208
191 // ignore non private links when 'privatonly' is on. 209 // ignore non private links when 'privatonly' is on.
192 if (! $link['private'] && $privateonly === true) { 210 if ($visibility !== 'all') {
193 continue; 211 if (! $link['private'] && $visibility === 'private') {
212 continue;
213 } else if ($link['private'] && $visibility === 'public') {
214 continue;
215 }
194 } 216 }
195 217
196 // Concatenate link fields to search across fields. 218 // Concatenate link fields to search across fields.
@@ -228,6 +250,51 @@ class LinkFilter
228 } 250 }
229 251
230 /** 252 /**
253 * generate a regex fragment out of a tag
254 * @param string $tag to to generate regexs from. may start with '-' to negate, contain '*' as wildcard
255 * @return string generated regex fragment
256 */
257 private static function tag2regex($tag)
258 {
259 $len = strlen($tag);
260 if(!$len || $tag === "-" || $tag === "*"){
261 // nothing to search, return empty regex
262 return '';
263 }
264 if($tag[0] === "-") {
265 // query is negated
266 $i = 1; // use offset to start after '-' character
267 $regex = '(?!'; // create negative lookahead
268 } else {
269 $i = 0; // start at first character
270 $regex = '(?='; // use positive lookahead
271 }
272 $regex .= '.*(?:^| )'; // before tag may only be a space or the beginning
273 // iterate over string, separating it into placeholder and content
274 for(; $i < $len; $i++){
275 if($tag[$i] === '*'){
276 // placeholder found
277 $regex .= '[^ ]*?';
278 } else {
279 // regular characters
280 $offset = strpos($tag, '*', $i);
281 if($offset === false){
282 // no placeholder found, set offset to end of string
283 $offset = $len;
284 }
285 // subtract one, as we want to get before the placeholder or end of string
286 $offset -= 1;
287 // we got a tag name that we want to search for. escape any regex characters to prevent conflicts.
288 $regex .= preg_quote(substr($tag, $i, $offset - $i + 1), '/');
289 // move $i on
290 $i = $offset;
291 }
292 }
293 $regex .= '(?:$| ))'; // after the tag may only be a space or the end
294 return $regex;
295 }
296
297 /**
231 * Returns the list of links associated with a given list of tags 298 * Returns the list of links associated with a given list of tags
232 * 299 *
233 * You can specify one or more tags, separated by space or a comma, e.g. 300 * You can specify one or more tags, separated by space or a comma, e.g.
@@ -235,49 +302,94 @@ class LinkFilter
235 * 302 *
236 * @param string $tags list of tags separated by commas or blank spaces. 303 * @param string $tags list of tags separated by commas or blank spaces.
237 * @param bool $casesensitive ignore case if false. 304 * @param bool $casesensitive ignore case if false.
238 * @param bool $privateonly returns private links only. 305 * @param string $visibility Optional: return only all/private/public links.
239 * 306 *
240 * @return array filtered links. 307 * @return array filtered links.
241 */ 308 */
242 public function filterTags($tags, $casesensitive = false, $privateonly = false) 309 public function filterTags($tags, $casesensitive = false, $visibility = 'all')
243 { 310 {
244 // Implode if array for clean up. 311 // get single tags (we may get passed an array, even though the docs say different)
245 $tags = is_array($tags) ? trim(implode(' ', $tags)) : $tags; 312 $inputTags = $tags;
246 if (empty($tags)) { 313 if(!is_array($tags)) {
247 return $this->links; 314 // we got an input string, split tags
315 $inputTags = preg_split('/(?:\s+)|,/', $inputTags, -1, PREG_SPLIT_NO_EMPTY);
248 } 316 }
249 317
250 $searchtags = self::tagsStrToArray($tags, $casesensitive); 318 if(!count($inputTags)){
251 $filtered = array(); 319 // no input tags
252 if (empty($searchtags)) { 320 return $this->noFilter($visibility);
253 return $filtered; 321 }
322
323 // build regex from all tags
324 $re = '/^' . implode(array_map("self::tag2regex", $inputTags)) . '.*$/';
325 if(!$casesensitive) {
326 // make regex case insensitive
327 $re .= 'i';
254 } 328 }
255 329
330 // create resulting array
331 $filtered = array();
332
333 // iterate over each link
256 foreach ($this->links as $key => $link) { 334 foreach ($this->links as $key => $link) {
257 // ignore non private links when 'privatonly' is on. 335 // check level of visibility
258 if (! $link['private'] && $privateonly === true) { 336 // ignore non private links when 'privateonly' is on.
337 if ($visibility !== 'all') {
338 if (! $link['private'] && $visibility === 'private') {
339 continue;
340 } else if ($link['private'] && $visibility === 'public') {
341 continue;
342 }
343 }
344 $search = $link['tags']; // build search string, start with tags of current link
345 if(strlen(trim($link['description'])) && strpos($link['description'], '#') !== false){
346 // description given and at least one possible tag found
347 $descTags = array();
348 // find all tags in the form of #tag in the description
349 preg_match_all(
350 '/(?<![' . self::$HASHTAG_CHARS . '])#([' . self::$HASHTAG_CHARS . ']+?)\b/sm',
351 $link['description'],
352 $descTags
353 );
354 if(count($descTags[1])){
355 // there were some tags in the description, add them to the search string
356 $search .= ' ' . implode(' ', $descTags[1]);
357 }
358 };
359 // match regular expression with search string
360 if(!preg_match($re, $search)){
361 // this entry does _not_ match our regex
259 continue; 362 continue;
260 } 363 }
364 $filtered[$key] = $link;
365 }
366 return $filtered;
367 }
261 368
262 $linktags = self::tagsStrToArray($link['tags'], $casesensitive); 369 /**
263 370 * Return only links without any tag.
264 $found = true; 371 *
265 for ($i = 0 ; $i < count($searchtags) && $found; $i++) { 372 * @param string $visibility return only all/private/public links.
266 // Exclusive search, quit if tag found. 373 *
267 // Or, tag not found in the link, quit. 374 * @return array filtered links.
268 if (($searchtags[$i][0] == '-' 375 */
269 && $this->searchTagAndHashTag(substr($searchtags[$i], 1), $linktags, $link['description'])) 376 public function filterUntagged($visibility)
270 || ($searchtags[$i][0] != '-') 377 {
271 && ! $this->searchTagAndHashTag($searchtags[$i], $linktags, $link['description']) 378 $filtered = [];
272 ) { 379 foreach ($this->links as $key => $link) {
273 $found = false; 380 if ($visibility !== 'all') {
381 if (! $link['private'] && $visibility === 'private') {
382 continue;
383 } else if ($link['private'] && $visibility === 'public') {
384 continue;
274 } 385 }
275 } 386 }
276 387
277 if ($found) { 388 if (empty(trim($link['tags']))) {
278 $filtered[$key] = $link; 389 $filtered[$key] = $link;
279 } 390 }
280 } 391 }
392
281 return $filtered; 393 return $filtered;
282 } 394 }
283 395
@@ -311,28 +423,6 @@ class LinkFilter
311 } 423 }
312 424
313 /** 425 /**
314 * Check if a tag is found in the taglist, or as an hashtag in the link description.
315 *
316 * @param string $tag Tag to search.
317 * @param array $taglist List of tags for the current link.
318 * @param string $description Link description.
319 *
320 * @return bool True if found, false otherwise.
321 */
322 protected function searchTagAndHashTag($tag, $taglist, $description)
323 {
324 if (in_array($tag, $taglist)) {
325 return true;
326 }
327
328 if (preg_match('/(^| )#'. $tag .'([^'. self::$HASHTAG_CHARS .']|$)/mui', $description) > 0) {
329 return true;
330 }
331
332 return false;
333 }
334
335 /**
336 * Convert a list of tags (str) to an array. Also 426 * Convert a list of tags (str) to an array. Also
337 * - handle case sensitivity. 427 * - handle case sensitivity.
338 * - accepts spaces commas as separator. 428 * - accepts spaces commas as separator.
@@ -341,18 +431,24 @@ class LinkFilter
341 * @param bool $casesensitive will convert everything to lowercase if false. 431 * @param bool $casesensitive will convert everything to lowercase if false.
342 * 432 *
343 * @return array filtered tags string. 433 * @return array filtered tags string.
344 */ 434 */
345 public static function tagsStrToArray($tags, $casesensitive) 435 public static function tagsStrToArray($tags, $casesensitive)
346 { 436 {
347 // We use UTF-8 conversion to handle various graphemes (i.e. cyrillic, or greek) 437 // We use UTF-8 conversion to handle various graphemes (i.e. cyrillic, or greek)
348 $tagsOut = $casesensitive ? $tags : mb_convert_case($tags, MB_CASE_LOWER, 'UTF-8'); 438 $tagsOut = $casesensitive ? $tags : mb_convert_case($tags, MB_CASE_LOWER, 'UTF-8');
349 $tagsOut = str_replace(',', ' ', $tagsOut); 439 $tagsOut = str_replace(',', ' ', $tagsOut);
350 440
351 return array_values(array_filter(explode(' ', trim($tagsOut)), 'strlen')); 441 return preg_split('/\s+/', $tagsOut, -1, PREG_SPLIT_NO_EMPTY);
352 } 442 }
353} 443}
354 444
355class LinkNotFoundException extends Exception 445class LinkNotFoundException extends Exception
356{ 446{
357 protected $message = 'The link you are trying to reach does not exist or has been deleted.'; 447 /**
448 * LinkNotFoundException constructor.
449 */
450 public function __construct()
451 {
452 $this->message = t('The link you are trying to reach does not exist or has been deleted.');
453 }
358} 454}
diff --git a/application/LinkUtils.php b/application/LinkUtils.php
index cf58f808..3705f7e9 100644
--- a/application/LinkUtils.php
+++ b/application/LinkUtils.php
@@ -1,60 +1,81 @@
1<?php 1<?php
2 2
3/** 3/**
4 * Extract title from an HTML document. 4 * Get cURL callback function for CURLOPT_WRITEFUNCTION
5 * 5 *
6 * @param string $html HTML content where to look for a title. 6 * @param string $charset to extract from the downloaded page (reference)
7 * @param string $title to extract from the downloaded page (reference)
8 * @param string $curlGetInfo Optionnaly overrides curl_getinfo function
7 * 9 *
8 * @return bool|string Extracted title if found, false otherwise. 10 * @return Closure
9 */ 11 */
10function html_extract_title($html) 12function get_curl_download_callback(&$charset, &$title, $curlGetInfo = 'curl_getinfo')
11{ 13{
12 if (preg_match('!<title.*?>(.*?)</title>!is', $html, $matches)) { 14 /**
13 return trim(str_replace("\n", '', $matches[1])); 15 * cURL callback function for CURLOPT_WRITEFUNCTION (called during the download).
14 } 16 *
15 return false; 17 * While downloading the remote page, we check that the HTTP code is 200 and content type is 'html/text'
18 * Then we extract the title and the charset and stop the download when it's done.
19 *
20 * @param resource $ch cURL resource
21 * @param string $data chunk of data being downloaded
22 *
23 * @return int|bool length of $data or false if we need to stop the download
24 */
25 return function(&$ch, $data) use ($curlGetInfo, &$charset, &$title) {
26 $responseCode = $curlGetInfo($ch, CURLINFO_RESPONSE_CODE);
27 if (!empty($responseCode) && $responseCode != 200) {
28 return false;
29 }
30 $contentType = $curlGetInfo($ch, CURLINFO_CONTENT_TYPE);
31 if (!empty($contentType) && strpos($contentType, 'text/html') === false) {
32 return false;
33 }
34 if (empty($charset)) {
35 $charset = header_extract_charset($contentType);
36 }
37 if (empty($charset)) {
38 $charset = html_extract_charset($data);
39 }
40 if (empty($title)) {
41 $title = html_extract_title($data);
42 }
43 // We got everything we want, stop the download.
44 if (!empty($responseCode) && !empty($contentType) && !empty($charset) && !empty($title)) {
45 return false;
46 }
47
48 return strlen($data);
49 };
16} 50}
17 51
18/** 52/**
19 * Determine charset from downloaded page. 53 * Extract title from an HTML document.
20 * Priority:
21 * 1. HTTP headers (Content type).
22 * 2. HTML content page (tag <meta charset>).
23 * 3. Use a default charset (default: UTF-8).
24 * 54 *
25 * @param array $headers HTTP headers array. 55 * @param string $html HTML content where to look for a title.
26 * @param string $htmlContent HTML content where to look for charset.
27 * @param string $defaultCharset Default charset to apply if other methods failed.
28 * 56 *
29 * @return string Determined charset. 57 * @return bool|string Extracted title if found, false otherwise.
30 */ 58 */
31function get_charset($headers, $htmlContent, $defaultCharset = 'utf-8') 59function html_extract_title($html)
32{ 60{
33 if ($charset = headers_extract_charset($headers)) { 61 if (preg_match('!<title.*?>(.*?)</title>!is', $html, $matches)) {
34 return $charset; 62 return trim(str_replace("\n", '', $matches[1]));
35 }
36
37 if ($charset = html_extract_charset($htmlContent)) {
38 return $charset;
39 } 63 }
40 64 return false;
41 return $defaultCharset;
42} 65}
43 66
44/** 67/**
45 * Extract charset from HTTP headers if it's defined. 68 * Extract charset from HTTP header if it's defined.
46 * 69 *
47 * @param array $headers HTTP headers array. 70 * @param string $header HTTP header Content-Type line.
48 * 71 *
49 * @return bool|string Charset string if found (lowercase), false otherwise. 72 * @return bool|string Charset string if found (lowercase), false otherwise.
50 */ 73 */
51function headers_extract_charset($headers) 74function header_extract_charset($header)
52{ 75{
53 if (! empty($headers['Content-Type']) && strpos($headers['Content-Type'], 'charset=') !== false) { 76 preg_match('/charset="?([^; ]+)/i', $header, $match);
54 preg_match('/charset="?([^; ]+)/i', $headers['Content-Type'], $match); 77 if (! empty($match[1])) {
55 if (! empty($match[1])) { 78 return strtolower(trim($match[1]));
56 return strtolower(trim($match[1]));
57 }
58 } 79 }
59 80
60 return false; 81 return false;
@@ -89,7 +110,9 @@ function count_private($links)
89{ 110{
90 $cpt = 0; 111 $cpt = 0;
91 foreach ($links as $link) { 112 foreach ($links as $link) {
92 $cpt = $link['private'] == true ? $cpt + 1 : $cpt; 113 if ($link['private']) {
114 $cpt += 1;
115 }
93 } 116 }
94 117
95 return $cpt; 118 return $cpt;
@@ -100,14 +123,15 @@ function count_private($links)
100 * 123 *
101 * @param string $text input string. 124 * @param string $text input string.
102 * @param string $redirector if a redirector is set, use it to gerenate links. 125 * @param string $redirector if a redirector is set, use it to gerenate links.
126 * @param bool $urlEncode Use `urlencode()` on the URL after the redirector or not.
103 * 127 *
104 * @return string returns $text with all links converted to HTML links. 128 * @return string returns $text with all links converted to HTML links.
105 * 129 *
106 * @see Function inspired from http://www.php.net/manual/en/function.preg-replace.php#85722 130 * @see Function inspired from http://www.php.net/manual/en/function.preg-replace.php#85722
107 */ 131 */
108function text2clickable($text, $redirector = '') 132function text2clickable($text, $redirector = '', $urlEncode = true)
109{ 133{
110 $regex = '!(((?:https?|ftp|file)://|apt:|magnet:)\S+[[:alnum:]]/?)!si'; 134 $regex = '!(((?:https?|ftp|file)://|apt:|magnet:)\S+[a-z0-9\(\)]/?)!si';
111 135
112 if (empty($redirector)) { 136 if (empty($redirector)) {
113 return preg_replace($regex, '<a href="$1">$1</a>', $text); 137 return preg_replace($regex, '<a href="$1">$1</a>', $text);
@@ -115,8 +139,9 @@ function text2clickable($text, $redirector = '')
115 // Redirector is set, urlencode the final URL. 139 // Redirector is set, urlencode the final URL.
116 return preg_replace_callback( 140 return preg_replace_callback(
117 $regex, 141 $regex,
118 function ($matches) use ($redirector) { 142 function ($matches) use ($redirector, $urlEncode) {
119 return '<a href="' . $redirector . urlencode($matches[1]) .'">'. $matches[1] .'</a>'; 143 $url = $urlEncode ? urlencode($matches[1]) : $matches[1];
144 return '<a href="' . $redirector . $url .'">'. $matches[1] .'</a>';
120 }, 145 },
121 $text 146 $text
122 ); 147 );
@@ -162,12 +187,13 @@ function space2nbsp($text)
162 * 187 *
163 * @param string $description shaare's description. 188 * @param string $description shaare's description.
164 * @param string $redirector if a redirector is set, use it to gerenate links. 189 * @param string $redirector if a redirector is set, use it to gerenate links.
190 * @param bool $urlEncode Use `urlencode()` on the URL after the redirector or not.
165 * @param string $indexUrl URL to Shaarli's index. 191 * @param string $indexUrl URL to Shaarli's index.
166 * 192
167 * @return string formatted description. 193 * @return string formatted description.
168 */ 194 */
169function format_description($description, $redirector = '', $indexUrl = '') { 195function format_description($description, $redirector = '', $urlEncode = true, $indexUrl = '') {
170 return nl2br(space2nbsp(hashtag_autolink(text2clickable($description, $redirector), $indexUrl))); 196 return nl2br(space2nbsp(hashtag_autolink(text2clickable($description, $redirector, $urlEncode), $indexUrl)));
171} 197}
172 198
173/** 199/**
diff --git a/application/NetscapeBookmarkUtils.php b/application/NetscapeBookmarkUtils.php
index e7148d00..dd7057f8 100644
--- a/application/NetscapeBookmarkUtils.php
+++ b/application/NetscapeBookmarkUtils.php
@@ -1,7 +1,13 @@
1<?php 1<?php
2 2
3use Psr\Log\LogLevel;
4use Shaarli\Config\ConfigManager;
5use Shaarli\NetscapeBookmarkParser\NetscapeBookmarkParser;
6use Katzgrau\KLogger\Logger;
7
3/** 8/**
4 * Utilities to import and export bookmarks using the Netscape format 9 * Utilities to import and export bookmarks using the Netscape format
10 * TODO: Not static, use a container.
5 */ 11 */
6class NetscapeBookmarkUtils 12class NetscapeBookmarkUtils
7{ 13{
@@ -26,11 +32,10 @@ class NetscapeBookmarkUtils
26 { 32 {
27 // see tpl/export.html for possible values 33 // see tpl/export.html for possible values
28 if (! in_array($selection, array('all', 'public', 'private'))) { 34 if (! in_array($selection, array('all', 'public', 'private'))) {
29 throw new Exception('Invalid export selection: "'.$selection.'"'); 35 throw new Exception(t('Invalid export selection:') .' "'.$selection.'"');
30 } 36 }
31 37
32 $bookmarkLinks = array(); 38 $bookmarkLinks = array();
33
34 foreach ($linkDb as $link) { 39 foreach ($linkDb as $link) {
35 if ($link['private'] != 0 && $selection == 'public') { 40 if ($link['private'] != 0 && $selection == 'public') {
36 continue; 41 continue;
@@ -60,6 +65,7 @@ class NetscapeBookmarkUtils
60 * @param int $importCount how many links were imported 65 * @param int $importCount how many links were imported
61 * @param int $overwriteCount how many links were overwritten 66 * @param int $overwriteCount how many links were overwritten
62 * @param int $skipCount how many links were skipped 67 * @param int $skipCount how many links were skipped
68 * @param int $duration how many seconds did the import take
63 * 69 *
64 * @return string Summary of the bookmark import status 70 * @return string Summary of the bookmark import status
65 */ 71 */
@@ -68,16 +74,18 @@ class NetscapeBookmarkUtils
68 $filesize, 74 $filesize,
69 $importCount=0, 75 $importCount=0,
70 $overwriteCount=0, 76 $overwriteCount=0,
71 $skipCount=0 77 $skipCount=0,
78 $duration=0
72 ) 79 )
73 { 80 {
74 $status = 'File '.$filename.' ('.$filesize.' bytes) '; 81 $status = sprintf(t('File %s (%d bytes) '), $filename, $filesize);
75 if ($importCount == 0 && $overwriteCount == 0 && $skipCount == 0) { 82 if ($importCount == 0 && $overwriteCount == 0 && $skipCount == 0) {
76 $status .= 'has an unknown file format. Nothing was imported.'; 83 $status .= t('has an unknown file format. Nothing was imported.');
77 } else { 84 } else {
78 $status .= 'was successfully processed: '.$importCount.' links imported, '; 85 $status .= vsprintf(
79 $status .= $overwriteCount.' links overwritten, '; 86 t('was successfully processed in %d seconds: %d links imported, %d links overwritten, %d links skipped.'),
80 $status .= $skipCount.' links skipped.'; 87 [$duration, $importCount, $overwriteCount, $skipCount]
88 );
81 } 89 }
82 return $status; 90 return $status;
83 } 91 }
@@ -85,15 +93,17 @@ class NetscapeBookmarkUtils
85 /** 93 /**
86 * Imports Web bookmarks from an uploaded Netscape bookmark dump 94 * Imports Web bookmarks from an uploaded Netscape bookmark dump
87 * 95 *
88 * @param array $post Server $_POST parameters 96 * @param array $post Server $_POST parameters
89 * @param array $files Server $_FILES parameters 97 * @param array $files Server $_FILES parameters
90 * @param LinkDB $linkDb Loaded LinkDB instance 98 * @param LinkDB $linkDb Loaded LinkDB instance
91 * @param string $pagecache Page cache 99 * @param ConfigManager $conf instance
100 * @param History $history History instance
92 * 101 *
93 * @return string Summary of the bookmark import status 102 * @return string Summary of the bookmark import status
94 */ 103 */
95 public static function import($post, $files, $linkDb, $pagecache) 104 public static function import($post, $files, $linkDb, $conf, $history)
96 { 105 {
106 $start = time();
97 $filename = $files['filetoupload']['name']; 107 $filename = $files['filetoupload']['name'];
98 $filesize = $files['filetoupload']['size']; 108 $filesize = $files['filetoupload']['size'];
99 $data = file_get_contents($files['filetoupload']['tmp_name']); 109 $data = file_get_contents($files['filetoupload']['tmp_name']);
@@ -119,10 +129,20 @@ class NetscapeBookmarkUtils
119 $defaultPrivacy = 0; 129 $defaultPrivacy = 0;
120 130
121 $parser = new NetscapeBookmarkParser( 131 $parser = new NetscapeBookmarkParser(
122 true, // nested tag support 132 true, // nested tag support
123 $defaultTags, // additional user-specified tags 133 $defaultTags, // additional user-specified tags
124 strval(1 - $defaultPrivacy) // defaultPub = 1 - defaultPrivacy 134 strval(1 - $defaultPrivacy), // defaultPub = 1 - defaultPrivacy
135 $conf->get('resource.data_dir') // log path, will be overridden
125 ); 136 );
137 $logger = new Logger(
138 $conf->get('resource.data_dir'),
139 ! $conf->get('dev.debug') ? LogLevel::INFO : LogLevel::DEBUG,
140 [
141 'prefix' => 'import.',
142 'extension' => 'log',
143 ]
144 );
145 $parser->setLogger($logger);
126 $bookmarks = $parser->parseString($data); 146 $bookmarks = $parser->parseString($data);
127 147
128 $importCount = 0; 148 $importCount = 0;
@@ -163,6 +183,7 @@ class NetscapeBookmarkUtils
163 $newLink['id'] = $existingLink['id']; 183 $newLink['id'] = $existingLink['id'];
164 $newLink['created'] = $existingLink['created']; 184 $newLink['created'] = $existingLink['created'];
165 $newLink['updated'] = new DateTime(); 185 $newLink['updated'] = new DateTime();
186 $newLink['shorturl'] = $existingLink['shorturl'];
166 $linkDb[$existingLink['id']] = $newLink; 187 $linkDb[$existingLink['id']] = $newLink;
167 $importCount++; 188 $importCount++;
168 $overwriteCount++; 189 $overwriteCount++;
@@ -179,13 +200,17 @@ class NetscapeBookmarkUtils
179 $importCount++; 200 $importCount++;
180 } 201 }
181 202
182 $linkDb->save($pagecache); 203 $linkDb->save($conf->get('resource.page_cache'));
204 $history->importLinks();
205
206 $duration = time() - $start;
183 return self::importStatus( 207 return self::importStatus(
184 $filename, 208 $filename,
185 $filesize, 209 $filesize,
186 $importCount, 210 $importCount,
187 $overwriteCount, 211 $overwriteCount,
188 $skipCount 212 $skipCount,
213 $duration
189 ); 214 );
190 } 215 }
191} 216}
diff --git a/application/PageBuilder.php b/application/PageBuilder.php
index 32c7f9f1..468f144b 100644
--- a/application/PageBuilder.php
+++ b/application/PageBuilder.php
@@ -1,5 +1,7 @@
1<?php 1<?php
2 2
3use Shaarli\Config\ConfigManager;
4
3/** 5/**
4 * This class is in charge of building the final page. 6 * This class is in charge of building the final page.
5 * (This is basically a wrapper around RainTPL which pre-fills some fields.) 7 * (This is basically a wrapper around RainTPL which pre-fills some fields.)
@@ -20,15 +22,24 @@ class PageBuilder
20 protected $conf; 22 protected $conf;
21 23
22 /** 24 /**
25 * @var LinkDB $linkDB instance.
26 */
27 protected $linkDB;
28
29 /**
23 * PageBuilder constructor. 30 * PageBuilder constructor.
24 * $tpl is initialized at false for lazy loading. 31 * $tpl is initialized at false for lazy loading.
25 * 32 *
26 * @param ConfigManager $conf Configuration Manager instance (reference). 33 * @param ConfigManager $conf Configuration Manager instance (reference).
34 * @param LinkDB $linkDB instance.
35 * @param string $token Session token
27 */ 36 */
28 function __construct(&$conf) 37 public function __construct(&$conf, $linkDB = null, $token = null)
29 { 38 {
30 $this->tpl = false; 39 $this->tpl = false;
31 $this->conf = $conf; 40 $this->conf = $conf;
41 $this->linkDB = $linkDB;
42 $this->token = $token;
32 } 43 }
33 44
34 /** 45 /**
@@ -40,7 +51,7 @@ class PageBuilder
40 51
41 try { 52 try {
42 $version = ApplicationUtils::checkUpdate( 53 $version = ApplicationUtils::checkUpdate(
43 shaarli_version, 54 SHAARLI_VERSION,
44 $this->conf->get('resource.update_check'), 55 $this->conf->get('resource.update_check'),
45 $this->conf->get('updates.check_updates_interval'), 56 $this->conf->get('updates.check_updates_interval'),
46 $this->conf->get('updates.check_updates'), 57 $this->conf->get('updates.check_updates'),
@@ -66,18 +77,28 @@ class PageBuilder
66 } 77 }
67 $this->tpl->assign('searchcrits', $searchcrits); 78 $this->tpl->assign('searchcrits', $searchcrits);
68 $this->tpl->assign('source', index_url($_SERVER)); 79 $this->tpl->assign('source', index_url($_SERVER));
69 $this->tpl->assign('version', shaarli_version); 80 $this->tpl->assign('version', SHAARLI_VERSION);
81 $this->tpl->assign(
82 'version_hash',
83 ApplicationUtils::getVersionHash(SHAARLI_VERSION, $this->conf->get('credentials.salt'))
84 );
70 $this->tpl->assign('scripturl', index_url($_SERVER)); 85 $this->tpl->assign('scripturl', index_url($_SERVER));
71 $this->tpl->assign('privateonly', !empty($_SESSION['privateonly'])); // Show only private links? 86 $this->tpl->assign('privateonly', !empty($_SESSION['privateonly'])); // Show only private links?
87 $this->tpl->assign('untaggedonly', !empty($_SESSION['untaggedonly']));
72 $this->tpl->assign('pagetitle', $this->conf->get('general.title', 'Shaarli')); 88 $this->tpl->assign('pagetitle', $this->conf->get('general.title', 'Shaarli'));
73 if ($this->conf->exists('general.header_link')) { 89 if ($this->conf->exists('general.header_link')) {
74 $this->tpl->assign('titleLink', $this->conf->get('general.header_link')); 90 $this->tpl->assign('titleLink', $this->conf->get('general.header_link'));
75 } 91 }
76 $this->tpl->assign('shaarlititle', $this->conf->get('general.title', 'Shaarli')); 92 $this->tpl->assign('shaarlititle', $this->conf->get('general.title', 'Shaarli'));
77 $this->tpl->assign('openshaarli', $this->conf->get('security.open_shaarli', false)); 93 $this->tpl->assign('openshaarli', $this->conf->get('security.open_shaarli', false));
78 $this->tpl->assign('showatom', $this->conf->get('feed.show_atom', false)); 94 $this->tpl->assign('showatom', $this->conf->get('feed.show_atom', true));
95 $this->tpl->assign('feed_type', $this->conf->get('feed.show_atom', true) !== false ? 'atom' : 'rss');
79 $this->tpl->assign('hide_timestamps', $this->conf->get('privacy.hide_timestamps', false)); 96 $this->tpl->assign('hide_timestamps', $this->conf->get('privacy.hide_timestamps', false));
80 $this->tpl->assign('token', getToken($this->conf)); 97 $this->tpl->assign('token', $this->token);
98
99 if ($this->linkDB !== null) {
100 $this->tpl->assign('tags', $this->linkDB->linksCountPerTag());
101 }
81 // To be removed with a proper theme configuration. 102 // To be removed with a proper theme configuration.
82 $this->tpl->assign('conf', $this->conf); 103 $this->tpl->assign('conf', $this->conf);
83 } 104 }
@@ -140,9 +161,12 @@ class PageBuilder
140 * 161 *
141 * @param string $message A messate to display what is not found 162 * @param string $message A messate to display what is not found
142 */ 163 */
143 public function render404($message = 'The page you are trying to reach does not exist or has been deleted.') 164 public function render404($message = '')
144 { 165 {
145 header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); 166 if (empty($message)) {
167 $message = t('The page you are trying to reach does not exist or has been deleted.');
168 }
169 header($_SERVER['SERVER_PROTOCOL'] .' '. t('404 Not Found'));
146 $this->tpl->assign('error_message', $message); 170 $this->tpl->assign('error_message', $message);
147 $this->renderPage('404'); 171 $this->renderPage('404');
148 } 172 }
diff --git a/application/PluginManager.php b/application/PluginManager.php
index 59ece4fa..cf603845 100644
--- a/application/PluginManager.php
+++ b/application/PluginManager.php
@@ -188,6 +188,9 @@ class PluginManager
188 $metaData[$plugin] = parse_ini_file($metaFile); 188 $metaData[$plugin] = parse_ini_file($metaFile);
189 $metaData[$plugin]['order'] = array_search($plugin, $this->authorizedPlugins); 189 $metaData[$plugin]['order'] = array_search($plugin, $this->authorizedPlugins);
190 190
191 if (isset($metaData[$plugin]['description'])) {
192 $metaData[$plugin]['description'] = t($metaData[$plugin]['description']);
193 }
191 // Read parameters and format them into an array. 194 // Read parameters and format them into an array.
192 if (isset($metaData[$plugin]['parameters'])) { 195 if (isset($metaData[$plugin]['parameters'])) {
193 $params = explode(';', $metaData[$plugin]['parameters']); 196 $params = explode(';', $metaData[$plugin]['parameters']);
@@ -203,7 +206,7 @@ class PluginManager
203 $metaData[$plugin]['parameters'][$param]['value'] = ''; 206 $metaData[$plugin]['parameters'][$param]['value'] = '';
204 // Optional parameter description in parameter.PARAM_NAME= 207 // Optional parameter description in parameter.PARAM_NAME=
205 if (isset($metaData[$plugin]['parameter.'. $param])) { 208 if (isset($metaData[$plugin]['parameter.'. $param])) {
206 $metaData[$plugin]['parameters'][$param]['desc'] = $metaData[$plugin]['parameter.'. $param]; 209 $metaData[$plugin]['parameters'][$param]['desc'] = t($metaData[$plugin]['parameter.'. $param]);
207 } 210 }
208 } 211 }
209 } 212 }
@@ -237,6 +240,6 @@ class PluginFileNotFoundException extends Exception
237 */ 240 */
238 public function __construct($pluginName) 241 public function __construct($pluginName)
239 { 242 {
240 $this->message = 'Plugin "'. $pluginName .'" files not found.'; 243 $this->message = sprintf(t('Plugin "%s" files not found.'), $pluginName);
241 } 244 }
242} 245}
diff --git a/application/Router.php b/application/Router.php
index caed4a28..4df0387c 100644
--- a/application/Router.php
+++ b/application/Router.php
@@ -13,6 +13,8 @@ class Router
13 13
14 public static $PAGE_TAGCLOUD = 'tagcloud'; 14 public static $PAGE_TAGCLOUD = 'tagcloud';
15 15
16 public static $PAGE_TAGLIST = 'taglist';
17
16 public static $PAGE_DAILY = 'daily'; 18 public static $PAGE_DAILY = 'daily';
17 19
18 public static $PAGE_FEED_ATOM = 'atom'; 20 public static $PAGE_FEED_ATOM = 'atom';
@@ -31,6 +33,8 @@ class Router
31 33
32 public static $PAGE_EDITLINK = 'edit_link'; 34 public static $PAGE_EDITLINK = 'edit_link';
33 35
36 public static $PAGE_DELETELINK = 'delete_link';
37
34 public static $PAGE_EXPORT = 'export'; 38 public static $PAGE_EXPORT = 'export';
35 39
36 public static $PAGE_IMPORT = 'import'; 40 public static $PAGE_IMPORT = 'import';
@@ -43,6 +47,8 @@ class Router
43 47
44 public static $PAGE_SAVE_PLUGINSADMIN = 'save_pluginadmin'; 48 public static $PAGE_SAVE_PLUGINSADMIN = 'save_pluginadmin';
45 49
50 public static $GET_TOKEN = 'token';
51
46 /** 52 /**
47 * Reproducing renderPage() if hell, to avoid regression. 53 * Reproducing renderPage() if hell, to avoid regression.
48 * 54 *
@@ -75,6 +81,10 @@ class Router
75 return self::$PAGE_TAGCLOUD; 81 return self::$PAGE_TAGCLOUD;
76 } 82 }
77 83
84 if (startsWith($query, 'do='. self::$PAGE_TAGLIST)) {
85 return self::$PAGE_TAGLIST;
86 }
87
78 if (startsWith($query, 'do='. self::$PAGE_OPENSEARCH)) { 88 if (startsWith($query, 'do='. self::$PAGE_OPENSEARCH)) {
79 return self::$PAGE_OPENSEARCH; 89 return self::$PAGE_OPENSEARCH;
80 } 90 }
@@ -120,6 +130,10 @@ class Router
120 return self::$PAGE_EDITLINK; 130 return self::$PAGE_EDITLINK;
121 } 131 }
122 132
133 if (isset($get['delete_link'])) {
134 return self::$PAGE_DELETELINK;
135 }
136
123 if (startsWith($query, 'do='. self::$PAGE_EXPORT)) { 137 if (startsWith($query, 'do='. self::$PAGE_EXPORT)) {
124 return self::$PAGE_EXPORT; 138 return self::$PAGE_EXPORT;
125 } 139 }
@@ -136,6 +150,10 @@ class Router
136 return self::$PAGE_SAVE_PLUGINSADMIN; 150 return self::$PAGE_SAVE_PLUGINSADMIN;
137 } 151 }
138 152
153 if (startsWith($query, 'do='. self::$GET_TOKEN)) {
154 return self::$GET_TOKEN;
155 }
156
139 return self::$PAGE_LINKLIST; 157 return self::$PAGE_LINKLIST;
140 } 158 }
141} 159}
diff --git a/application/SessionManager.php b/application/SessionManager.php
new file mode 100644
index 00000000..71f0b38d
--- /dev/null
+++ b/application/SessionManager.php
@@ -0,0 +1,83 @@
1<?php
2namespace Shaarli;
3
4/**
5 * Manages the server-side session
6 */
7class SessionManager
8{
9 protected $session = [];
10
11 /**
12 * Constructor
13 *
14 * @param array $session The $_SESSION array (reference)
15 * @param ConfigManager $conf ConfigManager instance
16 */
17 public function __construct(& $session, $conf)
18 {
19 $this->session = &$session;
20 $this->conf = $conf;
21 }
22
23 /**
24 * Generates a session token
25 *
26 * @return string token
27 */
28 public function generateToken()
29 {
30 $token = sha1(uniqid('', true) .'_'. mt_rand() . $this->conf->get('credentials.salt'));
31 $this->session['tokens'][$token] = 1;
32 return $token;
33 }
34
35 /**
36 * Checks the validity of a session token, and destroys it afterwards
37 *
38 * @param string $token The token to check
39 *
40 * @return bool true if the token is valid, else false
41 */
42 public function checkToken($token)
43 {
44 if (! isset($this->session['tokens'][$token])) {
45 // the token is wrong, or has already been used
46 return false;
47 }
48
49 // destroy the token to prevent future use
50 unset($this->session['tokens'][$token]);
51 return true;
52 }
53
54 /**
55 * Validate session ID to prevent Full Path Disclosure.
56 *
57 * See #298.
58 * The session ID's format depends on the hash algorithm set in PHP settings
59 *
60 * @param string $sessionId Session ID
61 *
62 * @return true if valid, false otherwise.
63 *
64 * @see http://php.net/manual/en/function.hash-algos.php
65 * @see http://php.net/manual/en/session.configuration.php
66 */
67 public static function checkId($sessionId)
68 {
69 if (empty($sessionId)) {
70 return false;
71 }
72
73 if (!$sessionId) {
74 return false;
75 }
76
77 if (!preg_match('/^[a-zA-Z0-9,-]{2,128}$/', $sessionId)) {
78 return false;
79 }
80
81 return true;
82 }
83}
diff --git a/application/ThemeUtils.php b/application/ThemeUtils.php
new file mode 100644
index 00000000..16f2f6a2
--- /dev/null
+++ b/application/ThemeUtils.php
@@ -0,0 +1,34 @@
1<?php
2
3namespace Shaarli;
4
5/**
6 * Class ThemeUtils
7 *
8 * Utility functions related to theme management.
9 *
10 * @package Shaarli
11 */
12class ThemeUtils
13{
14 /**
15 * Get a list of available themes.
16 *
17 * It will return the name of any directory present in the template folder.
18 *
19 * @param string $tplDir Templates main directory.
20 *
21 * @return array List of theme names.
22 */
23 public static function getThemes($tplDir)
24 {
25 $tplDir = rtrim($tplDir, '/');
26 $allTheme = glob($tplDir.'/*', GLOB_ONLYDIR);
27 $themes = [];
28 foreach ($allTheme as $value) {
29 $themes[] = str_replace($tplDir.'/', '', $value);
30 }
31
32 return $themes;
33 }
34}
diff --git a/application/TimeZone.php b/application/TimeZone.php
index 36a8fb12..c1869ef8 100644
--- a/application/TimeZone.php
+++ b/application/TimeZone.php
@@ -1,23 +1,42 @@
1<?php 1<?php
2/** 2/**
3 * Generates the timezone selection form and JavaScript. 3 * Generates a list of available timezone continents and cities.
4 * 4 *
5 * Note: 'UTC/UTC' is mapped to 'UTC' to form a valid option 5 * Two distinct array based on available timezones
6 * and the one selected in the settings:
7 * - (0) continents:
8 * + list of available continents
9 * + special key 'selected' containing the value of the selected timezone's continent
10 * - (1) cities:
11 * + list of available cities associated with their continent
12 * + special key 'selected' containing the value of the selected timezone's city (without the continent)
6 * 13 *
7 * Example: preselect Europe/Paris 14 * Example:
8 * list($htmlform, $js) = generateTimeZoneForm('Europe/Paris'); 15 * [
16 * [
17 * 'America',
18 * 'Europe',
19 * 'selected' => 'Europe',
20 * ],
21 * [
22 * ['continent' => 'America', 'city' => 'Toronto'],
23 * ['continent' => 'Europe', 'city' => 'Paris'],
24 * 'selected' => 'Paris',
25 * ],
26 * ];
9 * 27 *
28 * Notes:
29 * - 'UTC/UTC' is mapped to 'UTC' to form a valid option
30 * - a few timezone cities includes the country/state, such as Argentina/Buenos_Aires
31 * - these arrays are designed to build timezone selects in template files with any HTML structure
32 *
33 * @param array $installedTimeZones List of installed timezones as string
10 * @param string $preselectedTimezone preselected timezone (optional) 34 * @param string $preselectedTimezone preselected timezone (optional)
11 * 35 *
12 * @return array containing the generated HTML form and Javascript code 36 * @return array[] continents and cities
13 **/ 37 **/
14function generateTimeZoneForm($preselectedTimezone='') 38function generateTimeZoneData($installedTimeZones, $preselectedTimezone = '')
15{ 39{
16 // Select the server timezone
17 if ($preselectedTimezone == '') {
18 $preselectedTimezone = date_default_timezone_get();
19 }
20
21 if ($preselectedTimezone == 'UTC') { 40 if ($preselectedTimezone == 'UTC') {
22 $pcity = $pcontinent = 'UTC'; 41 $pcity = $pcontinent = 'UTC';
23 } else { 42 } else {
@@ -27,62 +46,30 @@ function generateTimeZoneForm($preselectedTimezone='')
27 $pcity = substr($preselectedTimezone, $spos+1); 46 $pcity = substr($preselectedTimezone, $spos+1);
28 } 47 }
29 48
30 // The list is in the form 'Europe/Paris', 'America/Argentina/Buenos_Aires' 49 $continents = [];
31 // We split the list in continents/cities. 50 $cities = [];
32 $continents = array(); 51 foreach ($installedTimeZones as $tz) {
33 $cities = array();
34
35 // TODO: use a template to generate the HTML/Javascript form
36
37 foreach (timezone_identifiers_list() as $tz) {
38 if ($tz == 'UTC') { 52 if ($tz == 'UTC') {
39 $tz = 'UTC/UTC'; 53 $tz = 'UTC/UTC';
40 } 54 }
41 $spos = strpos($tz, '/'); 55 $spos = strpos($tz, '/');
42 56
43 if ($spos !== false) { 57 // Ignore invalid timezones
44 $continent = substr($tz, 0, $spos); 58 if ($spos === false) {
45 $city = substr($tz, $spos+1); 59 continue;
46 $continents[$continent] = 1;
47
48 if (!isset($cities[$continent])) {
49 $cities[$continent] = '';
50 }
51 $cities[$continent] .= '<option value="'.$city.'"';
52 if ($pcity == $city) {
53 $cities[$continent] .= ' selected="selected"';
54 }
55 $cities[$continent] .= '>'.$city.'</option>';
56 } 60 }
57 }
58
59 $continentsHtml = '';
60 $continents = array_keys($continents);
61 61
62 foreach ($continents as $continent) { 62 $continent = substr($tz, 0, $spos);
63 $continentsHtml .= '<option value="'.$continent.'"'; 63 $city = substr($tz, $spos+1);
64 if ($pcontinent == $continent) { 64 $cities[] = ['continent' => $continent, 'city' => $city];
65 $continentsHtml .= ' selected="selected"'; 65 $continents[$continent] = true;
66 }
67 $continentsHtml .= '>'.$continent.'</option>';
68 } 66 }
69 67
70 // Timezone selection form 68 $continents = array_keys($continents);
71 $timezoneForm = 'Continent:'; 69 $continents['selected'] = $pcontinent;
72 $timezoneForm .= '<select name="continent" id="continent" onChange="onChangecontinent();">'; 70 $cities['selected'] = $pcity;
73 $timezoneForm .= $continentsHtml.'</select>';
74 $timezoneForm .= '&nbsp;&nbsp;&nbsp;&nbsp;City:';
75 $timezoneForm .= '<select name="city" id="city">'.$cities[$pcontinent].'</select><br />';
76
77 // Javascript handler - updates the city list when the user selects a continent
78 $timezoneJs = '<script>';
79 $timezoneJs .= 'function onChangecontinent() {';
80 $timezoneJs .= 'document.getElementById("city").innerHTML =';
81 $timezoneJs .= ' citiescontinent[document.getElementById("continent").value]; }';
82 $timezoneJs .= 'var citiescontinent = '.json_encode($cities).';';
83 $timezoneJs .= '</script>';
84 71
85 return array($timezoneForm, $timezoneJs); 72 return [$continents, $cities];
86} 73}
87 74
88/** 75/**
diff --git a/application/Updater.php b/application/Updater.php
index 555d4c25..034b8ed8 100644
--- a/application/Updater.php
+++ b/application/Updater.php
@@ -1,4 +1,7 @@
1<?php 1<?php
2use Shaarli\Config\ConfigJson;
3use Shaarli\Config\ConfigPhp;
4use Shaarli\Config\ConfigManager;
2 5
3/** 6/**
4 * Class Updater. 7 * Class Updater.
@@ -69,8 +72,8 @@ class Updater
69 return $updatesRan; 72 return $updatesRan;
70 } 73 }
71 74
72 if ($this->methods == null) { 75 if ($this->methods === null) {
73 throw new UpdaterException('Couldn\'t retrieve Updater class methods.'); 76 throw new UpdaterException(t('Couldn\'t retrieve Updater class methods.'));
74 } 77 }
75 78
76 foreach ($this->methods as $method) { 79 foreach ($this->methods as $method) {
@@ -133,21 +136,6 @@ class Updater
133 } 136 }
134 137
135 /** 138 /**
136 * Rename tags starting with a '-' to work with tag exclusion search.
137 */
138 public function updateMethodRenameDashTags()
139 {
140 $linklist = $this->linkDB->filterSearch();
141 foreach ($linklist as $key => $link) {
142 $link['tags'] = preg_replace('/(^| )\-/', '$1', $link['tags']);
143 $link['tags'] = implode(' ', array_unique(LinkFilter::tagsStrToArray($link['tags'], true)));
144 $this->linkDB[$key] = $link;
145 }
146 $this->linkDB->save($this->conf->get('resource.page_cache'));
147 return true;
148 }
149
150 /**
151 * Move old configuration in PHP to the new config system in JSON format. 139 * Move old configuration in PHP to the new config system in JSON format.
152 * 140 *
153 * Will rename 'config.php' into 'config.save.php' and create 'config.json.php'. 141 * Will rename 'config.php' into 'config.save.php' and create 'config.json.php'.
@@ -258,6 +246,91 @@ class Updater
258 } 246 }
259 247
260 /** 248 /**
249<<<<<<< HEAD
250=======
251 * Rename tags starting with a '-' to work with tag exclusion search.
252 */
253 public function updateMethodRenameDashTags()
254 {
255 $linklist = $this->linkDB->filterSearch();
256 foreach ($linklist as $key => $link) {
257 $link['tags'] = preg_replace('/(^| )\-/', '$1', $link['tags']);
258 $link['tags'] = implode(' ', array_unique(LinkFilter::tagsStrToArray($link['tags'], true)));
259 $this->linkDB[$key] = $link;
260 }
261 $this->linkDB->save($this->conf->get('resource.page_cache'));
262 return true;
263 }
264
265 /**
266 * Initialize API settings:
267 * - api.enabled: true
268 * - api.secret: generated secret
269 */
270 public function updateMethodApiSettings()
271 {
272 if ($this->conf->exists('api.secret')) {
273 return true;
274 }
275
276 $this->conf->set('api.enabled', true);
277 $this->conf->set(
278 'api.secret',
279 generate_api_secret(
280 $this->conf->get('credentials.login'),
281 $this->conf->get('credentials.salt')
282 )
283 );
284 $this->conf->write($this->isLoggedIn);
285 return true;
286 }
287
288 /**
289 * New setting: theme name. If the default theme is used, nothing to do.
290 *
291 * If the user uses a custom theme, raintpl_tpl dir is updated to the parent directory,
292 * and the current theme is set as default in the theme setting.
293 *
294 * @return bool true if the update is successful, false otherwise.
295 */
296 public function updateMethodDefaultTheme()
297 {
298 // raintpl_tpl isn't the root template directory anymore.
299 // We run the update only if this folder still contains the template files.
300 $tplDir = $this->conf->get('resource.raintpl_tpl');
301 $tplFile = $tplDir . '/linklist.html';
302 if (! file_exists($tplFile)) {
303 return true;
304 }
305
306 $parent = dirname($tplDir);
307 $this->conf->set('resource.raintpl_tpl', $parent);
308 $this->conf->set('resource.theme', trim(str_replace($parent, '', $tplDir), '/'));
309 $this->conf->write($this->isLoggedIn);
310
311 // Dependency injection gore
312 RainTPL::$tpl_dir = $tplDir;
313
314 return true;
315 }
316
317 /**
318 * Move the file to inc/user.css to data/user.css.
319 *
320 * Note: Due to hardcoded paths, it's not unit testable. But one line of code should be fine.
321 *
322 * @return bool true if the update is successful, false otherwise.
323 */
324 public function updateMethodMoveUserCss()
325 {
326 if (! is_file('inc/user.css')) {
327 return true;
328 }
329
330 return rename('inc/user.css', 'data/user.css');
331 }
332
333 /**
261 * * `markdown_escape` is a new setting, set to true as default. 334 * * `markdown_escape` is a new setting, set to true as default.
262 * 335 *
263 * If the markdown plugin was already enabled, escaping is disabled to avoid 336 * If the markdown plugin was already enabled, escaping is disabled to avoid
@@ -278,6 +351,102 @@ class Updater
278 351
279 return true; 352 return true;
280 } 353 }
354
355 /**
356 * Add 'http://' to Piwik URL the setting is set.
357 *
358 * @return bool true if the update is successful, false otherwise.
359 */
360 public function updateMethodPiwikUrl()
361 {
362 if (! $this->conf->exists('plugins.PIWIK_URL') || startsWith($this->conf->get('plugins.PIWIK_URL'), 'http')) {
363 return true;
364 }
365
366 $this->conf->set('plugins.PIWIK_URL', 'http://'. $this->conf->get('plugins.PIWIK_URL'));
367 $this->conf->write($this->isLoggedIn);
368
369 return true;
370 }
371
372 /**
373 * Use ATOM feed as default.
374 */
375 public function updateMethodAtomDefault()
376 {
377 if (!$this->conf->exists('feed.show_atom') || $this->conf->get('feed.show_atom') === true) {
378 return true;
379 }
380
381 $this->conf->set('feed.show_atom', true);
382 $this->conf->write($this->isLoggedIn);
383
384 return true;
385 }
386
387 /**
388 * Update updates.check_updates_branch setting.
389 *
390 * If the current major version digit matches the latest branch
391 * major version digit, we set the branch to `latest`,
392 * otherwise we'll check updates on the `stable` branch.
393 *
394 * No update required for the dev version.
395 *
396 * Note: due to hardcoded URL and lack of dependency injection, this is not unit testable.
397 *
398 * FIXME! This needs to be removed when we switch to first digit major version
399 * instead of the second one since the versionning process will change.
400 */
401 public function updateMethodCheckUpdateRemoteBranch()
402 {
403 if (SHAARLI_VERSION === 'dev' || $this->conf->get('updates.check_updates_branch') === 'latest') {
404 return true;
405 }
406
407 // Get latest branch major version digit
408 $latestVersion = ApplicationUtils::getLatestGitVersionCode(
409 'https://raw.githubusercontent.com/shaarli/Shaarli/latest/shaarli_version.php',
410 5
411 );
412 if (preg_match('/(\d+)\.\d+$/', $latestVersion, $matches) === false) {
413 return false;
414 }
415 $latestMajor = $matches[1];
416
417 // Get current major version digit
418 preg_match('/(\d+)\.\d+$/', SHAARLI_VERSION, $matches);
419 $currentMajor = $matches[1];
420
421 if ($currentMajor === $latestMajor) {
422 $branch = 'latest';
423 } else {
424 $branch = 'stable';
425 }
426 $this->conf->set('updates.check_updates_branch', $branch);
427 $this->conf->write($this->isLoggedIn);
428 return true;
429 }
430
431 /**
432 * Reset history store file due to date format change.
433 */
434 public function updateMethodResetHistoryFile()
435 {
436 if (is_file($this->conf->get('resource.history'))) {
437 unlink($this->conf->get('resource.history'));
438 }
439 return true;
440 }
441
442 /**
443 * Save the datastore -> the link order is now applied when links are saved.
444 */
445 public function updateMethodReorderDatastore()
446 {
447 $this->linkDB->save($this->conf->get('resource.page_cache'));
448 return true;
449 }
281} 450}
282 451
283/** 452/**
@@ -324,7 +493,7 @@ class UpdaterException extends Exception
324 } 493 }
325 494
326 if (! empty($this->method)) { 495 if (! empty($this->method)) {
327 $out .= 'An error occurred while running the update '. $this->method . PHP_EOL; 496 $out .= t('An error occurred while running the update ') . $this->method . PHP_EOL;
328 } 497 }
329 498
330 if (! empty($this->previous)) { 499 if (! empty($this->previous)) {
@@ -364,11 +533,11 @@ function read_updates_file($updatesFilepath)
364function write_updates_file($updatesFilepath, $updates) 533function write_updates_file($updatesFilepath, $updates)
365{ 534{
366 if (empty($updatesFilepath)) { 535 if (empty($updatesFilepath)) {
367 throw new Exception('Updates file path is not set, can\'t write updates.'); 536 throw new Exception(t('Updates file path is not set, can\'t write updates.'));
368 } 537 }
369 538
370 $res = file_put_contents($updatesFilepath, implode(';', $updates)); 539 $res = file_put_contents($updatesFilepath, implode(';', $updates));
371 if ($res === false) { 540 if ($res === false) {
372 throw new Exception('Unable to write updates in '. $updatesFilepath . '.'); 541 throw new Exception(t('Unable to write updates in '. $updatesFilepath . '.'));
373 } 542 }
374} 543}
diff --git a/application/Url.php b/application/Url.php
index c5c7dd18..b3759377 100644
--- a/application/Url.php
+++ b/application/Url.php
@@ -64,6 +64,30 @@ function add_trailing_slash($url)
64} 64}
65 65
66/** 66/**
67 * Replace not whitelisted protocols by 'http://' from given URL.
68 *
69 * @param string $url URL to clean
70 * @param array $protocols List of allowed protocols (aside from http(s)).
71 *
72 * @return string URL with allowed protocol
73 */
74function whitelist_protocols($url, $protocols)
75{
76 if (startsWith($url, '?') || startsWith($url, '/')) {
77 return $url;
78 }
79 $protocols = array_merge(['http', 'https'], $protocols);
80 $protocol = preg_match('#^(\w+):/?/?#', $url, $match);
81 // Protocol not allowed: we remove it and replace it with http
82 if ($protocol === 1 && ! in_array($match[1], $protocols)) {
83 $url = str_replace($match[0], 'http://', $url);
84 } else if ($protocol !== 1) {
85 $url = 'http://' . $url;
86 }
87 return $url;
88}
89
90/**
67 * URL representation and cleanup utilities 91 * URL representation and cleanup utilities
68 * 92 *
69 * Form 93 * Form
@@ -94,7 +118,10 @@ class Url
94 'utm_', 118 'utm_',
95 119
96 // ATInternet 120 // ATInternet
97 'xtor=' 121 'xtor=',
122
123 // Other
124 'campaign_'
98 ); 125 );
99 126
100 private static $annoyingFragments = array( 127 private static $annoyingFragments = array(
diff --git a/application/Utils.php b/application/Utils.php
index 0a5b476e..97b12fcf 100644
--- a/application/Utils.php
+++ b/application/Utils.php
@@ -91,6 +91,10 @@ function endsWith($haystack, $needle, $case = true)
91 */ 91 */
92function escape($input) 92function escape($input)
93{ 93{
94 if (is_bool($input)) {
95 return $input;
96 }
97
94 if (is_array($input)) { 98 if (is_array($input)) {
95 $out = array(); 99 $out = array();
96 foreach($input as $key => $value) { 100 foreach($input as $key => $value) {
@@ -178,56 +182,276 @@ function generateLocation($referer, $host, $loopTerms = array())
178} 182}
179 183
180/** 184/**
181 * Validate session ID to prevent Full Path Disclosure. 185 * Sniff browser language to set the locale automatically.
186 * Note that is may not work on your server if the corresponding locale is not installed.
187 *
188 * @param string $headerLocale Locale send in HTTP headers (e.g. "fr,fr-fr;q=0.8,en;q=0.5,en-us;q=0.3").
189 **/
190function autoLocale($headerLocale)
191{
192 // Default if browser does not send HTTP_ACCEPT_LANGUAGE
193 $locales = array('en_US', 'en_US.utf8', 'en_US.UTF-8');
194 if (! empty($headerLocale)) {
195 if (preg_match_all('/([a-z]{2,3})[-_]?([a-z]{2})?,?/i', $headerLocale, $matches, PREG_SET_ORDER)) {
196 $attempts = [];
197 foreach ($matches as $match) {
198 $first = [strtolower($match[1]), strtoupper($match[1])];
199 $separators = ['_', '-'];
200 $encodings = ['utf8', 'UTF-8'];
201 if (!empty($match[2])) {
202 $second = [strtoupper($match[2]), strtolower($match[2])];
203 $items = [$first, $separators, $second, ['.'], $encodings];
204 } else {
205 $items = [$first, $separators, $first, ['.'], $encodings];
206 }
207 $attempts = array_merge($attempts, iterator_to_array(cartesian_product_generator($items)));
208 }
209
210 if (! empty($attempts)) {
211 $locales = array_merge(array_map('implode', $attempts), $locales);
212 }
213 }
214 }
215
216 setlocale(LC_ALL, $locales);
217}
218
219/**
220 * Build a Generator object representing the cartesian product from given $items.
182 * 221 *
183 * See #298. 222 * Example:
184 * The session ID's format depends on the hash algorithm set in PHP settings 223 * [['a'], ['b', 'c']]
224 * will generate:
225 * [
226 * ['a', 'b'],
227 * ['a', 'c'],
228 * ]
185 * 229 *
186 * @param string $sessionId Session ID 230 * @param array $items array of array of string
187 * 231 *
188 * @return true if valid, false otherwise. 232 * @return Generator representing the cartesian product of given array.
189 * 233 *
190 * @see http://php.net/manual/en/function.hash-algos.php 234 * @see https://en.wikipedia.org/wiki/Cartesian_product
191 * @see http://php.net/manual/en/session.configuration.php
192 */ 235 */
193function is_session_id_valid($sessionId) 236function cartesian_product_generator($items)
194{ 237{
195 if (empty($sessionId)) { 238 if (empty($items)) {
239 yield [];
240 }
241 $subArray = array_pop($items);
242 if (empty($subArray)) {
243 return;
244 }
245 foreach (cartesian_product_generator($items) as $item) {
246 foreach ($subArray as $value) {
247 yield $item + [count($item) => $value];
248 }
249 }
250}
251
252/**
253 * Generates a default API secret.
254 *
255 * Note that the random-ish methods used in this function are predictable,
256 * which makes them NOT suitable for crypto.
257 * BUT the random string is salted with the salt and hashed with the username.
258 * It makes the generated API secret secured enough for Shaarli.
259 *
260 * PHP 7 provides random_int(), designed for cryptography.
261 * More info: http://stackoverflow.com/questions/4356289/php-random-string-generator
262
263 * @param string $username Shaarli login username
264 * @param string $salt Shaarli password hash salt
265 *
266 * @return string|bool Generated API secret, 12 char length.
267 * Or false if invalid parameters are provided (which will make the API unusable).
268 */
269function generate_api_secret($username, $salt)
270{
271 if (empty($username) || empty($salt)) {
196 return false; 272 return false;
197 } 273 }
198 274
199 if (!$sessionId) { 275 return str_shuffle(substr(hash_hmac('sha512', uniqid($salt), $username), 10, 12));
276}
277
278/**
279 * Trim string, replace sequences of whitespaces by a single space.
280 * PHP equivalent to `normalize-space` XSLT function.
281 *
282 * @param string $string Input string.
283 *
284 * @return mixed Normalized string.
285 */
286function normalize_spaces($string)
287{
288 return preg_replace('/\s{2,}/', ' ', trim($string));
289}
290
291/**
292 * Format the date according to the locale.
293 *
294 * Requires php-intl to display international datetimes,
295 * otherwise default format '%c' will be returned.
296 *
297 * @param DateTime $date to format.
298 * @param bool $time Displays time if true.
299 * @param bool $intl Use international format if true.
300 *
301 * @return bool|string Formatted date, or false if the input is invalid.
302 */
303function format_date($date, $time = true, $intl = true)
304{
305 if (! $date instanceof DateTime) {
200 return false; 306 return false;
201 } 307 }
202 308
203 if (!preg_match('/^[a-zA-Z0-9,-]{2,128}$/', $sessionId)) { 309 if (! $intl || ! class_exists('IntlDateFormatter')) {
310 $format = $time ? '%c' : '%x';
311 return strftime($format, $date->getTimestamp());
312 }
313
314 $formatter = new IntlDateFormatter(
315 setlocale(LC_TIME, 0),
316 IntlDateFormatter::LONG,
317 $time ? IntlDateFormatter::LONG : IntlDateFormatter::NONE
318 );
319
320 return $formatter->format($date);
321}
322
323/**
324 * Check if the input is an integer, no matter its real type.
325 *
326 * PHP is a bit messy regarding this:
327 * - is_int returns false if the input is a string
328 * - ctype_digit returns false if the input is an integer or negative
329 *
330 * @param mixed $input value
331 *
332 * @return bool true if the input is an integer, false otherwise
333 */
334function is_integer_mixed($input)
335{
336 if (is_array($input) || is_bool($input) || is_object($input)) {
204 return false; 337 return false;
205 } 338 }
339 $input = strval($input);
340 return ctype_digit($input) || (startsWith($input, '-') && ctype_digit(substr($input, 1)));
341}
206 342
207 return true; 343/**
344 * Convert post_max_size/upload_max_filesize (e.g. '16M') parameters to bytes.
345 *
346 * @param string $val Size expressed in string.
347 *
348 * @return int Size expressed in bytes.
349 */
350function return_bytes($val)
351{
352 if (is_integer_mixed($val) || $val === '0' || empty($val)) {
353 return $val;
354 }
355 $val = trim($val);
356 $last = strtolower($val[strlen($val)-1]);
357 $val = intval(substr($val, 0, -1));
358 switch($last) {
359 case 'g': $val *= 1024;
360 case 'm': $val *= 1024;
361 case 'k': $val *= 1024;
362 }
363 return $val;
208} 364}
209 365
210/** 366/**
211 * Sniff browser language to set the locale automatically. 367 * Return a human readable size from bytes.
212 * Note that is may not work on your server if the corresponding locale is not installed.
213 * 368 *
214 * @param string $headerLocale Locale send in HTTP headers (e.g. "fr,fr-fr;q=0.8,en;q=0.5,en-us;q=0.3"). 369 * @param int $bytes value
215 **/ 370 *
216function autoLocale($headerLocale) 371 * @return string Human readable size
372 */
373function human_bytes($bytes)
217{ 374{
218 // Default if browser does not send HTTP_ACCEPT_LANGUAGE 375 if ($bytes === '') {
219 $attempts = array('en_US'); 376 return t('Setting not set');
220 if (isset($headerLocale)) { 377 }
221 // (It's a bit crude, but it works very well. Preferred language is always presented first.) 378 if (! is_integer_mixed($bytes)) {
222 if (preg_match('/([a-z]{2})-?([a-z]{2})?/i', $headerLocale, $matches)) { 379 return $bytes;
223 $loc = $matches[1] . (!empty($matches[2]) ? '_' . strtoupper($matches[2]) : ''); 380 }
224 $attempts = array( 381 $bytes = intval($bytes);
225 $loc.'.UTF-8', $loc, str_replace('_', '-', $loc).'.UTF-8', str_replace('_', '-', $loc), 382 if ($bytes === 0) {
226 $loc . '_' . strtoupper($loc).'.UTF-8', $loc . '_' . strtoupper($loc), 383 return t('Unlimited');
227 $loc . '_' . $loc.'.UTF-8', $loc . '_' . $loc, $loc . '-' . strtoupper($loc).'.UTF-8', 384 }
228 $loc . '-' . strtoupper($loc), $loc . '-' . $loc.'.UTF-8', $loc . '-' . $loc 385
229 ); 386 $units = [t('B'), t('kiB'), t('MiB'), t('GiB')];
387 for ($i = 0; $i < count($units) && $bytes >= 1024; ++$i) {
388 $bytes /= 1024;
389 }
390
391 return round($bytes) . $units[$i];
392}
393
394/**
395 * Try to determine max file size for uploads (POST).
396 * Returns an integer (in bytes) or formatted depending on $format.
397 *
398 * @param mixed $limitPost post_max_size PHP setting
399 * @param mixed $limitUpload upload_max_filesize PHP setting
400 * @param bool $format Format max upload size to human readable size
401 *
402 * @return int|string max upload file size
403 */
404function get_max_upload_size($limitPost, $limitUpload, $format = true)
405{
406 $size1 = return_bytes($limitPost);
407 $size2 = return_bytes($limitUpload);
408 // Return the smaller of two:
409 $maxsize = min($size1, $size2);
410 return $format ? human_bytes($maxsize) : $maxsize;
411}
412
413/**
414 * Sort the given array alphabetically using php-intl if available.
415 * Case sensitive.
416 *
417 * Note: doesn't support multidimensional arrays
418 *
419 * @param array $data Input array, passed by reference
420 * @param bool $reverse Reverse sort if set to true
421 * @param bool $byKeys Sort the array by keys if set to true, by value otherwise.
422 */
423function alphabetical_sort(&$data, $reverse = false, $byKeys = false)
424{
425 $callback = function ($a, $b) use ($reverse) {
426 // Collator is part of PHP intl.
427 if (class_exists('Collator')) {
428 $collator = new Collator(setlocale(LC_COLLATE, 0));
429 if (!intl_is_failure(intl_get_error_code())) {
430 return $collator->compare($a, $b) * ($reverse ? -1 : 1);
431 }
230 } 432 }
433
434 return strcasecmp($a, $b) * ($reverse ? -1 : 1);
435 };
436
437 if ($byKeys) {
438 uksort($data, $callback);
439 } else {
440 usort($data, $callback);
231 } 441 }
232 setlocale(LC_ALL, $attempts); 442}
443
444/**
445 * Wrapper function for translation which match the API
446 * of gettext()/_() and ngettext().
447 *
448 * @param string $text Text to translate.
449 * @param string $nText The plural message ID.
450 * @param int $nb The number of items for plural forms.
451 * @param string $domain The domain where the translation is stored (default: shaarli).
452 *
453 * @return string Text translated.
454 */
455function t($text, $nText = '', $nb = 1, $domain = 'shaarli') {
456 return dn__($domain, $text, $nText, $nb);
233} 457}
diff --git a/application/api/ApiMiddleware.php b/application/api/ApiMiddleware.php
new file mode 100644
index 00000000..ff209393
--- /dev/null
+++ b/application/api/ApiMiddleware.php
@@ -0,0 +1,138 @@
1<?php
2namespace Shaarli\Api;
3
4use Shaarli\Api\Exceptions\ApiException;
5use Shaarli\Api\Exceptions\ApiAuthorizationException;
6
7use Shaarli\Config\ConfigManager;
8use Slim\Container;
9use Slim\Http\Request;
10use Slim\Http\Response;
11
12/**
13 * Class ApiMiddleware
14 *
15 * This will be called before accessing any API Controller.
16 * Its role is to make sure that the API is enabled, configured, and to validate the JWT token.
17 *
18 * If the request is validated, the controller is called, otherwise a JSON error response is returned.
19 *
20 * @package Api
21 */
22class ApiMiddleware
23{
24 /**
25 * @var int JWT token validity in seconds (9 min).
26 */
27 public static $TOKEN_DURATION = 540;
28
29 /**
30 * @var Container: contains conf, plugins, etc.
31 */
32 protected $container;
33
34 /**
35 * @var ConfigManager instance.
36 */
37 protected $conf;
38
39 /**
40 * ApiMiddleware constructor.
41 *
42 * @param Container $container instance.
43 */
44 public function __construct($container)
45 {
46 $this->container = $container;
47 $this->conf = $this->container->get('conf');
48 $this->setLinkDb($this->conf);
49 }
50
51 /**
52 * Middleware execution:
53 * - check the API request
54 * - execute the controller
55 * - return the response
56 *
57 * @param Request $request Slim request
58 * @param Response $response Slim response
59 * @param callable $next Next action
60 *
61 * @return Response response.
62 */
63 public function __invoke($request, $response, $next)
64 {
65 try {
66 $this->checkRequest($request);
67 $response = $next($request, $response);
68 } catch(ApiException $e) {
69 $e->setResponse($response);
70 $e->setDebug($this->conf->get('dev.debug', false));
71 $response = $e->getApiResponse();
72 }
73
74 return $response;
75 }
76
77 /**
78 * Check the request validity (HTTP method, request value, etc.),
79 * that the API is enabled, and the JWT token validity.
80 *
81 * @param Request $request Slim request
82 *
83 * @throws ApiAuthorizationException The API is disabled or the token is invalid.
84 */
85 protected function checkRequest($request)
86 {
87 if (! $this->conf->get('api.enabled', true)) {
88 throw new ApiAuthorizationException('API is disabled');
89 }
90 $this->checkToken($request);
91 }
92
93 /**
94 * Check that the JWT token is set and valid.
95 * The API secret setting must be set.
96 *
97 * @param Request $request Slim request
98 *
99 * @throws ApiAuthorizationException The token couldn't be validated.
100 */
101 protected function checkToken($request) {
102 if (! $request->hasHeader('Authorization')) {
103 throw new ApiAuthorizationException('JWT token not provided');
104 }
105
106 if (empty($this->conf->get('api.secret'))) {
107 throw new ApiAuthorizationException('Token secret must be set in Shaarli\'s administration');
108 }
109
110 $authorization = $request->getHeaderLine('Authorization');
111
112 if (! preg_match('/^Bearer (.*)/i', $authorization, $matches)) {
113 throw new ApiAuthorizationException('Invalid JWT header');
114 }
115
116 ApiUtils::validateJwtToken($matches[1], $this->conf->get('api.secret'));
117 }
118
119 /**
120 * Instantiate a new LinkDB including private links,
121 * and load in the Slim container.
122 *
123 * FIXME! LinkDB could use a refactoring to avoid this trick.
124 *
125 * @param ConfigManager $conf instance.
126 */
127 protected function setLinkDb($conf)
128 {
129 $linkDb = new \LinkDB(
130 $conf->get('resource.datastore'),
131 true,
132 $conf->get('privacy.hide_public_links'),
133 $conf->get('redirector.url'),
134 $conf->get('redirector.encode_url')
135 );
136 $this->container['db'] = $linkDb;
137 }
138}
diff --git a/application/api/ApiUtils.php b/application/api/ApiUtils.php
new file mode 100644
index 00000000..f154bb52
--- /dev/null
+++ b/application/api/ApiUtils.php
@@ -0,0 +1,137 @@
1<?php
2namespace Shaarli\Api;
3
4use Shaarli\Base64Url;
5use Shaarli\Api\Exceptions\ApiAuthorizationException;
6
7/**
8 * REST API utilities
9 */
10class ApiUtils
11{
12 /**
13 * Validates a JWT token authenticity.
14 *
15 * @param string $token JWT token extracted from the headers.
16 * @param string $secret API secret set in the settings.
17 *
18 * @throws ApiAuthorizationException the token is not valid.
19 */
20 public static function validateJwtToken($token, $secret)
21 {
22 $parts = explode('.', $token);
23 if (count($parts) != 3 || strlen($parts[0]) == 0 || strlen($parts[1]) == 0) {
24 throw new ApiAuthorizationException('Malformed JWT token');
25 }
26
27 $genSign = Base64Url::encode(hash_hmac('sha512', $parts[0] .'.'. $parts[1], $secret, true));
28 if ($parts[2] != $genSign) {
29 throw new ApiAuthorizationException('Invalid JWT signature');
30 }
31
32 $header = json_decode(Base64Url::decode($parts[0]));
33 if ($header === null) {
34 throw new ApiAuthorizationException('Invalid JWT header');
35 }
36
37 $payload = json_decode(Base64Url::decode($parts[1]));
38 if ($payload === null) {
39 throw new ApiAuthorizationException('Invalid JWT payload');
40 }
41
42 if (empty($payload->iat)
43 || $payload->iat > time()
44 || time() - $payload->iat > ApiMiddleware::$TOKEN_DURATION
45 ) {
46 throw new ApiAuthorizationException('Invalid JWT issued time');
47 }
48 }
49
50 /**
51 * Format a Link for the REST API.
52 *
53 * @param array $link Link data read from the datastore.
54 * @param string $indexUrl Shaarli's index URL (used for relative URL).
55 *
56 * @return array Link data formatted for the REST API.
57 */
58 public static function formatLink($link, $indexUrl)
59 {
60 $out['id'] = $link['id'];
61 // Not an internal link
62 if ($link['url'][0] != '?') {
63 $out['url'] = $link['url'];
64 } else {
65 $out['url'] = $indexUrl . $link['url'];
66 }
67 $out['shorturl'] = $link['shorturl'];
68 $out['title'] = $link['title'];
69 $out['description'] = $link['description'];
70 $out['tags'] = preg_split('/\s+/', $link['tags'], -1, PREG_SPLIT_NO_EMPTY);
71 $out['private'] = $link['private'] == true;
72 $out['created'] = $link['created']->format(\DateTime::ATOM);
73 if (! empty($link['updated'])) {
74 $out['updated'] = $link['updated']->format(\DateTime::ATOM);
75 } else {
76 $out['updated'] = '';
77 }
78 return $out;
79 }
80
81 /**
82 * Convert a link given through a request, to a valid link for LinkDB.
83 *
84 * If no URL is provided, it will generate a local note URL.
85 * If no title is provided, it will use the URL as title.
86 *
87 * @param array $input Request Link.
88 * @param bool $defaultPrivate Request Link.
89 *
90 * @return array Formatted link.
91 */
92 public static function buildLinkFromRequest($input, $defaultPrivate)
93 {
94 $input['url'] = ! empty($input['url']) ? cleanup_url($input['url']) : '';
95 if (isset($input['private'])) {
96 $private = filter_var($input['private'], FILTER_VALIDATE_BOOLEAN);
97 } else {
98 $private = $defaultPrivate;
99 }
100
101 $link = [
102 'title' => ! empty($input['title']) ? $input['title'] : $input['url'],
103 'url' => $input['url'],
104 'description' => ! empty($input['description']) ? $input['description'] : '',
105 'tags' => ! empty($input['tags']) ? implode(' ', $input['tags']) : '',
106 'private' => $private,
107 'created' => new \DateTime(),
108 ];
109 return $link;
110 }
111
112 /**
113 * Update link fields using an updated link object.
114 *
115 * @param array $oldLink data
116 * @param array $newLink data
117 *
118 * @return array $oldLink updated with $newLink values
119 */
120 public static function updateLink($oldLink, $newLink)
121 {
122 foreach (['title', 'url', 'description', 'tags', 'private'] as $field) {
123 $oldLink[$field] = $newLink[$field];
124 }
125 $oldLink['updated'] = new \DateTime();
126
127 if (empty($oldLink['url'])) {
128 $oldLink['url'] = '?' . $oldLink['shorturl'];
129 }
130
131 if (empty($oldLink['title'])) {
132 $oldLink['title'] = $oldLink['url'];
133 }
134
135 return $oldLink;
136 }
137}
diff --git a/application/api/controllers/ApiController.php b/application/api/controllers/ApiController.php
new file mode 100644
index 00000000..3be85b98
--- /dev/null
+++ b/application/api/controllers/ApiController.php
@@ -0,0 +1,71 @@
1<?php
2
3namespace Shaarli\Api\Controllers;
4
5use Shaarli\Config\ConfigManager;
6use \Slim\Container;
7
8/**
9 * Abstract Class ApiController
10 *
11 * Defines REST API Controller dependencies injected from the container.
12 *
13 * @package Api\Controllers
14 */
15abstract class ApiController
16{
17 /**
18 * @var Container
19 */
20 protected $ci;
21
22 /**
23 * @var ConfigManager
24 */
25 protected $conf;
26
27 /**
28 * @var \LinkDB
29 */
30 protected $linkDb;
31
32 /**
33 * @var \History
34 */
35 protected $history;
36
37 /**
38 * @var int|null JSON style option.
39 */
40 protected $jsonStyle;
41
42 /**
43 * ApiController constructor.
44 *
45 * Note: enabling debug mode displays JSON with readable formatting.
46 *
47 * @param Container $ci Slim container.
48 */
49 public function __construct(Container $ci)
50 {
51 $this->ci = $ci;
52 $this->conf = $ci->get('conf');
53 $this->linkDb = $ci->get('db');
54 $this->history = $ci->get('history');
55 if ($this->conf->get('dev.debug', false)) {
56 $this->jsonStyle = JSON_PRETTY_PRINT;
57 } else {
58 $this->jsonStyle = null;
59 }
60 }
61
62 /**
63 * Get the container.
64 *
65 * @return Container
66 */
67 public function getCi()
68 {
69 return $this->ci;
70 }
71}
diff --git a/application/api/controllers/History.php b/application/api/controllers/History.php
new file mode 100644
index 00000000..2ff9deaf
--- /dev/null
+++ b/application/api/controllers/History.php
@@ -0,0 +1,70 @@
1<?php
2
3
4namespace Shaarli\Api\Controllers;
5
6use Shaarli\Api\Exceptions\ApiBadParametersException;
7use Slim\Http\Request;
8use Slim\Http\Response;
9
10/**
11 * Class History
12 *
13 * REST API Controller: /history
14 *
15 * @package Shaarli\Api\Controllers
16 */
17class History extends ApiController
18{
19 /**
20 * Service providing operation regarding Shaarli datastore and settings.
21 *
22 * @param Request $request Slim request.
23 * @param Response $response Slim response.
24 *
25 * @return Response response.
26 *
27 * @throws ApiBadParametersException Invalid parameters.
28 */
29 public function getHistory($request, $response)
30 {
31 $history = $this->history->getHistory();
32
33 // Return history operations from the {offset}th, starting from {since}.
34 $since = \DateTime::createFromFormat(\DateTime::ATOM, $request->getParam('since'));
35 $offset = $request->getParam('offset');
36 if (empty($offset)) {
37 $offset = 0;
38 }
39 else if (ctype_digit($offset)) {
40 $offset = (int) $offset;
41 } else {
42 throw new ApiBadParametersException('Invalid offset');
43 }
44
45 // limit parameter is either a number of links or 'all' for everything.
46 $limit = $request->getParam('limit');
47 if (empty($limit)) {
48 $limit = count($history);
49 } else if (ctype_digit($limit)) {
50 $limit = (int) $limit;
51 } else {
52 throw new ApiBadParametersException('Invalid limit');
53 }
54
55 $out = [];
56 $i = 0;
57 foreach ($history as $entry) {
58 if ((! empty($since) && $entry['datetime'] <= $since) || count($out) >= $limit) {
59 break;
60 }
61 if (++$i > $offset) {
62 $out[$i] = $entry;
63 $out[$i]['datetime'] = $out[$i]['datetime']->format(\DateTime::ATOM);
64 }
65 }
66 $out = array_values($out);
67
68 return $response->withJson($out, 200, $this->jsonStyle);
69 }
70}
diff --git a/application/api/controllers/Info.php b/application/api/controllers/Info.php
new file mode 100644
index 00000000..25433f72
--- /dev/null
+++ b/application/api/controllers/Info.php
@@ -0,0 +1,42 @@
1<?php
2
3namespace Shaarli\Api\Controllers;
4
5use Slim\Http\Request;
6use Slim\Http\Response;
7
8/**
9 * Class Info
10 *
11 * REST API Controller: /info
12 *
13 * @package Api\Controllers
14 * @see http://shaarli.github.io/api-documentation/#links-instance-information-get
15 */
16class Info extends ApiController
17{
18 /**
19 * Service providing various information about Shaarli instance.
20 *
21 * @param Request $request Slim request.
22 * @param Response $response Slim response.
23 *
24 * @return Response response.
25 */
26 public function getInfo($request, $response)
27 {
28 $info = [
29 'global_counter' => count($this->linkDb),
30 'private_counter' => count_private($this->linkDb),
31 'settings' => array(
32 'title' => $this->conf->get('general.title', 'Shaarli'),
33 'header_link' => $this->conf->get('general.header_link', '?'),
34 'timezone' => $this->conf->get('general.timezone', 'UTC'),
35 'enabled_plugins' => $this->conf->get('general.enabled_plugins', []),
36 'default_private_links' => $this->conf->get('privacy.default_private_links', false),
37 ),
38 ];
39
40 return $response->withJson($info, 200, $this->jsonStyle);
41 }
42}
diff --git a/application/api/controllers/Links.php b/application/api/controllers/Links.php
new file mode 100644
index 00000000..eb78dd26
--- /dev/null
+++ b/application/api/controllers/Links.php
@@ -0,0 +1,217 @@
1<?php
2
3namespace Shaarli\Api\Controllers;
4
5use Shaarli\Api\ApiUtils;
6use Shaarli\Api\Exceptions\ApiBadParametersException;
7use Shaarli\Api\Exceptions\ApiLinkNotFoundException;
8use Slim\Http\Request;
9use Slim\Http\Response;
10
11/**
12 * Class Links
13 *
14 * REST API Controller: all services related to links collection.
15 *
16 * @package Api\Controllers
17 * @see http://shaarli.github.io/api-documentation/#links-links-collection
18 */
19class Links extends ApiController
20{
21 /**
22 * @var int Number of links returned if no limit is provided.
23 */
24 public static $DEFAULT_LIMIT = 20;
25
26 /**
27 * Retrieve a list of links, allowing different filters.
28 *
29 * @param Request $request Slim request.
30 * @param Response $response Slim response.
31 *
32 * @return Response response.
33 *
34 * @throws ApiBadParametersException Invalid parameters.
35 */
36 public function getLinks($request, $response)
37 {
38 $private = $request->getParam('visibility');
39 $links = $this->linkDb->filterSearch(
40 [
41 'searchtags' => $request->getParam('searchtags', ''),
42 'searchterm' => $request->getParam('searchterm', ''),
43 ],
44 false,
45 $private
46 );
47
48 // Return links from the {offset}th link, starting from 0.
49 $offset = $request->getParam('offset');
50 if (! empty($offset) && ! ctype_digit($offset)) {
51 throw new ApiBadParametersException('Invalid offset');
52 }
53 $offset = ! empty($offset) ? intval($offset) : 0;
54 if ($offset > count($links)) {
55 return $response->withJson([], 200, $this->jsonStyle);
56 }
57
58 // limit parameter is either a number of links or 'all' for everything.
59 $limit = $request->getParam('limit');
60 if (empty($limit)) {
61 $limit = self::$DEFAULT_LIMIT;
62 } else if (ctype_digit($limit)) {
63 $limit = intval($limit);
64 } else if ($limit === 'all') {
65 $limit = count($links);
66 } else {
67 throw new ApiBadParametersException('Invalid limit');
68 }
69
70 // 'environment' is set by Slim and encapsulate $_SERVER.
71 $index = index_url($this->ci['environment']);
72
73 $out = [];
74 $cpt = 0;
75 foreach ($links as $link) {
76 if (count($out) >= $limit) {
77 break;
78 }
79 if ($cpt++ >= $offset) {
80 $out[] = ApiUtils::formatLink($link, $index);
81 }
82 }
83
84 return $response->withJson($out, 200, $this->jsonStyle);
85 }
86
87 /**
88 * Return a single formatted link by its ID.
89 *
90 * @param Request $request Slim request.
91 * @param Response $response Slim response.
92 * @param array $args Path parameters. including the ID.
93 *
94 * @return Response containing the link array.
95 *
96 * @throws ApiLinkNotFoundException generating a 404 error.
97 */
98 public function getLink($request, $response, $args)
99 {
100 if (!isset($this->linkDb[$args['id']])) {
101 throw new ApiLinkNotFoundException();
102 }
103 $index = index_url($this->ci['environment']);
104 $out = ApiUtils::formatLink($this->linkDb[$args['id']], $index);
105
106 return $response->withJson($out, 200, $this->jsonStyle);
107 }
108
109 /**
110 * Creates a new link from posted request body.
111 *
112 * @param Request $request Slim request.
113 * @param Response $response Slim response.
114 *
115 * @return Response response.
116 */
117 public function postLink($request, $response)
118 {
119 $data = $request->getParsedBody();
120 $link = ApiUtils::buildLinkFromRequest($data, $this->conf->get('privacy.default_private_links'));
121 // duplicate by URL, return 409 Conflict
122 if (! empty($link['url']) && ! empty($dup = $this->linkDb->getLinkFromUrl($link['url']))) {
123 return $response->withJson(
124 ApiUtils::formatLink($dup, index_url($this->ci['environment'])),
125 409,
126 $this->jsonStyle
127 );
128 }
129
130 $link['id'] = $this->linkDb->getNextId();
131 $link['shorturl'] = link_small_hash($link['created'], $link['id']);
132
133 // note: general relative URL
134 if (empty($link['url'])) {
135 $link['url'] = '?' . $link['shorturl'];
136 }
137
138 if (empty($link['title'])) {
139 $link['title'] = $link['url'];
140 }
141
142 $this->linkDb[$link['id']] = $link;
143 $this->linkDb->save($this->conf->get('resource.page_cache'));
144 $this->history->addLink($link);
145 $out = ApiUtils::formatLink($link, index_url($this->ci['environment']));
146 $redirect = $this->ci->router->relativePathFor('getLink', ['id' => $link['id']]);
147 return $response->withAddedHeader('Location', $redirect)
148 ->withJson($out, 201, $this->jsonStyle);
149 }
150
151 /**
152 * Updates an existing link from posted request body.
153 *
154 * @param Request $request Slim request.
155 * @param Response $response Slim response.
156 * @param array $args Path parameters. including the ID.
157 *
158 * @return Response response.
159 *
160 * @throws ApiLinkNotFoundException generating a 404 error.
161 */
162 public function putLink($request, $response, $args)
163 {
164 if (! isset($this->linkDb[$args['id']])) {
165 throw new ApiLinkNotFoundException();
166 }
167
168 $index = index_url($this->ci['environment']);
169 $data = $request->getParsedBody();
170
171 $requestLink = ApiUtils::buildLinkFromRequest($data, $this->conf->get('privacy.default_private_links'));
172 // duplicate URL on a different link, return 409 Conflict
173 if (! empty($requestLink['url'])
174 && ! empty($dup = $this->linkDb->getLinkFromUrl($requestLink['url']))
175 && $dup['id'] != $args['id']
176 ) {
177 return $response->withJson(
178 ApiUtils::formatLink($dup, $index),
179 409,
180 $this->jsonStyle
181 );
182 }
183
184 $responseLink = $this->linkDb[$args['id']];
185 $responseLink = ApiUtils::updateLink($responseLink, $requestLink);
186 $this->linkDb[$responseLink['id']] = $responseLink;
187 $this->linkDb->save($this->conf->get('resource.page_cache'));
188 $this->history->updateLink($responseLink);
189
190 $out = ApiUtils::formatLink($responseLink, $index);
191 return $response->withJson($out, 200, $this->jsonStyle);
192 }
193
194 /**
195 * Delete an existing link by its ID.
196 *
197 * @param Request $request Slim request.
198 * @param Response $response Slim response.
199 * @param array $args Path parameters. including the ID.
200 *
201 * @return Response response.
202 *
203 * @throws ApiLinkNotFoundException generating a 404 error.
204 */
205 public function deleteLink($request, $response, $args)
206 {
207 if (! isset($this->linkDb[$args['id']])) {
208 throw new ApiLinkNotFoundException();
209 }
210 $link = $this->linkDb[$args['id']];
211 unset($this->linkDb[(int) $args['id']]);
212 $this->linkDb->save($this->conf->get('resource.page_cache'));
213 $this->history->deleteLink($link);
214
215 return $response->withStatus(204);
216 }
217}
diff --git a/application/api/exceptions/ApiAuthorizationException.php b/application/api/exceptions/ApiAuthorizationException.php
new file mode 100644
index 00000000..0e3f4776
--- /dev/null
+++ b/application/api/exceptions/ApiAuthorizationException.php
@@ -0,0 +1,34 @@
1<?php
2
3namespace Shaarli\Api\Exceptions;
4
5/**
6 * Class ApiAuthorizationException
7 *
8 * Request not authorized, return a 401 HTTP code.
9 */
10class ApiAuthorizationException extends ApiException
11{
12 /**
13 * {@inheritdoc}
14 */
15 public function getApiResponse()
16 {
17 $this->setMessage('Not authorized');
18 return $this->buildApiResponse(401);
19 }
20
21 /**
22 * Set the exception message.
23 *
24 * We only return a generic error message in production mode to avoid giving
25 * to much security information.
26 *
27 * @param $message string the exception message.
28 */
29 public function setMessage($message)
30 {
31 $original = $this->debug === true ? ': '. $this->getMessage() : '';
32 $this->message = $message . $original;
33 }
34}
diff --git a/application/api/exceptions/ApiBadParametersException.php b/application/api/exceptions/ApiBadParametersException.php
new file mode 100644
index 00000000..e5cc19ea
--- /dev/null
+++ b/application/api/exceptions/ApiBadParametersException.php
@@ -0,0 +1,19 @@
1<?php
2
3namespace Shaarli\Api\Exceptions;
4
5/**
6 * Class ApiBadParametersException
7 *
8 * Invalid request exception, return a 400 HTTP code.
9 */
10class ApiBadParametersException extends ApiException
11{
12 /**
13 * {@inheritdoc}
14 */
15 public function getApiResponse()
16 {
17 return $this->buildApiResponse(400);
18 }
19}
diff --git a/application/api/exceptions/ApiException.php b/application/api/exceptions/ApiException.php
new file mode 100644
index 00000000..c8490e0c
--- /dev/null
+++ b/application/api/exceptions/ApiException.php
@@ -0,0 +1,77 @@
1<?php
2
3namespace Shaarli\Api\Exceptions;
4
5use Slim\Http\Response;
6
7/**
8 * Abstract class ApiException
9 *
10 * Parent Exception related to the API, able to generate a valid Response (ResponseInterface).
11 * Also can include various information in debug mode.
12 */
13abstract class ApiException extends \Exception {
14
15 /**
16 * @var Response instance from Slim.
17 */
18 protected $response;
19
20 /**
21 * @var bool Debug mode enabled/disabled.
22 */
23 protected $debug;
24
25 /**
26 * Build the final response.
27 *
28 * @return Response Final response to give.
29 */
30 public abstract function getApiResponse();
31
32 /**
33 * Creates ApiResponse body.
34 * In production mode, it will only return the exception message,
35 * but in dev mode, it includes additional information in an array.
36 *
37 * @return array|string response body
38 */
39 protected function getApiResponseBody() {
40 if ($this->debug !== true) {
41 return $this->getMessage();
42 }
43 return [
44 'message' => $this->getMessage(),
45 'stacktrace' => get_class($this) .': '. $this->getTraceAsString()
46 ];
47 }
48
49 /**
50 * Build the Response object to return.
51 *
52 * @param int $code HTTP status.
53 *
54 * @return Response with status + body.
55 */
56 protected function buildApiResponse($code)
57 {
58 $style = $this->debug ? JSON_PRETTY_PRINT : null;
59 return $this->response->withJson($this->getApiResponseBody(), $code, $style);
60 }
61
62 /**
63 * @param Response $response
64 */
65 public function setResponse($response)
66 {
67 $this->response = $response;
68 }
69
70 /**
71 * @param bool $debug
72 */
73 public function setDebug($debug)
74 {
75 $this->debug = $debug;
76 }
77}
diff --git a/application/api/exceptions/ApiInternalException.php b/application/api/exceptions/ApiInternalException.php
new file mode 100644
index 00000000..1cb05532
--- /dev/null
+++ b/application/api/exceptions/ApiInternalException.php
@@ -0,0 +1,19 @@
1<?php
2
3namespace Shaarli\Api\Exceptions;
4
5/**
6 * Class ApiInternalException
7 *
8 * Generic exception, return a 500 HTTP code.
9 */
10class ApiInternalException extends ApiException
11{
12 /**
13 * @inheritdoc
14 */
15 public function getApiResponse()
16 {
17 return $this->buildApiResponse(500);
18 }
19}
diff --git a/application/api/exceptions/ApiLinkNotFoundException.php b/application/api/exceptions/ApiLinkNotFoundException.php
new file mode 100644
index 00000000..de7e14f5
--- /dev/null
+++ b/application/api/exceptions/ApiLinkNotFoundException.php
@@ -0,0 +1,32 @@
1<?php
2
3namespace Shaarli\Api\Exceptions;
4
5
6use Slim\Http\Response;
7
8/**
9 * Class ApiLinkNotFoundException
10 *
11 * Link selected by ID couldn't be found, results in a 404 error.
12 *
13 * @package Shaarli\Api\Exceptions
14 */
15class ApiLinkNotFoundException extends ApiException
16{
17 /**
18 * ApiLinkNotFoundException constructor.
19 */
20 public function __construct()
21 {
22 $this->message = 'Link not found';
23 }
24
25 /**
26 * {@inheritdoc}
27 */
28 public function getApiResponse()
29 {
30 return $this->buildApiResponse(404);
31 }
32}
diff --git a/application/config/ConfigIO.php b/application/config/ConfigIO.php
index 2b68fe6a..3efe5b6f 100644
--- a/application/config/ConfigIO.php
+++ b/application/config/ConfigIO.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2namespace Shaarli\Config;
2 3
3/** 4/**
4 * Interface ConfigIO 5 * Interface ConfigIO
@@ -14,7 +15,7 @@ interface ConfigIO
14 * 15 *
15 * @return array All configuration in an array. 16 * @return array All configuration in an array.
16 */ 17 */
17 function read($filepath); 18 public function read($filepath);
18 19
19 /** 20 /**
20 * Write configuration. 21 * Write configuration.
@@ -22,12 +23,12 @@ interface ConfigIO
22 * @param string $filepath Config file absolute path. 23 * @param string $filepath Config file absolute path.
23 * @param array $conf All configuration in an array. 24 * @param array $conf All configuration in an array.
24 */ 25 */
25 function write($filepath, $conf); 26 public function write($filepath, $conf);
26 27
27 /** 28 /**
28 * Get config file extension according to config type. 29 * Get config file extension according to config type.
29 * 30 *
30 * @return string Config file extension. 31 * @return string Config file extension.
31 */ 32 */
32 function getExtension(); 33 public function getExtension();
33} 34}
diff --git a/application/config/ConfigJson.php b/application/config/ConfigJson.php
index 30007eb4..8c8d5610 100644
--- a/application/config/ConfigJson.php
+++ b/application/config/ConfigJson.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2namespace Shaarli\Config;
2 3
3/** 4/**
4 * Class ConfigJson (ConfigIO implementation) 5 * Class ConfigJson (ConfigIO implementation)
@@ -10,7 +11,7 @@ class ConfigJson implements ConfigIO
10 /** 11 /**
11 * @inheritdoc 12 * @inheritdoc
12 */ 13 */
13 function read($filepath) 14 public function read($filepath)
14 { 15 {
15 if (! is_readable($filepath)) { 16 if (! is_readable($filepath)) {
16 return array(); 17 return array();
@@ -20,8 +21,19 @@ class ConfigJson implements ConfigIO
20 $data = str_replace(self::getPhpSuffix(), '', $data); 21 $data = str_replace(self::getPhpSuffix(), '', $data);
21 $data = json_decode($data, true); 22 $data = json_decode($data, true);
22 if ($data === null) { 23 if ($data === null) {
23 $error = json_last_error(); 24 $errorCode = json_last_error();
24 throw new Exception('An error occurred while parsing JSON file: error code #'. $error); 25 $error = sprintf(
26 'An error occurred while parsing JSON configuration file (%s): error code #%d',
27 $filepath,
28 $errorCode
29 );
30 $error .= '<br>➜ <code>' . json_last_error_msg() .'</code>';
31 if ($errorCode === JSON_ERROR_SYNTAX) {
32 $error .= '<br>';
33 $error .= 'Please check your JSON syntax (without PHP comment tags) using a JSON lint tool such as ';
34 $error .= '<a href="http://jsonlint.com/">jsonlint.com</a>.';
35 }
36 throw new \Exception($error);
25 } 37 }
26 return $data; 38 return $data;
27 } 39 }
@@ -29,16 +41,16 @@ class ConfigJson implements ConfigIO
29 /** 41 /**
30 * @inheritdoc 42 * @inheritdoc
31 */ 43 */
32 function write($filepath, $conf) 44 public function write($filepath, $conf)
33 { 45 {
34 // JSON_PRETTY_PRINT is available from PHP 5.4. 46 // JSON_PRETTY_PRINT is available from PHP 5.4.
35 $print = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0; 47 $print = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0;
36 $data = self::getPhpHeaders() . json_encode($conf, $print) . self::getPhpSuffix(); 48 $data = self::getPhpHeaders() . json_encode($conf, $print) . self::getPhpSuffix();
37 if (!file_put_contents($filepath, $data)) { 49 if (!file_put_contents($filepath, $data)) {
38 throw new IOException( 50 throw new \IOException(
39 $filepath, 51 $filepath,
40 'Shaarli could not create the config file. 52 t('Shaarli could not create the config file. '.
41 Please make sure Shaarli has the right to write in the folder is it installed in.' 53 'Please make sure Shaarli has the right to write in the folder is it installed in.')
42 ); 54 );
43 } 55 }
44 } 56 }
@@ -46,7 +58,7 @@ class ConfigJson implements ConfigIO
46 /** 58 /**
47 * @inheritdoc 59 * @inheritdoc
48 */ 60 */
49 function getExtension() 61 public function getExtension()
50 { 62 {
51 return '.json.php'; 63 return '.json.php';
52 } 64 }
diff --git a/application/config/ConfigManager.php b/application/config/ConfigManager.php
index f5f753f8..9e4c9f63 100644
--- a/application/config/ConfigManager.php
+++ b/application/config/ConfigManager.php
@@ -1,17 +1,16 @@
1<?php 1<?php
2namespace Shaarli\Config;
2 3
3// FIXME! Namespaces... 4use Shaarli\Config\Exception\MissingFieldConfigException;
4require_once 'ConfigIO.php'; 5use Shaarli\Config\Exception\UnauthorizedConfigException;
5require_once 'ConfigJson.php';
6require_once 'ConfigPhp.php';
7 6
8/** 7/**
9 * Class ConfigManager 8 * Class ConfigManager
10 * 9 *
11 * Manages all Shaarli's settings. 10 * Manages all Shaarli's settings.
12 * See the documentation for more information on settings: 11 * See the documentation for more information on settings:
13 * - doc/Shaarli-configuration.html 12 * - doc/md/Shaarli-configuration.md
14 * - https://github.com/shaarli/Shaarli/wiki/Shaarli-configuration 13 * - https://shaarli.readthedocs.io/en/master/Shaarli-configuration/#configuration
15 */ 14 */
16class ConfigManager 15class ConfigManager
17{ 16{
@@ -20,6 +19,8 @@ class ConfigManager
20 */ 19 */
21 protected static $NOT_FOUND = 'NOT_FOUND'; 20 protected static $NOT_FOUND = 'NOT_FOUND';
22 21
22 public static $DEFAULT_PLUGINS = array('qrcode');
23
23 /** 24 /**
24 * @var string Config folder. 25 * @var string Config folder.
25 */ 26 */
@@ -80,7 +81,11 @@ class ConfigManager
80 */ 81 */
81 protected function load() 82 protected function load()
82 { 83 {
83 $this->loadedConfig = $this->configIO->read($this->getConfigFileExt()); 84 try {
85 $this->loadedConfig = $this->configIO->read($this->getConfigFileExt());
86 } catch (\Exception $e) {
87 die($e->getMessage());
88 }
84 $this->setDefaultValues(); 89 $this->setDefaultValues();
85 } 90 }
86 91
@@ -122,12 +127,12 @@ class ConfigManager
122 * @param bool $write Write the new setting in the config file, default false. 127 * @param bool $write Write the new setting in the config file, default false.
123 * @param bool $isLoggedIn User login state, default false. 128 * @param bool $isLoggedIn User login state, default false.
124 * 129 *
125 * @throws Exception Invalid 130 * @throws \Exception Invalid
126 */ 131 */
127 public function set($setting, $value, $write = false, $isLoggedIn = false) 132 public function set($setting, $value, $write = false, $isLoggedIn = false)
128 { 133 {
129 if (empty($setting) || ! is_string($setting)) { 134 if (empty($setting) || ! is_string($setting)) {
130 throw new Exception('Invalid setting key parameter. String expected, got: '. gettype($setting)); 135 throw new \Exception(t('Invalid setting key parameter. String expected, got: '). gettype($setting));
131 } 136 }
132 137
133 // During the ConfigIO transition, map legacy settings to the new ones. 138 // During the ConfigIO transition, map legacy settings to the new ones.
@@ -175,7 +180,7 @@ class ConfigManager
175 * 180 *
176 * @throws MissingFieldConfigException: a mandatory field has not been provided in $conf. 181 * @throws MissingFieldConfigException: a mandatory field has not been provided in $conf.
177 * @throws UnauthorizedConfigException: user is not authorize to change configuration. 182 * @throws UnauthorizedConfigException: user is not authorize to change configuration.
178 * @throws IOException: an error occurred while writing the new config file. 183 * @throws \IOException: an error occurred while writing the new config file.
179 */ 184 */
180 public function write($isLoggedIn) 185 public function write($isLoggedIn)
181 { 186 {
@@ -296,7 +301,9 @@ class ConfigManager
296 $this->setEmpty('resource.updates', 'data/updates.txt'); 301 $this->setEmpty('resource.updates', 'data/updates.txt');
297 $this->setEmpty('resource.log', 'data/log.txt'); 302 $this->setEmpty('resource.log', 'data/log.txt');
298 $this->setEmpty('resource.update_check', 'data/lastupdatecheck.txt'); 303 $this->setEmpty('resource.update_check', 'data/lastupdatecheck.txt');
304 $this->setEmpty('resource.history', 'data/history.php');
299 $this->setEmpty('resource.raintpl_tpl', 'tpl/'); 305 $this->setEmpty('resource.raintpl_tpl', 'tpl/');
306 $this->setEmpty('resource.theme', 'default');
300 $this->setEmpty('resource.raintpl_tmp', 'tmp/'); 307 $this->setEmpty('resource.raintpl_tmp', 'tmp/');
301 $this->setEmpty('resource.thumbnails_cache', 'cache'); 308 $this->setEmpty('resource.thumbnails_cache', 'cache');
302 $this->setEmpty('resource.page_cache', 'pagecache'); 309 $this->setEmpty('resource.page_cache', 'pagecache');
@@ -305,21 +312,26 @@ class ConfigManager
305 $this->setEmpty('security.ban_duration', 1800); 312 $this->setEmpty('security.ban_duration', 1800);
306 $this->setEmpty('security.session_protection_disabled', false); 313 $this->setEmpty('security.session_protection_disabled', false);
307 $this->setEmpty('security.open_shaarli', false); 314 $this->setEmpty('security.open_shaarli', false);
315 $this->setEmpty('security.allowed_protocols', ['ftp', 'ftps', 'magnet']);
308 316
309 $this->setEmpty('general.header_link', '?'); 317 $this->setEmpty('general.header_link', '?');
310 $this->setEmpty('general.links_per_page', 20); 318 $this->setEmpty('general.links_per_page', 20);
311 $this->setEmpty('general.enabled_plugins', array('qrcode')); 319 $this->setEmpty('general.enabled_plugins', self::$DEFAULT_PLUGINS);
320 $this->setEmpty('general.default_note_title', 'Note: ');
312 321
313 $this->setEmpty('updates.check_updates', false); 322 $this->setEmpty('updates.check_updates', false);
314 $this->setEmpty('updates.check_updates_branch', 'stable'); 323 $this->setEmpty('updates.check_updates_branch', 'stable');
315 $this->setEmpty('updates.check_updates_interval', 86400); 324 $this->setEmpty('updates.check_updates_interval', 86400);
316 325
317 $this->setEmpty('feed.rss_permalinks', true); 326 $this->setEmpty('feed.rss_permalinks', true);
318 $this->setEmpty('feed.show_atom', false); 327 $this->setEmpty('feed.show_atom', true);
319 328
320 $this->setEmpty('privacy.default_private_links', false); 329 $this->setEmpty('privacy.default_private_links', false);
321 $this->setEmpty('privacy.hide_public_links', false); 330 $this->setEmpty('privacy.hide_public_links', false);
331 $this->setEmpty('privacy.force_login', false);
322 $this->setEmpty('privacy.hide_timestamps', false); 332 $this->setEmpty('privacy.hide_timestamps', false);
333 // default state of the 'remember me' checkbox of the login form
334 $this->setEmpty('privacy.remember_user_default', true);
323 335
324 $this->setEmpty('thumbnail.enable_thumbnails', true); 336 $this->setEmpty('thumbnail.enable_thumbnails', true);
325 $this->setEmpty('thumbnail.enable_localcache', true); 337 $this->setEmpty('thumbnail.enable_localcache', true);
@@ -327,6 +339,10 @@ class ConfigManager
327 $this->setEmpty('redirector.url', ''); 339 $this->setEmpty('redirector.url', '');
328 $this->setEmpty('redirector.encode_url', true); 340 $this->setEmpty('redirector.encode_url', true);
329 341
342 $this->setEmpty('translation.language', 'auto');
343 $this->setEmpty('translation.mode', 'php');
344 $this->setEmpty('translation.extensions', []);
345
330 $this->setEmpty('plugins', array()); 346 $this->setEmpty('plugins', array());
331 } 347 }
332 348
@@ -359,36 +375,3 @@ class ConfigManager
359 $this->configIO = $configIO; 375 $this->configIO = $configIO;
360 } 376 }
361} 377}
362
363/**
364 * Exception used if a mandatory field is missing in given configuration.
365 */
366class MissingFieldConfigException extends Exception
367{
368 public $field;
369
370 /**
371 * Construct exception.
372 *
373 * @param string $field field name missing.
374 */
375 public function __construct($field)
376 {
377 $this->field = $field;
378 $this->message = 'Configuration value is required for '. $this->field;
379 }
380}
381
382/**
383 * Exception used if an unauthorized attempt to edit configuration has been made.
384 */
385class UnauthorizedConfigException extends Exception
386{
387 /**
388 * Construct exception.
389 */
390 public function __construct()
391 {
392 $this->message = 'You are not authorized to alter config.';
393 }
394}
diff --git a/application/config/ConfigPhp.php b/application/config/ConfigPhp.php
index 27187b66..8add8bcd 100644
--- a/application/config/ConfigPhp.php
+++ b/application/config/ConfigPhp.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2namespace Shaarli\Config;
2 3
3/** 4/**
4 * Class ConfigPhp (ConfigIO implementation) 5 * Class ConfigPhp (ConfigIO implementation)
@@ -41,6 +42,7 @@ class ConfigPhp implements ConfigIO
41 'resource.log' => 'config.LOG_FILE', 42 'resource.log' => 'config.LOG_FILE',
42 'resource.update_check' => 'config.UPDATECHECK_FILENAME', 43 'resource.update_check' => 'config.UPDATECHECK_FILENAME',
43 'resource.raintpl_tpl' => 'config.RAINTPL_TPL', 44 'resource.raintpl_tpl' => 'config.RAINTPL_TPL',
45 'resource.theme' => 'config.theme',
44 'resource.raintpl_tmp' => 'config.RAINTPL_TMP', 46 'resource.raintpl_tmp' => 'config.RAINTPL_TMP',
45 'resource.thumbnails_cache' => 'config.CACHEDIR', 47 'resource.thumbnails_cache' => 'config.CACHEDIR',
46 'resource.page_cache' => 'config.PAGECACHE', 48 'resource.page_cache' => 'config.PAGECACHE',
@@ -71,7 +73,7 @@ class ConfigPhp implements ConfigIO
71 /** 73 /**
72 * @inheritdoc 74 * @inheritdoc
73 */ 75 */
74 function read($filepath) 76 public function read($filepath)
75 { 77 {
76 if (! file_exists($filepath) || ! is_readable($filepath)) { 78 if (! file_exists($filepath) || ! is_readable($filepath)) {
77 return array(); 79 return array();
@@ -81,17 +83,17 @@ class ConfigPhp implements ConfigIO
81 83
82 $out = array(); 84 $out = array();
83 foreach (self::$ROOT_KEYS as $key) { 85 foreach (self::$ROOT_KEYS as $key) {
84 $out[$key] = $GLOBALS[$key]; 86 $out[$key] = isset($GLOBALS[$key]) ? $GLOBALS[$key] : '';
85 } 87 }
86 $out['config'] = $GLOBALS['config']; 88 $out['config'] = isset($GLOBALS['config']) ? $GLOBALS['config'] : [];
87 $out['plugins'] = !empty($GLOBALS['plugins']) ? $GLOBALS['plugins'] : array(); 89 $out['plugins'] = isset($GLOBALS['plugins']) ? $GLOBALS['plugins'] : [];
88 return $out; 90 return $out;
89 } 91 }
90 92
91 /** 93 /**
92 * @inheritdoc 94 * @inheritdoc
93 */ 95 */
94 function write($filepath, $conf) 96 public function write($filepath, $conf)
95 { 97 {
96 $configStr = '<?php '. PHP_EOL; 98 $configStr = '<?php '. PHP_EOL;
97 foreach (self::$ROOT_KEYS as $key) { 99 foreach (self::$ROOT_KEYS as $key) {
@@ -99,7 +101,7 @@ class ConfigPhp implements ConfigIO
99 $configStr .= '$GLOBALS[\'' . $key . '\'] = ' . var_export($conf[$key], true) . ';' . PHP_EOL; 101 $configStr .= '$GLOBALS[\'' . $key . '\'] = ' . var_export($conf[$key], true) . ';' . PHP_EOL;
100 } 102 }
101 } 103 }
102 104
103 // Store all $conf['config'] 105 // Store all $conf['config']
104 foreach ($conf['config'] as $key => $value) { 106 foreach ($conf['config'] as $key => $value) {
105 $configStr .= '$GLOBALS[\'config\'][\''. $key .'\'] = '.var_export($conf['config'][$key], true).';'. PHP_EOL; 107 $configStr .= '$GLOBALS[\'config\'][\''. $key .'\'] = '.var_export($conf['config'][$key], true).';'. PHP_EOL;
@@ -114,10 +116,10 @@ class ConfigPhp implements ConfigIO
114 if (!file_put_contents($filepath, $configStr) 116 if (!file_put_contents($filepath, $configStr)
115 || strcmp(file_get_contents($filepath), $configStr) != 0 117 || strcmp(file_get_contents($filepath), $configStr) != 0
116 ) { 118 ) {
117 throw new IOException( 119 throw new \IOException(
118 $filepath, 120 $filepath,
119 'Shaarli could not create the config file. 121 t('Shaarli could not create the config file. '.
120 Please make sure Shaarli has the right to write in the folder is it installed in.' 122 'Please make sure Shaarli has the right to write in the folder is it installed in.')
121 ); 123 );
122 } 124 }
123 } 125 }
@@ -125,7 +127,7 @@ class ConfigPhp implements ConfigIO
125 /** 127 /**
126 * @inheritdoc 128 * @inheritdoc
127 */ 129 */
128 function getExtension() 130 public function getExtension()
129 { 131 {
130 return '.php'; 132 return '.php';
131 } 133 }
diff --git a/application/config/ConfigPlugin.php b/application/config/ConfigPlugin.php
index cb0b6fce..b3d9752b 100644
--- a/application/config/ConfigPlugin.php
+++ b/application/config/ConfigPlugin.php
@@ -1,4 +1,7 @@
1<?php 1<?php
2
3use Shaarli\Config\Exception\PluginConfigOrderException;
4
2/** 5/**
3 * Plugin configuration helper functions. 6 * Plugin configuration helper functions.
4 * 7 *
@@ -108,17 +111,3 @@ function load_plugin_parameter_values($plugins, $conf)
108 111
109 return $out; 112 return $out;
110} 113}
111
112/**
113 * Exception used if an error occur while saving plugin configuration.
114 */
115class PluginConfigOrderException extends Exception
116{
117 /**
118 * Construct exception.
119 */
120 public function __construct()
121 {
122 $this->message = 'An error occurred while trying to save plugins loading order.';
123 }
124}
diff --git a/application/config/exception/MissingFieldConfigException.php b/application/config/exception/MissingFieldConfigException.php
new file mode 100644
index 00000000..9e0a9359
--- /dev/null
+++ b/application/config/exception/MissingFieldConfigException.php
@@ -0,0 +1,23 @@
1<?php
2
3
4namespace Shaarli\Config\Exception;
5
6/**
7 * Exception used if a mandatory field is missing in given configuration.
8 */
9class MissingFieldConfigException extends \Exception
10{
11 public $field;
12
13 /**
14 * Construct exception.
15 *
16 * @param string $field field name missing.
17 */
18 public function __construct($field)
19 {
20 $this->field = $field;
21 $this->message = sprintf(t('Configuration value is required for %s'), $this->field);
22 }
23}
diff --git a/application/config/exception/PluginConfigOrderException.php b/application/config/exception/PluginConfigOrderException.php
new file mode 100644
index 00000000..f82ec26e
--- /dev/null
+++ b/application/config/exception/PluginConfigOrderException.php
@@ -0,0 +1,17 @@
1<?php
2
3namespace Shaarli\Config\Exception;
4
5/**
6 * Exception used if an error occur while saving plugin configuration.
7 */
8class PluginConfigOrderException extends \Exception
9{
10 /**
11 * Construct exception.
12 */
13 public function __construct()
14 {
15 $this->message = t('An error occurred while trying to save plugins loading order.');
16 }
17}
diff --git a/application/config/exception/UnauthorizedConfigException.php b/application/config/exception/UnauthorizedConfigException.php
new file mode 100644
index 00000000..72311fae
--- /dev/null
+++ b/application/config/exception/UnauthorizedConfigException.php
@@ -0,0 +1,18 @@
1<?php
2
3
4namespace Shaarli\Config\Exception;
5
6/**
7 * Exception used if an unauthorized attempt to edit configuration has been made.
8 */
9class UnauthorizedConfigException extends \Exception
10{
11 /**
12 * Construct exception.
13 */
14 public function __construct()
15 {
16 $this->message = t('You are not authorized to alter config.');
17 }
18}
diff --git a/application/exceptions/IOException.php b/application/exceptions/IOException.php
new file mode 100644
index 00000000..18e46b77
--- /dev/null
+++ b/application/exceptions/IOException.php
@@ -0,0 +1,22 @@
1<?php
2
3/**
4 * Exception class thrown when a filesystem access failure happens
5 */
6class IOException extends Exception
7{
8 private $path;
9
10 /**
11 * Construct a new IOException
12 *
13 * @param string $path path to the resource that cannot be accessed
14 * @param string $message Custom exception message.
15 */
16 public function __construct($path, $message = '')
17 {
18 $this->path = $path;
19 $this->message = empty($message) ? t('Error accessing') : $message;
20 $this->message .= ' "' . $this->path .'"';
21 }
22}
diff --git a/composer.json b/composer.json
index f7d26a31..f331d6ca 100644
--- a/composer.json
+++ b/composer.json
@@ -6,18 +6,37 @@
6 "homepage": "https://github.com/shaarli/Shaarli", 6 "homepage": "https://github.com/shaarli/Shaarli",
7 "support": { 7 "support": {
8 "issues": "https://github.com/shaarli/Shaarli/issues", 8 "issues": "https://github.com/shaarli/Shaarli/issues",
9 "wiki": "https://github.com/shaarli/Shaarli/wiki" 9 "wiki": "https://shaarli.readthedocs.io"
10 }, 10 },
11 "keywords": ["bookmark", "link", "share", "web"], 11 "keywords": ["bookmark", "link", "share", "web"],
12 "config": {
13 "platform": {
14 "php": "5.5.38"
15 }
16 },
12 "require": { 17 "require": {
13 "php": ">=5.3.4", 18 "php": ">=5.5",
14 "shaarli/netscape-bookmark-parser": "1.*", 19 "shaarli/netscape-bookmark-parser": "^2.0",
15 "erusev/parsedown": "1.6" 20 "erusev/parsedown": "1.6",
21 "slim/slim": "^3.0",
22 "pubsubhubbub/publisher": "dev-master",
23 "gettext/gettext": "^4.4"
16 }, 24 },
17 "require-dev": { 25 "require-dev": {
18 "phpmd/phpmd" : "@stable", 26 "phpmd/phpmd" : "@stable",
19 "phpunit/phpunit": "4.8.*", 27 "phpunit/phpunit": "4.8.*",
20 "sebastian/phpcpd": "*", 28 "sebastian/phpcpd": "*",
21 "squizlabs/php_codesniffer": "2.*" 29 "squizlabs/php_codesniffer": "2.*",
30 "phpunit/phpcov": "*"
31 },
32 "autoload": {
33 "psr-4": {
34 "Shaarli\\": "application",
35 "Shaarli\\Api\\": "application/api/",
36 "Shaarli\\Api\\Controllers\\": "application/api/controllers",
37 "Shaarli\\Api\\Exceptions\\": "application/api/exceptions",
38 "Shaarli\\Config\\": "application/config/",
39 "Shaarli\\Config\\Exception\\": "application/config/exception"
40 }
22 } 41 }
23} 42}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 00000000..c719b2a6
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,2567 @@
1{
2 "_readme": [
3 "This file locks the dependencies of your project to a known state",
4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 "This file is @generated automatically"
6 ],
7 "content-hash": "13b7e1e474fe9264b098ba86face0feb",
8 "packages": [
9 {
10 "name": "container-interop/container-interop",
11 "version": "1.2.0",
12 "source": {
13 "type": "git",
14 "url": "https://github.com/container-interop/container-interop.git",
15 "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8"
16 },
17 "dist": {
18 "type": "zip",
19 "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8",
20 "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8",
21 "shasum": ""
22 },
23 "require": {
24 "psr/container": "^1.0"
25 },
26 "type": "library",
27 "autoload": {
28 "psr-4": {
29 "Interop\\Container\\": "src/Interop/Container/"
30 }
31 },
32 "notification-url": "https://packagist.org/downloads/",
33 "license": [
34 "MIT"
35 ],
36 "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
37 "homepage": "https://github.com/container-interop/container-interop",
38 "time": "2017-02-14T19:40:03+00:00"
39 },
40 {
41 "name": "erusev/parsedown",
42 "version": "1.6.0",
43 "source": {
44 "type": "git",
45 "url": "https://github.com/erusev/parsedown.git",
46 "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7"
47 },
48 "dist": {
49 "type": "zip",
50 "url": "https://api.github.com/repos/erusev/parsedown/zipball/3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7",
51 "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7",
52 "shasum": ""
53 },
54 "type": "library",
55 "autoload": {
56 "psr-0": {
57 "Parsedown": ""
58 }
59 },
60 "notification-url": "https://packagist.org/downloads/",
61 "license": [
62 "MIT"
63 ],
64 "authors": [
65 {
66 "name": "Emanuil Rusev",
67 "email": "hello@erusev.com",
68 "homepage": "http://erusev.com"
69 }
70 ],
71 "description": "Parser for Markdown.",
72 "homepage": "http://parsedown.org",
73 "keywords": [
74 "markdown",
75 "parser"
76 ],
77 "time": "2015-10-04T16:44:32+00:00"
78 },
79 {
80 "name": "gettext/gettext",
81 "version": "v4.4.3",
82 "source": {
83 "type": "git",
84 "url": "https://github.com/oscarotero/Gettext.git",
85 "reference": "4f57f004635cc6311a20815ebfdc0757cb337113"
86 },
87 "dist": {
88 "type": "zip",
89 "url": "https://api.github.com/repos/oscarotero/Gettext/zipball/4f57f004635cc6311a20815ebfdc0757cb337113",
90 "reference": "4f57f004635cc6311a20815ebfdc0757cb337113",
91 "shasum": ""
92 },
93 "require": {
94 "gettext/languages": "^2.3",
95 "php": ">=5.4.0"
96 },
97 "require-dev": {
98 "illuminate/view": "*",
99 "phpunit/phpunit": "^4.8|^5.7",
100 "squizlabs/php_codesniffer": "^3.0",
101 "symfony/yaml": "~2",
102 "twig/extensions": "*",
103 "twig/twig": "^1.31|^2.0"
104 },
105 "suggest": {
106 "illuminate/view": "Is necessary if you want to use the Blade extractor",
107 "symfony/yaml": "Is necessary if you want to use the Yaml extractor/generator",
108 "twig/extensions": "Is necessary if you want to use the Twig extractor",
109 "twig/twig": "Is necessary if you want to use the Twig extractor"
110 },
111 "type": "library",
112 "autoload": {
113 "psr-4": {
114 "Gettext\\": "src"
115 }
116 },
117 "notification-url": "https://packagist.org/downloads/",
118 "license": [
119 "MIT"
120 ],
121 "authors": [
122 {
123 "name": "Oscar Otero",
124 "email": "oom@oscarotero.com",
125 "homepage": "http://oscarotero.com",
126 "role": "Developer"
127 }
128 ],
129 "description": "PHP gettext manager",
130 "homepage": "https://github.com/oscarotero/Gettext",
131 "keywords": [
132 "JS",
133 "gettext",
134 "i18n",
135 "mo",
136 "po",
137 "translation"
138 ],
139 "time": "2017-08-09T16:59:46+00:00"
140 },
141 {
142 "name": "gettext/languages",
143 "version": "2.3.0",
144 "source": {
145 "type": "git",
146 "url": "https://github.com/mlocati/cldr-to-gettext-plural-rules.git",
147 "reference": "49c39e51569963cc917a924b489e7025bfb9d8c7"
148 },
149 "dist": {
150 "type": "zip",
151 "url": "https://api.github.com/repos/mlocati/cldr-to-gettext-plural-rules/zipball/49c39e51569963cc917a924b489e7025bfb9d8c7",
152 "reference": "49c39e51569963cc917a924b489e7025bfb9d8c7",
153 "shasum": ""
154 },
155 "require": {
156 "php": ">=5.3"
157 },
158 "require-dev": {
159 "phpunit/phpunit": "^4"
160 },
161 "bin": [
162 "bin/export-plural-rules",
163 "bin/export-plural-rules.php"
164 ],
165 "type": "library",
166 "autoload": {
167 "psr-4": {
168 "Gettext\\Languages\\": "src/"
169 }
170 },
171 "notification-url": "https://packagist.org/downloads/",
172 "license": [
173 "MIT"
174 ],
175 "authors": [
176 {
177 "name": "Michele Locati",
178 "email": "mlocati@gmail.com",
179 "role": "Developer"
180 }
181 ],
182 "description": "gettext languages with plural rules",
183 "homepage": "https://github.com/mlocati/cldr-to-gettext-plural-rules",
184 "keywords": [
185 "cldr",
186 "i18n",
187 "internationalization",
188 "l10n",
189 "language",
190 "languages",
191 "localization",
192 "php",
193 "plural",
194 "plural rules",
195 "plurals",
196 "translate",
197 "translations",
198 "unicode"
199 ],
200 "time": "2017-03-23T17:02:28+00:00"
201 },
202 {
203 "name": "katzgrau/klogger",
204 "version": "1.2.1",
205 "source": {
206 "type": "git",
207 "url": "https://github.com/katzgrau/KLogger.git",
208 "reference": "a4ed373fa8a214aa4ae7aa4f221fe2c6ce862ef1"
209 },
210 "dist": {
211 "type": "zip",
212 "url": "https://api.github.com/repos/katzgrau/KLogger/zipball/a4ed373fa8a214aa4ae7aa4f221fe2c6ce862ef1",
213 "reference": "a4ed373fa8a214aa4ae7aa4f221fe2c6ce862ef1",
214 "shasum": ""
215 },
216 "require": {
217 "php": ">=5.3",
218 "psr/log": "^1.0.0"
219 },
220 "require-dev": {
221 "phpunit/phpunit": "4.0.*"
222 },
223 "type": "library",
224 "autoload": {
225 "psr-4": {
226 "Katzgrau\\KLogger\\": "src/"
227 },
228 "classmap": [
229 "src/"
230 ]
231 },
232 "notification-url": "https://packagist.org/downloads/",
233 "license": [
234 "MIT"
235 ],
236 "authors": [
237 {
238 "name": "Kenny Katzgrau",
239 "email": "katzgrau@gmail.com"
240 },
241 {
242 "name": "Dan Horrigan",
243 "email": "dan@dhorrigan.com"
244 }
245 ],
246 "description": "A Simple Logging Class",
247 "keywords": [
248 "logging"
249 ],
250 "time": "2016-11-07T19:29:14+00:00"
251 },
252 {
253 "name": "nikic/fast-route",
254 "version": "v1.2.0",
255 "source": {
256 "type": "git",
257 "url": "https://github.com/nikic/FastRoute.git",
258 "reference": "b5f95749071c82a8e0f58586987627054400cdf6"
259 },
260 "dist": {
261 "type": "zip",
262 "url": "https://api.github.com/repos/nikic/FastRoute/zipball/b5f95749071c82a8e0f58586987627054400cdf6",
263 "reference": "b5f95749071c82a8e0f58586987627054400cdf6",
264 "shasum": ""
265 },
266 "require": {
267 "php": ">=5.4.0"
268 },
269 "type": "library",
270 "autoload": {
271 "psr-4": {
272 "FastRoute\\": "src/"
273 },
274 "files": [
275 "src/functions.php"
276 ]
277 },
278 "notification-url": "https://packagist.org/downloads/",
279 "license": [
280 "BSD-3-Clause"
281 ],
282 "authors": [
283 {
284 "name": "Nikita Popov",
285 "email": "nikic@php.net"
286 }
287 ],
288 "description": "Fast request router for PHP",
289 "keywords": [
290 "router",
291 "routing"
292 ],
293 "time": "2017-01-19T11:35:12+00:00"
294 },
295 {
296 "name": "pimple/pimple",
297 "version": "v3.2.3",
298 "source": {
299 "type": "git",
300 "url": "https://github.com/silexphp/Pimple.git",
301 "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32"
302 },
303 "dist": {
304 "type": "zip",
305 "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32",
306 "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32",
307 "shasum": ""
308 },
309 "require": {
310 "php": ">=5.3.0",
311 "psr/container": "^1.0"
312 },
313 "require-dev": {
314 "symfony/phpunit-bridge": "^3.2"
315 },
316 "type": "library",
317 "extra": {
318 "branch-alias": {
319 "dev-master": "3.2.x-dev"
320 }
321 },
322 "autoload": {
323 "psr-0": {
324 "Pimple": "src/"
325 }
326 },
327 "notification-url": "https://packagist.org/downloads/",
328 "license": [
329 "MIT"
330 ],
331 "authors": [
332 {
333 "name": "Fabien Potencier",
334 "email": "fabien@symfony.com"
335 }
336 ],
337 "description": "Pimple, a simple Dependency Injection Container",
338 "homepage": "http://pimple.sensiolabs.org",
339 "keywords": [
340 "container",
341 "dependency injection"
342 ],
343 "time": "2018-01-21T07:42:36+00:00"
344 },
345 {
346 "name": "psr/container",
347 "version": "1.0.0",
348 "source": {
349 "type": "git",
350 "url": "https://github.com/php-fig/container.git",
351 "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
352 },
353 "dist": {
354 "type": "zip",
355 "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
356 "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
357 "shasum": ""
358 },
359 "require": {
360 "php": ">=5.3.0"
361 },
362 "type": "library",
363 "extra": {
364 "branch-alias": {
365 "dev-master": "1.0.x-dev"
366 }
367 },
368 "autoload": {
369 "psr-4": {
370 "Psr\\Container\\": "src/"
371 }
372 },
373 "notification-url": "https://packagist.org/downloads/",
374 "license": [
375 "MIT"
376 ],
377 "authors": [
378 {
379 "name": "PHP-FIG",
380 "homepage": "http://www.php-fig.org/"
381 }
382 ],
383 "description": "Common Container Interface (PHP FIG PSR-11)",
384 "homepage": "https://github.com/php-fig/container",
385 "keywords": [
386 "PSR-11",
387 "container",
388 "container-interface",
389 "container-interop",
390 "psr"
391 ],
392 "time": "2017-02-14T16:28:37+00:00"
393 },
394 {
395 "name": "psr/http-message",
396 "version": "1.0.1",
397 "source": {
398 "type": "git",
399 "url": "https://github.com/php-fig/http-message.git",
400 "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
401 },
402 "dist": {
403 "type": "zip",
404 "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
405 "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
406 "shasum": ""
407 },
408 "require": {
409 "php": ">=5.3.0"
410 },
411 "type": "library",
412 "extra": {
413 "branch-alias": {
414 "dev-master": "1.0.x-dev"
415 }
416 },
417 "autoload": {
418 "psr-4": {
419 "Psr\\Http\\Message\\": "src/"
420 }
421 },
422 "notification-url": "https://packagist.org/downloads/",
423 "license": [
424 "MIT"
425 ],
426 "authors": [
427 {
428 "name": "PHP-FIG",
429 "homepage": "http://www.php-fig.org/"
430 }
431 ],
432 "description": "Common interface for HTTP messages",
433 "homepage": "https://github.com/php-fig/http-message",
434 "keywords": [
435 "http",
436 "http-message",
437 "psr",
438 "psr-7",
439 "request",
440 "response"
441 ],
442 "time": "2016-08-06T14:39:51+00:00"
443 },
444 {
445 "name": "psr/log",
446 "version": "1.0.2",
447 "source": {
448 "type": "git",
449 "url": "https://github.com/php-fig/log.git",
450 "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
451 },
452 "dist": {
453 "type": "zip",
454 "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
455 "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
456 "shasum": ""
457 },
458 "require": {
459 "php": ">=5.3.0"
460 },
461 "type": "library",
462 "extra": {
463 "branch-alias": {
464 "dev-master": "1.0.x-dev"
465 }
466 },
467 "autoload": {
468 "psr-4": {
469 "Psr\\Log\\": "Psr/Log/"
470 }
471 },
472 "notification-url": "https://packagist.org/downloads/",
473 "license": [
474 "MIT"
475 ],
476 "authors": [
477 {
478 "name": "PHP-FIG",
479 "homepage": "http://www.php-fig.org/"
480 }
481 ],
482 "description": "Common interface for logging libraries",
483 "homepage": "https://github.com/php-fig/log",
484 "keywords": [
485 "log",
486 "psr",
487 "psr-3"
488 ],
489 "time": "2016-10-10T12:19:37+00:00"
490 },
491 {
492 "name": "pubsubhubbub/publisher",
493 "version": "dev-master",
494 "source": {
495 "type": "git",
496 "url": "https://github.com/pubsubhubbub/php-publisher.git",
497 "reference": "0d224daebd504ab61c22fee4db58f8d1fc18945f"
498 },
499 "dist": {
500 "type": "zip",
501 "url": "https://api.github.com/repos/pubsubhubbub/php-publisher/zipball/0d224daebd504ab61c22fee4db58f8d1fc18945f",
502 "reference": "0d224daebd504ab61c22fee4db58f8d1fc18945f",
503 "shasum": ""
504 },
505 "require": {
506 "php": "~5.4 || ~7.0"
507 },
508 "type": "library",
509 "autoload": {
510 "psr-4": {
511 "pubsubhubbub\\publisher\\": "library/"
512 }
513 },
514 "notification-url": "https://packagist.org/downloads/",
515 "license": [
516 "Apache-2.0"
517 ],
518 "authors": [
519 {
520 "name": "pubsubhubbub publisher Contributors",
521 "homepage": "https://github.com/pubsubhubbub/php-publisher/contributors"
522 }
523 ],
524 "description": "pubsubhubbub implementation of publisher.",
525 "homepage": "https://github.com/pubsubhubbub/php-publisher",
526 "keywords": [
527 "data",
528 "feeds",
529 "publishers",
530 "pubsubhubbub"
531 ],
532 "time": "2017-10-08T10:59:41+00:00"
533 },
534 {
535 "name": "shaarli/netscape-bookmark-parser",
536 "version": "v2.0.5",
537 "source": {
538 "type": "git",
539 "url": "https://github.com/shaarli/netscape-bookmark-parser.git",
540 "reference": "ea6911a0ea3dd372fa7002593c5aef9c15a49315"
541 },
542 "dist": {
543 "type": "zip",
544 "url": "https://api.github.com/repos/shaarli/netscape-bookmark-parser/zipball/ea6911a0ea3dd372fa7002593c5aef9c15a49315",
545 "reference": "ea6911a0ea3dd372fa7002593c5aef9c15a49315",
546 "shasum": ""
547 },
548 "require": {
549 "katzgrau/klogger": "~1.0",
550 "php": ">=5.3.4"
551 },
552 "require-dev": {
553 "phpunit/phpunit": "4.8.*"
554 },
555 "type": "library",
556 "autoload": {
557 "files": [
558 "NetscapeBookmarkParser.php"
559 ]
560 },
561 "notification-url": "https://packagist.org/downloads/",
562 "license": [
563 "MIT"
564 ],
565 "authors": [
566 {
567 "name": "Kafene",
568 "email": "io@kafene.org",
569 "homepage": "https://github.com/kafene",
570 "role": "Developer"
571 },
572 {
573 "name": "VirtualTam",
574 "email": "virtualtam@flibidi.net",
575 "homepage": "https://github.com/virtualtam",
576 "role": "Developer"
577 }
578 ],
579 "description": "Generic Netscape bookmark parser",
580 "homepage": "https://github.com/shaarli/netscape-bookmark-parser",
581 "keywords": [
582 "bookmark",
583 "link",
584 "netscape",
585 "parse"
586 ],
587 "time": "2018-01-30T17:34:48+00:00"
588 },
589 {
590 "name": "slim/slim",
591 "version": "3.9.2",
592 "source": {
593 "type": "git",
594 "url": "https://github.com/slimphp/Slim.git",
595 "reference": "4086d0106cf5a7135c69fce4161fe355a8feb118"
596 },
597 "dist": {
598 "type": "zip",
599 "url": "https://api.github.com/repos/slimphp/Slim/zipball/4086d0106cf5a7135c69fce4161fe355a8feb118",
600 "reference": "4086d0106cf5a7135c69fce4161fe355a8feb118",
601 "shasum": ""
602 },
603 "require": {
604 "container-interop/container-interop": "^1.2",
605 "nikic/fast-route": "^1.0",
606 "php": ">=5.5.0",
607 "pimple/pimple": "^3.0",
608 "psr/container": "^1.0",
609 "psr/http-message": "^1.0"
610 },
611 "provide": {
612 "psr/http-message-implementation": "1.0"
613 },
614 "require-dev": {
615 "phpunit/phpunit": "^4.0",
616 "squizlabs/php_codesniffer": "^2.5"
617 },
618 "type": "library",
619 "autoload": {
620 "psr-4": {
621 "Slim\\": "Slim"
622 }
623 },
624 "notification-url": "https://packagist.org/downloads/",
625 "license": [
626 "MIT"
627 ],
628 "authors": [
629 {
630 "name": "Rob Allen",
631 "email": "rob@akrabat.com",
632 "homepage": "http://akrabat.com"
633 },
634 {
635 "name": "Josh Lockhart",
636 "email": "hello@joshlockhart.com",
637 "homepage": "https://joshlockhart.com"
638 },
639 {
640 "name": "Gabriel Manricks",
641 "email": "gmanricks@me.com",
642 "homepage": "http://gabrielmanricks.com"
643 },
644 {
645 "name": "Andrew Smith",
646 "email": "a.smith@silentworks.co.uk",
647 "homepage": "http://silentworks.co.uk"
648 }
649 ],
650 "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs",
651 "homepage": "https://slimframework.com",
652 "keywords": [
653 "api",
654 "framework",
655 "micro",
656 "router"
657 ],
658 "time": "2017-11-26T19:13:09+00:00"
659 }
660 ],
661 "packages-dev": [
662 {
663 "name": "doctrine/instantiator",
664 "version": "1.0.5",
665 "source": {
666 "type": "git",
667 "url": "https://github.com/doctrine/instantiator.git",
668 "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
669 },
670 "dist": {
671 "type": "zip",
672 "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
673 "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
674 "shasum": ""
675 },
676 "require": {
677 "php": ">=5.3,<8.0-DEV"
678 },
679 "require-dev": {
680 "athletic/athletic": "~0.1.8",
681 "ext-pdo": "*",
682 "ext-phar": "*",
683 "phpunit/phpunit": "~4.0",
684 "squizlabs/php_codesniffer": "~2.0"
685 },
686 "type": "library",
687 "extra": {
688 "branch-alias": {
689 "dev-master": "1.0.x-dev"
690 }
691 },
692 "autoload": {
693 "psr-4": {
694 "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
695 }
696 },
697 "notification-url": "https://packagist.org/downloads/",
698 "license": [
699 "MIT"
700 ],
701 "authors": [
702 {
703 "name": "Marco Pivetta",
704 "email": "ocramius@gmail.com",
705 "homepage": "http://ocramius.github.com/"
706 }
707 ],
708 "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
709 "homepage": "https://github.com/doctrine/instantiator",
710 "keywords": [
711 "constructor",
712 "instantiate"
713 ],
714 "time": "2015-06-14T21:17:01+00:00"
715 },
716 {
717 "name": "pdepend/pdepend",
718 "version": "2.5.2",
719 "source": {
720 "type": "git",
721 "url": "https://github.com/pdepend/pdepend.git",
722 "reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239"
723 },
724 "dist": {
725 "type": "zip",
726 "url": "https://api.github.com/repos/pdepend/pdepend/zipball/9daf26d0368d4a12bed1cacae1a9f3a6f0adf239",
727 "reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239",
728 "shasum": ""
729 },
730 "require": {
731 "php": ">=5.3.7",
732 "symfony/config": "^2.3.0|^3|^4",
733 "symfony/dependency-injection": "^2.3.0|^3|^4",
734 "symfony/filesystem": "^2.3.0|^3|^4"
735 },
736 "require-dev": {
737 "phpunit/phpunit": "^4.8|^5.7",
738 "squizlabs/php_codesniffer": "^2.0.0"
739 },
740 "bin": [
741 "src/bin/pdepend"
742 ],
743 "type": "library",
744 "autoload": {
745 "psr-4": {
746 "PDepend\\": "src/main/php/PDepend"
747 }
748 },
749 "notification-url": "https://packagist.org/downloads/",
750 "license": [
751 "BSD-3-Clause"
752 ],
753 "description": "Official version of pdepend to be handled with Composer",
754 "time": "2017-12-13T13:21:38+00:00"
755 },
756 {
757 "name": "phpdocumentor/reflection-common",
758 "version": "1.0.1",
759 "source": {
760 "type": "git",
761 "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
762 "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
763 },
764 "dist": {
765 "type": "zip",
766 "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
767 "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
768 "shasum": ""
769 },
770 "require": {
771 "php": ">=5.5"
772 },
773 "require-dev": {
774 "phpunit/phpunit": "^4.6"
775 },
776 "type": "library",
777 "extra": {
778 "branch-alias": {
779 "dev-master": "1.0.x-dev"
780 }
781 },
782 "autoload": {
783 "psr-4": {
784 "phpDocumentor\\Reflection\\": [
785 "src"
786 ]
787 }
788 },
789 "notification-url": "https://packagist.org/downloads/",
790 "license": [
791 "MIT"
792 ],
793 "authors": [
794 {
795 "name": "Jaap van Otterdijk",
796 "email": "opensource@ijaap.nl"
797 }
798 ],
799 "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
800 "homepage": "http://www.phpdoc.org",
801 "keywords": [
802 "FQSEN",
803 "phpDocumentor",
804 "phpdoc",
805 "reflection",
806 "static analysis"
807 ],
808 "time": "2017-09-11T18:02:19+00:00"
809 },
810 {
811 "name": "phpdocumentor/reflection-docblock",
812 "version": "3.2.2",
813 "source": {
814 "type": "git",
815 "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
816 "reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157"
817 },
818 "dist": {
819 "type": "zip",
820 "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/4aada1f93c72c35e22fb1383b47fee43b8f1d157",
821 "reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157",
822 "shasum": ""
823 },
824 "require": {
825 "php": ">=5.5",
826 "phpdocumentor/reflection-common": "^1.0@dev",
827 "phpdocumentor/type-resolver": "^0.3.0",
828 "webmozart/assert": "^1.0"
829 },
830 "require-dev": {
831 "mockery/mockery": "^0.9.4",
832 "phpunit/phpunit": "^4.4"
833 },
834 "type": "library",
835 "autoload": {
836 "psr-4": {
837 "phpDocumentor\\Reflection\\": [
838 "src/"
839 ]
840 }
841 },
842 "notification-url": "https://packagist.org/downloads/",
843 "license": [
844 "MIT"
845 ],
846 "authors": [
847 {
848 "name": "Mike van Riel",
849 "email": "me@mikevanriel.com"
850 }
851 ],
852 "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
853 "time": "2017-08-08T06:39:58+00:00"
854 },
855 {
856 "name": "phpdocumentor/type-resolver",
857 "version": "0.3.0",
858 "source": {
859 "type": "git",
860 "url": "https://github.com/phpDocumentor/TypeResolver.git",
861 "reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773"
862 },
863 "dist": {
864 "type": "zip",
865 "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fb3933512008d8162b3cdf9e18dba9309b7c3773",
866 "reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773",
867 "shasum": ""
868 },
869 "require": {
870 "php": "^5.5 || ^7.0",
871 "phpdocumentor/reflection-common": "^1.0"
872 },
873 "require-dev": {
874 "mockery/mockery": "^0.9.4",
875 "phpunit/phpunit": "^5.2||^4.8.24"
876 },
877 "type": "library",
878 "extra": {
879 "branch-alias": {
880 "dev-master": "1.0.x-dev"
881 }
882 },
883 "autoload": {
884 "psr-4": {
885 "phpDocumentor\\Reflection\\": [
886 "src/"
887 ]
888 }
889 },
890 "notification-url": "https://packagist.org/downloads/",
891 "license": [
892 "MIT"
893 ],
894 "authors": [
895 {
896 "name": "Mike van Riel",
897 "email": "me@mikevanriel.com"
898 }
899 ],
900 "time": "2017-06-03T08:32:36+00:00"
901 },
902 {
903 "name": "phpmd/phpmd",
904 "version": "2.6.0",
905 "source": {
906 "type": "git",
907 "url": "https://github.com/phpmd/phpmd.git",
908 "reference": "4e9924b2c157a3eb64395460fcf56b31badc8374"
909 },
910 "dist": {
911 "type": "zip",
912 "url": "https://api.github.com/repos/phpmd/phpmd/zipball/4e9924b2c157a3eb64395460fcf56b31badc8374",
913 "reference": "4e9924b2c157a3eb64395460fcf56b31badc8374",
914 "shasum": ""
915 },
916 "require": {
917 "ext-xml": "*",
918 "pdepend/pdepend": "^2.5",
919 "php": ">=5.3.9"
920 },
921 "require-dev": {
922 "phpunit/phpunit": "^4.0",
923 "squizlabs/php_codesniffer": "^2.0"
924 },
925 "bin": [
926 "src/bin/phpmd"
927 ],
928 "type": "project",
929 "autoload": {
930 "psr-0": {
931 "PHPMD\\": "src/main/php"
932 }
933 },
934 "notification-url": "https://packagist.org/downloads/",
935 "license": [
936 "BSD-3-Clause"
937 ],
938 "authors": [
939 {
940 "name": "Manuel Pichler",
941 "email": "github@manuel-pichler.de",
942 "homepage": "https://github.com/manuelpichler",
943 "role": "Project Founder"
944 },
945 {
946 "name": "Other contributors",
947 "homepage": "https://github.com/phpmd/phpmd/graphs/contributors",
948 "role": "Contributors"
949 },
950 {
951 "name": "Marc Würth",
952 "email": "ravage@bluewin.ch",
953 "homepage": "https://github.com/ravage84",
954 "role": "Project Maintainer"
955 }
956 ],
957 "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.",
958 "homepage": "http://phpmd.org/",
959 "keywords": [
960 "mess detection",
961 "mess detector",
962 "pdepend",
963 "phpmd",
964 "pmd"
965 ],
966 "time": "2017-01-20T14:41:10+00:00"
967 },
968 {
969 "name": "phpspec/prophecy",
970 "version": "1.7.3",
971 "source": {
972 "type": "git",
973 "url": "https://github.com/phpspec/prophecy.git",
974 "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf"
975 },
976 "dist": {
977 "type": "zip",
978 "url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
979 "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
980 "shasum": ""
981 },
982 "require": {
983 "doctrine/instantiator": "^1.0.2",
984 "php": "^5.3|^7.0",
985 "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
986 "sebastian/comparator": "^1.1|^2.0",
987 "sebastian/recursion-context": "^1.0|^2.0|^3.0"
988 },
989 "require-dev": {
990 "phpspec/phpspec": "^2.5|^3.2",
991 "phpunit/phpunit": "^4.8.35 || ^5.7"
992 },
993 "type": "library",
994 "extra": {
995 "branch-alias": {
996 "dev-master": "1.7.x-dev"
997 }
998 },
999 "autoload": {
1000 "psr-0": {
1001 "Prophecy\\": "src/"
1002 }
1003 },
1004 "notification-url": "https://packagist.org/downloads/",
1005 "license": [
1006 "MIT"
1007 ],
1008 "authors": [
1009 {
1010 "name": "Konstantin Kudryashov",
1011 "email": "ever.zet@gmail.com",
1012 "homepage": "http://everzet.com"
1013 },
1014 {
1015 "name": "Marcello Duarte",
1016 "email": "marcello.duarte@gmail.com"
1017 }
1018 ],
1019 "description": "Highly opinionated mocking framework for PHP 5.3+",
1020 "homepage": "https://github.com/phpspec/prophecy",
1021 "keywords": [
1022 "Double",
1023 "Dummy",
1024 "fake",
1025 "mock",
1026 "spy",
1027 "stub"
1028 ],
1029 "time": "2017-11-24T13:59:53+00:00"
1030 },
1031 {
1032 "name": "phpunit/php-code-coverage",
1033 "version": "2.2.4",
1034 "source": {
1035 "type": "git",
1036 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
1037 "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
1038 },
1039 "dist": {
1040 "type": "zip",
1041 "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
1042 "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
1043 "shasum": ""
1044 },
1045 "require": {
1046 "php": ">=5.3.3",
1047 "phpunit/php-file-iterator": "~1.3",
1048 "phpunit/php-text-template": "~1.2",
1049 "phpunit/php-token-stream": "~1.3",
1050 "sebastian/environment": "^1.3.2",
1051 "sebastian/version": "~1.0"
1052 },
1053 "require-dev": {
1054 "ext-xdebug": ">=2.1.4",
1055 "phpunit/phpunit": "~4"
1056 },
1057 "suggest": {
1058 "ext-dom": "*",
1059 "ext-xdebug": ">=2.2.1",
1060 "ext-xmlwriter": "*"
1061 },
1062 "type": "library",
1063 "extra": {
1064 "branch-alias": {
1065 "dev-master": "2.2.x-dev"
1066 }
1067 },
1068 "autoload": {
1069 "classmap": [
1070 "src/"
1071 ]
1072 },
1073 "notification-url": "https://packagist.org/downloads/",
1074 "license": [
1075 "BSD-3-Clause"
1076 ],
1077 "authors": [
1078 {
1079 "name": "Sebastian Bergmann",
1080 "email": "sb@sebastian-bergmann.de",
1081 "role": "lead"
1082 }
1083 ],
1084 "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
1085 "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
1086 "keywords": [
1087 "coverage",
1088 "testing",
1089 "xunit"
1090 ],
1091 "time": "2015-10-06T15:47:00+00:00"
1092 },
1093 {
1094 "name": "phpunit/php-file-iterator",
1095 "version": "1.4.5",
1096 "source": {
1097 "type": "git",
1098 "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
1099 "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
1100 },
1101 "dist": {
1102 "type": "zip",
1103 "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
1104 "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
1105 "shasum": ""
1106 },
1107 "require": {
1108 "php": ">=5.3.3"
1109 },
1110 "type": "library",
1111 "extra": {
1112 "branch-alias": {
1113 "dev-master": "1.4.x-dev"
1114 }
1115 },
1116 "autoload": {
1117 "classmap": [
1118 "src/"
1119 ]
1120 },
1121 "notification-url": "https://packagist.org/downloads/",
1122 "license": [
1123 "BSD-3-Clause"
1124 ],
1125 "authors": [
1126 {
1127 "name": "Sebastian Bergmann",
1128 "email": "sb@sebastian-bergmann.de",
1129 "role": "lead"
1130 }
1131 ],
1132 "description": "FilterIterator implementation that filters files based on a list of suffixes.",
1133 "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
1134 "keywords": [
1135 "filesystem",
1136 "iterator"
1137 ],
1138 "time": "2017-11-27T13:52:08+00:00"
1139 },
1140 {
1141 "name": "phpunit/php-text-template",
1142 "version": "1.2.1",
1143 "source": {
1144 "type": "git",
1145 "url": "https://github.com/sebastianbergmann/php-text-template.git",
1146 "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
1147 },
1148 "dist": {
1149 "type": "zip",
1150 "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
1151 "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
1152 "shasum": ""
1153 },
1154 "require": {
1155 "php": ">=5.3.3"
1156 },
1157 "type": "library",
1158 "autoload": {
1159 "classmap": [
1160 "src/"
1161 ]
1162 },
1163 "notification-url": "https://packagist.org/downloads/",
1164 "license": [
1165 "BSD-3-Clause"
1166 ],
1167 "authors": [
1168 {
1169 "name": "Sebastian Bergmann",
1170 "email": "sebastian@phpunit.de",
1171 "role": "lead"
1172 }
1173 ],
1174 "description": "Simple template engine.",
1175 "homepage": "https://github.com/sebastianbergmann/php-text-template/",
1176 "keywords": [
1177 "template"
1178 ],
1179 "time": "2015-06-21T13:50:34+00:00"
1180 },
1181 {
1182 "name": "phpunit/php-timer",
1183 "version": "1.0.9",
1184 "source": {
1185 "type": "git",
1186 "url": "https://github.com/sebastianbergmann/php-timer.git",
1187 "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
1188 },
1189 "dist": {
1190 "type": "zip",
1191 "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
1192 "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
1193 "shasum": ""
1194 },
1195 "require": {
1196 "php": "^5.3.3 || ^7.0"
1197 },
1198 "require-dev": {
1199 "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
1200 },
1201 "type": "library",
1202 "extra": {
1203 "branch-alias": {
1204 "dev-master": "1.0-dev"
1205 }
1206 },
1207 "autoload": {
1208 "classmap": [
1209 "src/"
1210 ]
1211 },
1212 "notification-url": "https://packagist.org/downloads/",
1213 "license": [
1214 "BSD-3-Clause"
1215 ],
1216 "authors": [
1217 {
1218 "name": "Sebastian Bergmann",
1219 "email": "sb@sebastian-bergmann.de",
1220 "role": "lead"
1221 }
1222 ],
1223 "description": "Utility class for timing",
1224 "homepage": "https://github.com/sebastianbergmann/php-timer/",
1225 "keywords": [
1226 "timer"
1227 ],
1228 "time": "2017-02-26T11:10:40+00:00"
1229 },
1230 {
1231 "name": "phpunit/php-token-stream",
1232 "version": "1.4.12",
1233 "source": {
1234 "type": "git",
1235 "url": "https://github.com/sebastianbergmann/php-token-stream.git",
1236 "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16"
1237 },
1238 "dist": {
1239 "type": "zip",
1240 "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16",
1241 "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16",
1242 "shasum": ""
1243 },
1244 "require": {
1245 "ext-tokenizer": "*",
1246 "php": ">=5.3.3"
1247 },
1248 "require-dev": {
1249 "phpunit/phpunit": "~4.2"
1250 },
1251 "type": "library",
1252 "extra": {
1253 "branch-alias": {
1254 "dev-master": "1.4-dev"
1255 }
1256 },
1257 "autoload": {
1258 "classmap": [
1259 "src/"
1260 ]
1261 },
1262 "notification-url": "https://packagist.org/downloads/",
1263 "license": [
1264 "BSD-3-Clause"
1265 ],
1266 "authors": [
1267 {
1268 "name": "Sebastian Bergmann",
1269 "email": "sebastian@phpunit.de"
1270 }
1271 ],
1272 "description": "Wrapper around PHP's tokenizer extension.",
1273 "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
1274 "keywords": [
1275 "tokenizer"
1276 ],
1277 "time": "2017-12-04T08:55:13+00:00"
1278 },
1279 {
1280 "name": "phpunit/phpcov",
1281 "version": "2.0.2",
1282 "source": {
1283 "type": "git",
1284 "url": "https://github.com/sebastianbergmann/phpcov.git",
1285 "reference": "9ef291483ff65eefd8639584d61bbfb044d747f3"
1286 },
1287 "dist": {
1288 "type": "zip",
1289 "url": "https://api.github.com/repos/sebastianbergmann/phpcov/zipball/9ef291483ff65eefd8639584d61bbfb044d747f3",
1290 "reference": "9ef291483ff65eefd8639584d61bbfb044d747f3",
1291 "shasum": ""
1292 },
1293 "require": {
1294 "php": ">=5.3.3",
1295 "phpunit/php-code-coverage": "~2.0",
1296 "phpunit/phpunit": ">=4.1",
1297 "sebastian/diff": "~1.1",
1298 "sebastian/finder-facade": "~1.1",
1299 "sebastian/version": "~1.0",
1300 "symfony/console": "~2.2"
1301 },
1302 "bin": [
1303 "phpcov"
1304 ],
1305 "type": "library",
1306 "extra": {
1307 "branch-alias": {
1308 "dev-master": "2.0.x-dev"
1309 }
1310 },
1311 "autoload": {
1312 "classmap": [
1313 "src/"
1314 ]
1315 },
1316 "notification-url": "https://packagist.org/downloads/",
1317 "license": [
1318 "BSD-3-Clause"
1319 ],
1320 "authors": [
1321 {
1322 "name": "Sebastian Bergmann",
1323 "email": "sebastian@phpunit.de",
1324 "role": "lead"
1325 }
1326 ],
1327 "description": "CLI frontend for PHP_CodeCoverage",
1328 "homepage": "https://github.com/sebastianbergmann/phpcov",
1329 "time": "2015-10-05T09:24:23+00:00"
1330 },
1331 {
1332 "name": "phpunit/phpunit",
1333 "version": "4.8.36",
1334 "source": {
1335 "type": "git",
1336 "url": "https://github.com/sebastianbergmann/phpunit.git",
1337 "reference": "46023de9a91eec7dfb06cc56cb4e260017298517"
1338 },
1339 "dist": {
1340 "type": "zip",
1341 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517",
1342 "reference": "46023de9a91eec7dfb06cc56cb4e260017298517",
1343 "shasum": ""
1344 },
1345 "require": {
1346 "ext-dom": "*",
1347 "ext-json": "*",
1348 "ext-pcre": "*",
1349 "ext-reflection": "*",
1350 "ext-spl": "*",
1351 "php": ">=5.3.3",
1352 "phpspec/prophecy": "^1.3.1",
1353 "phpunit/php-code-coverage": "~2.1",
1354 "phpunit/php-file-iterator": "~1.4",
1355 "phpunit/php-text-template": "~1.2",
1356 "phpunit/php-timer": "^1.0.6",
1357 "phpunit/phpunit-mock-objects": "~2.3",
1358 "sebastian/comparator": "~1.2.2",
1359 "sebastian/diff": "~1.2",
1360 "sebastian/environment": "~1.3",
1361 "sebastian/exporter": "~1.2",
1362 "sebastian/global-state": "~1.0",
1363 "sebastian/version": "~1.0",
1364 "symfony/yaml": "~2.1|~3.0"
1365 },
1366 "suggest": {
1367 "phpunit/php-invoker": "~1.1"
1368 },
1369 "bin": [
1370 "phpunit"
1371 ],
1372 "type": "library",
1373 "extra": {
1374 "branch-alias": {
1375 "dev-master": "4.8.x-dev"
1376 }
1377 },
1378 "autoload": {
1379 "classmap": [
1380 "src/"
1381 ]
1382 },
1383 "notification-url": "https://packagist.org/downloads/",
1384 "license": [
1385 "BSD-3-Clause"
1386 ],
1387 "authors": [
1388 {
1389 "name": "Sebastian Bergmann",
1390 "email": "sebastian@phpunit.de",
1391 "role": "lead"
1392 }
1393 ],
1394 "description": "The PHP Unit Testing framework.",
1395 "homepage": "https://phpunit.de/",
1396 "keywords": [
1397 "phpunit",
1398 "testing",
1399 "xunit"
1400 ],
1401 "time": "2017-06-21T08:07:12+00:00"
1402 },
1403 {
1404 "name": "phpunit/phpunit-mock-objects",
1405 "version": "2.3.8",
1406 "source": {
1407 "type": "git",
1408 "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
1409 "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
1410 },
1411 "dist": {
1412 "type": "zip",
1413 "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
1414 "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
1415 "shasum": ""
1416 },
1417 "require": {
1418 "doctrine/instantiator": "^1.0.2",
1419 "php": ">=5.3.3",
1420 "phpunit/php-text-template": "~1.2",
1421 "sebastian/exporter": "~1.2"
1422 },
1423 "require-dev": {
1424 "phpunit/phpunit": "~4.4"
1425 },
1426 "suggest": {
1427 "ext-soap": "*"
1428 },
1429 "type": "library",
1430 "extra": {
1431 "branch-alias": {
1432 "dev-master": "2.3.x-dev"
1433 }
1434 },
1435 "autoload": {
1436 "classmap": [
1437 "src/"
1438 ]
1439 },
1440 "notification-url": "https://packagist.org/downloads/",
1441 "license": [
1442 "BSD-3-Clause"
1443 ],
1444 "authors": [
1445 {
1446 "name": "Sebastian Bergmann",
1447 "email": "sb@sebastian-bergmann.de",
1448 "role": "lead"
1449 }
1450 ],
1451 "description": "Mock Object library for PHPUnit",
1452 "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
1453 "keywords": [
1454 "mock",
1455 "xunit"
1456 ],
1457 "time": "2015-10-02T06:51:40+00:00"
1458 },
1459 {
1460 "name": "sebastian/comparator",
1461 "version": "1.2.4",
1462 "source": {
1463 "type": "git",
1464 "url": "https://github.com/sebastianbergmann/comparator.git",
1465 "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
1466 },
1467 "dist": {
1468 "type": "zip",
1469 "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
1470 "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
1471 "shasum": ""
1472 },
1473 "require": {
1474 "php": ">=5.3.3",
1475 "sebastian/diff": "~1.2",
1476 "sebastian/exporter": "~1.2 || ~2.0"
1477 },
1478 "require-dev": {
1479 "phpunit/phpunit": "~4.4"
1480 },
1481 "type": "library",
1482 "extra": {
1483 "branch-alias": {
1484 "dev-master": "1.2.x-dev"
1485 }
1486 },
1487 "autoload": {
1488 "classmap": [
1489 "src/"
1490 ]
1491 },
1492 "notification-url": "https://packagist.org/downloads/",
1493 "license": [
1494 "BSD-3-Clause"
1495 ],
1496 "authors": [
1497 {
1498 "name": "Jeff Welch",
1499 "email": "whatthejeff@gmail.com"
1500 },
1501 {
1502 "name": "Volker Dusch",
1503 "email": "github@wallbash.com"
1504 },
1505 {
1506 "name": "Bernhard Schussek",
1507 "email": "bschussek@2bepublished.at"
1508 },
1509 {
1510 "name": "Sebastian Bergmann",
1511 "email": "sebastian@phpunit.de"
1512 }
1513 ],
1514 "description": "Provides the functionality to compare PHP values for equality",
1515 "homepage": "http://www.github.com/sebastianbergmann/comparator",
1516 "keywords": [
1517 "comparator",
1518 "compare",
1519 "equality"
1520 ],
1521 "time": "2017-01-29T09:50:25+00:00"
1522 },
1523 {
1524 "name": "sebastian/diff",
1525 "version": "1.4.3",
1526 "source": {
1527 "type": "git",
1528 "url": "https://github.com/sebastianbergmann/diff.git",
1529 "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
1530 },
1531 "dist": {
1532 "type": "zip",
1533 "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
1534 "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
1535 "shasum": ""
1536 },
1537 "require": {
1538 "php": "^5.3.3 || ^7.0"
1539 },
1540 "require-dev": {
1541 "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
1542 },
1543 "type": "library",
1544 "extra": {
1545 "branch-alias": {
1546 "dev-master": "1.4-dev"
1547 }
1548 },
1549 "autoload": {
1550 "classmap": [
1551 "src/"
1552 ]
1553 },
1554 "notification-url": "https://packagist.org/downloads/",
1555 "license": [
1556 "BSD-3-Clause"
1557 ],
1558 "authors": [
1559 {
1560 "name": "Kore Nordmann",
1561 "email": "mail@kore-nordmann.de"
1562 },
1563 {
1564 "name": "Sebastian Bergmann",
1565 "email": "sebastian@phpunit.de"
1566 }
1567 ],
1568 "description": "Diff implementation",
1569 "homepage": "https://github.com/sebastianbergmann/diff",
1570 "keywords": [
1571 "diff"
1572 ],
1573 "time": "2017-05-22T07:24:03+00:00"
1574 },
1575 {
1576 "name": "sebastian/environment",
1577 "version": "1.3.8",
1578 "source": {
1579 "type": "git",
1580 "url": "https://github.com/sebastianbergmann/environment.git",
1581 "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
1582 },
1583 "dist": {
1584 "type": "zip",
1585 "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
1586 "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
1587 "shasum": ""
1588 },
1589 "require": {
1590 "php": "^5.3.3 || ^7.0"
1591 },
1592 "require-dev": {
1593 "phpunit/phpunit": "^4.8 || ^5.0"
1594 },
1595 "type": "library",
1596 "extra": {
1597 "branch-alias": {
1598 "dev-master": "1.3.x-dev"
1599 }
1600 },
1601 "autoload": {
1602 "classmap": [
1603 "src/"
1604 ]
1605 },
1606 "notification-url": "https://packagist.org/downloads/",
1607 "license": [
1608 "BSD-3-Clause"
1609 ],
1610 "authors": [
1611 {
1612 "name": "Sebastian Bergmann",
1613 "email": "sebastian@phpunit.de"
1614 }
1615 ],
1616 "description": "Provides functionality to handle HHVM/PHP environments",
1617 "homepage": "http://www.github.com/sebastianbergmann/environment",
1618 "keywords": [
1619 "Xdebug",
1620 "environment",
1621 "hhvm"
1622 ],
1623 "time": "2016-08-18T05:49:44+00:00"
1624 },
1625 {
1626 "name": "sebastian/exporter",
1627 "version": "1.2.2",
1628 "source": {
1629 "type": "git",
1630 "url": "https://github.com/sebastianbergmann/exporter.git",
1631 "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
1632 },
1633 "dist": {
1634 "type": "zip",
1635 "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
1636 "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
1637 "shasum": ""
1638 },
1639 "require": {
1640 "php": ">=5.3.3",
1641 "sebastian/recursion-context": "~1.0"
1642 },
1643 "require-dev": {
1644 "ext-mbstring": "*",
1645 "phpunit/phpunit": "~4.4"
1646 },
1647 "type": "library",
1648 "extra": {
1649 "branch-alias": {
1650 "dev-master": "1.3.x-dev"
1651 }
1652 },
1653 "autoload": {
1654 "classmap": [
1655 "src/"
1656 ]
1657 },
1658 "notification-url": "https://packagist.org/downloads/",
1659 "license": [
1660 "BSD-3-Clause"
1661 ],
1662 "authors": [
1663 {
1664 "name": "Jeff Welch",
1665 "email": "whatthejeff@gmail.com"
1666 },
1667 {
1668 "name": "Volker Dusch",
1669 "email": "github@wallbash.com"
1670 },
1671 {
1672 "name": "Bernhard Schussek",
1673 "email": "bschussek@2bepublished.at"
1674 },
1675 {
1676 "name": "Sebastian Bergmann",
1677 "email": "sebastian@phpunit.de"
1678 },
1679 {
1680 "name": "Adam Harvey",
1681 "email": "aharvey@php.net"
1682 }
1683 ],
1684 "description": "Provides the functionality to export PHP variables for visualization",
1685 "homepage": "http://www.github.com/sebastianbergmann/exporter",
1686 "keywords": [
1687 "export",
1688 "exporter"
1689 ],
1690 "time": "2016-06-17T09:04:28+00:00"
1691 },
1692 {
1693 "name": "sebastian/finder-facade",
1694 "version": "1.2.2",
1695 "source": {
1696 "type": "git",
1697 "url": "https://github.com/sebastianbergmann/finder-facade.git",
1698 "reference": "4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f"
1699 },
1700 "dist": {
1701 "type": "zip",
1702 "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f",
1703 "reference": "4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f",
1704 "shasum": ""
1705 },
1706 "require": {
1707 "symfony/finder": "~2.3|~3.0|~4.0",
1708 "theseer/fdomdocument": "~1.3"
1709 },
1710 "type": "library",
1711 "autoload": {
1712 "classmap": [
1713 "src/"
1714 ]
1715 },
1716 "notification-url": "https://packagist.org/downloads/",
1717 "license": [
1718 "BSD-3-Clause"
1719 ],
1720 "authors": [
1721 {
1722 "name": "Sebastian Bergmann",
1723 "email": "sebastian@phpunit.de",
1724 "role": "lead"
1725 }
1726 ],
1727 "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.",
1728 "homepage": "https://github.com/sebastianbergmann/finder-facade",
1729 "time": "2017-11-18T17:31:49+00:00"
1730 },
1731 {
1732 "name": "sebastian/global-state",
1733 "version": "1.1.1",
1734 "source": {
1735 "type": "git",
1736 "url": "https://github.com/sebastianbergmann/global-state.git",
1737 "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
1738 },
1739 "dist": {
1740 "type": "zip",
1741 "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
1742 "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
1743 "shasum": ""
1744 },
1745 "require": {
1746 "php": ">=5.3.3"
1747 },
1748 "require-dev": {
1749 "phpunit/phpunit": "~4.2"
1750 },
1751 "suggest": {
1752 "ext-uopz": "*"
1753 },
1754 "type": "library",
1755 "extra": {
1756 "branch-alias": {
1757 "dev-master": "1.0-dev"
1758 }
1759 },
1760 "autoload": {
1761 "classmap": [
1762 "src/"
1763 ]
1764 },
1765 "notification-url": "https://packagist.org/downloads/",
1766 "license": [
1767 "BSD-3-Clause"
1768 ],
1769 "authors": [
1770 {
1771 "name": "Sebastian Bergmann",
1772 "email": "sebastian@phpunit.de"
1773 }
1774 ],
1775 "description": "Snapshotting of global state",
1776 "homepage": "http://www.github.com/sebastianbergmann/global-state",
1777 "keywords": [
1778 "global state"
1779 ],
1780 "time": "2015-10-12T03:26:01+00:00"
1781 },
1782 {
1783 "name": "sebastian/phpcpd",
1784 "version": "2.0.4",
1785 "source": {
1786 "type": "git",
1787 "url": "https://github.com/sebastianbergmann/phpcpd.git",
1788 "reference": "24d9a880deadb0b8c9680e9cfe78e30b704225db"
1789 },
1790 "dist": {
1791 "type": "zip",
1792 "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/24d9a880deadb0b8c9680e9cfe78e30b704225db",
1793 "reference": "24d9a880deadb0b8c9680e9cfe78e30b704225db",
1794 "shasum": ""
1795 },
1796 "require": {
1797 "php": ">=5.3.3",
1798 "phpunit/php-timer": ">=1.0.6",
1799 "sebastian/finder-facade": "~1.1",
1800 "sebastian/version": "~1.0|~2.0",
1801 "symfony/console": "~2.7|^3.0",
1802 "theseer/fdomdocument": "~1.4"
1803 },
1804 "bin": [
1805 "phpcpd"
1806 ],
1807 "type": "library",
1808 "extra": {
1809 "branch-alias": {
1810 "dev-master": "2.0-dev"
1811 }
1812 },
1813 "autoload": {
1814 "classmap": [
1815 "src/"
1816 ]
1817 },
1818 "notification-url": "https://packagist.org/downloads/",
1819 "license": [
1820 "BSD-3-Clause"
1821 ],
1822 "authors": [
1823 {
1824 "name": "Sebastian Bergmann",
1825 "email": "sebastian@phpunit.de",
1826 "role": "lead"
1827 }
1828 ],
1829 "description": "Copy/Paste Detector (CPD) for PHP code.",
1830 "homepage": "https://github.com/sebastianbergmann/phpcpd",
1831 "time": "2016-04-17T19:32:49+00:00"
1832 },
1833 {
1834 "name": "sebastian/recursion-context",
1835 "version": "1.0.5",
1836 "source": {
1837 "type": "git",
1838 "url": "https://github.com/sebastianbergmann/recursion-context.git",
1839 "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7"
1840 },
1841 "dist": {
1842 "type": "zip",
1843 "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7",
1844 "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7",
1845 "shasum": ""
1846 },
1847 "require": {
1848 "php": ">=5.3.3"
1849 },
1850 "require-dev": {
1851 "phpunit/phpunit": "~4.4"
1852 },
1853 "type": "library",
1854 "extra": {
1855 "branch-alias": {
1856 "dev-master": "1.0.x-dev"
1857 }
1858 },
1859 "autoload": {
1860 "classmap": [
1861 "src/"
1862 ]
1863 },
1864 "notification-url": "https://packagist.org/downloads/",
1865 "license": [
1866 "BSD-3-Clause"
1867 ],
1868 "authors": [
1869 {
1870 "name": "Jeff Welch",
1871 "email": "whatthejeff@gmail.com"
1872 },
1873 {
1874 "name": "Sebastian Bergmann",
1875 "email": "sebastian@phpunit.de"
1876 },
1877 {
1878 "name": "Adam Harvey",
1879 "email": "aharvey@php.net"
1880 }
1881 ],
1882 "description": "Provides functionality to recursively process PHP variables",
1883 "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
1884 "time": "2016-10-03T07:41:43+00:00"
1885 },
1886 {
1887 "name": "sebastian/version",
1888 "version": "1.0.6",
1889 "source": {
1890 "type": "git",
1891 "url": "https://github.com/sebastianbergmann/version.git",
1892 "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
1893 },
1894 "dist": {
1895 "type": "zip",
1896 "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
1897 "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
1898 "shasum": ""
1899 },
1900 "type": "library",
1901 "autoload": {
1902 "classmap": [
1903 "src/"
1904 ]
1905 },
1906 "notification-url": "https://packagist.org/downloads/",
1907 "license": [
1908 "BSD-3-Clause"
1909 ],
1910 "authors": [
1911 {
1912 "name": "Sebastian Bergmann",
1913 "email": "sebastian@phpunit.de",
1914 "role": "lead"
1915 }
1916 ],
1917 "description": "Library that helps with managing the version number of Git-hosted PHP projects",
1918 "homepage": "https://github.com/sebastianbergmann/version",
1919 "time": "2015-06-21T13:59:46+00:00"
1920 },
1921 {
1922 "name": "squizlabs/php_codesniffer",
1923 "version": "2.9.1",
1924 "source": {
1925 "type": "git",
1926 "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
1927 "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62"
1928 },
1929 "dist": {
1930 "type": "zip",
1931 "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62",
1932 "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62",
1933 "shasum": ""
1934 },
1935 "require": {
1936 "ext-simplexml": "*",
1937 "ext-tokenizer": "*",
1938 "ext-xmlwriter": "*",
1939 "php": ">=5.1.2"
1940 },
1941 "require-dev": {
1942 "phpunit/phpunit": "~4.0"
1943 },
1944 "bin": [
1945 "scripts/phpcs",
1946 "scripts/phpcbf"
1947 ],
1948 "type": "library",
1949 "extra": {
1950 "branch-alias": {
1951 "dev-master": "2.x-dev"
1952 }
1953 },
1954 "autoload": {
1955 "classmap": [
1956 "CodeSniffer.php",
1957 "CodeSniffer/CLI.php",
1958 "CodeSniffer/Exception.php",
1959 "CodeSniffer/File.php",
1960 "CodeSniffer/Fixer.php",
1961 "CodeSniffer/Report.php",
1962 "CodeSniffer/Reporting.php",
1963 "CodeSniffer/Sniff.php",
1964 "CodeSniffer/Tokens.php",
1965 "CodeSniffer/Reports/",
1966 "CodeSniffer/Tokenizers/",
1967 "CodeSniffer/DocGenerators/",
1968 "CodeSniffer/Standards/AbstractPatternSniff.php",
1969 "CodeSniffer/Standards/AbstractScopeSniff.php",
1970 "CodeSniffer/Standards/AbstractVariableSniff.php",
1971 "CodeSniffer/Standards/IncorrectPatternException.php",
1972 "CodeSniffer/Standards/Generic/Sniffs/",
1973 "CodeSniffer/Standards/MySource/Sniffs/",
1974 "CodeSniffer/Standards/PEAR/Sniffs/",
1975 "CodeSniffer/Standards/PSR1/Sniffs/",
1976 "CodeSniffer/Standards/PSR2/Sniffs/",
1977 "CodeSniffer/Standards/Squiz/Sniffs/",
1978 "CodeSniffer/Standards/Zend/Sniffs/"
1979 ]
1980 },
1981 "notification-url": "https://packagist.org/downloads/",
1982 "license": [
1983 "BSD-3-Clause"
1984 ],
1985 "authors": [
1986 {
1987 "name": "Greg Sherwood",
1988 "role": "lead"
1989 }
1990 ],
1991 "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
1992 "homepage": "http://www.squizlabs.com/php-codesniffer",
1993 "keywords": [
1994 "phpcs",
1995 "standards"
1996 ],
1997 "time": "2017-05-22T02:43:20+00:00"
1998 },
1999 {
2000 "name": "symfony/config",
2001 "version": "v3.4.4",
2002 "source": {
2003 "type": "git",
2004 "url": "https://github.com/symfony/config.git",
2005 "reference": "72689b934d6c6ecf73eca874e98933bf055313c9"
2006 },
2007 "dist": {
2008 "type": "zip",
2009 "url": "https://api.github.com/repos/symfony/config/zipball/72689b934d6c6ecf73eca874e98933bf055313c9",
2010 "reference": "72689b934d6c6ecf73eca874e98933bf055313c9",
2011 "shasum": ""
2012 },
2013 "require": {
2014 "php": "^5.5.9|>=7.0.8",
2015 "symfony/filesystem": "~2.8|~3.0|~4.0"
2016 },
2017 "conflict": {
2018 "symfony/dependency-injection": "<3.3",
2019 "symfony/finder": "<3.3"
2020 },
2021 "require-dev": {
2022 "symfony/dependency-injection": "~3.3|~4.0",
2023 "symfony/finder": "~3.3|~4.0",
2024 "symfony/yaml": "~3.0|~4.0"
2025 },
2026 "suggest": {
2027 "symfony/yaml": "To use the yaml reference dumper"
2028 },
2029 "type": "library",
2030 "extra": {
2031 "branch-alias": {
2032 "dev-master": "3.4-dev"
2033 }
2034 },
2035 "autoload": {
2036 "psr-4": {
2037 "Symfony\\Component\\Config\\": ""
2038 },
2039 "exclude-from-classmap": [
2040 "/Tests/"
2041 ]
2042 },
2043 "notification-url": "https://packagist.org/downloads/",
2044 "license": [
2045 "MIT"
2046 ],
2047 "authors": [
2048 {
2049 "name": "Fabien Potencier",
2050 "email": "fabien@symfony.com"
2051 },
2052 {
2053 "name": "Symfony Community",
2054 "homepage": "https://symfony.com/contributors"
2055 }
2056 ],
2057 "description": "Symfony Config Component",
2058 "homepage": "https://symfony.com",
2059 "time": "2018-01-21T19:05:02+00:00"
2060 },
2061 {
2062 "name": "symfony/console",
2063 "version": "v2.8.34",
2064 "source": {
2065 "type": "git",
2066 "url": "https://github.com/symfony/console.git",
2067 "reference": "162ca7d0ea597599967aa63b23418e747da0896b"
2068 },
2069 "dist": {
2070 "type": "zip",
2071 "url": "https://api.github.com/repos/symfony/console/zipball/162ca7d0ea597599967aa63b23418e747da0896b",
2072 "reference": "162ca7d0ea597599967aa63b23418e747da0896b",
2073 "shasum": ""
2074 },
2075 "require": {
2076 "php": ">=5.3.9",
2077 "symfony/debug": "^2.7.2|~3.0.0",
2078 "symfony/polyfill-mbstring": "~1.0"
2079 },
2080 "require-dev": {
2081 "psr/log": "~1.0",
2082 "symfony/event-dispatcher": "~2.1|~3.0.0",
2083 "symfony/process": "~2.1|~3.0.0"
2084 },
2085 "suggest": {
2086 "psr/log": "For using the console logger",
2087 "symfony/event-dispatcher": "",
2088 "symfony/process": ""
2089 },
2090 "type": "library",
2091 "extra": {
2092 "branch-alias": {
2093 "dev-master": "2.8-dev"
2094 }
2095 },
2096 "autoload": {
2097 "psr-4": {
2098 "Symfony\\Component\\Console\\": ""
2099 },
2100 "exclude-from-classmap": [
2101 "/Tests/"
2102 ]
2103 },
2104 "notification-url": "https://packagist.org/downloads/",
2105 "license": [
2106 "MIT"
2107 ],
2108 "authors": [
2109 {
2110 "name": "Fabien Potencier",
2111 "email": "fabien@symfony.com"
2112 },
2113 {
2114 "name": "Symfony Community",
2115 "homepage": "https://symfony.com/contributors"
2116 }
2117 ],
2118 "description": "Symfony Console Component",
2119 "homepage": "https://symfony.com",
2120 "time": "2018-01-29T08:54:45+00:00"
2121 },
2122 {
2123 "name": "symfony/debug",
2124 "version": "v3.0.9",
2125 "source": {
2126 "type": "git",
2127 "url": "https://github.com/symfony/debug.git",
2128 "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a"
2129 },
2130 "dist": {
2131 "type": "zip",
2132 "url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a",
2133 "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a",
2134 "shasum": ""
2135 },
2136 "require": {
2137 "php": ">=5.5.9",
2138 "psr/log": "~1.0"
2139 },
2140 "conflict": {
2141 "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
2142 },
2143 "require-dev": {
2144 "symfony/class-loader": "~2.8|~3.0",
2145 "symfony/http-kernel": "~2.8|~3.0"
2146 },
2147 "type": "library",
2148 "extra": {
2149 "branch-alias": {
2150 "dev-master": "3.0-dev"
2151 }
2152 },
2153 "autoload": {
2154 "psr-4": {
2155 "Symfony\\Component\\Debug\\": ""
2156 },
2157 "exclude-from-classmap": [
2158 "/Tests/"
2159 ]
2160 },
2161 "notification-url": "https://packagist.org/downloads/",
2162 "license": [
2163 "MIT"
2164 ],
2165 "authors": [
2166 {
2167 "name": "Fabien Potencier",
2168 "email": "fabien@symfony.com"
2169 },
2170 {
2171 "name": "Symfony Community",
2172 "homepage": "https://symfony.com/contributors"
2173 }
2174 ],
2175 "description": "Symfony Debug Component",
2176 "homepage": "https://symfony.com",
2177 "time": "2016-07-30T07:22:48+00:00"
2178 },
2179 {
2180 "name": "symfony/dependency-injection",
2181 "version": "v3.3.16",
2182 "source": {
2183 "type": "git",
2184 "url": "https://github.com/symfony/dependency-injection.git",
2185 "reference": "54243abc4e1a1a15e274e391bd6f7090b44711f1"
2186 },
2187 "dist": {
2188 "type": "zip",
2189 "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/54243abc4e1a1a15e274e391bd6f7090b44711f1",
2190 "reference": "54243abc4e1a1a15e274e391bd6f7090b44711f1",
2191 "shasum": ""
2192 },
2193 "require": {
2194 "php": "^5.5.9|>=7.0.8",
2195 "psr/container": "^1.0"
2196 },
2197 "conflict": {
2198 "symfony/config": "<3.3.7",
2199 "symfony/finder": "<3.3",
2200 "symfony/yaml": "<3.3"
2201 },
2202 "provide": {
2203 "psr/container-implementation": "1.0"
2204 },
2205 "require-dev": {
2206 "symfony/config": "~3.3",
2207 "symfony/expression-language": "~2.8|~3.0",
2208 "symfony/yaml": "~3.3"
2209 },
2210 "suggest": {
2211 "symfony/config": "",
2212 "symfony/expression-language": "For using expressions in service container configuration",
2213 "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required",
2214 "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
2215 "symfony/yaml": ""
2216 },
2217 "type": "library",
2218 "extra": {
2219 "branch-alias": {
2220 "dev-master": "3.3-dev"
2221 }
2222 },
2223 "autoload": {
2224 "psr-4": {
2225 "Symfony\\Component\\DependencyInjection\\": ""
2226 },
2227 "exclude-from-classmap": [
2228 "/Tests/"
2229 ]
2230 },
2231 "notification-url": "https://packagist.org/downloads/",
2232 "license": [
2233 "MIT"
2234 ],
2235 "authors": [
2236 {
2237 "name": "Fabien Potencier",
2238 "email": "fabien@symfony.com"
2239 },
2240 {
2241 "name": "Symfony Community",
2242 "homepage": "https://symfony.com/contributors"
2243 }
2244 ],
2245 "description": "Symfony DependencyInjection Component",
2246 "homepage": "https://symfony.com",
2247 "time": "2018-01-29T09:02:23+00:00"
2248 },
2249 {
2250 "name": "symfony/filesystem",
2251 "version": "v3.4.4",
2252 "source": {
2253 "type": "git",
2254 "url": "https://github.com/symfony/filesystem.git",
2255 "reference": "e078773ad6354af38169faf31c21df0f18ace03d"
2256 },
2257 "dist": {
2258 "type": "zip",
2259 "url": "https://api.github.com/repos/symfony/filesystem/zipball/e078773ad6354af38169faf31c21df0f18ace03d",
2260 "reference": "e078773ad6354af38169faf31c21df0f18ace03d",
2261 "shasum": ""
2262 },
2263 "require": {
2264 "php": "^5.5.9|>=7.0.8"
2265 },
2266 "type": "library",
2267 "extra": {
2268 "branch-alias": {
2269 "dev-master": "3.4-dev"
2270 }
2271 },
2272 "autoload": {
2273 "psr-4": {
2274 "Symfony\\Component\\Filesystem\\": ""
2275 },
2276 "exclude-from-classmap": [
2277 "/Tests/"
2278 ]
2279 },
2280 "notification-url": "https://packagist.org/downloads/",
2281 "license": [
2282 "MIT"
2283 ],
2284 "authors": [
2285 {
2286 "name": "Fabien Potencier",
2287 "email": "fabien@symfony.com"
2288 },
2289 {
2290 "name": "Symfony Community",
2291 "homepage": "https://symfony.com/contributors"
2292 }
2293 ],
2294 "description": "Symfony Filesystem Component",
2295 "homepage": "https://symfony.com",
2296 "time": "2018-01-03T07:37:34+00:00"
2297 },
2298 {
2299 "name": "symfony/finder",
2300 "version": "v3.4.4",
2301 "source": {
2302 "type": "git",
2303 "url": "https://github.com/symfony/finder.git",
2304 "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f"
2305 },
2306 "dist": {
2307 "type": "zip",
2308 "url": "https://api.github.com/repos/symfony/finder/zipball/613e26310776f49a1773b6737c6bd554b8bc8c6f",
2309 "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f",
2310 "shasum": ""
2311 },
2312 "require": {
2313 "php": "^5.5.9|>=7.0.8"
2314 },
2315 "type": "library",
2316 "extra": {
2317 "branch-alias": {
2318 "dev-master": "3.4-dev"
2319 }
2320 },
2321 "autoload": {
2322 "psr-4": {
2323 "Symfony\\Component\\Finder\\": ""
2324 },
2325 "exclude-from-classmap": [
2326 "/Tests/"
2327 ]
2328 },
2329 "notification-url": "https://packagist.org/downloads/",
2330 "license": [
2331 "MIT"
2332 ],
2333 "authors": [
2334 {
2335 "name": "Fabien Potencier",
2336 "email": "fabien@symfony.com"
2337 },
2338 {
2339 "name": "Symfony Community",
2340 "homepage": "https://symfony.com/contributors"
2341 }
2342 ],
2343 "description": "Symfony Finder Component",
2344 "homepage": "https://symfony.com",
2345 "time": "2018-01-03T07:37:34+00:00"
2346 },
2347 {
2348 "name": "symfony/polyfill-mbstring",
2349 "version": "v1.6.0",
2350 "source": {
2351 "type": "git",
2352 "url": "https://github.com/symfony/polyfill-mbstring.git",
2353 "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296"
2354 },
2355 "dist": {
2356 "type": "zip",
2357 "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
2358 "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
2359 "shasum": ""
2360 },
2361 "require": {
2362 "php": ">=5.3.3"
2363 },
2364 "suggest": {
2365 "ext-mbstring": "For best performance"
2366 },
2367 "type": "library",
2368 "extra": {
2369 "branch-alias": {
2370 "dev-master": "1.6-dev"
2371 }
2372 },
2373 "autoload": {
2374 "psr-4": {
2375 "Symfony\\Polyfill\\Mbstring\\": ""
2376 },
2377 "files": [
2378 "bootstrap.php"
2379 ]
2380 },
2381 "notification-url": "https://packagist.org/downloads/",
2382 "license": [
2383 "MIT"
2384 ],
2385 "authors": [
2386 {
2387 "name": "Nicolas Grekas",
2388 "email": "p@tchwork.com"
2389 },
2390 {
2391 "name": "Symfony Community",
2392 "homepage": "https://symfony.com/contributors"
2393 }
2394 ],
2395 "description": "Symfony polyfill for the Mbstring extension",
2396 "homepage": "https://symfony.com",
2397 "keywords": [
2398 "compatibility",
2399 "mbstring",
2400 "polyfill",
2401 "portable",
2402 "shim"
2403 ],
2404 "time": "2017-10-11T12:05:26+00:00"
2405 },
2406 {
2407 "name": "symfony/yaml",
2408 "version": "v3.3.16",
2409 "source": {
2410 "type": "git",
2411 "url": "https://github.com/symfony/yaml.git",
2412 "reference": "af615970e265543a26ee712c958404eb9b7ac93d"
2413 },
2414 "dist": {
2415 "type": "zip",
2416 "url": "https://api.github.com/repos/symfony/yaml/zipball/af615970e265543a26ee712c958404eb9b7ac93d",
2417 "reference": "af615970e265543a26ee712c958404eb9b7ac93d",
2418 "shasum": ""
2419 },
2420 "require": {
2421 "php": "^5.5.9|>=7.0.8"
2422 },
2423 "require-dev": {
2424 "symfony/console": "~2.8|~3.0"
2425 },
2426 "suggest": {
2427 "symfony/console": "For validating YAML files using the lint command"
2428 },
2429 "type": "library",
2430 "extra": {
2431 "branch-alias": {
2432 "dev-master": "3.3-dev"
2433 }
2434 },
2435 "autoload": {
2436 "psr-4": {
2437 "Symfony\\Component\\Yaml\\": ""
2438 },
2439 "exclude-from-classmap": [
2440 "/Tests/"
2441 ]
2442 },
2443 "notification-url": "https://packagist.org/downloads/",
2444 "license": [
2445 "MIT"
2446 ],
2447 "authors": [
2448 {
2449 "name": "Fabien Potencier",
2450 "email": "fabien@symfony.com"
2451 },
2452 {
2453 "name": "Symfony Community",
2454 "homepage": "https://symfony.com/contributors"
2455 }
2456 ],
2457 "description": "Symfony Yaml Component",
2458 "homepage": "https://symfony.com",
2459 "time": "2018-01-20T15:04:53+00:00"
2460 },
2461 {
2462 "name": "theseer/fdomdocument",
2463 "version": "1.6.6",
2464 "source": {
2465 "type": "git",
2466 "url": "https://github.com/theseer/fDOMDocument.git",
2467 "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca"
2468 },
2469 "dist": {
2470 "type": "zip",
2471 "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/6e8203e40a32a9c770bcb62fe37e68b948da6dca",
2472 "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca",
2473 "shasum": ""
2474 },
2475 "require": {
2476 "ext-dom": "*",
2477 "lib-libxml": "*",
2478 "php": ">=5.3.3"
2479 },
2480 "type": "library",
2481 "autoload": {
2482 "classmap": [
2483 "src/"
2484 ]
2485 },
2486 "notification-url": "https://packagist.org/downloads/",
2487 "license": [
2488 "BSD-3-Clause"
2489 ],
2490 "authors": [
2491 {
2492 "name": "Arne Blankerts",
2493 "email": "arne@blankerts.de",
2494 "role": "lead"
2495 }
2496 ],
2497 "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.",
2498 "homepage": "https://github.com/theseer/fDOMDocument",
2499 "time": "2017-06-30T11:53:12+00:00"
2500 },
2501 {
2502 "name": "webmozart/assert",
2503 "version": "1.3.0",
2504 "source": {
2505 "type": "git",
2506 "url": "https://github.com/webmozart/assert.git",
2507 "reference": "0df1908962e7a3071564e857d86874dad1ef204a"
2508 },
2509 "dist": {
2510 "type": "zip",
2511 "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a",
2512 "reference": "0df1908962e7a3071564e857d86874dad1ef204a",
2513 "shasum": ""
2514 },
2515 "require": {
2516 "php": "^5.3.3 || ^7.0"
2517 },
2518 "require-dev": {
2519 "phpunit/phpunit": "^4.6",
2520 "sebastian/version": "^1.0.1"
2521 },
2522 "type": "library",
2523 "extra": {
2524 "branch-alias": {
2525 "dev-master": "1.3-dev"
2526 }
2527 },
2528 "autoload": {
2529 "psr-4": {
2530 "Webmozart\\Assert\\": "src/"
2531 }
2532 },
2533 "notification-url": "https://packagist.org/downloads/",
2534 "license": [
2535 "MIT"
2536 ],
2537 "authors": [
2538 {
2539 "name": "Bernhard Schussek",
2540 "email": "bschussek@gmail.com"
2541 }
2542 ],
2543 "description": "Assertions to validate method input/output with nice error messages.",
2544 "keywords": [
2545 "assert",
2546 "check",
2547 "validate"
2548 ],
2549 "time": "2018-01-29T19:49:41+00:00"
2550 }
2551 ],
2552 "aliases": [],
2553 "minimum-stability": "stable",
2554 "stability-flags": {
2555 "pubsubhubbub/publisher": 20,
2556 "phpmd/phpmd": 0
2557 },
2558 "prefer-stable": false,
2559 "prefer-lowest": false,
2560 "platform": {
2561 "php": ">=5.5"
2562 },
2563 "platform-dev": [],
2564 "platform-overrides": {
2565 "php": "5.5.38"
2566 }
2567}
diff --git a/data/.htaccess b/data/.htaccess
index f601c1ee..1d49da37 100644
--- a/data/.htaccess
+++ b/data/.htaccess
@@ -1,10 +1,16 @@
1<IfModule version_module> 1<IfModule version_module>
2 <IfVersion >= 2.4> 2 <IfVersion >= 2.4>
3 Require all denied 3 Require all denied
4 <Files "user.css">
5 Require all granted
6 </Files>
4 </IfVersion> 7 </IfVersion>
5 <IfVersion < 2.4> 8 <IfVersion < 2.4>
6 Allow from none 9 Allow from none
7 Deny from all 10 Deny from all
11 <Files "user.css">
12 Allow from all
13 </Files>
8 </IfVersion> 14 </IfVersion>
9</IfModule> 15</IfModule>
10 16
diff --git a/doc/3rd-party-libraries.html b/doc/3rd-party-libraries.html
deleted file mode 100644
index 946ca037..00000000
--- a/doc/3rd-party-libraries.html
+++ /dev/null
@@ -1,86 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – 3rd party libraries</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="rd-party-libraries">3rd party libraries</h1>
66<h2 id="css">CSS</h2>
67<ul>
68<li>Yahoo UI <a href="http://yuilibrary.com/yui/docs/cssreset/">CSS Reset</a><a href=".html"></a>
69<ul>
70<li>resets default CSS properties for all HTML elements (overriding browsers' default values)</li>
71<li>ensures custom CSS stylessheets will provide the same results on all browsers</li>
72</ul></li>
73</ul>
74<h2 id="javascript">Javascript</h2>
75<ul>
76<li><a href="https://leaverou.github.io/awesomplete/">Awesomeplete</a> (<a href="https://github.com/LeaVerou/awesomplete">GitHub</a>) - autocompletion in input forms<a href=".html"></a></li>
77<li><a href="http://dinbror.dk/blazy/">bLazy</a> (<a href="https://github.com/dinbror/blazy">GitHub</a>) - lazy loading for thumbnails<a href=".html"></a></li>
78<li><a href="http://neocotic.com/qr.js/">qr.js</a> (<a href="https://github.com/neocotic/qr.js">GitHub</a>) - QR code generation<a href=".html"></a></li>
79</ul>
80<h2 id="php">PHP</h2>
81<ul>
82<li><a href="https://github.com/shaarli/netscape-bookmark-parser">shaarli/netscape-bookmark-parser</a> - Netscape bookmark parser<a href=".html"></a></li>
83<li><a href="https://github.com/rainphp/raintpl">RainTPL</a> - HTML templating for PHP<a href=".html"></a></li>
84</ul>
85</body>
86</html>
diff --git a/doc/Backup,-restore,-import-and-export.html b/doc/Backup,-restore,-import-and-export.html
deleted file mode 100644
index a4a48ad7..00000000
--- a/doc/Backup,-restore,-import-and-export.html
+++ /dev/null
@@ -1,150 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Backup, restore, import and export</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="backup-restore-import-and-export">Backup, restore, import and export</h1>
103<ul>
104<li><a href="#backup-and-restore-the-datastore-file">Backup and restore the datastore file</a><a href=".html"></a></li>
105<li><a href="#export-links-as">Export links as...</a><a href=".html"></a></li>
106<li><a href="#import-links-from">Import links from...</a><a href=".html"></a></li>
107<li><a href="#import-shaarli-links-to-firefox">Import Shaarli links to Firefox</a><a href=".html"></a></li>
108</ul>
109<hr />
110<h2 id="backup-and-restore-the-datastore-file">Backup and restore the datastore file</h2>
111<p>Backup the file <code>data/datastore.php</code> (by FTP or SSH). Restore by putting the file back in place.</p>
112<p>Example command:</p>
113<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">rsync</span> -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-<span class="va">$(</span><span class="fu">date</span> +%Y-%m-%d_%H%M<span class="va">)</span>.php</code></pre></div>
114<h2 id="export-links-as...">Export links as...</h2>
115<p>To export links as an HTML file, under <em>Tools &gt; Export</em>, choose:</p>
116<ul>
117<li><em>Export all</em> to export both public and private links</li>
118<li><em>Export public</em> to export public links only</li>
119<li><em>Export private</em> to export private links only</li>
120</ul>
121<p>Restore by using the <code>Import</code> feature.</p>
122<ul>
123<li>This can be done using the <a href="https://github.com/nodiscc/shaarchiver">shaarchiver</a> tool.<a href=".html"></a></li>
124</ul>
125<p>Example command:</p>
126<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">./export-bookmarks.py</span> --url=https://my.server.com/shaarli --username=myusername --password=mysupersecretpassword --download-dir=./ --type=all</code></pre></div>
127<h2 id="import-links-from...">Import links from...</h2>
128<h3 id="diigo">Diigo</h3>
129<p>If you export your bookmark from Diigo, make sure you use the Delicious export, not the Netscape export. (Their Netscape export is broken, and they don't seem to be interested in fixing it.)</p>
130<h3 id="mister-wong">Mister Wong</h3>
131<p>See <a href="https://github.com/sebsauvage/Shaarli/issues/146">this issue</a> for import tweaks.<a href=".html"></a></p>
132<h3 id="semanticscuttle">SemanticScuttle</h3>
133<p>To correctly import the tags from a <a href="http://semanticscuttle.sourceforge.net/">SemanticScuttle</a> HTML export, edit the HTML file before importing and replace all occurences of <code>tags=</code> (lowercase) to <code>TAGS=</code> (uppercase).<a href=".html"></a></p>
134<h3 id="scuttle">Scuttle</h3>
135<p>Shaarli cannot import data directly from <a href="https://github.com/scronide/scuttle">Scuttle</a>. However, you can use this third party tool: <a href="https://github.com/q2apro/scuttle-to-shaarli" class="uri">https://github.com/q2apro/scuttle-to-shaarli</a> to export the Scuttle database to the Netscape HTML format compatible with the Shaarli importer.<a href=".html"></a></p>
136<h2 id="import-shaarli-links-to-firefox">Import Shaarli links to Firefox</h2>
137<ul>
138<li>Export your Shaarli links as described above.</li>
139<li>For compatibility reasons, check <code>Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)</code></li>
140<li>In Firefox, open the bookmark manager (not the sidebar! <code>Bookmarks menu &gt; Show all bookmarks</code> or <code>Ctrl+Shift+B</code>)</li>
141<li>Select <code>Import and Backup &gt; Import bookmarks in HTML format</code></li>
142</ul>
143<p>Your bookmarks will be imported in Firefox, ready to use, with tags and descriptions retained. &quot;Self&quot; (notes) shaares will still point to the Shaarli instance you exported them from, but the note text can be viewed directly in the bookmark properties inside your browser. Depending on the number of bookmarks, the import can take some time.</p>
144<p>You may be interested in these Firefox addons to manage links imported from Shaarli</p>
145<ul>
146<li><a href="https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/">Bookmark Deduplicator</a> - provides an easy way to deduplicate your bookmarks<a href=".html"></a></li>
147<li><a href="https://addons.mozilla.org/en-US/firefox/addon/tagsieve/">TagSieve</a> - browse your bookmarks by their tags<a href=".html"></a></li>
148</ul>
149</body>
150</html>
diff --git a/doc/Browsing-and-searching.html b/doc/Browsing-and-searching.html
deleted file mode 100644
index 23001bcb..00000000
--- a/doc/Browsing-and-searching.html
+++ /dev/null
@@ -1,81 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Browsing and searching</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="browsing-and-searching">Browsing and searching</h1>
66<h1 id="browsing-and-searching-1">Browsing and Searching</h1>
67<p>Status: DRAFT</p>
68<p><embed src="(http://pix.toile-libre.org/upload/original/1455571378.png).html" /></p>
69<h2 id="plain-text-search">Plain text search</h2>
70<p>Use the <code>Search text</code> field to search in <em>any</em> of the fields of all links (Title, URL, Description...)</p>
71<p><strong>Exclude text/tags:</strong> Use the <code>-</code> operator before a word or tag (example <code>-uninteresting</code>) to prevent entries containing (or tagged) <code>uninteresting</code> from showing up in the search results.</p>
72<p><strong>Exact text search:</strong> Use double-quotes (example <code>&quot;exact search&quot;</code>) to search for the exact expression.</p>
73<p>Both exclude patterns and exact searches can be combined with normal searches (example <code>&quot;exact search&quot; term otherterm -notthis &quot;very exact&quot; stuff -notagain</code>)</p>
74<h2 id="tags-search">Tags search</h2>
75<p>Use the <code>Filter by tags</code> field to restrict displayed links to entries tagged with one or multiple tags (use space to separate tags).</p>
76<p><strong>Hidden tags:</strong> Tags starting with a dot <code>.</code> (example <code>.secret</code>) are private. They can only be seen and searched when logged in.</p>
77<p>Alternatively you can use the <code>Tag cloud</code> to discover all tags and click on any of them to display related links.</p>
78<h2 id="filtering-rss-feedspicture-wall">Filtering RSS feeds/Picture wall</h2>
79<p>RSS feeds can also be restricted to only return items matching a text/tag search: see <a href="RSS-feeds.html">RSS feeds</a>.</p>
80</body>
81</html>
diff --git a/doc/Browsing-and-searching.md b/doc/Browsing-and-searching.md
deleted file mode 100644
index 187fe447..00000000
--- a/doc/Browsing-and-searching.md
+++ /dev/null
@@ -1,28 +0,0 @@
1#Browsing and searching
2# Browsing and Searching
3
4Status: DRAFT
5
6![(http://pix.toile-libre.org/upload/original/1455571378.png)]((http://pix.toile-libre.org/upload/original/1455571378.png).html)
7
8## Plain text search
9
10Use the `Search text` field to search in _any_ of the fields of all links (Title, URL, Description...)
11
12**Exclude text/tags:** Use the `-` operator before a word or tag (example `-uninteresting`) to prevent entries containing (or tagged) `uninteresting` from showing up in the search results.
13
14**Exact text search:** Use double-quotes (example `"exact search"`) to search for the exact expression.
15
16Both exclude patterns and exact searches can be combined with normal searches (example `"exact search" term otherterm -notthis "very exact" stuff -notagain`)
17
18## Tags search
19
20Use the `Filter by tags` field to restrict displayed links to entries tagged with one or multiple tags (use space to separate tags).
21
22**Hidden tags:** Tags starting with a dot `.` (example `.secret`) are private. They can only be seen and searched when logged in.
23
24Alternatively you can use the `Tag cloud` to discover all tags and click on any of them to display related links.
25
26## Filtering RSS feeds/Picture wall
27
28RSS feeds can also be restricted to only return items matching a text/tag search: see [RSS feeds](RSS-feeds.html).
diff --git a/doc/Coding-guidelines.html b/doc/Coding-guidelines.html
deleted file mode 100644
index 1a2a9351..00000000
--- a/doc/Coding-guidelines.html
+++ /dev/null
@@ -1,73 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Coding guidelines</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="coding-guidelines">Coding guidelines</h1>
66<h2 id="wip">WIP</h2>
67<p>This topic is currently being discussed here:</p>
68<ul>
69<li><a href="https://github.com/shaarli/Shaarli/issues/95">Fix coding style (static analysis)</a> (#95)<a href=".html"></a></li>
70<li><a href="https://github.com/shaarli/Shaarli/issues/130">Continuous Integration tools &amp; features</a> (#130)<a href=".html"></a></li>
71</ul>
72</body>
73</html>
diff --git a/doc/Coding-guidelines.md b/doc/Coding-guidelines.md
deleted file mode 100644
index 1fb28a5b..00000000
--- a/doc/Coding-guidelines.md
+++ /dev/null
@@ -1,5 +0,0 @@
1#Coding guidelines
2## WIP
3This topic is currently being discussed here:
4- [Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95) (#95)[](.html)
5- [Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) (#130)[](.html)
diff --git a/doc/Community-&-Related-software.html b/doc/Community-&-Related-software.html
deleted file mode 100644
index cbc73d54..00000000
--- a/doc/Community-&-Related-software.html
+++ /dev/null
@@ -1,121 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Community & Related software</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="community-related-software">Community &amp; Related software</h1>
66<p><em>Unofficial but related work on Shaarli. If you maintain one of these, please get in touch with us to help us find a way to adapt your work to our fork.</em></p>
67<p><em>TODO: contact repos owners to see if they'd like to standardize their work with the community fork.</em></p>
68<h2 id="community">Community</h2>
69<ul>
70<li><a href="http://sebsauvage.net/links/">Liens en vrac de sebsauvage</a> - the original Shaarli<a href=".html"></a></li>
71<li><a href="http://porneia.free.fr/pub/links/ou-est-shaarli.html">A large list of Shaarlis</a><a href=".html"></a></li>
72<li><a href="https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json">A list of working Shaarli aggregators</a><a href=".html"></a></li>
73<li><a href="https://github.com/Oros42/shaarlis_list">A list of some known Shaarlis</a><a href=".html"></a></li>
74<li><a href="http://sebsauvage.net/rhaa/index.php?2011/09/16/09/29/58-adieu-delicious-diigo-et-stumbleupon-salut-shaarli-">Adieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net</a> (fr) <em>16/09/2011 - the original post about Shaarli</em><a href=".html"></a></li>
75<li><a href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas">Original ideas/fixme/TODO page</a><a href=".html"></a></li>
76<li><a href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion">Original discussion page</a> (fr)<a href=".html"></a></li>
77<li><a href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history">Original revisions history</a><a href=".html"></a></li>
78<li><a href="https://www.shaarli.fr/my.php">Shaarli.fr/my</a> - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of <a href="https://github.com/DMeloni">DMeloni</a><a href=".html"></a></li>
79</ul>
80<h3 id="third-party-plugins">Third party plugins</h3>
81<ul>
82<li><a href="https://github.com/kalvn/shaarli-plugin-autosave">autosave</a> by <a href="https://github.com/kalvn">@kalvn</a>: Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.<a href=".html"></a></li>
83<li><a href="https://github.com/ArthurHoaro/code-coloration">Code Coloration</a> by <a href="https://github.com/ArthurHoaro">@ArthurHoaro</a>: client side code syntax highlighter.<a href=".html"></a></li>
84<li><a href="https://github.com/kalvn/shaarli-plugin-disqus">Disqus</a> by <a href="https://github.com/kalvn">@kalvn</a>: Adds Disqus comment system to your Shaarli.<a href=".html"></a></li>
85<li><a href="https://github.com/NerosTie/emojione">emojione</a> by <a href="https://github.com/NerosTie">@NerosTie</a>: Add colorful emojis to your Shaarli.<a href=".html"></a></li>
86<li><a href="https://github.com/ArthurHoaro/launch-plugin">launch</a> - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.<a href=".html"></a></li>
87<li><a href="https://github.com/alexisju/social">social</a> by <a href="https://github.com/alexisju">@alexisju</a>: share links to social networks.<a href=".html"></a></li>
88<li><a href="https://github.com/ArthurHoaro/shaarli2twitter">shaarli2twitter</a> by <a href="https://github.com/ArthurHoaro">@ArthurHoaro</a> - Automatically tweet your shared links from Shaarli<a href=".html"></a></li>
89</ul>
90<h3 id="themes">Themes</h3>
91<p>See <a href="Theming.html">Theming</a> for the list of community-contributed themes, and an installation guide.</p>
92<h3 id="server-apps">Server apps</h3>
93<ul>
94<li><a href="https://github.com/nodiscc/shaarchiver">shaarchiver</a> - Archive your Shaarli bookmarks and their content<a href=".html"></a></li>
95<li><a href="https://github.com/mknexen/shaarli-river">shaarli-river</a> - An aggregator for shaarlis with many features <a href=".html"></a></li>
96<li><a href="https://github.com/DMeloni/shaarlo">Shaarlo</a> - An aggregator for shaarlis with many features (a very popular running instance among french shaarliers: <a href="http://shaarli.fr/">shaarli.fr</a>)<a href=".html"></a></li>
97<li><a href="https://github.com/BoboTiG/shaarlimages">Shaarlimages</a> - An image-oriented aggregator for Shaarlis<a href=".html"></a></li>
98<li><a href="https://github.com/mknexen/shaarli-api">mknexen/shaarli-api</a> - A REST API for Shaarli<a href=".html"></a></li>
99<li><a href="https://github.com/qwertygc/shaarli-dev-code/blob/master/self-dead-link.php">Self dead link</a> - Detect dead links on shaarli. This version use the database of shaarli. <a href="https://github.com/qwertygc/shaarli-dev-code/blob/master/dead-link.php">Another version</a>, can be used for other shaarli instances (but is more resource consuming).<a href=".html"></a></li>
100</ul>
101<h3 id="mobile-apps">Mobile Apps</h3>
102<ul>
103<li><a href="http://app.mro.name/Shaarli💫">Shaarli💫</a> iOS share extension - see <a href="https://github.com/shaarli/Shaarli/issues/308#issuecomment-184592070">#308</a> for some promo codes,<a href=".html"></a></li>
104<li><a href="http://sebsauvage.net/links/?ZAyDzg">Shaarli for Android</a> - Android application that adds Shaarli as a sharing provider<a href=".html"></a></li>
105<li><a href="https://github.com/dimtion/Shaarlier">Shaarlier for Android</a> - Android application to simply add links directly into your Shaarli<a href=".html"></a></li>
106</ul>
107<h2 id="integration-with-other-platforms">Integration with other platforms</h2>
108<ul>
109<li><a href="https://github.com/jcsaaddupuy/tt-rss-shaarli">tt-rss-shaarli</a> - <a href="http://tt-rss.org/">TinyTiny RSS</a> plugin that adds support for sharing articles with Shaarli<a href=".html"></a></li>
110<li><a href="https://github.com/ahmet2mir/octopress-shaarli">octopress-shaarli</a> - Octopress plugin to retrieve Shaarli links on the sidebar<a href=".html"></a></li>
111<li><a href="https://github.com/q2apro/scuttle-to-shaarli">Scuttle to Shaarli</a> - Import bookmarks from Scuttle<a href=".html"></a></li>
112</ul>
113<h2 id="alternatives-to-shaarli">Alternatives to Shaarli</h2>
114<ul>
115<li><a href="http://alternativeto.net/software/shaarli/">Shaarli alternatives</a> (alternativeto.net)<a href=".html"></a></li>
116<li><a href="https://github.com/bookieio/bookie">Bookie</a> - Another self-hostable, free bookmark sharing software, written in Python<a href=".html"></a></li>
117<li><a href="https://github.com/plainmade/unmark">Unmark</a> - An open source todo app for bookmarks (<a href="https://unmark.it/">Homepage</a>)<a href=".html"></a></li>
118<li><a href="https://wordpress.org/plugins/wp-bookmarks/">Wordpress bookmarks</a><a href=".html"></a></li>
119</ul>
120</body>
121</html>
diff --git a/doc/Community-&-Related-software.md b/doc/Community-&-Related-software.md
deleted file mode 100644
index 291bf643..00000000
--- a/doc/Community-&-Related-software.md
+++ /dev/null
@@ -1,55 +0,0 @@
1#Community & Related software
2_Unofficial but related work on Shaarli. If you maintain one of these, please get in touch with us to help us find a way to adapt your work to our fork._
3
4_TODO: contact repos owners to see if they'd like to standardize their work with the community fork._
5
6## Community
7- [Liens en vrac de sebsauvage](http://sebsauvage.net/links/) - the original Shaarli[](.html)
8- [A large list of Shaarlis](http://porneia.free.fr/pub/links/ou-est-shaarli.html)[](.html)
9- [A list of working Shaarli aggregators](https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json)[](.html)
10- [A list of some known Shaarlis](https://github.com/Oros42/shaarlis_list)[](.html)
11- [Adieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net](http://sebsauvage.net/rhaa/index.php?2011/09/16/09/29/58-adieu-delicious-diigo-et-stumbleupon-salut-shaarli-) (fr) _16/09/2011 - the original post about Shaarli_[](.html)
12- [Original ideas/fixme/TODO page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas)[](.html)
13- [Original discussion page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion) (fr)[](.html)
14- [Original revisions history](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history)[](.html)
15- [Shaarli.fr/my](https://www.shaarli.fr/my.php) - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of [DMeloni](https://github.com/DMeloni)[](.html)
16
17
18### Third party plugins
19
20
21 * [autosave](https://github.com/kalvn/shaarli-plugin-autosave) by [@kalvn](https://github.com/kalvn): Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.[](.html)
22 * [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.[](.html)
23 * [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.[](.html)
24 * [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.[](.html)
25 * [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.[](.html)
26 * [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks.[](.html)
27 * [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli[](.html)
28
29
30### Themes
31See [Theming](Theming.html) for the list of community-contributed themes, and an installation guide.
32
33### Server apps
34- [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content[](.html)
35- [shaarli-river](https://github.com/mknexen/shaarli-river) - An aggregator for shaarlis with many features [](.html)
36- [Shaarlo](https://github.com/DMeloni/shaarlo) - An aggregator for shaarlis with many features (a very popular running instance among french shaarliers: [shaarli.fr](http://shaarli.fr/))[](.html)
37- [Shaarlimages](https://github.com/BoboTiG/shaarlimages) - An image-oriented aggregator for Shaarlis[](.html)
38- [mknexen/shaarli-api](https://github.com/mknexen/shaarli-api) - A REST API for Shaarli[](.html)
39- [Self dead link](https://github.com/qwertygc/shaarli-dev-code/blob/master/self-dead-link.php) - Detect dead links on shaarli. This version use the database of shaarli. [Another version](https://github.com/qwertygc/shaarli-dev-code/blob/master/dead-link.php), can be used for other shaarli instances (but is more resource consuming).[](.html)
40
41### Mobile Apps
42- [Shaarli💫](http://app.mro.name/Shaarli💫) iOS share extension - see [#308](https://github.com/shaarli/Shaarli/issues/308#issuecomment-184592070) for some promo codes,[](.html)
43- [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider[](.html)
44- [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli[](.html)
45
46## Integration with other platforms
47- [tt-rss-shaarli](https://github.com/jcsaaddupuy/tt-rss-shaarli) - [TinyTiny RSS](http://tt-rss.org/) plugin that adds support for sharing articles with Shaarli[](.html)
48- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar[](.html)
49- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle[](.html)
50
51## Alternatives to Shaarli
52- [Shaarli alternatives](http://alternativeto.net/software/shaarli/) (alternativeto.net)[](.html)
53- [Bookie](https://github.com/bookieio/bookie) - Another self-hostable, free bookmark sharing software, written in Python[](.html)
54- [Unmark](https://github.com/plainmade/unmark) - An open source todo app for bookmarks ([Homepage](https://unmark.it/))[](.html)
55- [Wordpress bookmarks](https://wordpress.org/plugins/wp-bookmarks/)[](.html)
diff --git a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html b/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html
deleted file mode 100644
index 9efb1ad6..00000000
--- a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html
+++ /dev/null
@@ -1,163 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Copy an existing installation over SSH and serve it locally</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="copy-an-existing-installation-over-ssh-and-serve-it-locally">Copy an existing installation over SSH and serve it locally</h1>
103<p>Example bash script:</p>
104<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co">#!/bin/bash</span>
105<span class="co">#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli</span>
106<span class="co">#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.</span>
107<span class="co">#Will NOT download linked pages. It&#39;s just a directly usable backup/copy/mirror of your Shaarli</span>
108<span class="co">#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed</span>
109<span class="co">#Usage: ./local-shaarli.sh</span>
110<span class="co">#Author: nodiscc (nodiscc@gmail.com)</span>
111<span class="co">#License: MIT (http://opensource.org/licenses/MIT)</span>
112<span class="kw">set</span> <span class="ex">-o</span> errexit
113<span class="kw">set</span> <span class="ex">-o</span> nounset
114
115<span class="co">##### CONFIG #################</span>
116<span class="co">#The port used by php&#39;s local server</span>
117<span class="va">php_local_port=</span>7431
118
119<span class="co">#Name of the SSH server and path where Shaarli is installed</span>
120<span class="co">#TODO: pass these as command-line arguments</span>
121<span class="va">remotehost=</span><span class="st">&quot;my.ssh.server&quot;</span>
122<span class="va">remote_shaarli_dir=</span><span class="st">&quot;/var/www/shaarli&quot;</span>
123
124
125<span class="co">###### FUNCTIONS #############</span>
126<span class="fu">_main()</span> <span class="kw">{</span>
127 <span class="ex">_CBSyncShaarli</span>
128 <span class="ex">_CBServeShaarli</span>
129<span class="kw">}</span>
130
131<span class="fu">_CBSyncShaarli()</span> <span class="kw">{</span>
132 <span class="va">remote_temp_dir=$(</span><span class="fu">ssh</span> <span class="va">$remotehost</span> mktemp -d<span class="va">)</span>
133 <span class="va">remote_ssh_user=$(</span><span class="fu">ssh</span> <span class="va">$remotehost</span> whoami<span class="va">)</span>
134 <span class="fu">ssh</span> -t <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span> sudo cp -r <span class="st">&quot;</span><span class="va">$remote_shaarli_dir</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span>
135 <span class="fu">ssh</span> -t <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span> sudo chown -R <span class="st">&quot;</span><span class="va">$remote_ssh_user</span><span class="st">&quot;</span>:<span class="st">&quot;</span><span class="va">$remote_ssh_user</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span>
136 <span class="fu">scp</span> -rq <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span>:<span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span> local-shaarli
137 <span class="fu">ssh</span> <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span> rm -r <span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span>
138<span class="kw">}</span>
139
140<span class="fu">_CBServeShaarli()</span> <span class="kw">{</span>
141 <span class="co">#TODO: allow serving a previously downloaded Shaarli</span>
142 <span class="co">#TODO: ask before overwriting local copy, if it exists</span>
143 <span class="bu">cd</span> local-shaarli/
144 <span class="ex">php</span> -S localhost:<span class="va">${php_local_port}</span>
145 <span class="bu">echo</span> <span class="st">&quot;Please go to http://localhost:</span><span class="va">${php_local_port}</span><span class="st">&quot;</span>
146<span class="kw">}</span>
147
148
149<span class="co">##### MAIN #################</span>
150
151<span class="ex">_main</span></code></pre></div>
152<p>This outputs:</p>
153<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">./local-shaarli.sh</span>
154<span class="ex">PHP</span> 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
155<span class="ex">Listening</span> on http://localhost:7431
156<span class="ex">Document</span> root is /home/user/local-shaarli/shaarli
157<span class="ex">Press</span> Ctrl-C to quit.
158
159[<span class="ex">Mon</span> Sep 1 21:56:27 2014] ::1:57868 [200]: /[](.html)
160[<span class="ex">Mon</span> Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html)
161[<span class="ex">Mon</span> Sep 1 21:56:37 2014] ::1:57881 [200]: /...[](.html)</code></pre></div>
162</body>
163</html>
diff --git a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md b/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md
deleted file mode 100644
index 88d191da..00000000
--- a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md
+++ /dev/null
@@ -1,67 +0,0 @@
1#Copy an existing installation over SSH and serve it locally
2Example bash script:
3
4```bash
5#!/bin/bash
6#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli
7#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.
8#Will NOT download linked pages. It's just a directly usable backup/copy/mirror of your Shaarli
9#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed
10#Usage: ./local-shaarli.sh
11#Author: nodiscc (nodiscc@gmail.com)
12#License: MIT (http://opensource.org/licenses/MIT)
13set -o errexit
14set -o nounset
15
16##### CONFIG #################
17#The port used by php's local server
18php_local_port=7431
19
20#Name of the SSH server and path where Shaarli is installed
21#TODO: pass these as command-line arguments
22remotehost="my.ssh.server"
23remote_shaarli_dir="/var/www/shaarli"
24
25
26###### FUNCTIONS #############
27_main() {
28 _CBSyncShaarli
29 _CBServeShaarli
30}
31
32_CBSyncShaarli() {
33 remote_temp_dir=$(ssh $remotehost mktemp -d)
34 remote_ssh_user=$(ssh $remotehost whoami)
35 ssh -t "$remotehost" sudo cp -r "$remote_shaarli_dir" "$remote_temp_dir"
36 ssh -t "$remotehost" sudo chown -R "$remote_ssh_user":"$remote_ssh_user" "$remote_temp_dir"
37 scp -rq "$remotehost":"$remote_temp_dir" local-shaarli
38 ssh "$remotehost" rm -r "$remote_temp_dir"
39}
40
41_CBServeShaarli() {
42 #TODO: allow serving a previously downloaded Shaarli
43 #TODO: ask before overwriting local copy, if it exists
44 cd local-shaarli/
45 php -S localhost:${php_local_port}
46 echo "Please go to http://localhost:${php_local_port}"
47}
48
49
50##### MAIN #################
51
52_main
53```
54
55This outputs:
56
57```bash
58$ ./local-shaarli.sh
59PHP 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
60Listening on http://localhost:7431
61Document root is /home/user/local-shaarli/shaarli
62Press Ctrl-C to quit.
63
64[Mon Sep 1 21:56:27 2014] ::1:57868 [200]: /[](.html)
65[Mon Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html)
66[Mon Sep 1 21:56:37 2014] ::1:57881 [200]: /...[](.html)
67```
diff --git a/doc/Create-and-serve-multiple-Shaarlis-(farm).html b/doc/Create-and-serve-multiple-Shaarlis-(farm).html
deleted file mode 100644
index 672e4bf3..00000000
--- a/doc/Create-and-serve-multiple-Shaarlis-(farm).html
+++ /dev/null
@@ -1,157 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Create and serve multiple Shaarlis (farm)</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="create-and-serve-multiple-shaarlis-farm">Create and serve multiple Shaarlis (farm)</h1>
103<p>Example bash script (creates multiple shaarli instances and generates an HTML index of them)</p>
104<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co">#!/bin/bash</span>
105<span class="kw">set</span> <span class="ex">-o</span> errexit
106<span class="kw">set</span> <span class="ex">-o</span> nounset
107
108<span class="co">#config</span>
109<span class="va">shaarli_base_dir=</span><span class="st">&#39;/var/www/shaarli&#39;</span>
110<span class="va">accounts=</span><span class="st">&#39;bob john whatever username&#39;</span>
111<span class="va">shaarli_repo_url=</span><span class="st">&#39;https://github.com/shaarli/Shaarli&#39;</span>
112<span class="va">ref=</span><span class="st">&quot;master&quot;</span>
113
114<span class="co">#clone multiple shaarli instances</span>
115<span class="kw">if</span><span class="bu"> [</span> <span class="ot">!</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">&quot;</span><span class="bu"> ]</span>; <span class="kw">then</span> <span class="fu">mkdir</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">&quot;</span><span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
116
117<span class="kw">for</span> <span class="ex">account</span> in <span class="va">$accounts</span><span class="kw">;</span> <span class="kw">do</span>
118 <span class="kw">if</span><span class="bu"> [</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/</span><span class="va">$account</span><span class="st">&quot;</span><span class="bu"> ]</span>;[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
119 <span class="kw">then</span> <span class="bu">echo</span> <span class="st">&quot;[info] account </span><span class="va">$account</span><span class="st"> already exists, skipping&quot;</span><span class="kw">;</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
120 <span class="kw">else</span> <span class="bu">echo</span> <span class="st">&quot;[info] creating new account </span><span class="va">$account</span><span class="st"> ...&quot;</span><span class="kw">;</span> <span class="fu">git</span> clone --quiet <span class="st">&quot;</span><span class="va">$shaarli_repo_url</span><span class="st">&quot;</span> -b <span class="st">&quot;</span><span class="va">$ref</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/</span><span class="va">$account</span><span class="st">&quot;</span><span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
121<span class="kw">done</span>
122
123<span class="co">#generate html index of shaarlis</span>
124<span class="va">htmlhead=</span><span class="st">&#39;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;</span>
125<span class="st">&lt;!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ --&gt;</span>
126<span class="st">&lt;html lang=&quot;en&quot;&gt;</span>
127<span class="st"> &lt;head&gt;</span>
128<span class="st"> &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;</span>
129<span class="st"> &lt;title&gt;My Shaarli farm&lt;/title&gt;</span>
130<span class="st"> &lt;style&gt;body {font-family: &quot;Open Sans&quot;}&lt;/style&gt;</span>
131<span class="st"> &lt;/head&gt;</span>
132<span class="st"> &lt;body&gt;</span>
133<span class="st"> &lt;div&gt;</span>
134<span class="st"> &lt;h1&gt;My Shaarli farm&lt;/h1&gt;</span>
135<span class="st"> &lt;ul style=&quot;list-style-type: none;&quot;&gt;&#39;</span>
136
137<span class="va">accountlinks=</span><span class="st">&#39;&#39;</span>
138
139<span class="va">htmlfooter=</span><span class="st">&#39;</span>
140<span class="st"> &lt;/ul&gt;</span>
141<span class="st"> &lt;/div&gt;</span>
142<span class="st"> &lt;/body&gt;</span>
143<span class="st">&lt;/html&gt;&#39;</span>
144
145
146
147<span class="kw">for</span> <span class="ex">account</span> in <span class="va">$accounts</span><span class="kw">;</span> <span class="kw">do</span> <span class="va">accountlinks=</span><span class="st">&quot;</span><span class="va">$accountlinks</span><span class="st">\n&lt;li&gt;&lt;a href=</span><span class="dt">\&quot;</span><span class="va">$account</span><span class="dt">\&quot;</span><span class="st">&gt;</span><span class="va">$account</span><span class="st">&lt;/a&gt;&lt;/li&gt;&quot;</span>; <span class="kw">done</span>
148<span class="kw">if</span><span class="bu"> [</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/index.html&quot;</span><span class="bu"> ]</span>; <span class="kw">then</span> <span class="bu">echo</span> <span class="st">&quot;[removing old index.html]&quot;</span><span class="kw">;</span> <span class="fu">rm</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/index.html&quot;</span> ]<span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
149<span class="bu">echo</span> <span class="st">&quot;[info] generating new index of shaarlis&quot;</span>[](.html)
150<span class="bu">echo</span> -e <span class="st">&quot;</span><span class="va">$htmlhead</span><span class="st"> </span><span class="va">$accountlinks</span><span class="st"> </span><span class="va">$htmlfooter</span><span class="st">&quot;</span> <span class="op">&gt;</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/index.html&quot;</span>
151<span class="bu">echo</span> <span class="st">&#39;[info] done.&#39;</span>[](.html)
152<span class="bu">echo</span> <span class="st">&quot;[info] list of accounts: </span><span class="va">$accounts</span><span class="st">&quot;</span>[](.html)
153<span class="bu">echo</span> <span class="st">&quot;[info] contents of </span><span class="va">$shaarli_base_dir</span><span class="st">:&quot;</span>[](.html)
154<span class="ex">tree</span> -a -L 1 <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">&quot;</span></code></pre></div>
155<p>This script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like <a href="https://www.ansible.com/">Ansible</a><a href=".html"></a></p>
156</body>
157</html>
diff --git a/doc/Create-and-serve-multiple-Shaarlis-(farm).md b/doc/Create-and-serve-multiple-Shaarlis-(farm).md
deleted file mode 100644
index a71f6520..00000000
--- a/doc/Create-and-serve-multiple-Shaarlis-(farm).md
+++ /dev/null
@@ -1,58 +0,0 @@
1#Create and serve multiple Shaarlis (farm)
2Example bash script (creates multiple shaarli instances and generates an HTML index of them)
3
4```bash
5#!/bin/bash
6set -o errexit
7set -o nounset
8
9#config
10shaarli_base_dir='/var/www/shaarli'
11accounts='bob john whatever username'
12shaarli_repo_url='https://github.com/shaarli/Shaarli'
13ref="master"
14
15#clone multiple shaarli instances
16if [ ! -d "$shaarli_base_dir" ]; then mkdir "$shaarli_base_dir"; fi[](.html)
17
18for account in $accounts; do
19 if [ -d "$shaarli_base_dir/$account" ];[](.html)
20 then echo "[info] account $account already exists, skipping";[](.html)
21 else echo "[info] creating new account $account ..."; git clone --quiet "$shaarli_repo_url" -b "$ref" "$shaarli_base_dir/$account"; fi[](.html)
22done
23
24#generate html index of shaarlis
25htmlhead='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
26<!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ -->
27<html lang="en">
28 <head>
29 <meta http-equiv="content-type" content="text/html; charset=utf-8">
30 <title>My Shaarli farm</title>
31 <style>body {font-family: "Open Sans"}</style>
32 </head>
33 <body>
34 <div>
35 <h1>My Shaarli farm</h1>
36 <ul style="list-style-type: none;">'
37
38accountlinks=''
39
40htmlfooter='
41 </ul>
42 </div>
43 </body>
44</html>'
45
46
47
48for account in $accounts; do accountlinks="$accountlinks\n<li><a href=\"$account\">$account</a></li>"; done
49if [ -d "$shaarli_base_dir/index.html" ]; then echo "[removing old index.html]"; rm "$shaarli_base_dir/index.html" ]; fi[](.html)
50echo "[info] generating new index of shaarlis"[](.html)
51echo -e "$htmlhead $accountlinks $htmlfooter" > "$shaarli_base_dir/index.html"
52echo '[info] done.'[](.html)
53echo "[info] list of accounts: $accounts"[](.html)
54echo "[info] contents of $shaarli_base_dir:"[](.html)
55tree -a -L 1 "$shaarli_base_dir"
56```
57
58This script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like [Ansible](https://www.ansible.com/)[](.html)
diff --git a/doc/Datastore-hacks.html b/doc/Datastore-hacks.html
deleted file mode 100644
index 15da09d4..00000000
--- a/doc/Datastore-hacks.html
+++ /dev/null
@@ -1,122 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Datastore hacks</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="datastore-hacks">Datastore hacks</h1>
103<h3 id="decode-datastore-content">Decode datastore content</h3>
104<p>To display the array representing the data saved in <code>data/datastore.php</code>, use the following snippet:</p>
105<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">$data</span> = <span class="st">&quot;tZNdb9MwFIb... &lt;Commented content inside datastore.php&gt;&quot;</span><span class="ot">;</span>
106<span class="kw">$out</span> = <span class="fu">unserialize</span><span class="ot">(</span><span class="fu">gzinflate</span><span class="ot">(</span><span class="fu">base64_decode</span><span class="ot">(</span><span class="kw">$data</span><span class="ot">)));</span>
107<span class="fu">echo</span> <span class="st">&quot;&lt;pre&gt;&quot;</span><span class="ot">;</span> <span class="co">// Pretty printing is love, pretty printing is life</span>
108<span class="fu">print_r</span><span class="ot">(</span><span class="kw">$out</span><span class="ot">);</span>
109<span class="fu">echo</span> <span class="st">&quot;&lt;/pre&gt;&quot;</span><span class="ot">;</span>
110<span class="fu">exit</span><span class="ot">;</span></code></pre></div>
111<p>This will output the internal representation of the datastore, &quot;unobfuscated&quot; (if this can really be considered obfuscation).</p>
112<p>Alternatively, you can transform to JSON format (and pretty-print if you have <code>jq</code> installed):</p>
113<pre><code>php -r &#39;print(json_encode(unserialize(gzinflate(base64_decode(preg_replace(&quot;!.*/\* (.+) \*/.*!&quot;, &quot;$1&quot;, file_get_contents(&quot;data/datastore.php&quot;)))))));&#39; | jq .</code></pre>
114<h3 id="changing-the-timestamp-for-a-link">Changing the timestamp for a link</h3>
115<ul>
116<li>Look for <code>&lt;input type=&quot;hidden&quot; name=&quot;lf_linkdate&quot; value=&quot;{$link.linkdate}&quot;&gt;</code> in <code>tpl/editlink.tpl</code> (line 14)</li>
117<li>Replace <code>type=&quot;hidden&quot;</code> with <code>type=&quot;text&quot;</code> from this line</li>
118<li>A new date/time field becomes available in the edit/new link dialog.</li>
119<li>You can set the timestamp manually by entering it in the format <code>YYYMMDD_HHMMS</code>.</li>
120</ul>
121</body>
122</html>
diff --git a/doc/Datastore-hacks.md b/doc/Datastore-hacks.md
deleted file mode 100644
index ef6f6d50..00000000
--- a/doc/Datastore-hacks.md
+++ /dev/null
@@ -1,24 +0,0 @@
1#Datastore hacks
2### Decode datastore content
3To display the array representing the data saved in `data/datastore.php`, use the following snippet:
4
5```php
6$data = "tZNdb9MwFIb... <Commented content inside datastore.php>";
7$out = unserialize(gzinflate(base64_decode($data)));
8echo "<pre>"; // Pretty printing is love, pretty printing is life
9print_r($out);
10echo "</pre>";
11exit;
12```
13This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation).
14
15Alternatively, you can transform to JSON format (and pretty-print if you have `jq` installed):
16```
17php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/\* (.+) \*/.*!", "$1", file_get_contents("data/datastore.php")))))));' | jq .
18```
19
20### Changing the timestamp for a link
21* Look for `<input type="hidden" name="lf_linkdate" value="{$link.linkdate}">` in `tpl/editlink.tpl` (line 14)
22* Replace `type="hidden"` with `type="text"` from this line
23* A new date/time field becomes available in the edit/new link dialog.
24* You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`.
diff --git a/doc/Development.html b/doc/Development.html
deleted file mode 100644
index c5776413..00000000
--- a/doc/Development.html
+++ /dev/null
@@ -1,110 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Development</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="development">Development</h1>
66<h2 id="guidelines">Guidelines</h2>
67<p>Please have a look at the following pages:</p>
68<ul>
69<li><a href="https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md">Contributing to Shaarli</a><a href=".html"></a></li>
70<li><a href="Static-analysis.html">Static analysis</a> - patches should try to stick to the <a href="http://www.php-fig.org/psr/">PHP Standard Recommendations</a> (PSR), especially:
71<ul>
72<li><a href="http://www.php-fig.org/psr/psr-1/">PSR-1</a> - Basic Coding Standard<a href=".html"></a></li>
73<li><a href="http://www.php-fig.org/psr/psr-2/">PSR-2</a> - Coding Style Guide<a href=".html"></a></li>
74</ul></li>
75<li><a href="Unit-tests.html">Unit tests</a></li>
76<li><a href="GnuPG-signature.html">GnuPG signature</a> for tags/releases</li>
77</ul>
78<h2 id="continuous-integration-tools">Continuous integration tools</h2>
79<h3 id="local-development">Local development</h3>
80<p>A <a href="https://github.com/shaarli/Shaarli/blob/master/Makefile"><code>Makefile</code></a> is available to perform project-related operations:<a href=".html"></a></p>
81<ul>
82<li>Documentation - generate a local HTML copy of the GitHub wiki</li>
83<li><a href="Static-analysis.html">Static analysis</a> - check that the code is compliant to PHP conventions</li>
84<li><a href="Unit-tests.html">Unit tests</a> - ensure there are no regressions introduced by new commits</li>
85</ul>
86<h3 id="automatic-builds">Automatic builds</h3>
87<p><a href="http://docs.travis-ci.com/">Travis CI</a> is a Continuous Integration build server, that runs a build:<a href=".html"></a></p>
88<ul>
89<li>each time a commit is merged to the mainline (<code>master</code> branch)</li>
90<li>each time a Pull Request is submitted or updated</li>
91</ul>
92<p>A build is composed of several jobs: one for each supported PHP version (see <a href="Server-requirements.html">Server requirements</a>).</p>
93<p>Each build job:</p>
94<ul>
95<li>updates Composer</li>
96<li>installs 3rd-party test dependencies with Composer</li>
97<li>runs <a href="Unit-tests.html">Unit tests</a></li>
98</ul>
99<p>After all jobs have finished, Travis returns the results to GitHub:</p>
100<ul>
101<li>a status icon represents the result for the <code>master</code> branch: <a href="(https://api.travis-ci.org/shaarli/Shaarli.svg)%5D(https://travis-ci.org/shaarli/Shaarli).html"><img src="https://travis-ci.org/shaarli/Shaarli" alt="(https://api.travis-ci.org/shaarli/Shaarli.svg)" /></a></li>
102<li>Pull Requests are updated with the Travis result
103<ul>
104<li>Green: all tests have passed</li>
105<li>Red: some tests failed</li>
106<li>Orange: tests are pending</li>
107</ul></li>
108</ul>
109</body>
110</html>
diff --git a/doc/Development.md b/doc/Development.md
deleted file mode 100644
index 6cfcb683..00000000
--- a/doc/Development.md
+++ /dev/null
@@ -1,35 +0,0 @@
1#Development
2## Guidelines
3Please have a look at the following pages:
4- [Contributing to Shaarli](https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md)[](.html)
5- [Static analysis](Static-analysis.html) - patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially:
6 - [PSR-1](http://www.php-fig.org/psr/psr-1/) - Basic Coding Standard[](.html)
7 - [PSR-2](http://www.php-fig.org/psr/psr-2/) - Coding Style Guide[](.html)
8- [Unit tests](Unit-tests.html)
9- [GnuPG signature](GnuPG-signature.html) for tags/releases
10
11## Continuous integration tools
12### Local development
13A [`Makefile`](https://github.com/shaarli/Shaarli/blob/master/Makefile) is available to perform project-related operations:[](.html)
14- Documentation - generate a local HTML copy of the GitHub wiki
15- [Static analysis](Static-analysis.html) - check that the code is compliant to PHP conventions
16- [Unit tests](Unit-tests.html) - ensure there are no regressions introduced by new commits
17
18### Automatic builds
19[Travis CI](http://docs.travis-ci.com/) is a Continuous Integration build server, that runs a build:[](.html)
20- each time a commit is merged to the mainline (`master` branch)
21- each time a Pull Request is submitted or updated
22
23A build is composed of several jobs: one for each supported PHP version (see [Server requirements](Server-requirements.html)).
24
25Each build job:
26- updates Composer
27- installs 3rd-party test dependencies with Composer
28- runs [Unit tests](Unit-tests.html)
29
30After all jobs have finished, Travis returns the results to GitHub:
31- a status icon represents the result for the `master` branch: [![(https://api.travis-ci.org/shaarli/Shaarli.svg)](https://travis-ci.org/shaarli/Shaarli)]((https://api.travis-ci.org/shaarli/Shaarli.svg)](https://travis-ci.org/shaarli/Shaarli).html)
32- Pull Requests are updated with the Travis result
33 - Green: all tests have passed
34 - Red: some tests failed
35 - Orange: tests are pending
diff --git a/doc/Directory-structure.html b/doc/Directory-structure.html
deleted file mode 100644
index 404ff7c8..00000000
--- a/doc/Directory-structure.html
+++ /dev/null
@@ -1,133 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Directory structure</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="directory-structure">Directory structure</h1>
103<p>Here is the directory structure of Shaarli and the purpose of the different files:</p>
104<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"> <span class="ex">index.php</span> <span class="co"># Main program</span>
105 <span class="ex">application/</span> <span class="co"># Shaarli classes</span>
106 ├── <span class="ex">LinkDB.php</span>
107 └── <span class="ex">Utils.php</span>
108 <span class="ex">tests/</span> <span class="co"># Shaarli unitary &amp; functional tests</span>
109 ├── <span class="ex">LinkDBTest.php</span>
110 ├── <span class="ex">utils</span> <span class="co"># utilities to ease testing</span>
111 │ └── <span class="ex">ReferenceLinkDB.php</span>
112 └── <span class="ex">UtilsTest.php</span>
113 <span class="ex">COPYING</span> <span class="co"># Shaarli license</span>
114 <span class="ex">inc/</span> <span class="co"># static assets and 3rd party libraries</span>
115 ├── <span class="ex">awesomplete.*</span> <span class="co"># tags autocompletion library</span>
116 ├── <span class="ex">blazy.*</span> <span class="co"># picture wall lazy image loading library</span>
117 ├── <span class="ex">shaarli.css</span>, reset.css <span class="co"># Shaarli stylesheet.</span>
118 ├── <span class="ex">qr.*</span> <span class="co"># qr code generation library</span>
119 └──<span class="ex">rain.tpl.class.php</span> <span class="co"># RainTPL templating library</span>
120 <span class="ex">tpl/</span> <span class="co"># RainTPL templates for Shaarli. They are used to build the pages.</span>
121 <span class="ex">images/</span> <span class="co"># Images and icons used in Shaarli</span>
122 <span class="ex">data/</span> <span class="co"># data storage: bookmark database, configuration, logs, banlist…</span>
123 ├── <span class="ex">config.php</span> <span class="co"># Shaarli configuration (login, password, timezone, title…)</span>
124 ├── <span class="ex">datastore.php</span> <span class="co"># Your link database (compressed).</span>
125 ├── <span class="ex">ipban.php</span> <span class="co"># IP address ban system data</span>
126 ├── <span class="ex">lastupdatecheck.txt</span> <span class="co"># Update check timestamp file</span>
127 └──<span class="ex">log.txt</span> <span class="co"># login/IPban log.</span>
128 <span class="ex">cache/</span> <span class="co"># thumbnails cache</span>
129 <span class="co"># This directory is automatically created. You can erase it anytime you want.</span>
130 <span class="ex">tmp/</span> <span class="co"># Temporary directory for compiled RainTPL templates.</span>
131 <span class="co"># This directory is automatically created. You can erase it anytime you want.</span></code></pre></div>
132</body>
133</html>
diff --git a/doc/Docker.html b/doc/Docker.html
deleted file mode 100644
index e89c90fb..00000000
--- a/doc/Docker.html
+++ /dev/null
@@ -1,242 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Docker</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="docker">Docker</h1>
103<ul>
104<li><a href="#docker-usage">Docker usage</a><a href=".html"></a></li>
105<li><a href="#get-and-run-a-shaarli-image">Get and run a Shaarli image</a><a href=".html"></a></li>
106<li><a href="#resources">Resources</a><a href=".html"></a></li>
107</ul>
108<h2 id="docker-usage">Docker usage</h2>
109<h3 id="basics">Basics</h3>
110<p>Install <a href="https://www.docker.com/">Docker</a>, by following the instructions relevant<a href=".html"></a><br />
111to your OS / distribution, and start the service.</p>
112<h4 id="search-an-image-on-dockerhub">Search an image on <a href="https://hub.docker.com/">DockerHub</a><a href=".html"></a></h4>
113<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> search debian
114
115<span class="ex">NAME</span> DESCRIPTION STARS OFFICIAL AUTOMATED
116<span class="ex">ubuntu</span> Ubuntu is a Debian-based Linux operating s... 2065 [OK][](.html)
117<span class="ex">debian</span> Debian is a Linux distribution that<span class="st">&#39;s comp... 603 [OK][](.html)</span>
118<span class="st">google/debian 47 [OK][](.html)</span></code></pre></div>
119<h4 id="show-available-tags-for-a-repository">Show available tags for a repository</h4>
120<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">curl</span> https://index.docker.io/v1/repositories/debian/tags <span class="kw">|</span> <span class="ex">python</span> -m json.tool
121
122<span class="ex">%</span> Total % Received % Xferd Average Speed Time Time Time Current
123<span class="ex">Dload</span> Upload Total Spent Left Speed
124<span class="ex">100</span> 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433</code></pre></div>
125<p>Sample output:</p>
126<div class="sourceCode"><pre class="sourceCode json"><code class="sourceCode json"><span class="ot">[[]</span><span class="er">(.html)</span>
127 <span class="fu">{</span>
128 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;85a02782&quot;</span><span class="fu">,</span>
129 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;stretch&quot;</span>
130 <span class="fu">}</span><span class="ot">,</span>
131 <span class="fu">{</span>
132 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;59abecbc&quot;</span><span class="fu">,</span>
133 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;testing&quot;</span>
134 <span class="fu">}</span><span class="ot">,</span>
135 <span class="fu">{</span>
136 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;bf0fd686&quot;</span><span class="fu">,</span>
137 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;unstable&quot;</span>
138 <span class="fu">}</span><span class="ot">,</span>
139 <span class="fu">{</span>
140 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;60c52dbe&quot;</span><span class="fu">,</span>
141 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;wheezy&quot;</span>
142 <span class="fu">}</span><span class="ot">,</span>
143 <span class="fu">{</span>
144 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;c5b806fe&quot;</span><span class="fu">,</span>
145 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;wheezy-backports&quot;</span>
146 <span class="fu">}</span>
147<span class="ot">]</span></code></pre></div>
148<h4 id="pull-an-image-from-dockerhub">Pull an image from DockerHub</h4>
149<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> pull repository[:tag][](.html)
150
151$ <span class="ex">docker</span> pull debian:wheezy
152<span class="ex">wheezy</span>: Pulling from debian
153<span class="ex">4c8cbfd2973e</span>: Pull complete
154<span class="ex">60c52dbe9d91</span>: Pull complete
155<span class="ex">Digest</span>: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
156<span class="ex">Status</span>: Downloaded newer image for debian:wheezy</code></pre></div>
157<h2 id="get-and-run-a-shaarli-image">Get and run a Shaarli image</h2>
158<h3 id="dockerhub-repository">DockerHub repository</h3>
159<p>The images can be found in the <a href="https://hub.docker.com/r/shaarli/shaarli/"><code>shaarli/shaarli</code></a><a href=".html"></a><br />
160repository.</p>
161<h3 id="available-image-tags">Available image tags</h3>
162<ul>
163<li><code>latest</code>: master branch (tarball release)</li>
164<li><code>stable</code>: stable branch (tarball release)</li>
165<li><code>dev</code>: master branch (Git clone)</li>
166</ul>
167<p>All images rely on:</p>
168<ul>
169<li><a href="https://hub.docker.com/_/debian/">Debian 8 Jessie</a><a href=".html"></a></li>
170<li><a href="http://php-fpm.org/">PHP5-FPM</a><a href=".html"></a></li>
171<li><a href="http://nginx.org/">Nginx</a><a href=".html"></a></li>
172</ul>
173<h3 id="download-from-dockerhub">Download from DockerHub</h3>
174<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> pull shaarli/shaarli
175<span class="ex">latest</span>: Pulling from shaarli/shaarli
176<span class="ex">32716d9fcddb</span>: Pull complete
177<span class="ex">84899d045435</span>: Pull complete
178<span class="ex">4b6ad7444763</span>: Pull complete
179<span class="ex">e0345ef7a3e0</span>: Pull complete
180<span class="ex">5c1dd344094f</span>: Pull complete
181<span class="ex">6422305a200b</span>: Pull complete
182<span class="ex">7d63f861dbef</span>: Pull complete
183<span class="ex">3eb97210645c</span>: Pull complete
184<span class="ex">869319d746ff</span>: Already exists
185<span class="ex">869319d746ff</span>: Pulling fs layer
186<span class="ex">902b87aaaec9</span>: Already exists
187<span class="ex">Digest</span>: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
188<span class="ex">Status</span>: Downloaded newer image for shaarli/shaarli:latest</code></pre></div>
189<h3 id="create-and-start-a-new-container-from-the-image">Create and start a new container from the image</h3>
190<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># map the host&#39;s :8000 port to the container&#39;s :80 port</span>
191$ <span class="ex">docker</span> create -p 8000:80 shaarli/shaarli
192<span class="ex">d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101</span>
193
194<span class="co"># launch the container in the background</span>
195$ <span class="ex">docker</span> start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
196<span class="ex">d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101</span>
197
198<span class="co"># list active containers</span>
199$ <span class="ex">docker</span> ps
200<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
201<span class="ex">d40b7af693d6</span> shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000-<span class="op">&gt;</span>80/tcp backstabbing_galileo</code></pre></div>
202<h3 id="stop-and-destroy-a-container">Stop and destroy a container</h3>
203<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> stop backstabbing_galileo <span class="co"># those docker guys are really rude to physicists!</span>
204<span class="ex">backstabbing_galileo</span>
205
206<span class="co"># check the container is stopped</span>
207$ <span class="ex">docker</span> ps
208<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
209
210<span class="co"># list ALL containers</span>
211$ <span class="ex">docker</span> ps -a
212<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
213<span class="ex">d40b7af693d6</span> shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) <span class="ex">48</span> seconds ago backstabbing_galileo
214
215<span class="co"># destroy the container</span>
216$ <span class="ex">docker</span> rm backstabbing_galileo <span class="co"># let&#39;s put an end to these barbarian practices</span>
217<span class="ex">backstabbing_galileo</span>
218
219$ <span class="ex">docker</span> ps -a
220<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES</code></pre></div>
221<h2 id="resources">Resources</h2>
222<h3 id="docker-1">Docker</h3>
223<ul>
224<li><a href="http://blog.thoward37.me/articles/where-are-docker-images-stored/">Where are Docker images stored?</a><a href=".html"></a></li>
225<li><a href="https://docs.docker.com/reference/builder/">Dockerfile reference</a><a href=".html"></a></li>
226<li><a href="https://docs.docker.com/articles/dockerfile_best-practices/">Dockerfile best practices</a><a href=".html"></a></li>
227<li><a href="https://docs.docker.com/userguide/dockervolumes/">Volumes</a><a href=".html"></a></li>
228</ul>
229<h3 id="dockerhub">DockerHub</h3>
230<ul>
231<li><a href="https://docs.docker.com/userguide/dockerrepos/">Repositories</a><a href=".html"></a></li>
232<li><a href="https://docs.docker.com/docker-hub/orgs/">Teams and organizations</a><a href=".html"></a></li>
233<li><a href="https://docs.docker.com/docker-hub/github/">GitHub automated build</a><a href=".html"></a></li>
234</ul>
235<h3 id="service-management">Service management</h3>
236<ul>
237<li><a href="https://docs.docker.com/articles/using_supervisord/">Using supervisord</a><a href=".html"></a></li>
238<li><a href="http://nginx.org/en/docs/ngx_core_module.html#daemon">Nginx in the foreground</a><a href=".html"></a></li>
239<li><a href="http://supervisord.org/">supervisord</a><a href=".html"></a></li>
240</ul>
241</body>
242</html>
diff --git a/doc/Docker.md b/doc/Docker.md
deleted file mode 100644
index 1faa7904..00000000
--- a/doc/Docker.md
+++ /dev/null
@@ -1,157 +0,0 @@
1#Docker
2- [Docker usage](#docker-usage)[](.html)
3- [Get and run a Shaarli image](#get-and-run-a-shaarli-image)[](.html)
4- [Resources](#resources)[](.html)
5
6## Docker usage
7### Basics
8Install [Docker](https://www.docker.com/), by following the instructions relevant[](.html)
9to your OS / distribution, and start the service.
10
11#### Search an image on [DockerHub](https://hub.docker.com/)[](.html)
12
13```bash
14$ docker search debian
15
16NAME DESCRIPTION STARS OFFICIAL AUTOMATED
17ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK][](.html)
18debian Debian is a Linux distribution that's comp... 603 [OK][](.html)
19google/debian 47 [OK][](.html)
20```
21
22#### Show available tags for a repository
23```bash
24$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
25
26% Total % Received % Xferd Average Speed Time Time Time Current
27Dload Upload Total Spent Left Speed
28100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
29```
30
31Sample output:
32```json
33[[](.html)
34 {
35 "layer": "85a02782",
36 "name": "stretch"
37 },
38 {
39 "layer": "59abecbc",
40 "name": "testing"
41 },
42 {
43 "layer": "bf0fd686",
44 "name": "unstable"
45 },
46 {
47 "layer": "60c52dbe",
48 "name": "wheezy"
49 },
50 {
51 "layer": "c5b806fe",
52 "name": "wheezy-backports"
53 }
54]
55
56```
57
58#### Pull an image from DockerHub
59```bash
60$ docker pull repository[:tag][](.html)
61
62$ docker pull debian:wheezy
63wheezy: Pulling from debian
644c8cbfd2973e: Pull complete
6560c52dbe9d91: Pull complete
66Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
67Status: Downloaded newer image for debian:wheezy
68```
69
70## Get and run a Shaarli image
71### DockerHub repository
72The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)[](.html)
73repository.
74
75### Available image tags
76- `latest`: master branch (tarball release)
77- `stable`: stable branch (tarball release)
78- `dev`: master branch (Git clone)
79
80All images rely on:
81- [Debian 8 Jessie](https://hub.docker.com/_/debian/)[](.html)
82- [PHP5-FPM](http://php-fpm.org/)[](.html)
83- [Nginx](http://nginx.org/)[](.html)
84
85### Download from DockerHub
86```bash
87$ docker pull shaarli/shaarli
88latest: Pulling from shaarli/shaarli
8932716d9fcddb: Pull complete
9084899d045435: Pull complete
914b6ad7444763: Pull complete
92e0345ef7a3e0: Pull complete
935c1dd344094f: Pull complete
946422305a200b: Pull complete
957d63f861dbef: Pull complete
963eb97210645c: Pull complete
97869319d746ff: Already exists
98869319d746ff: Pulling fs layer
99902b87aaaec9: Already exists
100Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
101Status: Downloaded newer image for shaarli/shaarli:latest
102```
103
104### Create and start a new container from the image
105```bash
106# map the host's :8000 port to the container's :80 port
107$ docker create -p 8000:80 shaarli/shaarli
108d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
109
110# launch the container in the background
111$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
112d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
113
114# list active containers
115$ docker ps
116CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
117d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
118```
119
120### Stop and destroy a container
121```bash
122$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
123backstabbing_galileo
124
125# check the container is stopped
126$ docker ps
127CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
128
129# list ALL containers
130$ docker ps -a
131CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
132d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
133
134# destroy the container
135$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
136backstabbing_galileo
137
138$ docker ps -a
139CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
140```
141
142## Resources
143### Docker
144- [Where are Docker images stored?](http://blog.thoward37.me/articles/where-are-docker-images-stored/)[](.html)
145- [Dockerfile reference](https://docs.docker.com/reference/builder/)[](.html)
146- [Dockerfile best practices](https://docs.docker.com/articles/dockerfile_best-practices/)[](.html)
147- [Volumes](https://docs.docker.com/userguide/dockervolumes/)[](.html)
148
149### DockerHub
150- [Repositories](https://docs.docker.com/userguide/dockerrepos/)[](.html)
151- [Teams and organizations](https://docs.docker.com/docker-hub/orgs/)[](.html)
152- [GitHub automated build](https://docs.docker.com/docker-hub/github/)[](.html)
153
154### Service management
155- [Using supervisord](https://docs.docker.com/articles/using_supervisord/)[](.html)
156- [Nginx in the foreground](http://nginx.org/en/docs/ngx_core_module.html#daemon)[](.html)
157- [supervisord](http://supervisord.org/)[](.html)
diff --git a/doc/Download-CSS-styles-from-an-OPML-list.html b/doc/Download-CSS-styles-from-an-OPML-list.html
deleted file mode 100644
index a4f68ac6..00000000
--- a/doc/Download-CSS-styles-from-an-OPML-list.html
+++ /dev/null
@@ -1,255 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Download CSS styles from an OPML list</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="download-css-styles-from-an-opml-list">Download CSS styles from an OPML list</h1>
103<h3 id="download-css-styles-for-shaarlis-listed-in-an-opml-file">Download CSS styles for shaarlis listed in an opml file</h3>
104<p>Example php script:</p>
105<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php">&lt;!---- <span class="ot">?</span>php --&gt;
106&lt;!---- Copyright <span class="ot">(</span>c<span class="ot">)</span> <span class="dv">2014</span> Nicolas Delsaux <span class="ot">(</span>https<span class="ot">:</span><span class="co">//github.com/Riduidel) --&gt;</span>
107&lt;!---- License: zlib <span class="ot">(</span>http:<span class="co">//www.gzip.org/zlib/zlib_license.html) --&gt;</span>
108
109<span class="co">/**</span>
110<span class="co"> * Source: https://github.com/Riduidel</span>
111<span class="co"> * Download css styles for shaarlis listed in an opml file</span>
112<span class="co"> */</span>
113<span class="fu">define</span><span class="ot">(</span><span class="st">&quot;SHAARLI_RSS_OPML&quot;</span><span class="ot">,</span> <span class="st">&quot;https://www.ecirtam.net/shaarlirss/custom/people.opml&quot;</span><span class="ot">);</span>
114
115<span class="fu">define</span><span class="ot">(</span><span class="st">&quot;THEMES_TEMP_FOLDER&quot;</span><span class="ot">,</span> <span class="st">&quot;new_themes&quot;</span><span class="ot">);</span>
116
117<span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">THEMES_TEMP_FOLDER</span><span class="ot">))</span> {
118 <span class="fu">mkdir</span><span class="ot">(</span><span class="kw">THEMES_TEMP_FOLDER</span><span class="ot">);</span>
119}
120
121<span class="kw">function</span> siteUrl<span class="ot">(</span><span class="kw">$pathInSite</span><span class="ot">)</span> {
122 <span class="kw">$indexPos</span> = <span class="fu">strpos</span><span class="ot">(</span><span class="kw">$pathInSite</span><span class="ot">,</span> <span class="st">&quot;index.php&quot;</span><span class="ot">);</span>
123 <span class="kw">if</span><span class="ot">(</span>!<span class="kw">$indexPos</span><span class="ot">)</span> {
124 <span class="kw">return</span> <span class="kw">$pathInSite</span><span class="ot">;</span>
125 } <span class="kw">else</span> {
126 <span class="kw">return</span> <span class="fu">substr</span><span class="ot">(</span><span class="kw">$pathInSite</span><span class="ot">,</span> <span class="dv">0</span><span class="ot">,</span> <span class="kw">$indexPos</span><span class="ot">);</span>
127 }
128}
129
130<span class="kw">function</span> createShaarliHashFromOPMLL<span class="ot">(</span><span class="kw">$opmlFile</span><span class="ot">)</span> {
131 <span class="kw">$result</span> = <span class="fu">array</span><span class="ot">();</span>
132 <span class="kw">$opml</span> = <span class="fu">file_get_contents</span><span class="ot">(</span><span class="kw">$opmlFile</span><span class="ot">);</span>
133 <span class="kw">$opmlXml</span> = <span class="fu">simplexml_load_string</span><span class="ot">(</span><span class="kw">$opml</span><span class="ot">);</span>
134 <span class="kw">$outlineElements</span> = <span class="kw">$opmlXml</span>-&gt;xpath<span class="ot">(</span><span class="st">&quot;body/outline&quot;</span><span class="ot">);</span>
135 <span class="kw">foreach</span><span class="ot">(</span><span class="kw">$outlineElements</span> <span class="kw">as</span> <span class="kw">$site</span><span class="ot">)</span> {
136 <span class="kw">$siteUrl</span> = siteUrl<span class="ot">(</span><span class="dt">(string)</span> <span class="kw">$site</span><span class="ot">[</span><span class="st">&#39;htmlUrl&#39;</span><span class="ot">]);[](</span>.html<span class="ot">)</span>
137 <span class="kw">$result</span><span class="ot">[</span><span class="kw">$siteUrl</span><span class="ot">]</span>=<span class="ot">(</span><span class="dt">(string)</span> <span class="kw">$site</span><span class="ot">[</span><span class="st">&#39;text&#39;</span><span class="ot">]);[](</span>.html<span class="ot">)</span>
138 }
139 <span class="kw">return</span> <span class="kw">$result</span><span class="ot">;</span>
140}
141
142<span class="kw">function</span> getSiteFolder<span class="ot">(</span><span class="kw">$url</span><span class="ot">)</span> {
143 <span class="kw">$domain</span> = <span class="fu">parse_url</span><span class="ot">(</span><span class="kw">$url</span><span class="ot">,</span> <span class="kw">PHP_URL_HOST</span><span class="ot">);</span>
144 <span class="kw">return</span> <span class="kw">THEMES_TEMP_FOLDER</span>.<span class="st">&quot;/&quot;</span>.<span class="fu">str_replace</span><span class="ot">(</span><span class="st">&quot;.&quot;</span><span class="ot">,</span> <span class="st">&quot;_&quot;</span><span class="ot">,</span> <span class="kw">$domain</span><span class="ot">);</span>
145}
146
147<span class="kw">function</span> get_http_response_code<span class="ot">(</span><span class="kw">$theURL</span><span class="ot">)</span> {
148 <span class="kw">$headers</span> = <span class="fu">get_headers</span><span class="ot">(</span><span class="kw">$theURL</span><span class="ot">);</span>
149 <span class="kw">return</span> <span class="fu">substr</span><span class="ot">(</span><span class="kw">$headers</span><span class="ot">[</span><span class="dv">0</span><span class="ot">],</span> <span class="dv">9</span><span class="ot">,</span> <span class="dv">3</span><span class="ot">);[](</span>.html<span class="ot">)</span>
150}
151
152<span class="co">/**</span>
153<span class="co"> * This makes the code PHP-5 only (particularly the call to &quot;get_headers&quot;)</span>
154<span class="co"> */</span>
155<span class="kw">function</span> copyUserStyleFrom<span class="ot">(</span><span class="kw">$url</span><span class="ot">,</span> <span class="kw">$name</span><span class="ot">,</span> <span class="kw">$knownStyles</span><span class="ot">)</span> {
156 <span class="kw">$userStyle</span> = <span class="kw">$url</span>.<span class="st">&quot;inc/user.css&quot;</span><span class="ot">;</span>
157 <span class="kw">if</span><span class="ot">(</span><span class="fu">in_array</span><span class="ot">(</span><span class="kw">$url</span><span class="ot">,</span> <span class="kw">$knownStyles</span><span class="ot">))</span> {
158 <span class="co">// TODO add log message</span>
159 } <span class="kw">else</span> {
160 <span class="kw">$statusCode</span> = get_http_response_code<span class="ot">(</span><span class="kw">$userStyle</span><span class="ot">);</span>
161 <span class="kw">if</span><span class="ot">(</span><span class="fu">intval</span><span class="ot">(</span><span class="kw">$statusCode</span><span class="ot">)</span>&lt;<span class="dv">300</span><span class="ot">)</span> {
162 <span class="kw">$styleSheet</span> = <span class="fu">file_get_contents</span><span class="ot">(</span><span class="kw">$userStyle</span><span class="ot">);</span>
163 <span class="kw">$siteFolder</span> = getSiteFolder<span class="ot">(</span><span class="kw">$url</span><span class="ot">);</span>
164 <span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$siteFolder</span><span class="ot">))</span> {
165 <span class="fu">mkdir</span><span class="ot">(</span><span class="kw">$siteFolder</span><span class="ot">);</span>
166 }
167 <span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/user.css&#39;</span><span class="ot">))</span> {
168 <span class="co">// Copy stylesheet</span>
169 <span class="fu">file_put_contents</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/user.css&#39;</span><span class="ot">,</span> <span class="kw">$styleSheet</span><span class="ot">);</span>
170 }
171 <span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/README.md&#39;</span><span class="ot">))</span> {
172 <span class="co">// Then write a readme.md file</span>
173 <span class="fu">file_put_contents</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/README.md&#39;</span><span class="ot">,</span>
174 <span class="st">&quot;User style from &quot;</span>.<span class="kw">$name</span>.<span class="st">&quot;</span><span class="kw">\n</span><span class="st">&quot;</span>
175 .<span class="st">&quot;=============================&quot;</span>
176 .<span class="st">&quot;</span><span class="kw">\n\n</span><span class="st">&quot;</span>
177 .<span class="st">&quot;This stylesheet was downloaded from &quot;</span>.<span class="kw">$userStyle</span>.<span class="st">&quot; on &quot;</span>.<span class="fu">date</span><span class="ot">(</span><span class="kw">DATE_RFC822</span><span class="ot">)</span>
178 <span class="ot">);</span>
179 }
180 <span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/config.ini&#39;</span><span class="ot">))</span> {
181 <span class="co">// Write a config file containing useful informations</span>
182 <span class="fu">file_put_contents</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/config.ini&#39;</span><span class="ot">,</span>
183 <span class="st">&quot;site_url=&quot;</span>.<span class="kw">$url</span>.<span class="st">&quot;</span><span class="kw">\n</span><span class="st">&quot;</span>
184 .<span class="st">&quot;site_name=&quot;</span>.<span class="kw">$name</span>.<span class="st">&quot;</span><span class="kw">\n</span><span class="st">&quot;</span>
185 <span class="ot">);</span>
186 }
187 <span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/home.png&#39;</span><span class="ot">))</span> {
188 <span class="co">// And finally copy generated thumbnail</span>
189 <span class="kw">$homeThumb</span> = <span class="kw">$siteFolder</span>.<span class="st">&#39;/home.png&#39;</span><span class="ot">;</span>
190 <span class="fu">file_put_contents</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/home.png&#39;</span><span class="ot">,</span> <span class="fu">file_get_contents</span><span class="ot">(</span>getThumbnailUrl<span class="ot">(</span><span class="kw">$url</span><span class="ot">)));</span>
191 }
192 <span class="fu">echo</span> <span class="st">&#39;Theme have been downloaded from &lt;a href=&quot;&#39;</span>.<span class="kw">$url</span>.<span class="st">&#39;&quot;&gt;&#39;</span>.<span class="kw">$url</span>.<span class="st">&#39;&lt;/a&gt; into &#39;</span>.<span class="kw">$siteFolder</span>
193 .<span class="st">&#39;. It looks like &lt;img src=&quot;&#39;</span>.<span class="kw">$homeThumb</span>.<span class="st">&#39;&quot;&gt;&lt;br/&gt;&#39;</span><span class="ot">;</span>
194 }
195 }
196}
197
198<span class="kw">function</span> getThumbnailUrl<span class="ot">(</span><span class="kw">$url</span><span class="ot">)</span> {
199 <span class="kw">return</span> <span class="st">&#39;http://api.webthumbnail.org/?url=&#39;</span>.<span class="kw">$url</span><span class="ot">;</span>
200}
201
202<span class="kw">function</span> copyUserStylesFrom<span class="ot">(</span><span class="kw">$urlToNames</span><span class="ot">,</span> <span class="kw">$knownStyles</span><span class="ot">)</span> {
203 <span class="kw">foreach</span><span class="ot">(</span><span class="kw">$urlToNames</span> <span class="kw">as</span> <span class="kw">$url</span> =&gt; <span class="kw">$name</span><span class="ot">)</span> {
204 copyUserStyleFrom<span class="ot">(</span><span class="kw">$url</span><span class="ot">,</span> <span class="kw">$name</span><span class="ot">,</span> <span class="kw">$knownStyles</span><span class="ot">);</span>
205 }
206}
207
208<span class="co">/**</span>
209<span class="co"> * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/</span>
210<span class="co"> * </span><span class="an">@param</span><span class="co"> </span><span class="cv">directory</span><span class="co"> the directory we want to list files of</span>
211<span class="co"> * </span><span class="an">@return</span><span class="co"> a simple array containing the list of absolute file paths. Notice that current file (&quot;.&quot;) and parent one(&quot;..&quot;)</span>
212<span class="co"> * are not listed here</span>
213<span class="co"> */</span>
214<span class="kw">function</span> getDirectoryList <span class="ot">(</span><span class="kw">$directory</span><span class="ot">)</span> {
215 <span class="kw">$realPath</span> = <span class="fu">realpath</span><span class="ot">(</span><span class="kw">$directory</span><span class="ot">);</span>
216 <span class="co">// create an array to hold directory list</span>
217 <span class="kw">$results</span> = <span class="fu">array</span><span class="ot">();</span>
218 <span class="co">// create a handler for the directory</span>
219 <span class="kw">$handler</span> = <span class="fu">opendir</span><span class="ot">(</span><span class="kw">$directory</span><span class="ot">);</span>
220 <span class="co">// open directory and walk through the filenames</span>
221 <span class="kw">while</span> <span class="ot">(</span><span class="kw">$file</span> = <span class="fu">readdir</span><span class="ot">(</span><span class="kw">$handler</span><span class="ot">))</span> {
222 <span class="co">// if file isn&#39;t this directory or its parent, add it to the results</span>
223 <span class="kw">if</span> <span class="ot">(</span><span class="kw">$file</span> != <span class="st">&quot;.&quot;</span> &amp;&amp; <span class="kw">$file</span> != <span class="st">&quot;..&quot;</span><span class="ot">)</span> {
224 <span class="kw">$results</span><span class="ot">[</span> = <span class="fu">realpath</span><span class="ot">(</span><span class="kw">$realPath</span> . <span class="st">&quot;/&quot;</span> . <span class="kw">$file</span><span class="ot">);](</span>-=-<span class="fu">realpath</span><span class="ot">(</span><span class="kw">$realPath</span>-.-<span class="st">&quot;/&quot;</span>-.-<span class="kw">$file</span><span class="ot">);</span>.html<span class="ot">)</span>
225 }
226 }
227 <span class="co">// tidy up: close the handler</span>
228 <span class="fu">closedir</span><span class="ot">(</span><span class="kw">$handler</span><span class="ot">);</span>
229 <span class="co">// done!</span>
230 <span class="kw">return</span> <span class="kw">$results</span><span class="ot">;</span>
231}
232
233<span class="co">/**</span>
234<span class="co"> * Start in themes folder and look in all subfolders for config.ini files. </span>
235<span class="co"> * These config.ini files allow us not to download styles again and again</span>
236<span class="co"> */</span>
237<span class="kw">function</span> findKnownStyles<span class="ot">()</span> {
238 <span class="kw">$result</span> = <span class="fu">array</span><span class="ot">();</span>
239 <span class="kw">$subFolders</span> = getDirectoryList<span class="ot">(</span><span class="st">&quot;themes&quot;</span><span class="ot">);</span>
240 <span class="kw">foreach</span><span class="ot">(</span><span class="kw">$subFolders</span> <span class="kw">as</span> <span class="kw">$folder</span><span class="ot">)</span> {
241 <span class="kw">$configFile</span> = <span class="kw">$folder</span>.<span class="st">&quot;/config.ini&quot;</span><span class="ot">;</span>
242 <span class="kw">if</span><span class="ot">(</span><span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$configFile</span><span class="ot">))</span> {
243 <span class="kw">$iniParameters</span> = <span class="fu">parse_ini_file</span><span class="ot">(</span><span class="kw">$configFile</span><span class="ot">);</span>
244 <span class="fu">array_push</span><span class="ot">(</span><span class="kw">$result</span><span class="ot">,</span> <span class="kw">$iniParameters</span><span class="ot">[</span><span class="st">&#39;site_url&#39;</span><span class="ot">]);[](</span>.html<span class="ot">)</span>
245 }
246 }
247 <span class="kw">return</span> <span class="kw">$result</span><span class="ot">;</span>
248}
249
250<span class="kw">$knownStyles</span> = findKnownStyles<span class="ot">();</span>
251copyUserStylesFrom<span class="ot">(</span>createShaarliHashFromOPMLL<span class="ot">(</span><span class="kw">SHAARLI_RSS_OPML</span><span class="ot">),</span> <span class="kw">$knownStyles</span><span class="ot">);</span>
252
253&lt;!--- <span class="ot">?</span> ----&gt;</code></pre></div>
254</body>
255</html>
diff --git a/doc/Download-CSS-styles-from-an-OPML-list.md b/doc/Download-CSS-styles-from-an-OPML-list.md
deleted file mode 100644
index eb66f955..00000000
--- a/doc/Download-CSS-styles-from-an-OPML-list.md
+++ /dev/null
@@ -1,155 +0,0 @@
1#Download CSS styles from an OPML list
2###Download CSS styles for shaarlis listed in an opml file
3Example php script:
4
5```php
6<!---- ?php -->
7<!---- Copyright (c) 2014 Nicolas Delsaux (https://github.com/Riduidel) -->
8<!---- License: zlib (http://www.gzip.org/zlib/zlib_license.html) -->
9
10/**
11 * Source: https://github.com/Riduidel
12 * Download css styles for shaarlis listed in an opml file
13 */
14define("SHAARLI_RSS_OPML", "https://www.ecirtam.net/shaarlirss/custom/people.opml");
15
16define("THEMES_TEMP_FOLDER", "new_themes");
17
18if(!file_exists(THEMES_TEMP_FOLDER)) {
19 mkdir(THEMES_TEMP_FOLDER);
20}
21
22function siteUrl($pathInSite) {
23 $indexPos = strpos($pathInSite, "index.php");
24 if(!$indexPos) {
25 return $pathInSite;
26 } else {
27 return substr($pathInSite, 0, $indexPos);
28 }
29}
30
31function createShaarliHashFromOPMLL($opmlFile) {
32 $result = array();
33 $opml = file_get_contents($opmlFile);
34 $opmlXml = simplexml_load_string($opml);
35 $outlineElements = $opmlXml->xpath("body/outline");
36 foreach($outlineElements as $site) {
37 $siteUrl = siteUrl((string) $site['htmlUrl']);[](.html)
38 $result[$siteUrl]=((string) $site['text']);[](.html)
39 }
40 return $result;
41}
42
43function getSiteFolder($url) {
44 $domain = parse_url($url, PHP_URL_HOST);
45 return THEMES_TEMP_FOLDER."/".str_replace(".", "_", $domain);
46}
47
48function get_http_response_code($theURL) {
49 $headers = get_headers($theURL);
50 return substr($headers[0], 9, 3);[](.html)
51}
52
53/**
54 * This makes the code PHP-5 only (particularly the call to "get_headers")
55 */
56function copyUserStyleFrom($url, $name, $knownStyles) {
57 $userStyle = $url."inc/user.css";
58 if(in_array($url, $knownStyles)) {
59 // TODO add log message
60 } else {
61 $statusCode = get_http_response_code($userStyle);
62 if(intval($statusCode)<300) {
63 $styleSheet = file_get_contents($userStyle);
64 $siteFolder = getSiteFolder($url);
65 if(!file_exists($siteFolder)) {
66 mkdir($siteFolder);
67 }
68 if(!file_exists($siteFolder.'/user.css')) {
69 // Copy stylesheet
70 file_put_contents($siteFolder.'/user.css', $styleSheet);
71 }
72 if(!file_exists($siteFolder.'/README.md')) {
73 // Then write a readme.md file
74 file_put_contents($siteFolder.'/README.md',
75 "User style from ".$name."\n"
76 ."============================="
77 ."\n\n"
78 ."This stylesheet was downloaded from ".$userStyle." on ".date(DATE_RFC822)
79 );
80 }
81 if(!file_exists($siteFolder.'/config.ini')) {
82 // Write a config file containing useful informations
83 file_put_contents($siteFolder.'/config.ini',
84 "site_url=".$url."\n"
85 ."site_name=".$name."\n"
86 );
87 }
88 if(!file_exists($siteFolder.'/home.png')) {
89 // And finally copy generated thumbnail
90 $homeThumb = $siteFolder.'/home.png';
91 file_put_contents($siteFolder.'/home.png', file_get_contents(getThumbnailUrl($url)));
92 }
93 echo 'Theme have been downloaded from <a href="'.$url.'">'.$url.'</a> into '.$siteFolder
94 .'. It looks like <img src="'.$homeThumb.'"><br/>';
95 }
96 }
97}
98
99function getThumbnailUrl($url) {
100 return 'http://api.webthumbnail.org/?url='.$url;
101}
102
103function copyUserStylesFrom($urlToNames, $knownStyles) {
104 foreach($urlToNames as $url => $name) {
105 copyUserStyleFrom($url, $name, $knownStyles);
106 }
107}
108
109/**
110 * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/
111 * @param directory the directory we want to list files of
112 * @return a simple array containing the list of absolute file paths. Notice that current file (".") and parent one("..")
113 * are not listed here
114 */
115function getDirectoryList ($directory) {
116 $realPath = realpath($directory);
117 // create an array to hold directory list
118 $results = array();
119 // create a handler for the directory
120 $handler = opendir($directory);
121 // open directory and walk through the filenames
122 while ($file = readdir($handler)) {
123 // if file isn't this directory or its parent, add it to the results
124 if ($file != "." && $file != "..") {
125 $results[ = realpath($realPath . "/" . $file);](-=-realpath($realPath-.-"/"-.-$file);.html)
126 }
127 }
128 // tidy up: close the handler
129 closedir($handler);
130 // done!
131 return $results;
132}
133
134/**
135 * Start in themes folder and look in all subfolders for config.ini files.
136 * These config.ini files allow us not to download styles again and again
137 */
138function findKnownStyles() {
139 $result = array();
140 $subFolders = getDirectoryList("themes");
141 foreach($subFolders as $folder) {
142 $configFile = $folder."/config.ini";
143 if(file_exists($configFile)) {
144 $iniParameters = parse_ini_file($configFile);
145 array_push($result, $iniParameters['site_url']);[](.html)
146 }
147 }
148 return $result;
149}
150
151$knownStyles = findKnownStyles();
152copyUserStylesFrom(createShaarliHashFromOPMLL(SHAARLI_RSS_OPML), $knownStyles);
153
154<!--- ? ---->
155```
diff --git a/doc/Download-and-Installation.html b/doc/Download-and-Installation.html
deleted file mode 100644
index b9cac360..00000000
--- a/doc/Download-and-Installation.html
+++ /dev/null
@@ -1,170 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Download and Installation</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="download-and-installation">Download and Installation</h1>
103<h1 id="get-shaarli">Get Shaarli!</h1>
104<p>To install Shaarli, simply place the files in a directory under your webserver's Document Root (or directly at the document root). Make sure your <a href="Server-requirements">server</a> is properly <a href="Server-configuration">configured</a>.<a href=".html"></a></p>
105<p>Several releases are available:</p>
106<hr />
107<h2 id="latest-release-recommended">Latest release (recommended)</h2>
108<h3 id="download-as-an-archive">Download as an archive</h3>
109<p>Get the latest released version from the <a href="https://github.com/shaarli/Shaarli/releases">releases</a> page.<a href=".html"></a></p>
110<p><strong>Download our <em>shaarli-full</em> archive</strong> to include dependencies.</p>
111<p>The current latest released version is <code>v0.8.0</code></p>
112<p>Or in command lines:</p>
113<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">wget</span> https://github.com/shaarli/Shaarli/releases/download/v0.8.0/shaarli-v0.8.0-full.zip
114$ <span class="fu">unzip</span> shaarli-v0.8.0-full.zip
115$ <span class="fu">mv</span> Shaarli /path/to/shaarli/</code></pre></div>
116<table style="width:46%;">
117<colgroup>
118<col style="width: 8%" />
119<col style="width: 37%" />
120</colgroup>
121<thead>
122<tr class="header">
123<th>!</th>
124<th>In most cases, download Shaarli from the <a href="https://github.com/shaarli/Shaarli/releases">releases</a> page. Cloning using <code>git</code> or downloading Github branches as zip files requires additional steps (see below).</th>
125</tr>
126</thead>
127<tbody>
128</tbody>
129</table>
130<h3 id="using-git">Using git</h3>
131<pre><code>mkdir -p /path/to/shaarli &amp;&amp; cd /path/to/shaarli/
132git clone -b v0.8.0 https://github.com/shaarli/Shaarli.git .
133composer update --no-dev</code></pre>
134<hr />
135<h2 id="stable-version">Stable version</h2>
136<p>The stable version has been experienced by Shaarli users, and will receive security updates.</p>
137<h3 id="download-as-an-archive-1">Download as an archive</h3>
138<p>As a .zip archive:</p>
139<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">wget</span> https://github.com/shaarli/Shaarli/archive/stable.zip
140$ <span class="fu">unzip</span> stable.zip
141$ <span class="fu">mv</span> Shaarli-stable /path/to/shaarli/</code></pre></div>
142<p>As a .tar.gz archive :</p>
143<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">wget</span> https://github.com/shaarli/Shaarli/archive/stable.tar.gz
144$ <span class="fu">tar</span> xvf stable.tar.gz
145$ <span class="fu">mv</span> Shaarli-stable /path/to/shaarli/</code></pre></div>
146<h3 id="clone-with-git">Clone with Git</h3>
147<p><a href="https://getcomposer.org/">Composer</a> is required to build a functional Shaarli installation when pulling from git.<a href=".html"></a></p>
148<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">git</span> clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/
149<span class="co"># install/update third-party dependencies</span>
150$ <span class="bu">cd</span> /path/to/shaarli/
151$ <span class="ex">composer</span> update --no-dev</code></pre></div>
152<hr />
153<h2 id="development-version-mainline">Development version (mainline)</h2>
154<p><em>Use at your own risk!</em></p>
155<p>To get the latest changes from the <code>master</code> branch:</p>
156<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># clone the repository </span>
157$ <span class="fu">git</span> clone https://github.com/shaarli/Shaarli.git master /path/to/shaarli/
158<span class="co"># install/update third-party dependencies</span>
159$ <span class="bu">cd</span> /path/to/shaarli
160$ <span class="ex">composer</span> update --no-dev</code></pre></div>
161<hr />
162<h2 id="finish-installation">Finish Installation</h2>
163<p>Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.</p>
164<p><img src="http://i.imgur.com/wuMpDSN.png" alt="install screenshot" /><a href=".html"></a></p>
165<p>Setup your Shaarli installation, and it's ready to use!</p>
166<hr />
167<h2 id="updating-shaarli">Updating Shaarli</h2>
168<p>See <a href="Upgrade-and-migration">Upgrade and Migration</a><a href=".html"></a></p>
169</body>
170</html>
diff --git a/doc/Download-and-Installation.md b/doc/Download-and-Installation.md
deleted file mode 100644
index 32df8984..00000000
--- a/doc/Download-and-Installation.md
+++ /dev/null
@@ -1,102 +0,0 @@
1#Download and Installation
2# Get Shaarli!
3
4To install Shaarli, simply place the files in a directory under your webserver's Document Root (or directly at the document root). Make sure your [server](Server-requirements) is properly [configured](Server-configuration).[](.html)
5
6Several releases are available:
7
8--------------------------------------------------------
9
10## Latest release (recommended)
11### Download as an archive
12Get the latest released version from the [releases](https://github.com/shaarli/Shaarli/releases) page.[](.html)
13
14**Download our *shaarli-full* archive** to include dependencies.
15
16The current latest released version is `v0.8.0`
17
18Or in command lines:
19
20```bash
21$ wget https://github.com/shaarli/Shaarli/releases/download/v0.8.0/shaarli-v0.8.0-full.zip
22$ unzip shaarli-v0.8.0-full.zip
23$ mv Shaarli /path/to/shaarli/
24```
25
26| ! |In most cases, download Shaarli from the [releases](https://github.com/shaarli/Shaarli/releases) page. Cloning using `git` or downloading Github branches as zip files requires additional steps (see below).|[](.html)
27|-----|--------------------------|
28
29### Using git
30
31```
32mkdir -p /path/to/shaarli && cd /path/to/shaarli/
33git clone -b v0.8.0 https://github.com/shaarli/Shaarli.git .
34composer update --no-dev
35```
36
37--------------------------------------------------------
38
39## Stable version
40
41The stable version has been experienced by Shaarli users, and will receive security updates.
42
43### Download as an archive
44
45As a .zip archive:
46
47```bash
48$ wget https://github.com/shaarli/Shaarli/archive/stable.zip
49$ unzip stable.zip
50$ mv Shaarli-stable /path/to/shaarli/
51```
52
53As a .tar.gz archive :
54
55```bash
56$ wget https://github.com/shaarli/Shaarli/archive/stable.tar.gz
57$ tar xvf stable.tar.gz
58$ mv Shaarli-stable /path/to/shaarli/
59```
60
61### Clone with Git
62
63[Composer](https://getcomposer.org/) is required to build a functional Shaarli installation when pulling from git.[](.html)
64
65```bash
66$ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/
67# install/update third-party dependencies
68$ cd /path/to/shaarli/
69$ composer update --no-dev
70```
71
72--------------------------------------------------------
73
74## Development version (mainline)
75
76_Use at your own risk!_
77
78To get the latest changes from the `master` branch:
79
80```bash
81# clone the repository
82$ git clone https://github.com/shaarli/Shaarli.git master /path/to/shaarli/
83# install/update third-party dependencies
84$ cd /path/to/shaarli
85$ composer update --no-dev
86```
87
88--------------------------------------------------------
89
90## Finish Installation
91
92Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.
93
94![install screenshot](http://i.imgur.com/wuMpDSN.png)[](.html)
95
96Setup your Shaarli installation, and it's ready to use!
97
98--------------------------------------------------------
99
100## Updating Shaarli
101
102See [Upgrade and Migration](Upgrade-and-migration)[](.html)
diff --git a/doc/Example-patch---add-new-via-field-for-links.html b/doc/Example-patch---add-new-via-field-for-links.html
deleted file mode 100644
index 133224e2..00000000
--- a/doc/Example-patch---add-new-via-field-for-links.html
+++ /dev/null
@@ -1,252 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Example patch add new via field for links</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="example-patch-add-new-via-field-for-links">Example patch add new via field for links</h1>
66<p>Example patch to add a new field (&quot;via&quot;) for links, an input field to set the &quot;via&quot; property from the &quot;edit link&quot; dialog, and display the &quot;via&quot; field in the link list display. <strong>Untested, use at your own risk</strong></p>
67<p>Thanks to @Knah-Tsaeb in <a href="https://github.com/sebsauvage/Shaarli/pull/158" class="uri">https://github.com/sebsauvage/Shaarli/pull/158</a></p>
68<pre><code>From e0f363c18e8fe67990ed2bb1a08652e24e70bbcb Mon Sep 17 00:00:00 2001
69From: Knah Tsaeb &lt;knah-tsaeb@knah-tsaeb.org&gt;
70Date: Fri, 11 Oct 2013 15:18:37 +0200
71Subject: [PATCH] Add a &quot;via&quot;/origin property for links, add new input in &quot;edit link&quot; dialog[](.html)
72Thanks to:
73* https://github.com/Knah-Tsaeb/Shaarli/commit/040eb18ec8cdabd5ea855e108f81f97fbf0478c4
74* https://github.com/Knah-Tsaeb/Shaarli/commit/4123658eae44d7564d1128ce52ddd5689efee813
75* https://github.com/Knah-Tsaeb/Shaarli/commit/f1a8ca9cc8fe49b119d51b2d8382cc1a34542f96
76
77---
78 index.php | 43 ++++++++++++++++++++++++++++++++-----------
79 tpl/editlink.html | 1 +
80 tpl/linklist.html | 1 +
81 3 files changed, 34 insertions(+), 11 deletions(-)
82
83diff --git a/index.php b/index.php
84index 6fae2f8..53f798e 100644
85--- a/index.php
86+++ b/index.php
87@@ -436,6 +436,12 @@ if (isset($_POST[&#39;login&#39;]))[](.html)
88 // ------------------------------------------------------------------------------------------
89 // Misc utility functions:
90
91+// Try to get just domain for @via
92+function getJustDomain($url){
93+ $parts = parse_url($url);
94+ return trim($parts[&#39;host&#39;]);[](.html)
95+ }
96+
97 // Returns the server URL (including port and http/https), without path.
98 // e.g. &quot;http://myserver.com:8080&quot;
99 // You can append $_SERVER[&#39;SCRIPT_NAME&#39;] to get the current script URL.[](.html)
100@@ -799,7 +805,8 @@ class linkdb implements Iterator, Countable, ArrayAccess
101 $found= (strpos(strtolower($l[&#39;title&#39;]),$s)!==false)[](.html)
102 || (strpos(strtolower($l[&#39;description&#39;]),$s)!==false)[](.html)
103 || (strpos(strtolower($l[&#39;url&#39;]),$s)!==false)[](.html)
104- || (strpos(strtolower($l[&#39;tags&#39;]),$s)!==false);[](.html)
105+ || (strpos(strtolower($l[&#39;tags&#39;]),$s)!==false)[](.html)
106+ || (!empty($l[&#39;via&#39;]) &amp;&amp; (strpos(strtolower($l[&#39;via&#39;]),$s)!==false));[](.html)
107 if ($found) $filtered[$l[&#39;linkdate&#39;[ = $l;](-=-$l;.html)
108 }
109 krsort($filtered);
110@@ -814,7 +821,7 @@ class linkdb implements Iterator, Countable, ArrayAccess
111 $t = str_replace(&#39;,&#39;,&#39; &#39;,($casesensitive?$tags:strtolower($tags)));
112 $searchtags=explode(&#39; &#39;,$t);
113 $filtered=array();
114- foreach($this-&gt;links as $l)
115+ foreach($this-&gt; links as $l)
116 {
117 $linktags = explode(&#39; &#39;,($casesensitive?$l[&#39;tags&#39;]:strtolower($l[&#39;tags&#39;])));[](.html)
118 if (count(array_intersect($linktags,$searchtags)) == count($searchtags))
119@@ -905,7 +912,7 @@ function showRSS()
120 else $linksToDisplay = $LINKSDB;
121 $nblinksToDisplay = 50; // Number of links to display.
122 if (!empty($_GET[&#39;nb&#39;])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
123- {
124+ {
125 $nblinksToDisplay = $_GET[&#39;nb&#39;]==&#39;all&#39; ? count($linksToDisplay) : max($_GET[&#39;nb&#39;]+0,1) ;[](.html)
126 }
127
128@@ -944,7 +951,12 @@ function showRSS()
129 // If user wants permalinks first, put the final link in description
130 if ($usepermalinks===true) $descriptionlink = &#39;(&lt;a href=&quot;&#39;.$absurl.&#39;&quot;&gt;Link&lt;/a&gt;)&#39;;
131 if (strlen($link[&#39;description&#39;])&gt;0) $descriptionlink = &#39;&lt;br&gt;&#39;.$descriptionlink;[](.html)
132- echo &#39;&lt;description&gt;&lt;![CDATA[&#39;.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link[&#39;description&#39;])))).$descriptionlink.&#39;[&gt;&lt;/description&gt;&#39;.&quot;\n&lt;/item&gt;\n&quot;;](&gt;&lt;/description&gt;&#39;.&quot;\n&lt;/item&gt;\n&quot;;.html)
133+ if(!empty($link[&#39;via&#39;])){[](.html)
134+ $via = &#39;&lt;br&gt;Origine =&gt; &lt;a href=&quot;&#39;.htmlspecialchars($link[&#39;via&#39;]).&#39;&quot;&gt;&#39;.htmlspecialchars(getJustDomain($link[&#39;via&#39;])).&#39;&lt;/a&gt;&#39;;[](.html)
135+ } else {
136+ $via = &#39;&#39;;
137+ }
138+ echo &#39;&lt;description&gt;&lt;![CDATA[&#39;.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link[&#39;description&#39;])))).$via.$descriptionlink.&#39;[&gt;&lt;/description&gt;&#39;.&quot;\n&lt;/item&gt;\n&quot;;](&gt;&lt;/description&gt;&#39;.&quot;\n&lt;/item&gt;\n&quot;;.html)
139 $i++;
140 }
141 echo &#39;&lt;/channel&gt;&lt;/rss&gt;&lt;!-- Cached version of &#39;.htmlspecialchars(pageUrl()).&#39; --&gt;&#39;;
142@@ -980,7 +992,7 @@ function showATOM()
143 else $linksToDisplay = $LINKSDB;
144 $nblinksToDisplay = 50; // Number of links to display.
145 if (!empty($_GET[&#39;nb&#39;])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
146- {
147+ {
148 $nblinksToDisplay = $_GET[&#39;nb&#39;]==&#39;all&#39; ? count($linksToDisplay) : max($_GET[&#39;nb&#39;]+0,1) ;[](.html)
149 }
150
151@@ -1006,11 +1018,16 @@ function showATOM()
152
153 // Add permalink in description
154 $descriptionlink = htmlspecialchars(&#39;(&lt;a href=&quot;&#39;.$guid.&#39;&quot;&gt;Permalink&lt;/a&gt;)&#39;);
155+ if(isset($link[&#39;via&#39;]) &amp;&amp; !empty($link[&#39;via&#39;])){[](.html)
156+ $via = htmlspecialchars(&#39;&lt;/br&gt; Origine =&gt; &lt;a href=&quot;&#39;.$link[&#39;via&#39;].&#39;&quot;&gt;&#39;.getJustDomain($link[&#39;via&#39;]).&#39;&lt;/a&gt;&#39;);[](.html)
157+ } else {
158+ $via = &#39;&#39;;
159+ }
160 // If user wants permalinks first, put the final link in description
161 if ($usepermalinks===true) $descriptionlink = htmlspecialchars(&#39;(&lt;a href=&quot;&#39;.$absurl.&#39;&quot;&gt;Link&lt;/a&gt;)&#39;);
162 if (strlen($link[&#39;description&#39;])&gt;0) $descriptionlink = &#39;&amp;lt;br&amp;gt;&#39;.$descriptionlink;[](.html)
163
164- $entries.=&#39;&lt;content type=&quot;html&quot;&gt;&#39;.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link[&#39;description&#39;]))))).$descriptionlink.&quot;&lt;/content&gt;\n&quot;;[](.html)
165+ $entries.=&#39;&lt;content type=&quot;html&quot;&gt;&#39;.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link[&#39;description&#39;]))))).$descriptionlink.$via.&quot;&lt;/content&gt;\n&quot;;[](.html)
166 if ($link[&#39;tags&#39;]!=&#39;&#39;) // Adding tags to each ATOM entry (as mentioned in ATOM specification)[](.html)
167 {
168 foreach(explode(&#39; &#39;,$link[&#39;tags&#39;]) as $tag)[](.html)
169@@ -1478,7 +1495,7 @@ function renderPage()
170 if (!startsWith($url,&#39;http:&#39;) &amp;&amp; !startsWith($url,&#39;https:&#39;) &amp;&amp; !startsWith($url,&#39;ftp:&#39;) &amp;&amp; !startsWith($url,&#39;magnet:&#39;) &amp;&amp; !startsWith($url,&#39;?&#39;))
171 $url = &#39;http://&#39;.$url;
172 $link = array(&#39;title&#39;=&gt;trim($_POST[&#39;lf_title&#39;]),&#39;url&#39;=&gt;$url,&#39;description&#39;=&gt;trim($_POST[&#39;lf_description&#39;]),&#39;private&#39;=&gt;(isset($_POST[&#39;lf_private&#39;]) ? 1 : 0),[](.html)
173- &#39;linkdate&#39;=&gt;$linkdate,&#39;tags&#39;=&gt;str_replace(&#39;,&#39;,&#39; &#39;,$tags));
174+ &#39;linkdate&#39;=&gt;$linkdate,&#39;tags&#39;=&gt;str_replace(&#39;,&#39;,&#39; &#39;,$tags), &#39;via&#39;=&gt;trim($_POST[&#39;lf_via&#39;]));[](.html)
175 if ($link[&#39;title&#39;]==&#39;&#39;) $link[&#39;title&#39;]=$link[&#39;url&#39;]; // If title is empty, use the URL as title.[](.html)
176 $LINKSDB[$linkdate] = $link;[](.html)
177 $LINKSDB-&gt;savedb(); // Save to disk.
178@@ -1556,7 +1573,8 @@ function renderPage()
179 $title = (empty($_GET[&#39;title&#39;]) ? &#39;&#39; : $_GET[&#39;title&#39;] ); // Get title if it was provided in URL (by the bookmarklet).[](.html)
180 $description = (empty($_GET[&#39;description&#39;]) ? &#39;&#39; : $_GET[&#39;description&#39;]); // Get description if it was provided in URL (by the bookmarklet). [Bronco added that][](.html)
181 $tags = (empty($_GET[&#39;tags&#39;]) ? &#39;&#39; : $_GET[&#39;tags&#39;] ); // Get tags if it was provided in URL[](.html)
182- $private = (!empty($_GET[&#39;private&#39;]) &amp;&amp; $_GET[&#39;private&#39;] === &quot;1&quot; ? 1 : 0); // Get private if it was provided in URL [](.html)
183+ $via = (empty($_GET[&#39;via&#39;]) ? &#39;&#39; : $_GET[&#39;via&#39;] );[](.html)
184+ $private = (!empty($_GET[&#39;private&#39;]) &amp;&amp; $_GET[&#39;private&#39;] === &quot;1&quot; ? 1 : 0); // Get private if it was provided in URL[](.html)
185 if (($url!=&#39;&#39;) &amp;&amp; parse_url($url,PHP_URL_SCHEME)==&#39;&#39;) $url = &#39;http://&#39;.$url;
186 // If this is an HTTP link, we try go get the page to extract the title (otherwise we will to straight to the edit form.)
187 if (empty($title) &amp;&amp; parse_url($url,PHP_URL_SCHEME)==&#39;http&#39;)
188@@ -1567,7 +1585,7 @@ function renderPage()
189 {
190 // Look for charset in html header.
191 preg_match(&#39;#&lt;meta .*charset=.*&gt;#Usi&#39;, $data, $meta);
192-
193+
194 // If found, extract encoding.
195 if (!empty($meta[0]))[](.html)
196 {
197@@ -1577,7 +1595,7 @@ function renderPage()
198 $html_charset = (!empty($enc[1])) ? strtolower($enc[1]) : &#39;utf-8&#39;;[](.html)
199 }
200 else { $html_charset = &#39;utf-8&#39;; }
201-
202+
203 // Extract title
204 $title = html_extract_title($data);
205 if (!empty($title))
206@@ -1592,7 +1610,7 @@ function renderPage()
207 $url=&#39;?&#39;.smallHash($linkdate);
208 $title=&#39;Note: &#39;;
209 }
210- $link = array(&#39;linkdate&#39;=&gt;$linkdate,&#39;title&#39;=&gt;$title,&#39;url&#39;=&gt;$url,&#39;description&#39;=&gt;$description,&#39;tags&#39;=&gt;$tags,&#39;private&#39;=&gt;$private);
211+ $link = array(&#39;linkdate&#39;=&gt;$linkdate,&#39;title&#39;=&gt;$title,&#39;url&#39;=&gt;$url,&#39;description&#39;=&gt;$description,&#39;tags&#39;=&gt;$tags,&#39;via&#39; =&gt; $via,&#39;private&#39;=&gt;$private);
212 }
213
214 $PAGE = new pageBuilder;
215@@ -1842,6 +1860,9 @@ function buildLinkList($PAGE,$LINKSDB)
216 $taglist = explode(&#39; &#39;,$link[&#39;tags&#39;]);[](.html)
217 uasort($taglist, &#39;strcasecmp&#39;);
218 $link[&#39;taglist&#39;]=$taglist;[](.html)
219+ if(!empty($link[&#39;via&#39;])){[](.html)
220+ $link[&#39;via&#39;]=htmlspecialchars($link[&#39;via&#39;]);[](.html)
221+ }
222 $linkDisp[$keys[$i[ = $link;](-=-$link;.html)
223 $i++;
224 }
225diff --git a/tpl/editlink.html b/tpl/editlink.html
226index 4a2c30c..14d4f9c 100644
227--- a/tpl/editlink.html
228+++ b/tpl/editlink.html
229@@ -16,6 +16,7 @@
230 &lt;i&gt;Title&lt;/i&gt;&lt;br&gt;&lt;input type=&quot;text&quot; name=&quot;lf_title&quot; value=&quot;{$link.title|htmlspecialchars}&quot; style=&quot;width:100%&quot;&gt;&lt;br&gt;
231 &lt;i&gt;Description&lt;/i&gt;&lt;br&gt;&lt;textarea name=&quot;lf_description&quot; rows=&quot;4&quot; cols=&quot;25&quot; style=&quot;width:100%&quot;&gt;{$link.description|htmlspecialchars}&lt;/textarea&gt;&lt;br&gt;
232 &lt;i&gt;Tags&lt;/i&gt;&lt;br&gt;&lt;input type=&quot;text&quot; id=&quot;lf_tags&quot; name=&quot;lf_tags&quot; value=&quot;{$link.tags|htmlspecialchars}&quot; style=&quot;width:100%&quot;&gt;&lt;br&gt;
233+ &lt;i&gt;Origine&lt;/i&gt;&lt;br&gt;&lt;input type=&quot;text&quot; name=&quot;lf_via&quot; value=&quot;{$link.via|htmlspecialchars}&quot; style=&quot;width:100%&quot;&gt;&lt;br&gt;
234 {if condition=&quot;($link_is_new &amp;&amp; $GLOBALS[&#39;privateLinkByDefault&#39;]==true) || $link.private == true&quot;}[](.html)
235 &lt;input type=&quot;checkbox&quot; checked=&quot;checked&quot; name=&quot;lf_private&quot; id=&quot;lf_private&quot;&gt;
236 &amp;nbsp;&lt;label for=&quot;lf_private&quot;&gt;&lt;i&gt;Private&lt;/i&gt;&lt;/label&gt;&lt;br&gt;
237diff --git a/tpl/linklist.html b/tpl/linklist.html
238index ddc38cb..0a8475f 100644
239--- a/tpl/linklist.html
240+++ b/tpl/linklist.html
241@@ -43,6 +43,7 @@
242 &lt;span class=&quot;linktitle&quot;&gt;&lt;a href=&quot;{$redirector}{$value.url|htmlspecialchars}&quot;&gt;{$value.title|htmlspecialchars}&lt;/a&gt;&lt;/span&gt;
243 &lt;br&gt;
244 {if=&quot;$value.description&quot;}&lt;div class=&quot;linkdescription&quot;{if condition=&quot;$search_type==&#39;permalink&#39;&quot;} style=&quot;max-height:none !important;&quot;{/if}&gt;{$value.description}&lt;/div&gt;{/if}
245+ {if condition=&quot;isset($value.via) &amp;&amp; !empty($value.via)&quot;}&lt;div&gt;&lt;a href=&quot;{$value.via}&quot;&gt;Origine =&gt; {$value.via|getJustDomain}&lt;/a&gt;&lt;/div&gt;{/if}
246 {if=&quot;!$GLOBALS[&#39;config&#39;[&#39;HIDE_TIMESTAMPS&#39;] || isLoggedIn()&quot;}](&#39;HIDE_TIMESTAMPS&#39;]-||-isLoggedIn()&quot;}.html)
247 &lt;span class=&quot;linkdate&quot; title=&quot;Permalink&quot;&gt;&lt;a href=&quot;?{$value.linkdate|smallHash}&quot;&gt;{$value.localdate|htmlspecialchars} - permalink&lt;/a&gt; - &lt;/span&gt;
248 {else}
249--
2502.1.1</code></pre>
251</body>
252</html>
diff --git a/doc/Example-patch---add-new-via-field-for-links.md b/doc/Example-patch---add-new-via-field-for-links.md
deleted file mode 100644
index 883adf40..00000000
--- a/doc/Example-patch---add-new-via-field-for-links.md
+++ /dev/null
@@ -1,190 +0,0 @@
1#Example patch add new via field for links
2Example patch to add a new field ("via") for links, an input field to set the "via" property from the "edit link" dialog, and display the "via" field in the link list display. **Untested, use at your own risk**
3
4Thanks to @Knah-Tsaeb in https://github.com/sebsauvage/Shaarli/pull/158
5
6```
7From e0f363c18e8fe67990ed2bb1a08652e24e70bbcb Mon Sep 17 00:00:00 2001
8From: Knah Tsaeb <knah-tsaeb@knah-tsaeb.org>
9Date: Fri, 11 Oct 2013 15:18:37 +0200
10Subject: [PATCH] Add a "via"/origin property for links, add new input in "edit link" dialog[](.html)
11Thanks to:
12* https://github.com/Knah-Tsaeb/Shaarli/commit/040eb18ec8cdabd5ea855e108f81f97fbf0478c4
13* https://github.com/Knah-Tsaeb/Shaarli/commit/4123658eae44d7564d1128ce52ddd5689efee813
14* https://github.com/Knah-Tsaeb/Shaarli/commit/f1a8ca9cc8fe49b119d51b2d8382cc1a34542f96
15
16---
17 index.php | 43 ++++++++++++++++++++++++++++++++-----------
18 tpl/editlink.html | 1 +
19 tpl/linklist.html | 1 +
20 3 files changed, 34 insertions(+), 11 deletions(-)
21
22diff --git a/index.php b/index.php
23index 6fae2f8..53f798e 100644
24--- a/index.php
25+++ b/index.php
26@@ -436,6 +436,12 @@ if (isset($_POST['login']))[](.html)
27 // ------------------------------------------------------------------------------------------
28 // Misc utility functions:
29
30+// Try to get just domain for @via
31+function getJustDomain($url){
32+ $parts = parse_url($url);
33+ return trim($parts['host']);[](.html)
34+ }
35+
36 // Returns the server URL (including port and http/https), without path.
37 // e.g. "http://myserver.com:8080"
38 // You can append $_SERVER['SCRIPT_NAME'] to get the current script URL.[](.html)
39@@ -799,7 +805,8 @@ class linkdb implements Iterator, Countable, ArrayAccess
40 $found= (strpos(strtolower($l['title']),$s)!==false)[](.html)
41 || (strpos(strtolower($l['description']),$s)!==false)[](.html)
42 || (strpos(strtolower($l['url']),$s)!==false)[](.html)
43- || (strpos(strtolower($l['tags']),$s)!==false);[](.html)
44+ || (strpos(strtolower($l['tags']),$s)!==false)[](.html)
45+ || (!empty($l['via']) && (strpos(strtolower($l['via']),$s)!==false));[](.html)
46 if ($found) $filtered[$l['linkdate'[ = $l;](-=-$l;.html)
47 }
48 krsort($filtered);
49@@ -814,7 +821,7 @@ class linkdb implements Iterator, Countable, ArrayAccess
50 $t = str_replace(',',' ',($casesensitive?$tags:strtolower($tags)));
51 $searchtags=explode(' ',$t);
52 $filtered=array();
53- foreach($this->links as $l)
54+ foreach($this-> links as $l)
55 {
56 $linktags = explode(' ',($casesensitive?$l['tags']:strtolower($l['tags'])));[](.html)
57 if (count(array_intersect($linktags,$searchtags)) == count($searchtags))
58@@ -905,7 +912,7 @@ function showRSS()
59 else $linksToDisplay = $LINKSDB;
60 $nblinksToDisplay = 50; // Number of links to display.
61 if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
62- {
63+ {
64 $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;[](.html)
65 }
66
67@@ -944,7 +951,12 @@ function showRSS()
68 // If user wants permalinks first, put the final link in description
69 if ($usepermalinks===true) $descriptionlink = '(<a href="'.$absurl.'">Link</a>)';
70 if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink;[](.html)
71- echo '<description><![CDATA['.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description'])))).$descriptionlink.'[></description>'."\n</item>\n";](></description>'."\n</item>\n";.html)
72+ if(!empty($link['via'])){[](.html)
73+ $via = '<br>Origine => <a href="'.htmlspecialchars($link['via']).'">'.htmlspecialchars(getJustDomain($link['via'])).'</a>';[](.html)
74+ } else {
75+ $via = '';
76+ }
77+ echo '<description><![CDATA['.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description'])))).$via.$descriptionlink.'[></description>'."\n</item>\n";](></description>'."\n</item>\n";.html)
78 $i++;
79 }
80 echo '</channel></rss><!-- Cached version of '.htmlspecialchars(pageUrl()).' -->';
81@@ -980,7 +992,7 @@ function showATOM()
82 else $linksToDisplay = $LINKSDB;
83 $nblinksToDisplay = 50; // Number of links to display.
84 if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
85- {
86+ {
87 $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;[](.html)
88 }
89
90@@ -1006,11 +1018,16 @@ function showATOM()
91
92 // Add permalink in description
93 $descriptionlink = htmlspecialchars('(<a href="'.$guid.'">Permalink</a>)');
94+ if(isset($link['via']) && !empty($link['via'])){[](.html)
95+ $via = htmlspecialchars('</br> Origine => <a href="'.$link['via'].'">'.getJustDomain($link['via']).'</a>');[](.html)
96+ } else {
97+ $via = '';
98+ }
99 // If user wants permalinks first, put the final link in description
100 if ($usepermalinks===true) $descriptionlink = htmlspecialchars('(<a href="'.$absurl.'">Link</a>)');
101 if (strlen($link['description'])>0) $descriptionlink = '&lt;br&gt;'.$descriptionlink;[](.html)
102
103- $entries.='<content type="html">'.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink."</content>\n";[](.html)
104+ $entries.='<content type="html">'.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink.$via."</content>\n";[](.html)
105 if ($link['tags']!='') // Adding tags to each ATOM entry (as mentioned in ATOM specification)[](.html)
106 {
107 foreach(explode(' ',$link['tags']) as $tag)[](.html)
108@@ -1478,7 +1495,7 @@ function renderPage()
109 if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?'))
110 $url = 'http://'.$url;
111 $link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0),[](.html)
112- 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags));
113+ 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags), 'via'=>trim($_POST['lf_via']));[](.html)
114 if ($link['title']=='') $link['title']=$link['url']; // If title is empty, use the URL as title.[](.html)
115 $LINKSDB[$linkdate] = $link;[](.html)
116 $LINKSDB->savedb(); // Save to disk.
117@@ -1556,7 +1573,8 @@ function renderPage()
118 $title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet).[](.html)
119 $description = (empty($_GET['description']) ? '' : $_GET['description']); // Get description if it was provided in URL (by the bookmarklet). [Bronco added that][](.html)
120 $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); // Get tags if it was provided in URL[](.html)
121- $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL [](.html)
122+ $via = (empty($_GET['via']) ? '' : $_GET['via'] );[](.html)
123+ $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL[](.html)
124 if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url;
125 // If this is an HTTP link, we try go get the page to extract the title (otherwise we will to straight to the edit form.)
126 if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http')
127@@ -1567,7 +1585,7 @@ function renderPage()
128 {
129 // Look for charset in html header.
130 preg_match('#<meta .*charset=.*>#Usi', $data, $meta);
131-
132+
133 // If found, extract encoding.
134 if (!empty($meta[0]))[](.html)
135 {
136@@ -1577,7 +1595,7 @@ function renderPage()
137 $html_charset = (!empty($enc[1])) ? strtolower($enc[1]) : 'utf-8';[](.html)
138 }
139 else { $html_charset = 'utf-8'; }
140-
141+
142 // Extract title
143 $title = html_extract_title($data);
144 if (!empty($title))
145@@ -1592,7 +1610,7 @@ function renderPage()
146 $url='?'.smallHash($linkdate);
147 $title='Note: ';
148 }
149- $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>$private);
150+ $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'via' => $via,'private'=>$private);
151 }
152
153 $PAGE = new pageBuilder;
154@@ -1842,6 +1860,9 @@ function buildLinkList($PAGE,$LINKSDB)
155 $taglist = explode(' ',$link['tags']);[](.html)
156 uasort($taglist, 'strcasecmp');
157 $link['taglist']=$taglist;[](.html)
158+ if(!empty($link['via'])){[](.html)
159+ $link['via']=htmlspecialchars($link['via']);[](.html)
160+ }
161 $linkDisp[$keys[$i[ = $link;](-=-$link;.html)
162 $i++;
163 }
164diff --git a/tpl/editlink.html b/tpl/editlink.html
165index 4a2c30c..14d4f9c 100644
166--- a/tpl/editlink.html
167+++ b/tpl/editlink.html
168@@ -16,6 +16,7 @@
169 <i>Title</i><br><input type="text" name="lf_title" value="{$link.title|htmlspecialchars}" style="width:100%"><br>
170 <i>Description</i><br><textarea name="lf_description" rows="4" cols="25" style="width:100%">{$link.description|htmlspecialchars}</textarea><br>
171 <i>Tags</i><br><input type="text" id="lf_tags" name="lf_tags" value="{$link.tags|htmlspecialchars}" style="width:100%"><br>
172+ <i>Origine</i><br><input type="text" name="lf_via" value="{$link.via|htmlspecialchars}" style="width:100%"><br>
173 {if condition="($link_is_new && $GLOBALS['privateLinkByDefault']==true) || $link.private == true"}[](.html)
174 <input type="checkbox" checked="checked" name="lf_private" id="lf_private">
175 &nbsp;<label for="lf_private"><i>Private</i></label><br>
176diff --git a/tpl/linklist.html b/tpl/linklist.html
177index ddc38cb..0a8475f 100644
178--- a/tpl/linklist.html
179+++ b/tpl/linklist.html
180@@ -43,6 +43,7 @@
181 <span class="linktitle"><a href="{$redirector}{$value.url|htmlspecialchars}">{$value.title|htmlspecialchars}</a></span>
182 <br>
183 {if="$value.description"}<div class="linkdescription"{if condition="$search_type=='permalink'"} style="max-height:none !important;"{/if}>{$value.description}</div>{/if}
184+ {if condition="isset($value.via) && !empty($value.via)"}<div><a href="{$value.via}">Origine => {$value.via|getJustDomain}</a></div>{/if}
185 {if="!$GLOBALS['config'['HIDE_TIMESTAMPS'] || isLoggedIn()"}]('HIDE_TIMESTAMPS']-||-isLoggedIn()"}.html)
186 <span class="linkdate" title="Permalink"><a href="?{$value.linkdate|smallHash}">{$value.localdate|htmlspecialchars} - permalink</a> - </span>
187 {else}
188--
1892.1.1
190```
diff --git a/doc/FAQ.html b/doc/FAQ.html
deleted file mode 100644
index 61f3475f..00000000
--- a/doc/FAQ.html
+++ /dev/null
@@ -1,105 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – FAQ</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="faq">FAQ</h1>
66<h3 id="why-did-you-create-shaarli">Why did you create Shaarli ?</h3>
67<p>I was a StumbleUpon user. Then I got fed up with they big toolbar. I switched to delicious, which was lighter, faster and more beautiful. Until Yahoo bought it. Then the export API broke all the time, delicious became slow and was ditched by Yahoo. I switched to Diigo, which is not bad, but does too much. And Diigo is sslllooooowww and their Firefox extension a bit buggy. And… oh… <strong>their Firefox addon sends to Diigo every single URL you visit</strong> (Don't believe me ? Use <a href="https://addons.mozilla.org/en-US/firefox/addon/tamper-data/">Tamper Data</a> and open any page).<a href=".html"></a></p>
68<p>Enough is enough. Saving simple links should not be a complicated heavy thing. I ditched them all and wrote my own: Shaarli. It's simple, but it does the job and does it well. And my data is not hosted on a foreign server, but on my server.</p>
69<h3 id="why-use-shaarli-and-not-deliciousdiigo">Why use Shaarli and not Delicious/Diigo ?</h3>
70<p>With Shaarli:</p>
71<ul>
72<li>The data is yours: It's hosted on your server.</li>
73<li>Never fear of having your data locked-in.</li>
74<li>Never fear to have your data sold to third party.</li>
75<li>Your private links are not hosted on a third party server.</li>
76<li>You are not tracked by browser addons (like Diigo does)</li>
77<li>You can change the look and feel of the pages if you want.</li>
78<li>You can change the behaviour of the program.</li>
79<li>It's magnitude faster than most bookmarking services.</li>
80</ul>
81<h3 id="what-does-shaarli-mean">What does Shaarli mean?</h3>
82<p>Shaarli is for shaaring your links.</p>
83<h3 id="my-shaarli-is-broken">My Shaarli is broken!</h3>
84<p>First of all, ensure that both the <a href="Server-configuration">web server</a> and <a href="Shaarli-configuration">Shaarli</a> are correctly configured, and that your installation is <a href="Server-requirements">supported</a>.<a href=".html"></a></p>
85<p>If everything looks right but the issue(s) remain(s), please:</p>
86<ul>
87<li>take a look at the <a href="Troubleshooting">troubleshooting</a> section<a href=".html"></a></li>
88<li>come <a href="https://gitter.im/shaarli/Shaarli">chat with us</a> on Gitter, we'll be happy to help ;-)<a href=".html"></a></li>
89<li>browse active <a href="https://github.com/shaarli/Shaarli/issues">issues</a> and <a href="https://github.com/shaarli/Shaarli/pulls">Pull Requests</a><a href=".html"></a>
90<ul>
91<li>if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)</li>
92<li>else, <a href="https://github.com/shaarli/Shaarli/issues/new">open a new issue</a>, and provide information about the problem:<a href=".html"></a>
93<ul>
94<li><em>what happens?</em> - display glitches, invalid data, security flaws...</li>
95<li><em>what is your configuration?</em> - OS, server version, activated extensions, web browser...</li>
96<li><em>is it reproducible?</em></li>
97</ul></li>
98</ul></li>
99</ul>
100<h3 id="why-not-use-a-real-database-files-are-slow">Why not use a real database? Files are slow!</h3>
101<p>Does browsing <a href="http://sebsauvage.net/links/">this page</a> feel slow? Try browsing older pages, too.<a href=".html"></a></p>
102<p>It's not slow at all, is it? And don't forget the database contains more than 16000 links, and it's on a shared host, with 32000 visitors/day for my website alone. And it's still damn fast. Why?</p>
103<p>The data file is only 3.7 Mb. It's read 99% of the time, and is probably already in the operation system disk cache. So generating a page involves no I/O at all most of the time.</p>
104</body>
105</html>
diff --git a/doc/Firefox-share.html b/doc/Firefox-share.html
deleted file mode 100644
index d7dcc282..00000000
--- a/doc/Firefox-share.html
+++ /dev/null
@@ -1,93 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Firefox share</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="firefox-share">Firefox share</h1>
66<h3 id="add-shaarli-as-a-sharing-service-to-firefox">Add Shaarli as a sharing service to Firefox</h3>
67<ul>
68<li>Open your Shaarli and <code>Login</code></li>
69<li>Click the <code>Tools</code> button in the top bar</li>
70<li>Click the <code>✚Add to Firefox social</code> button and accept the activation.</li>
71</ul>
72<h3 id="sharing-links-using-firefox-share">Sharing links using Firefox share</h3>
73<ul>
74<li>Add the sharing service as described above</li>
75<li>When you are visiting a webpage you would like to share with Shaarli, click the Firefox <em>Share</em> button <a href="images/firefoxshare.png.html">images/firefoxshare.png</a></li>
76<li>You can edit your link before and after saving, just like the bookmarklet above.</li>
77</ul>
78<table style="width:100%;">
79<colgroup>
80<col style="width: 8%" />
81<col style="width: 91%" />
82</colgroup>
83<thead>
84<tr class="header">
85<th></th>
86<th>Your Shaarli instance must be hosted on an HTTPS (SSL/TLS secure connection) enabled server for Firefox Share to work. Firefox Share will not work over plain HTTP connections.</th>
87</tr>
88</thead>
89<tbody>
90</tbody>
91</table>
92</body>
93</html>
diff --git a/doc/Firefox-share.md b/doc/Firefox-share.md
deleted file mode 100644
index 58adc58f..00000000
--- a/doc/Firefox-share.md
+++ /dev/null
@@ -1,16 +0,0 @@
1#Firefox share
2### Add Shaarli as a sharing service to Firefox
3
4 * Open your Shaarli and `Login`
5 * Click the `Tools` button in the top bar
6 * Click the `✚Add to Firefox social` button and accept the activation.
7
8
9### Sharing links using Firefox share
10
11 * Add the sharing service as described above
12 * When you are visiting a webpage you would like to share with Shaarli, click the Firefox _Share_ button [images/firefoxshare.png](images/firefoxshare.png.html)
13 * You can edit your link before and after saving, just like the bookmarklet above.
14
15|  | Your Shaarli instance must be hosted on an HTTPS (SSL/TLS secure connection) enabled server for Firefox Share to work. Firefox Share will not work over plain HTTP connections. |
16|------|-------------------------------------------------------------------------------|
diff --git a/doc/GnuPG-signature.html b/doc/GnuPG-signature.html
deleted file mode 100644
index 50b904d5..00000000
--- a/doc/GnuPG-signature.html
+++ /dev/null
@@ -1,173 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – GnuPG signature</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="gnupg-signature">GnuPG signature</h1>
103<h2 id="introduction">Introduction</h2>
104<h3 id="pgp-and-gpg">PGP and GPG</h3>
105<p><a href="https://gnupg.org/">Gnu Privacy Guard</a> (GnuPG) is an Open Source implementation of the <a href="https://en.wikipedia.org/wiki/Pretty_Good_Privacy#OpenPGP">Pretty Good [](.html)<br />
106Privacy</a> (OpenPGP) specification. Its main purposes are digital authentication,<br />
107signature and encryption.</p>
108<p>It is often used by the <a href="https://en.wikipedia.org/wiki/Free_and_open-source_software">FLOSS</a> community to verify:<a href=".html"></a></p>
109<ul>
110<li>Linux package signatures: Debian <a href="https://wiki.debian.org/SecureApt">SecureApt</a>, ArchLinux <a href="https://www.archlinux.org/master-keys/">Master [](.html)<br />
111Keys</a></li>
112<li><a href="https://en.wikipedia.org/wiki/Revision_control">SCM</a> releases &amp; maintainer identity<a href=".html"></a></li>
113</ul>
114<h3 id="trust">Trust</h3>
115<p>To quote Phil Pennock (the author of the <a href="https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Home">SKS</a> key server - <a href="http://sks.spodhuis.org/" class="uri">http://sks.spodhuis.org/</a>):<a href=".html"></a></p>
116<blockquote>
117<p>You MUST understand that presence of data in the keyserver (pools) in no way connotes trust. Anyone can generate a key, with any name or email address, and upload it. All security and trust comes from evaluating security at the “object level”, via PGP Web-Of-Trust signatures. This keyserver makes it possible to retrieve keys, looking them up via various indices, but the collection of keys in this public pool is KNOWN to contain malicious and fraudulent keys. It is the common expectation of server operators that users understand this and use software which, like all known common OpenPGP implementations, evaluates trust accordingly. This expectation is so common that it is not normally explicitly stated.</p>
118</blockquote>
119<p>Trust can be gained by having your key signed by other people (and signing their key back, too :) ), for instance during <a href="https://en.wikipedia.org/wiki/Key_signing_party">key signing parties</a>, see:<a href=".html"></a></p>
120<ul>
121<li><a href="http://www.cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html">The Keysigning party HOWTO</a><a href=".html"></a></li>
122<li><a href="https://en.wikipedia.org/wiki/Web_of_trust">Web of trust</a><a href=".html"></a></li>
123</ul>
124<h2 id="generate-a-gpg-key">Generate a GPG key</h2>
125<ul>
126<li><a href="http://stackoverflow.com/a/16725717">Generating a GPG key for Git tagging</a> (StackOverflow)<a href=".html"></a></li>
127<li><a href="https://help.github.com/articles/generating-a-gpg-key/">Generating a GPG key</a> (GitHub)<a href=".html"></a></li>
128</ul>
129<h3 id="gpg---provide-identity-information">gpg - provide identity information</h3>
130<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">gpg</span> --gen-key
131
132<span class="ex">gpg</span> (GnuPG) <span class="ex">2.1.6</span><span class="kw">;</span> <span class="ex">Copyright</span> (C) <span class="ex">2015</span> Free Software Foundation, Inc.
133<span class="ex">This</span> is free software: you are free to change and redistribute it.
134<span class="ex">There</span> is NO WARRANTY, to the extent permitted by law.
135
136<span class="ex">Note</span>: Use <span class="st">&quot;gpg2 --full-gen-key&quot;</span> for a full featured key generation dialog.
137
138<span class="ex">GnuPG</span> needs to construct a user ID to identify your key.
139
140<span class="ex">Real</span> name: Marvin the Paranoid Android
141<span class="ex">Email</span> address: marvin@h2g2.net
142<span class="ex">You</span> selected this USER-ID:
143 <span class="st">&quot;Marvin the Paranoid Android &lt;marvin@h2g2.net&gt;&quot;</span>
144
145<span class="ex">Change</span> (N)<span class="ex">ame</span>, (E)<span class="ex">mail</span>, or (O)<span class="ex">kay</span>/<span class="kw">(</span><span class="ex">Q</span><span class="kw">)</span><span class="ex">uit?</span> o
146<span class="ex">We</span> need to generate a lot of random bytes. It is a good idea to perform
147<span class="ex">some</span> other action (type on the keyboard, move the mouse, utilize the
148<span class="ex">disks</span>) <span class="ex">during</span> the prime generation<span class="kw">;</span> <span class="ex">this</span> gives the random number
149<span class="ex">generator</span> a better chance to gain enough entropy.</code></pre></div>
150<h3 id="gpg---entropy-interlude">gpg - entropy interlude</h3>
151<p>At this point, you will:</p>
152<ul>
153<li>be prompted for a secure password to protect your key (the input method will depend on your Desktop Environment and configuration)</li>
154<li>be asked to use your machine's input devices (mouse, keyboard, etc.) to generate random entropy; this step <em>may take some time</em></li>
155</ul>
156<h3 id="gpg---key-creation-confirmation">gpg - key creation confirmation</h3>
157<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">gpg</span>: key A9D53A3E marked as ultimately trusted
158<span class="ex">public</span> and secret key created and signed.
159
160<span class="ex">gpg</span>: checking the trustdb
161<span class="ex">gpg</span>: 3 marginal(s) <span class="ex">needed</span>, 1 complete(s) <span class="ex">needed</span>, PGP trust model
162<span class="ex">gpg</span>: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u
163<span class="ex">pub</span> rsa2048/A9D53A3E 2015-07-31
164 <span class="ex">Key</span> fingerprint = AF2A 5381 E54B 2FD2 14C4 A9A3 0E35 ACA4 A9D5 3A3E
165<span class="ex">uid</span> [ultimate] Marvin the Paranoid Android <span class="op">&lt;</span>marvin@h2g2.net<span class="op">&gt;</span>[](.html)
166<span class="ex">sub</span> rsa2048/8C0EACF1 2015-07-31</code></pre></div>
167<h3 id="gpg---submit-your-public-key-to-a-pgp-server-optional">gpg - submit your public key to a PGP server (Optional)</h3>
168<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">gpg</span> --keyserver pgp.mit.edu --send-keys A9D53A3E
169<span class="ex">gpg</span>: sending key A9D53A3E to hkp server pgp.mit.edu</code></pre></div>
170<h2 id="create-and-push-a-gpg-signed-tag">Create and push a GPG-signed tag</h2>
171<p>See <a href="Release-Shaarli.html">Release Shaarli</a>.</p>
172</body>
173</html>
diff --git a/doc/Home.html b/doc/Home.html
deleted file mode 100644
index 970f547e..00000000
--- a/doc/Home.html
+++ /dev/null
@@ -1,74 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Home</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="home">Home</h1>
66<h1 id="shaarli-wiki">Shaarli wiki</h1>
67<p>Welcome to the <a href="https://github.com/shaarli/Shaarli/">Shaarli</a> wiki<embed src=".html" /></p>
68<p>Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli.</p>
69<p>For general info, read the <a href="https://github.com/shaarli/Shaarli/blob/master/README.md">README</a>.<a href=".html"></a></p>
70<p>If you have any questions or ideas, please join the <a href="https://gitter.im/shaarli/Shaarli">chat</a> (also reachable via <a href="https://irc.gitter.im/">IRC</a>), post them in our <a href="https://github.com/shaarli/Shaarli/issues/308">general discussion</a> (<a href="https://github.com/shaarli/Shaarli/issues/44">archive</a>) or read the current <a href="https://github.com/shaarli/Shaarli/issues">issues</a>. If you've found a bug, please create a <a href="https://github.com/shaarli/Shaarli/issues/new">new issue</a>.<a href=".html"></a></p>
71<p>If you would like a feature added to Shaarli, check the issues labeled <a href="https://github.com/shaarli/Shaarli/labels/feature"><code>feature</code></a>, <a href="https://github.com/shaarli/Shaarli/labels/enhancement"><code>enhancement</code></a>, and <a href="https://github.com/shaarli/Shaarli/labels/plugin"><code>plugin</code></a>.<a href=".html"></a></p>
72<p><em>Note: This documentation is available online at <a href="https://github.com/shaarli/Shaarli/wiki" class="uri">https://github.com/shaarli/Shaarli/wiki</a>, and locally in the <code>doc/</code> directory of your Shaarli installation.</em></p>
73</body>
74</html>
diff --git a/doc/Home.md b/doc/Home.md
deleted file mode 100644
index 38413f24..00000000
--- a/doc/Home.md
+++ /dev/null
@@ -1,14 +0,0 @@
1#Home
2# Shaarli wiki
3
4Welcome to the [Shaarli](https://github.com/shaarli/Shaarli/) wiki![](.html)
5
6Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli.
7
8For general info, read the [README](https://github.com/shaarli/Shaarli/blob/master/README.md).[](.html)
9
10If you have any questions or ideas, please join the [chat](https://gitter.im/shaarli/Shaarli) (also reachable via [IRC](https://irc.gitter.im/)), post them in our [general discussion](https://github.com/shaarli/Shaarli/issues/308) ([archive](https://github.com/shaarli/Shaarli/issues/44)) or read the current [issues](https://github.com/shaarli/Shaarli/issues). If you've found a bug, please create a [new issue](https://github.com/shaarli/Shaarli/issues/new).[](.html)
11
12If you would like a feature added to Shaarli, check the issues labeled [`feature`](https://github.com/shaarli/Shaarli/labels/feature), [`enhancement`](https://github.com/shaarli/Shaarli/labels/enhancement), and [`plugin`](https://github.com/shaarli/Shaarli/labels/plugin).[](.html)
13
14_Note: This documentation is available online at https://github.com/shaarli/Shaarli/wiki, and locally in the `doc/` directory of your Shaarli installation._
diff --git a/doc/Plugin-System.html b/doc/Plugin-System.html
deleted file mode 100644
index 655536c6..00000000
--- a/doc/Plugin-System.html
+++ /dev/null
@@ -1,541 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Plugin System</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="plugin-system">Plugin System</h1>
103<blockquote>
104<p>Note: Plugin current status - in development (not merged into master).</p>
105</blockquote>
106<p><a href="#developer-api"><strong>I am a developer.</strong> Developer API.</a><a href=".html"></a></p>
107<p><a href="#guide-for-template-designer"><strong>I am a template designer.</strong> Guide for template designer.</a><a href=".html"></a></p>
108<h2 id="developer-api">Developer API</h2>
109<h3 id="what-can-i-do-with-plugins">What can I do with plugins?</h3>
110<p>The plugin system let you:</p>
111<ul>
112<li>insert content into specific places across templates.</li>
113<li>alter data before templates rendering.</li>
114<li>alter data before saving new links.</li>
115</ul>
116<h3 id="how-can-i-create-a-plugin-for-shaarli">How can I create a plugin for Shaarli?</h3>
117<p>First, chose a plugin name, such as <code>demo_plugin</code>.</p>
118<p>Under <code>plugin</code> folder, create a folder named with your plugin name. Then create a <plugin_name>.php file in that folder.</p>
119<p>You should have the following tree view:</p>
120<pre><code>| index.php
121| plugins/
122|---| demo_plugin/
123| |---| demo_plugin.php</code></pre>
124<h3 id="understanding-hooks">Understanding hooks</h3>
125<p>A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution.</p>
126<p>These functions need to be named with this pattern:</p>
127<pre><code>hook_&lt;plugin_name&gt;_&lt;hook_name&gt;</code></pre>
128<p>For exemple, if my plugin want to add data to the header, this function is needed:</p>
129<pre><code>hook_demo_plugin_render_header()</code></pre>
130<p>If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header.</p>
131<h3 id="plugins-data">Plugin's data</h3>
132<h4 id="parameters">Parameters</h4>
133<p>Every hook function has a <code>$data</code> parameter. Its content differs for each hooks.</p>
134<p><strong>This parameter needs to be returned every time</strong>, otherwise data is lost.</p>
135<pre><code>return $data;</code></pre>
136<h4 id="filling-templates-placeholder">Filling templates placeholder</h4>
137<p>Template placeholders are displayed in template in specific places.</p>
138<p>RainTPL displays every element contained in the placeholder's array. These element can be added by plugins.</p>
139<p>For example, let's add a value in the placeholder <code>top_placeholder</code> which is displayed at the top of my page:</p>
140<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">$data</span><span class="ot">[</span><span class="st">&#39;top_placeholder&#39;</span><span class="ot">[]</span> = <span class="st">&#39;My content&#39;</span><span class="ot">;](]</span>-=-<span class="st">&#39;My-content&#39;</span><span class="ot">;</span>.html<span class="ot">)</span>
141<span class="co"># OR</span>
142<span class="fu">array_push</span><span class="ot">(</span><span class="kw">$data</span><span class="ot">[</span><span class="st">&#39;top_placeholder&#39;</span><span class="ot">],</span> <span class="st">&#39;My&#39;</span><span class="ot">,</span> <span class="st">&#39;content&#39;</span><span class="ot">);[](</span>.html<span class="ot">)</span>
143
144<span class="kw">return</span> <span class="kw">$data</span><span class="ot">;</span></code></pre></div>
145<h4 id="data-manipulation">Data manipulation</h4>
146<p>When a page is displayed, every variable send to the template engine is passed to plugins before that in <code>$data</code>.</p>
147<p>The data contained by this array can be altered before template rendering.</p>
148<p>For exemple, in linklist, it is possible to alter every title:</p>
149<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="co">// mind the reference if you want $data to be altered</span>
150<span class="kw">foreach</span> <span class="ot">(</span><span class="kw">$data</span><span class="ot">[</span><span class="st">&#39;links&#39;</span><span class="ot">]</span> <span class="kw">as</span> &amp;<span class="kw">$value</span><span class="ot">)</span> {<span class="ot">[](</span>.html<span class="ot">)</span>
151 <span class="co">// String reverse every title.</span>
152 <span class="kw">$value</span><span class="ot">[</span><span class="st">&#39;title&#39;</span><span class="ot">]</span> = <span class="fu">strrev</span><span class="ot">(</span><span class="kw">$value</span><span class="ot">[</span><span class="st">&#39;title&#39;</span><span class="ot">]);[](</span>.html<span class="ot">)</span>
153}
154
155<span class="kw">return</span> <span class="kw">$data</span><span class="ot">;</span></code></pre></div>
156<h3 id="metadata">Metadata</h3>
157<p>Every plugin needs a <code>&lt;plugin_name&gt;.meta</code> file, which is in fact an <code>.ini</code> file (<code>KEY=&quot;VALUE&quot;</code>), to be listed in plugin administration.</p>
158<p>Each file contain two keys:</p>
159<ul>
160<li><code>description</code>: plugin description</li>
161<li><code>parameters</code>: user parameter names, separated by a <code>;</code>.</li>
162</ul>
163<blockquote>
164<p>Note: In PHP, <code>parse_ini_file()</code> seems to want strings to be between by quotes <code>&quot;</code> in the ini file.</p>
165</blockquote>
166<h3 id="its-not-working">It's not working!</h3>
167<p>Use <code>demo_plugin</code> as a functional example. It covers most of the plugin system features.</p>
168<p>If it's still not working, please <a href="https://github.com/shaarli/Shaarli/issues/new">open an issue</a>.<a href=".html"></a></p>
169<h3 id="hooks">Hooks</h3>
170<table style="width:42%;">
171<colgroup>
172<col style="width: 19%" />
173<col style="width: 22%" />
174</colgroup>
175<thead>
176<tr class="header">
177<th>Hooks</th>
178<th style="text-align: center;">Description</th>
179</tr>
180</thead>
181<tbody>
182<tr class="odd">
183<td><a href="#render_header">render_header</a></td>
184<td style="text-align: center;">Allow plugin to add content in page headers.</td>
185</tr>
186<tr class="even">
187<td><a href="#render_includes">render_includes</a></td>
188<td style="text-align: center;">Allow plugin to include their own CSS files.</td>
189</tr>
190<tr class="odd">
191<td><a href="#render_footer">render_footer</a></td>
192<td style="text-align: center;">Allow plugin to add content in page footer and include their own JS files.</td>
193</tr>
194<tr class="even">
195<td><a href="#render_linklist">render_linklist</a></td>
196<td style="text-align: center;">It allows to add content at the begining and end of the page, after every link displayed and to alter link data.</td>
197</tr>
198<tr class="odd">
199<td><a href="#render_editlink">render_editlink</a></td>
200<td style="text-align: center;">Allow to add fields in the form, or display elements.</td>
201</tr>
202<tr class="even">
203<td><a href="#render_tools">render_tools</a></td>
204<td style="text-align: center;">Allow to add content at the end of the page.</td>
205</tr>
206<tr class="odd">
207<td><a href="#render_picwall">render_picwall</a></td>
208<td style="text-align: center;">Allow to add content at the top and bottom of the page.</td>
209</tr>
210<tr class="even">
211<td><a href="#render_tagcloud">render_tagcloud</a></td>
212<td style="text-align: center;">Allow to add content at the top and bottom of the page.</td>
213</tr>
214<tr class="odd">
215<td><a href="#render_daily">render_daily</a></td>
216<td style="text-align: center;">Allow to add content at the top and bottom of the page, the bottom of each link and to alter data.</td>
217</tr>
218<tr class="even">
219<td><a href="#savelink">savelink</a></td>
220<td style="text-align: center;">Allow to alter the link being saved in the datastore.</td>
221</tr>
222</tbody>
223</table>
224<h4 id="render_header">render_header</h4>
225<p>Triggered on every page.</p>
226<p>Allow plugin to add content in page headers.</p>
227<h5 id="data">Data</h5>
228<p><code>$data</code> is an array containing:</p>
229<ul>
230<li><code>_PAGE_</code>: current target page (eg: <code>linklist</code>, <code>picwall</code>, etc.).</li>
231<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
232</ul>
233<h5 id="template-placeholders">Template placeholders</h5>
234<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
235<p>List of placeholders:</p>
236<ul>
237<li><code>buttons_toolbar</code>: after the list of buttons in the header.</li>
238</ul>
239<p><img src="http://i.imgur.com/ssJUOrt.png" alt="buttons_toolbar_example" /><a href=".html"></a></p>
240<ul>
241<li><code>fields_toolbar</code>: after search fields in the header.</li>
242</ul>
243<blockquote>
244<p>Note: This will only be called in linklist.</p>
245</blockquote>
246<p><img src="http://i.imgur.com/3GMifI2.png" alt="fields_toolbar_example" /><a href=".html"></a></p>
247<h4 id="render_includes">render_includes</h4>
248<p>Triggered on every page.</p>
249<p>Allow plugin to include their own CSS files.</p>
250<h5 id="data-1">Data</h5>
251<p><code>$data</code> is an array containing:</p>
252<ul>
253<li><code>_PAGE_</code>: current target page (eg: <code>linklist</code>, <code>picwall</code>, etc.).</li>
254<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
255</ul>
256<h5 id="template-placeholders-1">Template placeholders</h5>
257<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
258<p>List of placeholders:</p>
259<ul>
260<li><code>css_files</code>: called after loading default CSS.</li>
261</ul>
262<blockquote>
263<p>Note: only add the path of the CSS file. E.g: <code>plugins/demo_plugin/custom_demo.css</code>.</p>
264</blockquote>
265<h4 id="render_footer">render_footer</h4>
266<p>Triggered on every page.</p>
267<p>Allow plugin to add content in page footer and include their own JS files.</p>
268<h5 id="data-2">Data</h5>
269<p><code>$data</code> is an array containing:</p>
270<ul>
271<li><code>_PAGE_</code>: current target page (eg: <code>linklist</code>, <code>picwall</code>, etc.).</li>
272<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
273</ul>
274<h5 id="template-placeholders-2">Template placeholders</h5>
275<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
276<p>List of placeholders:</p>
277<ul>
278<li><code>text</code>: called after the end of the footer text.</li>
279<li><code>endofpage</code>: called at the end of the page.</li>
280</ul>
281<p><img src="http://i.imgur.com/L5S2YEH.png" alt="text_example" /><a href=".html"></a></p>
282<ul>
283<li><code>js_files</code>: called at the end of the page, to include custom JS scripts.</li>
284</ul>
285<blockquote>
286<p>Note: only add the path of the JS file. E.g: <code>plugins/demo_plugin/custom_demo.js</code>.</p>
287</blockquote>
288<h4 id="render_linklist">render_linklist</h4>
289<p>Triggered when <code>linklist</code> is displayed (list of links, permalink, search, tag filtered, etc.).</p>
290<p>It allows to add content at the begining and end of the page, after every link displayed and to alter link data.</p>
291<h5 id="data-3">Data</h5>
292<p><code>$data</code> is an array containing:</p>
293<ul>
294<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
295<li>All templates data, including links.</li>
296</ul>
297<h5 id="template-placeholders-3">Template placeholders</h5>
298<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
299<p>List of placeholders:</p>
300<ul>
301<li><code>action_plugin</code>: next to the button &quot;private only&quot; at the top and bottom of the page.</li>
302</ul>
303<p><img src="http://i.imgur.com/Q12PWg0.png" alt="action_plugin_example" /><a href=".html"></a></p>
304<ul>
305<li><code>link_plugin</code>: for every link, between permalink and link URL.</li>
306</ul>
307<p><img src="http://i.imgur.com/3oDPhWx.png" alt="link_plugin_example" /><a href=".html"></a></p>
308<ul>
309<li><code>plugin_start_zone</code>: before displaying the template content.</li>
310</ul>
311<p><img src="http://i.imgur.com/OVBkGy3.png" alt="plugin_start_zone_example" /><a href=".html"></a></p>
312<ul>
313<li><code>plugin_end_zone</code>: after displaying the template content.</li>
314</ul>
315<p><img src="http://i.imgur.com/6IoRuop.png" alt="plugin_end_zone_example" /><a href=".html"></a></p>
316<h4 id="render_editlink">render_editlink</h4>
317<p>Triggered when the link edition form is displayed.</p>
318<p>Allow to add fields in the form, or display elements.</p>
319<h5 id="data-4">Data</h5>
320<p><code>$data</code> is an array containing:</p>
321<ul>
322<li>All templates data.</li>
323</ul>
324<h5 id="template-placeholders-4">Template placeholders</h5>
325<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
326<p>List of placeholders:</p>
327<ul>
328<li><code>edit_link_plugin</code>: after tags field.</li>
329</ul>
330<p><img src="http://i.imgur.com/5u17Ens.png" alt="edit_link_plugin_example" /><a href=".html"></a></p>
331<h4 id="render_tools">render_tools</h4>
332<p>Triggered when the &quot;tools&quot; page is displayed.</p>
333<p>Allow to add content at the end of the page.</p>
334<h5 id="data-5">Data</h5>
335<p><code>$data</code> is an array containing:</p>
336<ul>
337<li>All templates data.</li>
338</ul>
339<h5 id="template-placeholders-5">Template placeholders</h5>
340<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
341<p>List of placeholders:</p>
342<ul>
343<li><code>tools_plugin</code>: at the end of the page.</li>
344</ul>
345<p><img src="http://i.imgur.com/Bqhu9oQ.png" alt="tools_plugin_example" /><a href=".html"></a></p>
346<h4 id="render_picwall">render_picwall</h4>
347<p>Triggered when picwall is displayed.</p>
348<p>Allow to add content at the top and bottom of the page.</p>
349<h5 id="data-6">Data</h5>
350<p><code>$data</code> is an array containing:</p>
351<ul>
352<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
353<li>All templates data.</li>
354</ul>
355<h5 id="template-placeholders-6">Template placeholders</h5>
356<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
357<p>List of placeholders:</p>
358<ul>
359<li><p><code>plugin_start_zone</code>: before displaying the template content.</p></li>
360<li><p><code>plugin_end_zone</code>: after displaying the template content.</p></li>
361</ul>
362<p><img src="http://i.imgur.com/tVTQFER.png" alt="plugin_start_end_zone_example" /><a href=".html"></a></p>
363<h4 id="render_tagcloud">render_tagcloud</h4>
364<p>Triggered when tagcloud is displayed.</p>
365<p>Allow to add content at the top and bottom of the page.</p>
366<h5 id="data-7">Data</h5>
367<p><code>$data</code> is an array containing:</p>
368<ul>
369<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
370<li>All templates data.</li>
371</ul>
372<h5 id="template-placeholders-7">Template placeholders</h5>
373<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
374<p>List of placeholders:</p>
375<ul>
376<li><p><code>plugin_start_zone</code>: before displaying the template content.</p></li>
377<li><p><code>plugin_end_zone</code>: after displaying the template content.</p></li>
378</ul>
379<p><img src="http://i.imgur.com/vHmyT3a.png" alt="plugin_start_end_zone_example" /><a href=".html"></a></p>
380<h4 id="render_daily">render_daily</h4>
381<p>Triggered when tagcloud is displayed.</p>
382<p>Allow to add content at the top and bottom of the page, the bottom of each link and to alter data.</p>
383<h5 id="data-8">Data</h5>
384<p><code>$data</code> is an array containing:</p>
385<ul>
386<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
387<li>All templates data, including links.</li>
388</ul>
389<h5 id="template-placeholders-8">Template placeholders</h5>
390<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
391<p>List of placeholders:</p>
392<ul>
393<li><code>link_plugin</code>: used at bottom of each link.</li>
394</ul>
395<p><img src="http://i.imgur.com/hzhMfSZ.png" alt="link_plugin_example" /><a href=".html"></a></p>
396<ul>
397<li><p><code>plugin_start_zone</code>: before displaying the template content.</p></li>
398<li><p><code>plugin_end_zone</code>: after displaying the template content.</p></li>
399</ul>
400<h4 id="savelink">savelink</h4>
401<p>Triggered when a link is save (new link or edit).</p>
402<p>Allow to alter the link being saved in the datastore.</p>
403<h5 id="data-9">Data</h5>
404<p><code>$data</code> is an array containing the link being saved:</p>
405<ul>
406<li>title</li>
407<li>url</li>
408<li>description</li>
409<li>linkdate</li>
410<li>private</li>
411<li>tags</li>
412</ul>
413<h2 id="guide-for-template-designer">Guide for template designer</h2>
414<h3 id="plugin-administration">Plugin administration</h3>
415<p>Your theme must include a plugin administration page: <code>pluginsadmin.html</code>.</p>
416<blockquote>
417<p>Note: repo's template link needs to be added when the PR is merged.</p>
418</blockquote>
419<p>Use the default one as an example.</p>
420<p>Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include <code>plugin_admin.js</code>, only if:</p>
421<ul>
422<li>you're using a table.</li>
423<li>you call orderUp() and orderUp() onclick on arrows.</li>
424<li>you add data-line and data-order to your rows.</li>
425</ul>
426<p>Otherwise, you can use your own JS as long as this field is send by the form:</p>
427<p><input type="hidden" name="order_{$key}" value="{$counter}"></p>
428<h3 id="placeholder-system">Placeholder system</h3>
429<p>In order to make plugins work with every custom themes, you need to add variable placeholder in your templates.</p>
430<p>It's a RainTPL loop like this:</p>
431<pre><code>{loop=&quot;$plugin_variable&quot;}
432 {$value}
433{/loop}</code></pre>
434<p>You should enable <code>demo_plugin</code> for testing purpose, since it uses every placeholder available.</p>
435<h3 id="list-of-placeholders">List of placeholders</h3>
436<p><strong>page.header.html</strong></p>
437<p>At the end of the menu:</p>
438<pre><code>{loop=&quot;$plugins_header.buttons_toolbar&quot;}
439 {$value}
440{/loop}</code></pre>
441<p>At the end of file, before clearing floating blocks:</p>
442<pre><code>{if=&quot;!empty($plugin_errors) &amp;&amp; isLoggedIn()&quot;}
443 &lt;ul class=&quot;errors&quot;&gt;
444 {loop=&quot;plugin_errors&quot;}
445 &lt;li&gt;{$value}&lt;/li&gt;
446 {/loop}
447 &lt;/ul&gt;
448{/if}</code></pre>
449<p><strong>includes.html</strong></p>
450<p>At the end of the file:</p>
451<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_includes.css_files&quot;}
452<span class="kw">&lt;link</span><span class="ot"> type=</span><span class="st">&quot;text/css&quot;</span><span class="ot"> rel=</span><span class="st">&quot;stylesheet&quot;</span><span class="ot"> href=</span><span class="st">&quot;{$value}#&quot;</span><span class="kw">/&gt;</span>
453{/loop}</code></pre></div>
454<p><strong>page.footer.html</strong></p>
455<p>At the end of your footer notes:</p>
456<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_footer.text&quot;}
457 {$value}
458{/loop}</code></pre></div>
459<p>At the end of file:</p>
460<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_footer.js_files&quot;}
461 <span class="kw">&lt;script</span><span class="ot"> src=</span><span class="st">&quot;{$value}#&quot;</span><span class="kw">&gt;&lt;/script&gt;</span>
462{/loop}</code></pre></div>
463<p><strong>linklist.html</strong></p>
464<p>After search fields:</p>
465<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_header.fields_toolbar&quot;}
466 {$value}
467{/loop}</code></pre></div>
468<p>Before displaying the link list (after paging):</p>
469<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugin_start_zone&quot;}
470 {$value}
471{/loop}</code></pre></div>
472<p>For every links (icons):</p>
473<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$value.link_plugin&quot;}
474 <span class="kw">&lt;span&gt;</span>{$value}<span class="kw">&lt;/span&gt;</span>
475{/loop}</code></pre></div>
476<p>Before end paging:</p>
477<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugin_end_zone&quot;}
478 {$value}
479{/loop}</code></pre></div>
480<p><strong>linklist.paging.html</strong></p>
481<p>After the &quot;private only&quot; icon:</p>
482<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$action_plugin&quot;}
483 {$value}
484{/loop}</code></pre></div>
485<p><strong>editlink.html</strong></p>
486<p>After tags field:</p>
487<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$edit_link_plugin&quot;}
488 {$value}
489{/loop}</code></pre></div>
490<p><strong>tools.html</strong></p>
491<p>After the last tool:</p>
492<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$tools_plugin&quot;}
493 {$value}
494{/loop}</code></pre></div>
495<p><strong>picwall.html</strong></p>
496<p>Top:</p>
497<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_start_picwall&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
498 {loop=&quot;$plugin_start_zone&quot;}
499 {$value}
500 {/loop}
501<span class="kw">&lt;/div&gt;</span></code></pre></div>
502<p>Bottom:</p>
503<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_end_picwall&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
504 {loop=&quot;$plugin_end_zone&quot;}
505 {$value}
506 {/loop}
507<span class="kw">&lt;/div&gt;</span></code></pre></div>
508<p><strong>tagcloud.html</strong></p>
509<p>Top:</p>
510<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"> <span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_start_tagcloud&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
511 {loop=&quot;$plugin_start_zone&quot;}
512 {$value}
513 {/loop}
514 <span class="kw">&lt;/div&gt;</span></code></pre></div>
515<p>Bottom:</p>
516<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"> <span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_end_tagcloud&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
517 {loop=&quot;$plugin_end_zone&quot;}
518 {$value}
519 {/loop}
520 <span class="kw">&lt;/div&gt;</span></code></pre></div>
521<p><strong>daily.html</strong></p>
522<p>Top:</p>
523<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_start_picwall&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
524 {loop=&quot;$plugin_start_zone&quot;}
525 {$value}
526 {/loop}
527<span class="kw">&lt;/div&gt;</span></code></pre></div>
528<p>After every link:</p>
529<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">&quot;dailyEntryFooter&quot;</span><span class="kw">&gt;</span>
530 {loop=&quot;$link.link_plugin&quot;}
531 {$value}
532 {/loop}
533<span class="kw">&lt;/div&gt;</span></code></pre></div>
534<p>Bottom:</p>
535<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_end_picwall&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
536 {loop=&quot;$plugin_end_zone&quot;}
537 {$value}
538 {/loop}
539<span class="kw">&lt;/div&gt;</span></code></pre></div>
540</body>
541</html>
diff --git a/doc/Plugins.html b/doc/Plugins.html
deleted file mode 100644
index 435a836f..00000000
--- a/doc/Plugins.html
+++ /dev/null
@@ -1,154 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Plugins</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="plugins">Plugins</h1>
103<h2 id="plugin-installation">Plugin installation</h2>
104<p>There is a bunch of plugins shipped with Shaarli, where there is nothing to do to install them.</p>
105<p>If you want to install a third party plugin:</p>
106<ul>
107<li>Download it.</li>
108<li>Put it in the <code>plugins</code> directory in Shaarli's installation folder.</li>
109<li>Make sure you put it correctly:</li>
110</ul>
111<pre><code>| index.php
112| plugins/
113|---| custom_plugin/
114| |---| custom_plugin.php
115| |---| ...
116</code></pre>
117<ul>
118<li>Make sure your webserver can read and write the files in your plugin folder.</li>
119</ul>
120<h2 id="plugin-configuration">Plugin configuration</h2>
121<p>In Shaarli's administration page (<code>Tools</code> link), go to <code>Plugin administration</code>.</p>
122<p>Here you can enable and disable all plugins available, and configure them.</p>
123<p><img src="https://camo.githubusercontent.com/5da68e191969007492ca0fbeb25f3b2357b748cc/687474703a2f2f692e696d6775722e636f6d2f766837544643712e706e67" alt="administration screenshot" /><a href=".html"></a></p>
124<h2 id="plugin-order">Plugin order</h2>
125<p>In the plugin administration page, you can move enabled plugins to the top or bottom of the list. The first plugins in the list will be processed first.</p>
126<p>This is important in case plugins are depending on each other. Read plugins README details for more information.</p>
127<p><strong>Use case</strong>: The (non existent) plugin <code>shaares_footer</code> adds a footer to every shaare in Markdown syntax. It needs to be processed <em>before</em> (higher in the list) the Markdown plugin. Otherwise its syntax won't be translated in HTML.</p>
128<h2 id="file-mode">File mode</h2>
129<p>Enabled plugin are stored in your <code>config.php</code> parameters file, under the <code>array</code>:</p>
130<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">$GLOBALS</span><span class="ot">[</span><span class="st">&#39;config&#39;</span><span class="ot">[</span><span class="st">&#39;ENABLED_PLUGINS&#39;</span><span class="ot">]](</span><span class="st">&#39;ENABLED_PLUGINS&#39;</span><span class="ot">]</span>.html<span class="ot">)</span></code></pre></div>
131<p>You can edit them manually here.<br />
132Example:</p>
133<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">$GLOBALS</span><span class="ot">[</span><span class="st">&#39;config&#39;</span><span class="ot">[</span><span class="st">&#39;ENABLED_PLUGINS&#39;</span><span class="ot">]</span> = <span class="fu">array</span><span class="ot">(](</span><span class="st">&#39;ENABLED_PLUGINS&#39;</span><span class="ot">]</span>-=-<span class="fu">array</span><span class="ot">(</span>.html<span class="ot">)</span>
134 <span class="st">&#39;qrcode&#39;</span><span class="ot">,</span>
135 <span class="st">&#39;archiveorg&#39;</span><span class="ot">,</span>
136 <span class="st">&#39;wallabag&#39;</span><span class="ot">,</span>
137 <span class="st">&#39;markdown&#39;</span><span class="ot">,</span>
138<span class="ot">);</span></code></pre></div>
139<h3 id="plugin-usage">Plugin usage</h3>
140<h4 id="official-plugins">Official plugins</h4>
141<p>Usage of each plugin is documented in it's README file:</p>
142<ul>
143<li><code>addlink-toolbar</code>: Adds the addlink input on the linklist page</li>
144<li><code>archiveorg</code>: For each link, add an Archive.org icon</li>
145<li><a href="https://github.com/shaarli/Shaarli/blob/master/plugins/markdown/README.md"><code>markdown</code></a>: Render shaare description with Markdown syntax.<a href=".html"></a></li>
146<li><a href="https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md"><code>playvideos</code></a>: Add a button in the toolbar allowing to watch all videos.<a href=".html"></a></li>
147<li><code>qrcode</code>: For each link, add a QRCode icon.</li>
148<li><code>readityourself</code>: For each link, add a ReadItYourself icon to save the shaared URL</li>
149<li><a href="https://github.com/shaarli/Shaarli/blob/master/plugins/wallabag/README.md"><code>wallabag</code></a>: For each link, add a Wallabag icon to save it in your instance.<a href=".html"></a></li>
150</ul>
151<h4 id="third-party-plugins">Third party plugins</h4>
152<p>See <a href="https://github.com/shaarli/Shaarli/wiki/Community-%26-Related-software#third-party-plugins">Community &amp; related software</a><a href=".html"></a></p>
153</body>
154</html>
diff --git a/doc/RSS-feeds.html b/doc/RSS-feeds.html
deleted file mode 100644
index 0f332b3d..00000000
--- a/doc/RSS-feeds.html
+++ /dev/null
@@ -1,97 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – RSS feeds</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="rss-feeds">RSS feeds</h1>
66<h3 id="feeds-options">Feeds options</h3>
67<p>Feeds are available in ATOM with <code>?do=atom</code> and RSS with <code>do=RSS</code>.</p>
68<p>Options:</p>
69<ul>
70<li>You can use <code>permalinks</code> in the feed URL to get permalink to Shaares instead of direct link to shaared URL.
71<ul>
72<li>E.G. <code>https://my.shaarli.domain/?do=atom&amp;permalinks</code>.</li>
73</ul></li>
74<li>You can use <code>nb</code> parameter in the feed URL to specify the number of Shaares you want in a feed (default if not specified: <code>50</code>). The keyword <code>all</code> is available if you want everything.
75<ul>
76<li><code>https://my.shaarli.domain/?do=atom&amp;permalinks&amp;nb=42</code></li>
77<li><code>https://my.shaarli.domain/?do=atom&amp;permalinks&amp;nb=all</code></li>
78</ul></li>
79</ul>
80<h3 id="rss-feeds-or-picture-wall-for-a-specific-searchtag">RSS Feeds or Picture Wall for a specific search/tag</h3>
81<p>It is possible to filter RSS/ATOM feeds and Picture Wall on a Shaarli to <strong>only display results of a specific search, or for a specific tag</strong>.</p>
82<p>For example, if you want to subscribe only to links tagged <code>photography</code>:</p>
83<ul>
84<li>Go to the desired Shaarli instance.</li>
85<li>Search for the <code>photography</code> tag in the <em>Filter by tag</em> box. Links tagged <code>photography</code> are displayed.</li>
86<li>Click on the <code>RSS Feed</code> button.</li>
87<li>You are presented with an RSS feed showing only these links. Subscribe to it to receive only updates with this tag.</li>
88<li>The same method <strong>also works for a full-text search</strong> (<em>Search</em> box) <strong>and for the Picture Wall</strong> (want to only see pictures about <code>nature</code>?)</li>
89<li>You can also build the URLs manually:
90<ul>
91<li><code>https://my.shaarli.domain/?do=rss&amp;searchtags=nature</code></li>
92<li><code>https://my.shaarli.domain/links/?do=picwall&amp;searchterm=poney</code></li>
93</ul></li>
94</ul>
95<p><embed src="(images/rss-filter-1.png)-!.html" />(images/rss-filter-2.png)</p>
96</body>
97</html>
diff --git a/doc/Release-Shaarli.html b/doc/Release-Shaarli.html
deleted file mode 100644
index 0d9fa3e1..00000000
--- a/doc/Release-Shaarli.html
+++ /dev/null
@@ -1,220 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Release Shaarli</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="release-shaarli">Release Shaarli</h1>
103<p>See <a href="http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Tagging-Your-Releases">Git - Maintaining a project - Tagging your [](.html)<br />
104releases</a>.</p>
105<h2 id="prerequisites">Prerequisites</h2>
106<p>This guide assumes that you have:</p>
107<ul>
108<li>a GPG key matching your GitHub authentication credentials
109<ul>
110<li>i.e., the email address identified by the GPG key is the same as the one in your <code>~/.gitconfig</code></li>
111</ul></li>
112<li>a GitHub fork of Shaarli</li>
113<li>a local clone of your Shaarli fork, with the following remotes:
114<ul>
115<li><code>origin</code> pointing to your GitHub fork</li>
116<li><code>upstream</code> pointing to the main Shaarli repository</li>
117</ul></li>
118<li>maintainer permissions on the main Shaarli repository, to:
119<ul>
120<li>push the signed tag</li>
121<li>create a new release</li>
122</ul></li>
123<li><a href="https://getcomposer.org/">Composer</a> and <a href="http://pandoc.org/">Pandoc</a> need to be installed<a href=".html"></a></li>
124</ul>
125<h2 id="github-release-draft-and-changelog.md">GitHub release draft and <code>CHANGELOG.md</code></h2>
126<p>See <a href="http://keepachangelog.com/en/0.3.0/" class="uri">http://keepachangelog.com/en/0.3.0/</a> for changelog formatting.</p>
127<h3 id="github-release-draft">GitHub release draft</h3>
128<p>GitHub allows drafting the release note for the upcoming release, from the <a href="https://github.com/shaarli/Shaarli/releases">Releases</a> page. This way, the release note can be drafted while contributions are merged to <code>master</code>.<a href=".html"></a></p>
129<h3 id="changelog.md"><code>CHANGELOG.md</code></h3>
130<p>This file should contain the same information as the release note draft for the upcoming version.</p>
131<p>Update it to:</p>
132<ul>
133<li>add new entries (additions, fixes, etc.)</li>
134<li>mark the current version as released by setting its date and link</li>
135<li>add a new section for the future unreleased version</li>
136</ul>
137<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
138
139$ <span class="fu">nano</span> CHANGELOG.md
140
141[<span class="ex">...</span>][](.html)
142<span class="co">## vA.B.C - UNRELEASED</span>
143<span class="ex">TBA</span>
144
145<span class="co">## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD[](.html)</span>
146[<span class="ex">...</span>][](.html)</code></pre></div>
147<h2 id="increment-the-version-code-create-and-push-a-signed-tag">Increment the version code, create and push a signed tag</h2>
148<h3 id="bump-shaarlis-version">Bump Shaarli's version</h3>
149<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
150
151<span class="co"># create a new branch</span>
152$ <span class="fu">git</span> fetch upstream
153$ <span class="fu">git</span> checkout upstream/master -b v0.5.0
154
155<span class="co"># bump the version number</span>
156$ <span class="ex">vim</span> index.php shaarli_version.php
157
158<span class="co"># rebuild the documentation from the wiki</span>
159$ <span class="fu">make</span> htmldoc
160
161<span class="co"># commit the changes</span>
162$ <span class="fu">git</span> add index.php shaarli_version.php doc
163$ <span class="fu">git</span> commit -s -m <span class="st">&quot;Bump version to v0.5.0&quot;</span>
164
165<span class="co"># push the commit on your GitHub fork</span>
166$ <span class="fu">git</span> push origin v0.5.0</code></pre></div>
167<h3 id="create-and-merge-a-pull-request">Create and merge a Pull Request</h3>
168<p>This one is pretty straightforward ;-)</p>
169<h3 id="create-and-push-a-signed-tag">Create and push a signed tag</h3>
170<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># update your local copy</span>
171$ <span class="fu">git</span> checkout master
172$ <span class="fu">git</span> fetch upstream
173$ <span class="fu">git</span> pull upstream master
174
175<span class="co"># create a signed tag</span>
176$ <span class="fu">git</span> tag -s -m <span class="st">&quot;Release v0.5.0&quot;</span> v0.5.0
177
178<span class="co"># push it to &quot;upstream&quot;</span>
179$ <span class="fu">git</span> push --tags upstream</code></pre></div>
180<h3 id="verify-a-signed-tag">Verify a signed tag</h3>
181<p><a href="https://github.com/shaarli/Shaarli/releases/tag/v0.5.0"><code>v0.5.0</code></a> is the first GPG-signed tag pushed on the Community Shaarli.<a href=".html"></a></p>
182<p>Let's have a look at its signature!</p>
183<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
184$ <span class="fu">git</span> fetch upstream
185
186<span class="co"># get the SHA1 reference of the tag</span>
187$ <span class="fu">git</span> show-ref tags/v0.5.0
188<span class="ex">f7762cf803f03f5caf4b8078359a63783d0090c1</span> refs/tags/v0.5.0
189
190<span class="co"># verify the tag signature information</span>
191$ <span class="fu">git</span> verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
192<span class="ex">gpg</span>: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
193<span class="ex">gpg</span>: Good signature from <span class="st">&quot;VirtualTam &lt;virtualtam@flibidi.net&gt;&quot;</span> [ultimate][](.html)</code></pre></div>
194<h2 id="publish-the-github-release">Publish the GitHub release</h2>
195<h3 id="create-a-github-release-from-a-git-tag">Create a GitHub release from a Git tag</h3>
196<p>From the previously drafted release:</p>
197<ul>
198<li>edit the release notes (if needed)</li>
199<li>specify the appropriate Git tag</li>
200<li>publish the release</li>
201<li>profit!</li>
202</ul>
203<h3 id="generate-and-upload-all-in-one-release-archives">Generate and upload all-in-one release archives</h3>
204<p>Users with a shared hosting may have:</p>
205<ul>
206<li>no SSH access</li>
207<li>no possibility to install PHP packages or server extensions</li>
208<li>no possibility to run scripts</li>
209</ul>
210<p>To ease Shaarli installations, it is possible to generate and upload additional release archives,<br />
211that will contain Shaarli code plus all required third-party libraries:</p>
212<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">make</span> release_archive</code></pre></div>
213<p>This will create the following archives:</p>
214<ul>
215<li><code>shaarli-vX.Y.Z-full.tar</code></li>
216<li><code>shaarli-vX.Y.Z-full.zip</code></li>
217</ul>
218<p>The archives need to be manually uploaded on the previously created GitHub release.</p>
219</body>
220</html>
diff --git a/doc/Security.html b/doc/Security.html
deleted file mode 100644
index cec20590..00000000
--- a/doc/Security.html
+++ /dev/null
@@ -1,133 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Security</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="security">Security</h1>
103<h2 id="client-browser">Client browser</h2>
104<ul>
105<li>Shaarli relies on <code>HTTP_REFERER</code> for some functions (like redirects and clicking on tags). If you have disabled or masqueraded <code>HTTP_REFERER</code> in your browser, some features of Shaarli may not work</li>
106</ul>
107<h2 id="php">PHP</h2>
108<ul>
109<li><code>magic_quotes</code> is an horrible option of PHP which is often activated on servers. No serious developer should rely on this horror to secure their code against SQL injections. You should disable it (and Shaarli expects this option to be disabled). Nevertheless, I have added code to cope with <code>magic_quotes</code> on, so you should not be bothered even on crappy hosts.</li>
110</ul>
111<h2 id="server-and-sessions">Server and sessions</h2>
112<ul>
113<li>Directories are protected using <code>.htaccess</code> files</li>
114<li>Forms are protected against XSRF (Cross-site requests forgery):</li>
115<li>Forms which act on data (save,delete…) contain a token generated by the server.</li>
116<li>Any posted form which does not contain a valid token is rejected.</li>
117<li>Any token can only be used once.</li>
118<li>Tokens are attached to the session and cannot be reused in another session.</li>
119<li>Sessions automatically expire after 60 minutes.</li>
120<li>Sessions are protected against hijacking: the session ID cannot be used from a different IP address.</li>
121</ul>
122<h2 id="shaarli-datastore-and-configuration">Shaarli datastore and configuration</h2>
123<ul>
124<li>The password is salted, hashed and stored in the data subdirectory, in a PHP file, and protected by htaccess. Even if the webserver does not support htaccess, the hash is not readable by URL. Even if the .php file is stolen, the password cannot deduced from the hash. The salt prevents rainbow-tables attacks.</li>
125<li>Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a <code>.php</code> file.</li>
126<li>Even if the server does not support <code>.htaccess</code> files, the data file will still not be readable by URL.</li>
127<li><p>The database looks like this:</p>
128<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">&lt;?php</span> <span class="co">/* zP1ZjxxJtiYIvvevEPJ2lDOaLrZv7o...</span>
129<span class="co">...ka7gaco/Z+TFXM2i7BlfMf8qxpaSSYfKlvqv/x8= */</span> <span class="kw">?&gt;</span></code></pre></div></li>
130<li><p>Small hashes are used to make a link to an entry in Shaarli. They are unique. In fact, the date of the items (eg. <code>20110923_150523</code>) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only <code>A-Z a-z 0-9 - _</code> and <code>@</code>.</p></li>
131</ul>
132</body>
133</html>
diff --git a/doc/Security.md b/doc/Security.md
deleted file mode 100644
index 7947460c..00000000
--- a/doc/Security.md
+++ /dev/null
@@ -1,28 +0,0 @@
1#Security
2## Client browser
3* Shaarli relies on `HTTP_REFERER` for some functions (like redirects and clicking on tags). If you have disabled or masqueraded `HTTP_REFERER` in your browser, some features of Shaarli may not work
4
5## PHP
6* `magic_quotes` is an horrible option of PHP which is often activated on servers. No serious developer should rely on this horror to secure their code against SQL injections. You should disable it (and Shaarli expects this option to be disabled). Nevertheless, I have added code to cope with `magic_quotes` on, so you should not be bothered even on crappy hosts.
7
8## Server and sessions
9* Directories are protected using `.htaccess` files
10* Forms are protected against XSRF (Cross-site requests forgery):
11 * Forms which act on data (save,delete…) contain a token generated by the server.
12 * Any posted form which does not contain a valid token is rejected.
13 * Any token can only be used once.
14 * Tokens are attached to the session and cannot be reused in another session.
15* Sessions automatically expire after 60 minutes.
16* Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
17
18## Shaarli datastore and configuration
19* The password is salted, hashed and stored in the data subdirectory, in a PHP file, and protected by htaccess. Even if the webserver does not support htaccess, the hash is not readable by URL. Even if the .php file is stolen, the password cannot deduced from the hash. The salt prevents rainbow-tables attacks.
20* Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a `.php` file.
21* Even if the server does not support `.htaccess` files, the data file will still not be readable by URL.
22* The database looks like this:
23```php
24<?php /* zP1ZjxxJtiYIvvevEPJ2lDOaLrZv7o...
25...ka7gaco/Z+TFXM2i7BlfMf8qxpaSSYfKlvqv/x8= */ ?>
26```
27
28* Small hashes are used to make a link to an entry in Shaarli. They are unique. In fact, the date of the items (eg. `20110923_150523`) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only `A-Z a-z 0-9 - _` and `@`.
diff --git a/doc/Server-configuration.html b/doc/Server-configuration.html
deleted file mode 100644
index 2f1c25b5..00000000
--- a/doc/Server-configuration.html
+++ /dev/null
@@ -1,443 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Server configuration</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="server-configuration">Server configuration</h1>
103<p><em>Example virtual host configurations for popular web servers</em></p>
104<ul>
105<li><a href="#apache">Apache</a><a href=".html"></a></li>
106<li><a href="#nginx">Nginx</a><a href=".html"></a></li>
107</ul>
108<h2 id="prerequisites">Prerequisites</h2>
109<h3 id="shaarli">Shaarli</h3>
110<ul>
111<li>Shaarli is installed in a directory readable/writeable by the user</li>
112<li>the correct read/write permissions have been granted to the web server <em>user and/or group</em></li>
113<li>for HTTPS / SSL:</li>
114<li>a key pair (public, private) and a certificate have been generated</li>
115<li>the appropriate server SSL extension is installed and active</li>
116</ul>
117<h3 id="https-tls-and-self-signed-certificates">HTTPS, TLS and self-signed certificates</h3>
118<p>Related guides:</p>
119<ul>
120<li><a href="http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php">How to Create Self-Signed SSL Certificates with OpenSSL</a><a href=".html"></a></li>
121<li><a href="https://workaround.org/certificate-authority">How do I create my own Certificate Authority?</a><a href=".html"></a></li>
122<li>Generate a self-signed certificate (will trigger browser warnings) with apache2: <code>make-ssl-cert generate-default-snakeoil --force-overwrite</code> will create <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> and <code>/etc/ssl/private/ssl-cert-snakeoil.key</code></li>
123</ul>
124<h3 id="proxies">Proxies</h3>
125<p>If Shaarli is served behind a proxy (i.e. there is a proxy server between clients and the web server hosting Shaarli), please refer to the proxy server documentation for proper configuration. In particular, you have to ensure that the following server variables are properly set:</p>
126<ul>
127<li><code>X-Forwarded-Proto</code>;</li>
128<li><code>X-Forwarded-Host</code>;</li>
129<li><code>X-Forwarded-For</code>.</li>
130</ul>
131<p>See also <a href="https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&amp;q=label%3Aproxy+">proxy-related</a> issues.<a href=".html"></a></p>
132<h2 id="apache">Apache</h2>
133<h3 id="minimal">Minimal</h3>
134<div class="sourceCode"><pre class="sourceCode apache"><code class="sourceCode apache"><span class="fu">&lt;VirtualHost</span><span class="at"> *:80</span><span class="fu">&gt;</span>
135 ServerName<span class="st"> shaarli.my-domain.org</span>
136 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
137<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
138<h3 id="debug---log-all-the-things">Debug - Log all the things!</h3>
139<p>This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors.</p>
140<p>See:</p>
141<ul>
142<li><a href="http://stackoverflow.com/q/176">Apache/PHP - error log per VirtualHost</a> (StackOverflow)<a href=".html"></a></li>
143<li><a href="https://ma.ttias.be/php-php_value-vs-php_admin_value-and-the-use-of-php_flag-explained/">PHP: php_value vs php_admin_value and the use of php_flag explained</a><a href=".html"></a></li>
144</ul>
145<div class="sourceCode"><pre class="sourceCode apache"><code class="sourceCode apache"><span class="fu">&lt;VirtualHost</span><span class="at"> *:80</span><span class="fu">&gt;</span>
146 ServerName<span class="st"> shaarli.my-domain.org</span>
147 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
148
149 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
150 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
151 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
152
153 php_flag log_errors on
154 php_flag display_errors on
155 php_value error_reporting 2147483647
156 php_value error_log /var/log/apache2/shaarli-php-error.log
157<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
158<h3 id="standard---keep-access-and-error-logs">Standard - Keep access and error logs</h3>
159<div class="sourceCode"><pre class="sourceCode apache"><code class="sourceCode apache"><span class="fu">&lt;VirtualHost</span><span class="at"> *:80</span><span class="fu">&gt;</span>
160 ServerName<span class="st"> shaarli.my-domain.org</span>
161 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
162
163 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
164 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
165 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
166<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
167<h3 id="paranoid---redirect-http-80-to-https-443">Paranoid - Redirect HTTP (:80) to HTTPS (:443)</h3>
168<p>See <a href="https://wiki.mozilla.org/Security/Server_Side_TLS#Apache">Server-side TLS</a> (Mozilla).<a href=".html"></a></p>
169<div class="sourceCode"><pre class="sourceCode apache"><code class="sourceCode apache"><span class="fu">&lt;VirtualHost</span><span class="at"> *:443</span><span class="fu">&gt;</span>
170 ServerName<span class="st"> shaarli.my-domain.org</span>
171 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
172
173 <span class="ex">SSLEngine</span><span class="ch"> </span><span class="kw">on</span>
174 SSLCertificateFile<span class="st"> /absolute/path/to/the/website/certificate.pem</span>
175 SSLCertificateKeyFile<span class="st"> /absolute/path/to/the/website/key.key</span>
176
177 <span class="fu">&lt;Directory</span><span class="at"> /absolute/path/to/shaarli/</span><span class="fu">&gt;</span>
178 <span class="ex">AllowOverride</span><span class="ch"> </span><span class="kw">All</span>
179 <span class="ex">Options</span><span class="ch"> </span><span class="kw">Indexes</span><span class="ch"> </span><span class="kw">FollowSymLinks</span><span class="ch"> </span><span class="kw">MultiViews</span>
180 <span class="ex">Order</span><span class="ch"> </span><span class="kw">allow,deny</span>
181 allow<span class="st"> from all</span>
182 <span class="fu">&lt;/Directory&gt;</span>
183
184 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
185 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
186 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
187<span class="fu">&lt;/VirtualHost&gt;</span>
188<span class="fu">&lt;VirtualHost</span><span class="at"> *:80</span><span class="fu">&gt;</span>
189 ServerName<span class="st"> shaarli.my-domain.org</span>
190 Redirect<span class="st"> 301 / https://shaarli.my-domain.org</span>
191
192 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
193 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
194 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
195<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
196<h3 id="htaccess">.htaccess</h3>
197<p>Shaarli use <code>.htaccess</code> Apache files to deny access to files that shouldn't be directly accessed (datastore, config, etc.). You need the directive <code>AllowOverride All</code> in your virtual host configuration for them to work.</p>
198<p><strong>Warning</strong>: If you use Apache 2.2 or lower, you need <a href="https://httpd.apache.org/docs/current/mod/mod_version.html">mod_version</a> to be installed and enabled.<a href=".html"></a></p>
199<h2 id="lighthttpd">LightHttpd</h2>
200<h2 id="nginx">Nginx</h2>
201<h3 id="foreword">Foreword</h3>
202<p>Nginx does not natively interpret PHP scripts; to this effect, we will run a <a href="https://en.wikipedia.org/wiki/FastCGI">FastCGI</a> service, to which Nginx's FastCGI module will proxy all requests to PHP resources.<a href=".html"></a></p>
203<p>Required packages:</p>
204<ul>
205<li><a href="http://nginx.org">nginx</a><a href=".html"></a></li>
206<li><a href="http://php-fpm.org">php-fpm</a> - PHP FastCGI Process Manager<a href=".html"></a></li>
207</ul>
208<p>Official documentation:</p>
209<ul>
210<li><a href="http://nginx.org/en/docs/beginners_guide.html">Beginner's guide</a><a href=".html"></a></li>
211<li><a href="http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html">ngx_http_fastcgi_module</a><a href=".html"></a></li>
212<li><a href="http://wiki.nginx.org/Pitfalls">Pitfalls</a><a href=".html"></a></li>
213</ul>
214<p>Community resources:</p>
215<ul>
216<li><a href="https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx">Server-side TLS (Nginx)</a> (Mozilla)<a href=".html"></a></li>
217<li><a href="http://kbeezie.com/nginx-configuration-examples/">PHP configuration examples</a> (Karl Blessing)<a href=".html"></a></li>
218</ul>
219<h3 id="common-setup">Common setup</h3>
220<p>Once Nginx and PHP-FPM are installed, we need to ensure:</p>
221<ul>
222<li>Nginx and PHP-FPM are running using the <em>same user and group</em></li>
223<li>both these user and group have
224<ul>
225<li><code>read</code> permissions for Shaarli resources</li>
226<li><code>execute</code> permissions for Shaarli directories <em>AND</em> their parent directories</li>
227</ul></li>
228</ul>
229<p>On a production server:</p>
230<ul>
231<li><code>user:group</code> will likely be <code>http:http</code>, <code>www:www</code> or <code>www-data:www-data</code></li>
232<li>files will be located under <code>/var/www</code>, <code>/var/http</code> or <code>/usr/share/nginx</code></li>
233</ul>
234<p>On a development server:</p>
235<ul>
236<li>files may be located in a user's home directory</li>
237<li>in this case, make sure both Nginx and PHP-FPM are running as the local user/group!</li>
238</ul>
239<p>For all following configuration examples, this user/group pair will be used:</p>
240<ul>
241<li><code>user:group = john:users</code>,</li>
242</ul>
243<p>which corresponds to the following service configuration:</p>
244<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="co">; /etc/php/php-fpm.conf</span>
245<span class="dt">user </span><span class="ot">=</span><span class="st"> john</span>
246<span class="dt">group </span><span class="ot">=</span><span class="st"> users</span>
247
248<span class="kw">[...][]</span><span class="dt">(.html)</span>
249<span class="dt">listen.owner </span><span class="ot">=</span><span class="st"> john</span>
250<span class="dt">listen.group </span><span class="ot">=</span><span class="st"> users</span></code></pre></div>
251<pre class="nginx"><code># /etc/nginx/nginx.conf
252user john users;
253
254http {
255 [...][](.html)
256}</code></pre>
257<h3 id="optional-increase-the-maximum-file-upload-size">(Optional) Increase the maximum file upload size</h3>
258<p>Some bookmark dumps generated by web browsers can be <em>huge</em> due to the presence of Base64-encoded images and favicons, as well as extra verbosity when nesting links in (sub-)folders.</p>
259<p>To increase upload size, you will need to modify both nginx and PHP configuration:</p>
260<pre class="nginx"><code># /etc/nginx/nginx.conf
261
262http {
263 [...][](.html)
264
265 client_max_body_size 10m;
266
267 [...][](.html)
268}</code></pre>
269<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="co"># /etc/php5/fpm/php.ini</span>
270
271<span class="kw">[...][]</span><span class="dt">(.html)</span>
272<span class="dt">post_max_size </span><span class="ot">=</span><span class="st"> 10M</span>
273<span class="kw">[...][]</span><span class="dt">(.html)</span>
274<span class="dt">upload_max_filesize </span><span class="ot">=</span><span class="st"> 10M</span></code></pre></div>
275<h3 id="minimal-1">Minimal</h3>
276<p><em>WARNING: Use for development only!</em></p>
277<pre class="nginx"><code>user john users;
278worker_processes 1;
279events {
280 worker_connections 1024;
281}
282
283http {
284 include mime.types;
285 default_type application/octet-stream;
286 keepalive_timeout 20;
287
288 index index.html index.php;
289
290 server {
291 listen 80;
292 server_name localhost;
293 root /home/john/web;
294
295 access_log /var/log/nginx/access.log;
296 error_log /var/log/nginx/error.log;
297
298 location /shaarli/ {
299 access_log /var/log/nginx/shaarli.access.log;
300 error_log /var/log/nginx/shaarli.error.log;
301 }
302
303 location ~ (index)\.php$ {
304 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
305 fastcgi_index index.php;
306 include fastcgi.conf;
307 }
308 }
309}</code></pre>
310<h3 id="modular">Modular</h3>
311<p>The previous setup is sufficient for development purposes, but has several major caveats:</p>
312<ul>
313<li>every content that does not match the PHP rule will be sent to client browsers:
314<ul>
315<li>dotfiles - in our case, <code>.htaccess</code></li>
316<li>temporary files, e.g. Vim or Emacs files: <code>index.php~</code></li>
317</ul></li>
318<li>asset / static resource caching is not optimized</li>
319<li>if serving several PHP sites, there will be a lot of duplication: <code>location /shaarli/</code>, <code>location /mysite/</code>, etc.</li>
320</ul>
321<p>To solve this, we will split Nginx configuration in several parts, that will be included when needed:</p>
322<pre class="nginx"><code># /etc/nginx/deny.conf
323location ~ /\. {
324 # deny access to dotfiles
325 access_log off;
326 log_not_found off;
327 deny all;
328}
329
330location ~ ~$ {
331 # deny access to temp editor files, e.g. &quot;script.php~&quot;
332 access_log off;
333 log_not_found off;
334 deny all;
335}</code></pre>
336<pre class="nginx"><code># /etc/nginx/php.conf
337location ~ (index)\.php$ {
338 # filter and proxy PHP requests to PHP-FPM
339 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
340 fastcgi_index index.php;
341 include fastcgi.conf;
342}
343
344location ~ \.php$ {
345 # deny access to all other PHP scripts
346 deny all;
347}</code></pre>
348<pre class="nginx"><code># /etc/nginx/static_assets.conf
349location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
350 expires max;
351 add_header Pragma public;
352 add_header Cache-Control &quot;public, must-revalidate, proxy-revalidate&quot;;
353}</code></pre>
354<pre class="nginx"><code># /etc/nginx/nginx.conf
355[...][](.html)
356
357http {
358 [...][](.html)
359
360 root /home/john/web;
361 access_log /var/log/nginx/access.log;
362 error_log /var/log/nginx/error.log;
363
364 server {
365 # virtual host for a first domain
366 listen 80;
367 server_name my.first.domain.org;
368
369 location /shaarli/ {
370 access_log /var/log/nginx/shaarli.access.log;
371 error_log /var/log/nginx/shaarli.error.log;
372 }
373
374 location = /shaarli/favicon.ico {
375 # serve the Shaarli favicon from its custom location
376 alias /var/www/shaarli/images/favicon.ico;
377 }
378
379 include deny.conf;
380 include static_assets.conf;
381 include php.conf;
382 }
383
384 server {
385 # virtual host for a second domain
386 listen 80;
387 server_name second.domain.com;
388
389 location /minigal/ {
390 access_log /var/log/nginx/minigal.access.log;
391 error_log /var/log/nginx/minigal.error.log;
392 }
393
394 include deny.conf;
395 include static_assets.conf;
396 include php.conf;
397 }
398}</code></pre>
399<h3 id="redirect-http-to-https">Redirect HTTP to HTTPS</h3>
400<p>Assuming you have generated a (self-signed) key and certificate, and they are located under <code>/home/john/ssl/localhost.{key,crt}</code>, it is pretty straightforward to set an HTTP (:80) to HTTPS (:443) redirection to force SSL/TLS usage.</p>
401<pre class="nginx"><code># /etc/nginx/nginx.conf
402[...][](.html)
403
404http {
405 [...][](.html)
406
407 index index.html index.php;
408
409 root /home/john/web;
410 access_log /var/log/nginx/access.log;
411 error_log /var/log/nginx/error.log;
412
413 server {
414 listen 80;
415 server_name localhost;
416
417 return 301 https://localhost$request_uri;
418 }
419
420 server {
421 listen 443 ssl;
422 server_name localhost;
423
424 ssl_certificate /home/john/ssl/localhost.crt;
425 ssl_certificate_key /home/john/ssl/localhost.key;
426
427 location /shaarli/ {
428 access_log /var/log/nginx/shaarli.access.log;
429 error_log /var/log/nginx/shaarli.error.log;
430 }
431
432 location = /shaarli/favicon.ico {
433 # serve the Shaarli favicon from its custom location
434 alias /var/www/shaarli/images/favicon.ico;
435 }
436
437 include deny.conf;
438 include static_assets.conf;
439 include php.conf;
440 }
441}</code></pre>
442</body>
443</html>
diff --git a/doc/Server-requirements.html b/doc/Server-requirements.html
deleted file mode 100644
index 2c2545bb..00000000
--- a/doc/Server-requirements.html
+++ /dev/null
@@ -1,178 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Server requirements</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="server-requirements">Server requirements</h1>
66<h2 id="php">PHP</h2>
67<h3 id="release-information">Release information</h3>
68<ul>
69<li><a href="http://php.net/supported-versions.php">PHP: Supported versions</a><a href=".html"></a></li>
70<li><a href="http://php.net/eol.php">PHP: Unsupported versions</a> <em>(EOL - End Of Life)</em><a href=".html"></a></li>
71<li><a href="http://php.net/ChangeLog-7.php">PHP 7 Changelog</a><a href=".html"></a></li>
72<li><a href="http://php.net/ChangeLog-5.php">PHP 5 Changelog</a><a href=".html"></a></li>
73<li><a href="https://bugs.php.net/">PHP: Bugs</a><a href=".html"></a></li>
74</ul>
75<h3 id="supported-versions">Supported versions</h3>
76<table>
77<thead>
78<tr class="header">
79<th style="text-align: center;">Version</th>
80<th style="text-align: center;">Status</th>
81<th style="text-align: center;">Shaarli compatibility</th>
82</tr>
83</thead>
84<tbody>
85<tr class="odd">
86<td style="text-align: center;">7.0</td>
87<td style="text-align: center;">Supported</td>
88<td style="text-align: center;">✅</td>
89</tr>
90<tr class="even">
91<td style="text-align: center;">5.6</td>
92<td style="text-align: center;">Supported</td>
93<td style="text-align: center;">✅</td>
94</tr>
95<tr class="odd">
96<td style="text-align: center;">5.5</td>
97<td style="text-align: center;">EOL: 2016-07-10</td>
98<td style="text-align: center;">✅</td>
99</tr>
100<tr class="even">
101<td style="text-align: center;">5.4</td>
102<td style="text-align: center;">EOL: 2015-09-14</td>
103<td style="text-align: center;">✅ (up to Shaarli 0.8.x)</td>
104</tr>
105<tr class="odd">
106<td style="text-align: center;">5.3</td>
107<td style="text-align: center;">EOL: 2014-08-14</td>
108<td style="text-align: center;">✅ (up to Shaarli 0.8.x)</td>
109</tr>
110</tbody>
111</table>
112<p>See also:</p>
113<ul>
114<li><a href="https://github.com/shaarli/Shaarli/blob/master/.travis.yml">Travis configuration</a><a href=".html"></a></li>
115</ul>
116<h3 id="dependency-management">Dependency management</h3>
117<p>Starting with Shaarli <code>v0.8.x</code>, <a href="https://getcomposer.org/">Composer</a> is used to resolve,<a href=".html"></a><br />
118download and install third-party PHP dependencies.</p>
119<table>
120<thead>
121<tr class="header">
122<th>Library</th>
123<th style="text-align: center;">Required?</th>
124<th>Usage</th>
125</tr>
126</thead>
127<tbody>
128<tr class="odd">
129<td><a href="https://packagist.org/packages/shaarli/netscape-bookmark-parser"><code>shaarli/netscape-bookmark-parser</code></a></td>
130<td style="text-align: center;">All</td>
131<td>Import bookmarks from Netscape files<a href=".html"></a></td>
132</tr>
133</tbody>
134</table>
135<h3 id="extensions">Extensions</h3>
136<table style="width:19%;">
137<colgroup>
138<col style="width: 5%" />
139<col style="width: 8%" />
140<col style="width: 5%" />
141</colgroup>
142<thead>
143<tr class="header">
144<th>Extension</th>
145<th style="text-align: center;">Required?</th>
146<th>Usage</th>
147</tr>
148</thead>
149<tbody>
150<tr class="odd">
151<td><a href="http://php.net/manual/en/book.openssl.php"><code>openssl</code></a></td>
152<td style="text-align: center;">All</td>
153<td>OpenSSL, HTTPS<a href=".html"></a></td>
154</tr>
155<tr class="even">
156<td><a href="http://php.net/manual/en/book.mbstring.php"><code>php-mbstring</code></a></td>
157<td style="text-align: center;">CentOS, Fedora, RHEL, Windows</td>
158<td>multibyte (Unicode) string support<a href=".html"></a></td>
159</tr>
160<tr class="odd">
161<td><a href="http://php.net/manual/en/book.image.php"><code>php-gd</code></a></td>
162<td style="text-align: center;">optional</td>
163<td>thumbnail resizing<a href=".html"></a></td>
164</tr>
165<tr class="even">
166<td><a href="http://php.net/manual/en/book.intl.php"><code>php-intl</code></a></td>
167<td style="text-align: center;">optional</td>
168<td>localized text sorting (e.g. <code>e-&gt;è-&gt;f</code>)<a href=".html"></a></td>
169</tr>
170<tr class="odd">
171<td><a href="http://php.net/manual/en/book.curl.php"><code>php-curl</code></a></td>
172<td style="text-align: center;">optional</td>
173<td>using cURL for fetching webpages and thumbnails in a more robust way<a href=".html"></a></td>
174</tr>
175</tbody>
176</table>
177</body>
178</html>
diff --git a/doc/Server-security.html b/doc/Server-security.html
deleted file mode 100644
index 3551deff..00000000
--- a/doc/Server-security.html
+++ /dev/null
@@ -1,173 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Server security</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="server-security">Server security</h1>
103<h2 id="php.ini">php.ini</h2>
104<p>PHP settings are defined in:</p>
105<ul>
106<li>a main configuration file, usually found under <code>/etc/php5/php.ini</code>; some distributions provide different configuration environments, e.g.
107<ul>
108<li><code>/etc/php5/php.ini</code> - used when running console scripts</li>
109<li><code>/etc/php5/apache2/php.ini</code> - used when a client requests PHP resources from Apache</li>
110<li><code>/etc/php5/php-fpm.conf</code> - used when PHP requests are proxied to PHP-FPM</li>
111</ul></li>
112<li>additional configuration files/entries, depending on the installed/enabled extensions:
113<ul>
114<li><code>/etc/php/conf.d/xdebug.ini</code></li>
115</ul></li>
116</ul>
117<h3 id="locate-.ini-files">Locate .ini files</h3>
118<h4 id="console-environment">Console environment</h4>
119<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">php</span> --ini
120<span class="ex">Configuration</span> File (php.ini) <span class="ex">Path</span>: /etc/php
121<span class="ex">Loaded</span> Configuration File: /etc/php/php.ini
122<span class="ex">Scan</span> for additional .ini files in: /etc/php/conf.d
123<span class="ex">Additional</span> .ini files parsed: /etc/php/conf.d/xdebug.ini</code></pre></div>
124<h4 id="server-environment">Server environment</h4>
125<ul>
126<li>create a <code>phpinfo.php</code> script located in a path supported by the web server, e.g.
127<ul>
128<li>Apache (with user dirs enabled): <code>/home/myself/public_html/phpinfo.php</code></li>
129<li><code>/var/www/test/phpinfo.php</code></li>
130</ul></li>
131<li>make sure the script is readable by the web server user/group (usually, <code>www</code>, <code>www-data</code> or <code>httpd</code>)</li>
132<li>access the script from a web browser</li>
133<li><p>look at the <em>Loaded Configuration File</em> and <em>Scan this dir for additional .ini files</em> entries</p>
134<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">&lt;?php</span> <span class="fu">phpinfo</span><span class="ot">();</span> <span class="kw">?&gt;</span></code></pre></div></li>
135</ul>
136<h2 id="fail2ban">fail2ban</h2>
137<p><code>fail2ban</code> is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses <code>iptables</code> profiles to block brute-force attempts:</p>
138<ul>
139<li><a href="http://www.fail2ban.org/wiki/index.php/Main_Page">Official website</a><a href=".html"></a></li>
140<li><a href="https://github.com/fail2ban/fail2ban">Source code</a><a href=".html"></a></li>
141</ul>
142<h3 id="read-shaarli-logs-to-ban-ips">Read Shaarli logs to ban IPs</h3>
143<p>Example configuration:</p>
144<ul>
145<li>allow 3 login attempts per IP address</li>
146<li>after 3 failures, permanently ban the corresponding IP adddress</li>
147</ul>
148<p><code>/etc/fail2ban/jail.local</code></p>
149<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="kw">[shaarli-auth][]</span><span class="dt">(.html)</span>
150<span class="dt">enabled </span><span class="ot">=</span><span class="st"> </span><span class="kw">true</span>
151<span class="dt">port </span><span class="ot">=</span><span class="st"> https,http</span>
152<span class="dt">filter </span><span class="ot">=</span><span class="st"> shaarli-auth</span>
153<span class="dt">logpath </span><span class="ot">=</span><span class="st"> /var/www/path/to/shaarli/data/log.txt</span>
154<span class="dt">maxretry </span><span class="ot">=</span><span class="st"> </span><span class="dv">3</span>
155<span class="dt">bantime </span><span class="ot">=</span><span class="st"> -</span><span class="dv">1</span></code></pre></div>
156<p><code>/etc/fail2ban/filter.d/shaarli-auth.conf</code></p>
157<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="kw">[INCLUDES][]</span><span class="dt">(.html)</span>
158<span class="dt">before </span><span class="ot">=</span><span class="st"> common.conf</span>
159<span class="kw">[Definition][]</span><span class="dt">(.html)</span>
160<span class="dt">failregex </span><span class="ot">=</span><span class="st"> \s-\s&lt;HOST&gt;\s-\sLogin failed for user.*$</span>
161<span class="dt">ignoreregex </span><span class="ot">=</span><span class="st"> </span></code></pre></div>
162<h2 id="robots---restricting-search-engines-and-web-crawler-traffic">Robots - Restricting search engines and web crawler traffic</h2>
163<p>Creating a <code>robots.txt</code> with the following contents at the root of your Shaarli installation will prevent <em>honest</em> web crawlers from indexing each and every link and Daily page from a Shaarli instance, thus getting rid of a certain amount of unsollicited network traffic.</p>
164<pre><code>User-agent: *
165Disallow: /</code></pre>
166<p>See:</p>
167<ul>
168<li><a href="http://www.robotstxt.org/" class="uri">http://www.robotstxt.org/</a></li>
169<li><a href="http://www.robotstxt.org/robotstxt.html" class="uri">http://www.robotstxt.org/robotstxt.html</a></li>
170<li><a href="http://www.robotstxt.org/meta.html" class="uri">http://www.robotstxt.org/meta.html</a></li>
171</ul>
172</body>
173</html>
diff --git a/doc/Shaarli-configuration.html b/doc/Shaarli-configuration.html
deleted file mode 100644
index 6d717c65..00000000
--- a/doc/Shaarli-configuration.html
+++ /dev/null
@@ -1,295 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Shaarli configuration</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="shaarli-configuration">Shaarli configuration</h1>
103<h1 id="shaarli-configuration-1">Shaarli configuration</h1>
104<h2 id="foreword">Foreword</h2>
105<p><strong>Do not edit configuration options in index.php! Your changes would be lost.</strong></p>
106<p>Once your Shaarli instance is installed, the file <code>data/config.json.php</code> is generated:</p>
107<ul>
108<li>it contains all settings in JSON format, and can be edited to customize values</li>
109<li>it defines which <a href="Plugin-System">plugins</a> are enabled<a href="(.html).html">(.html)</a></li>
110<li>its values override those defined in <code>index.php</code></li>
111<li>it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration</li>
112</ul>
113<h2 id="file-and-directory-permissions">File and directory permissions</h2>
114<p>The server process running Shaarli must have:</p>
115<ul>
116<li><code>read</code> access to the following resources:
117<ul>
118<li>PHP scripts: <code>index.php</code>, <code>application/*.php</code>, <code>plugins/*.php</code></li>
119<li>3rd party PHP and Javascript libraries: <code>inc/*.php</code>, <code>inc/*.js</code></li>
120<li>static assets:
121<ul>
122<li>CSS stylesheets: <code>inc/*.css</code></li>
123<li><code>images/*</code></li>
124</ul></li>
125<li>RainTPL templates: <code>tpl/*.html</code></li>
126</ul></li>
127<li><code>read</code>, <code>write</code> and <code>execution</code> access to the following directories:
128<ul>
129<li><code>cache</code> - thumbnail cache</li>
130<li><code>data</code> - link data store, configuration options</li>
131<li><code>pagecache</code> - Atom/RSS feed cache</li>
132<li><code>tmp</code> - RainTPL page cache</li>
133</ul></li>
134</ul>
135<p>On a Linux distribution:</p>
136<ul>
137<li>the web server user will likely be <code>www</code> or <code>http</code> (for Apache2)</li>
138<li>it will be a member of a group of the same name: <code>www:www</code>, <code>http:http</code></li>
139<li>to give it access to Shaarli, either:
140<ul>
141<li>unzip Shaarli in the default web server location (usually <code>/var/www/</code>) and set the web server user as the owner</li>
142<li>put users in the same group as the web server, and set the appropriate access rights</li>
143</ul></li>
144<li>if you have a domain / subdomain to serve Shaarli, <a href="Server-configuration">configure the server</a> accordingly<a href="(.html).html">(.html)</a></li>
145</ul>
146<h2 id="configuration">Configuration</h2>
147<p>In <code>data/config.json.php</code>.</p>
148<p>See also <a href="Plugin-System.html">Plugin System</a>.<a href=".html"></a></p>
149<h3 id="credentials">Credentials</h3>
150<blockquote>
151<p>You shouldn't edit those.</p>
152</blockquote>
153<p><strong>login</strong>: Login username.<br />
154<strong>hash</strong>: Generated password hash.<br />
155<strong>salt</strong>: Password salt.</p>
156<h3 id="general">General</h3>
157<p><strong>title</strong>: Shaarli's instance title.<br />
158<strong>header_link</strong>: Link to the homepage.<br />
159<strong>links_per_page</strong>: Number of shaares displayed per page.<br />
160<strong>timezone</strong>: See <a href="http://php.net/manual/en/timezones.php">the list of supported timezones</a>. <a href=".html"></a><br />
161<strong>enabled_plugins</strong>: List of enabled plugins.</p>
162<h3 id="security">Security</h3>
163<p><strong>session_protection_disabled</strong>: Disable session cookie hijacking protection (not recommended).<br />
164It might be useful if your IP adress often changes.<br />
165<strong>ban_after</strong>: Failed login attempts before being IP banned.<br />
166<strong>ban_duration</strong>: IP ban duration in seconds.<br />
167<strong>open_shaarli</strong>: Anyone can add a new link while logged out if enabled.<br />
168<strong>trusted_proxies</strong>: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.</p>
169<h3 id="resources">Resources</h3>
170<p><strong>data_dir</strong>: Data directory.<br />
171<strong>datastore</strong>: Shaarli's links database file path.<br />
172<strong>updates</strong>: File path for the ran updates file.<br />
173<strong>log</strong>: Log file path.<br />
174<strong>update_check</strong>: Last update check file path.<br />
175<strong>raintpl_tpl</strong>: Templates directory.<br />
176<strong>raintpl_tmp</strong>: Template engine cache directory.<br />
177<strong>thumbnails_cache</strong>: Thumbnails cache directory.<br />
178<strong>page_cache</strong>: Shaarli's internal cache directory.<br />
179<strong>ban_file</strong>: Banned IP file path.</p>
180<h3 id="updates">Updates</h3>
181<p><strong>check_updates</strong>: Enable or disable update check to the git repository.<br />
182<strong>check_updates_branch</strong>: Git branch used to check updates (e.g. <code>stable</code> or <code>master</code>).<br />
183<strong>check_updates_interval</strong>: Look for new version every N seconds (default: every day).</p>
184<h3 id="privacy">Privacy</h3>
185<p><strong>default_private_links</strong>: Check the private checkbox by default for every new link.<br />
186<strong>hide_public_links</strong>: All links are hidden while logged out.<br />
187<strong>hide_timestamps</strong>: Timestamps are hidden.</p>
188<h3 id="feed">Feed</h3>
189<p><strong>rss_permalinks</strong>: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.<br />
190<strong>show_atom</strong>: Display ATOM feed button.</p>
191<h3 id="thumbnail">Thumbnail</h3>
192<p><strong>enable_thumbnails</strong>: Enable or disable thumbnail display.<br />
193<strong>enable_localcache</strong>: Enable or disable local cache.</p>
194<h3 id="redirector">Redirector</h3>
195<p><strong>url</strong>: Redirector URL, such as <code>anonym.to</code>.<br />
196<strong>encode_url</strong>: Enable this if the redirector needs encoded URL to work properly.</p>
197<h2 id="configuration-file-example">Configuration file example</h2>
198<div class="sourceCode"><pre class="sourceCode json"><code class="sourceCode json"><span class="er">&lt;?php</span> <span class="er">/*</span>
199<span class="fu">{</span>
200 <span class="dt">&quot;credentials&quot;</span><span class="fu">:</span> <span class="fu">{</span>
201 <span class="dt">&quot;login&quot;</span><span class="fu">:</span> <span class="st">&quot;&lt;login&gt;&quot;</span><span class="fu">,</span>
202 <span class="dt">&quot;hash&quot;</span><span class="fu">:</span> <span class="st">&quot;&lt;password hash&gt;&quot;</span><span class="fu">,</span>
203 <span class="dt">&quot;salt&quot;</span><span class="fu">:</span> <span class="st">&quot;&lt;password salt&gt;&quot;</span>
204 <span class="fu">},</span>
205 <span class="dt">&quot;security&quot;</span><span class="fu">:</span> <span class="fu">{</span>
206 <span class="dt">&quot;ban_after&quot;</span><span class="fu">:</span> <span class="dv">4</span><span class="fu">,</span>
207 <span class="dt">&quot;session_protection_disabled&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
208 <span class="dt">&quot;ban_duration&quot;</span><span class="fu">:</span> <span class="dv">1800</span><span class="fu">,</span>
209 <span class="dt">&quot;trusted_proxies&quot;</span><span class="fu">:</span> <span class="ot">[[]</span><span class="er">(.html)</span>
210 <span class="st">&quot;1.2.3.4&quot;</span><span class="ot">,</span>
211 <span class="st">&quot;5.6.7.8&quot;</span>
212 <span class="ot">]</span>
213 <span class="fu">},</span>
214 <span class="dt">&quot;resources&quot;</span><span class="fu">:</span> <span class="fu">{</span>
215 <span class="dt">&quot;data_dir&quot;</span><span class="fu">:</span> <span class="st">&quot;data&quot;</span><span class="fu">,</span>
216 <span class="dt">&quot;config&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">config.php&quot;</span><span class="fu">,</span>
217 <span class="dt">&quot;datastore&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">datastore.php&quot;</span><span class="fu">,</span>
218 <span class="dt">&quot;ban_file&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">ipbans.php&quot;</span><span class="fu">,</span>
219 <span class="dt">&quot;updates&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">updates.txt&quot;</span><span class="fu">,</span>
220 <span class="dt">&quot;log&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">log.txt&quot;</span><span class="fu">,</span>
221 <span class="dt">&quot;update_check&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">lastupdatecheck.txt&quot;</span><span class="fu">,</span>
222 <span class="dt">&quot;raintpl_tmp&quot;</span><span class="fu">:</span> <span class="st">&quot;tmp</span><span class="ch">\/</span><span class="st">&quot;</span><span class="fu">,</span>
223 <span class="dt">&quot;raintpl_tpl&quot;</span><span class="fu">:</span> <span class="st">&quot;tpl</span><span class="ch">\/</span><span class="st">&quot;</span><span class="fu">,</span>
224 <span class="dt">&quot;thumbnails_cache&quot;</span><span class="fu">:</span> <span class="st">&quot;cache&quot;</span><span class="fu">,</span>
225 <span class="dt">&quot;page_cache&quot;</span><span class="fu">:</span> <span class="st">&quot;pagecache&quot;</span>
226 <span class="fu">},</span>
227 <span class="dt">&quot;general&quot;</span><span class="fu">:</span> <span class="fu">{</span>
228 <span class="dt">&quot;check_updates&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
229 <span class="dt">&quot;rss_permalinks&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
230 <span class="dt">&quot;links_per_page&quot;</span><span class="fu">:</span> <span class="dv">20</span><span class="fu">,</span>
231 <span class="dt">&quot;default_private_links&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
232 <span class="dt">&quot;enable_thumbnails&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
233 <span class="dt">&quot;enable_localcache&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
234 <span class="dt">&quot;check_updates_branch&quot;</span><span class="fu">:</span> <span class="st">&quot;stable&quot;</span><span class="fu">,</span>
235 <span class="dt">&quot;check_updates_interval&quot;</span><span class="fu">:</span> <span class="dv">86400</span><span class="fu">,</span>
236 <span class="dt">&quot;enabled_plugins&quot;</span><span class="fu">:</span> <span class="ot">[[]</span><span class="er">(.html)</span>
237 <span class="st">&quot;markdown&quot;</span><span class="ot">,</span>
238 <span class="st">&quot;wallabag&quot;</span><span class="ot">,</span>
239 <span class="st">&quot;archiveorg&quot;</span>
240 <span class="ot">]</span><span class="fu">,</span>
241 <span class="dt">&quot;timezone&quot;</span><span class="fu">:</span> <span class="st">&quot;Europe</span><span class="ch">\/</span><span class="st">Paris&quot;</span><span class="fu">,</span>
242 <span class="dt">&quot;title&quot;</span><span class="fu">:</span> <span class="st">&quot;My Shaarli&quot;</span><span class="fu">,</span>
243 <span class="dt">&quot;header_link&quot;</span><span class="fu">:</span> <span class="st">&quot;?&quot;</span>
244 <span class="fu">},</span>
245 <span class="dt">&quot;extras&quot;</span><span class="fu">:</span> <span class="fu">{</span>
246 <span class="dt">&quot;show_atom&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
247 <span class="dt">&quot;hide_public_links&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
248 <span class="dt">&quot;hide_timestamps&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
249 <span class="dt">&quot;open_shaarli&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
250 <span class="dt">&quot;redirector&quot;</span><span class="fu">:</span> <span class="st">&quot;http://anonym.to/?&quot;</span><span class="fu">,</span>
251 <span class="dt">&quot;redirector_encode_url&quot;</span><span class="fu">:</span> <span class="kw">false</span>
252 <span class="fu">},</span>
253 <span class="dt">&quot;general&quot;</span><span class="fu">:</span> <span class="fu">{</span>
254 <span class="dt">&quot;header_link&quot;</span><span class="fu">:</span> <span class="st">&quot;?&quot;</span><span class="fu">,</span>
255 <span class="dt">&quot;links_per_page&quot;</span><span class="fu">:</span> <span class="dv">20</span><span class="fu">,</span>
256 <span class="dt">&quot;enabled_plugins&quot;</span><span class="fu">:</span> <span class="ot">[[]</span><span class="er">(.html)</span>
257 <span class="st">&quot;markdown&quot;</span><span class="ot">,</span>
258 <span class="st">&quot;wallabag&quot;</span>
259 <span class="ot">]</span><span class="fu">,</span>
260 <span class="dt">&quot;timezone&quot;</span><span class="fu">:</span> <span class="st">&quot;Europe</span><span class="ch">\/</span><span class="st">Paris&quot;</span><span class="fu">,</span>
261 <span class="dt">&quot;title&quot;</span><span class="fu">:</span> <span class="st">&quot;My Shaarli&quot;</span>
262 <span class="fu">},</span>
263 <span class="dt">&quot;updates&quot;</span><span class="fu">:</span> <span class="fu">{</span>
264 <span class="dt">&quot;check_updates&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
265 <span class="dt">&quot;check_updates_branch&quot;</span><span class="fu">:</span> <span class="st">&quot;stable&quot;</span><span class="fu">,</span>
266 <span class="dt">&quot;check_updates_interval&quot;</span><span class="fu">:</span> <span class="dv">86400</span>
267 <span class="fu">},</span>
268 <span class="dt">&quot;feed&quot;</span><span class="fu">:</span> <span class="fu">{</span>
269 <span class="dt">&quot;rss_permalinks&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
270 <span class="dt">&quot;show_atom&quot;</span><span class="fu">:</span> <span class="kw">false</span>
271 <span class="fu">},</span>
272 <span class="dt">&quot;privacy&quot;</span><span class="fu">:</span> <span class="fu">{</span>
273 <span class="dt">&quot;default_private_links&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
274 <span class="dt">&quot;hide_public_links&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
275 <span class="dt">&quot;hide_timestamps&quot;</span><span class="fu">:</span> <span class="kw">false</span>
276 <span class="fu">},</span>
277 <span class="dt">&quot;thumbnail&quot;</span><span class="fu">:</span> <span class="fu">{</span>
278 <span class="dt">&quot;enable_thumbnails&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
279 <span class="dt">&quot;enable_localcache&quot;</span><span class="fu">:</span> <span class="kw">true</span>
280 <span class="fu">},</span>
281 <span class="dt">&quot;redirector&quot;</span><span class="fu">:</span> <span class="fu">{</span>
282 <span class="dt">&quot;url&quot;</span><span class="fu">:</span> <span class="st">&quot;http://anonym.to/?&quot;</span><span class="fu">,</span>
283 <span class="dt">&quot;encode_url&quot;</span><span class="fu">:</span> <span class="kw">false</span>
284 <span class="fu">},</span>
285 <span class="dt">&quot;plugins&quot;</span><span class="fu">:</span> <span class="fu">{</span>
286 <span class="dt">&quot;WALLABAG_URL&quot;</span><span class="fu">:</span> <span class="st">&quot;http://demo.wallabag.org&quot;</span><span class="fu">,</span>
287 <span class="dt">&quot;WALLABAG_VERSION&quot;</span><span class="fu">:</span> <span class="st">&quot;1&quot;</span>
288 <span class="fu">}</span>
289<span class="fu">}</span> <span class="er">?&gt;</span></code></pre></div>
290<h2 id="additional-configuration">Additional configuration</h2>
291<p>The playvideos plugin may require that you adapt your server's<br />
292<a href="https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting">Content Security Policy</a> <a href=".html"></a><br />
293configuration to work properly.<a href="(.html).html">(.html)</a></p>
294</body>
295</html>
diff --git a/doc/Shaarli-configuration.md b/doc/Shaarli-configuration.md
deleted file mode 100644
index 4a783c0e..00000000
--- a/doc/Shaarli-configuration.md
+++ /dev/null
@@ -1,211 +0,0 @@
1#Shaarli configuration
2# Shaarli configuration
3
4## Foreword
5
6**Do not edit configuration options in index.php! Your changes would be lost.**
7
8Once your Shaarli instance is installed, the file `data/config.json.php` is generated:
9* it contains all settings in JSON format, and can be edited to customize values
10* it defines which [plugins](Plugin-System) are enabled[(.html)]((.html).html)
11* its values override those defined in `index.php`
12* it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
13
14## File and directory permissions
15
16The server process running Shaarli must have:
17- `read` access to the following resources:
18 - PHP scripts: `index.php`, `application/*.php`, `plugins/*.php`
19 - 3rd party PHP and Javascript libraries: `inc/*.php`, `inc/*.js`
20 - static assets:
21 - CSS stylesheets: `inc/*.css`
22 - `images/*`
23 - RainTPL templates: `tpl/*.html`
24- `read`, `write` and `execution` access to the following directories:
25 - `cache` - thumbnail cache
26 - `data` - link data store, configuration options
27 - `pagecache` - Atom/RSS feed cache
28 - `tmp` - RainTPL page cache
29
30On a Linux distribution:
31- the web server user will likely be `www` or `http` (for Apache2)
32- it will be a member of a group of the same name: `www:www`, `http:http`
33- to give it access to Shaarli, either:
34 - unzip Shaarli in the default web server location (usually `/var/www/`) and set the web server user as the owner
35 - put users in the same group as the web server, and set the appropriate access rights
36- if you have a domain / subdomain to serve Shaarli, [configure the server](Server-configuration) accordingly[(.html)]((.html).html)
37
38## Configuration
39
40In `data/config.json.php`.
41
42See also [Plugin System](Plugin-System.html).[](.html)
43
44### Credentials
45
46> You shouldn't edit those.
47
48**login**: Login username.
49**hash**: Generated password hash.
50**salt**: Password salt.
51
52### General
53
54**title**: Shaarli's instance title.
55**header_link**: Link to the homepage.
56**links_per_page**: Number of shaares displayed per page.
57**timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php). [](.html)
58**enabled_plugins**: List of enabled plugins.
59
60### Security
61
62**session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
63It might be useful if your IP adress often changes.
64**ban_after**: Failed login attempts before being IP banned.
65**ban_duration**: IP ban duration in seconds.
66**open_shaarli**: Anyone can add a new link while logged out if enabled.
67**trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
68
69### Resources
70
71**data_dir**: Data directory.
72**datastore**: Shaarli's links database file path.
73**updates**: File path for the ran updates file.
74**log**: Log file path.
75**update_check**: Last update check file path.
76**raintpl_tpl**: Templates directory.
77**raintpl_tmp**: Template engine cache directory.
78**thumbnails_cache**: Thumbnails cache directory.
79**page_cache**: Shaarli's internal cache directory.
80**ban_file**: Banned IP file path.
81
82### Updates
83
84**check_updates**: Enable or disable update check to the git repository.
85**check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
86**check_updates_interval**: Look for new version every N seconds (default: every day).
87
88### Privacy
89
90**default_private_links**: Check the private checkbox by default for every new link.
91**hide_public_links**: All links are hidden while logged out.
92**hide_timestamps**: Timestamps are hidden.
93
94### Feed
95
96**rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
97**show_atom**: Display ATOM feed button.
98
99### Thumbnail
100
101**enable_thumbnails**: Enable or disable thumbnail display.
102**enable_localcache**: Enable or disable local cache.
103
104### Redirector
105
106**url**: Redirector URL, such as `anonym.to`.
107**encode_url**: Enable this if the redirector needs encoded URL to work properly.
108
109## Configuration file example
110
111```json
112<?php /*
113{
114 "credentials": {
115 "login": "<login>",
116 "hash": "<password hash>",
117 "salt": "<password salt>"
118 },
119 "security": {
120 "ban_after": 4,
121 "session_protection_disabled": false,
122 "ban_duration": 1800,
123 "trusted_proxies": [[](.html)
124 "1.2.3.4",
125 "5.6.7.8"
126 ]
127 },
128 "resources": {
129 "data_dir": "data",
130 "config": "data\/config.php",
131 "datastore": "data\/datastore.php",
132 "ban_file": "data\/ipbans.php",
133 "updates": "data\/updates.txt",
134 "log": "data\/log.txt",
135 "update_check": "data\/lastupdatecheck.txt",
136 "raintpl_tmp": "tmp\/",
137 "raintpl_tpl": "tpl\/",
138 "thumbnails_cache": "cache",
139 "page_cache": "pagecache"
140 },
141 "general": {
142 "check_updates": true,
143 "rss_permalinks": true,
144 "links_per_page": 20,
145 "default_private_links": true,
146 "enable_thumbnails": true,
147 "enable_localcache": true,
148 "check_updates_branch": "stable",
149 "check_updates_interval": 86400,
150 "enabled_plugins": [[](.html)
151 "markdown",
152 "wallabag",
153 "archiveorg"
154 ],
155 "timezone": "Europe\/Paris",
156 "title": "My Shaarli",
157 "header_link": "?"
158 },
159 "extras": {
160 "show_atom": false,
161 "hide_public_links": false,
162 "hide_timestamps": false,
163 "open_shaarli": false,
164 "redirector": "http://anonym.to/?",
165 "redirector_encode_url": false
166 },
167 "general": {
168 "header_link": "?",
169 "links_per_page": 20,
170 "enabled_plugins": [[](.html)
171 "markdown",
172 "wallabag"
173 ],
174 "timezone": "Europe\/Paris",
175 "title": "My Shaarli"
176 },
177 "updates": {
178 "check_updates": true,
179 "check_updates_branch": "stable",
180 "check_updates_interval": 86400
181 },
182 "feed": {
183 "rss_permalinks": true,
184 "show_atom": false
185 },
186 "privacy": {
187 "default_private_links": true,
188 "hide_public_links": false,
189 "hide_timestamps": false
190 },
191 "thumbnail": {
192 "enable_thumbnails": true,
193 "enable_localcache": true
194 },
195 "redirector": {
196 "url": "http://anonym.to/?",
197 "encode_url": false
198 },
199 "plugins": {
200 "WALLABAG_URL": "http://demo.wallabag.org",
201 "WALLABAG_VERSION": "1"
202 }
203} ?>
204```
205
206## Additional configuration
207
208The playvideos plugin may require that you adapt your server's
209[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting) [](.html)
210configuration to work properly.[(.html)]((.html).html)
211
diff --git a/doc/Sharing-button.html b/doc/Sharing-button.html
deleted file mode 100644
index 93710efe..00000000
--- a/doc/Sharing-button.html
+++ /dev/null
@@ -1,92 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Sharing button</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="sharing-button">Sharing button</h1>
66<h3 id="add-the-sharing-button-bookmarklet-to-your-browser">Add the sharing button (<em>bookmarklet</em>) to your browser</h3>
67<ul>
68<li>Open your Shaarli and <code>Login</code></li>
69<li>Click the <code>Tools</code> button in the top bar</li>
70<li>Drag the <strong><code>✚Shaare link</code> button</strong>, and drop it to your browser's bookmarks bar.</li>
71</ul>
72<p><em>This bookmarklet button is compatible with Firefox, Opera, Chrome and Safari. Under Opera, you can't drag'n drop the button: You have to right-click on it and add a bookmark to your personal toolbar.</em></p>
73<p><embed src="(images/bookmarklet.png).html" /></p>
74<h3 id="share-links-using-the-bookmarklet">Share links using the <em>bookmarklet</em></h3>
75<ul>
76<li>When you are visiting a webpage you would like to share with Shaarli, click the <em>bookmarklet</em> you just added.</li>
77<li>A window opens.</li>
78<li>You can freely edit title, description, tags... to find it later using the text search or tag filtering.</li>
79<li>You will be able to edit this link later using the <embed src="(https://raw.githubusercontent.com/shaarli/Shaarli/master/images/edit_icon.png)-edit-button..html" /></li>
80<li>You can also check the “Private” box so that the link is saved but only visible to you.</li>
81<li>Click <code>Save</code>.<strong>Voilà! Your link is now shared.</strong></li>
82</ul>
83<h3 id="troubleshooting-the-bookmarklet-doesnt-work-with-a-few-website-e.g.-github.com">Troubleshooting: The bookmarklet doesn't work with a few website (e.g. Github.com)</h3>
84<p>Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.</p>
85<p>See <a href="https://github.com/shaarli/Shaarli#196">#196</a>.<a href=".html"></a></p>
86<p>There is an open bug for both Firefox and Chromium:</p>
87<ul>
88<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=866522" class="uri">https://bugzilla.mozilla.org/show_bug.cgi?id=866522</a></li>
89<li><a href="https://code.google.com/p/chromium/issues/detail?id=233903" class="uri">https://code.google.com/p/chromium/issues/detail?id=233903</a></li>
90</ul>
91</body>
92</html>
diff --git a/doc/Sharing-button.md b/doc/Sharing-button.md
deleted file mode 100644
index e4388863..00000000
--- a/doc/Sharing-button.md
+++ /dev/null
@@ -1,31 +0,0 @@
1#Sharing button
2### Add the sharing button (_bookmarklet_) to your browser
3
4 * Open your Shaarli and `Login`
5 * Click the `Tools` button in the top bar
6 * Drag the **`✚Shaare link` button**, and drop it to your browser's bookmarks bar.
7
8_This bookmarklet button is compatible with Firefox, Opera, Chrome and Safari. Under Opera, you can't drag'n drop the button: You have to right-click on it and add a bookmark to your personal toolbar._
9
10![(images/bookmarklet.png)]((images/bookmarklet.png).html)
11
12### Share links using the _bookmarklet_
13
14 * When you are visiting a webpage you would like to share with Shaarli, click the _bookmarklet_ you just added.
15 * A window opens.
16 * You can freely edit title, description, tags... to find it later using the text search or tag filtering.
17 * You will be able to edit this link later using the ![(https://raw.githubusercontent.com/shaarli/Shaarli/master/images/edit_icon.png) edit button.]((https://raw.githubusercontent.com/shaarli/Shaarli/master/images/edit_icon.png)-edit-button..html)
18 * You can also check the “Private” box so that the link is saved but only visible to you.
19 * Click `Save`.**Voilà! Your link is now shared.**
20
21### Troubleshooting: The bookmarklet doesn't work with a few website (e.g. Github.com)
22
23Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.
24
25See [#196](https://github.com/shaarli/Shaarli#196).[](.html)
26
27There is an open bug for both Firefox and Chromium:
28
29 * https://bugzilla.mozilla.org/show_bug.cgi?id=866522
30 * https://code.google.com/p/chromium/issues/detail?id=233903
31
diff --git a/doc/Static-analysis.html b/doc/Static-analysis.html
deleted file mode 100644
index d964e917..00000000
--- a/doc/Static-analysis.html
+++ /dev/null
@@ -1,80 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Static analysis</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="static-analysis">Static analysis</h1>
66<h2 id="wip">WIP</h2>
67<p>This topic is currently being discussed here:</p>
68<ul>
69<li><a href="https://github.com/shaarli/Shaarli/issues/95">Fix coding style (static analysis)</a> (#95)<a href=".html"></a></li>
70<li><a href="https://github.com/shaarli/Shaarli/issues/130">Continuous Integration tools &amp; features</a> (#130)<a href=".html"></a></li>
71</ul>
72<h3 id="usage">Usage</h3>
73<p>Static analysis tools can be installed with Composer, and used through Shaarli's <a href="https://github.com/shaarli/Shaarli/blob/master/Makefile">Makefile</a>.<a href=".html"></a></p>
74<p>For an overview of the available features, see:</p>
75<ul>
76<li><a href="https://github.com/shaarli/Shaarli/pull/124">Code quality: Makefile to run static code checkers</a> (#124)<a href=".html"></a></li>
77<li><a href="https://github.com/shaarli/Shaarli/pull/276">Run PHPCS against different coding standards</a> (#276)<a href=".html"></a></li>
78</ul>
79</body>
80</html>
diff --git a/doc/Theming.html b/doc/Theming.html
deleted file mode 100644
index 7cbf7aef..00000000
--- a/doc/Theming.html
+++ /dev/null
@@ -1,166 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Theming</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="theming">Theming</h1>
103<h2 id="user-css">User CSS</h2>
104<ul>
105<li>Shaarli's apparence can be modified by editing CSS rules in <code>inc/user.css</code>. This file allows to override rules defined in the main <code>inc/shaarli.css</code> (only add changed rules), or define a whole new theme.</li>
106<li>Do not edit <code>inc/shaarli.css</code>! Your changes would be overriden when updating Shaarli.</li>
107<li>Some themes are available at <a href="https://github.com/shaarli/shaarli-themes" class="uri">https://github.com/shaarli/shaarli-themes</a>.</li>
108</ul>
109<p>See also:</p>
110<ul>
111<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
112</ul>
113<h2 id="raintpl-template">RainTPL template</h2>
114<p><em>WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental.</em></p>
115<ul>
116<li>Find the template you'd like to install (see the list of <a href="available-templates%7CTheming#community-themes--templates.html">available templates|Theming#community-themes--templates</a>)</li>
117<li>Find it's git clone URL or download the zip archive for the template.</li>
118<li>In your Shaarli <code>tpl/</code> directory, run <code>git clone https://url/of/my-template/</code> or unpack the zip archive.
119<ul>
120<li>There should now be a <code>my-template/</code> directory under the <code>tpl/</code> dir, containing directly all the template files.</li>
121</ul></li>
122<li><p>Edit <code>data/config.json.php</code> to have Shaarli use this template, in <code>&quot;resource&quot;</code> e.g.</p>
123<div class="sourceCode"><pre class="sourceCode json"><code class="sourceCode json"><span class="er">&quot;raintpl_tpl&quot;:</span> <span class="er">&quot;tpl\/my-template\/&quot;,</span></code></pre></div></li>
124</ul>
125<h2 id="community-themes-templates">Community themes &amp; templates</h2>
126<ul>
127<li><a href="https://github.com/AkibaTech/Shaarli---SuperHero-Theme">AkibaTech/Shaarli Superhero Theme</a> - A template/theme for Shaarli<a href=".html"></a></li>
128<li><a href="https://github.com/alexisju/albinomouse-template">alexisju/albinomouse-template</a> - A full template for Shaarli<a href=".html"></a></li>
129<li><a href="https://github.com/ArthurHoaro/shaarli-launch">ArthurHoaro/shaarli-launch</a> - Customizable Shaarli theme.<a href=".html"></a></li>
130<li><a href="https://github.com/dhoko/ShaarliTemplate">dhoko/ShaarliTemplate</a> - A template/theme for Shaarli<a href=".html"></a></li>
131<li><a href="https://github.com/kalvn/shaarli-blocks">kalvn/shaarli-blocks</a> - A template/theme for Shaarli<a href=".html"></a></li>
132<li><a href="https://github.com/kalvn/Shaarli-Material">kalvn/Shaarli-Material</a> - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone.<a href=".html"></a></li>
133<li><a href="https://github.com/ManufacturaInd/shaarli-2004licious-theme">ManufacturaInd/shaarli-2004licious-theme</a> - A template/theme as a humble homage to the early looks of the del.icio.us site.<a href=".html"></a></li>
134<li><a href="https://github.com/misterair/limonade">misterair/Limonade</a> - A fork of (legacy) Shaarli with a new template<a href=".html"></a></li>
135<li><a href="https://github.com/mrjovanovic/serious-theme-shaarli">mrjovanovic/serious-theme-shaarli</a> - A serious theme for SHaarli.<a href=".html"></a></li>
136<li><a href="https://github.com/vivienhaese/shaarlitheme">vivienhaese/shaarlitheme</a> - A Shaarli fork meant to be run in an openshift instance<a href=".html"></a></li>
137</ul>
138<h3 id="example-installation-albinomouse-template">Example installation: AlbinoMouse template</h3>
139<p>With the following configuration:</p>
140<ul>
141<li>Apache 2 / PHP 5.6</li>
142<li>user sites are enabled, e.g. <code>/home/user/public_html/somedir</code> is served as <code>http://localhost/~user/somedir</code></li>
143<li><code>http</code> is the name of the Apache user</li>
144</ul>
145<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> ~/public_html
146
147<span class="co"># clone repositories</span>
148$ <span class="fu">git</span> clone https://github.com/shaarli/Shaarli.git shaarli
149$ <span class="bu">pushd</span> shaarli/tpl
150$ <span class="fu">git</span> clone https://github.com/alexisju/albinomouse-template.git
151$ <span class="bu">popd</span>
152
153<span class="co"># set access rights for Apache</span>
154$ <span class="fu">chgrp</span> -R http shaarli
155$ <span class="fu">chmod</span> g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp</code></pre></div>
156<p>Get config written:</p>
157<ul>
158<li>go to the freshly installed site</li>
159<li>fill the install form</li>
160<li>log in to Shaarli</li>
161</ul>
162<p>Edit Shaarli's <a href="configuration%7CShaarli-configuration.html">configuration|Shaarli configuration</a>:</p>
163<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># the file should be owned by Apache, thus not writeable =&gt; sudo</span>
164$ <span class="fu">sudo</span> sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php</code></pre></div>
165</body>
166</html>
diff --git a/doc/Theming.md b/doc/Theming.md
deleted file mode 100644
index a21899c2..00000000
--- a/doc/Theming.md
+++ /dev/null
@@ -1,65 +0,0 @@
1#Theming
2## User CSS
3
4- Shaarli's apparence can be modified by editing CSS rules in `inc/user.css`. This file allows to override rules defined in the main `inc/shaarli.css` (only add changed rules), or define a whole new theme.
5- Do not edit `inc/shaarli.css`! Your changes would be overriden when updating Shaarli.
6- Some themes are available at https://github.com/shaarli/shaarli-themes.
7
8See also:
9- [Download CSS styles from an OPML list](Download-CSS-styles-from-an-OPML-list.html)
10
11## RainTPL template
12
13_WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental._
14
15- Find the template you'd like to install (see the list of [available templates|Theming#community-themes--templates](available-templates|Theming#community-themes--templates.html))
16- Find it's git clone URL or download the zip archive for the template.
17- In your Shaarli `tpl/` directory, run `git clone https://url/of/my-template/` or unpack the zip archive.
18 - There should now be a `my-template/` directory under the `tpl/` dir, containing directly all the template files.
19- Edit `data/config.json.php` to have Shaarli use this template, in `"resource"` e.g.
20```json
21"raintpl_tpl": "tpl\/my-template\/",
22```
23
24## Community themes & templates
25- [AkibaTech/Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli[](.html)
26- [alexisju/albinomouse-template](https://github.com/alexisju/albinomouse-template) - A full template for Shaarli[](.html)
27- [ArthurHoaro/shaarli-launch](https://github.com/ArthurHoaro/shaarli-launch) - Customizable Shaarli theme.[](.html)
28- [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli[](.html)
29- [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli[](.html)
30- [kalvn/Shaarli-Material](https://github.com/kalvn/Shaarli-Material) - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone.[](.html)
31- [ManufacturaInd/shaarli-2004licious-theme](https://github.com/ManufacturaInd/shaarli-2004licious-theme) - A template/theme as a humble homage to the early looks of the del.icio.us site.[](.html)
32- [misterair/Limonade](https://github.com/misterair/limonade) - A fork of (legacy) Shaarli with a new template[](.html)
33- [mrjovanovic/serious-theme-shaarli](https://github.com/mrjovanovic/serious-theme-shaarli) - A serious theme for SHaarli.[](.html)
34- [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance[](.html)
35
36### Example installation: AlbinoMouse template
37With the following configuration:
38- Apache 2 / PHP 5.6
39- user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir`
40- `http` is the name of the Apache user
41
42```bash
43$ cd ~/public_html
44
45# clone repositories
46$ git clone https://github.com/shaarli/Shaarli.git shaarli
47$ pushd shaarli/tpl
48$ git clone https://github.com/alexisju/albinomouse-template.git
49$ popd
50
51# set access rights for Apache
52$ chgrp -R http shaarli
53$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp
54```
55
56Get config written:
57- go to the freshly installed site
58- fill the install form
59- log in to Shaarli
60
61Edit Shaarli's [configuration|Shaarli configuration](configuration|Shaarli-configuration.html):
62```bash
63# the file should be owned by Apache, thus not writeable => sudo
64$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
65```
diff --git a/doc/Troubleshooting.html b/doc/Troubleshooting.html
deleted file mode 100644
index ed1c6f09..00000000
--- a/doc/Troubleshooting.html
+++ /dev/null
@@ -1,200 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Troubleshooting</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="troubleshooting">Troubleshooting</h1>
103<h2 id="browser">Browser</h2>
104<h3 id="redirection-issues-http-referer">Redirection issues (HTTP Referer)</h3>
105<p>Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages.</p>
106<p>See:</p>
107<ul>
108<li><a href="https://en.wikipedia.org/wiki/HTTP_referer">HTTP referer</a> (Wikipedia)<a href=".html"></a></li>
109<li><a href="http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/">Improve online privacy by controlling referrer information</a><a href=".html"></a></li>
110<li><a href="http://b.agilob.net/better-security-privacy-and-anonymity-in-firefox/">Better security, privacy and anonymity in Firefox</a><a href=".html"></a></li>
111</ul>
112<h3 id="firefox-http-referer-options">Firefox HTTP Referer options</h3>
113<p>HTTP settings are available by browsing <code>about:config</code>, here are the available settings and their values.</p>
114<p><code>network.http.sendRefererHeader</code> - determines when to send the Referer HTTP header</p>
115<ul>
116<li>0: Never send the referring URL
117<ul>
118<li>not recommended, may break some sites</li>
119</ul></li>
120<li>1: Send only on clicked links</li>
121<li>2 (default): Send for links and images</li>
122</ul>
123<p><code>network.http.referer.XOriginPolicy</code> - Cross-domain origin policy</p>
124<ul>
125<li>0 (default): Always send</li>
126<li>1: Send if base domains match</li>
127<li>2: Send if hosts match</li>
128</ul>
129<p><code>network.http.referer.spoofSource</code> - Referer spoofing (~faking)</p>
130<ul>
131<li>false (default): real referer</li>
132<li>true: spoof referer (use target URI as referer)</li>
133<li>known to break some functionality in Shaarli</li>
134</ul>
135<p><code>network.http.referer.trimmingPolicy</code> - trim the URI not to send a full Referer</p>
136<ul>
137<li>0 (default): send full URI</li>
138<li>1: scheme+host+port+path</li>
139<li>2: scheme+host+port</li>
140</ul>
141<h3 id="firefox-localhost-and-redirections">Firefox, localhost and redirections</h3>
142<p><code>localhost</code> is not a proper Fully Qualified Domain Name (FQDN); if Firefox has been set up to spoof referers, or only accept requests from the same base domain/host, Shaarli redirections will not work properly.</p>
143<p>To solve this, assign a local domain to your host, e.g.</p>
144<pre><code>127.0.0.1 localhost desktop localhost.lan
145::1 localhost desktop localhost.lan</code></pre>
146<p>and browse Shaarli at <a href="http://localhost.lan/" class="uri">http://localhost.lan/</a>.</p>
147<p>Related threads:</p>
148<ul>
149<li><a href="https://bbs.archlinux.org/viewtopic.php?id=156064">What is localhost.localdomain for?</a><a href=".html"></a></li>
150<li><a href="https://github.com/shaarli/Shaarli/issues/311">Stop returning to the first page after editing a bookmark from another page</a><a href=".html"></a></li>
151</ul>
152<h2 id="login">Login</h2>
153<h3 id="i-forgot-my-password">I forgot my password!</h3>
154<p>Delete the file <code>data/config.php</code> and display the page again. You will be asked for a new login/password.</p>
155<h3 id="im-locked-out---login-bruteforce-protection">I'm locked out - Login bruteforce protection</h3>
156<p>Login form is protected against brute force attacks: 4 failed logins will ban the IP address from login for 30 minutes. Banned IPs can still browse links.</p>
157<p>To remove the current IP bans, delete the file <code>data/ipbans.php</code></p>
158<h3 id="list-of-all-login-attempts">List of all login attempts</h3>
159<p>The file <code>data/log.txt</code> shows all logins (successful or failed) and bans/lifted bans.<br />
160Search for <code>failed</code> in this file to look for unauthorized login attempts.</p>
161<h2 id="hosting-problems">Hosting problems</h2>
162<h3 id="old-php-versions">Old PHP versions</h3>
163<ul>
164<li>On <strong>free.fr</strong> : free.fr now support php 5.6.x(<a href="http://les.pages.perso.chez.free.fr/migrations/php5v6.io">link</a>)and so support now the tag autocompletion but you have to do the following : At the root of your webspace create a <code>sessions</code> directory and a <code>.htaccess</code> file containing:<a href=".html"></a></li>
165</ul>
166<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="dt">&lt;IfDefine Free&gt;</span>
167<span class="dt">php56 1</span>
168<span class="dt">&lt;/IfDefine&gt;</span></code></pre></div>
169<ul>
170<li>If you have an error such as: <code>Parse error: syntax error, unexpected '=', expecting '(' in /links/index.php on line xxx</code>, it means that your host is using php4, not php5. Shaarli requires php 5.1. Try changing the file extension to <code>.php5</code></li>
171<li>On <strong>1and1</strong> : If you add the link from the page (and not from the bookmarklet), Shaarli will no be able to get the title of the page. You will have to enter it manually. (Because they have disabled the ability to download a file through HTTP).</li>
172<li>If you have the error <code>Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /…/index.php on line xxx</code>, it means that your host has disabled the ability to fetch a file by HTTP in the php config (Typically in 1and1 hosting). Bad host. Change host. Or comment the following lines:<a href=".html"></a></li>
173</ul>
174<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="co">//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.</span>
175<span class="co">// FIXME: Decode charset according to charset specified in either 1) HTTP response headers or 2) &lt;head&gt; in html </span>
176<span class="co">//if (strpos($status,&#39;200 OK&#39;)) $title=html_extract_title($data);</span></code></pre></div>
177<ul>
178<li>On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.</li>
179<li>On <strong>lost-oasis</strong>, RSS doesn't work correctly, because of this message at the begining of the RSS/ATOM feed : <code>&lt;? // tout ce qui est charge ici (generalement des includes et require) est charge en permanence. ?&gt;</code>. To fix this, remove this message from <code>php-include/prepend.php</code></li>
180</ul>
181<h3 id="dates-are-not-properly-formatted">Dates are not properly formatted</h3>
182<p>Shaarli tries to sniff the language of the browser (using HTTP_ACCEPT_LANGUAGE headers) and choose a date format accordingly. But Shaarli can only use the date formats (and more generaly speaking, the locales) provided by the webserver. So even if you have a browser in French, you may end up with dates in US format (it's the case on sebsauvage.net :-( )</p>
183<h3 id="problems-on-centos-servers">Problems on CentOS servers</h3>
184<p>On <strong>CentOS</strong>/RedHat derivatives, you may need to install the <code>php-mbstring</code> package.</p>
185<h3 id="my-session-expires-i-cant-stay-logged-in">My session expires! I can't stay logged in</h3>
186<p>This can be caused by several things:</p>
187<ul>
188<li>Your php installation may not have a proper directory setup for session files. (eg. on Free.fr you need to create a <code>session</code> directory on the root of your website.) You may need to create the session directory of set it up.</li>
189<li>Most hosts regularly clean the temporary and session directories. Your host may be cleaning those directories too aggressively (eg.OVH hosts), forcing an expire of the session. You may want to set the session directory in your web root. (eg. Create the <code>sessions</code> subdirectory and add <code>ini_set('session.save_path', $_SERVER['DOCUMENT_ROOT'].'/../sessions');</code>. Make sure this directory is not browsable !)<a href=".html"></a></li>
190<li>If your IP address changes during surfing, Shaarli will force expire your session for security reasons (to prevent session cookie hijacking). This can happen when surfing from WiFi or 3G (you may have switched WiFi/3G access point), or in some corporate/university proxies which use load balancing (and may have proxies with several external IP addresses).</li>
191<li>Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.</li>
192<li>You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.</li>
193<li>If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.</li>
194</ul>
195<h2 id="sessions-do-not-seem-to-work-correctly-on-your-server">Sessions do not seem to work correctly on your server</h2>
196<p>Follow the instructions in the error message. Make sure you are accessing shaarli via a direct IP address or a proper hostname. If you have <strong>no dots</strong> in the hostname (e.g. <code>localhost</code> or <code>http://my-webserver/shaarli/</code>), some browsers will not store cookies at all (this respects the <a href="http://curl.haxx.se/rfc/cookie_spec.html">HTTP cookie specification</a>).<a href=".html"></a></p>
197<h3 id="pubsubhubbub-support">pubsubhubbub support</h3>
198<p>Download <a href="https://pubsubhubbub.googlecode.com/git/publisher_clients/php/library/publisher.php">publisher.php</a> at the root of your Shaarli installation and set <code>$GLOBALS['config'['PUBSUBHUB_URL']</code> in your <code>config.php</code>]('PUBSUBHUB_URL']<code>-in-your-</code>config.php`.html)</p>
199</body>
200</html>
diff --git a/doc/Unit-tests.html b/doc/Unit-tests.html
deleted file mode 100644
index 266fd33a..00000000
--- a/doc/Unit-tests.html
+++ /dev/null
@@ -1,212 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Unit tests</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="unit-tests">Unit tests</h1>
103<h3 id="setup-your-environment-for-tests">Setup your environment for tests</h3>
104<p>The framework used is <a href="https://phpunit.de/">PHPUnit</a>; it can be installed with <a href="https://getcomposer.org/">Composer</a>, which is a dependency management tool.<a href=".html"></a></p>
105<p>Regarding Composer, you can either use:</p>
106<ul>
107<li>a system-wide version, e.g. installed through your distro's package manager</li>
108<li>a local version, downloadable <a href="https://getcomposer.org/download/">here</a><a href=".html"></a></li>
109</ul>
110<h4 id="sample-usage">Sample usage</h4>
111<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># system-wide version</span>
112$ <span class="ex">composer</span> install
113$ <span class="ex">composer</span> update
114
115<span class="co"># local version</span>
116$ <span class="ex">php</span> composer.phar self-update
117$ <span class="ex">php</span> composer.phar install
118$ <span class="ex">php</span> composer.phar update</code></pre></div>
119<h4 id="install-shaarli-dev-dependencies">Install Shaarli dev dependencies</h4>
120<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
121$ <span class="ex">composer</span> update</code></pre></div>
122<h4 id="install-and-enable-xdebug-to-generate-phpunit-coverage-reports">Install and enable Xdebug to generate PHPUnit coverage reports</h4>
123<p>For Debian-based distros:</p>
124<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">aptitude</span> install php5-xdebug</code></pre></div>
125<p>For ArchLinux:</p>
126<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">pacman</span> -S xdebug</code></pre></div>
127<p>Then add the following line to <code>/etc/php/php.ini</code>:</p>
128<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="dt">zend_extension</span><span class="ot">=</span><span class="st">xdebug.so</span></code></pre></div>
129<h4 id="run-unit-tests">Run unit tests</h4>
130<p>Successful test suite:</p>
131<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">make</span> test
132
133<span class="ex">-------</span>
134<span class="ex">PHPUNIT</span>
135<span class="ex">-------</span>
136<span class="ex">PHPUnit</span> 4.6.9 by Sebastian Bergmann and contributors.
137
138<span class="ex">Configuration</span> read from /home/virtualtam/public_html/shaarli/phpunit.xml
139
140<span class="ex">....................................</span>
141
142<span class="ex">Time</span>: 759 ms, Memory: 8.25Mb
143
144<span class="ex">OK</span> (36 tests, 65 assertions)</code></pre></div>
145<p>Test suite with failures and errors:</p>
146<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">make</span> test
147<span class="ex">-------</span>
148<span class="ex">PHPUNIT</span>
149<span class="ex">-------</span>
150<span class="ex">PHPUnit</span> 4.6.9 by Sebastian Bergmann and contributors.
151
152<span class="ex">Configuration</span> read from /home/virtualtam/public_html/shaarli/phpunit.xml
153
154<span class="ex">E..FF...............................</span>
155
156<span class="ex">Time</span>: 802 ms, Memory: 8.25Mb
157
158<span class="ex">There</span> was 1 error:
159
160<span class="ex">1</span>) <span class="ex">LinkDBTest</span>::testConstructLoggedIn
161<span class="ex">Missing</span> argument 2 for LinkDB::__construct(), <span class="ex">called</span> in /home/virtualtam/public_html/shaarli/tests/Link\
162DBTest.php on line 79 and defined
163
164<span class="ex">/home/virtualtam/public_html/shaarli/application</span>/LinkDB.php:<span class="ex">58</span>
165<span class="ex">/home/virtualtam/public_html/shaarli/tests</span>/LinkDBTest.php:<span class="ex">79</span>
166
167<span class="ex">--</span>
168
169<span class="ex">There</span> were 2 failures:
170
171<span class="ex">1</span>) <span class="ex">LinkDBTest</span>::testCheckDBNew
172<span class="ex">Failed</span> asserting that two strings are equal.
173<span class="ex">---</span> Expected
174<span class="ex">+++</span> Actual
175<span class="ex">@@</span> @@
176<span class="ex">-</span><span class="st">&#39;e3edea8ea7bb50be4bcb404df53fbb4546a7156e&#39;</span>
177<span class="ex">+</span><span class="st">&#39;85eab0c610d4f68025f6ed6e6b6b5fabd4b55834&#39;</span>
178
179<span class="ex">/home/virtualtam/public_html/shaarli/tests</span>/LinkDBTest.php:<span class="ex">121</span>
180
181<span class="ex">2</span>) <span class="ex">LinkDBTest</span>::testCheckDBLoad
182<span class="ex">Failed</span> asserting that two strings are equal.
183<span class="ex">---</span> Expected
184<span class="ex">+++</span> Actual
185<span class="ex">@@</span> @@
186<span class="ex">-</span><span class="st">&#39;e3edea8ea7bb50be4bcb404df53fbb4546a7156e&#39;</span>
187<span class="ex">+</span><span class="st">&#39;85eab0c610d4f68025f6ed6e6b6b5fabd4b55834&#39;</span>
188
189<span class="ex">/home/virtualtam/public_html/shaarli/tests</span>/LinkDBTest.php:<span class="ex">133</span>
190
191<span class="ex">FAILURES</span>!
192<span class="ex">Tests</span>: 36, Assertions: 63, Errors: 1, Failures: 2.</code></pre></div>
193<h4 id="test-results-and-coverage">Test results and coverage</h4>
194<p>By default, PHPUnit will run all suitable tests found under the <code>tests</code> directory.</p>
195<p>Each test has 3 possible outcomes:</p>
196<ul>
197<li><code>.</code> - success</li>
198<li><code>F</code> - failure: the test was run but its results are invalid</li>
199<li>the code does not behave as expected</li>
200<li>dependencies to external elements: globals, session, cache...</li>
201<li><code>E</code> - error: something went wrong and the tested code has crashed</li>
202<li>typos in the code, or in the test code</li>
203<li>dependencies to missing external elements</li>
204</ul>
205<p>If Xdebug has been installed and activated, two coverage reports will be generated:</p>
206<ul>
207<li>a summary in the console</li>
208<li>a detailed HTML report with metrics for tested code</li>
209<li>to open it in a web browser: <code>firefox coverage/index.html &amp;</code></li>
210</ul>
211</body>
212</html>
diff --git a/doc/Upgrade-and-migration.html b/doc/Upgrade-and-migration.html
deleted file mode 100644
index a5b041d5..00000000
--- a/doc/Upgrade-and-migration.html
+++ /dev/null
@@ -1,242 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Upgrade and migration</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="upgrade-and-migration">Upgrade and migration</h1>
103<h2 id="preparation">Preparation</h2>
104<h3 id="backup-your-data">Backup your data</h3>
105<p>Shaarli stores all user data under the <code>data</code> directory:</p>
106<ul>
107<li><code>data/config.php</code> - main configuration file</li>
108<li><code>data/datastore.php</code> - bookmarked links</li>
109<li><code>data/ipbans.php</code> - banned IP addresses</li>
110</ul>
111<p>See <a href="Shaarli-configuration.html">Shaarli configuration</a> for more information about Shaarli resources.</p>
112<p>It is recommended to backup this repository <em>before</em> starting updating/upgrading Shaarli:</p>
113<ul>
114<li>users with SSH access: copy or archive the directory to a temporary location</li>
115<li>users with FTP access: download a local copy of your Shaarli installation using your favourite client</li>
116</ul>
117<h3 id="migrating-data-from-a-previous-installation">Migrating data from a previous installation</h3>
118<p>As all user data is kept under <code>data</code>, this is the only directory you need to worry about when migrating to a new installation, which corresponds to the following steps:</p>
119<ul>
120<li>backup the <code>data</code> directory</li>
121<li>install or update Shaarli:
122<ul>
123<li>fresh installation - see <a href="Download-and-installation.html">Download and installation</a></li>
124<li>update - see the following sections</li>
125</ul></li>
126<li>check or restore the <code>data</code> directory</li>
127</ul>
128<h2 id="upgrading-from-release-archives">Upgrading from release archives</h2>
129<p>All tagged revisions can be downloaded as tarballs or ZIP archives from the <a href="https://github.com/shaarli/Shaarli/releases">releases</a> page.<a href=".html"></a></p>
130<p>We <em>recommend</em> using the releases from the <code>stable</code> branch, which are available as:</p>
131<ul>
132<li>gzipped tarball - <a href="https://github.com/shaarli/Shaarli/archive/stable.tar.gz" class="uri">https://github.com/shaarli/Shaarli/archive/stable.tar.gz</a></li>
133<li>ZIP archive - <a href="https://github.com/shaarli/Shaarli/archive/stable.zip" class="uri">https://github.com/shaarli/Shaarli/archive/stable.zip</a></li>
134</ul>
135<p>Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the contents of the <code>data</code> directory!</p>
136<p>After upgrading, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to <code>data/config.php</code> (see <a href="Shaarli-configuration.html">Shaarli configuration</a> for more details).</p>
137<h2 id="upgrading-with-git">Upgrading with Git</h2>
138<h3 id="updating-a-community-shaarli">Updating a community Shaarli</h3>
139<p>If you have installed Shaarli from the <a href="Download#clone-with-git-recommended">community Git repository</a>, simply <a href="https://www.git-scm.com/docs/git-pull">pull new changes</a> from your local clone:<a href=".html"></a></p>
140<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
141$ <span class="fu">git</span> pull
142
143<span class="ex">From</span> github.com:shaarli/Shaarli
144 <span class="ex">*</span> branch master -<span class="op">&gt;</span> FETCH_HEAD
145<span class="ex">Updating</span> ebd67c6..521f0e6
146<span class="ex">Fast-forward</span>
147 <span class="ex">application/Url.php</span> <span class="kw">|</span> <span class="ex">1</span> +
148 <span class="ex">shaarli_version.php</span> <span class="kw">|</span> <span class="ex">2</span> +-
149 <span class="ex">tests/Url/UrlTest.php</span> <span class="kw">|</span> <span class="ex">1</span> +
150 <span class="ex">3</span> files changed, 3 insertions(+), <span class="ex">1</span> deletion(-)</code></pre></div>
151<p>Shaarli &gt;= <code>v0.8.x</code>: install/update third-party PHP dependencies using <a href="https://getcomposer.org/">Composer</a>:<a href=".html"></a></p>
152<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">composer</span> update --no-dev
153
154<span class="ex">Loading</span> composer repositories with package information
155<span class="ex">Updating</span> dependencies
156 <span class="ex">-</span> Installing shaarli/netscape-bookmark-parser (v1.0.1)
157 <span class="ex">Downloading</span>: 100%</code></pre></div>
158<h3 id="migrating-and-upgrading-from-sebsauvages-repository">Migrating and upgrading from Sebsauvage's repository</h3>
159<p>If you have installed Shaarli from <a href="https://github.com/sebsauvage/Shaarli">Sebsauvage's original Git repository</a>, you can use <a href="https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes">Git remotes</a> to update your working copy.<a href=".html"></a></p>
160<p>The following guide assumes that:</p>
161<ul>
162<li>you have a basic knowledge of Git <a href="https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell">branching</a> and <a href="https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes">remote repositories</a><a href=".html"></a></li>
163<li>the default remote is named <code>origin</code> and points to Sebsauvage's repository</li>
164<li>the current branch is <code>master</code>
165<ul>
166<li>if you have personal branches containing customizations, you will need to <a href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing">rebase them</a> after the upgrade; beware though, a lot of changes have been made since the community fork has been created, so things are very likely to break<embed src=".html" /></li>
167</ul></li>
168<li>the working copy is clean:
169<ul>
170<li>no versioned file has been locally modified</li>
171<li>no untracked files are present</li>
172</ul></li>
173</ul>
174<h4 id="step-0-show-repository-information">Step 0: show repository information</h4>
175<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
176
177$ <span class="fu">git</span> remote -v
178<span class="ex">origin</span> https://github.com/sebsauvage/Shaarli (fetch)
179<span class="ex">origin</span> https://github.com/sebsauvage/Shaarli (push)
180
181$ <span class="fu">git</span> branch -vv
182<span class="ex">*</span> master 029f75f [origin/master] Update README.md[](.html)
183
184$ <span class="fu">git</span> status
185<span class="ex">On</span> branch master
186<span class="ex">Your</span> branch is up-to-date with <span class="st">&#39;origin/master&#39;</span>.
187<span class="ex">nothing</span> to commit, working directory clean</code></pre></div>
188<h4 id="step-1-update-git-remotes">Step 1: update Git remotes</h4>
189<pre><code>$ git remote rename origin sebsauvage
190$ git remote -v
191sebsauvage https://github.com/sebsauvage/Shaarli (fetch)
192sebsauvage https://github.com/sebsauvage/Shaarli (push)
193
194$ git remote add origin https://github.com/shaarli/Shaarli
195$ git fetch origin
196
197remote: Counting objects: 3015, done.
198remote: Compressing objects: 100% (19/19), done.
199remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550
200Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done.
201Resolving deltas: 100% (1899/1899), completed with 48 local objects.
202From https://github.com/shaarli/Shaarli
203 * [new branch] master -&gt; origin/master[](.html)
204 * [new branch] stable -&gt; origin/stable[](.html)
205[...][](.html)
206 * [new tag] v0.6.4 -&gt; v0.6.4[](.html)
207 * [new tag] v0.7.0 -&gt; v0.7.0[](.html)</code></pre>
208<h4 id="step-2-use-the-stable-community-branch">Step 2: use the stable community branch</h4>
209<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">git</span> checkout origin/stable -b stable
210<span class="ex">Branch</span> stable set up to track remote branch stable from origin.
211<span class="ex">Switched</span> to a new branch <span class="st">&#39;stable&#39;</span>
212
213$ <span class="fu">git</span> branch -vv
214 <span class="ex">master</span> 029f75f [sebsauvage/master] Update README.md[](.html)
215<span class="ex">*</span> stable 890afc3 [origin/stable] Merge pull request <span class="co">#509 from ArthurHoaro/v0.6.5[](.html)</span></code></pre></div>
216<p>Shaarli &gt;= <code>v0.8.x</code>: install/update third-party PHP dependencies using <a href="https://getcomposer.org/">Composer</a>:<a href=".html"></a></p>
217<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">composer</span> update --no-dev
218
219<span class="ex">Loading</span> composer repositories with package information
220<span class="ex">Updating</span> dependencies
221 <span class="ex">-</span> Installing shaarli/netscape-bookmark-parser (v1.0.1)
222 <span class="ex">Downloading</span>: 100%</code></pre></div>
223<p>Optionally, you can delete information related to the legacy version:</p>
224<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">git</span> branch -D master
225<span class="ex">Deleted</span> branch master (was 029f75f)<span class="ex">.</span>
226
227$ <span class="fu">git</span> remote remove sebsauvage
228
229$ <span class="fu">git</span> remote -v
230<span class="ex">origin</span> https://github.com/shaarli/Shaarli (fetch)
231<span class="ex">origin</span> https://github.com/shaarli/Shaarli (push)
232
233$ <span class="fu">git</span> gc
234<span class="ex">Counting</span> objects: 3317, done.
235<span class="ex">Delta</span> compression using up to 8 threads.
236<span class="ex">Compressing</span> objects: 100% (1237/1237), <span class="kw">done</span><span class="ex">.</span>
237<span class="ex">Writing</span> objects: 100% (3317/3317), <span class="kw">done</span><span class="ex">.</span>
238<span class="ex">Total</span> 3317 (delta 2050), <span class="ex">reused</span> 3301 (delta 2034)<span class="ex">to</span></code></pre></div>
239<h4 id="step-3-configuration">Step 3: configuration</h4>
240<p>After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to <code>data/config.php</code> (see <a href="Shaarli-configuration.html">Shaarli configuration</a> for more details).</p>
241</body>
242</html>
diff --git a/doc/Usage.html b/doc/Usage.html
deleted file mode 100644
index 63f21d93..00000000
--- a/doc/Usage.html
+++ /dev/null
@@ -1,93 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Usage</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="usage">Usage</h1>
66<h3 id="main-features">Main features</h3>
67<p>Shaarli is intended:</p>
68<ul>
69<li>to share, comment and save interesting links and news</li>
70<li>to bookmark useful/frequent personal links (as private links) and share them between computers</li>
71<li>as a minimal blog/microblog/writing platform (no character limit)</li>
72<li>as a read-it-later list (for example items tagged <code>readlater</code>)</li>
73<li>to draft and save articles/ideas</li>
74<li>to keep code snippets</li>
75<li>to keep notes and documentation</li>
76<li>as a shared clipboard between machines</li>
77<li>as a todo list</li>
78<li>to store playlists (e.g. with the <code>music</code> or <code>video</code> tags)</li>
79<li>to keep extracts/comments from webpages that may disappear</li>
80<li>to keep track of ongoing discussions (for example items tagged <code>discussion</code>)</li>
81<li><a href="http://shaarli.chassegnouf.net/?9Efeiw">to feed RSS aggregators</a> (planets) with specific tags<a href=".html"></a></li>
82<li>to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)</li>
83</ul>
84<h3 id="using-shaarli-as-a-blog-notepad-pastebin...">Using Shaarli as a blog, notepad, pastebin...</h3>
85<ul>
86<li>Go to your Shaarli setup and log in</li>
87<li>Click the <code>Add Link</code> button</li>
88<li>To share text only, do not enter any URL in the corresponding input field and click <code>Add Link</code></li>
89<li>Pick a title and enter your article, or note, in the description field; add a few tags; optionally check <code>Private</code> then click <code>Save</code></li>
90<li>Voilà! Your article is now published (privately if you selected that option) and accessible using its permalink.</li>
91</ul>
92</body>
93</html>
diff --git a/doc/Usage.md b/doc/Usage.md
deleted file mode 100644
index 30ad1466..00000000
--- a/doc/Usage.md
+++ /dev/null
@@ -1,25 +0,0 @@
1#Usage
2### Main features
3Shaarli is intended:
4 * to share, comment and save interesting links and news
5 * to bookmark useful/frequent personal links (as private links) and share them between computers
6 * as a minimal blog/microblog/writing platform (no character limit)
7 * as a read-it-later list (for example items tagged `readlater`)
8 * to draft and save articles/ideas
9 * to keep code snippets
10 * to keep notes and documentation
11 * as a shared clipboard between machines
12 * as a todo list
13 * to store playlists (e.g. with the `music` or `video` tags)
14 * to keep extracts/comments from webpages that may disappear
15 * to keep track of ongoing discussions (for example items tagged `discussion`)
16 * [to feed RSS aggregators](http://shaarli.chassegnouf.net/?9Efeiw) (planets) with specific tags[](.html)
17 * to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)
18
19### Using Shaarli as a blog, notepad, pastebin...
20
21 * Go to your Shaarli setup and log in
22 * Click the `Add Link` button
23 * To share text only, do not enter any URL in the corresponding input field and click `Add Link`
24 * Pick a title and enter your article, or note, in the description field; add a few tags; optionally check `Private` then click `Save`
25 * Voilà! Your article is now published (privately if you selected that option) and accessible using its permalink.
diff --git a/doc/_Footer.html b/doc/_Footer.html
deleted file mode 100644
index e8a62d2a..00000000
--- a/doc/_Footer.html
+++ /dev/null
@@ -1,68 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – _Footer</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="footer-shaarli-the-personal-minimalist-super-fast-database-free-bookmarking-service">_Footer<br />
66<em>Shaarli, the personal, minimalist, super-fast, database-free bookmarking service</em></h1>
67</body>
68</html>
diff --git a/doc/_Footer.md b/doc/_Footer.md
deleted file mode 100644
index 50fa4f56..00000000
--- a/doc/_Footer.md
+++ /dev/null
@@ -1,2 +0,0 @@
1#_Footer
2_Shaarli, the personal, minimalist, super-fast, database-free bookmarking service_
diff --git a/doc/_Sidebar.html b/doc/_Sidebar.html
deleted file mode 100644
index bb6dad93..00000000
--- a/doc/_Sidebar.html
+++ /dev/null
@@ -1,115 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – _Sidebar</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="sidebar">_Sidebar</h1>
66<ul>
67<li><a href="Home.html">Home</a></li>
68<li>Setup
69<ul>
70<li><a href="Download-and-Installation.html">Download and Installation</a></li>
71<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
72<li><a href="Server-requirements.html">Server requirements</a></li>
73<li><a href="Server-configuration.html">Server configuration</a></li>
74<li><a href="Server-security.html">Server security</a></li>
75<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
76<li><a href="Plugins.html">Plugins</a></li>
77</ul></li>
78<li><a href="Docker.html">Docker</a></li>
79<li><a href="Usage.html">Usage</a>
80<ul>
81<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
82<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
83<li><a href="Firefox-share.html">Firefox share</a></li>
84<li><a href="RSS-feeds.html">RSS feeds</a></li>
85</ul></li>
86<li>How To
87<ul>
88<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
89<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
90<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
91<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
92<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
93</ul></li>
94<li><a href="Troubleshooting.html">Troubleshooting</a></li>
95<li><a href="Development.html">Development</a>
96<ul>
97<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
98<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
99<li><a href="Directory-structure.html">Directory structure</a></li>
100<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
101<li><a href="Plugin-System.html">Plugin System</a></li>
102<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
103<li><a href="Security.html">Security</a></li>
104<li><a href="Static-analysis.html">Static analysis</a></li>
105<li><a href="Theming.html">Theming</a></li>
106<li><a href="Unit-tests.html">Unit tests</a></li>
107</ul></li>
108<li>About
109<ul>
110<li><a href="FAQ.html">FAQ</a></li>
111<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
112</ul></li>
113</ul>
114</body>
115</html>
diff --git a/doc/_Sidebar.md b/doc/_Sidebar.md
deleted file mode 100644
index 1778e3a3..00000000
--- a/doc/_Sidebar.md
+++ /dev/null
@@ -1,37 +0,0 @@
1#_Sidebar
2- [Home](Home.html)
3- Setup
4 - [Download and Installation](Download-and-Installation.html)
5 - [Upgrade and migration](Upgrade-and-migration.html)
6 - [Server requirements](Server-requirements.html)
7 - [Server configuration](Server-configuration.html)
8 - [Server security](Server-security.html)
9 - [Shaarli configuration](Shaarli-configuration.html)
10 - [Plugins](Plugins.html)
11- [Docker](Docker.html)
12- [Usage](Usage.html)
13 - [Sharing button](Sharing-button.html) (bookmarklet)
14 - [Browsing and Searching](Browsing-and-Searching.html)
15 - [Firefox share](Firefox-share.html)
16 - [RSS feeds](RSS-feeds.html)
17- How To
18 - [Backup, restore, import and export](Backup,-restore,-import-and-export.html)
19 - [Copy an existing installation over SSH and serve it locally](Copy-an-existing-installation-over-SSH-and-serve-it-locally.html)
20 - [Create and serve multiple Shaarlis (farm)](Create-and-serve-multiple-Shaarlis-(farm).html)
21 - [Download CSS styles from an OPML list](Download-CSS-styles-from-an-OPML-list.html)
22 - [Datastore hacks](Datastore-hacks.html)
23- [Troubleshooting](Troubleshooting.html)
24- [Development](Development.html)
25 - [GnuPG signature](GnuPG-signature.html)
26 - [Coding guidelines](Coding-guidelines.html)
27 - [Directory structure](Directory-structure.html)
28 - [3rd party libraries](3rd-party-libraries.html)
29 - [Plugin System](Plugin-System.html)
30 - [Release Shaarli](Release-Shaarli.html)
31 - [Security](Security.html)
32 - [Static analysis](Static-analysis.html)
33 - [Theming](Theming.html)
34 - [Unit tests](Unit-tests.html)
35- About
36 - [FAQ](FAQ.html)
37 - [Community & Related software](Community-&-Related-software.html)
diff --git a/doc/config.json b/doc/config.json
deleted file mode 100644
index cc4de307..00000000
--- a/doc/config.json
+++ /dev/null
@@ -1,6 +0,0 @@
1{
2 "useSideMenu": true,
3 "lineBreaks": "gfm",
4 "additionalFooterText": "",
5 "title": "Shaarli documentation"
6} \ No newline at end of file
diff --git a/doc/github-markdown.css b/doc/github-markdown.css
deleted file mode 100644
index 581350ae..00000000
--- a/doc/github-markdown.css
+++ /dev/null
@@ -1,287 +0,0 @@
1#local-sidebar {
2 width: 230px;
3 float: right;
4 position: relative;
5 z-index: 4;
6 background-color: #fff;
7 border: 1px solid #e2e2e2;
8 border-radius: 3px;
9}
10
11body {
12 font-family: Helvetica, arial, sans-serif;
13 font-size: 14px;
14 line-height: 1.6;
15 padding-top: 10px;
16 padding-bottom: 10px;
17 background-color: white;
18 padding: 10px 20%; }
19
20body > *:first-child {
21 margin-top: 0 !important; }
22body > *:last-child {
23 margin-bottom: 0 !important; }
24
25a {
26 color: #4183C4; }
27a.absent {
28 color: #cc0000; }
29a.anchor {
30 display: block;
31 padding-left: 30px;
32 margin-left: -30px;
33 cursor: pointer;
34 position: absolute;
35 top: 0;
36 left: 0;
37 bottom: 0; }
38
39h1, h2, h3, h4, h5, h6 {
40 margin: 20px 0 10px;
41 padding: 0;
42 font-weight: bold;
43 -webkit-font-smoothing: antialiased;
44 cursor: text;
45 position: relative; }
46
47h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
48 background: url("../../images/modules/styleguide/para.png") no-repeat 10px center;
49 text-decoration: none; }
50
51h1 tt, h1 code {
52 font-size: inherit; }
53
54h2 tt, h2 code {
55 font-size: inherit; }
56
57h3 tt, h3 code {
58 font-size: inherit; }
59
60h4 tt, h4 code {
61 font-size: inherit; }
62
63h5 tt, h5 code {
64 font-size: inherit; }
65
66h6 tt, h6 code {
67 font-size: inherit; }
68
69h1 {
70 font-size: 28px;
71 color: black; }
72
73h2 {
74 font-size: 24px;
75 border-bottom: 1px solid #cccccc;
76 color: black; }
77
78h3 {
79 font-size: 18px; }
80
81h4 {
82 font-size: 16px; }
83
84h5 {
85 font-size: 14px; }
86
87h6 {
88 color: #777777;
89 font-size: 14px; }
90
91p, blockquote, ol, dl, table, pre {
92 margin: 15px 0; }
93
94hr {
95 background: transparent url("../../images/modules/pulls/dirty-shade.png") repeat-x 0 0;
96 border: 0 none;
97 color: #cccccc;
98 height: 4px;
99 padding: 0; }
100
101body > h2:first-child {
102 margin-top: 0;
103 padding-top: 0; }
104body > h1:first-child {
105 margin-top: 0;
106 padding-top: 0; }
107 body > h1:first-child + h2 {
108 margin-top: 0;
109 padding-top: 0; }
110body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
111 margin-top: 0;
112 padding-top: 0; }
113
114a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
115 margin-top: 0;
116 padding-top: 0; }
117
118h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
119 margin-top: 0; }
120
121li p.first {
122 display: inline-block; }
123
124ul, ol {
125 padding-left: 30px; }
126
127ul :first-child, ol :first-child {
128 margin-top: 0; }
129
130ul :last-child, ol :last-child {
131 margin-bottom: 0; }
132
133dl {
134 padding: 0; }
135 dl dt {
136 font-size: 14px;
137 font-weight: bold;
138 font-style: italic;
139 padding: 0;
140 margin: 15px 0 5px; }
141 dl dt:first-child {
142 padding: 0; }
143 dl dt > :first-child {
144 margin-top: 0; }
145 dl dt > :last-child {
146 margin-bottom: 0; }
147 dl dd {
148 margin: 0 0 15px;
149 padding: 0 15px; }
150 dl dd > :first-child {
151 margin-top: 0; }
152 dl dd > :last-child {
153 margin-bottom: 0; }
154
155blockquote {
156 border-left: 4px solid #dddddd;
157 padding: 0 15px;
158 color: #777777; }
159 blockquote > :first-child {
160 margin-top: 0; }
161 blockquote > :last-child {
162 margin-bottom: 0; }
163
164table {
165 padding: 0; }
166 table tr {
167 border-top: 1px solid #cccccc;
168 background-color: white;
169 margin: 0;
170 padding: 0; }
171 table tr:nth-child(2n) {
172 background-color: #f8f8f8; }
173 table tr th {
174 font-weight: bold;
175 border: 1px solid #cccccc;
176 text-align: left;
177 margin: 0;
178 padding: 6px 13px; }
179 table tr td {
180 border: 1px solid #cccccc;
181 text-align: left;
182 margin: 0;
183 padding: 6px 13px; }
184 table tr th :first-child, table tr td :first-child {
185 margin-top: 0; }
186 table tr th :last-child, table tr td :last-child {
187 margin-bottom: 0; }
188
189img {
190 max-width: 100%; }
191
192span.frame {
193 display: block;
194 overflow: hidden; }
195 span.frame > span {
196 border: 1px solid #dddddd;
197 display: block;
198 float: left;
199 overflow: hidden;
200 margin: 13px 0 0;
201 padding: 7px;
202 width: auto; }
203 span.frame span img {
204 display: block;
205 float: left; }
206 span.frame span span {
207 clear: both;
208 color: #333333;
209 display: block;
210 padding: 5px 0 0; }
211span.align-center {
212 display: block;
213 overflow: hidden;
214 clear: both; }
215 span.align-center > span {
216 display: block;
217 overflow: hidden;
218 margin: 13px auto 0;
219 text-align: center; }
220 span.align-center span img {
221 margin: 0 auto;
222 text-align: center; }
223span.align-right {
224 display: block;
225 overflow: hidden;
226 clear: both; }
227 span.align-right > span {
228 display: block;
229 overflow: hidden;
230 margin: 13px 0 0;
231 text-align: right; }
232 span.align-right span img {
233 margin: 0;
234 text-align: right; }
235span.float-left {
236 display: block;
237 margin-right: 13px;
238 overflow: hidden;
239 float: left; }
240 span.float-left span {
241 margin: 13px 0 0; }
242span.float-right {
243 display: block;
244 margin-left: 13px;
245 overflow: hidden;
246 float: right; }
247 span.float-right > span {
248 display: block;
249 overflow: hidden;
250 margin: 13px auto 0;
251 text-align: right; }
252
253code, tt {
254 margin: 0 2px;
255 padding: 0 5px;
256 white-space: nowrap;
257 border: 1px solid #eaeaea;
258 background-color: #f8f8f8;
259 border-radius: 3px; }
260
261pre code {
262 margin: 0;
263 padding: 0;
264 white-space: pre;
265 border: none;
266 background: transparent; }
267
268.highlight pre {
269 background-color: #f8f8f8;
270 border: 1px solid #cccccc;
271 font-size: 13px;
272 line-height: 19px;
273 overflow: auto;
274 padding: 6px 10px;
275 border-radius: 3px; }
276
277pre {
278 background-color: #f8f8f8;
279 border: 1px solid #cccccc;
280 font-size: 13px;
281 line-height: 19px;
282 overflow: auto;
283 padding: 6px 10px;
284 border-radius: 3px; }
285 pre code, pre tt {
286 background-color: transparent;
287 border: none; }
diff --git a/doc/3rd-party-libraries.md b/doc/md/3rd-party-libraries.md
index e6370549..ebab7a46 100644
--- a/doc/3rd-party-libraries.md
+++ b/doc/md/3rd-party-libraries.md
@@ -1,14 +1,13 @@
1#3rd party libraries
2## CSS 1## CSS
3- Yahoo UI [CSS Reset](http://yuilibrary.com/yui/docs/cssreset/)[](.html) 2- Yahoo UI [CSS Reset](http://yuilibrary.com/yui/docs/cssreset/)
4 - resets default CSS properties for all HTML elements (overriding browsers' default values) 3 - resets default CSS properties for all HTML elements (overriding browsers' default values)
5 - ensures custom CSS stylessheets will provide the same results on all browsers 4 - ensures custom CSS stylessheets will provide the same results on all browsers
6 5
7## Javascript 6## Javascript
8- [Awesomeplete](https://leaverou.github.io/awesomplete/) ([GitHub](https://github.com/LeaVerou/awesomplete)) - autocompletion in input forms[](.html) 7- [Awesomeplete](https://leaverou.github.io/awesomplete/) ([GitHub](https://github.com/LeaVerou/awesomplete)) - autocompletion in input forms
9- [bLazy](http://dinbror.dk/blazy/) ([GitHub](https://github.com/dinbror/blazy)) - lazy loading for thumbnails[](.html) 8- [bLazy](http://dinbror.dk/blazy/) ([GitHub](https://github.com/dinbror/blazy)) - lazy loading for thumbnails
10- [qr.js](http://neocotic.com/qr.js/) ([GitHub](https://github.com/neocotic/qr.js)) - QR code generation[](.html) 9- [qr.js](http://neocotic.com/qr.js/) ([GitHub](https://github.com/neocotic/qr.js)) - QR code generation
11 10
12## PHP 11## PHP
13- [shaarli/netscape-bookmark-parser](https://github.com/shaarli/netscape-bookmark-parser) - Netscape bookmark parser[](.html) 12- [shaarli/netscape-bookmark-parser](https://github.com/shaarli/netscape-bookmark-parser) - Netscape bookmark parser
14- [RainTPL](https://github.com/rainphp/raintpl) - HTML templating for PHP[](.html) 13- [RainTPL](https://github.com/rainphp/raintpl) - HTML templating for PHP
diff --git a/doc/Backup,-restore,-import-and-export.md b/doc/md/Backup,-restore,-import-and-export.md
index 9f5598ef..bb790074 100644
--- a/doc/Backup,-restore,-import-and-export.md
+++ b/doc/md/Backup,-restore,-import-and-export.md
@@ -1,12 +1,3 @@
1#Backup, restore, import and export
2 * [Backup and restore the datastore file](#backup-and-restore-the-datastore-file)[](.html)
3 * [Export links as...](#export-links-as)[](.html)
4 * [Import links from...](#import-links-from)[](.html)
5 * [Import Shaarli links to Firefox](#import-shaarli-links-to-firefox)[](.html)
6
7
8----------------------
9
10## Backup and restore the datastore file 1## Backup and restore the datastore file
11 2
12Backup the file `data/datastore.php` (by FTP or SSH). Restore by putting the file back in place. 3Backup the file `data/datastore.php` (by FTP or SSH). Restore by putting the file back in place.
@@ -19,12 +10,14 @@ rsync -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-$(date +
19## Export links as... 10## Export links as...
20 11
21To export links as an HTML file, under _Tools > Export_, choose: 12To export links as an HTML file, under _Tools > Export_, choose:
13
22- _Export all_ to export both public and private links 14- _Export all_ to export both public and private links
23- _Export public_ to export public links only 15- _Export public_ to export public links only
24- _Export private_ to export private links only 16- _Export private_ to export private links only
25 17
26Restore by using the `Import` feature. 18Restore by using the `Import` feature.
27* This can be done using the [shaarchiver](https://github.com/nodiscc/shaarchiver) tool.[](.html) 19
20- This can be done using the [shaarchiver](https://github.com/nodiscc/shaarchiver) tool.
28 21
29Example command: 22Example command:
30```bash 23```bash
@@ -33,34 +26,39 @@ Example command:
33 26
34## Import links from... 27## Import links from...
35 28
36
37### Diigo 29### Diigo
38 30
39If you export your bookmark from Diigo, make sure you use the Delicious export, not the Netscape export. (Their Netscape export is broken, and they don't seem to be interested in fixing it.) 31If you export your bookmark from Diigo, make sure you use the Delicious export, not the Netscape export. (Their Netscape export is broken, and they don't seem to be interested in fixing it.)
40 32
41
42### Mister Wong 33### Mister Wong
43 34
44See [this issue](https://github.com/sebsauvage/Shaarli/issues/146) for import tweaks.[](.html) 35See [this issue](https://github.com/sebsauvage/Shaarli/issues/146) for import tweaks.
45 36
46### SemanticScuttle 37### SemanticScuttle
47 38
48To correctly import the tags from a [SemanticScuttle](http://semanticscuttle.sourceforge.net/) HTML export, edit the HTML file before importing and replace all occurences of `tags=` (lowercase) to `TAGS=` (uppercase).[](.html) 39To correctly import the tags from a [SemanticScuttle](http://semanticscuttle.sourceforge.net/) HTML export, edit the HTML file before importing and replace all occurences of `tags=` (lowercase) to `TAGS=` (uppercase).
49 40
50### Scuttle 41### Scuttle
51 42
52Shaarli cannot import data directly from [Scuttle](https://github.com/scronide/scuttle). However, you can use this third party tool: https://github.com/q2apro/scuttle-to-shaarli to export the Scuttle database to the Netscape HTML format compatible with the Shaarli importer.[](.html) 43Shaarli cannot import data directly from [Scuttle](https://github.com/scronide/scuttle).
44
45However, you can use the third-party [scuttle-to-shaarli](https://github.com/q2apro/scuttle-to-shaarli)
46tool to export the Scuttle database to the Netscape HTML format compatible with the Shaarli importer.
47
48### Refind
49
50You can use the third-party tool [Derefind](https://github.com/ShawnPConroy/Derefind) to convert refind.com bookmark exports to a format that can be imported into Shaarli.
53 51
54## Import Shaarli links to Firefox 52## Import Shaarli links to Firefox
55 53
56 * Export your Shaarli links as described above. 54- Export your Shaarli links as described above.
57 * For compatibility reasons, check `Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)` 55 - For compatibility reasons, check `Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)`
58 * In Firefox, open the bookmark manager (not the sidebar! `Bookmarks menu > Show all bookmarks` or `Ctrl+Shift+B`) 56- In Firefox, open the bookmark manager (not the sidebar! `Bookmarks menu > Show all bookmarks` or `Ctrl+Shift+B`)
59 * Select `Import and Backup > Import bookmarks in HTML format` 57- Select `Import and Backup > Import bookmarks in HTML format`
60 58
61Your bookmarks will be imported in Firefox, ready to use, with tags and descriptions retained. "Self" (notes) shaares will still point to the Shaarli instance you exported them from, but the note text can be viewed directly in the bookmark properties inside your browser. Depending on the number of bookmarks, the import can take some time. 59Your bookmarks will be imported in Firefox, ready to use, with tags and descriptions retained. "Self" (notes) shaares will still point to the Shaarli instance you exported them from, but the note text can be viewed directly in the bookmark properties inside your browser. Depending on the number of bookmarks, the import can take some time.
62 60
63You may be interested in these Firefox addons to manage links imported from Shaarli 61You may be interested in these Firefox addons to manage links imported from Shaarli
64 62
65 * [Bookmark Deduplicator](https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/) - provides an easy way to deduplicate your bookmarks[](.html) 63- [Bookmark Deduplicator](https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/) - provides an easy way to deduplicate your bookmarks
66 * [TagSieve](https://addons.mozilla.org/en-US/firefox/addon/tagsieve/) - browse your bookmarks by their tags[](.html) 64- [TagSieve](https://addons.mozilla.org/en-US/firefox/addon/tagsieve/) - browse your bookmarks by their tags
diff --git a/doc/md/Bookmarklet.md b/doc/md/Bookmarklet.md
new file mode 100644
index 00000000..c899e3cf
--- /dev/null
+++ b/doc/md/Bookmarklet.md
@@ -0,0 +1,29 @@
1## Add the sharing button (_bookmarklet_) to your browser
2
3- Open your Shaarli and `Login`
4- Click the `Tools` button in the top bar
5- Drag the **`✚Shaare link` button**, and drop it to your browser's bookmarks bar.
6
7_This bookmarklet button is compatible with Firefox, Opera, Chrome and Safari. Under Opera, you can't drag'n drop the button: You have to right-click on it and add a bookmark to your personal toolbar._
8
9![](images/bookmarklet.png)
10
11## Share links using the _bookmarklet_
12
13- When you are visiting a webpage you would like to share with Shaarli, click the _bookmarklet_ you just added.
14- A window opens.
15 - You can freely edit title, description, tags... to find it later using the text search or tag filtering.
16 - You will be able to edit this link later using the ![](https://raw.githubusercontent.com/shaarli/Shaarli/master/images/edit_icon.png) edit button.
17 - You can also check the “Private” box so that the link is saved but only visible to you.
18- Click `Save`.**Voilà! Your link is now shared.**
19
20## Troubleshooting: The bookmarklet doesn't work with a few websites (e.g. Github.com)
21
22Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.
23
24See [#196](https://github.com/shaarli/Shaarli/issues/196).
25
26There is an open bug for both Firefox and Chromium:
27
28- https://bugzilla.mozilla.org/show_bug.cgi?id=866522
29- https://code.google.com/p/chromium/issues/detail?id=233903
diff --git a/doc/md/Browsing-and-searching.md b/doc/md/Browsing-and-searching.md
new file mode 100644
index 00000000..16c69855
--- /dev/null
+++ b/doc/md/Browsing-and-searching.md
@@ -0,0 +1,37 @@
1## Plain text search
2
3Use the `Search text` field to search in _any_ of the fields of all links (Title, URL, Description...)
4
5**Exclude text/tags:** Use the `-` operator before a word or tag (example `-uninteresting`) to prevent entries containing (or tagged) `uninteresting` from showing up in the search results.
6
7**Exact text search:** Use double-quotes (example `"exact search"`) to search for the exact expression.
8
9Both exclude patterns and exact searches can be combined with normal searches (example `"exact search" term otherterm -notthis "very exact" stuff -notagain`)
10
11## Tags search
12
13Use the `Filter by tags` field to restrict displayed links to entries tagged with one or multiple tags (use space to separate tags).
14
15**Hidden tags:** Tags starting with a dot `.` (example `.secret`) are private. They can only be seen and searched when logged in.
16
17### Tag cloud
18
19The `Tag cloud` page diplays a "cloud" view of all tags in your Shaarli.
20
21 * The most frequently used tags are displayed with a bigger font size.
22 * When sorting by `Most used` or `Alphabetical`, tags are displayed as a _list_, along with counters and edit/delete buttons for each tag.
23 * Clicking on any tag will display a list of all Shaares matching this tag.
24 * Clicking on the counter next to a tag `example`, will filter the tag cloud to only display tags found in Shaares tagged `example`. Repeat this any number of times to further filter the tag cloud. Click `List all links with those tags` to display Shaares matching your current tag filter.
25
26## Filtering RSS feeds/Picture wall
27
28RSS feeds can also be restricted to only return items matching a text/tag search: see [RSS feeds](RSS-feeds).
29
30## Filter buttons
31
32Filter buttons can be found at the top left of the link list. They allow you to apply different filters to the list:
33
34 * **Private links:** When this toggle button is enabled, only shaares set to `private` will be shown.
35 * **Untagged links:** When the this toggle button is enabled (top left of the link list), only shaares _without any tags_ will be shown in the link list.
36
37Filter buttons are only available when logged in.
diff --git a/doc/md/Community-&-Related-software.md b/doc/md/Community-&-Related-software.md
new file mode 100644
index 00000000..207153b6
--- /dev/null
+++ b/doc/md/Community-&-Related-software.md
@@ -0,0 +1,72 @@
1_Unofficial but related work on Shaarli. If you maintain one of these,
2please get in touch with us to help us find a way to adapt your work to our fork._
3
4## Related software
5
6
7### REST API clients
8See [REST API](REST-API) for a list of official and community clients.
9
10
11### Third party plugins
12- [autosave](https://github.com/kalvn/shaarli-plugin-autosave) by [@kalvn](https://github.com/kalvn): Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.
13- [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.
14- [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.
15- [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.
16- [twemoji](https://github.com/NerosTie/twemoji) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli (Twemoji version)
17- [google analytics](https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin) by [@ericjuden](http://github.com/ericjuden): Adds Google Analytics tracking support
18- [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.
19- [markdown-toolbar](https://github.com/immanuelfodor/shaarli-markdown-toolbar) by [@immanuelfodor](https://github.com/immanuelfodor) - Easily insert markdown syntax into the Description field when editing a link.
20- [related](https://github.com/ilesinge/shaarli-related) by [@ilesinge](https://github.com/ilesinge) - Show related links based on the number of identical tags.
21- [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks.
22- [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli
23- [shaarli2mastodon](https://github.com/kalvn/shaarli2mastodon) by [@kalvn](https://github.com/kalvn) - This Shaarli plugin allows you to automatically publish links you post on your Mastodon timeline.
24- [shaarli-descriptor](https://github.com/immanuelfodor/shaarli-descriptor) by [@immanuelfodor](https://github.com/immanuelfodor) - Customize the default height/number of rows of the Description field when editing a link.
25
26
27### Third-party themes
28See [Theming](Theming) for a list of community-contributed themes, and an installation guide.
29
30
31### Integration with other platforms
32- [tt-rss-shaarli](https://github.com/jcsaaddupuy/tt-rss-shaarli) - [Tiny-Tiny RSS](http://tt-rss.org/) plugin that adds support for sharing articles with Shaarli
33- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar
34- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle
35
36
37### Mobile Apps
38- [ShaarliOS](https://github.com/mro/ShaarliOS) - Apple iOS share extension.
39- [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider
40- [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli
41
42### Browser addons
43 * [Shaarli Web Extension](https://github.com/ikipatang/shaarli-web-extension) - toolbar button to share your current tab with Shaarli.
44
45### Server apps
46- [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content
47- [shaarli-river](https://github.com/mknexen/shaarli-river) - An aggregator for shaarlis with many features
48- [Shaarlo](https://github.com/DMeloni/shaarlo) - An aggregator for shaarlis with many features (a very popular running instance among French shaarliers: [shaarli.fr](http://shaarli.fr/))
49- [Shaarlimages](https://github.com/BoboTiG/shaarlimages) - An image-oriented aggregator for Shaarlis
50- [mknexen/shaarli-api](https://github.com/mknexen/shaarli-api) - A REST API for Shaarli
51- [Self dead link](https://github.com/qwertygc/shaarli-dev-code/blob/master/self-dead-link.php) - Detect dead links on shaarli. This version use the database of shaarli. [Another version](https://github.com/qwertygc/shaarli-dev-code/blob/master/dead-link.php), can be used for other shaarli instances (but is more resource consuming).
52- [Bookmark Archiver](https://github.com/pirate/bookmark-archiver) - Save an archived copy of all websites starred using browser bookmarks/Shaarli/Delicious/Instapaper/Unmark.it/Pocket/Pinboard. Outputs browseable html.
53
54## Alternatives to Shaarli
55See [awesome-selfhosted: bookmarks & link sharing](https://github.com/Kickball/awesome-selfhosted/#bookmarks--link-sharing).
56
57## Community
58- [Liens en vrac de sebsauvage](http://sebsauvage.net/links/) - the original Shaarli
59- [A large list of Shaarlis](http://porneia.free.fr/pub/links/ou-est-shaarli.html)
60- [A list of working Shaarli aggregators](https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json)
61- [A list of some known Shaarlis](https://github.com/Oros42/shaarlis_list)
62- [Adieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net](http://sebsauvage.net/rhaa/index.php?2011/09/16/09/29/58-adieu-delicious-diigo-et-stumbleupon-salut-shaarli-) (fr) _16/09/2011 - the original post about Shaarli_
63- [Original ideas/fixme/TODO page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas)
64- [Original discussion page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion) (fr)
65- [Original revisions history](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history)
66- [Shaarli.fr/my](https://www.shaarli.fr/my.php) - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of [DMeloni](https://github.com/DMeloni)
67
68### Articles and social media discussions
69- 2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176
70- 2015-08-15 - Reddit - [Question about migrating from WordPress to Shaarli.](https://www.reddit.com/r/selfhosted/comments/3h3zwh/question_about_migrating_from_wordpress_to_shaarli/)
71- 2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366
72- 2015-05-12 - Reddit - [shaarli - Self hosted Bookmarking / Delicious (PHP, MySQL)](https://www.reddit.com/r/selfhosted/comments/35pkkc/shaarli_self_hosted_bookmarking_delicious_php/)
diff --git a/doc/md/Continuous-integration-tools.md b/doc/md/Continuous-integration-tools.md
new file mode 100644
index 00000000..4bd7a0ba
--- /dev/null
+++ b/doc/md/Continuous-integration-tools.md
@@ -0,0 +1,28 @@
1## Local development
2A [`Makefile`](https://github.com/shaarli/Shaarli/blob/master/Makefile) is available to perform project-related operations:
3
4- Documentation - generate a local HTML copy of the GitHub wiki
5- [Static analysis](Static analysis) - check that the code is compliant to PHP conventions
6- [Unit tests](Unit tests) - ensure there are no regressions introduced by new commits
7
8## Automatic builds
9[Travis CI](http://docs.travis-ci.com/) is a Continuous Integration build server, that runs a build:
10
11- each time a commit is merged to the mainline (`master` branch)
12- each time a Pull Request is submitted or updated
13
14A build is composed of several jobs: one for each supported PHP version (see [Server requirements](Server requirements)).
15
16Each build job:
17
18- updates Composer
19- installs 3rd-party test dependencies with Composer
20- runs [Unit tests](Unit tests)
21
22After all jobs have finished, Travis returns the results to GitHub:
23
24- a status icon represents the result for the `master` branch: [![](https://api.travis-ci.org/shaarli/Shaarli.svg)](https://travis-ci.org/shaarli/Shaarli)
25- Pull Requests are updated with the Travis result
26 - Green: all tests have passed
27 - Red: some tests failed
28 - Orange: tests are pending
diff --git a/doc/md/Development-guidelines.md b/doc/md/Development-guidelines.md
new file mode 100644
index 00000000..532ec2e4
--- /dev/null
+++ b/doc/md/Development-guidelines.md
@@ -0,0 +1,10 @@
1## Development guidelines
2
3Please have a look at the following pages:
4
5- [Contributing to Shaarli](https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md)
6- [Static analysis](Static analysis) - patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially:
7 - [PSR-1](http://www.php-fig.org/psr/psr-1/) - Basic Coding Standard
8 - [PSR-2](http://www.php-fig.org/psr/psr-2/) - Coding Style Guide
9- [Unit tests](Unit tests)
10- [GnuPG signature](GnuPG signature) for tags/releases
diff --git a/doc/Directory-structure.md b/doc/md/Directory-structure.md
index 3a1c4309..eb50965b 100644
--- a/doc/Directory-structure.md
+++ b/doc/md/Directory-structure.md
@@ -1,4 +1,5 @@
1#Directory structure 1TODO: This page is out of date
2
2Here is the directory structure of Shaarli and the purpose of the different files: 3Here is the directory structure of Shaarli and the purpose of the different files:
3 4
4```bash 5```bash
diff --git a/doc/md/Download-and-Installation.md b/doc/md/Download-and-Installation.md
new file mode 100644
index 00000000..0fdbd27d
--- /dev/null
+++ b/doc/md/Download-and-Installation.md
@@ -0,0 +1,120 @@
1To install Shaarli, simply place the files in a directory under your webserver's
2Document Root (or directly at the document root).
3
4Also, please make sure your server meets the [requirements](Server-requirements)
5and is properly [configured](Server-configuration).
6
7Multiple releases branches are available:
8
9- latest (last release)
10- stable (previous major release)
11- master (development)
12
13Using one of the following methods:
14
15- by downloading full release archives including all dependencies
16- by downloading Github archives
17- by cloning the Git repository
18- using Docker: [see the documentation](docker/shaarli-images.md)
19
20--------------------------------------------------------------------------------
21
22## Latest release (recommended)
23
24### Download as an archive
25
26In most cases, you should download the latest Shaarli release from the [releases](https://github.com/shaarli/Shaarli/releases) page. **Download our *shaarli-full* archive** to include dependencies.
27
28The current latest released version is `v0.9.3`
29
30```bash
31$ wget https://github.com/shaarli/Shaarli/releases/download/v0.9.3/shaarli-v0.9.3-full.zip
32$ unzip shaarli-v0.9.3-full.zip
33$ mv Shaarli /path/to/shaarli/
34```
35
36### Using git
37
38Cloning using `git` or downloading Github branches as zip files requires additional steps:
39
40 * Install [Composer](Unit-tests.md#install_composer) to manage Shaarli dependencies.
41 * Install [python3-virtualenv](https://pypi.python.org/pypi/virtualenv) to build the local HTML documentation.
42
43```
44$ mkdir -p /path/to/shaarli && cd /path/to/shaarli/
45$ git clone -b latest https://github.com/shaarli/Shaarli.git .
46$ composer install --no-dev --prefer-dist
47$ make translate
48$ make htmldoc
49```
50
51--------------------------------------------------------------------------------
52
53## Stable version
54
55The stable version has been experienced by Shaarli users, and will receive security updates.
56
57
58### Download as an archive
59
60As a .zip archive:
61
62```bash
63$ wget https://github.com/shaarli/Shaarli/archive/stable.zip
64$ unzip stable.zip
65$ mv Shaarli-stable /path/to/shaarli/
66```
67
68As a .tar.gz archive :
69
70```bash
71$ wget https://github.com/shaarli/Shaarli/archive/stable.tar.gz
72$ tar xvf stable.tar.gz
73$ mv Shaarli-stable /path/to/shaarli/
74```
75
76### Using git
77
78Install [Composer](Unit-tests.md#install_composer) to manage Shaarli dependencies.
79
80```bash
81$ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/
82# install/update third-party dependencies
83$ cd /path/to/shaarli/
84$ composer install --no-dev --prefer-dist
85```
86
87
88--------------------------------------------------------------------------------
89
90## Development version (mainline)
91
92_Use at your own risk!_
93
94Install [Composer](Unit-tests.md#install_composer) to manage Shaarli dependencies.
95
96To get the latest changes from the `master` branch:
97
98```bash
99# clone the repository
100$ git clone https://github.com/shaarli/Shaarli.git -b master /path/to/shaarli/
101# install/update third-party dependencies
102$ cd /path/to/shaarli
103$ composer install --no-dev --prefer-dist
104$ make translate
105$ make htmldoc
106```
107
108-------------------------------------------------------------------------------
109
110## Finish Installation
111
112Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.
113
114![install screenshot](images/install-shaarli.png)
115
116Setup your Shaarli installation, and it's ready to use!
117
118## Updating Shaarli
119
120See [Upgrade and Migration](Upgrade-and-migration)
diff --git a/doc/FAQ.md b/doc/md/FAQ.md
index 4c69763f..77faf117 100644
--- a/doc/FAQ.md
+++ b/doc/md/FAQ.md
@@ -1,7 +1,6 @@
1#FAQ
2### Why did you create Shaarli ? 1### Why did you create Shaarli ?
3 2
4I was a StumbleUpon user. Then I got fed up with they big toolbar. I switched to delicious, which was lighter, faster and more beautiful. Until Yahoo bought it. Then the export API broke all the time, delicious became slow and was ditched by Yahoo. I switched to Diigo, which is not bad, but does too much. And Diigo is sslllooooowww and their Firefox extension a bit buggy. And… oh… **their Firefox addon sends to Diigo every single URL you visit** (Don't believe me ? Use [Tamper Data](https://addons.mozilla.org/en-US/firefox/addon/tamper-data/) and open any page).[](.html) 3I was a StumbleUpon user. Then I got fed up with they big toolbar. I switched to delicious, which was lighter, faster and more beautiful. Until Yahoo bought it. Then the export API broke all the time, delicious became slow and was ditched by Yahoo. I switched to Diigo, which is not bad, but does too much. And Diigo is sslllooooowww and their Firefox extension a bit buggy. And… oh… **their Firefox addon sends to Diigo every single URL you visit** (Don't believe me ? Use [Tamper Data](https://addons.mozilla.org/en-US/firefox/addon/tamper-data/) and open any page).
5 4
6Enough is enough. Saving simple links should not be a complicated heavy thing. I ditched them all and wrote my own: Shaarli. It's simple, but it does the job and does it well. And my data is not hosted on a foreign server, but on my server. 5Enough is enough. Saving simple links should not be a complicated heavy thing. I ditched them all and wrote my own: Shaarli. It's simple, but it does the job and does it well. And my data is not hosted on a foreign server, but on my server.
7 6
@@ -9,35 +8,36 @@ Enough is enough. Saving simple links should not be a complicated heavy thing. I
9 8
10With Shaarli: 9With Shaarli:
11 10
12* The data is yours: It's hosted on your server. 11- The data is yours: It's hosted on your server.
13* Never fear of having your data locked-in. 12- Never fear of having your data locked-in.
14* Never fear to have your data sold to third party. 13- Never fear to have your data sold to third party.
15* Your private links are not hosted on a third party server. 14- Your private links are not hosted on a third party server.
16* You are not tracked by browser addons (like Diigo does) 15- You are not tracked by browser addons (like Diigo does)
17* You can change the look and feel of the pages if you want. 16- You can change the look and feel of the pages if you want.
18* You can change the behaviour of the program. 17- You can change the behaviour of the program.
19* It's magnitude faster than most bookmarking services. 18- It's magnitude faster than most bookmarking services.
20 19
21### What does Shaarli mean? 20### What does Shaarli mean?
22 21
23Shaarli is for shaaring your links. 22Shaarli stands for _shaaring_ your _links_.
24 23
25### My Shaarli is broken! 24### My Shaarli is broken!
26First of all, ensure that both the [web server](Server-configuration) and [Shaarli](Shaarli-configuration) are correctly configured, and that your installation is [supported](Server-requirements).[](.html) 25First of all, ensure that both the [web server](Server-configuration) and [Shaarli](Shaarli-configuration) are correctly configured, and that your installation is [supported](Server-requirements).
27 26
28If everything looks right but the issue(s) remain(s), please: 27If everything looks right but the issue(s) remain(s), please:
29- take a look at the [troubleshooting](Troubleshooting) section[](.html) 28
30- come [chat with us](https://gitter.im/shaarli/Shaarli) on Gitter, we'll be happy to help ;-)[](.html) 29- take a look at the [troubleshooting](Troubleshooting) section
31- browse active [issues](https://github.com/shaarli/Shaarli/issues) and [Pull Requests](https://github.com/shaarli/Shaarli/pulls)[](.html) 30- come [chat with us](https://gitter.im/shaarli/Shaarli) on Gitter, we'll be happy to help ;-)
31- browse active [issues](https://github.com/shaarli/Shaarli/issues) and [Pull Requests](https://github.com/shaarli/Shaarli/pulls)
32 - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup) 32 - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)
33 - else, [open a new issue](https://github.com/shaarli/Shaarli/issues/new), and provide information about the problem:[](.html) 33 - else, [open a new issue](https://github.com/shaarli/Shaarli/issues/new), and provide information about the problem:
34 - _what happens?_ - display glitches, invalid data, security flaws... 34 - _what happens?_ - display glitches, invalid data, security flaws...
35 - _what is your configuration?_ - OS, server version, activated extensions, web browser... 35 - _what is your configuration?_ - OS, server version, activated extensions, web browser...
36 - _is it reproducible?_ 36 - _is it reproducible?_
37 37
38### Why not use a real database? Files are slow! 38### Why not use a real database? Files are slow!
39 39
40Does browsing [this page](http://sebsauvage.net/links/) feel slow? Try browsing older pages, too.[](.html) 40Does browsing [this page](http://sebsauvage.net/links/) feel slow? Try browsing older pages, too.
41 41
42It's not slow at all, is it? And don't forget the database contains more than 16000 links, and it's on a shared host, with 32000 visitors/day for my website alone. And it's still damn fast. Why? 42It's not slow at all, is it? And don't forget the database contains more than 16000 links, and it's on a shared host, with 32000 visitors/day for my website alone. And it's still damn fast. Why?
43 43
diff --git a/doc/md/Firefox-share.md b/doc/md/Firefox-share.md
new file mode 100644
index 00000000..9a46b185
--- /dev/null
+++ b/doc/md/Firefox-share.md
@@ -0,0 +1,20 @@
1| Note | Firefox Share is no longer available for Firefox 57 and later versions. |
2|---------|---------|
3
4### Add Shaarli as a sharing service to Firefox
5
6- Open your Shaarli and `Login`
7- Click the `Tools` button in the top bar
8- Click the `✚Add to Firefox social` button and accept the activation.
9
10
11### Sharing links using Firefox share
12
13- Add the sharing service as described above
14- When you are visiting a webpage you would like to share with Shaarli,
15 click the Firefox _Share_ button [images/firefoxshare.png](images/firefoxshare.png)
16- You can edit your link before and after saving, just like the bookmarklet above.
17
18_Your Shaarli instance must be hosted on an HTTPS (SSL/TLS secure connection)
19enabled server for Firefox Share to work. Firefox Share will not work over
20plain HTTP connections._
diff --git a/doc/GnuPG-signature.md b/doc/md/GnuPG-signature.md
index b0028d55..d1fc10a5 100644
--- a/doc/GnuPG-signature.md
+++ b/doc/md/GnuPG-signature.md
@@ -1,27 +1,28 @@
1#GnuPG signature
2## Introduction 1## Introduction
3### PGP and GPG 2### PGP and GPG
4[Gnu Privacy Guard](https://gnupg.org/) (GnuPG) is an Open Source implementation of the [Pretty Good [](.html) 3[Gnu Privacy Guard](https://gnupg.org/) (GnuPG) is an Open Source implementation of the
5Privacy](https://en.wikipedia.org/wiki/Pretty_Good_Privacy#OpenPGP) (OpenPGP) specification. Its main purposes are digital authentication, 4[Pretty Good Privacy](https://en.wikipedia.org/wiki/Pretty_Good_Privacy#OpenPGP)
6signature and encryption. 5(OpenPGP) specification. Its main purposes are digital authentication, signature and encryption.
7 6
8It is often used by the [FLOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software) community to verify:[](.html) 7It is often used by the [FLOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software) community to verify:
9- Linux package signatures: Debian [SecureApt](https://wiki.debian.org/SecureApt), ArchLinux [Master [](.html) 8
9- Linux package signatures: Debian [SecureApt](https://wiki.debian.org/SecureApt), ArchLinux [Master
10Keys](https://www.archlinux.org/master-keys/) 10Keys](https://www.archlinux.org/master-keys/)
11- [SCM](https://en.wikipedia.org/wiki/Revision_control) releases & maintainer identity[](.html) 11- [SCM](https://en.wikipedia.org/wiki/Revision_control) releases & maintainer identity
12 12
13### Trust 13### Trust
14To quote Phil Pennock (the author of the [SKS](https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Home) key server - http://sks.spodhuis.org/):[](.html) 14To quote Phil Pennock (the author of the [SKS](https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Home) key server - http://sks.spodhuis.org/):
15 15
16> You MUST understand that presence of data in the keyserver (pools) in no way connotes trust. Anyone can generate a key, with any name or email address, and upload it. All security and trust comes from evaluating security at the “object level”, via PGP Web-Of-Trust signatures. This keyserver makes it possible to retrieve keys, looking them up via various indices, but the collection of keys in this public pool is KNOWN to contain malicious and fraudulent keys. It is the common expectation of server operators that users understand this and use software which, like all known common OpenPGP implementations, evaluates trust accordingly. This expectation is so common that it is not normally explicitly stated. 16> You MUST understand that presence of data in the keyserver (pools) in no way connotes trust. Anyone can generate a key, with any name or email address, and upload it. All security and trust comes from evaluating security at the “object level”, via PGP Web-Of-Trust signatures. This keyserver makes it possible to retrieve keys, looking them up via various indices, but the collection of keys in this public pool is KNOWN to contain malicious and fraudulent keys. It is the common expectation of server operators that users understand this and use software which, like all known common OpenPGP implementations, evaluates trust accordingly. This expectation is so common that it is not normally explicitly stated.
17 17
18Trust can be gained by having your key signed by other people (and signing their key back, too :) ), for instance during [key signing parties](https://en.wikipedia.org/wiki/Key_signing_party), see:[](.html) 18Trust can be gained by having your key signed by other people (and signing their key back, too :) ), for instance during [key signing parties](https://en.wikipedia.org/wiki/Key_signing_party), see:
19- [The Keysigning party HOWTO](http://www.cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html)[](.html) 19
20- [Web of trust](https://en.wikipedia.org/wiki/Web_of_trust)[](.html) 20- [The Keysigning party HOWTO](http://www.cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html)
21- [Web of trust](https://en.wikipedia.org/wiki/Web_of_trust)
21 22
22## Generate a GPG key 23## Generate a GPG key
23- [Generating a GPG key for Git tagging](http://stackoverflow.com/a/16725717) (StackOverflow)[](.html) 24- [Generating a GPG key for Git tagging](http://stackoverflow.com/a/16725717) (StackOverflow)
24- [Generating a GPG key](https://help.github.com/articles/generating-a-gpg-key/) (GitHub)[](.html) 25- [Generating a GPG key](https://help.github.com/articles/generating-a-gpg-key/) (GitHub)
25 26
26### gpg - provide identity information 27### gpg - provide identity information
27```bash 28```bash
@@ -62,7 +63,7 @@ gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
62gpg: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u 63gpg: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u
63pub rsa2048/A9D53A3E 2015-07-31 64pub rsa2048/A9D53A3E 2015-07-31
64 Key fingerprint = AF2A 5381 E54B 2FD2 14C4 A9A3 0E35 ACA4 A9D5 3A3E 65 Key fingerprint = AF2A 5381 E54B 2FD2 14C4 A9A3 0E35 ACA4 A9D5 3A3E
65uid [ultimate] Marvin the Paranoid Android <marvin@h2g2.net>[](.html) 66uid [ultimate] Marvin the Paranoid Android <marvin@h2g2.net>
66sub rsa2048/8C0EACF1 2015-07-31 67sub rsa2048/8C0EACF1 2015-07-31
67``` 68```
68 69
@@ -74,4 +75,4 @@ gpg: sending key A9D53A3E to hkp server pgp.mit.edu
74 75
75## Create and push a GPG-signed tag 76## Create and push a GPG-signed tag
76 77
77See [Release Shaarli](Release-Shaarli.html). 78See [Release Shaarli](Release Shaarli).
diff --git a/doc/Plugin-System.md b/doc/md/Plugin-System.md
index 623627dd..cbec04c0 100644
--- a/doc/Plugin-System.md
+++ b/doc/md/Plugin-System.md
@@ -1,9 +1,8 @@
1#Plugin System 1[**I am a developer: ** Developer API](#developer-api)
2> Note: Plugin current status - in development (not merged into master).
3 2
4[**I am a developer.** Developer API.](#developer-api)[](.html) 3[**I am a template designer: ** Guide for template designers](#guide-for-template-designer)
5 4
6[**I am a template designer.** Guide for template designer.](#guide-for-template-designer)[](.html) 5---
7 6
8## Developer API 7## Developer API
9 8
@@ -11,9 +10,9 @@
11 10
12The plugin system let you: 11The plugin system let you:
13 12
14 * insert content into specific places across templates. 13- insert content into specific places across templates.
15 * alter data before templates rendering. 14- alter data before templates rendering.
16 * alter data before saving new links. 15- alter data before saving new links.
17 16
18### How can I create a plugin for Shaarli? 17### How can I create a plugin for Shaarli?
19 18
@@ -30,6 +29,14 @@ You should have the following tree view:
30| |---| demo_plugin.php 29| |---| demo_plugin.php
31``` 30```
32 31
32### Plugin initialization
33
34At the beginning of Shaarli execution, all enabled plugins are loaded. At this point, the plugin system looks for an `init()` function to execute and run it if it exists. This function must be named this way, and takes the `ConfigManager` as parameter.
35
36 <plugin_name>_init($conf)
37
38This function can be used to create initial data, load default settings, etc. But also to set *plugin errors*. If the initialization function returns an array of strings, they will be understand as errors, and displayed in the header to logged in users.
39
33### Understanding hooks 40### Understanding hooks
34 41
35A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution. 42A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution.
@@ -37,12 +44,17 @@ A plugin is a set of functions. Each function will be triggered by the plugin sy
37These functions need to be named with this pattern: 44These functions need to be named with this pattern:
38 45
39``` 46```
40hook_<plugin_name>_<hook_name> 47hook_<plugin_name>_<hook_name>($data, $conf)
41``` 48```
42 49
43For exemple, if my plugin want to add data to the header, this function is needed: 50Parameters:
44 51
45 hook_demo_plugin_render_header() 52- data: see [$data section](https://shaarli.readthedocs.io/en/master/Plugin-System/#plugins-data)
53- conf: the `ConfigManager` instance.
54
55For example, if my plugin want to add data to the header, this function is needed:
56
57 hook_demo_plugin_render_header
46 58
47If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header. 59If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header.
48 60
@@ -65,9 +77,9 @@ RainTPL displays every element contained in the placeholder's array. These eleme
65For example, let's add a value in the placeholder `top_placeholder` which is displayed at the top of my page: 77For example, let's add a value in the placeholder `top_placeholder` which is displayed at the top of my page:
66 78
67```php 79```php
68$data['top_placeholder'[] = 'My content';](]-=-'My-content';.html) 80$data['top_placeholder'][] = 'My content';
69# OR 81# OR
70array_push($data['top_placeholder'], 'My', 'content');[](.html) 82array_push($data['top_placeholder'], 'My', 'content');
71 83
72return $data; 84return $data;
73``` 85```
@@ -82,9 +94,9 @@ For exemple, in linklist, it is possible to alter every title:
82 94
83```php 95```php
84// mind the reference if you want $data to be altered 96// mind the reference if you want $data to be altered
85foreach ($data['links'] as &$value) {[](.html) 97foreach ($data['links'] as &$value) {
86 // String reverse every title. 98 // String reverse every title.
87 $value['title'] = strrev($value['title']);[](.html) 99 $value['title'] = strrev($value['title']);
88} 100}
89 101
90return $data; 102return $data;
@@ -96,8 +108,9 @@ Every plugin needs a `<plugin_name>.meta` file, which is in fact an `.ini` file
96 108
97Each file contain two keys: 109Each file contain two keys:
98 110
99 * `description`: plugin description 111- `description`: plugin description
100 * `parameters`: user parameter names, separated by a `;`. 112- `parameters`: user parameter names, separated by a `;`.
113- `parameter.<PARAMETER_NAME>`: add a text description the specified parameter.
101 114
102> Note: In PHP, `parse_ini_file()` seems to want strings to be between by quotes `"` in the ini file. 115> Note: In PHP, `parse_ini_file()` seems to want strings to be between by quotes `"` in the ini file.
103 116
@@ -105,22 +118,26 @@ Each file contain two keys:
105 118
106Use `demo_plugin` as a functional example. It covers most of the plugin system features. 119Use `demo_plugin` as a functional example. It covers most of the plugin system features.
107 120
108If it's still not working, please [open an issue](https://github.com/shaarli/Shaarli/issues/new).[](.html) 121If it's still not working, please [open an issue](https://github.com/shaarli/Shaarli/issues/new).
109 122
110### Hooks 123### Hooks
111 124
112| Hooks | Description | 125| Hooks | Description |
113| ------------- |:-------------:| 126| ------------- |:-------------:|
114| [render_header](#render_header) | Allow plugin to add content in page headers. |[](.html) 127| [render_header](#render_header) | Allow plugin to add content in page headers. |
115| [render_includes](#render_includes) | Allow plugin to include their own CSS files. |[](.html) 128| [render_includes](#render_includes) | Allow plugin to include their own CSS files. |
116| [render_footer](#render_footer) | Allow plugin to add content in page footer and include their own JS files. | [](.html) 129| [render_footer](#render_footer) | Allow plugin to add content in page footer and include their own JS files. |
117| [render_linklist](#render_linklist) | It allows to add content at the begining and end of the page, after every link displayed and to alter link data. |[](.html) 130| [render_linklist](#render_linklist) | It allows to add content at the begining and end of the page, after every link displayed and to alter link data. |
118| [render_editlink](#render_editlink) | Allow to add fields in the form, or display elements. |[](.html) 131| [render_editlink](#render_editlink) | Allow to add fields in the form, or display elements. |
119| [render_tools](#render_tools) | Allow to add content at the end of the page. |[](.html) 132| [render_tools](#render_tools) | Allow to add content at the end of the page. |
120| [render_picwall](#render_picwall) | Allow to add content at the top and bottom of the page. |[](.html) 133| [render_picwall](#render_picwall) | Allow to add content at the top and bottom of the page. |
121| [render_tagcloud](#render_tagcloud) | Allow to add content at the top and bottom of the page. |[](.html) 134| [render_tagcloud](#render_tagcloud) | Allow to add content at the top and bottom of the page, and after all tags. |
122| [render_daily](#render_daily) | Allow to add content at the top and bottom of the page, the bottom of each link and to alter data. |[](.html) 135| [render_taglist](#render_taglist) | Allow to add content at the top and bottom of the page, and after all tags. |
123| [savelink](#savelink) | Allow to alter the link being saved in the datastore. |[](.html) 136| [render_daily](#render_daily) | Allow to add content at the top and bottom of the page, the bottom of each link and to alter data. |
137| [render_feed](#render_feed) | Allow to do add tags in RSS and ATOM feeds. |
138| [save_link](#save_link) | Allow to alter the link being saved in the datastore. |
139| [delete_link](#delete_link) | Allow to do an action before a link is deleted from the datastore. |
140
124 141
125 142
126#### render_header 143#### render_header
@@ -133,24 +150,24 @@ Allow plugin to add content in page headers.
133 150
134`$data` is an array containing: 151`$data` is an array containing:
135 152
136 * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.). 153- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
137 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 154- `_LOGGEDIN_`: true if user is logged in, false otherwise.
138 155
139##### Template placeholders 156##### Template placeholders
140 157
141Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 158Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
142 159
143List of placeholders: 160List of placeholders:
144 161
145 * `buttons_toolbar`: after the list of buttons in the header. 162- `buttons_toolbar`: after the list of buttons in the header.
146 163
147![buttons_toolbar_example](http://i.imgur.com/ssJUOrt.png)[](.html) 164![buttons_toolbar_example](http://i.imgur.com/ssJUOrt.png)
148 165
149 * `fields_toolbar`: after search fields in the header. 166- `fields_toolbar`: after search fields in the header.
150 167
151> Note: This will only be called in linklist. 168> Note: This will only be called in linklist.
152 169
153![fields_toolbar_example](http://i.imgur.com/3GMifI2.png)[](.html) 170![fields_toolbar_example](http://i.imgur.com/3GMifI2.png)
154 171
155#### render_includes 172#### render_includes
156 173
@@ -162,16 +179,16 @@ Allow plugin to include their own CSS files.
162 179
163`$data` is an array containing: 180`$data` is an array containing:
164 181
165 * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.). 182- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
166 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 183- `_LOGGEDIN_`: true if user is logged in, false otherwise.
167 184
168##### Template placeholders 185##### Template placeholders
169 186
170Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 187Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
171 188
172List of placeholders: 189List of placeholders:
173 190
174 * `css_files`: called after loading default CSS. 191- `css_files`: called after loading default CSS.
175 192
176> Note: only add the path of the CSS file. E.g: `plugins/demo_plugin/custom_demo.css`. 193> Note: only add the path of the CSS file. E.g: `plugins/demo_plugin/custom_demo.css`.
177 194
@@ -185,21 +202,21 @@ Allow plugin to add content in page footer and include their own JS files.
185 202
186`$data` is an array containing: 203`$data` is an array containing:
187 204
188 * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.). 205- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
189 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 206- `_LOGGEDIN_`: true if user is logged in, false otherwise.
190 207
191##### Template placeholders 208##### Template placeholders
192 209
193Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 210Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
194 211
195List of placeholders: 212List of placeholders:
196 213
197 * `text`: called after the end of the footer text. 214- `text`: called after the end of the footer text.
198 * `endofpage`: called at the end of the page. 215- `endofpage`: called at the end of the page.
199 216
200![text_example](http://i.imgur.com/L5S2YEH.png)[](.html) 217![text_example](http://i.imgur.com/L5S2YEH.png)
201 218
202 * `js_files`: called at the end of the page, to include custom JS scripts. 219- `js_files`: called at the end of the page, to include custom JS scripts.
203 220
204> Note: only add the path of the JS file. E.g: `plugins/demo_plugin/custom_demo.js`. 221> Note: only add the path of the JS file. E.g: `plugins/demo_plugin/custom_demo.js`.
205 222
@@ -213,30 +230,30 @@ It allows to add content at the begining and end of the page, after every link d
213 230
214`$data` is an array containing: 231`$data` is an array containing:
215 232
216 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 233- `_LOGGEDIN_`: true if user is logged in, false otherwise.
217 * All templates data, including links. 234- All templates data, including links.
218 235
219##### Template placeholders 236##### Template placeholders
220 237
221Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 238Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
222 239
223List of placeholders: 240List of placeholders:
224 241
225 * `action_plugin`: next to the button "private only" at the top and bottom of the page. 242- `action_plugin`: next to the button "private only" at the top and bottom of the page.
226 243
227![action_plugin_example](http://i.imgur.com/Q12PWg0.png)[](.html) 244![action_plugin_example](http://i.imgur.com/Q12PWg0.png)
228 245
229 * `link_plugin`: for every link, between permalink and link URL. 246- `link_plugin`: for every link, between permalink and link URL.
230 247
231![link_plugin_example](http://i.imgur.com/3oDPhWx.png)[](.html) 248![link_plugin_example](http://i.imgur.com/3oDPhWx.png)
232 249
233 * `plugin_start_zone`: before displaying the template content. 250- `plugin_start_zone`: before displaying the template content.
234 251
235![plugin_start_zone_example](http://i.imgur.com/OVBkGy3.png)[](.html) 252![plugin_start_zone_example](http://i.imgur.com/OVBkGy3.png)
236 253
237 * `plugin_end_zone`: after displaying the template content. 254- `plugin_end_zone`: after displaying the template content.
238 255
239![plugin_end_zone_example](http://i.imgur.com/6IoRuop.png)[](.html) 256![plugin_end_zone_example](http://i.imgur.com/6IoRuop.png)
240 257
241#### render_editlink 258#### render_editlink
242 259
@@ -248,17 +265,17 @@ Allow to add fields in the form, or display elements.
248 265
249`$data` is an array containing: 266`$data` is an array containing:
250 267
251 * All templates data. 268- All templates data.
252 269
253##### Template placeholders 270##### Template placeholders
254 271
255Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 272Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
256 273
257List of placeholders: 274List of placeholders:
258 275
259 * `edit_link_plugin`: after tags field. 276- `edit_link_plugin`: after tags field.
260 277
261![edit_link_plugin_example](http://i.imgur.com/5u17Ens.png)[](.html) 278![edit_link_plugin_example](http://i.imgur.com/5u17Ens.png)
262 279
263#### render_tools 280#### render_tools
264 281
@@ -270,17 +287,17 @@ Allow to add content at the end of the page.
270 287
271`$data` is an array containing: 288`$data` is an array containing:
272 289
273 * All templates data. 290- All templates data.
274 291
275##### Template placeholders 292##### Template placeholders
276 293
277Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 294Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
278 295
279List of placeholders: 296List of placeholders:
280 297
281 * `tools_plugin`: at the end of the page. 298- `tools_plugin`: at the end of the page.
282 299
283![tools_plugin_example](http://i.imgur.com/Bqhu9oQ.png)[](.html) 300![tools_plugin_example](http://i.imgur.com/Bqhu9oQ.png)
284 301
285#### render_picwall 302#### render_picwall
286 303
@@ -292,20 +309,19 @@ Allow to add content at the top and bottom of the page.
292 309
293`$data` is an array containing: 310`$data` is an array containing:
294 311
295 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 312- `_LOGGEDIN_`: true if user is logged in, false otherwise.
296 * All templates data. 313- All templates data.
297 314
298##### Template placeholders 315##### Template placeholders
299 316
300Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 317Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
301 318
302List of placeholders: 319List of placeholders:
303 320
304 * `plugin_start_zone`: before displaying the template content. 321- `plugin_start_zone`: before displaying the template content.
305 322- `plugin_end_zone`: after displaying the template content.
306 * `plugin_end_zone`: after displaying the template content.
307 323
308![plugin_start_end_zone_example](http://i.imgur.com/tVTQFER.png)[](.html) 324![plugin_start_end_zone_example](http://i.imgur.com/tVTQFER.png)
309 325
310#### render_tagcloud 326#### render_tagcloud
311 327
@@ -317,20 +333,50 @@ Allow to add content at the top and bottom of the page.
317 333
318`$data` is an array containing: 334`$data` is an array containing:
319 335
320 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 336- `_LOGGEDIN_`: true if user is logged in, false otherwise.
321 * All templates data. 337- All templates data.
322 338
323##### Template placeholders 339##### Template placeholders
324 340
325Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 341Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
326 342
327List of placeholders: 343List of placeholders:
328 344
329 * `plugin_start_zone`: before displaying the template content. 345- `plugin_start_zone`: before displaying the template content.
346- `plugin_end_zone`: after displaying the template content.
330 347
331 * `plugin_end_zone`: after displaying the template content. 348For each tag, the following placeholder can be used:
332 349
333![plugin_start_end_zone_example](http://i.imgur.com/vHmyT3a.png)[](.html) 350- `tag_plugin`: after each tag
351
352![plugin_start_end_zone_example](http://i.imgur.com/vHmyT3a.png)
353
354
355#### render_taglist
356
357Triggered when taglist is displayed.
358
359Allow to add content at the top and bottom of the page.
360
361##### Data
362
363`$data` is an array containing:
364
365- `_LOGGEDIN_`: true if user is logged in, false otherwise.
366- All templates data.
367
368##### Template placeholders
369
370Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
371
372List of placeholders:
373
374- `plugin_start_zone`: before displaying the template content.
375- `plugin_end_zone`: after displaying the template content.
376
377For each tag, the following placeholder can be used:
378
379- `tag_plugin`: after each tag
334 380
335#### render_daily 381#### render_daily
336 382
@@ -342,24 +388,49 @@ Allow to add content at the top and bottom of the page, the bottom of each link
342 388
343`$data` is an array containing: 389`$data` is an array containing:
344 390
345 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 391- `_LOGGEDIN_`: true if user is logged in, false otherwise.
346 * All templates data, including links. 392- All templates data, including links.
347 393
348##### Template placeholders 394##### Template placeholders
349 395
350Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 396Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
351 397
352List of placeholders: 398List of placeholders:
353 399
354 * `link_plugin`: used at bottom of each link. 400- `link_plugin`: used at bottom of each link.
401
402![link_plugin_example](http://i.imgur.com/hzhMfSZ.png)
403
404- `plugin_start_zone`: before displaying the template content.
405- `plugin_end_zone`: after displaying the template content.
355 406
356![link_plugin_example](http://i.imgur.com/hzhMfSZ.png)[](.html) 407#### render_feed
357 408
358 * `plugin_start_zone`: before displaying the template content. 409Triggered when the ATOM or RSS feed is displayed.
359 410
360 * `plugin_end_zone`: after displaying the template content. 411Allow to add tags in the feed, either in the header or for each items. Items (links) can also be altered before being rendered.
361 412
362#### savelink 413##### Data
414
415`$data` is an array containing:
416
417- `_LOGGEDIN_`: true if user is logged in, false otherwise.
418- `_PAGE_`: containing either `rss` or `atom`.
419- All templates data, including links.
420
421##### Template placeholders
422
423Tags can be added in feeds by adding an entry in `$data['<placeholder>']` array.
424
425List of placeholders:
426
427- `feed_plugins_header`: used as a header tag in the feed.
428
429For each links:
430
431- `feed_plugins`: additional tag for every link entry.
432
433#### save_link
363 434
364Triggered when a link is save (new link or edit). 435Triggered when a link is save (new link or edit).
365 436
@@ -369,12 +440,36 @@ Allow to alter the link being saved in the datastore.
369 440
370`$data` is an array containing the link being saved: 441`$data` is an array containing the link being saved:
371 442
372 * title 443- id
373 * url 444- title
374 * description 445- url
375 * linkdate 446- shorturl
376 * private 447- description
377 * tags 448- private
449- tags
450- created
451- updated
452
453
454#### delete_link
455
456Triggered when a link is deleted.
457
458Allow to execute any action before the link is actually removed from the datastore
459
460##### Data
461
462`$data` is an array containing the link being saved:
463
464- id
465- title
466- url
467- shorturl
468- description
469- private
470- tags
471- created
472- updated
378 473
379## Guide for template designer 474## Guide for template designer
380 475
@@ -388,9 +483,9 @@ Use the default one as an example.
388 483
389Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include `plugin_admin.js`, only if: 484Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include `plugin_admin.js`, only if:
390 485
391 * you're using a table. 486- you're using a table.
392 * you call orderUp() and orderUp() onclick on arrows. 487- you call orderUp() and orderUp() onclick on arrows.
393 * you add data-line and data-order to your rows. 488- you add data-line and data-order to your rows.
394 489
395Otherwise, you can use your own JS as long as this field is send by the form: 490Otherwise, you can use your own JS as long as this field is send by the form:
396 491
@@ -595,3 +690,19 @@ Bottom:
595 {/loop} 690 {/loop}
596</div> 691</div>
597``` 692```
693
694**feed.atom.xml** and **feed.rss.xml**:
695
696In headers tags section:
697```xml
698{loop="$feed_plugins_header"}
699 {$value}
700{/loop}
701```
702
703After each entry:
704```xml
705{loop="$value.feed_plugins"}
706 {$value}
707{/loop}
708```
diff --git a/doc/Plugins.md b/doc/md/Plugins.md
index 81167fcf..463dae17 100644
--- a/doc/Plugins.md
+++ b/doc/md/Plugins.md
@@ -1,13 +1,12 @@
1#Plugins
2## Plugin installation 1## Plugin installation
3 2
4There is a bunch of plugins shipped with Shaarli, where there is nothing to do to install them. 3There is a bunch of plugins shipped with Shaarli, where there is nothing to do to install them.
5 4
6If you want to install a third party plugin: 5If you want to install a third party plugin:
7 6
8 * Download it. 7- Download it.
9 * Put it in the `plugins` directory in Shaarli's installation folder. 8- Put it in the `plugins` directory in Shaarli's installation folder.
10 * Make sure you put it correctly: 9- Make sure you put it correctly:
11 10
12``` 11```
13| index.php 12| index.php
@@ -26,7 +25,7 @@ In Shaarli's administration page (`Tools` link), go to `Plugin administration`.
26 25
27Here you can enable and disable all plugins available, and configure them. 26Here you can enable and disable all plugins available, and configure them.
28 27
29![administration screenshot](https://camo.githubusercontent.com/5da68e191969007492ca0fbeb25f3b2357b748cc/687474703a2f2f692e696d6775722e636f6d2f766837544643712e706e67)[](.html) 28![administration screenshot](https://camo.githubusercontent.com/5da68e191969007492ca0fbeb25f3b2357b748cc/687474703a2f2f692e696d6775722e636f6d2f766837544643712e706e67)
30 29
31## Plugin order 30## Plugin order
32 31
@@ -41,14 +40,14 @@ This is important in case plugins are depending on each other. Read plugins READ
41Enabled plugin are stored in your `config.php` parameters file, under the `array`: 40Enabled plugin are stored in your `config.php` parameters file, under the `array`:
42 41
43```php 42```php
44$GLOBALS['config'['ENABLED_PLUGINS']]('ENABLED_PLUGINS'].html) 43$GLOBALS['config']['ENABLED_PLUGINS']
45``` 44```
46 45
47You can edit them manually here. 46You can edit them manually here.
48Example: 47Example:
49 48
50```php 49```php
51$GLOBALS['config'['ENABLED_PLUGINS'] = array(]('ENABLED_PLUGINS']-=-array(.html) 50$GLOBALS['config']['ENABLED_PLUGINS'] = array(
52 'qrcode', 51 'qrcode',
53 'archiveorg', 52 'archiveorg',
54 'wallabag', 53 'wallabag',
@@ -64,14 +63,13 @@ Usage of each plugin is documented in it's README file:
64 63
65 * `addlink-toolbar`: Adds the addlink input on the linklist page 64 * `addlink-toolbar`: Adds the addlink input on the linklist page
66 * `archiveorg`: For each link, add an Archive.org icon 65 * `archiveorg`: For each link, add an Archive.org icon
67 * [`markdown`](https://github.com/shaarli/Shaarli/blob/master/plugins/markdown/README.md): Render shaare description with Markdown syntax.[](.html) 66 * [`markdown`](https://github.com/shaarli/Shaarli/blob/master/plugins/markdown/README.md): Render shaare description with Markdown syntax.
68 * [`playvideos`](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md): Add a button in the toolbar allowing to watch all videos.[](.html) 67 * [`playvideos`](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md): Add a button in the toolbar allowing to watch all videos.
69 * `qrcode`: For each link, add a QRCode icon. 68 * `qrcode`: For each link, add a QRCode icon.
70 * `readityourself`: For each link, add a ReadItYourself icon to save the shaared URL 69 * [`wallabag`](https://github.com/shaarli/Shaarli/blob/master/plugins/wallabag/README.md): For each link, add a Wallabag icon to save it in your instance.
71 * [`wallabag`](https://github.com/shaarli/Shaarli/blob/master/plugins/wallabag/README.md): For each link, add a Wallabag icon to save it in your instance.[](.html)
72 70
73 71
74 72
75#### Third party plugins 73#### Third party plugins
76 74
77See [Community & related software](https://github.com/shaarli/Shaarli/wiki/Community-%26-Related-software#third-party-plugins)[](.html) 75See [Community & related software](https://shaarli.readthedocs.io/en/master/Community-&-Related-software/)
diff --git a/doc/md/REST-API.md b/doc/md/REST-API.md
new file mode 100644
index 00000000..68a83c00
--- /dev/null
+++ b/doc/md/REST-API.md
@@ -0,0 +1,153 @@
1## Usage and Prerequisites
2
3See the [REST API documentation](http://shaarli.github.io/api-documentation/)
4for a list of available endpoints and parameters.
5
6Please ensure that your server meets the [requirements](Server-requirements)
7and is properly [configured](Server-configuration):
8
9- URL rewriting is enabled (see specific Apache and Nginx sections)
10- the server's timezone is properly defined
11- the server's clock is synchronized with
12 [NTP](https://en.wikipedia.org/wiki/Network_Time_Protocol)
13
14The host where the API client is invoked should also be synchronized with NTP,
15see [token expiration](#payload).
16
17## Authentication
18
19All requests to Shaarli's API must include a JWT token to verify their authenticity.
20
21This token has to be included as an HTTP header called `Authentication: Bearer <jwt token>`.
22
23JWT resources :
24
25- [jwt.io](https://jwt.io) (including a list of client per language).
26- RFC : https://tools.ietf.org/html/rfc7519
27- https://float-middle.com/json-web-tokens-jwt-vs-sessions/
28- HackerNews thread: https://news.ycombinator.com/item?id=11929267
29
30
31### Shaarli JWT Token
32
33JWT tokens are composed by three parts, separated by a dot `.` and encoded in base64:
34
35```
36[header].[payload].[signature]
37```
38
39#### Header
40
41Shaarli only allow one hash algorithm, so the header will always be the same:
42
43```json
44{
45 "typ": "JWT",
46 "alg": "HS512"
47}
48```
49
50Encoded in base64, it gives:
51
52```
53ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==
54```
55
56#### Payload
57
58**Token expiration**
59
60To avoid infinite token validity, JWT tokens must include their creation date
61in UNIX timestamp format (timezone independent - UTC) under the key `iat` (issued at).
62This token will be valid during **9 minutes**.
63
64```json
65{
66 "iat": 1468663519
67}
68```
69
70See [RFC reference](https://tools.ietf.org/html/rfc7519#section-4.1.6).
71
72
73#### Signature
74
75The signature authenticate the token validity. It contains the base64 of the header and the body, separated by a dot `.`, hashed in SHA512 with the API secret available in Shaarli administration page.
76
77Signature example with PHP:
78
79```php
80$content = base64_encode($header) . '.' . base64_encode($payload);
81$signature = hash_hmac('sha512', $content, $secret);
82```
83
84
85## Clients and examples
86### Android, Java, Kotlin
87
88- [Android client example with Kotlin](https://gitlab.com/snippets/1665808)
89 by [Braincoke](https://github.com/Braincoke)
90
91### Javascript, NodeJS
92
93- [shaarli-client](https://www.npmjs.com/package/shaarli-client)
94 ([source code](https://github.com/laBecasse/shaarli-client))
95 by [laBecasse](https://github.com/laBecasse)
96
97### PHP
98
99This example uses the [PHP cURL](http://php.net/manual/en/book.curl.php) library.
100
101```php
102<?php
103$baseUrl = 'https://shaarli.mydomain.net';
104$secret = 'thats_my_api_secret';
105
106function base64url_encode($data) {
107 return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
108}
109
110function generateToken($secret) {
111 $header = base64url_encode('{
112 "typ": "JWT",
113 "alg": "HS512"
114 }');
115 $payload = base64url_encode('{
116 "iat": '. time() .'
117 }');
118 $signature = base64url_encode(hash_hmac('sha512', $header .'.'. $payload , $secret, true));
119 return $header . '.' . $payload . '.' . $signature;
120}
121
122
123function getInfo($baseUrl, $secret) {
124 $token = generateToken($secret);
125 $endpoint = rtrim($baseUrl, '/') . '/api/v1/info';
126
127 $headers = [
128 'Content-Type: text/plain; charset=UTF-8',
129 'Authorization: Bearer ' . $token,
130 ];
131
132 $ch = curl_init($endpoint);
133 curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
134 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
135 curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
136 curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
137
138 $result = curl_exec($ch);
139 curl_close($ch);
140
141 return $result;
142}
143
144var_dump(getInfo($baseUrl, $secret));
145```
146
147
148### Python
149
150See the reference API client:
151
152- [Documentation](http://python-shaarli-client.readthedocs.io/en/latest/) on ReadTheDocs
153- [python-shaarli-client](https://github.com/shaarli/python-shaarli-client) on Github
diff --git a/doc/RSS-feeds.md b/doc/md/RSS-feeds.md
index 757bed9a..d943218e 100644
--- a/doc/RSS-feeds.md
+++ b/doc/md/RSS-feeds.md
@@ -1,9 +1,9 @@
1#RSS feeds
2### Feeds options 1### Feeds options
3 2
4Feeds are available in ATOM with `?do=atom` and RSS with `do=RSS`. 3Feeds are available in ATOM with `?do=atom` and RSS with `do=RSS`.
5 4
6Options: 5Options:
6
7- You can use `permalinks` in the feed URL to get permalink to Shaares instead of direct link to shaared URL. 7- You can use `permalinks` in the feed URL to get permalink to Shaares instead of direct link to shaared URL.
8 - E.G. `https://my.shaarli.domain/?do=atom&permalinks`. 8 - E.G. `https://my.shaarli.domain/?do=atom&permalinks`.
9- You can use `nb` parameter in the feed URL to specify the number of Shaares you want in a feed (default if not specified: `50`). The keyword `all` is available if you want everything. 9- You can use `nb` parameter in the feed URL to specify the number of Shaares you want in a feed (default if not specified: `50`). The keyword `all` is available if you want everything.
@@ -15,6 +15,7 @@ Options:
15It is possible to filter RSS/ATOM feeds and Picture Wall on a Shaarli to **only display results of a specific search, or for a specific tag**. 15It is possible to filter RSS/ATOM feeds and Picture Wall on a Shaarli to **only display results of a specific search, or for a specific tag**.
16 16
17For example, if you want to subscribe only to links tagged `photography`: 17For example, if you want to subscribe only to links tagged `photography`:
18
18- Go to the desired Shaarli instance. 19- Go to the desired Shaarli instance.
19- Search for the `photography` tag in the _Filter by tag_ box. Links tagged `photography` are displayed. 20- Search for the `photography` tag in the _Filter by tag_ box. Links tagged `photography` are displayed.
20- Click on the `RSS Feed` button. 21- Click on the `RSS Feed` button.
@@ -24,4 +25,4 @@ For example, if you want to subscribe only to links tagged `photography`:
24 - `https://my.shaarli.domain/?do=rss&searchtags=nature` 25 - `https://my.shaarli.domain/?do=rss&searchtags=nature`
25 - `https://my.shaarli.domain/links/?do=picwall&searchterm=poney` 26 - `https://my.shaarli.domain/links/?do=picwall&searchterm=poney`
26 27
27![(images/rss-filter-1.png) !]((images/rss-filter-1.png)-!.html)(images/rss-filter-2.png) 28![](images/rss-filter-1.png) ![](images/rss-filter-2.png)
diff --git a/doc/Release-Shaarli.md b/doc/md/Release-Shaarli.md
index 556a96ee..e22eabc9 100644
--- a/doc/Release-Shaarli.md
+++ b/doc/md/Release-Shaarli.md
@@ -1,9 +1,9 @@
1#Release Shaarli 1See [Git - Maintaining a project - Tagging your
2See [Git - Maintaining a project - Tagging your [](.html)
3releases](http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Tagging-Your-Releases). 2releases](http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Tagging-Your-Releases).
4 3
5## Prerequisites 4## Prerequisites
6This guide assumes that you have: 5This guide assumes that you have:
6
7- a GPG key matching your GitHub authentication credentials 7- a GPG key matching your GitHub authentication credentials
8 - i.e., the email address identified by the GPG key is the same as the one in your `~/.gitconfig` 8 - i.e., the email address identified by the GPG key is the same as the one in your `~/.gitconfig`
9- a GitHub fork of Shaarli 9- a GitHub fork of Shaarli
@@ -13,18 +13,20 @@ This guide assumes that you have:
13- maintainer permissions on the main Shaarli repository, to: 13- maintainer permissions on the main Shaarli repository, to:
14 - push the signed tag 14 - push the signed tag
15 - create a new release 15 - create a new release
16- [Composer](https://getcomposer.org/) and [Pandoc](http://pandoc.org/) need to be installed[](.html) 16- [Composer](https://getcomposer.org/) needs to be installed
17- The [venv](https://docs.python.org/3/library/venv.html) Python 3 module needs to be installed for HTML documentation generation.
17 18
18## GitHub release draft and `CHANGELOG.md` 19## GitHub release draft and `CHANGELOG.md`
19See http://keepachangelog.com/en/0.3.0/ for changelog formatting. 20See http://keepachangelog.com/en/0.3.0/ for changelog formatting.
20 21
21### GitHub release draft 22### GitHub release draft
22GitHub allows drafting the release note for the upcoming release, from the [Releases](https://github.com/shaarli/Shaarli/releases) page. This way, the release note can be drafted while contributions are merged to `master`.[](.html) 23GitHub allows drafting the release note for the upcoming release, from the [Releases](https://github.com/shaarli/Shaarli/releases) page. This way, the release note can be drafted while contributions are merged to `master`.
23 24
24### `CHANGELOG.md` 25### `CHANGELOG.md`
25This file should contain the same information as the release note draft for the upcoming version. 26This file should contain the same information as the release note draft for the upcoming version.
26 27
27Update it to: 28Update it to:
29
28- add new entries (additions, fixes, etc.) 30- add new entries (additions, fixes, etc.)
29- mark the current version as released by setting its date and link 31- mark the current version as released by setting its date and link
30- add a new section for the future unreleased version 32- add a new section for the future unreleased version
@@ -34,47 +36,51 @@ $ cd /path/to/shaarli
34 36
35$ nano CHANGELOG.md 37$ nano CHANGELOG.md
36 38
37[...][](.html) 39[...]
38## vA.B.C - UNRELEASED 40## vA.B.C - UNRELEASED
39TBA 41TBA
40 42
41## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD[](.html) 43## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD
42[...][](.html) 44[...]
43``` 45```
44 46
45 47
46## Increment the version code, create and push a signed tag 48## Increment the version code, update docs, create and push a signed tag
47### Bump Shaarli's version 49### Update the list of Git contributors
48```bash 50```bash
49$ cd /path/to/shaarli 51$ make authors
50 52$ git commit -s -m "Update AUTHORS"
51# create a new branch 53```
52$ git fetch upstream
53$ git checkout upstream/master -b v0.5.0
54 54
55# bump the version number 55### Create and merge a Pull Request
56$ vim index.php shaarli_version.php 56This one is pretty straightforward ;-)
57 57
58# rebuild the documentation from the wiki 58### Bump Shaarli version to v0.x branch
59$ make htmldoc
60 59
61# commit the changes 60```bash
62$ git add index.php shaarli_version.php doc 61$ git checkout master
63$ git commit -s -m "Bump version to v0.5.0" 62$ git fetch upstream
63$ git pull upstream master
64 64
65# push the commit on your GitHub fork 65# IF the branch doesn't exists
66$ git push origin v0.5.0 66$ git checkout -b v0.5
67# OR if the branch already exists
68$ git checkout v0.5
69$ git rebase upstream/master
70
71# Bump shaarli version from dev to 0.5.0, **without the `v`**
72$ vim shaarli_version.php
73$ git add shaarli_version
74$ git commit -s -m "Bump Shaarli version to v0.5.0"
75$ git push upstream v0.5
67``` 76```
68 77
69### Create and merge a Pull Request
70This one is pretty straightforward ;-)
71
72### Create and push a signed tag 78### Create and push a signed tag
73```bash 79```bash
74# update your local copy 80# update your local copy
75$ git checkout master 81$ git checkout v0.5
76$ git fetch upstream 82$ git fetch upstream
77$ git pull upstream master 83$ git pull upstream v0.5
78 84
79# create a signed tag 85# create a signed tag
80$ git tag -s -m "Release v0.5.0" v0.5.0 86$ git tag -s -m "Release v0.5.0" v0.5.0
@@ -84,7 +90,7 @@ $ git push --tags upstream
84``` 90```
85 91
86### Verify a signed tag 92### Verify a signed tag
87[`v0.5.0`](https://github.com/shaarli/Shaarli/releases/tag/v0.5.0) is the first GPG-signed tag pushed on the Community Shaarli.[](.html) 93[`v0.5.0`](https://github.com/shaarli/Shaarli/releases/tag/v0.5.0) is the first GPG-signed tag pushed on the Community Shaarli.
88 94
89Let's have a look at its signature! 95Let's have a look at its signature!
90 96
@@ -99,12 +105,16 @@ f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0
99# verify the tag signature information 105# verify the tag signature information
100$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1 106$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
101gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F 107gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
102gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate][](.html) 108gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate]
103``` 109```
104 110
105## Publish the GitHub release 111## Publish the GitHub release
112### Update release badges
113Update `README.md` so version badges display and point to the newly released Shaarli version(s), in the `master` branch.
114
106### Create a GitHub release from a Git tag 115### Create a GitHub release from a Git tag
107From the previously drafted release: 116From the previously drafted release:
117
108- edit the release notes (if needed) 118- edit the release notes (if needed)
109- specify the appropriate Git tag 119- specify the appropriate Git tag
110- publish the release 120- publish the release
@@ -112,19 +122,40 @@ From the previously drafted release:
112 122
113### Generate and upload all-in-one release archives 123### Generate and upload all-in-one release archives
114Users with a shared hosting may have: 124Users with a shared hosting may have:
125
115- no SSH access 126- no SSH access
116- no possibility to install PHP packages or server extensions 127- no possibility to install PHP packages or server extensions
117- no possibility to run scripts 128- no possibility to run scripts
118 129
119To ease Shaarli installations, it is possible to generate and upload additional release archives, 130To ease Shaarli installations, it is possible to generate and upload additional release archives,
120that will contain Shaarli code plus all required third-party libraries: 131that will contain Shaarli code plus all required third-party libraries.
132
133**From the `v0.5` branch:**
121 134
122```bash 135```bash
123$ make release_archive 136$ make release_archive
124``` 137```
125 138
126This will create the following archives: 139This will create the following archives:
140
127- `shaarli-vX.Y.Z-full.tar` 141- `shaarli-vX.Y.Z-full.tar`
128- `shaarli-vX.Y.Z-full.zip` 142- `shaarli-vX.Y.Z-full.zip`
129 143
130The archives need to be manually uploaded on the previously created GitHub release. 144The archives need to be manually uploaded on the previously created GitHub release.
145
146### Update `stable` and `latest` branches
147
148```
149$ git checkout latest
150# latest release
151$ git merge v0.5.0
152# fix eventual conflicts
153$ make test
154$ git push upstream latest
155$ git checkout stable
156# latest previous major
157$ git merge v0.4.5
158# fix eventual conflicts
159$ make test
160$ git push upstream stable
161```
diff --git a/doc/md/Security.md b/doc/md/Security.md
new file mode 100644
index 00000000..65db4225
--- /dev/null
+++ b/doc/md/Security.md
@@ -0,0 +1,25 @@
1## Client browser
2- Shaarli relies on `HTTP_REFERER` for some functions (like redirects and clicking on tags). If you have disabled or masqueraded `HTTP_REFERER` in your browser, some features of Shaarli may not work
3
4## Server and sessions
5- Directories are protected using `.htaccess` files
6- Forms are protected against XSRF (Cross-site requests forgery):
7 - Forms which act on data (save,delete…) contain a token generated by the server.
8 - Any posted form which does not contain a valid token is rejected.
9 - Any token can only be used once.
10 - Tokens are attached to the session and cannot be reused in another session.
11- Sessions automatically expire after 60 minutes.
12- Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
13
14## Shaarli datastore and configuration
15- The password is salted, hashed and stored in the data subdirectory, in a PHP file, and protected by htaccess. Even if the webserver does not support htaccess, the hash is not readable by URL. Even if the .php file is stolen, the password cannot deduced from the hash. The salt prevents rainbow-tables attacks.
16- Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a `.php` file.
17- Even if the server does not support `.htaccess` files, the data file will still not be readable by URL.
18- The database looks like this:
19
20```php
21<?php /* zP1ZjxxJtiYIvvevEPJ2lDOaLrZv7o...
22...ka7gaco/Z+TFXM2i7BlfMf8qxpaSSYfKlvqv/x8= */ ?>
23```
24
25- Small hashes are used to make a link to an entry in Shaarli. They are unique. In fact, the date of the items (eg. `20110923_150523`) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only `A-Z a-z 0-9 - _` and `@`.
diff --git a/doc/Server-configuration.md b/doc/md/Server-configuration.md
index df10feb2..25dd49fe 100644
--- a/doc/Server-configuration.md
+++ b/doc/md/Server-configuration.md
@@ -1,30 +1,32 @@
1#Server configuration
2*Example virtual host configurations for popular web servers* 1*Example virtual host configurations for popular web servers*
3 2
4- [Apache](#apache)[](.html) 3- [Apache](#apache)
5- [Nginx](#nginx)[](.html) 4- [Nginx](#nginx)
6 5
7## Prerequisites 6## Prerequisites
8### Shaarli 7### Shaarli
9* Shaarli is installed in a directory readable/writeable by the user 8- Shaarli is installed in a directory readable/writeable by the user
10* the correct read/write permissions have been granted to the web server _user and/or group_ 9- the correct read/write permissions have been granted to the web server _user and/or group_
11* for HTTPS / SSL: 10- for HTTPS / SSL:
12 * a key pair (public, private) and a certificate have been generated 11 - a key pair (public, private) and a certificate have been generated
13 * the appropriate server SSL extension is installed and active 12 - the appropriate server SSL extension is installed and active
14 13
15### HTTPS, TLS and self-signed certificates 14### HTTPS, TLS and self-signed certificates
16Related guides: 15Related guides:
17* [How to Create Self-Signed SSL Certificates with OpenSSL](http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php)[](.html) 16
18* [How do I create my own Certificate Authority?](https://workaround.org/certificate-authority)[](.html) 17- [How to Create Self-Signed SSL Certificates with OpenSSL](http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php)
19* Generate a self-signed certificate (will trigger browser warnings) with apache2: `make-ssl-cert generate-default-snakeoil --force-overwrite` will create `/etc/ssl/certs/ssl-cert-snakeoil.pem` and `/etc/ssl/private/ssl-cert-snakeoil.key` 18- [How do I create my own Certificate Authority?](https://workaround.org/certificate-authority)
19- Generate a self-signed certificate (will trigger browser warnings) with apache2:
20 `make-ssl-cert generate-default-snakeoil --force-overwrite` will create `/etc/ssl/certs/ssl-cert-snakeoil.pem` and `/etc/ssl/private/ssl-cert-snakeoil.key`
20 21
21### Proxies 22### Proxies
22If Shaarli is served behind a proxy (i.e. there is a proxy server between clients and the web server hosting Shaarli), please refer to the proxy server documentation for proper configuration. In particular, you have to ensure that the following server variables are properly set: 23If Shaarli is served behind a proxy (i.e. there is a proxy server between clients and the web server hosting Shaarli), please refer to the proxy server documentation for proper configuration. In particular, you have to ensure that the following server variables are properly set:
23- `X-Forwarded-Proto`;
24- `X-Forwarded-Host`;
25- `X-Forwarded-For`.
26 24
27See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&q=label%3Aproxy+) issues.[](.html) 25- `X-Forwarded-Proto`
26- `X-Forwarded-Host`
27- `X-Forwarded-For`
28
29See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&q=label%3Aproxy+) issues.
28 30
29## Apache 31## Apache
30### Minimal 32### Minimal
@@ -38,8 +40,9 @@ See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%9
38This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors. 40This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors.
39 41
40See: 42See:
41* [Apache/PHP - error log per VirtualHost](http://stackoverflow.com/q/176) (StackOverflow)[](.html) 43
42* [PHP: php_value vs php_admin_value and the use of php_flag explained](https://ma.ttias.be/php-php_value-vs-php_admin_value-and-the-use-of-php_flag-explained/)[](.html) 44- [Apache/PHP - error log per VirtualHost](http://stackoverflow.com/q/176) (StackOverflow)
45- [PHP: php_value vs php_admin_value and the use of php_flag explained](https://ma.ttias.be/php-php_value-vs-php_admin_value-and-the-use-of-php_flag-explained/)
43 46
44```apache 47```apache
45<VirtualHost *:80> 48<VirtualHost *:80>
@@ -70,7 +73,7 @@ See:
70``` 73```
71 74
72### Paranoid - Redirect HTTP (:80) to HTTPS (:443) 75### Paranoid - Redirect HTTP (:80) to HTTPS (:443)
73See [Server-side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache) (Mozilla).[](.html) 76See [Server-side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache) (Mozilla).
74 77
75```apache 78```apache
76<VirtualHost *:443> 79<VirtualHost *:443>
@@ -106,43 +109,52 @@ See [Server-side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache)
106 109
107Shaarli use `.htaccess` Apache files to deny access to files that shouldn't be directly accessed (datastore, config, etc.). You need the directive `AllowOverride All` in your virtual host configuration for them to work. 110Shaarli use `.htaccess` Apache files to deny access to files that shouldn't be directly accessed (datastore, config, etc.). You need the directive `AllowOverride All` in your virtual host configuration for them to work.
108 111
109**Warning**: If you use Apache 2.2 or lower, you need [mod_version](https://httpd.apache.org/docs/current/mod/mod_version.html) to be installed and enabled.[](.html) 112**Warning**: If you use Apache 2.2 or lower, you need [mod_version](https://httpd.apache.org/docs/current/mod/mod_version.html) to be installed and enabled.
113
114Apache module `mod_rewrite` **must** be enabled to use the REST API. URL rewriting rules for the Slim microframework are stated in the root `.htaccess` file.
110 115
111## LightHttpd 116## LightHttpd
112 117
113## Nginx 118## Nginx
114### Foreword 119### Foreword
115Nginx does not natively interpret PHP scripts; to this effect, we will run a [FastCGI](https://en.wikipedia.org/wiki/FastCGI) service, to which Nginx's FastCGI module will proxy all requests to PHP resources.[](.html) 120Nginx does not natively interpret PHP scripts; to this effect, we will run a [FastCGI](https://en.wikipedia.org/wiki/FastCGI) service, to which Nginx's FastCGI module will proxy all requests to PHP resources.
116 121
117Required packages: 122Required packages:
118- [nginx](http://nginx.org)[](.html) 123
119- [php-fpm](http://php-fpm.org) - PHP FastCGI Process Manager[](.html) 124- [nginx](http://nginx.org)
125- [php-fpm](http://php-fpm.org) - PHP FastCGI Process Manager
120 126
121Official documentation: 127Official documentation:
122- [Beginner's guide](http://nginx.org/en/docs/beginners_guide.html)[](.html) 128
123- [ngx_http_fastcgi_module](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html)[](.html) 129- [Beginner's guide](http://nginx.org/en/docs/beginners_guide.html)
124- [Pitfalls](http://wiki.nginx.org/Pitfalls)[](.html) 130- [ngx_http_fastcgi_module](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html)
131- [Pitfalls](http://wiki.nginx.org/Pitfalls)
125 132
126Community resources: 133Community resources:
127- [Server-side TLS (Nginx)](https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx) (Mozilla)[](.html) 134
128- [PHP configuration examples](http://kbeezie.com/nginx-configuration-examples/) (Karl Blessing)[](.html) 135- [Server-side TLS (Nginx)](https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx) (Mozilla)
136- [PHP configuration examples](http://kbeezie.com/nginx-configuration-examples/) (Karl Blessing)
129 137
130### Common setup 138### Common setup
131Once Nginx and PHP-FPM are installed, we need to ensure: 139Once Nginx and PHP-FPM are installed, we need to ensure:
140
132- Nginx and PHP-FPM are running using the _same user and group_ 141- Nginx and PHP-FPM are running using the _same user and group_
133- both these user and group have 142- both these user and group have
134 - `read` permissions for Shaarli resources 143 - `read` permissions for Shaarli resources
135 - `execute` permissions for Shaarli directories _AND_ their parent directories 144 - `execute` permissions for Shaarli directories _AND_ their parent directories
136 145
137On a production server: 146On a production server:
147
138- `user:group` will likely be `http:http`, `www:www` or `www-data:www-data` 148- `user:group` will likely be `http:http`, `www:www` or `www-data:www-data`
139- files will be located under `/var/www`, `/var/http` or `/usr/share/nginx` 149- files will be located under `/var/www`, `/var/http` or `/usr/share/nginx`
140 150
141On a development server: 151On a development server:
152
142- files may be located in a user's home directory 153- files may be located in a user's home directory
143- in this case, make sure both Nginx and PHP-FPM are running as the local user/group! 154- in this case, make sure both Nginx and PHP-FPM are running as the local user/group!
144 155
145For all following configuration examples, this user/group pair will be used: 156For all following configuration examples, this user/group pair will be used:
157
146- `user:group = john:users`, 158- `user:group = john:users`,
147 159
148which corresponds to the following service configuration: 160which corresponds to the following service configuration:
@@ -152,7 +164,7 @@ which corresponds to the following service configuration:
152user = john 164user = john
153group = users 165group = users
154 166
155[...][](.html) 167[...]
156listen.owner = john 168listen.owner = john
157listen.group = users 169listen.group = users
158``` 170```
@@ -162,7 +174,7 @@ listen.group = users
162user john users; 174user john users;
163 175
164http { 176http {
165 [...][](.html) 177 [...]
166} 178}
167``` 179```
168 180
@@ -175,20 +187,20 @@ To increase upload size, you will need to modify both nginx and PHP configuratio
175# /etc/nginx/nginx.conf 187# /etc/nginx/nginx.conf
176 188
177http { 189http {
178 [...][](.html) 190 [...]
179 191
180 client_max_body_size 10m; 192 client_max_body_size 10m;
181 193
182 [...][](.html) 194 [...]
183} 195}
184``` 196```
185 197
186```ini 198```ini
187# /etc/php5/fpm/php.ini 199# /etc/php5/fpm/php.ini
188 200
189[...][](.html) 201[...]
190post_max_size = 10M 202post_max_size = 10M
191[...][](.html) 203[...]
192upload_max_filesize = 10M 204upload_max_filesize = 10M
193``` 205```
194 206
@@ -218,11 +230,14 @@ http {
218 error_log /var/log/nginx/error.log; 230 error_log /var/log/nginx/error.log;
219 231
220 location /shaarli/ { 232 location /shaarli/ {
233 try_files $uri /shaarli/index.php$is_args$args;
221 access_log /var/log/nginx/shaarli.access.log; 234 access_log /var/log/nginx/shaarli.access.log;
222 error_log /var/log/nginx/shaarli.error.log; 235 error_log /var/log/nginx/shaarli.error.log;
223 } 236 }
224 237
225 location ~ (index)\.php$ { 238 location ~ (index)\.php$ {
239 try_files $uri =404;
240 fastcgi_split_path_info ^(.+\.php)(/.+)$;
226 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; 241 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
227 fastcgi_index index.php; 242 fastcgi_index index.php;
228 include fastcgi.conf; 243 include fastcgi.conf;
@@ -233,6 +248,7 @@ http {
233 248
234### Modular 249### Modular
235The previous setup is sufficient for development purposes, but has several major caveats: 250The previous setup is sufficient for development purposes, but has several major caveats:
251
236- every content that does not match the PHP rule will be sent to client browsers: 252- every content that does not match the PHP rule will be sent to client browsers:
237 - dotfiles - in our case, `.htaccess` 253 - dotfiles - in our case, `.htaccess`
238 - temporary files, e.g. Vim or Emacs files: `index.php~` 254 - temporary files, e.g. Vim or Emacs files: `index.php~`
@@ -261,6 +277,10 @@ location ~ ~$ {
261```nginx 277```nginx
262# /etc/nginx/php.conf 278# /etc/nginx/php.conf
263location ~ (index)\.php$ { 279location ~ (index)\.php$ {
280 # Slim - split URL path into (script_filename, path_info)
281 try_files $uri =404;
282 fastcgi_split_path_info ^(.+\.php)(/.+)$;
283
264 # filter and proxy PHP requests to PHP-FPM 284 # filter and proxy PHP requests to PHP-FPM
265 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; 285 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
266 fastcgi_index index.php; 286 fastcgi_index index.php;
@@ -284,10 +304,10 @@ location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
284 304
285```nginx 305```nginx
286# /etc/nginx/nginx.conf 306# /etc/nginx/nginx.conf
287[...][](.html) 307[...]
288 308
289http { 309http {
290 [...][](.html) 310 [...]
291 311
292 root /home/john/web; 312 root /home/john/web;
293 access_log /var/log/nginx/access.log; 313 access_log /var/log/nginx/access.log;
@@ -299,6 +319,9 @@ http {
299 server_name my.first.domain.org; 319 server_name my.first.domain.org;
300 320
301 location /shaarli/ { 321 location /shaarli/ {
322 # Slim - rewrite URLs
323 try_files $uri /shaarli/index.php$is_args$args;
324
302 access_log /var/log/nginx/shaarli.access.log; 325 access_log /var/log/nginx/shaarli.access.log;
303 error_log /var/log/nginx/shaarli.error.log; 326 error_log /var/log/nginx/shaarli.error.log;
304 } 327 }
@@ -331,14 +354,16 @@ http {
331``` 354```
332 355
333### Redirect HTTP to HTTPS 356### Redirect HTTP to HTTPS
334Assuming you have generated a (self-signed) key and certificate, and they are located under `/home/john/ssl/localhost.{key,crt}`, it is pretty straightforward to set an HTTP (:80) to HTTPS (:443) redirection to force SSL/TLS usage. 357Assuming you have generated a (self-signed) key and certificate, and they are
358located under `/home/john/ssl/localhost.{key,crt}`, it is pretty straightforward
359to set an HTTP (:80) to HTTPS (:443) redirection to force SSL/TLS usage.
335 360
336```nginx 361```nginx
337# /etc/nginx/nginx.conf 362# /etc/nginx/nginx.conf
338[...][](.html) 363[...]
339 364
340http { 365http {
341 [...][](.html) 366 [...]
342 367
343 index index.html index.php; 368 index index.html index.php;
344 369
@@ -361,6 +386,9 @@ http {
361 ssl_certificate_key /home/john/ssl/localhost.key; 386 ssl_certificate_key /home/john/ssl/localhost.key;
362 387
363 location /shaarli/ { 388 location /shaarli/ {
389 # Slim - rewrite URLs
390 try_files $uri /index.php$is_args$args;
391
364 access_log /var/log/nginx/shaarli.access.log; 392 access_log /var/log/nginx/shaarli.access.log;
365 error_log /var/log/nginx/shaarli.error.log; 393 error_log /var/log/nginx/shaarli.error.log;
366 } 394 }
diff --git a/doc/Server-requirements.md b/doc/md/Server-requirements.md
index 4962193e..2dc442df 100644
--- a/doc/Server-requirements.md
+++ b/doc/md/Server-requirements.md
@@ -1,37 +1,42 @@
1#Server requirements
2## PHP 1## PHP
2
3### Release information 3### Release information
4- [PHP: Supported versions](http://php.net/supported-versions.php)[](.html) 4- [PHP: Supported versions](http://php.net/supported-versions.php)
5- [PHP: Unsupported versions](http://php.net/eol.php) _(EOL - End Of Life)_[](.html) 5- [PHP: Unsupported versions](http://php.net/eol.php) _(EOL - End Of Life)_
6- [PHP 7 Changelog](http://php.net/ChangeLog-7.php)[](.html) 6- [PHP 7 Changelog](http://php.net/ChangeLog-7.php)
7- [PHP 5 Changelog](http://php.net/ChangeLog-5.php)[](.html) 7- [PHP 5 Changelog](http://php.net/ChangeLog-5.php)
8- [PHP: Bugs](https://bugs.php.net/)[](.html) 8- [PHP: Bugs](https://bugs.php.net/)
9 9
10### Supported versions 10### Supported versions
11Version | Status | Shaarli compatibility 11Version | Status | Shaarli compatibility
12:---:|:---:|:---: 12:---:|:---:|:---:
137.0 | Supported | :white_check_mark: 137.1 | Supported (v0.9.x) | Yes
145.6 | Supported | :white_check_mark: 147.0 | Supported | Yes
155.5 | EOL: 2016-07-10 | :white_check_mark: 155.6 | Supported | Yes
165.4 | EOL: 2015-09-14 | :white_check_mark: (up to Shaarli 0.8.x) 165.5 | EOL: 2016-07-10 | Yes
175.3 | EOL: 2014-08-14 | :white_check_mark: (up to Shaarli 0.8.x) 175.4 | EOL: 2015-09-14 | Yes (up to Shaarli 0.8.x)
185.3 | EOL: 2014-08-14 | Yes (up to Shaarli 0.8.x)
18 19
19See also: 20See also:
20- [Travis configuration](https://github.com/shaarli/Shaarli/blob/master/.travis.yml)[](.html) 21
22- [Travis configuration](https://github.com/shaarli/Shaarli/blob/master/.travis.yml)
21 23
22### Dependency management 24### Dependency management
23Starting with Shaarli `v0.8.x`, [Composer](https://getcomposer.org/) is used to resolve,[](.html) 25Starting with Shaarli `v0.8.x`, [Composer](https://getcomposer.org/) is used to resolve,
24download and install third-party PHP dependencies. 26download and install third-party PHP dependencies.
25 27
26Library | Required? | Usage 28Library | Required? | Usage
27---|:---:|--- 29---|:---:|---
28[`shaarli/netscape-bookmark-parser`](https://packagist.org/packages/shaarli/netscape-bookmark-parser) | All | Import bookmarks from Netscape files[](.html) 30[`shaarli/netscape-bookmark-parser`](https://packagist.org/packages/shaarli/netscape-bookmark-parser) | All | Import bookmarks from Netscape files
31[`erusev/parsedown`](https://packagist.org/packages/erusev/parsedown) | All | Parse MarkDown syntax for the MarkDown plugin
32[`slim/slim`](https://packagist.org/packages/slim/slim) | All | Handle routes and middleware for the REST API
29 33
30### Extensions 34### Extensions
31Extension | Required? | Usage 35Extension | Required? | Usage
32---|:---:|--- 36---|:---:|---
33[`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS[](.html) 37[`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS
34[`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows | multibyte (Unicode) string support[](.html) 38[`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows, some hosting providers | multibyte (Unicode) string support
35[`php-gd`](http://php.net/manual/en/book.image.php) | optional | thumbnail resizing[](.html) 39[`php-gd`](http://php.net/manual/en/book.image.php) | optional | thumbnail resizing
36[`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->è->f`)[](.html) 40[`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->è->f`)
37[`php-curl`](http://php.net/manual/en/book.curl.php) | optional | using cURL for fetching webpages and thumbnails in a more robust way[](.html) 41[`php-curl`](http://php.net/manual/en/book.curl.php) | optional | using cURL for fetching webpages and thumbnails in a more robust way
42[`php-gettext`](http://php.net/manual/en/book.gettext.php) | optional | Use the translation system in gettext mode (faster)
diff --git a/doc/Server-security.md b/doc/md/Server-security.md
index 50549a21..700084e2 100644
--- a/doc/Server-security.md
+++ b/doc/md/Server-security.md
@@ -1,6 +1,6 @@
1#Server security
2## php.ini 1## php.ini
3PHP settings are defined in: 2PHP settings are defined in:
3
4- a main configuration file, usually found under `/etc/php5/php.ini`; some distributions provide different configuration environments, e.g. 4- a main configuration file, usually found under `/etc/php5/php.ini`; some distributions provide different configuration environments, e.g.
5 - `/etc/php5/php.ini` - used when running console scripts 5 - `/etc/php5/php.ini` - used when running console scripts
6 - `/etc/php5/apache2/php.ini` - used when a client requests PHP resources from Apache 6 - `/etc/php5/apache2/php.ini` - used when a client requests PHP resources from Apache
@@ -31,8 +31,9 @@ Additional .ini files parsed: /etc/php/conf.d/xdebug.ini
31 31
32## fail2ban 32## fail2ban
33`fail2ban` is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses `iptables` profiles to block brute-force attempts: 33`fail2ban` is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses `iptables` profiles to block brute-force attempts:
34- [Official website](http://www.fail2ban.org/wiki/index.php/Main_Page)[](.html) 34
35- [Source code](https://github.com/fail2ban/fail2ban)[](.html) 35- [Official website](http://www.fail2ban.org/wiki/index.php/Main_Page)
36- [Source code](https://github.com/fail2ban/fail2ban)
36 37
37### Read Shaarli logs to ban IPs 38### Read Shaarli logs to ban IPs
38Example configuration: 39Example configuration:
@@ -41,7 +42,7 @@ Example configuration:
41 42
42`/etc/fail2ban/jail.local` 43`/etc/fail2ban/jail.local`
43```ini 44```ini
44[shaarli-auth][](.html) 45[shaarli-auth]
45enabled = true 46enabled = true
46port = https,http 47port = https,http
47filter = shaarli-auth 48filter = shaarli-auth
@@ -52,9 +53,9 @@ bantime = -1
52 53
53`/etc/fail2ban/filter.d/shaarli-auth.conf` 54`/etc/fail2ban/filter.d/shaarli-auth.conf`
54```ini 55```ini
55[INCLUDES][](.html) 56[INCLUDES]
56before = common.conf 57before = common.conf
57[Definition][](.html) 58[Definition]
58failregex = \s-\s<HOST>\s-\sLogin failed for user.*$ 59failregex = \s-\s<HOST>\s-\sLogin failed for user.*$
59ignoreregex = 60ignoreregex =
60``` 61```
@@ -69,6 +70,7 @@ Disallow: /
69``` 70```
70 71
71See: 72See:
72- http://www.robotstxt.org/ 73
74- http://www.robotstxt.org
73- http://www.robotstxt.org/robotstxt.html 75- http://www.robotstxt.org/robotstxt.html
74- http://www.robotstxt.org/meta.html 76- http://www.robotstxt.org/meta.html
diff --git a/doc/md/Shaarli-configuration.md b/doc/md/Shaarli-configuration.md
new file mode 100644
index 00000000..920c7e27
--- /dev/null
+++ b/doc/md/Shaarli-configuration.md
@@ -0,0 +1,244 @@
1## Foreword
2
3**Do not edit configuration options in index.php! Your changes would be lost.**
4
5Once your Shaarli instance is installed, the file `data/config.json.php` is generated:
6* it contains all settings in JSON format, and can be edited to customize values
7* it defines which [plugins](Plugin-System) are enabled[](.html)
8* its values override those defined in `index.php`
9* it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
10
11## File and directory permissions
12
13The server process running Shaarli must have:
14
15- `read` access to the following resources:
16 - PHP scripts: `index.php`, `application/*.php`, `plugins/*.php`
17 - 3rd party PHP and Javascript libraries: `inc/*.php`, `inc/*.js`
18 - static assets:
19 - CSS stylesheets: `inc/*.css`
20 - `images/*`
21 - RainTPL templates: `tpl/*.html`
22- `read`, `write` and `execution` access to the following directories:
23 - `cache` - thumbnail cache
24 - `data` - link data store, configuration options
25 - `pagecache` - Atom/RSS feed cache
26 - `tmp` - RainTPL page cache
27
28On a Linux distribution:
29
30- the web server user will likely be `www` or `http` (for Apache2)
31- it will be a member of a group of the same name: `www:www`, `http:http`
32- to give it access to Shaarli, either:
33 - unzip Shaarli in the default web server location (usually `/var/www/`) and set the web server user as the owner
34 - put users in the same group as the web server, and set the appropriate access rights
35- if you have a domain / subdomain to serve Shaarli, [configure the server](Server-configuration) accordingly[](.html)
36
37## Configuration
38
39In `data/config.json.php`.
40
41See also [Plugin System](Plugin-System.html).
42
43### Credentials
44
45_These settings should not be edited_
46
47- **login**: Login username.
48- **hash**: Generated password hash.
49- **salt**: Password salt.
50
51### General
52
53- **title**: Shaarli's instance title.
54- **header_link**: Link to the homepage.
55- **links_per_page**: Number of shaares displayed per page.
56- **timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php).
57- **enabled_plugins**: List of enabled plugins.
58- **default_note_title**: Default title of a new note.
59
60### Security
61
62- **session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
63 It might be useful if your IP adress often changes.
64- **ban_after**: Failed login attempts before being IP banned.
65- **ban_duration**: IP ban duration in seconds.
66- **open_shaarli**: Anyone can add a new link while logged out if enabled.
67- **trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
68- **allowed_protocols**: List of allowed protocols in shaare URLs or markdown-rendered descriptions. Useful if you want to store `javascript:` links (bookmarklets) in Shaarli (default: `["ftp", "ftps", "magnet"]`).
69
70### Resources
71
72- **data_dir**: Data directory.
73- **datastore**: Shaarli's links database file path.
74- **history**: Shaarli's operation history file path.
75- **updates**: File path for the ran updates file.
76- **log**: Log file path.
77- **update_check**: Last update check file path.
78- **raintpl_tpl**: Templates directory.
79- **raintpl_tmp**: Template engine cache directory.
80- **thumbnails_cache**: Thumbnails cache directory.
81- **page_cache**: Shaarli's internal cache directory.
82- **ban_file**: Banned IP file path.
83
84### Translation
85
86- **language**: translation language (also see [Translations](Translations))
87 - **auto** (default): The translation language is chosen from the browser locale.
88 It means that the language can be different for 2 different visitors depending on their locale.
89 - **en**: Use the English translation.
90 - **fr**: Use the French translation.
91- **mode**:
92 - **auto** or **php** (default): Use the PHP implementation of gettext (slower)
93 - **gettext**: Use PHP builtin gettext extension
94 (faster, but requires `php-gettext` to be installed and to reload the web server on update)
95- **extension**: Translation extensions for custom themes or plugins.
96Must be an associative array: `translation domain => translation path`.
97
98### Updates
99
100- **check_updates**: Enable or disable update check to the git repository.
101- **check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
102- **check_updates_interval**: Look for new version every N seconds (default: every day).
103
104### Privacy
105
106- **default_private_links**: Check the private checkbox by default for every new link.
107- **hide_public_links**: All links are hidden while logged out.
108- **force_login**: if **hide_public_links** and this are set to `true`, all anonymous users are redirected to the login page.
109- **hide_timestamps**: Timestamps are hidden.
110- **remember_user_default**: Default state of the login page's *remember me* checkbox
111 - `true`: checked by default, `false`: unchecked by default
112
113### Feed
114
115- **rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
116- **show_atom**: Display ATOM feed button.
117
118### Thumbnail
119
120- **enable_thumbnails**: Enable or disable thumbnail display.
121- **enable_localcache**: Enable or disable local cache.
122
123### Redirector
124
125- **url**: Redirector URL, such as `anonym.to`.
126- **encode_url**: Enable this if the redirector needs encoded URL to work properly.
127
128## Configuration file example
129
130```json
131<?php /*
132{
133 "credentials": {
134 "login": "<login>",
135 "hash": "<password hash>",
136 "salt": "<password salt>"
137 },
138 "security": {
139 "ban_after": 4,
140 "session_protection_disabled": false,
141 "ban_duration": 1800,
142 "trusted_proxies": [
143 "1.2.3.4",
144 "5.6.7.8"
145 ],
146 "allowed_protocols": [
147 "ftp",
148 "ftps",
149 "magnet"
150 ]
151 },
152 "resources": {
153 "data_dir": "data",
154 "config": "data\/config.php",
155 "datastore": "data\/datastore.php",
156 "ban_file": "data\/ipbans.php",
157 "updates": "data\/updates.txt",
158 "log": "data\/log.txt",
159 "update_check": "data\/lastupdatecheck.txt",
160 "raintpl_tmp": "tmp\/",
161 "raintpl_tpl": "tpl\/",
162 "thumbnails_cache": "cache",
163 "page_cache": "pagecache"
164 },
165 "general": {
166 "check_updates": true,
167 "rss_permalinks": true,
168 "links_per_page": 20,
169 "default_private_links": true,
170 "enable_thumbnails": true,
171 "enable_localcache": true,
172 "check_updates_branch": "stable",
173 "check_updates_interval": 86400,
174 "enabled_plugins": [
175 "markdown",
176 "wallabag",
177 "archiveorg"
178 ],
179 "timezone": "Europe\/Paris",
180 "title": "My Shaarli",
181 "header_link": "?"
182 },
183 "extras": {
184 "show_atom": false,
185 "hide_public_links": false,
186 "hide_timestamps": false,
187 "open_shaarli": false,
188 "redirector": "http://anonym.to/?",
189 "redirector_encode_url": false
190 },
191 "general": {
192 "header_link": "?",
193 "links_per_page": 20,
194 "enabled_plugins": [
195 "markdown",
196 "wallabag"
197 ],
198 "timezone": "Europe\/Paris",
199 "title": "My Shaarli"
200 },
201 "updates": {
202 "check_updates": true,
203 "check_updates_branch": "stable",
204 "check_updates_interval": 86400
205 },
206 "feed": {
207 "rss_permalinks": true,
208 "show_atom": false
209 },
210 "privacy": {
211 "default_private_links": true,
212 "hide_public_links": false,
213 "force_login": false,
214 "hide_timestamps": false,
215 "remember_user_default": true
216 },
217 "thumbnail": {
218 "enable_thumbnails": true,
219 "enable_localcache": true
220 },
221 "redirector": {
222 "url": "http://anonym.to/?",
223 "encode_url": false
224 },
225 "plugins": {
226 "WALLABAG_URL": "http://demo.wallabag.org",
227 "WALLABAG_VERSION": "1"
228 },
229 "translation": {
230 "language": "fr",
231 "mode": "php",
232 "extensions": {
233 "demo": "plugins/demo_plugin/languages/"
234 }
235 }
236} ?>
237```
238
239## Additional configuration
240
241The `playvideos` plugin may require that you adapt your server's
242[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting)
243configuration to work properly.
244
diff --git a/doc/Static-analysis.md b/doc/md/Static-analysis.md
index 5781e055..29d98362 100644
--- a/doc/Static-analysis.md
+++ b/doc/md/Static-analysis.md
@@ -1,12 +1,13 @@
1#Static analysis
2## WIP 1## WIP
3This topic is currently being discussed here: 2This topic is currently being discussed here:
4- [Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95) (#95)[](.html) 3
5- [Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) (#130)[](.html) 4- [Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95) (#95)
5- [Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) (#130)
6 6
7### Usage 7### Usage
8Static analysis tools can be installed with Composer, and used through Shaarli's [Makefile](https://github.com/shaarli/Shaarli/blob/master/Makefile).[](.html) 8Static analysis tools can be installed with Composer, and used through Shaarli's [Makefile](https://github.com/shaarli/Shaarli/blob/master/Makefile).
9 9
10For an overview of the available features, see: 10For an overview of the available features, see:
11- [Code quality: Makefile to run static code checkers](https://github.com/shaarli/Shaarli/pull/124) (#124)[](.html) 11
12- [Run PHPCS against different coding standards](https://github.com/shaarli/Shaarli/pull/276) (#276)[](.html) 12- [Code quality: Makefile to run static code checkers](https://github.com/shaarli/Shaarli/pull/124) (#124)
13- [Run PHPCS against different coding standards](https://github.com/shaarli/Shaarli/pull/276) (#276)
diff --git a/doc/md/Theming.md b/doc/md/Theming.md
new file mode 100644
index 00000000..bd400776
--- /dev/null
+++ b/doc/md/Theming.md
@@ -0,0 +1,85 @@
1## Foreword
2
3There are two ways of customizing how Shaarli looks:
4
51. by using a custom CSS to override Shaarli's CSS
62. by using a full theme that provides its own RainTPL templates, CSS and Javascript resources
7
8## Custom CSS
9
10Shaarli's appearance can be modified by adding CSS rules to:
11
12- Shaarli < `v0.9.0`: `inc/user.css`
13- Shaarli >= `v0.9.0`: `data/user.css`
14
15This file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme.
16
17**Note**: Do not edit `tpl/default/css/shaarli.css`! Your changes would be overridden when updating Shaarli.
18
19See also [Download CSS styles from an OPML list](Download CSS styles from an OPML list)
20
21## Themes
22
23Installation:
24
25- find a theme you'd like to install
26- copy or clone the theme folder under `tpl/<a_sweet_theme>`
27- enable the theme:
28 - Shaarli < `v0.9.0`: edit `data/config.json.php` and set the value of `raintpl_tpl` to the new theme name:
29 `"raintpl_tpl": "tpl\/my-template\/"`
30 - Shaarli >= `v0.9.0`: select the theme through the _Tools_ page
31
32## Community CSS & themes
33
34### Custom CSS
35
36- [mrjovanovic/serious-theme-shaarli](https://github.com/mrjovanovic/serious-theme-shaarli) - A serious theme for Shaarli
37- [shaarli/shaarli-themes](https://github.com/shaarli/shaarli-themes)
38
39### Themes
40
41- [AkibaTech/Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli
42- [alexisju/albinomouse-template](https://github.com/alexisju/albinomouse-template) - A full template for Shaarli
43- [ArthurHoaro/shaarli-launch](https://github.com/ArthurHoaro/shaarli-launch) - Customizable Shaarli theme
44- [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli
45- [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli
46- [kalvn/Shaarli-Material](https://github.com/kalvn/Shaarli-Material) - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone
47- [ManufacturaInd/shaarli-2004licious-theme](https://github.com/ManufacturaInd/shaarli-2004licious-theme) - A template/theme as a humble homage to the early looks of the del.icio.us site
48
49### Shaarli forks
50
51- [misterair/Limonade](https://github.com/misterair/limonade) - A fork of (legacy) Shaarli with a new template
52- [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance
53
54## Example installation: AlbinoMouse theme
55
56With the following configuration:
57
58- Apache 2 / PHP 5.6
59- user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir`
60- `http` is the name of the Apache user
61
62```bash
63$ cd ~/public_html
64
65# clone repositories
66$ git clone https://github.com/shaarli/Shaarli.git shaarli
67$ pushd shaarli/tpl
68$ git clone https://github.com/alexisju/albinomouse-template.git
69$ popd
70
71# set access rights for Apache
72$ chgrp -R http shaarli
73$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp
74```
75
76Get config written:
77- go to the freshly installed site
78- fill the install form
79- log in to Shaarli
80
81Edit Shaarli's [configuration](Shaarli-configuration):
82```bash
83# the file should be owned by Apache, thus not writeable => sudo
84$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
85```
diff --git a/doc/md/Translations.md b/doc/md/Translations.md
new file mode 100644
index 00000000..54a36655
--- /dev/null
+++ b/doc/md/Translations.md
@@ -0,0 +1,152 @@
1## Translations
2
3Shaarli supports [gettext](https://www.gnu.org/software/gettext/manual/gettext.html) translations
4since `>= v0.9.2`.
5
6Note that only the `default` theme supports translations.
7
8### Contributing
9
10We encourage the community to contribute to Shaarli's translation either by improving existing
11translations or submitting a new language.
12
13Contributing to the translation does not require development skill.
14
15Please submit a pull request with the `.po` file updated/created. Note that the compiled file (`.mo`)
16is not stored on the repository, and is generated during the release process.
17
18### How to
19
20First, install [Poedit](https://poedit.net/) tool.
21
22Poedit will extract strings to translate from the PHP source code.
23
24**Important**: due to the usage of a template engine, it's important to generate PHP cache files to extract
25every translatable string.
26
27You can either use [this script](https://gist.github.com/ArthurHoaro/5d0323f758ab2401ef444a53f54e9a07) (recommended)
28or visit every template page in your browser to generate cache files, while logged in.
29
30Here is a list :
31
32```
33http://<replace_domain>/
34http://<replace_domain>/?nonope
35http://<replace_domain>/?do=addlink
36http://<replace_domain>/?do=changepasswd
37http://<replace_domain>/?do=changetag
38http://<replace_domain>/?do=configure
39http://<replace_domain>/?do=tools
40http://<replace_domain>/?do=daily
41http://<replace_domain>/?post
42http://<replace_domain>/?do=export
43http://<replace_domain>/?do=import
44http://<replace_domain>/?do=login
45http://<replace_domain>/?do=picwall
46http://<replace_domain>/?do=pluginadmin
47http://<replace_domain>/?do=tagcloud
48http://<replace_domain>/?do=taglist
49```
50
51#### Improve existing translation
52
53In Poedit, click on "Edit a Translation", and from Shaarli's directory open
54`inc/languages/<lang>/LC_MESSAGES/shaarli.po`.
55
56The existing list of translatable strings should have been loaded, then click on the "Update" button.
57
58You can start editing the translation.
59
60![poedit-screenshot](images/poedit-1.jpg)
61
62Save when you're done, then you can submit a pull request containing the updated `shaarli.po`.
63
64#### Add a new language
65
66Open Poedit and select "Create New Translation", then from Shaarli's directory open
67`inc/languages/<lang>/LC_MESSAGES/shaarli.po`.
68
69Then select the language you want to create.
70
71Click on `File > Save as...`, and save your file in `<shaarli directory>/inc/language/<new language>/LC_MESSAGES/shaarli.po`.
72`<new language>` here should be the language code respecting the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2)
73format in lowercase (e.g. `de` for German).
74
75Then click on the "Update" button, and you can start to translate every available string.
76
77Save when you're done, then you can submit a pull request containing the new `shaarli.po`.
78
79### Extend Shaarli's translation
80
81If you're writing a custom theme, or a non official plugin, you might want to use the translation system,
82but you won't be able to able to override Shaarli's translation.
83
84However, you can add your own translation domain which extends the main translation list.
85
86> Note that you can find a live example of translation extension in the `demo_plugin`.
87
88First, create your translation files tree directory:
89
90```
91<your_module>/languages/<ISO 3166-1 alpha-2 language code>/LC_MESSAGES/
92```
93
94Your `.po` files must be named like your domain. E.g. if your translation domain is `my_theme`, then your file will be
95`my_theme.po`.
96
97Users have to register your extension in their configuration with the parameter
98`translation.extensions.<domain>: <translation files path>`.
99
100Example:
101
102```php
103if (! $conf->exists('translation.extensions.my_theme')) {
104 $conf->set('translation.extensions.my_theme', '<your_module>/languages/');
105 $conf->write(true);
106}
107```
108
109> Note that the page needs to be reloaded after the registration.
110
111It is then recommended to create a custom translation function which will call the `t()` function with your domain.
112For example :
113
114```php
115function my_theme_t($text, $nText = '', $nb = 1)
116{
117 return t($text, $nText, $nb, 'my_theme'); // the last parameter is your translation domain.
118}
119```
120
121All strings which can be translated should be processed through your function:
122
123```php
124my_theme_t('Comment');
125my_theme_t('Comment', 'Comments', 2);
126```
127
128Or in templates:
129
130```php
131{'Comment'|my_theme_t}
132{function="my_theme_t('Comment', 'Comments', 2)"}
133```
134
135> Note than in template, you need to visit your page at least once to generate a cache file.
136
137When you're done, open Poedit and load translation strings from sources:
138
139 1. `File > New`
140 2. Choose your language
141 3. Save your `PO` file in `<your_module>/languages/<language code>/LC_MESSAGES/my_theme.po`.
142 4. Go to `Catalog > Properties...`
143 5. Fill the `Translation Properties` tab
144 6. Add your source path in the `Sources Paths` tab
145 7. In the `Sources Keywords` tab uncheck "Also use default keywords" and add the following lines:
146
147```
148my_theme_t
149my_theme_t:1,2
150```
151
152Click on the "Update" button and you're free to start your translations!
diff --git a/doc/Troubleshooting.md b/doc/md/Troubleshooting.md
index 8e30fce5..b2d86d40 100644
--- a/doc/Troubleshooting.md
+++ b/doc/md/Troubleshooting.md
@@ -1,39 +1,51 @@
1#Troubleshooting 1# Troubleshooting
2
2## Browser 3## Browser
4
3### Redirection issues (HTTP Referer) 5### Redirection issues (HTTP Referer)
6
4Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages. 7Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages.
5 8
6See: 9See:
7- [HTTP referer](https://en.wikipedia.org/wiki/HTTP_referer) (Wikipedia)[](.html) 10
8- [Improve online privacy by controlling referrer information](http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/)[](.html) 11- [HTTP referer](https://en.wikipedia.org/wiki/HTTP_referer) (Wikipedia)
9- [Better security, privacy and anonymity in Firefox](http://b.agilob.net/better-security-privacy-and-anonymity-in-firefox/)[](.html) 12- [Improve online privacy by controlling referrer information](http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/)
13- [Better security, privacy and anonymity in Firefox](http://b.agilob.net/better-security-privacy-and-anonymity-in-firefox/)
10 14
11### Firefox HTTP Referer options 15### Firefox HTTP Referer options
16
12HTTP settings are available by browsing `about:config`, here are the available settings and their values. 17HTTP settings are available by browsing `about:config`, here are the available settings and their values.
13 18
14`network.http.sendRefererHeader` - determines when to send the Referer HTTP header 19`network.http.sendRefererHeader` - determines when to send the Referer HTTP header
15- 0: Never send the referring URL 20
21- `0`: Never send the referring URL
16 - not recommended, may break some sites 22 - not recommended, may break some sites
17- 1: Send only on clicked links 23- `1`: Send only on clicked links
18- 2 (default): Send for links and images 24- `2` (default): Send for links and images
19 25
20`network.http.referer.XOriginPolicy` - Cross-domain origin policy 26`network.http.referer.XOriginPolicy` - Cross-domain origin policy
21- 0 (default): Always send 27
22- 1: Send if base domains match 28- `0` (default): Always send
23- 2: Send if hosts match 29- `1`: Send if base domains match
30- `2`: Send if hosts match
24 31
25`network.http.referer.spoofSource` - Referer spoofing (~faking) 32`network.http.referer.spoofSource` - Referer spoofing (~faking)
26- false (default): real referer 33
27- true: spoof referer (use target URI as referer) 34- `false` (default): real referer
28 - known to break some functionality in Shaarli 35- `true`: spoof referer (use target URI as referer)
36 - known to break some functionality in Shaarli
29 37
30`network.http.referer.trimmingPolicy` - trim the URI not to send a full Referer 38`network.http.referer.trimmingPolicy` - trim the URI not to send a full Referer
31- 0 (default): send full URI 39
32- 1: scheme+host+port+path 40- `0`: (default): send full URI
33- 2: scheme+host+port 41- `1`: scheme+host+port+path
42- `2`: scheme+host+port
34 43
35### Firefox, localhost and redirections 44### Firefox, localhost and redirections
36`localhost` is not a proper Fully Qualified Domain Name (FQDN); if Firefox has been set up to spoof referers, or only accept requests from the same base domain/host, Shaarli redirections will not work properly. 45
46`localhost` is not a proper Fully Qualified Domain Name (FQDN); if Firefox has
47been set up to spoof referers, or only accept requests from the same base domain/host,
48Shaarli redirections will not work properly.
37 49
38To solve this, assign a local domain to your host, e.g. 50To solve this, assign a local domain to your host, e.g.
39``` 51```
@@ -44,35 +56,44 @@ To solve this, assign a local domain to your host, e.g.
44and browse Shaarli at http://localhost.lan/. 56and browse Shaarli at http://localhost.lan/.
45 57
46Related threads: 58Related threads:
47- [What is localhost.localdomain for?](https://bbs.archlinux.org/viewtopic.php?id=156064)[](.html) 59- [What is localhost.localdomain for?](https://bbs.archlinux.org/viewtopic.php?id=156064)
48- [Stop returning to the first page after editing a bookmark from another page](https://github.com/shaarli/Shaarli/issues/311)[](.html) 60- [Stop returning to the first page after editing a bookmark from another page](https://github.com/shaarli/Shaarli/issues/311)
49 61
50## Login 62## Login
63
51### I forgot my password! 64### I forgot my password!
65
52Delete the file `data/config.php` and display the page again. You will be asked for a new login/password. 66Delete the file `data/config.php` and display the page again. You will be asked for a new login/password.
53 67
54### I'm locked out - Login bruteforce protection 68### I'm locked out - Login bruteforce protection
69
55Login form is protected against brute force attacks: 4 failed logins will ban the IP address from login for 30 minutes. Banned IPs can still browse links. 70Login form is protected against brute force attacks: 4 failed logins will ban the IP address from login for 30 minutes. Banned IPs can still browse links.
56 71
57To remove the current IP bans, delete the file `data/ipbans.php` 72To remove the current IP bans, delete the file `data/ipbans.php`
58 73
59### List of all login attempts 74### List of all login attempts
75
60The file `data/log.txt` shows all logins (successful or failed) and bans/lifted bans. 76The file `data/log.txt` shows all logins (successful or failed) and bans/lifted bans.
61Search for `failed` in this file to look for unauthorized login attempts. 77Search for `failed` in this file to look for unauthorized login attempts.
62 78
63## Hosting problems 79## Hosting problems
80
64### Old PHP versions 81### Old PHP versions
65 * On **free.fr** : free.fr now support php 5.6.x([link](http://les.pages.perso.chez.free.fr/migrations/php5v6.io))and so support now the tag autocompletion but you have to do the following : At the root of your webspace create a `sessions` directory and a `.htaccess` file containing:[](.html)
66 82
67```ini 83On **free.fr**: free.fr now supports php 5.6.x([link](http://les.pages.perso.chez.free.fr/migrations/php5v6.io))
84and so support now the tag autocompletion but you have to do the following.
85
86At the root of your webspace create a `sessions` directory and a `.htaccess` file containing:
87
88```xml
68<IfDefine Free> 89<IfDefine Free>
69php56 1 90php56 1
70</IfDefine> 91</IfDefine>
71``` 92```
72 93
73 * If you have an error such as: `Parse error: syntax error, unexpected '=', expecting '(' in /links/index.php on line xxx`, it means that your host is using php4, not php5. Shaarli requires php 5.1. Try changing the file extension to `.php5` 94- If you have an error such as: `Parse error: syntax error, unexpected '=', expecting '(' in /links/index.php on line xxx`, it means that your host is using php4, not php5. Shaarli requires php 5.1. Try changing the file extension to `.php5`
74 * On **1and1** : If you add the link from the page (and not from the bookmarklet), Shaarli will no be able to get the title of the page. You will have to enter it manually. (Because they have disabled the ability to download a file through HTTP). 95- On **1and1** : If you add the link from the page (and not from the bookmarklet), Shaarli will no be able to get the title of the page. You will have to enter it manually. (Because they have disabled the ability to download a file through HTTP).
75 * If you have the error `Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /…/index.php on line xxx`, it means that your host has disabled the ability to fetch a file by HTTP in the php config (Typically in 1and1 hosting). Bad host. Change host. Or comment the following lines:[](.html) 96- If you have the error `Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /…/index.php on line xxx`, it means that your host has disabled the ability to fetch a file by HTTP in the php config (Typically in 1and1 hosting). Bad host. Change host. Or comment the following lines:
76 97
77```php 98```php
78//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive. 99//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.
@@ -80,28 +101,32 @@ php56 1
80//if (strpos($status,'200 OK')) $title=html_extract_title($data); 101//if (strpos($status,'200 OK')) $title=html_extract_title($data);
81``` 102```
82 103
83 * On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work. 104- On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.
84 * On **lost-oasis**, RSS doesn't work correctly, because of this message at the begining of the RSS/ATOM feed : `<? // tout ce qui est charge ici (generalement des includes et require) est charge en permanence. ?>`. To fix this, remove this message from `php-include/prepend.php` 105- On **lost-oasis**, RSS doesn't work correctly, because of this message at the begining of the RSS/ATOM feed : `<? // tout ce qui est charge ici (generalement des includes et require) est charge en permanence. ?>`. To fix this, remove this message from `php-include/prepend.php`
85 106
86### Dates are not properly formatted 107### Dates are not properly formatted
108
87Shaarli tries to sniff the language of the browser (using HTTP_ACCEPT_LANGUAGE headers) and choose a date format accordingly. But Shaarli can only use the date formats (and more generaly speaking, the locales) provided by the webserver. So even if you have a browser in French, you may end up with dates in US format (it's the case on sebsauvage.net :-( ) 109Shaarli tries to sniff the language of the browser (using HTTP_ACCEPT_LANGUAGE headers) and choose a date format accordingly. But Shaarli can only use the date formats (and more generaly speaking, the locales) provided by the webserver. So even if you have a browser in French, you may end up with dates in US format (it's the case on sebsauvage.net :-( )
88 110
89### Problems on CentOS servers 111### Problems on CentOS servers
90On **CentOS**/RedHat derivatives, you may need to install the `php-mbstring` package.
91 112
113On **CentOS**/RedHat derivatives, you may need to install the `php-mbstring` package.
92 114
93### My session expires! I can't stay logged in 115### My session expires! I can't stay logged in
116
94This can be caused by several things: 117This can be caused by several things:
95 118
96* Your php installation may not have a proper directory setup for session files. (eg. on Free.fr you need to create a `session` directory on the root of your website.) You may need to create the session directory of set it up. 119- Your php installation may not have a proper directory setup for session files. (eg. on Free.fr you need to create a `session` directory on the root of your website.) You may need to create the session directory of set it up.
97* Most hosts regularly clean the temporary and session directories. Your host may be cleaning those directories too aggressively (eg.OVH hosts), forcing an expire of the session. You may want to set the session directory in your web root. (eg. Create the `sessions` subdirectory and add `ini_set('session.save_path', $_SERVER['DOCUMENT_ROOT'].'/../sessions');`. Make sure this directory is not browsable !)[](.html) 120- Most hosts regularly clean the temporary and session directories. Your host may be cleaning those directories too aggressively (eg.OVH hosts), forcing an expire of the session. You may want to set the session directory in your web root. (eg. Create the `sessions` subdirectory and add `ini_set('session.save_path', $_SERVER['DOCUMENT_ROOT'].'/../sessions');`. Make sure this directory is not browsable !)
98* If your IP address changes during surfing, Shaarli will force expire your session for security reasons (to prevent session cookie hijacking). This can happen when surfing from WiFi or 3G (you may have switched WiFi/3G access point), or in some corporate/university proxies which use load balancing (and may have proxies with several external IP addresses). 121- If your IP address changes during surfing, Shaarli will force expire your session for security reasons (to prevent session cookie hijacking). This can happen when surfing from WiFi or 3G (you may have switched WiFi/3G access point), or in some corporate/university proxies which use load balancing (and may have proxies with several external IP addresses).
99* Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those. 122- Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.
100* You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time. 123- You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.
101* If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions. 124- If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.
102 125
103## Sessions do not seem to work correctly on your server 126## Sessions do not seem to work correctly on your server
104Follow the instructions in the error message. Make sure you are accessing shaarli via a direct IP address or a proper hostname. If you have **no dots** in the hostname (e.g. `localhost` or `http://my-webserver/shaarli/`), some browsers will not store cookies at all (this respects the [HTTP cookie specification](http://curl.haxx.se/rfc/cookie_spec.html)).[](.html) 127
128Follow the instructions in the error message. Make sure you are accessing shaarli via a direct IP address or a proper hostname. If you have **no dots** in the hostname (e.g. `localhost` or `http://my-webserver/shaarli/`), some browsers will not store cookies at all (this respects the [HTTP cookie specification](http://curl.haxx.se/rfc/cookie_spec.html)).
105 129
106### pubsubhubbub support 130### pubsubhubbub support
107Download [publisher.php](https://pubsubhubbub.googlecode.com/git/publisher_clients/php/library/publisher.php) at the root of your Shaarli installation and set `$GLOBALS['config'['PUBSUBHUB_URL']` in your `config.php`]('PUBSUBHUB_URL']`-in-your-`config.php`.html) 131
132Download [publisher.php](https://pubsubhubbub.googlecode.com/git/publisher_clients/php/library/publisher.php) at the root of your Shaarli installation and set `$GLOBALS['config']['PUBSUBHUB_URL']` in your `config.php`
diff --git a/doc/md/Unit-tests-Docker.md b/doc/md/Unit-tests-Docker.md
new file mode 100644
index 00000000..c2de7cc7
--- /dev/null
+++ b/doc/md/Unit-tests-Docker.md
@@ -0,0 +1,56 @@
1## Running tests inside Docker containers
2
3Read first:
4
5- [Docker 101](docker/docker-101.md)
6- [Docker resources](docker/resources.md)
7- [Unit tests](Unit-tests.md)
8
9### Docker test images
10
11Test Dockerfiles are located under `docker/tests/<distribution>/Dockerfile`,
12and can be used to build Docker images to run Shaarli test suites under common
13Linux environments.
14
15Dockerfiles are provided for the following environments:
16
17- `alpine36` - [Alpine 3.6](https://www.alpinelinux.org/downloads/)
18- `debian8` - [Debian 8 Jessie](https://www.debian.org/DebianJessie) (oldstable)
19- `debian9` - [Debian 9 Stretch](https://wiki.debian.org/DebianStretch) (stable)
20- `ubuntu16` - [Ubuntu 16.04 Xenial Xerus](http://releases.ubuntu.com/16.04/) (LTS)
21
22What's behind the curtains:
23
24- each image provides:
25 - a base Linux OS
26 - Shaarli PHP dependencies (OS packages)
27 - test PHP dependencies (OS packages)
28 - Composer
29- the local workspace is mapped to the container's `/shaarli/` directory,
30- the files are rsync'd to so tests are run using a standard Linux user account
31 (running tests as `root` would bypass permission checks and may hide issues)
32- the tests are run inside the container.
33
34### Building test images
35
36```bash
37# build the Debian 9 Docker image
38$ cd /path/to/shaarli
39$ cd docker/test/debian9
40$ docker build -t shaarli-test:debian9 .
41```
42
43### Running tests
44
45```bash
46$ cd /path/to/shaarli
47
48# install/update 3rd-party test dependencies
49$ composer install --prefer-dist
50
51# run tests using the freshly built image
52$ docker run -v $PWD:/shaarli shaarli-test:debian9 docker_test
53
54# run the full test campaign
55$ docker run -v $PWD:/shaarli shaarli-test:debian9 docker_all_tests
56```
diff --git a/doc/Unit-tests.md b/doc/md/Unit-tests.md
index f2888780..f6030d5c 100644
--- a/doc/Unit-tests.md
+++ b/doc/md/Unit-tests.md
@@ -1,13 +1,14 @@
1#Unit tests
2
3### Setup your environment for tests 1### Setup your environment for tests
4The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool.[](.html)
5 2
6Regarding Composer, you can either use: 3The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool.
7* a system-wide version, e.g. installed through your distro's package manager 4
8* a local version, downloadable [here](https://getcomposer.org/download/)[](.html) 5### Install composer
6
7You can either use:
8
9- a system-wide version, e.g. installed through your distro's package manager
10- a local version, downloadable [here](https://getcomposer.org/download/).
9 11
10#### Sample usage
11```bash 12```bash
12# system-wide version 13# system-wide version
13$ composer install 14$ composer install
@@ -20,12 +21,16 @@ $ php composer.phar update
20``` 21```
21 22
22#### Install Shaarli dev dependencies 23#### Install Shaarli dev dependencies
24
23```bash 25```bash
24$ cd /path/to/shaarli 26$ cd /path/to/shaarli
25$ composer update 27$ composer update
26``` 28```
27 29
28#### Install and enable Xdebug to generate PHPUnit coverage reports 30#### Install and enable Xdebug to generate PHPUnit coverage reports
31
32See http://xdebug.org/docs/install
33
29For Debian-based distros: 34For Debian-based distros:
30```bash 35```bash
31$ aptitude install php5-xdebug 36$ aptitude install php5-xdebug
@@ -41,6 +46,7 @@ zend_extension=xdebug.so
41``` 46```
42 47
43#### Run unit tests 48#### Run unit tests
49
44Successful test suite: 50Successful test suite:
45```bash 51```bash
46$ make test 52$ make test
@@ -111,18 +117,41 @@ Tests: 36, Assertions: 63, Errors: 1, Failures: 2.
111``` 117```
112 118
113#### Test results and coverage 119#### Test results and coverage
120
114By default, PHPUnit will run all suitable tests found under the `tests` directory. 121By default, PHPUnit will run all suitable tests found under the `tests` directory.
115 122
116Each test has 3 possible outcomes: 123Each test has 3 possible outcomes:
117* `.` - success 124
118* `F` - failure: the test was run but its results are invalid 125- `.` - success
119 * the code does not behave as expected 126- `F` - failure: the test was run but its results are invalid
120 * dependencies to external elements: globals, session, cache... 127 - the code does not behave as expected
121* `E` - error: something went wrong and the tested code has crashed 128 - dependencies to external elements: globals, session, cache...
122 * typos in the code, or in the test code 129- `E` - error: something went wrong and the tested code has crashed
123 * dependencies to missing external elements 130 - typos in the code, or in the test code
131 - dependencies to missing external elements
124 132
125If Xdebug has been installed and activated, two coverage reports will be generated: 133If Xdebug has been installed and activated, two coverage reports will be generated:
126* a summary in the console 134
127* a detailed HTML report with metrics for tested code 135- a summary in the console
128 * to open it in a web browser: `firefox coverage/index.html &` 136- a detailed HTML report with metrics for tested code
137 - to open it in a web browser: `firefox coverage/index.html &`
138
139### Executing specific tests
140
141Add a [`@group`](https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.group) annotation in a test class or method comment:
142
143```php
144/**
145 * Netscape bookmark import
146 * @group WIP
147 */
148class BookmarkImportTest extends PHPUnit_Framework_TestCase
149{
150 [...]
151}
152```
153
154To run all tests annotated with `@group WIP`:
155```bash
156$ vendor/bin/phpunit --group WIP tests/
157```
diff --git a/doc/Upgrade-and-migration.md b/doc/md/Upgrade-and-migration.md
index 0bc33824..1dc07339 100644
--- a/doc/Upgrade-and-migration.md
+++ b/doc/md/Upgrade-and-migration.md
@@ -1,41 +1,54 @@
1#Upgrade and migration
2## Preparation 1## Preparation
2
3### Note your current version
4
5If anything goes wrong, it's important for us to know which version you're upgrading from.
6The current version is present in the `version.php` file.
7
3### Backup your data 8### Backup your data
4 9
5Shaarli stores all user data under the `data` directory: 10Shaarli stores all user data under the `data` directory:
11
6- `data/config.php` - main configuration file 12- `data/config.php` - main configuration file
7- `data/datastore.php` - bookmarked links 13- `data/datastore.php` - bookmarked links
8- `data/ipbans.php` - banned IP addresses 14- `data/ipbans.php` - banned IP addresses
15- `data/updates.txt` - contains all automatic update to the configuration and datastore files already run
9 16
10See [Shaarli configuration](Shaarli-configuration.html) for more information about Shaarli resources. 17See [Shaarli configuration](Shaarli-configuration) for more information about Shaarli resources.
11 18
12It is recommended to backup this repository _before_ starting updating/upgrading Shaarli: 19It is recommended to backup this repository _before_ starting updating/upgrading Shaarli:
20
13- users with SSH access: copy or archive the directory to a temporary location 21- users with SSH access: copy or archive the directory to a temporary location
14- users with FTP access: download a local copy of your Shaarli installation using your favourite client 22- users with FTP access: download a local copy of your Shaarli installation using your favourite client
15 23
16### Migrating data from a previous installation 24### Migrating data from a previous installation
25
17As all user data is kept under `data`, this is the only directory you need to worry about when migrating to a new installation, which corresponds to the following steps: 26As all user data is kept under `data`, this is the only directory you need to worry about when migrating to a new installation, which corresponds to the following steps:
18 27
19- backup the `data` directory 28- backup the `data` directory
20- install or update Shaarli: 29- install or update Shaarli:
21 - fresh installation - see [Download and installation](Download-and-installation.html) 30 - fresh installation - see [Download and installation](Download-and-installation)
22 - update - see the following sections 31 - update - see the following sections
23- check or restore the `data` directory 32- check or restore the `data` directory
24 33
25## Upgrading from release archives 34## Recommended : Upgrading from release archives
26All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.[](.html) 35
36All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.
27 37
28We _recommend_ using the releases from the `stable` branch, which are available as: 38We recommend that you use the latest release tarball with the `-full` suffix. It contains the dependencies, please read [Download and installation](Download-and-installation) for `git` complete instructions.
29- gzipped tarball - https://github.com/shaarli/Shaarli/archive/stable.tar.gz
30- ZIP archive - https://github.com/shaarli/Shaarli/archive/stable.zip
31 39
32Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the contents of the `data` directory! 40Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the `data` directory!
33 41
34After upgrading, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to `data/config.php` (see [Shaarli configuration](Shaarli-configuration.html) for more details). 42If you use translations in gettext mode - meaning you manually changed the default mode -,
43reload your web server.
44
45After upgrading, access your fresh Shaarli installation from a web browser; the configuration and data store will then be automatically updated, and new settings added to `data/config.json.php` (see [Shaarli configuration](Shaarli configuration) for more details).
35 46
36## Upgrading with Git 47## Upgrading with Git
48
37### Updating a community Shaarli 49### Updating a community Shaarli
38If you have installed Shaarli from the [community Git repository](Download#clone-with-git-recommended), simply [pull new changes](https://www.git-scm.com/docs/git-pull) from your local clone:[](.html) 50
51If you have installed Shaarli from the [community Git repository](Download#clone-with-git-recommended), simply [pull new changes](https://www.git-scm.com/docs/git-pull) from your local clone:
39 52
40```bash 53```bash
41$ cd /path/to/shaarli 54$ cd /path/to/shaarli
@@ -51,10 +64,10 @@ Fast-forward
51 3 files changed, 3 insertions(+), 1 deletion(-) 64 3 files changed, 3 insertions(+), 1 deletion(-)
52``` 65```
53 66
54Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html) 67Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):
55 68
56```bash 69```bash
57$ composer update --no-dev 70$ composer install --no-dev
58 71
59Loading composer repositories with package information 72Loading composer repositories with package information
60Updating dependencies 73Updating dependencies
@@ -62,19 +75,30 @@ Updating dependencies
62 Downloading: 100% 75 Downloading: 100%
63``` 76```
64 77
78Shaarli >= `v0.9.2` supports translations:
79
80```bash
81$ make translate
82```
83
84If you use translations in gettext mode, reload your web server.
85
65### Migrating and upgrading from Sebsauvage's repository 86### Migrating and upgrading from Sebsauvage's repository
66If you have installed Shaarli from [Sebsauvage's original Git repository](https://github.com/sebsauvage/Shaarli), you can use [Git remotes](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) to update your working copy.[](.html) 87
88If you have installed Shaarli from [Sebsauvage's original Git repository](https://github.com/sebsauvage/Shaarli), you can use [Git remotes](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) to update your working copy.
67 89
68The following guide assumes that: 90The following guide assumes that:
69- you have a basic knowledge of Git [branching](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) and [remote repositories](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)[](.html) 91
92- you have a basic knowledge of Git [branching](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) and [remote repositories](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)
70- the default remote is named `origin` and points to Sebsauvage's repository 93- the default remote is named `origin` and points to Sebsauvage's repository
71- the current branch is `master` 94- the current branch is `master`
72 - if you have personal branches containing customizations, you will need to [rebase them](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) after the upgrade; beware though, a lot of changes have been made since the community fork has been created, so things are very likely to break![](.html) 95 - if you have personal branches containing customizations, you will need to [rebase them](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) after the upgrade; beware though, a lot of changes have been made since the community fork has been created, so things are very likely to break!
73- the working copy is clean: 96- the working copy is clean:
74 - no versioned file has been locally modified 97 - no versioned file has been locally modified
75 - no untracked files are present 98 - no untracked files are present
76 99
77#### Step 0: show repository information 100#### Step 0: show repository information
101
78```bash 102```bash
79$ cd /path/to/shaarli 103$ cd /path/to/shaarli
80 104
@@ -83,7 +107,7 @@ origin https://github.com/sebsauvage/Shaarli (fetch)
83origin https://github.com/sebsauvage/Shaarli (push) 107origin https://github.com/sebsauvage/Shaarli (push)
84 108
85$ git branch -vv 109$ git branch -vv
86* master 029f75f [origin/master] Update README.md[](.html) 110* master 029f75f [origin/master] Update README.md
87 111
88$ git status 112$ git status
89On branch master 113On branch master
@@ -92,6 +116,7 @@ nothing to commit, working directory clean
92``` 116```
93 117
94#### Step 1: update Git remotes 118#### Step 1: update Git remotes
119
95``` 120```
96$ git remote rename origin sebsauvage 121$ git remote rename origin sebsauvage
97$ git remote -v 122$ git remote -v
@@ -107,11 +132,11 @@ remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550
107Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done. 132Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done.
108Resolving deltas: 100% (1899/1899), completed with 48 local objects. 133Resolving deltas: 100% (1899/1899), completed with 48 local objects.
109From https://github.com/shaarli/Shaarli 134From https://github.com/shaarli/Shaarli
110 * [new branch] master -> origin/master[](.html) 135 * [new branch] master -> origin/master
111 * [new branch] stable -> origin/stable[](.html) 136 * [new branch] stable -> origin/stable
112[...][](.html) 137[...]
113 * [new tag] v0.6.4 -> v0.6.4[](.html) 138 * [new tag] v0.6.4 -> v0.6.4
114 * [new tag] v0.7.0 -> v0.7.0[](.html) 139 * [new tag] v0.7.0 -> v0.7.0
115``` 140```
116 141
117#### Step 2: use the stable community branch 142#### Step 2: use the stable community branch
@@ -122,14 +147,14 @@ Branch stable set up to track remote branch stable from origin.
122Switched to a new branch 'stable' 147Switched to a new branch 'stable'
123 148
124$ git branch -vv 149$ git branch -vv
125 master 029f75f [sebsauvage/master] Update README.md[](.html) 150 master 029f75f [sebsauvage/master] Update README.md
126* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5[](.html) 151* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5
127``` 152```
128 153
129Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html) 154Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):
130 155
131```bash 156```bash
132$ composer update --no-dev 157$ composer install --no-dev
133 158
134Loading composer repositories with package information 159Loading composer repositories with package information
135Updating dependencies 160Updating dependencies
@@ -137,6 +162,14 @@ Updating dependencies
137 Downloading: 100% 162 Downloading: 100%
138``` 163```
139 164
165Shaarli >= `v0.9.2` supports translations:
166
167```bash
168$ make translate
169```
170
171If you use translations in gettext mode, reload your web server.
172
140Optionally, you can delete information related to the legacy version: 173Optionally, you can delete information related to the legacy version:
141 174
142```bash 175```bash
@@ -158,4 +191,26 @@ Total 3317 (delta 2050), reused 3301 (delta 2034)to
158``` 191```
159 192
160#### Step 3: configuration 193#### Step 3: configuration
161After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to `data/config.php` (see [Shaarli configuration](Shaarli-configuration.html) for more details). 194
195After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to `data/config.php` (see [Shaarli configuration](Shaarli-configuration) for more details).
196
197## Troubleshooting
198
199If the solutions provided here don't work, please open an issue specifying which version you're upgrading from and to.
200
201### You must specify an integer as a key
202
203In `v0.8.1` we changed how link keys are handled (from timestamps to incremental integers).
204Take a look at `data/updates.txt` content.
205
206#### `updates.txt` contains `updateMethodDatastoreIds`
207
208Try to delete it and refresh your page while being logged in.
209
210#### `updates.txt` doesn't exist or doesn't contain `updateMethodDatastoreIds`
211
2121. Create `data/updates.txt` if it doesn't exist
2132. Paste this string in the update file `;updateMethodRenameDashTags;`
2143. Login to Shaarli
2154. Delete the update file
2165. Refresh
diff --git a/doc/md/Various-hacks.md b/doc/md/Various-hacks.md
new file mode 100644
index 00000000..0074ae9f
--- /dev/null
+++ b/doc/md/Various-hacks.md
@@ -0,0 +1,33 @@
1### Decode datastore content
2
3To display the array representing the data saved in `data/datastore.php`, use the following snippet:
4
5```php
6$data = "tZNdb9MwFIb... <Commented content inside datastore.php>";
7$out = unserialize(gzinflate(base64_decode($data)));
8echo "<pre>"; // Pretty printing is love, pretty printing is life
9print_r($out);
10echo "</pre>";
11exit;
12```
13This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation).
14
15Alternatively, you can transform to JSON format (and pretty-print if you have `jq` installed):
16```
17php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/\* (.+) \*/.*!", "$1", file_get_contents("data/datastore.php")))))));' | jq .
18```
19
20### Changing the timestamp for a shaare
21
22- Look for `<input type="hidden" name="lf_linkdate" value="{$link.linkdate}">` in `tpl/editlink.tpl` (line 14)
23- Replace `type="hidden"` with `type="text"` from this line
24- A new date/time field becomes available in the edit/new link dialog.
25- You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`.
26
27
28### See also
29
30- [Add a new custom field to shaares (example patch)](https://gist.github.com/nodiscc/8b0194921f059d7b9ad89a581ecd482c)
31- [Download CSS styles for shaarlis listed in an opml file](https://gist.github.com/nodiscc/dede231c92cab22c3ad2cc24d5035012)
32- [Copy an existing Shaarli installation over SSH, and serve it locally](https://gist.github.com/nodiscc/ed161c66e5b028b5299b0a3733d01c77)
33- [Create multiple Shaarli instances, generate an HTML index of them](https://gist.github.com/nodiscc/52e711cda3bc47717c16065231cf6b20)
diff --git a/doc/md/Versioning-and-Branches.md b/doc/md/Versioning-and-Branches.md
new file mode 100644
index 00000000..7097ca0a
--- /dev/null
+++ b/doc/md/Versioning-and-Branches.md
@@ -0,0 +1,75 @@
1**WORK IN PROGRESS**
2
3It's important to understand how Shaarli branches work, especially if you're maintaining a 3rd party tools for Shaarli (theme, plugin, etc.), to be sure stay compatible.
4
5## `master` branch
6
7The `master` branch is the development branch. Any new change MUST go through this branch using Pull Requests.
8
9Remarks:
10
11- This branch shouldn't be used for production as it isn't necessary stable.
12- 3rd party aren't required to be compatible with the latest changes.
13- Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.
14- The version in this branch is always `dev`.
15
16## `v0.x` branch
17
18This `v0.x` branch, points to the latest `v0.x.y` release.
19
20Explanation:
21
22When a new version is released, it might contains a major bug which isn't detected right away. For example, a new PHP version is released, containing backward compatibility issue which doesn't work with Shaarli.
23
24In this case, the issue is fixed in the `master` branch, and the fix is backported the to the `v0.x` branch. Then a new release is made from the `v0.x` branch.
25
26This workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.
27
28## `latest` branch
29
30This branch point the latest release. It recommended to use it to get the latest tested changes.
31
32## `stable` branch
33
34The `stable` branch doesn't contain any major bug, and is one major digit version behind the latest release.
35
36For example, the current latest release is `v0.8.3`, the stable branch is an alias to the latest `v0.7.x` release. When the `v0.9.0` version will be released, the stable will move to the latest `v0.8.x` release.
37
38Remarks:
39
40- Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.
41
42## Releases
43
44Releases are always made from the latest `v0.x` branch.
45
46Note that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.
47
48## Advices on 3rd party git repos workflow
49
50### Versioning
51
52Any time a new Shaarli release is published, you should publish a new release of your repo if the changes affected you since the latest release (take a look at the [changelog](https://github.com/shaarli/Shaarli/releases) (*Draft* means not released yet) and the commit log (like [`tpl` folder](https://github.com/shaarli/Shaarli/commits/master/tpl/default) for themes)). You can either:
53
54 - use the Shaarli version number, with your repo version. For example, if Shaarli `v0.8.3` is released, publish a `v0.8.3-1` release, where `v0.8.3` states Shaarli compatibility and `-1` is your own version digit for the current Shaarli version.
55 - use your own versioning scheme, and state Shaarli compatibility in the release description.
56
57Using this, any user will be able to pick the release matching his own Shaarli version.
58
59### Major bugfix backport releases
60
61To be able to support backported fixes, it recommended to use our workflow:
62
63```bash
64# In master, fix the major bug
65git commit -m "Katastrophe"
66git push origin master
67# Get your commit hash
68git log --format="%H" -n 1
69# Create a new branch from your latest release, let's say v0.8.2-1 (the tag name)
70git checkout -b katastrophe v0.8.2-1
71# Backport the fix commit to your brand new branch
72git cherry-pick <fix commit hash>
73git push origin katastrophe
74# Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`
75```
diff --git a/doc/md/docker/docker-101.md b/doc/md/docker/docker-101.md
new file mode 100644
index 00000000..a9c00b85
--- /dev/null
+++ b/doc/md/docker/docker-101.md
@@ -0,0 +1,140 @@
1## Basics
2Install [Docker](https://www.docker.com/), by following the instructions relevant
3to your OS / distribution, and start the service.
4
5### Search an image on [DockerHub](https://hub.docker.com/)
6
7```bash
8$ docker search debian
9
10NAME DESCRIPTION STARS OFFICIAL AUTOMATED
11ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK]
12debian Debian is a Linux distribution that's comp... 603 [OK]
13google/debian 47 [OK]
14```
15
16### Show available tags for a repository
17```bash
18$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
19
20% Total % Received % Xferd Average Speed Time Time Time Current
21Dload Upload Total Spent Left Speed
22100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
23```
24
25Sample output:
26```json
27[
28 {
29 "layer": "85a02782",
30 "name": "stretch"
31 },
32 {
33 "layer": "59abecbc",
34 "name": "testing"
35 },
36 {
37 "layer": "bf0fd686",
38 "name": "unstable"
39 },
40 {
41 "layer": "60c52dbe",
42 "name": "wheezy"
43 },
44 {
45 "layer": "c5b806fe",
46 "name": "wheezy-backports"
47 }
48]
49
50```
51
52### Pull an image from DockerHub
53```bash
54$ docker pull repository[:tag]
55
56$ docker pull debian:wheezy
57wheezy: Pulling from debian
584c8cbfd2973e: Pull complete
5960c52dbe9d91: Pull complete
60Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
61Status: Downloaded newer image for debian:wheezy
62```
63
64Docker re-uses layers already downloaded. In other words if you have images based on Alpine or some Ubuntu version for example, those can share disk space.
65
66### Start a container
67A container is an instance created from an image, that can be run and that keeps running until its main process exits. Or until the user stops the container.
68
69The simplest way to start a container from image is ``docker run``. It also pulls the image for you if it is not locally available. For more advanced use, refer to ``docker create``.
70
71Stopped containers are not destroyed, unless you specify ``--rm``. To view all created, running and stopped containers, enter:
72```bash
73$ docker ps -a
74```
75
76Some containers may be designed or configured to be restarted, others are not. Also remember both network ports and volumes of a container are created on start, and not editable later.
77
78### Access a running container
79A running container is accessible using ``docker exec``, or ``docker copy``. You can use ``exec`` to start a root shell in the Shaarli container:
80```bash
81$ docker exec -ti <container-name-or-id> bash
82```
83Note the names and ID's of containers are listed in ``docker ps``. You can even type only one or two letters of the ID, given they are unique.
84
85Access can also be through one or more network ports, or disk volumes. Both are specified on and fixed on ``docker create`` or ``run``.
86
87You can view the console output of the main container process too:
88```bash
89$ docker logs -f <container-name-or-id>
90```
91
92### Docker disk use
93Trying out different images can fill some gigabytes of disk quickly. Besides images, the docker volumes usually take up most disk space.
94
95If you care only about trying out docker and not about what is running or saved, the following commands should help you out quickly if you run low on disk space:
96
97```bash
98$ docker rmi -f $(docker images -aq) # remove or mark all images for disposal
99$ docker volume rm $(docker volume ls -q) # remove all volumes
100```
101
102### Systemd config
103Systemd is the process manager of choice on Debian-based distributions. Once you have a ``docker`` service installed, you can use the following steps to set up Shaarli to run on system start.
104
105```bash
106systemctl enable /etc/systemd/system/docker.shaarli.service
107systemctl start docker.shaarli
108systemctl status docker.*
109journalctl -f # inspect system log if needed
110```
111
112You will need sudo or a root terminal to perform some or all of the steps above. Here are the contents for the service file:
113```
114[Unit]
115Description=Shaarli Bookmark Manager Container
116After=docker.service
117Requires=docker.service
118
119
120[Service]
121Restart=always
122
123# Put any environment you want in an included file, like $host- or $domainname in this example
124EnvironmentFile=/etc/sysconfig/box-environment
125
126# It's just an example..
127ExecStart=/usr/bin/docker run \
128 -p 28010:80 \
129 --name ${hostname}-shaarli \
130 --hostname shaarli.${domainname} \
131 -v /srv/docker-volumes-local/shaarli-data:/var/www/shaarli/data:rw \
132 -v /etc/localtime:/etc/localtime:ro \
133 shaarli/shaarli:latest
134
135ExecStop=/usr/bin/docker rm -f ${hostname}-shaarli
136
137
138[Install]
139WantedBy=multi-user.target
140```
diff --git a/doc/md/docker/resources.md b/doc/md/docker/resources.md
new file mode 100644
index 00000000..082d4a46
--- /dev/null
+++ b/doc/md/docker/resources.md
@@ -0,0 +1,19 @@
1### Docker
2
3- [Interactive Docker training portal](https://www.katacoda.com/courses/docker/) on [Katakoda](https://www.katacoda.com/)
4- [Where are Docker images stored?](http://blog.thoward37.me/articles/where-are-docker-images-stored/)
5- [Dockerfile reference](https://docs.docker.com/reference/builder/)
6- [Dockerfile best practices](https://docs.docker.com/articles/dockerfile_best-practices/)
7- [Volumes](https://docs.docker.com/userguide/dockervolumes/)
8
9### DockerHub
10
11- [Repositories](https://docs.docker.com/userguide/dockerrepos/)
12- [Teams and organizations](https://docs.docker.com/docker-hub/orgs/)
13- [GitHub automated build](https://docs.docker.com/docker-hub/github/)
14
15### Service management
16
17- [Using supervisord](https://docs.docker.com/articles/using_supervisord/)
18- [Nginx in the foreground](http://nginx.org/en/docs/ngx_core_module.html#daemon)
19- [supervisord](http://supervisord.org/)
diff --git a/doc/md/docker/reverse-proxy-configuration.md b/doc/md/docker/reverse-proxy-configuration.md
new file mode 100644
index 00000000..6066140e
--- /dev/null
+++ b/doc/md/docker/reverse-proxy-configuration.md
@@ -0,0 +1,120 @@
1## Foreword
2
3This guide assumes that:
4
5- Shaarli runs in a Docker container
6- The host's `10080` port is mapped to the container's `80` port
7- Shaarli's Fully Qualified Domain Name (FQDN) is `shaarli.domain.tld`
8- HTTP traffic is redirected to HTTPS
9
10## Apache
11
12- [Apache 2.4 documentation](https://httpd.apache.org/docs/2.4/)
13 - [mod_proxy](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html)
14 - [Reverse Proxy Request Headers](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers)
15
16The following HTTP headers are set by using the `ProxyPass` directive:
17
18- `X-Forwarded-For`
19- `X-Forwarded-Host`
20- `X-Forwarded-Server`
21
22```apache
23<VirtualHost *:80>
24 ServerName shaarli.domain.tld
25 Redirect permanent / https://shaarli.domain.tld
26</VirtualHost>
27
28<VirtualHost *:443>
29 ServerName shaarli.domain.tld
30
31 SSLEngine on
32 SSLCertificateFile /path/to/cert
33 SSLCertificateKeyFile /path/to/certkey
34
35 LogLevel warn
36 ErrorLog /var/log/apache2/shaarli-error.log
37 CustomLog /var/log/apache2/shaarli-access.log combined
38
39 RequestHeader set X-Forwarded-Proto "https"
40
41 ProxyPass / http://127.0.0.1:10080/
42 ProxyPassReverse / http://127.0.0.1:10080/
43</VirtualHost>
44```
45
46
47## HAProxy
48
49- [HAProxy documentation](https://cbonte.github.io/haproxy-dconv/)
50
51```conf
52global
53 [...]
54
55defaults
56 [...]
57
58frontend http-in
59 bind :80
60 redirect scheme https code 301 if !{ ssl_fc }
61
62 bind :443 ssl crt /path/to/cert.pem
63
64 default_backend shaarli
65
66
67backend shaarli
68 mode http
69 option http-server-close
70 option forwardfor
71 reqadd X-Forwarded-Proto: https
72
73 server shaarli1 127.0.0.1:10080
74```
75
76
77## Nginx
78
79- [Nginx documentation](https://nginx.org/en/docs/)
80
81```nginx
82http {
83 [...]
84
85 index index.html index.php;
86
87 root /home/john/web;
88 access_log /var/log/nginx/access.log;
89 error_log /var/log/nginx/error.log;
90
91 server {
92 listen 80;
93 server_name shaarli.domain.tld;
94 return 301 https://shaarli.domain.tld$request_uri;
95 }
96
97 server {
98 listen 443 ssl http2;
99 server_name shaarli.domain.tld;
100
101 ssl_certificate /path/to/cert
102 ssl_certificate_key /path/to/certkey
103
104 location / {
105 proxy_set_header X-Real-IP $remote_addr;
106 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
107 proxy_set_header X-Forwarded-Proto $scheme;
108 proxy_set_header X-Forwarded-Host $host;
109
110 proxy_pass http://localhost:10080/;
111 proxy_set_header Host $host;
112 proxy_connect_timeout 30s;
113 proxy_read_timeout 120s;
114
115 access_log /var/log/nginx/shaarli.access.log;
116 error_log /var/log/nginx/shaarli.error.log;
117 }
118 }
119}
120```
diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md
new file mode 100644
index 00000000..12f7b5d1
--- /dev/null
+++ b/doc/md/docker/shaarli-images.md
@@ -0,0 +1,95 @@
1A brief guide on getting starting using docker is given in [Docker 101](docker-101.md).
2To learn more about user data and how to keep it across versions, please see [Upgrade and Migration](../Upgrade-and-migration.md).
3
4## Get and run a Shaarli image
5
6### DockerHub repository
7The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)
8repository.
9
10### Available image tags
11- `latest`: latest branch (tarball release)
12- `master`: master branch (tarball release)
13- `stable`: stable branch (tarball release)
14
15The `latest` and `master` images rely on:
16
17- [Alpine Linux](https://www.alpinelinux.org/)
18- [PHP7-FPM](http://php-fpm.org/)
19- [Nginx](http://nginx.org/)
20
21The `stable` image relies on:
22
23- [Debian 8 Jessie](https://hub.docker.com/_/debian/)
24- [PHP5-FPM](http://php-fpm.org/)
25- [Nginx](http://nginx.org/)
26
27Additional [Dockerfiles](https://github.com/shaarli/Shaarli/tree/master/docker) are provided for the `arm32v7` platform, relying on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be built using [`docker build`](https://docs.docker.com/engine/reference/commandline/build/) on an `arm32v7` machine or using an emulator such as [qemu](https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/).
28
29### Download from DockerHub
30```bash
31$ docker pull shaarli/shaarli
32latest: Pulling from shaarli/shaarli
3332716d9fcddb: Pull complete
3484899d045435: Pull complete
354b6ad7444763: Pull complete
36e0345ef7a3e0: Pull complete
375c1dd344094f: Pull complete
386422305a200b: Pull complete
397d63f861dbef: Pull complete
403eb97210645c: Pull complete
41869319d746ff: Already exists
42869319d746ff: Pulling fs layer
43902b87aaaec9: Already exists
44Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
45Status: Downloaded newer image for shaarli/shaarli:latest
46```
47
48### Create and start a new container from the image
49```bash
50# map the host's :8000 port to the container's :80 port
51$ docker create -p 8000:80 shaarli/shaarli
52d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
53
54# launch the container in the background
55$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
56d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
57
58# list active containers
59$ docker ps
60CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
61d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
62```
63
64### Stop and destroy a container
65```bash
66$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
67backstabbing_galileo
68
69# check the container is stopped
70$ docker ps
71CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
72
73# list ALL containers
74$ docker ps -a
75CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
76d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
77
78# destroy the container
79$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
80backstabbing_galileo
81
82$ docker ps -a
83CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
84```
85
86### Automatic builds
87
88Docker users can start a personal instance from an [autobuild image](https://hub.docker.com/r/shaarli/shaarli/). For example to start a temporary Shaarli at ``localhost:8000``, and keep session data (config, storage):
89```
90MY_SHAARLI_VOLUME=$(cd /path/to/shaarli/data/ && pwd -P)
91docker run -ti --rm \
92 -p 8000:80 \
93 -v $MY_SHAARLI_VOLUME:/var/www/shaarli/data \
94 shaarli/shaarli
95```
diff --git a/doc/images/bookmarklet.png b/doc/md/images/bookmarklet.png
index 0262578e..0262578e 100644
--- a/doc/images/bookmarklet.png
+++ b/doc/md/images/bookmarklet.png
Binary files differ
diff --git a/doc/images/doc-logo.png b/doc/md/images/doc-logo.png
index 3d8d1787..3d8d1787 100644
--- a/doc/images/doc-logo.png
+++ b/doc/md/images/doc-logo.png
Binary files differ
diff --git a/doc/images/doc-logo.svg b/doc/md/images/doc-logo.svg
index 37fc6658..37fc6658 100644
--- a/doc/images/doc-logo.svg
+++ b/doc/md/images/doc-logo.svg
diff --git a/doc/images/firefoxshare.png b/doc/md/images/firefoxshare.png
index 98c2fdd3..98c2fdd3 100644
--- a/doc/images/firefoxshare.png
+++ b/doc/md/images/firefoxshare.png
Binary files differ
diff --git a/doc/md/images/install-shaarli.png b/doc/md/images/install-shaarli.png
new file mode 100644
index 00000000..7ae33816
--- /dev/null
+++ b/doc/md/images/install-shaarli.png
Binary files differ
diff --git a/doc/md/images/poedit-1.jpg b/doc/md/images/poedit-1.jpg
new file mode 100644
index 00000000..673ae6d6
--- /dev/null
+++ b/doc/md/images/poedit-1.jpg
Binary files differ
diff --git a/doc/images/rss-filter-1.png b/doc/md/images/rss-filter-1.png
index d2a03f67..d2a03f67 100644
--- a/doc/images/rss-filter-1.png
+++ b/doc/md/images/rss-filter-1.png
Binary files differ
diff --git a/doc/images/rss-filter-2.png b/doc/md/images/rss-filter-2.png
index 538b126e..538b126e 100644
--- a/doc/images/rss-filter-2.png
+++ b/doc/md/images/rss-filter-2.png
Binary files differ
diff --git a/doc/md/index.md b/doc/md/index.md
new file mode 100644
index 00000000..e77b4d3a
--- /dev/null
+++ b/doc/md/index.md
@@ -0,0 +1,129 @@
1# [Shaarli](https://github.com/shaarli/Shaarli/) documentation
2
3Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli.
4
5For general info, read the [README](https://github.com/shaarli/Shaarli/blob/master/README.md).
6
7If you have any questions or ideas, please join the [chat](https://gitter.im/shaarli/Shaarli) (also reachable via [IRC](https://irc.gitter.im/)), post them in our [general discussion](https://github.com/shaarli/Shaarli/issues/308) or read the current [issues](https://github.com/shaarli/Shaarli/issues).
8If you've found a bug, please create a [new issue](https://github.com/shaarli/Shaarli/issues/new).
9
10If you would like a feature added to Shaarli, check the issues labeled [`feature`](https://github.com/shaarli/Shaarli/labels/feature), [`enhancement`](https://github.com/shaarli/Shaarli/labels/enhancement), and [`plugin`](https://github.com/shaarli/Shaarli/labels/plugin).
11
12_Note: This documentation is available online at https://shaarli.readthedocs.io/, and locally in the `doc/html/` directory of your Shaarli installation._
13
14[![Join the chat at https://gitter.im/shaarli/Shaarli](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shaarli/Shaarli)
15[![Bountysource](https://www.bountysource.com/badge/team?team_id=19583&style=bounties_received)](https://www.bountysource.com/teams/shaarli/issues)
16[![Docker repository](https://img.shields.io/docker/pulls/shaarli/shaarli.svg)](https://hub.docker.com/r/shaarli/shaarli/)
17
18### Demo
19
20You can use this [public demo instance of Shaarli](https://demo.shaarli.org).
21It runs the latest development version of Shaarli and is updated/reset daily.
22
23Login: `demo`; Password: `demo`
24
25## Features
26
27Shaarli can be used:
28
29- to share, comment and save interesting links and news.
30- to bookmark useful/frequent personal links (as private links) and share them between computers.
31- as a minimal blog/microblog/writing platform (no character limit).
32- as a read-it-later list (for example items tagged `readlater`).
33- to draft and save articles/posts/ideas.
34- to keep code snippets.
35- to keep notes and documentation.
36- as a shared clipboard/notepad/pastebin between machines.
37- as a todo list.
38- to store playlists (e.g. with the `music` or `video` tags).
39- to keep extracts/comments from webpages that may disappear.
40- to keep track of ongoing discussions (for example items tagged `discussion`).
41- [to feed RSS aggregators](http://shaarli.chassegnouf.net/?9Efeiw) (planets) with specific tags.
42- to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...).
43
44### Interface
45- minimalist design (simple is beautiful)
46- FAST
47- ATOM and RSS feeds
48- views:
49 - paginated link list
50 - tag cloud
51 - picture wall: image and video thumbnails
52 - daily: newspaper-like daily digest
53 - daily RSS feed
54- permalinks for easy reference
55- links can be public or private
56- extensible through [plugins](https://shaarli.readthedocs.io/en/master/Plugins/#plugin-usage)
57
58### Tag, view and search your links!
59- add a custom title and description to archived links
60- add tags to classify and search links
61 - features tag autocompletion, renaming, merging and deletion
62- full-text and tag search
63
64### Easy setup
65- dead-simple installation: drop the files, open the page
66- links are stored in a file
67 - compact storage
68 - no database required
69 - easy backup: simply copy the datastore file
70- import and export links as Netscape bookmarks
71
72### Accessibility
73- Firefox bookmarlet to share links in one click
74- support for mobile browsers
75- works with Javascript disabled
76- easy page customization through HTML/CSS/RainTPL
77
78### Security
79- bruteforce-proof login form
80- protected against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
81and session cookie hijacking
82
83### Goodies
84- thumbnail generation for images and video services:
85dailymotion, flickr, imageshack, imgur, vimeo, xkcd, youtube...
86 - lazy-loading with [bLazy](http://dinbror.dk/blazy/)
87- [PubSubHubbub](https://code.google.com/p/pubsubhubbub/) protocol support
88- URL cleanup: automatic removal of `?utm_source=...`, `fb=...`
89- discreet pop-up notification when a new release is available
90
91### REST API
92
93Easily extensible by any client using the REST API exposed by Shaarli.
94
95See the [API documentation](http://shaarli.github.io/api-documentation/).
96
97### Using Shaarli as a blog, notepad, pastebin...
98- Go to your Shaarli setup and log in
99- Click the `Add Link` button
100- To share text only, do not enter any URL in the corresponding input field and click `Add Link`
101- Pick a title and enter your article, or note, in the description field; add a few tags; optionally check `Private` then click `Save`
102- Voilà! Your article is now published (privately if you selected that option) and accessible using its permalink.
103
104## About
105### Shaarli community fork
106This friendly fork is maintained by the Shaarli community at https://github.com/shaarli/Shaarli
107
108This is a community fork of the original [Shaarli](https://github.com/sebsauvage/Shaarli/) project by [Sébastien Sauvage](http://sebsauvage.net/).
109
110The original project is currently unmaintained, and the developer [has informed us](https://github.com/sebsauvage/Shaarli/issues/191)
111that he would have no time to work on Shaarli in the near future.
112The Shaarli community has carried on the work to provide
113[many patches](https://github.com/shaarli/Shaarli/compare/sebsauvage:master...master)
114for [bug fixes and enhancements](https://github.com/shaarli/Shaarli/issues?q=is%3Aclosed+)
115in this repository, and will keep maintaining the project for the foreseeable future, while keeping Shaarli simple and efficient.
116
117### Contributing
118If you'd like to help, please:
119- have a look at the open [issues](https://github.com/shaarli/Shaarli/issues)
120and [pull requests](https://github.com/shaarli/Shaarli/pulls)
121- feel free to report bugs (feedback is much appreciated)
122- suggest new features and improvements to both code and [documentation](https://github.com/shaarli/Shaarli/wiki)
123- propose solutions to existing problems
124- submit pull requests :-)
125
126
127### License
128Shaarli is [Free Software](http://en.wikipedia.org/wiki/Free_software). See [COPYING](COPYING) for a detail of the contributors and licenses for each individual component.
129
diff --git a/doc/sidebar.html b/doc/sidebar.html
deleted file mode 100644
index 4dad0161..00000000
--- a/doc/sidebar.html
+++ /dev/null
@@ -1,50 +0,0 @@
1<div id="local-sidebar">
2<ul>
3<li><a href="Home.html">Home</a></li>
4<li>Setup
5<ul>
6<li><a href="Download-and-Installation.html">Download and Installation</a></li>
7<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
8<li><a href="Server-requirements.html">Server requirements</a></li>
9<li><a href="Server-configuration.html">Server configuration</a></li>
10<li><a href="Server-security.html">Server security</a></li>
11<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
12<li><a href="Plugins.html">Plugins</a></li>
13</ul></li>
14<li><a href="Docker.html">Docker</a></li>
15<li><a href="Usage.html">Usage</a>
16<ul>
17<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
18<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
19<li><a href="Firefox-share.html">Firefox share</a></li>
20<li><a href="RSS-feeds.html">RSS feeds</a></li>
21</ul></li>
22<li>How To
23<ul>
24<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
25<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
26<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
27<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
28<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
29</ul></li>
30<li><a href="Troubleshooting.html">Troubleshooting</a></li>
31<li><a href="Development.html">Development</a>
32<ul>
33<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
34<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
35<li><a href="Directory-structure.html">Directory structure</a></li>
36<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
37<li><a href="Plugin-System.html">Plugin System</a></li>
38<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
39<li><a href="Security.html">Security</a></li>
40<li><a href="Static-analysis.html">Static analysis</a></li>
41<li><a href="Theming.html">Theming</a></li>
42<li><a href="Unit-tests.html">Unit tests</a></li>
43</ul></li>
44<li>About
45<ul>
46<li><a href="FAQ.html">FAQ</a></li>
47<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
48</ul></li>
49</ul>
50</div>
diff --git a/images/squiggle.png b/images/squiggle.png
deleted file mode 100644
index a6ce218c..00000000
--- a/images/squiggle.png
+++ /dev/null
Binary files differ
diff --git a/inc/awesomplete-multiple-tags.js b/inc/awesomplete-multiple-tags.js
index 4cc8429f..c38dc38e 100644
--- a/inc/awesomplete-multiple-tags.js
+++ b/inc/awesomplete-multiple-tags.js
@@ -1,13 +1,44 @@
1/** @licstart The following is the entire license notice for the
2 * JavaScript code in this page.
3 *
4 * Copyright: (c) 2011-2015 Sébastien SAUVAGE <sebsauvage@sebsauvage.net>
5 * (c) 2011-2017 The Shaarli Community, see AUTHORS
6 *
7 * This software is provided 'as-is', without any express or implied warranty.
8 * In no event will the authors be held liable for any damages arising from
9 * the use of this software.
10 *
11 * Permission is granted to anyone to use this software for any purpose,
12 * including commercial applications, and to alter it and redistribute it
13 * freely, subject to the following restrictions:
14 *
15 * 1. The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software. If you use this software
17 * in a product, an acknowledgment in the product documentation would
18 * be appreciated but is not required.
19 *
20 * 2. Altered source versions must be plainly marked as such, and must
21 * not be misrepresented as being the original software.
22 *
23 * 3. This notice may not be removed or altered from any source distribution.
24 *
25 * @licend The above is the entire license notice
26 * for the JavaScript code in this page.
27 */
28
1var awp = Awesomplete.$; 29var awp = Awesomplete.$;
2awesomplete = new Awesomplete(awp('input[data-multiple]'), { 30var autocompleteFields = document.querySelectorAll('input[data-multiple]');
3 filter: function(text, input) { 31[].forEach.call(autocompleteFields, function(autocompleteField) {
4 return Awesomplete.FILTER_CONTAINS(text, input.match(/[^ ]*$/)[0]); 32 awesomplete = new Awesomplete(awp(autocompleteField), {
5 }, 33 filter: function (text, input) {
6 replace: function(text) { 34 return Awesomplete.FILTER_CONTAINS(text, input.match(/[^ ]*$/)[0]);
7 var before = this.input.value.match(/^.+ \s*|/)[0]; 35 },
8 this.input.value = before + text + " "; 36 replace: function (text) {
9 }, 37 var before = this.input.value.match(/^.+ \s*|/)[0];
10 minChars: 1 38 this.input.value = before + text + " ";
39 },
40 minChars: 1
41 })
11}); 42});
12 43
13/** 44/**
diff --git a/inc/awesomplete.js b/inc/awesomplete.js
index fae550e2..32f49e5b 100644
--- a/inc/awesomplete.js
+++ b/inc/awesomplete.js
@@ -12,26 +12,23 @@
12 12
13 // Setup 13 // Setup
14 14
15 this.isOpened = false;
16
15 this.input = $(input); 17 this.input = $(input);
18 this.input.setAttribute("autocomplete", "off");
16 this.input.setAttribute("aria-autocomplete", "list"); 19 this.input.setAttribute("aria-autocomplete", "list");
17 20
18 o = o || {}; 21 o = o || {};
19 22
20 configure.call(this, { 23 configure(this, {
21 minChars: 2, 24 minChars: 2,
22 maxItems: 10, 25 maxItems: 10,
23 autoFirst: false, 26 autoFirst: false,
27 data: _.DATA,
24 filter: _.FILTER_CONTAINS, 28 filter: _.FILTER_CONTAINS,
25 sort: _.SORT_BYLENGTH, 29 sort: _.SORT_BYLENGTH,
26 item: function (text, input) { 30 item: _.ITEM,
27 return $.create("li", { 31 replace: _.REPLACE
28 innerHTML: text.replace(RegExp($.regExpEscape(input.trim()), "gi"), "<mark>$&</mark>"),
29 "aria-selected": "false"
30 });
31 },
32 replace: function (text) {
33 this.input.value = text;
34 }
35 }, o); 32 }, o);
36 33
37 this.index = -1; 34 this.index = -1;
@@ -44,7 +41,7 @@
44 }); 41 });
45 42
46 this.ul = $.create("ul", { 43 this.ul = $.create("ul", {
47 hidden: "", 44 hidden: "hidden",
48 inside: this.container 45 inside: this.container
49 }); 46 });
50 47
@@ -60,7 +57,7 @@
60 57
61 $.bind(this.input, { 58 $.bind(this.input, {
62 "input": this.evaluate.bind(this), 59 "input": this.evaluate.bind(this),
63 "blur": this.close.bind(this), 60 "blur": this.close.bind(this, { reason: "blur" }),
64 "keydown": function(evt) { 61 "keydown": function(evt) {
65 var c = evt.keyCode; 62 var c = evt.keyCode;
66 63
@@ -72,7 +69,7 @@
72 me.select(); 69 me.select();
73 } 70 }
74 else if (c === 27) { // Esc 71 else if (c === 27) { // Esc
75 me.close(); 72 me.close({ reason: "esc" });
76 } 73 }
77 else if (c === 38 || c === 40) { // Down/Up arrow 74 else if (c === 38 || c === 40) { // Down/Up arrow
78 evt.preventDefault(); 75 evt.preventDefault();
@@ -82,7 +79,7 @@
82 } 79 }
83 }); 80 });
84 81
85 $.bind(this.input.form, {"submit": this.close.bind(this)}); 82 $.bind(this.input.form, {"submit": this.close.bind(this, { reason: "submit" })});
86 83
87 $.bind(this.ul, {"mousedown": function(evt) { 84 $.bind(this.ul, {"mousedown": function(evt) {
88 var li = evt.target; 85 var li = evt.target;
@@ -93,15 +90,16 @@
93 li = li.parentNode; 90 li = li.parentNode;
94 } 91 }
95 92
96 if (li) { 93 if (li && evt.button === 0) { // Only select on left click
97 me.select(li); 94 evt.preventDefault();
95 me.select(li, evt.target);
98 } 96 }
99 } 97 }
100 }}); 98 }});
101 99
102 if (this.input.hasAttribute("list")) { 100 if (this.input.hasAttribute("list")) {
103 this.list = "#" + input.getAttribute("list"); 101 this.list = "#" + this.input.getAttribute("list");
104 input.removeAttribute("list"); 102 this.input.removeAttribute("list");
105 } 103 }
106 else { 104 else {
107 this.list = this.input.getAttribute("data-list") || o.list || []; 105 this.list = this.input.getAttribute("data-list") || o.list || [];
@@ -122,9 +120,18 @@
122 list = $(list); 120 list = $(list);
123 121
124 if (list && list.children) { 122 if (list && list.children) {
125 this._list = slice.apply(list.children).map(function (el) { 123 var items = [];
126 return el.innerHTML.trim(); 124 slice.apply(list.children).forEach(function (el) {
125 if (!el.disabled) {
126 var text = el.textContent.trim();
127 var value = el.value || text;
128 var label = el.label || text;
129 if (value !== "") {
130 items.push({ label: label, value: value });
131 }
132 }
127 }); 133 });
134 this._list = items;
128 } 135 }
129 } 136 }
130 137
@@ -138,18 +145,24 @@
138 }, 145 },
139 146
140 get opened() { 147 get opened() {
141 return this.ul && this.ul.getAttribute("hidden") == null; 148 return this.isOpened;
142 }, 149 },
143 150
144 close: function () { 151 close: function (o) {
152 if (!this.opened) {
153 return;
154 }
155
145 this.ul.setAttribute("hidden", ""); 156 this.ul.setAttribute("hidden", "");
157 this.isOpened = false;
146 this.index = -1; 158 this.index = -1;
147 159
148 $.fire(this.input, "awesomplete-close"); 160 $.fire(this.input, "awesomplete-close", o || {});
149 }, 161 },
150 162
151 open: function () { 163 open: function () {
152 this.ul.removeAttribute("hidden"); 164 this.ul.removeAttribute("hidden");
165 this.isOpened = true;
153 166
154 if (this.autoFirst && this.index === -1) { 167 if (this.autoFirst && this.index === -1) {
155 this.goto(0); 168 this.goto(0);
@@ -160,14 +173,14 @@
160 173
161 next: function () { 174 next: function () {
162 var count = this.ul.children.length; 175 var count = this.ul.children.length;
163 176 this.goto(this.index < count - 1 ? this.index + 1 : (count ? 0 : -1) );
164 this.goto(this.index < count - 1? this.index + 1 : -1);
165 }, 177 },
166 178
167 previous: function () { 179 previous: function () {
168 var count = this.ul.children.length; 180 var count = this.ul.children.length;
181 var pos = this.index - 1;
169 182
170 this.goto(this.selected? this.index - 1 : count - 1); 183 this.goto(this.selected && pos !== -1 ? pos : count - 1);
171 }, 184 },
172 185
173 // Should not be used, highlights specific item without any checks! 186 // Should not be used, highlights specific item without any checks!
@@ -183,28 +196,37 @@
183 if (i > -1 && lis.length > 0) { 196 if (i > -1 && lis.length > 0) {
184 lis[i].setAttribute("aria-selected", "true"); 197 lis[i].setAttribute("aria-selected", "true");
185 this.status.textContent = lis[i].textContent; 198 this.status.textContent = lis[i].textContent;
186 }
187 199
188 $.fire(this.input, "awesomplete-highlight"); 200 // scroll to highlighted element in case parent's height is fixed
201 this.ul.scrollTop = lis[i].offsetTop - this.ul.clientHeight + lis[i].clientHeight;
202
203 $.fire(this.input, "awesomplete-highlight", {
204 text: this.suggestions[this.index]
205 });
206 }
189 }, 207 },
190 208
191 select: function (selected) { 209 select: function (selected, origin) {
192 selected = selected || this.ul.children[this.index]; 210 if (selected) {
211 this.index = $.siblingIndex(selected);
212 } else {
213 selected = this.ul.children[this.index];
214 }
193 215
194 if (selected) { 216 if (selected) {
195 var prevented; 217 var suggestion = this.suggestions[this.index];
196 218
197 $.fire(this.input, "awesomplete-select", { 219 var allowed = $.fire(this.input, "awesomplete-select", {
198 text: selected.textContent, 220 text: suggestion,
199 preventDefault: function () { 221 origin: origin || selected
200 prevented = true;
201 }
202 }); 222 });
203 223
204 if (!prevented) { 224 if (allowed) {
205 this.replace(selected.textContent); 225 this.replace(suggestion);
206 this.close(); 226 this.close({ reason: "select" });
207 $.fire(this.input, "awesomplete-selectcomplete"); 227 $.fire(this.input, "awesomplete-selectcomplete", {
228 text: suggestion
229 });
208 } 230 }
209 } 231 }
210 }, 232 },
@@ -218,25 +240,28 @@
218 // Populate list with options that match 240 // Populate list with options that match
219 this.ul.innerHTML = ""; 241 this.ul.innerHTML = "";
220 242
221 this._list 243 this.suggestions = this._list
244 .map(function(item) {
245 return new Suggestion(me.data(item, value));
246 })
222 .filter(function(item) { 247 .filter(function(item) {
223 return me.filter(item, value); 248 return me.filter(item, value);
224 }) 249 })
225 .sort(this.sort) 250 .sort(this.sort)
226 .every(function(text, i) { 251 .slice(0, this.maxItems);
227 me.ul.appendChild(me.item(text, value));
228 252
229 return i < me.maxItems - 1; 253 this.suggestions.forEach(function(text) {
230 }); 254 me.ul.appendChild(me.item(text, value));
255 });
231 256
232 if (this.ul.children.length === 0) { 257 if (this.ul.children.length === 0) {
233 this.close(); 258 this.close({ reason: "nomatches" });
234 } else { 259 } else {
235 this.open(); 260 this.open();
236 } 261 }
237 } 262 }
238 else { 263 else {
239 this.close(); 264 this.close({ reason: "nomatches" });
240 } 265 }
241 } 266 }
242 }; 267 };
@@ -261,27 +286,58 @@
261 return a < b? -1 : 1; 286 return a < b? -1 : 1;
262 }; 287 };
263 288
289 _.ITEM = function (text, input) {
290 var html = input.trim() === '' ? text : text.replace(RegExp($.regExpEscape(input.trim()), "gi"), "<mark>$&</mark>");
291 return $.create("li", {
292 innerHTML: html,
293 "aria-selected": "false"
294 });
295 };
296
297 _.REPLACE = function (text) {
298 this.input.value = text.value;
299 };
300
301 _.DATA = function (item/*, input*/) { return item; };
302
264// Private functions 303// Private functions
265 304
266 function configure(properties, o) { 305 function Suggestion(data) {
306 var o = Array.isArray(data)
307 ? { label: data[0], value: data[1] }
308 : typeof data === "object" && "label" in data && "value" in data ? data : { label: data, value: data };
309
310 this.label = o.label || o.value;
311 this.value = o.value;
312 }
313 Object.defineProperty(Suggestion.prototype = Object.create(String.prototype), "length", {
314 get: function() { return this.label.length; }
315 });
316 Suggestion.prototype.toString = Suggestion.prototype.valueOf = function () {
317 return "" + this.label;
318 };
319
320 function configure(instance, properties, o) {
267 for (var i in properties) { 321 for (var i in properties) {
268 var initial = properties[i], 322 var initial = properties[i],
269 attrValue = this.input.getAttribute("data-" + i.toLowerCase()); 323 attrValue = instance.input.getAttribute("data-" + i.toLowerCase());
270 324
271 if (typeof initial === "number") { 325 if (typeof initial === "number") {
272 this[i] = +attrValue; 326 instance[i] = parseInt(attrValue);
273 } 327 }
274 else if (initial === false) { // Boolean options must be false by default anyway 328 else if (initial === false) { // Boolean options must be false by default anyway
275 this[i] = attrValue !== null; 329 instance[i] = attrValue !== null;
276 } 330 }
277 else if (initial instanceof Function) { 331 else if (initial instanceof Function) {
278 this[i] = null; 332 instance[i] = null;
279 } 333 }
280 else { 334 else {
281 this[i] = attrValue; 335 instance[i] = attrValue;
282 } 336 }
283 337
284 this[i] = this[i] || o[i] || initial; 338 if (!instance[i] && instance[i] !== 0) {
339 instance[i] = (i in o)? o[i] : initial;
340 }
285 } 341 }
286 } 342 }
287 343
@@ -343,23 +399,29 @@
343 evt[j] = properties[j]; 399 evt[j] = properties[j];
344 } 400 }
345 401
346 target.dispatchEvent(evt); 402 return target.dispatchEvent(evt);
347 }; 403 };
348 404
349 $.regExpEscape = function (s) { 405 $.regExpEscape = function (s) {
350 return s.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); 406 return s.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&");
351 } 407 };
408
409 $.siblingIndex = function (el) {
410 /* eslint-disable no-cond-assign */
411 for (var i = 0; el = el.previousElementSibling; i++);
412 return i;
413 };
352 414
353// Initialization 415// Initialization
354 416
355 function init() { 417 function init() {
356 $$("input.awesomplete").forEach(function (input) { 418 $$("input.awesomplete").forEach(function (input) {
357 new Awesomplete(input); 419 new _(input);
358 }); 420 });
359 } 421 }
360 422
361// Are we in a browser? Check for Document constructor 423// Are we in a browser? Check for Document constructor
362 if (typeof Document !== 'undefined') { 424 if (typeof Document !== "undefined") {
363 // DOM already loaded? 425 // DOM already loaded?
364 if (document.readyState !== "loading") { 426 if (document.readyState !== "loading") {
365 init(); 427 init();
@@ -374,15 +436,15 @@
374 _.$$ = $$; 436 _.$$ = $$;
375 437
376// Make sure to export Awesomplete on self when in a browser 438// Make sure to export Awesomplete on self when in a browser
377 if (typeof self !== 'undefined') { 439 if (typeof self !== "undefined") {
378 self.Awesomplete = _; 440 self.Awesomplete = _;
379 } 441 }
380 442
381// Expose Awesomplete as a CJS module 443// Expose Awesomplete as a CJS module
382 if (typeof exports === 'object') { 444 if (typeof module === "object" && module.exports) {
383 module.exports = _; 445 module.exports = _;
384 } 446 }
385 447
386 return _; 448 return _;
387 449
388}()); 450}()); \ No newline at end of file
diff --git a/inc/awesomplete.min.js b/inc/awesomplete.min.js
index 3bfb05e8..cd08c949 100644
--- a/inc/awesomplete.min.js
+++ b/inc/awesomplete.min.js
@@ -1,10 +1,3 @@
1// Awesomplete - Lea Verou - MIT license 1// Awesomplete - Lea Verou - MIT license
2(function(){function m(a,b){for(var c in a){var f=a[c],e=this.input.getAttribute("data-"+c.toLowerCase());this[c]="number"===typeof f?+e:!1===f?null!==e:f instanceof Function?null:e;this[c]=this[c]||b[c]||f}}function d(a,b){return"string"===typeof a?(b||document).querySelector(a):a||null}function h(a,b){return k.call((b||document).querySelectorAll(a))}function l(){h("input.awesomplete").forEach(function(a){new Awesomplete(a)})}var g=self.Awesomplete=function(a,b){var c=this;this.input=d(a);this.input.setAttribute("aria-autocomplete", 2!function(){function t(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}function e(t,e,i){for(var n in e){var s=e[n],r=t.input.getAttribute("data-"+n.toLowerCase());"number"==typeof s?t[n]=parseInt(r):s===!1?t[n]=null!==r:s instanceof Function?t[n]=null:t[n]=r,t[n]||0===t[n]||(t[n]=n in i?i[n]:s)}}function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function n(t,e){return o.call((e||document).querySelectorAll(t))}function s(){n("input.awesomplete").forEach(function(t){new r(t)})}var r=function(t,n){var s=this;this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),n=n||{},e(this,{minChars:2,maxItems:10,autoFirst:!1,data:r.DATA,filter:r.FILTER_CONTAINS,sort:r.SORT_BYLENGTH,item:r.ITEM,replace:r.REPLACE},n),this.index=-1,this.container=i.create("div",{className:"awesomplete",around:t}),this.ul=i.create("ul",{hidden:"hidden",inside:this.container}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-relevant":"additions",inside:this.container}),i.bind(this.input,{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;s.opened&&(13===e&&s.selected?(t.preventDefault(),s.select()):27===e?s.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),s[38===e?"previous":"next"]()))}}),i.bind(this.input.form,{submit:this.close.bind(this,{reason:"submit"})}),i.bind(this.ul,{mousedown:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),s.select(e,t.target))}}}),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],r.all.push(this)};r.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if(t=i(t),t&&t.children){var e=[];o.apply(t.children).forEach(function(t){if(!t.disabled){var i=t.textContent.trim(),n=t.value||i,s=t.label||i;""!==n&&e.push({label:s,value:n})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.ul.removeAttribute("hidden"),this.isOpened=!0,this.autoFirst&&this.index===-1&&this.goto(0),i.fire(this.input,"awesomplete-open")},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&e!==-1?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var n=this.suggestions[this.index],s=i.fire(this.input,"awesomplete-select",{text:n,origin:e||t});s&&(this.replace(n),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:n}))}},evaluate:function(){var e=this,i=this.input.value;i.length>=this.minChars&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(n){return new t(e.data(n,i))}).filter(function(t){return e.filter(t,i)}).sort(this.sort).slice(0,this.maxItems),this.suggestions.forEach(function(t){e.ul.appendChild(e.item(t,i))}),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):this.close({reason:"nomatches"})}},r.all=[],r.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},r.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},r.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},r.ITEM=function(t,e){var n=""===e?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return i.create("li",{innerHTML:n,"aria-selected":"false"})},r.REPLACE=function(t){this.input.value=t.value},r.DATA=function(t){return t},Object.defineProperty(t.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),t.prototype.toString=t.prototype.valueOf=function(){return""+this.label};var o=Array.prototype.slice;return i.create=function(t,e){var n=document.createElement(t);for(var s in e){var r=e[s];if("inside"===s)i(r).appendChild(n);else if("around"===s){var o=i(r);o.parentNode.insertBefore(n,o),n.appendChild(o)}else s in n?n[s]=r:n.setAttribute(s,r)}return n},i.bind=function(t,e){if(t)for(var i in e){var n=e[i];i.split(/\s+/).forEach(function(e){t.addEventListener(e,n)})}},i.fire=function(t,e,i){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0);for(var s in i)n[s]=i[s];return t.dispatchEvent(n)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof Document&&("loading"!==document.readyState?s():document.addEventListener("DOMContentLoaded",s)),r.$=i,r.$$=n,"undefined"!=typeof self&&(self.Awesomplete=r),"object"==typeof module&&module.exports&&(module.exports=r),r}();
3 "list");b=b||{};m.call(this,{minChars:2,maxItems:10,autoFirst:!1,filter:g.FILTER_CONTAINS,sort:g.SORT_BYLENGTH,item:function(a,b){return d.create("li",{innerHTML:a.replace(RegExp(d.regExpEscape(b.trim()),"gi"),"<mark>$&</mark>"),"aria-selected":"false"})},replace:function(a){this.input.value=a}},b);this.index=-1;this.container=d.create("div",{className:"awesomplete",around:a});this.ul=d.create("ul",{hidden:"",inside:this.container});this.status=d.create("span",{className:"visually-hidden",role:"status", 3//# sourceMappingURL=awesomplete.min.js.map \ No newline at end of file
4 "aria-live":"assertive","aria-relevant":"additions",inside:this.container});d.bind(this.input,{input:this.evaluate.bind(this),blur:this.close.bind(this),keydown:function(a){var b=a.keyCode;if(c.opened)if(13===b&&c.selected)a.preventDefault(),c.select();else if(27===b)c.close();else if(38===b||40===b)a.preventDefault(),c[38===b?"previous":"next"]()}});d.bind(this.input.form,{submit:this.close.bind(this)});d.bind(this.ul,{mousedown:function(a){a=a.target;if(a!==this){for(;a&&!/li/i.test(a.nodeName);)a=
5 a.parentNode;a&&c.select(a)}}});this.input.hasAttribute("list")?(this.list="#"+a.getAttribute("list"),a.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||b.list||[];g.all.push(this)};g.prototype={set list(a){Array.isArray(a)?this._list=a:"string"===typeof a&&-1<a.indexOf(",")?this._list=a.split(/\s*,\s*/):(a=d(a))&&a.children&&(this._list=k.apply(a.children).map(function(a){return a.innerHTML.trim()}));document.activeElement===this.input&&this.evaluate()},get selected(){return-1<
6this.index},get opened(){return this.ul&&null==this.ul.getAttribute("hidden")},close:function(){this.ul.setAttribute("hidden","");this.index=-1;d.fire(this.input,"awesomplete-close")},open:function(){this.ul.removeAttribute("hidden");this.autoFirst&&-1===this.index&&this.goto(0);d.fire(this.input,"awesomplete-open")},next:function(){this.goto(this.index<this.ul.children.length-1?this.index+1:-1)},previous:function(){var a=this.ul.children.length;this.goto(this.selected?this.index-1:a-1)},goto:function(a){var b=
7 this.ul.children;this.selected&&b[this.index].setAttribute("aria-selected","false");this.index=a;-1<a&&0<b.length&&(b[a].setAttribute("aria-selected","true"),this.status.textContent=b[a].textContent)},select:function(a){if(a=a||this.ul.children[this.index]){var b;d.fire(this.input,"awesomplete-select",{text:a.textContent,preventDefault:function(){b=!0}});b||(this.replace(a.textContent),this.close(),d.fire(this.input,"awesomplete-selectcomplete"))}},evaluate:function(){var a=this,b=this.input.value;
8 b.length>=this.minChars&&0<this._list.length?(this.index=-1,this.ul.innerHTML="",this._list.filter(function(c){return a.filter(c,b)}).sort(this.sort).every(function(c,d){a.ul.appendChild(a.item(c,b));return d<a.maxItems-1}),0===this.ul.children.length?this.close():this.open()):this.close()}};g.all=[];g.FILTER_CONTAINS=function(a,b){return RegExp(d.regExpEscape(b.trim()),"i").test(a)};g.FILTER_STARTSWITH=function(a,b){return RegExp("^"+d.regExpEscape(b.trim()),"i").test(a)};g.SORT_BYLENGTH=function(a,
9 b){return a.length!==b.length?a.length-b.length:a<b?-1:1};var k=Array.prototype.slice;d.create=function(a,b){var c=document.createElement(a),f;for(f in b){var e=b[f];"inside"===f?d(e).appendChild(c):"around"===f?(e=d(e),e.parentNode.insertBefore(c,e),c.appendChild(e)):f in c?c[f]=e:c.setAttribute(f,e)}return c};d.bind=function(a,b){if(a)for(var c in b){var d=b[c];c.split(/\s+/).forEach(function(b){a.addEventListener(b,d)})}};d.fire=function(a,b,c){var d=document.createEvent("HTMLEvents");d.initEvent(b,
10 !0,!0);for(var e in c)d[e]=c[e];a.dispatchEvent(d)};d.regExpEscape=function(a){return a.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")};"loading"!==document.readyState?l():document.addEventListener("DOMContentLoaded",l);g.$=d;g.$$=h})();
diff --git a/inc/languages/fr/LC_MESSAGES/shaarli.po b/inc/languages/fr/LC_MESSAGES/shaarli.po
new file mode 100644
index 00000000..323c6111
--- /dev/null
+++ b/inc/languages/fr/LC_MESSAGES/shaarli.po
@@ -0,0 +1,1367 @@
1msgid ""
2msgstr ""
3"Project-Id-Version: Shaarli\n"
4"POT-Creation-Date: 2017-11-11 10:59+0100\n"
5"PO-Revision-Date: 2017-11-11 11:00+0100\n"
6"Last-Translator: \n"
7"Language-Team: Shaarli\n"
8"Language: fr_FR\n"
9"MIME-Version: 1.0\n"
10"Content-Type: text/plain; charset=UTF-8\n"
11"Content-Transfer-Encoding: 8bit\n"
12"X-Generator: Poedit 2.0.4\n"
13"X-Poedit-Basepath: ../../../..\n"
14"Plural-Forms: nplurals=2; plural=(n > 1);\n"
15"X-Poedit-SourceCharset: UTF-8\n"
16"X-Poedit-KeywordsList: t:1,2;t\n"
17"X-Poedit-SearchPath-0: .\n"
18
19#: application/ApplicationUtils.php:153
20#, php-format
21msgid ""
22"Your PHP version is obsolete! Shaarli requires at least PHP %s, and thus "
23"cannot run. Your PHP version has known security vulnerabilities and should "
24"be updated as soon as possible."
25msgstr ""
26"Votre version de PHP est obsolète ! Shaarli nécessite au moins PHP %s, et ne "
27"peut donc pas fonctionner. Votre version de PHP a des failles de sécurités "
28"connues et devrait être mise à jour au plus tôt."
29
30#: application/ApplicationUtils.php:183 application/ApplicationUtils.php:195
31msgid "directory is not readable"
32msgstr "le répertoire n'est pas accessible en lecture"
33
34#: application/ApplicationUtils.php:198
35msgid "directory is not writable"
36msgstr "le répertoire n'est pas accessible en écriture"
37
38#: application/ApplicationUtils.php:216
39msgid "file is not readable"
40msgstr "le fichier n'est pas accessible en lecture"
41
42#: application/ApplicationUtils.php:219
43msgid "file is not writable"
44msgstr "le fichier n'est pas accessible en écriture"
45
46#: application/Cache.php:16
47#, php-format
48msgid "Cannot purge %s: no directory"
49msgstr "Impossible de purger %s: le répertoire n'existe pas"
50
51#: application/FeedBuilder.php:151
52msgid "Direct link"
53msgstr "Liens directs"
54
55#: application/FeedBuilder.php:153
56#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:88
57#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:178
58msgid "Permalink"
59msgstr "Permalien"
60
61#: application/History.php:174
62msgid "History file isn't readable or writable"
63msgstr "Le fichier d'historique n'est pas accessible en lecture ou en écriture"
64
65#: application/History.php:185
66msgid "Could not parse history file"
67msgstr "Format incorrect pour le fichier d'historique"
68
69#: application/Languages.php:159
70msgid "Automatic"
71msgstr "Automatique"
72
73#: application/Languages.php:160
74msgid "English"
75msgstr "Anglais"
76
77#: application/Languages.php:161
78msgid "French"
79msgstr "Français"
80
81#: application/LinkDB.php:136
82msgid "You are not authorized to add a link."
83msgstr "Vous n'êtes pas autorisé à ajouter un lien."
84
85#: application/LinkDB.php:139
86msgid "Internal Error: A link should always have an id and URL."
87msgstr "Erreur interne : un lien devrait toujours avoir un ID et une URL."
88
89#: application/LinkDB.php:142
90msgid "You must specify an integer as a key."
91msgstr "Vous devez utiliser un entier comme clé."
92
93#: application/LinkDB.php:145
94msgid "Array offset and link ID must be equal."
95msgstr "La clé du tableau et l'ID du lien doivent être égaux."
96
97#: application/LinkDB.php:251
98#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14
99#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48
100#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:14
101#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:48
102msgid ""
103"The personal, minimalist, super-fast, database free, bookmarking service"
104msgstr ""
105"Le gestionnaire de marque-page personnel, minimaliste, et sans base de "
106"données"
107
108#: application/LinkDB.php:253
109msgid ""
110"Welcome to Shaarli! This is your first public bookmark. To edit or delete "
111"me, you must first login.\n"
112"\n"
113"To learn how to use Shaarli, consult the link \"Documentation\" at the "
114"bottom of this page.\n"
115"\n"
116"You use the community supported version of the original Shaarli project, by "
117"Sebastien Sauvage."
118msgstr ""
119"Bienvenue sur Shaarli ! Ceci est votre premier marque-page public. Pour me "
120"modifier ou me supprimer, vous devez d'abord vous connecter.\n"
121"\n"
122"Pour apprendre comment utiliser Shaarli, consultez le lien « Documentation » "
123"en bas de page.\n"
124"\n"
125"Vous utilisez la version supportée par la communauté du projet original "
126"Shaarli, de Sébastien Sauvage."
127
128#: application/LinkDB.php:267
129msgid "My secret stuff... - Pastebin.com"
130msgstr "Mes trucs secrets... - Pastebin.com"
131
132#: application/LinkDB.php:269
133msgid "Shhhh! I'm a private link only YOU can see. You can delete me too."
134msgstr ""
135"Pssst ! Je suis un lien privé que VOUS êtes le seul à voir. Vous pouvez me "
136"supprimer aussi."
137
138#: application/LinkFilter.php:452
139msgid "The link you are trying to reach does not exist or has been deleted."
140msgstr "Le lien que vous essayez de consulter n'existe pas ou a été supprimé."
141
142#: application/NetscapeBookmarkUtils.php:35
143msgid "Invalid export selection:"
144msgstr "Sélection d'export invalide :"
145
146#: application/NetscapeBookmarkUtils.php:81
147#, php-format
148msgid "File %s (%d bytes) "
149msgstr "Le fichier %s (%d octets) "
150
151#: application/NetscapeBookmarkUtils.php:83
152msgid "has an unknown file format. Nothing was imported."
153msgstr "a un format inconnu. Rien n'a été importé."
154
155#: application/NetscapeBookmarkUtils.php:86
156#, php-format
157msgid ""
158"was successfully processed in %d seconds: %d links imported, %d links "
159"overwritten, %d links skipped."
160msgstr ""
161"a été importé avec succès en %d secondes : %d liens importés, %d liens "
162"écrasés, %d liens ignorés."
163
164#: application/PageBuilder.php:167
165msgid "The page you are trying to reach does not exist or has been deleted."
166msgstr "La page que vous essayez de consulter n'existe pas ou a été supprimée."
167
168#: application/PageBuilder.php:169
169msgid "404 Not Found"
170msgstr "404 Introuvable"
171
172#: application/PluginManager.php:243
173#, php-format
174msgid "Plugin \"%s\" files not found."
175msgstr "Les fichiers de l'extension \"%s\" sont introuvables."
176
177#: application/Updater.php:76
178msgid "Couldn't retrieve Updater class methods."
179msgstr "Impossible de récupérer les méthodes de la classe Updater."
180
181#: application/Updater.php:493
182msgid "An error occurred while running the update "
183msgstr "Une erreur s'est produite lors de l'exécution de la mise à jour "
184
185#: application/Updater.php:533
186msgid "Updates file path is not set, can't write updates."
187msgstr ""
188"Le chemin vers le fichier de mise à jour n'est pas défini, impossible "
189"d'écrire les mises à jour."
190
191#: application/Updater.php:538
192msgid "Unable to write updates in "
193msgstr "Impossible d'écrire les mises à jour dans "
194
195#: application/Utils.php:376 tests/UtilsTest.php:340
196msgid "Setting not set"
197msgstr "Paramètre non défini"
198
199#: application/Utils.php:383 tests/UtilsTest.php:338 tests/UtilsTest.php:339
200msgid "Unlimited"
201msgstr "Illimité"
202
203#: application/Utils.php:386 tests/UtilsTest.php:335 tests/UtilsTest.php:336
204#: tests/UtilsTest.php:350
205msgid "B"
206msgstr "o"
207
208#: application/Utils.php:386 tests/UtilsTest.php:329 tests/UtilsTest.php:330
209#: tests/UtilsTest.php:337
210msgid "kiB"
211msgstr "ko"
212
213#: application/Utils.php:386 tests/UtilsTest.php:331 tests/UtilsTest.php:332
214#: tests/UtilsTest.php:348 tests/UtilsTest.php:349
215msgid "MiB"
216msgstr "Mo"
217
218#: application/Utils.php:386 tests/UtilsTest.php:333 tests/UtilsTest.php:334
219msgid "GiB"
220msgstr "Go"
221
222#: application/config/ConfigJson.php:52 application/config/ConfigPhp.php:121
223msgid ""
224"Shaarli could not create the config file. Please make sure Shaarli has the "
225"right to write in the folder is it installed in."
226msgstr ""
227"Shaarli n'a pas pu créer le fichier de configuration. Merci de vérifier que "
228"Shaarli a les droits d'écriture dans le dossier dans lequel il est installé."
229
230#: application/config/ConfigManager.php:135
231msgid "Invalid setting key parameter. String expected, got: "
232msgstr "Clé de paramétrage invalide. Chaîne de caractères obtenue, attendu : "
233
234#: application/config/exception/MissingFieldConfigException.php:21
235#, php-format
236msgid "Configuration value is required for %s"
237msgstr "Le paramètre %s est obligatoire"
238
239#: application/config/exception/PluginConfigOrderException.php:15
240msgid "An error occurred while trying to save plugins loading order."
241msgstr ""
242"Une erreur s'est produite lors de la sauvegarde de l'ordre des extensions."
243
244#: application/config/exception/UnauthorizedConfigException.php:16
245msgid "You are not authorized to alter config."
246msgstr "Vous n'êtes pas autorisé à modifier la configuration."
247
248#: application/exceptions/IOException.php:19
249msgid "Error accessing"
250msgstr "Une erreur s'est produite en accédant à"
251
252#: index.php:135
253msgid "Shared links on "
254msgstr "Liens partagés sur "
255
256#: index.php:157
257msgid "Insufficient permissions:"
258msgstr "Permissions insuffisantes :"
259
260#: index.php:384
261msgid "I said: NO. You are banned for the moment. Go away."
262msgstr "NON. Vous êtes banni pour le moment. Revenez plus tard."
263
264#: index.php:449
265msgid "Wrong login/password."
266msgstr "Nom d'utilisateur ou mot de passe incorrects."
267
268#: index.php:1092
269msgid "You are not supposed to change a password on an Open Shaarli."
270msgstr ""
271"Vous n'êtes pas censé modifier le mot de passe d'un Shaarli en mode ouvert."
272
273#: index.php:1097 index.php:1138 index.php:1214 index.php:1244 index.php:1344
274msgid "Wrong token."
275msgstr "Jeton invalide."
276
277#: index.php:1102
278msgid "The old password is not correct."
279msgstr "L'ancien mot de passe est incorrect."
280
281#: index.php:1122
282msgid "Your password has been changed"
283msgstr "Votre mot de passe a été modifié"
284
285#: index.php:1175
286msgid "Configuration was saved."
287msgstr "La configuration a été sauvegardé."
288
289#: index.php:1226
290#, php-format
291msgid "The tag was removed from %d link."
292msgid_plural "The tag was removed from %d links."
293msgstr[0] "Le tag a été supprimé de %d lien."
294msgstr[1] "Le tag a été supprimé de %d liens."
295
296#: index.php:1227
297#, php-format
298msgid "The tag was renamed in %d link."
299msgid_plural "The tag was renamed in %d links."
300msgstr[0] "Le tag a été renommé dans %d lien."
301msgstr[1] "Le tag a été renommé dans %d liens."
302
303#: index.php:1443
304msgid "Note: "
305msgstr "Note : "
306
307#: index.php:1552
308#, php-format
309msgid ""
310"The file you are trying to upload is probably bigger than what this "
311"webserver can accept (%s). Please upload in smaller chunks."
312msgstr ""
313"Le fichier que vous essayer d'envoyer est probablement plus lourd que ce que "
314"le serveur web peut accepter (%s). Merci de l'envoyer en parties plus "
315"légères."
316
317#: index.php:1972
318#, php-format
319msgid ""
320"<pre>Sessions do not seem to work correctly on your server.<br>Make sure the "
321"variable \"session.save_path\" is set correctly in your PHP config, and that "
322"you have write access to it.<br>It currently points to %s.<br>On some "
323"browsers, accessing your server via a hostname like 'localhost' or any "
324"custom hostname without a dot causes cookie storage to fail. We recommend "
325"accessing your server via it's IP address or Fully Qualified Domain Name.<br>"
326msgstr ""
327"<pre>Les sesssions ne semble pas fonctionner sur ce serveur.<br>Assurez vous "
328"que la variable « session.save_path » est correctement définie dans votre "
329"fichier de configuration PHP, et que vous y avez les droits d'écriture."
330"<br>Ce paramètre pointe actuellement sur %s.<br>Sur certains navigateurs, "
331"accéder à votre serveur depuis un nom d'hôte comme « localhost » ou autre "
332"nom personnalisé sans point '.' entraine l'échec de la sauvegarde des "
333"cookies. Nous vous recommandons d'accéder à votre serveur depuis son adresse "
334"IP ou un <em>Fully Qualified Domain Name</em>.<br>"
335
336#: index.php:1982
337msgid "Click to try again."
338msgstr "Cliquer ici pour réessayer."
339
340#: plugins/addlink_toolbar/addlink_toolbar.php:29
341msgid "URI"
342msgstr "URI"
343
344#: plugins/addlink_toolbar/addlink_toolbar.php:33
345#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19
346msgid "Add link"
347msgstr "Shaare"
348
349#: plugins/addlink_toolbar/addlink_toolbar.php:50
350msgid "Adds the addlink input on the linklist page."
351msgstr "Ajout le formulaire d'ajout de liens sur la page principale."
352
353#: plugins/archiveorg/archiveorg.php:23
354msgid "View on archive.org"
355msgstr "Voir sur archive.org"
356
357#: plugins/archiveorg/archiveorg.php:36
358msgid "For each link, add an Archive.org icon."
359msgstr "Pour chaque lien, ajoute une icône pour Archive.org."
360
361#: plugins/demo_plugin/demo_plugin.php:469
362msgid ""
363"A demo plugin covering all use cases for template designers and plugin "
364"developers."
365msgstr ""
366"Une extension de démonstration couvrant tous les cas d'utilisation pour les "
367"designers et les développeurs."
368
369#: plugins/isso/isso.php:20
370msgid ""
371"Isso plugin error: Please define the \"ISSO_SERVER\" setting in the plugin "
372"administration page."
373msgstr ""
374"Erreur de l'extension Isso : Merci de définir le paramètre « ISSO_SERVER » "
375"dans la page d'administration des extensions."
376
377#: plugins/isso/isso.php:63
378msgid "Let visitor comment your shaares on permalinks with Isso."
379msgstr ""
380"Permet aux visiteurs de commenter vos shaares sur les permaliens avec Isso."
381
382#: plugins/isso/isso.php:64
383msgid "Isso server URL (without 'http://')"
384msgstr "URL du serveur Isso (sans 'http://')"
385
386#: plugins/markdown/markdown.php:159
387msgid "Description will be rendered with"
388msgstr "La description sera générée avec"
389
390#: plugins/markdown/markdown.php:160
391msgid "Markdown syntax documentation"
392msgstr "Documentation sur la syntaxe Markdown"
393
394#: plugins/markdown/markdown.php:161
395msgid "Markdown syntax"
396msgstr "la syntaxe Markdown"
397
398#: plugins/markdown/markdown.php:340
399msgid ""
400"Render shaare description with Markdown syntax.<br><strong>Warning</"
401"strong>:\n"
402"If your shaared descriptions contained HTML tags before enabling the "
403"markdown plugin,\n"
404"enabling it might break your page.\n"
405"See the <a href=\"https://github.com/shaarli/Shaarli/tree/master/plugins/"
406"markdown#html-rendering\">README</a>."
407msgstr ""
408"Utilise la syntaxe Markdown pour la description des liens."
409"<br><strong>Attention</strong> :\n"
410"Si vous aviez des descriptions contenant du HTML avant d'activer cette "
411"extension,\n"
412"l'activer pourrait déformer vos pages.\n"
413"Voir le <a href=\"https://github.com/shaarli/Shaarli/tree/master/plugins/"
414"markdown#html-rendering\">README</a>."
415
416#: plugins/piwik/piwik.php:21
417msgid ""
418"Piwik plugin error: Please define PIWIK_URL and PIWIK_SITEID in the plugin "
419"administration page."
420msgstr ""
421"Erreur de l'extension Piwik : Merci de définir les paramètres PIWIK_URL et "
422"PIWIK_SITEID dans la page d'administration des extensions."
423
424#: plugins/piwik/piwik.php:70
425msgid "A plugin that adds Piwik tracking code to Shaarli pages."
426msgstr "Ajoute le code de traçage de Piwik sur les pages de Shaarli."
427
428#: plugins/piwik/piwik.php:71
429msgid "Piwik URL"
430msgstr "URL de Piwik"
431
432#: plugins/piwik/piwik.php:72
433msgid "Piwik site ID"
434msgstr "Site ID de Piwik"
435
436#: plugins/playvideos/playvideos.php:22
437msgid "Video player"
438msgstr "Lecteur vidéo"
439
440#: plugins/playvideos/playvideos.php:25
441msgid "Play Videos"
442msgstr "Jouer les vidéos"
443
444#: plugins/playvideos/playvideos.php:56
445msgid "Add a button in the toolbar allowing to watch all videos."
446msgstr ""
447"Ajoute un bouton dans la barre de menu pour regarder toutes les vidéos."
448
449#: plugins/playvideos/youtube_playlist.js:214
450msgid "plugins/playvideos/jquery-1.11.2.min.js"
451msgstr ""
452
453#: plugins/pubsubhubbub/pubsubhubbub.php:69
454#, php-format
455msgid "Could not publish to PubSubHubbub: %s"
456msgstr "Impossible de publier vers PubSubHubbub : %s"
457
458#: plugins/pubsubhubbub/pubsubhubbub.php:95
459#, php-format
460msgid "Could not post to %s"
461msgstr "Impossible de publier vers %s"
462
463#: plugins/pubsubhubbub/pubsubhubbub.php:99
464#, php-format
465msgid "Bad response from the hub %s"
466msgstr "Mauvaise réponse du hub %s"
467
468#: plugins/pubsubhubbub/pubsubhubbub.php:110
469msgid "Enable PubSubHubbub feed publishing."
470msgstr "Active la publication de flux vers PubSubHubbub."
471
472#: plugins/qrcode/qrcode.php:69 plugins/wallabag/wallabag.php:68
473msgid "For each link, add a QRCode icon."
474msgstr "Pour chaque liens, ajouter une icône de QRCode."
475
476#: plugins/wallabag/wallabag.php:21
477msgid ""
478"Wallabag plugin error: Please define the \"WALLABAG_URL\" setting in the "
479"plugin administration page."
480msgstr ""
481"Erreur de l'extension Wallabag : Merci de définir le paramètre « "
482"WALLABAG_URL » dans la page d'administration des extensions."
483
484#: plugins/wallabag/wallabag.php:47
485msgid "Save to wallabag"
486msgstr "Sauvegarder dans Wallabag"
487
488#: plugins/wallabag/wallabag.php:69
489msgid "Wallabag API URL"
490msgstr "URL de l'API Wallabag"
491
492#: plugins/wallabag/wallabag.php:70
493msgid "Wallabag API version (1 or 2)"
494msgstr "Version de l'API Wallabag (1 ou 2)"
495
496#: tests/LanguagesTest.php:188 tests/LanguagesTest.php:201
497#: tests/languages/fr/LanguagesFrTest.php:160
498#: tests/languages/fr/LanguagesFrTest.php:173
499#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:81
500#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:81
501msgid "Search"
502msgid_plural "Search"
503msgstr[0] "Rechercher"
504msgstr[1] "Rechercher"
505
506#: tmp/404.b91ef64efc3688266305ea9b42e5017e.rtpl.php:12
507msgid "Sorry, nothing to see here."
508msgstr "Désolé, il y a rien à voir ici."
509
510#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13
511msgid "Shaare a new link"
512msgstr "Partager un nouveau lien"
513
514#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16
515msgid "URL or leave empty to post a note"
516msgstr "URL ou laisser vide pour créer une note"
517
518#: tmp/changepassword.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13
519#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29
520msgid "Change password"
521msgstr "Modification du mot de passe"
522
523#: tmp/changepassword.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16
524msgid "Current password"
525msgstr "Mot de passe actuel"
526
527#: tmp/changepassword.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19
528msgid "New password"
529msgstr "Nouveau mot de passe"
530
531#: tmp/changepassword.b91ef64efc3688266305ea9b42e5017e.rtpl.php:23
532msgid "Change"
533msgstr "Changer"
534
535#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13
536#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36
537msgid "Manage tags"
538msgstr "Gérer les tags"
539
540#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16
541#: tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:77
542msgid "Tag"
543msgstr "Tag"
544
545#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24
546msgid "New name"
547msgstr "Nouveau nom"
548
549#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:31
550msgid "Case sensitive"
551msgstr "Sensible à la casse"
552
553#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:34
554msgid "Rename"
555msgstr "Renommer"
556
557#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:35
558#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:79
559#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:172
560msgid "Delete"
561msgstr "Supprimer"
562
563#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39
564msgid "You can also edit tags in the"
565msgstr "Vous pouvez aussi modifier les tags dans la"
566
567#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39
568msgid "tag list"
569msgstr "liste des tags"
570
571#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24
572msgid "Configure"
573msgstr "Configurer"
574
575#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29
576msgid "title"
577msgstr "titre"
578
579#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:43
580msgid "Home link"
581msgstr "Lien vers l'accueil"
582
583#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44
584msgid "Default value"
585msgstr "Valeur par défaut"
586
587#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:58
588msgid "Theme"
589msgstr "Thème"
590
591#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:87
592#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:78
593msgid "Language"
594msgstr "Langue"
595
596#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:116
597#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:102
598msgid "Timezone"
599msgstr "Fuseau horaire"
600
601#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:117
602#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:103
603msgid "Continent"
604msgstr "Continent"
605
606#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:117
607#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:103
608msgid "City"
609msgstr "Ville"
610
611#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:164
612msgid "Disable session cookie hijacking protection"
613msgstr "Désactiver la protection contre le détournement de cookies"
614
615#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:166
616msgid "Check this if you get disconnected or if your IP address changes often"
617msgstr ""
618"Cocher cette case si vous êtes souvent déconnecté ou si votre adresse IP "
619"change souvent"
620
621#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:183
622msgid "Private links by default"
623msgstr "Liens privés par défaut"
624
625#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:184
626msgid "All new links are private by default"
627msgstr "Tous les nouveaux liens sont privés par défaut"
628
629#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:199
630msgid "RSS direct links"
631msgstr "Liens directs dans le flux RSS"
632
633#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:200
634msgid "Check this to use direct URL instead of permalink in feeds"
635msgstr ""
636"Cocher cette case pour utiliser des liens directs au lieu des permaliens "
637"dans le flux RSS"
638
639#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:215
640msgid "Hide public links"
641msgstr "Cacher les liens publics"
642
643#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:216
644msgid "Do not show any links if the user is not logged in"
645msgstr "N'afficher aucun lien sans être connecté"
646
647#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:231
648#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:150
649msgid "Check updates"
650msgstr "Vérifier les mises à jour"
651
652#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:232
653#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:152
654msgid "Notify me when a new release is ready"
655msgstr "Me notifier lorsqu'une nouvelle version est disponible"
656
657#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:247
658#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:169
659msgid "Enable REST API"
660msgstr "Activer l'API REST"
661
662#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:248
663#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:170
664msgid "Allow third party software to use Shaarli such as mobile application"
665msgstr ""
666"Permets aux applications tierces d'utiliser Shaarli, par exemple les "
667"applications mobiles"
668
669#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:263
670msgid "API secret"
671msgstr "Clé d'API secrète"
672
673#: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:274
674#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:74
675#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:139
676#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:199
677msgid "Save"
678msgstr "Enregistrer"
679
680#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
681msgid "The Daily Shaarli"
682msgstr "Le Quotidien Shaarli"
683
684#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:17
685msgid "1 RSS entry per day"
686msgstr "1 entrée RSS par jour"
687
688#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:37
689msgid "Previous day"
690msgstr "Jour précédent"
691
692#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44
693msgid "All links of one day in a single page."
694msgstr "Tous les liens d'un jour sur une page."
695
696#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:51
697msgid "Next day"
698msgstr "Jour suivant"
699
700#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14
701#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:170
702msgid "Edit"
703msgstr "Modifier"
704
705#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16
706#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26
707#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:26
708msgid "Shaare"
709msgstr "Shaare"
710
711#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:25
712msgid "Created:"
713msgstr "Création :"
714
715#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28
716msgid "URL"
717msgstr "URL"
718
719#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:34
720msgid "Title"
721msgstr "Titre"
722
723#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40
724#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42
725#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:75
726#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:99
727#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:124
728msgid "Description"
729msgstr "Description"
730
731#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:46
732msgid "Tags"
733msgstr "Tags"
734
735#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:59
736#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36
737#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:168
738msgid "Private"
739msgstr "Privé"
740
741#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:74
742msgid "Apply Changes"
743msgstr "Appliquer les changements"
744
745#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16
746msgid "Export Database"
747msgstr "Exporter les données"
748
749#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24
750msgid "Selection"
751msgstr "Choisir"
752
753#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:31
754msgid "All"
755msgstr "Tous"
756
757#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41
758msgid "Public"
759msgstr "Publics"
760
761#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:52
762msgid "Prepend note permalinks with this Shaarli instance's URL"
763msgstr "Préfixer les liens de notes avec l'URL de l'instance de Shaarli"
764
765#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:53
766msgid "Useful to import bookmarks in a web browser"
767msgstr "Utile pour importer les marques-pages dans un navigateur"
768
769#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:65
770msgid "Export"
771msgstr "Exporter"
772
773#: tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16
774msgid "Import Database"
775msgstr "Importer des données"
776
777#: tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:23
778msgid "Maximum size allowed:"
779msgstr "Taille maximum autorisée :"
780
781#: tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29
782msgid "Visibility"
783msgstr "Visibilité"
784
785#: tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36
786msgid "Use values from the imported file, default to public"
787msgstr ""
788"Utiliser les valeurs présentes dans le fichier d'import, public par défaut"
789
790#: tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41
791msgid "Import all bookmarks as private"
792msgstr "Importer tous les liens comme privés"
793
794#: tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:46
795msgid "Import all bookmarks as public"
796msgstr "Importer tous les liens comme publics"
797
798#: tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:57
799msgid "Overwrite existing bookmarks"
800msgstr "Remplacer les liens existants"
801
802#: tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:58
803msgid "Duplicates based on URL"
804msgstr "Les doublons s'appuient sur les URL"
805
806#: tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:72
807msgid "Add default tags"
808msgstr "Ajouter des tags par défaut"
809
810#: tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83
811msgid "Import"
812msgstr "Importer"
813
814#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:22
815msgid "Install Shaarli"
816msgstr "Installation de Shaarli"
817
818#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:25
819msgid "It looks like it's the first time you run Shaarli. Please configure it."
820msgstr ""
821"Il semblerait que ça soit la première fois que vous lancez Shaarli. Merci de "
822"le configurer."
823
824#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:33
825#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30
826#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:147
827#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:147
828msgid "Username"
829msgstr "Nom d'utilisateur"
830
831#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48
832#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:34
833#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:148
834#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:148
835msgid "Password"
836msgstr "Mot de passe"
837
838#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:63
839msgid "Shaarli title"
840msgstr "Titre du Shaarli"
841
842#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:69
843msgid "My links"
844msgstr "Mes liens"
845
846#: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:182
847msgid "Install"
848msgstr "Installer"
849
850#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14
851#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:80
852msgid "shaare"
853msgid_plural "shaares"
854msgstr[0] "shaare"
855msgstr[1] "shaares"
856
857#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18
858#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:84
859msgid "private link"
860msgid_plural "private links"
861msgstr[0] "lien privé"
862msgstr[1] "liens privés"
863
864#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:31
865#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:117
866#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:117
867msgid "Search text"
868msgstr "Recherche texte"
869
870#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:38
871#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:124
872#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:124
873#: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:33
874#: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:61
875#: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:33
876#: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:71
877msgid "Filter by tag"
878msgstr "Filtrer par tag"
879
880#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:111
881msgid "Nothing found."
882msgstr "Aucun résultat."
883
884#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:119
885#, php-format
886msgid "%s result"
887msgid_plural "%s results"
888msgstr[0] "%s résultat"
889msgstr[1] "%s résultats"
890
891#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:123
892msgid "for"
893msgstr "pour"
894
895#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:130
896msgid "tagged"
897msgstr "taggé"
898
899#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:134
900msgid "Remove tag"
901msgstr "Retirer le tag"
902
903#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:143
904msgid "with status"
905msgstr "avec le statut"
906
907#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:154
908msgid "without any tag"
909msgstr "sans tag"
910
911#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:174
912#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42
913#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:42
914msgid "Fold"
915msgstr "Replier"
916
917#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:176
918msgid "Edited: "
919msgstr "Modifié : "
920
921#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:180
922msgid "permalink"
923msgstr "permalien"
924
925#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:182
926msgid "Add tag"
927msgstr "Ajouter un tag"
928
929#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:7
930#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:7
931msgid "Filters"
932msgstr "Filtres"
933
934#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:12
935#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:12
936msgid "Filter private links"
937msgstr "Filtrer par liens privés"
938
939#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18
940#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:18
941msgid "Filter untagged links"
942msgstr "Filtrer par liens privés"
943
944#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:22
945#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:74
946#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:22
947#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:74
948#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:43
949#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:43
950msgid "Fold all"
951msgstr "Replier tout"
952
953#: tmp/linklist.paging.b91ef64efc3688266305ea9b42e5017e.rtpl.php:67
954#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:67
955msgid "Links per page"
956msgstr "Liens par page"
957
958#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
959msgid ""
960"You have been banned after too many failed login attempts. Try again later."
961msgstr ""
962"Vous avez été banni après trop d'échec d'authentification. Merci de "
963"réessayer plus tard."
964
965#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28
966#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44
967#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:71
968#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:95
969#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:71
970#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:95
971msgid "Login"
972msgstr "Connexion"
973
974#: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41
975#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:151
976#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:151
977msgid "Remember me"
978msgstr "Rester connecté"
979
980#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14
981#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48
982#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:14
983#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:48
984msgid "by the Shaarli community"
985msgstr "par la communauté Shaarli"
986
987#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
988#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15
989msgid "Documentation"
990msgstr "Documentation"
991
992#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44
993#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:44
994msgid "Expand"
995msgstr "Déplier"
996
997#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:45
998#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:45
999msgid "Expand all"
1000msgstr "Déplier tout"
1001
1002#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:46
1003#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:46
1004msgid "Are you sure you want to delete this link?"
1005msgstr "Êtes-vous sûr de vouloir supprimer ce lien ?"
1006
1007#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:31
1008#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:31
1009msgid "Tools"
1010msgstr "Outils"
1011
1012#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36
1013#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:36
1014#: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19
1015msgid "Tag cloud"
1016msgstr "Nuage de tags"
1017
1018#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39
1019#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:39
1020msgid "Picture wall"
1021msgstr "Mur d'images"
1022
1023#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42
1024#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:42
1025msgid "Daily"
1026msgstr "Quotidien"
1027
1028#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:61
1029#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:86
1030#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:61
1031#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:86
1032msgid "RSS Feed"
1033msgstr "Flux RSS"
1034
1035#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:66
1036#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:102
1037#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:66
1038#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:102
1039msgid "Logout"
1040msgstr "Déconnexion"
1041
1042#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:169
1043#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:169
1044msgid "is available"
1045msgstr "est disponible"
1046
1047#: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:176
1048#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:176
1049msgid "Error"
1050msgstr "Erreur"
1051
1052#: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16
1053msgid "Picture Wall"
1054msgstr "Mur d'images"
1055
1056#: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16
1057msgid "pics"
1058msgstr "images"
1059
1060#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
1061msgid "You need to enable Javascript to change plugin loading order."
1062msgstr ""
1063"Vous devez activer Javascript pour pouvoir modifier l'ordre des extensions."
1064
1065#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26
1066#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:22
1067msgid "Plugin administration"
1068msgstr "Administration des extensions"
1069
1070#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29
1071msgid "Enabled Plugins"
1072msgstr "Extensions activées"
1073
1074#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:34
1075#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:155
1076msgid "No plugin enabled."
1077msgstr "Aucune extension activée."
1078
1079#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40
1080#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:73
1081msgid "Disable"
1082msgstr "Désactiver"
1083
1084#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41
1085#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:74
1086#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:98
1087#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:123
1088msgid "Name"
1089msgstr "Nom"
1090
1091#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:43
1092#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:76
1093msgid "Order"
1094msgstr "Ordre"
1095
1096#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:86
1097msgid "Disabled Plugins"
1098msgstr "Extensions désactivées"
1099
1100#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:91
1101msgid "No plugin disabled."
1102msgstr "Aucune extension désactivée."
1103
1104#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:97
1105#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:122
1106msgid "Enable"
1107msgstr "Activer"
1108
1109#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:134
1110msgid "More plugins available"
1111msgstr "Plus d'extensions disponibles"
1112
1113#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:136
1114msgid "in the documentation"
1115msgstr "dans la documentation"
1116
1117#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:150
1118msgid "Plugin configuration"
1119msgstr "Configuration des extensions"
1120
1121#: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:195
1122msgid "No parameter available."
1123msgstr "Aucun paramètre disponible."
1124
1125#: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19
1126#: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19
1127msgid "tags"
1128msgstr "tags"
1129
1130#: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:23
1131#: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:23
1132msgid "List all links with those tags"
1133msgstr "Lister tous les liens avec ces tags"
1134
1135#: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19
1136msgid "Tag list"
1137msgstr "List des tags"
1138
1139#: tmp/tag.sort.b91ef64efc3688266305ea9b42e5017e.rtpl.php:3
1140#: tmp/tag.sort.cedf684561d925457130839629000a81.rtpl.php:3
1141msgid "Sort by:"
1142msgstr "Trier par :"
1143
1144#: tmp/tag.sort.b91ef64efc3688266305ea9b42e5017e.rtpl.php:5
1145#: tmp/tag.sort.cedf684561d925457130839629000a81.rtpl.php:5
1146msgid "Cloud"
1147msgstr "Nuage"
1148
1149#: tmp/tag.sort.b91ef64efc3688266305ea9b42e5017e.rtpl.php:6
1150#: tmp/tag.sort.cedf684561d925457130839629000a81.rtpl.php:6
1151msgid "Most used"
1152msgstr "Plus utilisés"
1153
1154#: tmp/tag.sort.b91ef64efc3688266305ea9b42e5017e.rtpl.php:7
1155#: tmp/tag.sort.cedf684561d925457130839629000a81.rtpl.php:7
1156msgid "Alphabetical"
1157msgstr "Alphabétique"
1158
1159#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14
1160msgid "Settings"
1161msgstr "Paramètres"
1162
1163#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16
1164msgid "Change Shaarli settings: title, timezone, etc."
1165msgstr "Changer les paramètres de Shaarli : titre, fuseau horaire, etc."
1166
1167#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:17
1168msgid "Configure your Shaarli"
1169msgstr "Conguration de Shaarli"
1170
1171#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:21
1172msgid "Enable, disable and configure plugins"
1173msgstr "Activer, désactiver et configurer les extensions"
1174
1175#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28
1176msgid "Change your password"
1177msgstr "Modification du mot de passe"
1178
1179#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:35
1180msgid "Rename or delete a tag in all links"
1181msgstr "Rename or delete a tag in all links"
1182
1183#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41
1184msgid ""
1185"Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, "
1186"delicious...)"
1187msgstr ""
1188"Importer des marques pages au format Netscape HTML (comme exportés depuis "
1189"Firefox, Chrome, Opera, delicious...)"
1190
1191#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42
1192msgid "Import links"
1193msgstr "Importer des liens"
1194
1195#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47
1196msgid ""
1197"Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, "
1198"Opera, delicious...)"
1199msgstr ""
1200"Exporter les marques pages au format Netscape HTML (comme exportés depuis "
1201"Firefox, Chrome, Opera, delicious...)"
1202
1203#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48
1204msgid "Export database"
1205msgstr "Exporter les données"
1206
1207#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:71
1208msgid ""
1209"Drag one of these button to your bookmarks toolbar or right-click it and "
1210"\"Bookmark This Link\""
1211msgstr ""
1212"Glisser un de ces bouttons dans votre barre de favoris ou cliquer droit "
1213"dessus et « Ajouter aux favoris »"
1214
1215#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:72
1216msgid "then click on the bookmarklet in any page you want to share."
1217msgstr ""
1218"puis cliquer sur le marque page depuis un site que vous souhaitez partager."
1219
1220#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:76
1221#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:100
1222msgid ""
1223"Drag this link to your bookmarks toolbar or right-click it and Bookmark This "
1224"Link"
1225msgstr ""
1226"Glisser ce lien dans votre barre de favoris ou cliquer droit dessus et « "
1227"Ajouter aux favoris »"
1228
1229#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:77
1230msgid "then click ✚Shaare link button in any page you want to share"
1231msgstr "puis cliquer sur ✚Shaare depuis un site que vous souhaitez partager"
1232
1233#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:86
1234#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:108
1235msgid "The selected text is too long, it will be truncated."
1236msgstr "Le texte sélectionné est trop long, il sera tronqué."
1237
1238#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:96
1239msgid "Shaare link"
1240msgstr "Shaare"
1241
1242#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:101
1243msgid ""
1244"Then click ✚Add Note button anytime to start composing a private Note (text "
1245"post) to your Shaarli"
1246msgstr ""
1247"Puis cliquer sur ✚Add Note pour commencer à rédiger une Note sur Shaarli"
1248
1249#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:117
1250msgid "Add Note"
1251msgstr "Ajouter une Note"
1252
1253#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:129
1254msgid ""
1255"You need to browse your Shaarli over <strong>HTTPS</strong> to use this "
1256"functionality."
1257msgstr ""
1258"Vous devez utiliser Shaarli en <strong>HTTPS</strong> pour utiliser cette "
1259"fonctionalité."
1260
1261#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:134
1262msgid "Add to"
1263msgstr "Ajouter à"
1264
1265#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:145
1266msgid "3rd party"
1267msgstr "Applications tierces"
1268
1269#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:147
1270#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:153
1271msgid "Plugin"
1272msgstr "Extension"
1273
1274#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:148
1275#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:154
1276msgid "plugin"
1277msgstr "extension"
1278
1279#: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:175
1280msgid ""
1281"Drag this link to your bookmarks toolbar, or right-click it and choose "
1282"Bookmark This Link"
1283msgstr ""
1284"Glisser ce lien dans votre barre de favoris ou cliquer droit dessus et « "
1285"Ajouter aux favoris »"
1286
1287#~ msgid "Redirector"
1288#~ msgstr "Redirecteur"
1289
1290#~ msgid "e. g."
1291#~ msgstr "ex :"
1292
1293#~ msgid "will mask the HTTP_REFERER"
1294#~ msgstr "masque le HTTP_REFERER"
1295
1296#~ msgid ""
1297#~ "An error occurred while parsing JSON configuration file (%s): error code #"
1298#~ "%d"
1299#~ msgstr ""
1300#~ "Une erreur s'est produite lors de la lecture du fichier de configuration "
1301#~ "JSON (%s) : code d'erreur #%d"
1302
1303#~ msgid ""
1304#~ "Please check your JSON syntax (without PHP comment tags) using a JSON "
1305#~ "lint tool such as "
1306#~ msgstr ""
1307#~ "Merci de vérifier la syntaxe JSON (sans les balises de commentaires PHP) "
1308#~ "en utilisant un validateur de JSON tel que "
1309
1310#~ msgid ""
1311#~ "Error: missing Composer dependencies\n"
1312#~ "\n"
1313#~ "If you installed Shaarli through Git or using the development branch,\n"
1314#~ "please refer to the installation documentation to install PHP "
1315#~ "dependencies using Composer:\n"
1316#~ msgstr ""
1317#~ "Erreur : les dépendances Composer sont manquantes\n"
1318#~ "\n"
1319#~ "Si vous avez installé Shaarli avec Git ou depuis la branche de "
1320#~ "développement\n"
1321#~ "merci de consulter la documentation d'installation pour installer les "
1322#~ "dépendances Composer :\n"
1323#~ "\n"
1324
1325#~ msgid "Sessions do not seem to work correctly on your server."
1326#~ msgstr "Les sessions ne semblent "
1327
1328#~ msgid "Tag was renamed in "
1329#~ msgstr "Le tag a été renommé dans "
1330
1331#, fuzzy
1332#~| msgid "My links"
1333#~ msgid " links"
1334#~ msgstr "Mes liens"
1335
1336#, fuzzy
1337#~| msgid ""
1338#~| "Error: missing Composer configuration\n"
1339#~| "\n"
1340#~ msgid "Error: missing Composer configuration"
1341#~ msgstr ""
1342#~ "Erreur : la configuration Composer est manquante\n"
1343#~ "\n"
1344
1345#, fuzzy
1346#~| msgid ""
1347#~| "Shaarli could not create the config file. Please make sure Shaarli has "
1348#~| "the right to write in the folder is it installed in."
1349#~ msgid ""
1350#~ "Shaarli could not create the config file. \n"
1351#~ " Please make sure Shaarli has the right to write in the "
1352#~ "folder is it installed in."
1353#~ msgstr ""
1354#~ "Shaarli n'a pas pu créer le fichier de configuration. Merci de vérifier "
1355#~ "que Shaarli a les droits d'écriture dans le dossier dans lequel il est "
1356#~ "installé."
1357
1358#, fuzzy
1359#~| msgid "Plugin"
1360#~ msgid "Plugin \""
1361#~ msgstr "Extension"
1362
1363#~ msgid "Your PHP version is obsolete!"
1364#~ msgstr "Votre version de PHP est obsolète !"
1365
1366#~ msgid " Shaarli requires at least PHP "
1367#~ msgstr "Shaarli nécessite au moins PHP"
diff --git a/inc/plugin_admin.js b/inc/plugin_admin.js
index 134ffb33..4b55e0f3 100644
--- a/inc/plugin_admin.js
+++ b/inc/plugin_admin.js
@@ -1,3 +1,31 @@
1/** @licstart The following is the entire license notice for the
2 * JavaScript code in this page.
3 *
4 * Copyright: (c) 2011-2015 Sébastien SAUVAGE <sebsauvage@sebsauvage.net>
5 * (c) 2011-2017 The Shaarli Community, see AUTHORS
6 *
7 * This software is provided 'as-is', without any express or implied warranty.
8 * In no event will the authors be held liable for any damages arising from
9 * the use of this software.
10 *
11 * Permission is granted to anyone to use this software for any purpose,
12 * including commercial applications, and to alter it and redistribute it
13 * freely, subject to the following restrictions:
14 *
15 * 1. The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software. If you use this software
17 * in a product, an acknowledgment in the product documentation would
18 * be appreciated but is not required.
19 *
20 * 2. Altered source versions must be plainly marked as such, and must
21 * not be misrepresented as being the original software.
22 *
23 * 3. This notice may not be removed or altered from any source distribution.
24 *
25 * @licend The above is the entire license notice
26 * for the JavaScript code in this page.
27 */
28
1/** 29/**
2 * Change the position counter of a row. 30 * Change the position counter of a row.
3 * 31 *
@@ -22,14 +50,22 @@ function changePos(elem, toPos)
22function changeOrder(pos, move) 50function changeOrder(pos, move)
23{ 51{
24 var newpos = parseInt(pos) + move; 52 var newpos = parseInt(pos) + move;
25 var line = document.querySelector('[data-order="'+ pos +'"]'); 53 var lines = document.querySelectorAll('[data-order="'+ pos +'"]');
26 var changeline = document.querySelector('[data-order="'+ newpos +'"]'); 54 var changelines = document.querySelectorAll('[data-order="'+ newpos +'"]');
27 var parent = changeline.parentNode; 55
56 // If we go down reverse lines to preserve the rows order
57 if (move > 0) {
58 lines = [].slice.call(lines).reverse();
59 }
60
61 for (var i = 0 ; i < lines.length ; i++) {
62 var parent = changelines[0].parentNode;
63 changePos(lines[i], newpos);
64 changePos(changelines[i], parseInt(pos));
65 var changeItem = move < 0 ? changelines[0] : changelines[changelines.length - 1].nextSibling;
66 parent.insertBefore(lines[i], changeItem);
67 }
28 68
29 changePos(line, newpos);
30 changePos(changeline, parseInt(pos));
31 var changeItem = move < 0 ? changeline : changeline.nextSibling;
32 parent.insertBefore(line, changeItem);
33} 69}
34 70
35/** 71/**
diff --git a/index.php b/index.php
index 7c5b0f8e..e05055c3 100644
--- a/index.php
+++ b/index.php
@@ -1,8 +1,12 @@
1<?php 1<?php
2/** 2/**
3<<<<<<< HEAD
3 * Shaarli v0.8.7 - Shaare your links... 4 * Shaarli v0.8.7 - Shaare your links...
4 * 5 *
5 * The personal, minimalist, super-fast, database free, bookmarking service. 6 * The personal, minimalist, super-fast, database free, bookmarking service.
7=======
8 * Shaarli - The personal, minimalist, super-fast, database free, bookmarking service.
9>>>>>>> v0.9.7
6 * 10 *
7 * Friendly fork by the Shaarli community: 11 * Friendly fork by the Shaarli community:
8 * - https://github.com/shaarli/Shaarli 12 * - https://github.com/shaarli/Shaarli
@@ -13,7 +17,7 @@
13 * 17 *
14 * Licence: http://www.opensource.org/licenses/zlib-license.php 18 * Licence: http://www.opensource.org/licenses/zlib-license.php
15 * 19 *
16 * Requires: PHP 5.3.x 20 * Requires: PHP 5.5.x
17 */ 21 */
18 22
19// Set 'UTC' as the default timezone if it is not defined in php.ini 23// Set 'UTC' as the default timezone if it is not defined in php.ini
@@ -25,7 +29,6 @@ if (date_default_timezone_get() == '') {
25/* 29/*
26 * PHP configuration 30 * PHP configuration
27 */ 31 */
28define('shaarli_version', '0.8.7');
29 32
30// http://server.com/x/shaarli --> /shaarli/ 33// http://server.com/x/shaarli --> /shaarli/
31define('WEB_PATH', substr($_SERVER['REQUEST_URI'], 0, 1+strrpos($_SERVER['REQUEST_URI'], '/', 0))); 34define('WEB_PATH', substr($_SERVER['REQUEST_URI'], 0, 1+strrpos($_SERVER['REQUEST_URI'], '/', 0)));
@@ -51,8 +54,8 @@ if (! file_exists(__DIR__ . '/vendor/autoload.php')) {
51 ."If you installed Shaarli through Git or using the development branch,\n" 54 ."If you installed Shaarli through Git or using the development branch,\n"
52 ."please refer to the installation documentation to install PHP" 55 ."please refer to the installation documentation to install PHP"
53 ." dependencies using Composer:\n" 56 ." dependencies using Composer:\n"
54 ."- https://github.com/shaarli/Shaarli/wiki/Server-requirements\n" 57 ."- https://shaarli.readthedocs.io/en/master/Server-requirements/\n"
55 ."- https://github.com/shaarli/Shaarli/wiki/Download-and-Installation"; 58 ."- https://shaarli.readthedocs.io/en/master/Download-and-Installation/";
56 exit; 59 exit;
57} 60}
58require_once 'inc/rain.tpl.class.php'; 61require_once 'inc/rain.tpl.class.php';
@@ -62,12 +65,11 @@ require_once __DIR__ . '/vendor/autoload.php';
62require_once 'application/ApplicationUtils.php'; 65require_once 'application/ApplicationUtils.php';
63require_once 'application/Cache.php'; 66require_once 'application/Cache.php';
64require_once 'application/CachedPage.php'; 67require_once 'application/CachedPage.php';
65require_once 'application/config/ConfigManager.php';
66require_once 'application/config/ConfigPlugin.php'; 68require_once 'application/config/ConfigPlugin.php';
67require_once 'application/FeedBuilder.php'; 69require_once 'application/FeedBuilder.php';
68require_once 'application/FileUtils.php'; 70require_once 'application/FileUtils.php';
71require_once 'application/History.php';
69require_once 'application/HttpUtils.php'; 72require_once 'application/HttpUtils.php';
70require_once 'application/Languages.php';
71require_once 'application/LinkDB.php'; 73require_once 'application/LinkDB.php';
72require_once 'application/LinkFilter.php'; 74require_once 'application/LinkFilter.php';
73require_once 'application/LinkUtils.php'; 75require_once 'application/LinkUtils.php';
@@ -79,16 +81,22 @@ require_once 'application/Utils.php';
79require_once 'application/PluginManager.php'; 81require_once 'application/PluginManager.php';
80require_once 'application/Router.php'; 82require_once 'application/Router.php';
81require_once 'application/Updater.php'; 83require_once 'application/Updater.php';
84use \Shaarli\Languages;
85use \Shaarli\ThemeUtils;
86use \Shaarli\Config\ConfigManager;
87use \Shaarli\SessionManager;
82 88
83// Ensure the PHP version is supported 89// Ensure the PHP version is supported
84try { 90try {
85 ApplicationUtils::checkPHPVersion('5.3', PHP_VERSION); 91 ApplicationUtils::checkPHPVersion('5.5', PHP_VERSION);
86} catch(Exception $exc) { 92} catch(Exception $exc) {
87 header('Content-Type: text/plain; charset=utf-8'); 93 header('Content-Type: text/plain; charset=utf-8');
88 echo $exc->getMessage(); 94 echo $exc->getMessage();
89 exit; 95 exit;
90} 96}
91 97
98define('SHAARLI_VERSION', ApplicationUtils::getVersion(__DIR__ .'/'. ApplicationUtils::$VERSION_FILE));
99
92// Force cookie path (but do not change lifetime) 100// Force cookie path (but do not change lifetime)
93$cookie = session_get_cookie_params(); 101$cookie = session_get_cookie_params();
94$cookiedir = ''; 102$cookiedir = '';
@@ -114,15 +122,29 @@ if (session_id() == '') {
114} 122}
115 123
116// Regenerate session ID if invalid or not defined in cookie. 124// Regenerate session ID if invalid or not defined in cookie.
117if (isset($_COOKIE['shaarli']) && !is_session_id_valid($_COOKIE['shaarli'])) { 125if (isset($_COOKIE['shaarli']) && !SessionManager::checkId($_COOKIE['shaarli'])) {
118 session_regenerate_id(true); 126 session_regenerate_id(true);
119 $_COOKIE['shaarli'] = session_id(); 127 $_COOKIE['shaarli'] = session_id();
120} 128}
121 129
122$conf = new ConfigManager(); 130$conf = new ConfigManager();
131$sessionManager = new SessionManager($_SESSION, $conf);
132
133// LC_MESSAGES isn't defined without php-intl, in this case use LC_COLLATE locale instead.
134if (! defined('LC_MESSAGES')) {
135 define('LC_MESSAGES', LC_COLLATE);
136}
137
138// Sniff browser language and set date format accordingly.
139if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
140 autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']);
141}
142
143new Languages(setlocale(LC_MESSAGES, 0), $conf);
144
123$conf->setEmpty('general.timezone', date_default_timezone_get()); 145$conf->setEmpty('general.timezone', date_default_timezone_get());
124$conf->setEmpty('general.title', 'Shared links on '. escape(index_url($_SERVER))); 146$conf->setEmpty('general.title', t('Shared links on '). escape(index_url($_SERVER)));
125RainTPL::$tpl_dir = $conf->get('resource.raintpl_tpl'); // template directory 147RainTPL::$tpl_dir = $conf->get('resource.raintpl_tpl').'/'.$conf->get('resource.theme').'/'; // template directory
126RainTPL::$cache_dir = $conf->get('resource.raintpl_tmp'); // cache directory 148RainTPL::$cache_dir = $conf->get('resource.raintpl_tmp'); // cache directory
127 149
128$pluginManager = new PluginManager($conf); 150$pluginManager = new PluginManager($conf);
@@ -132,15 +154,6 @@ date_default_timezone_set($conf->get('general.timezone', 'UTC'));
132 154
133ob_start(); // Output buffering for the page cache. 155ob_start(); // Output buffering for the page cache.
134 156
135// In case stupid admin has left magic_quotes enabled in php.ini:
136if (get_magic_quotes_gpc())
137{
138 function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; }
139 $_POST = array_map('stripslashes_deep', $_POST);
140 $_GET = array_map('stripslashes_deep', $_GET);
141 $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
142}
143
144// Prevent caching on client side or proxy: (yes, it's ugly) 157// Prevent caching on client side or proxy: (yes, it's ugly)
145header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 158header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
146header("Cache-Control: no-store, no-cache, must-revalidate"); 159header("Cache-Control: no-store, no-cache, must-revalidate");
@@ -152,7 +165,7 @@ if (! is_file($conf->getConfigFileExt())) {
152 $errors = ApplicationUtils::checkResourcePermissions($conf); 165 $errors = ApplicationUtils::checkResourcePermissions($conf);
153 166
154 if ($errors != array()) { 167 if ($errors != array()) {
155 $message = '<p>Insufficient permissions:</p><ul>'; 168 $message = '<p>'. t('Insufficient permissions:') .'</p><ul>';
156 169
157 foreach ($errors as $error) { 170 foreach ($errors as $error) {
158 $message .= '<li>'.$error.'</li>'; 171 $message .= '<li>'.$error.'</li>';
@@ -165,18 +178,12 @@ if (! is_file($conf->getConfigFileExt())) {
165 } 178 }
166 179
167 // Display the installation form if no existing config is found 180 // Display the installation form if no existing config is found
168 install($conf); 181 install($conf, $sessionManager);
169} 182}
170 183
171// a token depending of deployment salt, user password, and the current ip 184// a token depending of deployment salt, user password, and the current ip
172define('STAY_SIGNED_IN_TOKEN', sha1($conf->get('credentials.hash') . $_SERVER['REMOTE_ADDR'] . $conf->get('credentials.salt'))); 185define('STAY_SIGNED_IN_TOKEN', sha1($conf->get('credentials.hash') . $_SERVER['REMOTE_ADDR'] . $conf->get('credentials.salt')));
173 186
174// Sniff browser language and set date format accordingly.
175if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
176 autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']);
177}
178header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling.
179
180/** 187/**
181 * Checking session state (i.e. is the user still logged in) 188 * Checking session state (i.e. is the user still logged in)
182 * 189 *
@@ -186,65 +193,44 @@ header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper int
186 */ 193 */
187function setup_login_state($conf) 194function setup_login_state($conf)
188{ 195{
189 if ($conf->get('security.open_shaarli')) { 196 if ($conf->get('security.open_shaarli')) {
190 return true; 197 return true;
191 } 198 }
192 $userIsLoggedIn = false; // By default, we do not consider the user as logged in; 199 $userIsLoggedIn = false; // By default, we do not consider the user as logged in;
193 $loginFailure = false; // If set to true, every attempt to authenticate the user will fail. This indicates that an important condition isn't met. 200 $loginFailure = false; // If set to true, every attempt to authenticate the user will fail. This indicates that an important condition isn't met.
194 if (! $conf->exists('credentials.login')) { 201 if (! $conf->exists('credentials.login')) {
195 $userIsLoggedIn = false; // Shaarli is not configured yet. 202 $userIsLoggedIn = false; // Shaarli is not configured yet.
196 $loginFailure = true; 203 $loginFailure = true;
197 } 204 }
198 if (isset($_COOKIE['shaarli_staySignedIn']) && 205 if (isset($_COOKIE['shaarli_staySignedIn']) &&
199 $_COOKIE['shaarli_staySignedIn']===STAY_SIGNED_IN_TOKEN && 206 $_COOKIE['shaarli_staySignedIn']===STAY_SIGNED_IN_TOKEN &&
200 !$loginFailure) 207 !$loginFailure)
201 { 208 {
202 fillSessionInfo($conf); 209 fillSessionInfo($conf);
203 $userIsLoggedIn = true; 210 $userIsLoggedIn = true;
204 } 211 }
205 // If session does not exist on server side, or IP address has changed, or session has expired, logout. 212 // If session does not exist on server side, or IP address has changed, or session has expired, logout.
206 if (empty($_SESSION['uid']) 213 if (empty($_SESSION['uid'])
207 || ($conf->get('security.session_protection_disabled') == false && $_SESSION['ip'] != allIPs()) 214 || ($conf->get('security.session_protection_disabled') === false && $_SESSION['ip'] != allIPs())
208 || time() >= $_SESSION['expires_on']) 215 || time() >= $_SESSION['expires_on'])
209 {
210 logout();
211 $userIsLoggedIn = false;
212 $loginFailure = true;
213 }
214 if (!empty($_SESSION['longlastingsession'])) {
215 $_SESSION['expires_on']=time()+$_SESSION['longlastingsession']; // In case of "Stay signed in" checked.
216 }
217 else {
218 $_SESSION['expires_on']=time()+INACTIVITY_TIMEOUT; // Standard session expiration date.
219 }
220 if (!$loginFailure) {
221 $userIsLoggedIn = true;
222 }
223
224 return $userIsLoggedIn;
225}
226$userIsLoggedIn = setup_login_state($conf);
227
228/**
229 * PubSubHubbub protocol support (if enabled) [UNTESTED]
230 * (Source: http://aldarone.fr/les-flux-rss-shaarli-et-pubsubhubbub/ )
231 *
232 * @param ConfigManager $conf Configuration Manager instance.
233 */
234function pubsubhub($conf)
235{
236 $pshUrl = $conf->get('config.PUBSUBHUB_URL');
237 if (!empty($pshUrl))
238 { 216 {
239 include_once './publisher.php'; 217 logout();
240 $p = new Publisher($pshUrl); 218 $userIsLoggedIn = false;
241 $topic_url = array ( 219 $loginFailure = true;
242 index_url($_SERVER).'?do=atom', 220 }
243 index_url($_SERVER).'?do=rss' 221 if (!empty($_SESSION['longlastingsession'])) {
244 ); 222 $_SESSION['expires_on']=time()+$_SESSION['longlastingsession']; // In case of "Stay signed in" checked.
245 $p->publish_update($topic_url); 223 }
224 else {
225 $_SESSION['expires_on']=time()+INACTIVITY_TIMEOUT; // Standard session expiration date.
246 } 226 }
227 if (!$loginFailure) {
228 $userIsLoggedIn = true;
229 }
230
231 return $userIsLoggedIn;
247} 232}
233$userIsLoggedIn = setup_login_state($conf);
248 234
249// ------------------------------------------------------------------------------------------ 235// ------------------------------------------------------------------------------------------
250// Session management 236// Session management
@@ -266,10 +252,10 @@ function allIPs()
266 */ 252 */
267function fillSessionInfo($conf) 253function fillSessionInfo($conf)
268{ 254{
269 $_SESSION['uid'] = sha1(uniqid('',true).'_'.mt_rand()); // Generate unique random number (different than phpsessionid) 255 $_SESSION['uid'] = sha1(uniqid('',true).'_'.mt_rand()); // Generate unique random number (different than phpsessionid)
270 $_SESSION['ip']=allIPs(); // We store IP address(es) of the client to make sure session is not hijacked. 256 $_SESSION['ip']=allIPs(); // We store IP address(es) of the client to make sure session is not hijacked.
271 $_SESSION['username']= $conf->get('credentials.login'); 257 $_SESSION['username']= $conf->get('credentials.login');
272 $_SESSION['expires_on']=time()+INACTIVITY_TIMEOUT; // Set session expiration. 258 $_SESSION['expires_on']=time()+INACTIVITY_TIMEOUT; // Set session expiration.
273} 259}
274 260
275/** 261/**
@@ -286,7 +272,7 @@ function check_auth($login, $password, $conf)
286 $hash = sha1($password . $login . $conf->get('credentials.salt')); 272 $hash = sha1($password . $login . $conf->get('credentials.salt'));
287 if ($login == $conf->get('credentials.login') && $hash == $conf->get('credentials.hash')) 273 if ($login == $conf->get('credentials.login') && $hash == $conf->get('credentials.hash'))
288 { // Login/password is correct. 274 { // Login/password is correct.
289 fillSessionInfo($conf); 275 fillSessionInfo($conf);
290 logm($conf->get('resource.log'), $_SERVER['REMOTE_ADDR'], 'Login successful'); 276 logm($conf->get('resource.log'), $_SERVER['REMOTE_ADDR'], 'Login successful');
291 return true; 277 return true;
292 } 278 }
@@ -308,6 +294,7 @@ function logout() {
308 unset($_SESSION['ip']); 294 unset($_SESSION['ip']);
309 unset($_SESSION['username']); 295 unset($_SESSION['username']);
310 unset($_SESSION['privateonly']); 296 unset($_SESSION['privateonly']);
297 unset($_SESSION['untaggedonly']);
311 } 298 }
312 setcookie('shaarli_staySignedIn', FALSE, 0, WEB_PATH); 299 setcookie('shaarli_staySignedIn', FALSE, 0, WEB_PATH);
313} 300}
@@ -405,18 +392,19 @@ function ban_canLogin($conf)
405// Process login form: Check if login/password is correct. 392// Process login form: Check if login/password is correct.
406if (isset($_POST['login'])) 393if (isset($_POST['login']))
407{ 394{
408 if (!ban_canLogin($conf)) die('I said: NO. You are banned for the moment. Go away.'); 395 if (!ban_canLogin($conf)) die(t('I said: NO. You are banned for the moment. Go away.'));
409 if (isset($_POST['password']) 396 if (isset($_POST['password'])
410 && tokenOk($_POST['token']) 397 && $sessionManager->checkToken($_POST['token'])
411 && (check_auth($_POST['login'], $_POST['password'], $conf)) 398 && (check_auth($_POST['login'], $_POST['password'], $conf))
412 ) { // Login/password is OK. 399 ) { // Login/password is OK.
413 ban_loginOk($conf); 400 ban_loginOk($conf);
414 // If user wants to keep the session cookie even after the browser closes: 401 // If user wants to keep the session cookie even after the browser closes:
415 if (!empty($_POST['longlastingsession'])) 402 if (!empty($_POST['longlastingsession']))
416 { 403 {
417 setcookie('shaarli_staySignedIn', STAY_SIGNED_IN_TOKEN, time()+31536000, WEB_PATH); 404 $_SESSION['longlastingsession'] = 31536000; // (31536000 seconds = 1 year)
418 $_SESSION['longlastingsession']=31536000; // (31536000 seconds = 1 year) 405 $expiration = time() + $_SESSION['longlastingsession']; // calculate relative cookie expiration (1 year from now)
419 $_SESSION['expires_on']=time()+$_SESSION['longlastingsession']; // Set session expiration on server-side. 406 setcookie('shaarli_staySignedIn', STAY_SIGNED_IN_TOKEN, $expiration, WEB_PATH);
407 $_SESSION['expires_on'] = $expiration; // Set session expiration on server-side.
420 408
421 $cookiedir = ''; if(dirname($_SERVER['SCRIPT_NAME'])!='/') $cookiedir=dirname($_SERVER["SCRIPT_NAME"]).'/'; 409 $cookiedir = ''; if(dirname($_SERVER['SCRIPT_NAME'])!='/') $cookiedir=dirname($_SERVER["SCRIPT_NAME"]).'/';
422 session_set_cookie_params($_SESSION['longlastingsession'],$cookiedir,$_SERVER['SERVER_NAME']); // Set session cookie expiration on client side 410 session_set_cookie_params($_SESSION['longlastingsession'],$cookiedir,$_SERVER['SERVER_NAME']); // Set session cookie expiration on client side
@@ -433,7 +421,7 @@ if (isset($_POST['login']))
433 // Optional redirect after login: 421 // Optional redirect after login:
434 if (isset($_GET['post'])) { 422 if (isset($_GET['post'])) {
435 $uri = '?post='. urlencode($_GET['post']); 423 $uri = '?post='. urlencode($_GET['post']);
436 foreach (array('description', 'source', 'title') as $param) { 424 foreach (array('description', 'source', 'title', 'tags') as $param) {
437 if (!empty($_GET[$param])) { 425 if (!empty($_GET[$param])) {
438 $uri .= '&'.$param.'='.urlencode($_GET[$param]); 426 $uri .= '&'.$param.'='.urlencode($_GET[$param]);
439 } 427 }
@@ -462,77 +450,24 @@ if (isset($_POST['login']))
462 $redir = '&username='. urlencode($_POST['login']); 450 $redir = '&username='. urlencode($_POST['login']);
463 if (isset($_GET['post'])) { 451 if (isset($_GET['post'])) {
464 $redir .= '&post=' . urlencode($_GET['post']); 452 $redir .= '&post=' . urlencode($_GET['post']);
465 foreach (array('description', 'source', 'title') as $param) { 453 foreach (array('description', 'source', 'title', 'tags') as $param) {
466 if (!empty($_GET[$param])) { 454 if (!empty($_GET[$param])) {
467 $redir .= '&' . $param . '=' . urlencode($_GET[$param]); 455 $redir .= '&' . $param . '=' . urlencode($_GET[$param]);
468 } 456 }
469 } 457 }
470 } 458 }
471 echo '<script>alert("Wrong login/password.");document.location=\'?do=login'.$redir.'\';</script>'; // Redirect to login screen. 459 // Redirect to login screen.
460 echo '<script>alert("'. t("Wrong login/password.") .'");document.location=\'?do=login'.$redir.'\';</script>';
472 exit; 461 exit;
473 } 462 }
474} 463}
475 464
476// ------------------------------------------------------------------------------------------ 465// ------------------------------------------------------------------------------------------
477// Misc utility functions:
478
479// Convert post_max_size/upload_max_filesize (e.g. '16M') parameters to bytes.
480function return_bytes($val)
481{
482 $val = trim($val); $last=strtolower($val[strlen($val)-1]);
483 switch($last)
484 {
485 case 'g': $val *= 1024;
486 case 'm': $val *= 1024;
487 case 'k': $val *= 1024;
488 }
489 return $val;
490}
491
492// Try to determine max file size for uploads (POST).
493// Returns an integer (in bytes)
494function getMaxFileSize()
495{
496 $size1 = return_bytes(ini_get('post_max_size'));
497 $size2 = return_bytes(ini_get('upload_max_filesize'));
498 // Return the smaller of two:
499 $maxsize = min($size1,$size2);
500 // FIXME: Then convert back to readable notations ? (e.g. 2M instead of 2000000)
501 return $maxsize;
502}
503
504// ------------------------------------------------------------------------------------------
505// Token management for XSRF protection 466// Token management for XSRF protection
506// Token should be used in any form which acts on data (create,update,delete,import...). 467// Token should be used in any form which acts on data (create,update,delete,import...).
507if (!isset($_SESSION['tokens'])) $_SESSION['tokens']=array(); // Token are attached to the session. 468if (!isset($_SESSION['tokens'])) $_SESSION['tokens']=array(); // Token are attached to the session.
508 469
509/** 470/**
510 * Returns a token.
511 *
512 * @param ConfigManager $conf Configuration Manager instance.
513 *
514 * @return string token.
515 */
516function getToken($conf)
517{
518 $rnd = sha1(uniqid('', true) .'_'. mt_rand() . $conf->get('credentials.salt')); // We generate a random string.
519 $_SESSION['tokens'][$rnd]=1; // Store it on the server side.
520 return $rnd;
521}
522
523// Tells if a token is OK. Using this function will destroy the token.
524// true=token is OK.
525function tokenOk($token)
526{
527 if (isset($_SESSION['tokens'][$token]))
528 {
529 unset($_SESSION['tokens'][$token]); // Token is used: destroy it.
530 return true; // Token is OK.
531 }
532 return false; // Wrong token, or already used.
533}
534
535/**
536 * Daily RSS feed: 1 RSS entry per day giving all the links on that day. 471 * Daily RSS feed: 1 RSS entry per day giving all the links on that day.
537 * Gives the last 7 days (which have links). 472 * Gives the last 7 days (which have links).
538 * This RSS feed cannot be filtered. 473 * This RSS feed cannot be filtered.
@@ -602,7 +537,11 @@ function showDailyRSS($conf) {
602 537
603 // We pre-format some fields for proper output. 538 // We pre-format some fields for proper output.
604 foreach ($links as &$link) { 539 foreach ($links as &$link) {
605 $link['formatedDescription'] = format_description($link['description'], $conf->get('redirector.url')); 540 $link['formatedDescription'] = format_description(
541 $link['description'],
542 $conf->get('redirector.url'),
543 $conf->get('redirector.encode_url')
544 );
606 $link['thumbnail'] = thumbnail($conf, $link['url']); 545 $link['thumbnail'] = thumbnail($conf, $link['url']);
607 $link['timestamp'] = $link['created']->getTimestamp(); 546 $link['timestamp'] = $link['created']->getTimestamp();
608 if (startsWith($link['url'], '?')) { 547 if (startsWith($link['url'], '?')) {
@@ -618,7 +557,7 @@ function showDailyRSS($conf) {
618 $tpl->assign('links', $links); 557 $tpl->assign('links', $links);
619 $tpl->assign('rssdate', escape($dayDate->format(DateTime::RSS))); 558 $tpl->assign('rssdate', escape($dayDate->format(DateTime::RSS)));
620 $tpl->assign('hide_timestamps', $conf->get('privacy.hide_timestamps', false)); 559 $tpl->assign('hide_timestamps', $conf->get('privacy.hide_timestamps', false));
621 $html = $tpl->draw('dailyrss', $return_string=true); 560 $html = $tpl->draw('dailyrss', true);
622 561
623 echo $html . PHP_EOL; 562 echo $html . PHP_EOL;
624 } 563 }
@@ -639,20 +578,29 @@ function showDailyRSS($conf) {
639 */ 578 */
640function showDaily($pageBuilder, $LINKSDB, $conf, $pluginManager) 579function showDaily($pageBuilder, $LINKSDB, $conf, $pluginManager)
641{ 580{
642 $day=date('Ymd',strtotime('-1 day')); // Yesterday, in format YYYYMMDD. 581 $day = date('Ymd', strtotime('-1 day')); // Yesterday, in format YYYYMMDD.
643 if (isset($_GET['day'])) $day=$_GET['day']; 582 if (isset($_GET['day'])) {
583 $day = $_GET['day'];
584 }
644 585
645 $days = $LINKSDB->days(); 586 $days = $LINKSDB->days();
646 $i = array_search($day,$days); 587 $i = array_search($day, $days);
647 if ($i===false) { $i=count($days)-1; $day=$days[$i]; } 588 if ($i === false && count($days)) {
648 $previousday=''; 589 // no links for day, but at least one day with links
649 $nextday=''; 590 $i = count($days) - 1;
650 if ($i!==false) 591 $day = $days[$i];
651 {
652 if ($i>=1) $previousday=$days[$i-1];
653 if ($i<count($days)-1) $nextday=$days[$i+1];
654 } 592 }
593 $previousday = '';
594 $nextday = '';
655 595
596 if ($i !== false) {
597 if ($i >= 1) {
598 $previousday=$days[$i - 1];
599 }
600 if ($i < count($days) - 1) {
601 $nextday = $days[$i + 1];
602 }
603 }
656 try { 604 try {
657 $linksToDisplay = $LINKSDB->filterDay($day); 605 $linksToDisplay = $LINKSDB->filterDay($day);
658 } catch (Exception $exc) { 606 } catch (Exception $exc) {
@@ -661,13 +609,15 @@ function showDaily($pageBuilder, $LINKSDB, $conf, $pluginManager)
661 } 609 }
662 610
663 // We pre-format some fields for proper output. 611 // We pre-format some fields for proper output.
664 foreach($linksToDisplay as $key=>$link) 612 foreach($linksToDisplay as $key => $link) {
665 {
666
667 $taglist = explode(' ',$link['tags']); 613 $taglist = explode(' ',$link['tags']);
668 uasort($taglist, 'strcasecmp'); 614 uasort($taglist, 'strcasecmp');
669 $linksToDisplay[$key]['taglist']=$taglist; 615 $linksToDisplay[$key]['taglist']=$taglist;
670 $linksToDisplay[$key]['formatedDescription'] = format_description($link['description'], $conf->get('redirector.url')); 616 $linksToDisplay[$key]['formatedDescription'] = format_description(
617 $link['description'],
618 $conf->get('redirector.url'),
619 $conf->get('redirector.encode_url')
620 );
671 $linksToDisplay[$key]['thumbnail'] = thumbnail($conf, $link['url']); 621 $linksToDisplay[$key]['thumbnail'] = thumbnail($conf, $link['url']);
672 $linksToDisplay[$key]['timestamp'] = $link['created']->getTimestamp(); 622 $linksToDisplay[$key]['timestamp'] = $link['created']->getTimestamp();
673 } 623 }
@@ -677,28 +627,31 @@ function showDaily($pageBuilder, $LINKSDB, $conf, $pluginManager)
677 so I manually spread entries with a simple method: I roughly evaluate the 627 so I manually spread entries with a simple method: I roughly evaluate the
678 height of a div according to title and description length. 628 height of a div according to title and description length.
679 */ 629 */
680 $columns=array(array(),array(),array()); // Entries to display, for each column. 630 $columns = array(array(), array(), array()); // Entries to display, for each column.
681 $fill=array(0,0,0); // Rough estimate of columns fill. 631 $fill = array(0, 0, 0); // Rough estimate of columns fill.
682 foreach($linksToDisplay as $key=>$link) 632 foreach($linksToDisplay as $key => $link) {
683 {
684 // Roughly estimate length of entry (by counting characters) 633 // Roughly estimate length of entry (by counting characters)
685 // Title: 30 chars = 1 line. 1 line is 30 pixels height. 634 // Title: 30 chars = 1 line. 1 line is 30 pixels height.
686 // Description: 836 characters gives roughly 342 pixel height. 635 // Description: 836 characters gives roughly 342 pixel height.
687 // This is not perfect, but it's usually OK. 636 // This is not perfect, but it's usually OK.
688 $length=strlen($link['title'])+(342*strlen($link['description']))/836; 637 $length = strlen($link['title']) + (342 * strlen($link['description'])) / 836;
689 if ($link['thumbnail']) $length +=100; // 1 thumbnails roughly takes 100 pixels height. 638 if ($link['thumbnail']) {
639 $length += 100; // 1 thumbnails roughly takes 100 pixels height.
640 }
690 // Then put in column which is the less filled: 641 // Then put in column which is the less filled:
691 $smallest=min($fill); // find smallest value in array. 642 $smallest = min($fill); // find smallest value in array.
692 $index=array_search($smallest,$fill); // find index of this smallest value. 643 $index = array_search($smallest, $fill); // find index of this smallest value.
693 array_push($columns[$index],$link); // Put entry in this column. 644 array_push($columns[$index], $link); // Put entry in this column.
694 $fill[$index]+=$length; 645 $fill[$index] += $length;
695 } 646 }
696 647
697 $dayDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $day.'_000000'); 648 $dayDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $day.'_000000');
698 $data = array( 649 $data = array(
650 'pagetitle' => $conf->get('general.title') .' - '. format_date($dayDate, false),
699 'linksToDisplay' => $linksToDisplay, 651 'linksToDisplay' => $linksToDisplay,
700 'cols' => $columns, 652 'cols' => $columns,
701 'day' => $dayDate->getTimestamp(), 653 'day' => $dayDate->getTimestamp(),
654 'dayDate' => $dayDate,
702 'previousday' => $previousday, 655 'previousday' => $previousday,
703 'nextday' => $nextday, 656 'nextday' => $nextday,
704 ); 657 );
@@ -729,19 +682,14 @@ function showLinkList($PAGE, $LINKSDB, $conf, $pluginManager) {
729/** 682/**
730 * Render HTML page (according to URL parameters and user rights) 683 * Render HTML page (according to URL parameters and user rights)
731 * 684 *
732 * @param ConfigManager $conf Configuration Manager instance. 685 * @param ConfigManager $conf Configuration Manager instance.
733 * @param PluginManager $pluginManager Plugin Manager instance, 686 * @param PluginManager $pluginManager Plugin Manager instance,
687 * @param LinkDB $LINKSDB
688 * @param History $history instance
689 * @param SessionManager $sessionManager SessionManager instance
734 */ 690 */
735function renderPage($conf, $pluginManager) 691function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager)
736{ 692{
737 $LINKSDB = new LinkDB(
738 $conf->get('resource.datastore'),
739 isLoggedIn(),
740 $conf->get('privacy.hide_public_links'),
741 $conf->get('redirector.url'),
742 $conf->get('redirector.encode_url')
743 );
744
745 $updater = new Updater( 693 $updater = new Updater(
746 read_updates_file($conf->get('resource.updates')), 694 read_updates_file($conf->get('resource.updates')),
747 $LINKSDB, 695 $LINKSDB,
@@ -761,7 +709,7 @@ function renderPage($conf, $pluginManager)
761 die($e->getMessage()); 709 die($e->getMessage());
762 } 710 }
763 711
764 $PAGE = new PageBuilder($conf); 712 $PAGE = new PageBuilder($conf, $LINKSDB, $sessionManager->generateToken());
765 $PAGE->assign('linkcount', count($LINKSDB)); 713 $PAGE->assign('linkcount', count($LINKSDB));
766 $PAGE->assign('privateLinkcount', count_private($LINKSDB)); 714 $PAGE->assign('privateLinkcount', count_private($LINKSDB));
767 $PAGE->assign('plugin_errors', $pluginManager->getErrors()); 715 $PAGE->assign('plugin_errors', $pluginManager->getErrors());
@@ -770,6 +718,23 @@ function renderPage($conf, $pluginManager)
770 $query = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : ''; 718 $query = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : '';
771 $targetPage = Router::findPage($query, $_GET, isLoggedIn()); 719 $targetPage = Router::findPage($query, $_GET, isLoggedIn());
772 720
721 if (
722 // if the user isn't logged in
723 !isLoggedIn() &&
724 // and Shaarli doesn't have public content...
725 $conf->get('privacy.hide_public_links') &&
726 // and is configured to enforce the login
727 $conf->get('privacy.force_login') &&
728 // and the current page isn't already the login page
729 $targetPage !== Router::$PAGE_LOGIN &&
730 // and the user is not requesting a feed (which would lead to a different content-type as expected)
731 $targetPage !== Router::$PAGE_FEED_ATOM &&
732 $targetPage !== Router::$PAGE_FEED_RSS
733 ) {
734 // force current page to be the login page
735 $targetPage = Router::$PAGE_LOGIN;
736 }
737
773 // Call plugin hooks for header, footer and includes, specifying which page will be rendered. 738 // Call plugin hooks for header, footer and includes, specifying which page will be rendered.
774 // Then assign generated data to RainTPL. 739 // Then assign generated data to RainTPL.
775 $common_hooks = array( 740 $common_hooks = array(
@@ -797,6 +762,8 @@ function renderPage($conf, $pluginManager)
797 $PAGE->assign('username', escape($_GET['username'])); 762 $PAGE->assign('username', escape($_GET['username']));
798 } 763 }
799 $PAGE->assign('returnurl',(isset($_SERVER['HTTP_REFERER']) ? escape($_SERVER['HTTP_REFERER']):'')); 764 $PAGE->assign('returnurl',(isset($_SERVER['HTTP_REFERER']) ? escape($_SERVER['HTTP_REFERER']):''));
765 // add default state of the 'remember me' checkbox
766 $PAGE->assign('remember_user_default', $conf->get('privacy.remember_user_default'));
800 $PAGE->renderPage('loginform'); 767 $PAGE->renderPage('loginform');
801 exit; 768 exit;
802 } 769 }
@@ -844,7 +811,9 @@ function renderPage($conf, $pluginManager)
844 // -------- Tag cloud 811 // -------- Tag cloud
845 if ($targetPage == Router::$PAGE_TAGCLOUD) 812 if ($targetPage == Router::$PAGE_TAGCLOUD)
846 { 813 {
847 $tags= $LINKSDB->allTags(); 814 $visibility = ! empty($_SESSION['privateonly']) ? 'private' : 'all';
815 $filteringTags = isset($_GET['searchtags']) ? explode(' ', $_GET['searchtags']) : [];
816 $tags = $LINKSDB->linksCountPerTag($filteringTags, $visibility);
848 817
849 // We sort tags alphabetically, then choose a font size according to count. 818 // We sort tags alphabetically, then choose a font size according to count.
850 // First, find max value. 819 // First, find max value.
@@ -853,20 +822,13 @@ function renderPage($conf, $pluginManager)
853 $maxcount = max($maxcount, $value); 822 $maxcount = max($maxcount, $value);
854 } 823 }
855 824
856 // Sort tags alphabetically: case insensitive, support locale if available. 825 alphabetical_sort($tags, false, true);
857 uksort($tags, function($a, $b) {
858 // Collator is part of PHP intl.
859 if (class_exists('Collator')) {
860 $c = new Collator(setlocale(LC_COLLATE, 0));
861 if (!intl_is_failure(intl_get_error_code())) {
862 return $c->compare($a, $b);
863 }
864 }
865 return strcasecmp($a, $b);
866 });
867 826
868 $tagList = array(); 827 $tagList = array();
869 foreach($tags as $key => $value) { 828 foreach($tags as $key => $value) {
829 if (in_array($key, $filteringTags)) {
830 continue;
831 }
870 // Tag font size scaling: 832 // Tag font size scaling:
871 // default 15 and 30 logarithm bases affect scaling, 833 // default 15 and 30 logarithm bases affect scaling,
872 // 22 and 6 are arbitrary font sizes for max and min sizes. 834 // 22 and 6 are arbitrary font sizes for max and min sizes.
@@ -878,6 +840,7 @@ function renderPage($conf, $pluginManager)
878 } 840 }
879 841
880 $data = array( 842 $data = array(
843 'search_tags' => implode(' ', escape($filteringTags)),
881 'tags' => $tagList, 844 'tags' => $tagList,
882 ); 845 );
883 $pluginManager->executeHooks('render_tagcloud', $data, array('loggedin' => isLoggedIn())); 846 $pluginManager->executeHooks('render_tagcloud', $data, array('loggedin' => isLoggedIn()));
@@ -886,7 +849,37 @@ function renderPage($conf, $pluginManager)
886 $PAGE->assign($key, $value); 849 $PAGE->assign($key, $value);
887 } 850 }
888 851
889 $PAGE->renderPage('tagcloud'); 852 $PAGE->renderPage('tag.cloud');
853 exit;
854 }
855
856 // -------- Tag list
857 if ($targetPage == Router::$PAGE_TAGLIST)
858 {
859 $visibility = ! empty($_SESSION['privateonly']) ? 'private' : 'all';
860 $filteringTags = isset($_GET['searchtags']) ? explode(' ', $_GET['searchtags']) : [];
861 $tags = $LINKSDB->linksCountPerTag($filteringTags, $visibility);
862 foreach ($filteringTags as $tag) {
863 if (array_key_exists($tag, $tags)) {
864 unset($tags[$tag]);
865 }
866 }
867
868 if (! empty($_GET['sort']) && $_GET['sort'] === 'alpha') {
869 alphabetical_sort($tags, false, true);
870 }
871
872 $data = [
873 'search_tags' => implode(' ', escape($filteringTags)),
874 'tags' => $tags,
875 ];
876 $pluginManager->executeHooks('render_taglist', $data, ['loggedin' => isLoggedIn()]);
877
878 foreach ($data as $key => $value) {
879 $PAGE->assign($key, $value);
880 }
881
882 $PAGE->renderPage('tag.list');
890 exit; 883 exit;
891 } 884 }
892 885
@@ -918,10 +911,6 @@ function renderPage($conf, $pluginManager)
918 $feedGenerator->setLocale(strtolower(setlocale(LC_COLLATE, 0))); 911 $feedGenerator->setLocale(strtolower(setlocale(LC_COLLATE, 0)));
919 $feedGenerator->setHideDates($conf->get('privacy.hide_timestamps') && !isLoggedIn()); 912 $feedGenerator->setHideDates($conf->get('privacy.hide_timestamps') && !isLoggedIn());
920 $feedGenerator->setUsePermalinks(isset($_GET['permalinks']) || !$conf->get('feed.rss_permalinks')); 913 $feedGenerator->setUsePermalinks(isset($_GET['permalinks']) || !$conf->get('feed.rss_permalinks'));
921 $pshUrl = $conf->get('config.PUBSUBHUB_URL');
922 if (!empty($pshUrl)) {
923 $feedGenerator->setPubsubhubUrl($pshUrl);
924 }
925 $data = $feedGenerator->buildData(); 914 $data = $feedGenerator->buildData();
926 915
927 // Process plugin hook. 916 // Process plugin hook.
@@ -938,7 +927,7 @@ function renderPage($conf, $pluginManager)
938 exit; 927 exit;
939 } 928 }
940 929
941 // Display openseach plugin (XML) 930 // Display opensearch plugin (XML)
942 if ($targetPage == Router::$PAGE_OPENSEARCH) { 931 if ($targetPage == Router::$PAGE_OPENSEARCH) {
943 header('Content-Type: application/xml; charset=utf-8'); 932 header('Content-Type: application/xml; charset=utf-8');
944 $PAGE->assign('serverurl', index_url($_SERVER)); 933 $PAGE->assign('serverurl', index_url($_SERVER));
@@ -1023,7 +1012,12 @@ function renderPage($conf, $pluginManager)
1023 $_SESSION['LINKS_PER_PAGE']=abs(intval($_GET['linksperpage'])); 1012 $_SESSION['LINKS_PER_PAGE']=abs(intval($_GET['linksperpage']));
1024 } 1013 }
1025 1014
1026 header('Location: '. generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('linksperpage'))); 1015 if (! empty($_SERVER['HTTP_REFERER'])) {
1016 $location = generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('linksperpage'));
1017 } else {
1018 $location = '?';
1019 }
1020 header('Location: '. $location);
1027 exit; 1021 exit;
1028 } 1022 }
1029 1023
@@ -1035,7 +1029,25 @@ function renderPage($conf, $pluginManager)
1035 unset($_SESSION['privateonly']); // See all links 1029 unset($_SESSION['privateonly']); // See all links
1036 } 1030 }
1037 1031
1038 header('Location: '. generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('privateonly'))); 1032 if (! empty($_SERVER['HTTP_REFERER'])) {
1033 $location = generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('privateonly'));
1034 } else {
1035 $location = '?';
1036 }
1037 header('Location: '. $location);
1038 exit;
1039 }
1040
1041 // -------- User wants to see only untagged links (toggle)
1042 if (isset($_GET['untaggedonly'])) {
1043 $_SESSION['untaggedonly'] = empty($_SESSION['untaggedonly']);
1044
1045 if (! empty($_SERVER['HTTP_REFERER'])) {
1046 $location = generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('untaggedonly'));
1047 } else {
1048 $location = '?';
1049 }
1050 header('Location: '. $location);
1039 exit; 1051 exit;
1040 } 1052 }
1041 1053
@@ -1046,7 +1058,13 @@ function renderPage($conf, $pluginManager)
1046 // Show login screen, then redirect to ?post=... 1058 // Show login screen, then redirect to ?post=...
1047 if (isset($_GET['post'])) 1059 if (isset($_GET['post']))
1048 { 1060 {
1049 header('Location: ?do=login&post='.urlencode($_GET['post']).(!empty($_GET['title'])?'&title='.urlencode($_GET['title']):'').(!empty($_GET['description'])?'&description='.urlencode($_GET['description']):'').(!empty($_GET['source'])?'&source='.urlencode($_GET['source']):'')); // Redirect to login page, then back to post link. 1061 header( // Redirect to login page, then back to post link.
1062 'Location: ?do=login&post='.urlencode($_GET['post']).
1063 (!empty($_GET['title'])?'&title='.urlencode($_GET['title']):'').
1064 (!empty($_GET['description'])?'&description='.urlencode($_GET['description']):'').
1065 (!empty($_GET['tags'])?'&tags='.urlencode($_GET['tags']):'').
1066 (!empty($_GET['source'])?'&source='.urlencode($_GET['source']):'')
1067 );
1050 exit; 1068 exit;
1051 } 1069 }
1052 1070
@@ -1064,10 +1082,10 @@ function renderPage($conf, $pluginManager)
1064 // -------- Display the Tools menu if requested (import/export/bookmarklet...) 1082 // -------- Display the Tools menu if requested (import/export/bookmarklet...)
1065 if ($targetPage == Router::$PAGE_TOOLS) 1083 if ($targetPage == Router::$PAGE_TOOLS)
1066 { 1084 {
1067 $data = array( 1085 $data = [
1068 'pageabsaddr' => index_url($_SERVER), 1086 'pageabsaddr' => index_url($_SERVER),
1069 'sslenabled' => !empty($_SERVER['HTTPS']) 1087 'sslenabled' => is_https($_SERVER),
1070 ); 1088 ];
1071 $pluginManager->executeHooks('render_tools', $data); 1089 $pluginManager->executeHooks('render_tools', $data);
1072 1090
1073 foreach ($data as $key => $value) { 1091 foreach ($data as $key => $value) {
@@ -1082,16 +1100,19 @@ function renderPage($conf, $pluginManager)
1082 if ($targetPage == Router::$PAGE_CHANGEPASSWORD) 1100 if ($targetPage == Router::$PAGE_CHANGEPASSWORD)
1083 { 1101 {
1084 if ($conf->get('security.open_shaarli')) { 1102 if ($conf->get('security.open_shaarli')) {
1085 die('You are not supposed to change a password on an Open Shaarli.'); 1103 die(t('You are not supposed to change a password on an Open Shaarli.'));
1086 } 1104 }
1087 1105
1088 if (!empty($_POST['setpassword']) && !empty($_POST['oldpassword'])) 1106 if (!empty($_POST['setpassword']) && !empty($_POST['oldpassword']))
1089 { 1107 {
1090 if (!tokenOk($_POST['token'])) die('Wrong token.'); // Go away! 1108 if (!$sessionManager->checkToken($_POST['token'])) die(t('Wrong token.')); // Go away!
1091 1109
1092 // Make sure old password is correct. 1110 // Make sure old password is correct.
1093 $oldhash = sha1($_POST['oldpassword'].$conf->get('credentials.login').$conf->get('credentials.salt')); 1111 $oldhash = sha1($_POST['oldpassword'].$conf->get('credentials.login').$conf->get('credentials.salt'));
1094 if ($oldhash!= $conf->get('credentials.hash')) { echo '<script>alert("The old password is not correct.");document.location=\'?do=changepasswd\';</script>'; exit; } 1112 if ($oldhash!= $conf->get('credentials.hash')) {
1113 echo '<script>alert("'. t('The old password is not correct.') .'");document.location=\'?do=changepasswd\';</script>';
1114 exit;
1115 }
1095 // Save new password 1116 // Save new password
1096 // Salt renders rainbow-tables attacks useless. 1117 // Salt renders rainbow-tables attacks useless.
1097 $conf->set('credentials.salt', sha1(uniqid('', true) .'_'. mt_rand())); 1118 $conf->set('credentials.salt', sha1(uniqid('', true) .'_'. mt_rand()));
@@ -1109,7 +1130,7 @@ function renderPage($conf, $pluginManager)
1109 echo '<script>alert("'. $e->getMessage() .'");document.location=\'?do=tools\';</script>'; 1130 echo '<script>alert("'. $e->getMessage() .'");document.location=\'?do=tools\';</script>';
1110 exit; 1131 exit;
1111 } 1132 }
1112 echo '<script>alert("Your password has been changed.");document.location=\'?do=tools\';</script>'; 1133 echo '<script>alert("'. t('Your password has been changed') .'");document.location=\'?do=tools\';</script>';
1113 exit; 1134 exit;
1114 } 1135 }
1115 else // show the change password form. 1136 else // show the change password form.
@@ -1124,8 +1145,8 @@ function renderPage($conf, $pluginManager)
1124 { 1145 {
1125 if (!empty($_POST['title']) ) 1146 if (!empty($_POST['title']) )
1126 { 1147 {
1127 if (!tokenOk($_POST['token'])) { 1148 if (!$sessionManager->checkToken($_POST['token'])) {
1128 die('Wrong token.'); // Go away! 1149 die(t('Wrong token.')); // Go away!
1129 } 1150 }
1130 $tz = 'UTC'; 1151 $tz = 'UTC';
1131 if (!empty($_POST['continent']) && !empty($_POST['city']) 1152 if (!empty($_POST['continent']) && !empty($_POST['city'])
@@ -1136,14 +1157,21 @@ function renderPage($conf, $pluginManager)
1136 $conf->set('general.timezone', $tz); 1157 $conf->set('general.timezone', $tz);
1137 $conf->set('general.title', escape($_POST['title'])); 1158 $conf->set('general.title', escape($_POST['title']));
1138 $conf->set('general.header_link', escape($_POST['titleLink'])); 1159 $conf->set('general.header_link', escape($_POST['titleLink']));
1160 $conf->set('resource.theme', escape($_POST['theme']));
1139 $conf->set('redirector.url', escape($_POST['redirector'])); 1161 $conf->set('redirector.url', escape($_POST['redirector']));
1140 $conf->set('security.session_protection_disabled', !empty($_POST['disablesessionprotection'])); 1162 $conf->set('security.session_protection_disabled', !empty($_POST['disablesessionprotection']));
1141 $conf->set('privacy.default_private_links', !empty($_POST['privateLinkByDefault'])); 1163 $conf->set('privacy.default_private_links', !empty($_POST['privateLinkByDefault']));
1142 $conf->set('feed.rss_permalinks', !empty($_POST['enableRssPermalinks'])); 1164 $conf->set('feed.rss_permalinks', !empty($_POST['enableRssPermalinks']));
1143 $conf->set('updates.check_updates', !empty($_POST['updateCheck'])); 1165 $conf->set('updates.check_updates', !empty($_POST['updateCheck']));
1144 $conf->set('privacy.hide_public_links', !empty($_POST['hidePublicLinks'])); 1166 $conf->set('privacy.hide_public_links', !empty($_POST['hidePublicLinks']));
1167 $conf->set('api.enabled', !empty($_POST['enableApi']));
1168 $conf->set('api.secret', escape($_POST['apiSecret']));
1169 $conf->set('translation.language', escape($_POST['language']));
1170
1145 try { 1171 try {
1146 $conf->write(isLoggedIn()); 1172 $conf->write(isLoggedIn());
1173 $history->updateSettings();
1174 invalidateCaches($conf->get('resource.page_cache'));
1147 } 1175 }
1148 catch(Exception $e) { 1176 catch(Exception $e) {
1149 error_log( 1177 error_log(
@@ -1155,21 +1183,30 @@ function renderPage($conf, $pluginManager)
1155 echo '<script>alert("'. $e->getMessage() .'");document.location=\'?do=configure\';</script>'; 1183 echo '<script>alert("'. $e->getMessage() .'");document.location=\'?do=configure\';</script>';
1156 exit; 1184 exit;
1157 } 1185 }
1158 echo '<script>alert("Configuration was saved.");document.location=\'?do=configure\';</script>'; 1186 echo '<script>alert("'. t('Configuration was saved.') .'");document.location=\'?do=configure\';</script>';
1159 exit; 1187 exit;
1160 } 1188 }
1161 else // Show the configuration form. 1189 else // Show the configuration form.
1162 { 1190 {
1163 $PAGE->assign('title', $conf->get('general.title')); 1191 $PAGE->assign('title', $conf->get('general.title'));
1192 $PAGE->assign('theme', $conf->get('resource.theme'));
1193 $PAGE->assign('theme_available', ThemeUtils::getThemes($conf->get('resource.raintpl_tpl')));
1164 $PAGE->assign('redirector', $conf->get('redirector.url')); 1194 $PAGE->assign('redirector', $conf->get('redirector.url'));
1165 list($timezone_form, $timezone_js) = generateTimeZoneForm($conf->get('general.timezone')); 1195 list($continents, $cities) = generateTimeZoneData(
1166 $PAGE->assign('timezone_form', $timezone_form); 1196 timezone_identifiers_list(),
1167 $PAGE->assign('timezone_js',$timezone_js); 1197 $conf->get('general.timezone')
1198 );
1199 $PAGE->assign('continents', $continents);
1200 $PAGE->assign('cities', $cities);
1168 $PAGE->assign('private_links_default', $conf->get('privacy.default_private_links', false)); 1201 $PAGE->assign('private_links_default', $conf->get('privacy.default_private_links', false));
1169 $PAGE->assign('session_protection_disabled', $conf->get('security.session_protection_disabled', false)); 1202 $PAGE->assign('session_protection_disabled', $conf->get('security.session_protection_disabled', false));
1170 $PAGE->assign('enable_rss_permalinks', $conf->get('feed.rss_permalinks', false)); 1203 $PAGE->assign('enable_rss_permalinks', $conf->get('feed.rss_permalinks', false));
1171 $PAGE->assign('enable_update_check', $conf->get('updates.check_updates', true)); 1204 $PAGE->assign('enable_update_check', $conf->get('updates.check_updates', true));
1172 $PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false)); 1205 $PAGE->assign('hide_public_links', $conf->get('privacy.hide_public_links', false));
1206 $PAGE->assign('api_enabled', $conf->get('api.enabled', true));
1207 $PAGE->assign('api_secret', $conf->get('api.secret'));
1208 $PAGE->assign('languages', Languages::getAvailableLanguages());
1209 $PAGE->assign('language', $conf->get('translation.language'));
1173 $PAGE->renderPage('configure'); 1210 $PAGE->renderPage('configure');
1174 exit; 1211 exit;
1175 } 1212 }
@@ -1179,48 +1216,28 @@ function renderPage($conf, $pluginManager)
1179 if ($targetPage == Router::$PAGE_CHANGETAG) 1216 if ($targetPage == Router::$PAGE_CHANGETAG)
1180 { 1217 {
1181 if (empty($_POST['fromtag']) || (empty($_POST['totag']) && isset($_POST['renametag']))) { 1218 if (empty($_POST['fromtag']) || (empty($_POST['totag']) && isset($_POST['renametag']))) {
1182 $PAGE->assign('tags', $LINKSDB->allTags()); 1219 $PAGE->assign('fromtag', ! empty($_GET['fromtag']) ? escape($_GET['fromtag']) : '');
1183 $PAGE->renderPage('changetag'); 1220 $PAGE->renderPage('changetag');
1184 exit; 1221 exit;
1185 } 1222 }
1186 1223
1187 if (!tokenOk($_POST['token'])) { 1224 if (!$sessionManager->checkToken($_POST['token'])) {
1188 die('Wrong token.'); 1225 die(t('Wrong token.'));
1189 } 1226 }
1190 1227
1191 // Delete a tag: 1228 $alteredLinks = $LINKSDB->renameTag(escape($_POST['fromtag']), escape($_POST['totag']));
1192 if (isset($_POST['deletetag']) && !empty($_POST['fromtag'])) { 1229 $LINKSDB->save($conf->get('resource.page_cache'));
1193 $needle = trim($_POST['fromtag']); 1230 foreach ($alteredLinks as $link) {
1194 // True for case-sensitive tag search. 1231 $history->updateLink($link);
1195 $linksToAlter = $LINKSDB->filterSearch(array('searchtags' => $needle), true); 1232 }
1196 foreach($linksToAlter as $key=>$value) 1233 $delete = empty($_POST['totag']);
1197 { 1234 $redirect = $delete ? 'do=changetag' : 'searchtags='. urlencode(escape($_POST['totag']));
1198 $tags = explode(' ',trim($value['tags'])); 1235 $count = count($alteredLinks);
1199 unset($tags[array_search($needle,$tags)]); // Remove tag. 1236 $alert = $delete
1200 $value['tags']=trim(implode(' ',$tags)); 1237 ? sprintf(t('The tag was removed from %d link.', 'The tag was removed from %d links.', $count), $count)
1201 $LINKSDB[$key]=$value; 1238 : sprintf(t('The tag was renamed in %d link.', 'The tag was renamed in %d links.', $count), $count);
1202 } 1239 echo '<script>alert("'. $alert .'");document.location=\'?'. $redirect .'\';</script>';
1203 $LINKSDB->save($conf->get('resource.page_cache')); 1240 exit;
1204 echo '<script>alert("Tag was removed from '.count($linksToAlter).' links.");document.location=\'?\';</script>';
1205 exit;
1206 }
1207
1208 // Rename a tag:
1209 if (isset($_POST['renametag']) && !empty($_POST['fromtag']) && !empty($_POST['totag'])) {
1210 $needle = trim($_POST['fromtag']);
1211 // True for case-sensitive tag search.
1212 $linksToAlter = $LINKSDB->filterSearch(array('searchtags' => $needle), true);
1213 foreach($linksToAlter as $key=>$value)
1214 {
1215 $tags = explode(' ',trim($value['tags']));
1216 $tags[array_search($needle,$tags)] = trim($_POST['totag']); // Replace tags value.
1217 $value['tags']=trim(implode(' ',$tags));
1218 $LINKSDB[$key]=$value;
1219 }
1220 $LINKSDB->save($conf->get('resource.page_cache')); // Save to disk.
1221 echo '<script>alert("Tag was renamed in '.count($linksToAlter).' links.");document.location=\'?searchtags='.urlencode($_POST['totag']).'\';</script>';
1222 exit;
1223 }
1224 } 1241 }
1225 1242
1226 // -------- User wants to add a link without using the bookmarklet: Show form. 1243 // -------- User wants to add a link without using the bookmarklet: Show form.
@@ -1234,27 +1251,29 @@ function renderPage($conf, $pluginManager)
1234 if (isset($_POST['save_edit'])) 1251 if (isset($_POST['save_edit']))
1235 { 1252 {
1236 // Go away! 1253 // Go away!
1237 if (! tokenOk($_POST['token'])) { 1254 if (! $sessionManager->checkToken($_POST['token'])) {
1238 die('Wrong token.'); 1255 die(t('Wrong token.'));
1239 } 1256 }
1240 1257
1241 // lf_id should only be present if the link exists. 1258 // lf_id should only be present if the link exists.
1242 $id = !empty($_POST['lf_id']) ? intval(escape($_POST['lf_id'])) : $LINKSDB->getNextId(); 1259 $id = isset($_POST['lf_id']) ? intval(escape($_POST['lf_id'])) : $LINKSDB->getNextId();
1243 // Linkdate is kept here to: 1260 // Linkdate is kept here to:
1244 // - use the same permalink for notes as they're displayed when creating them 1261 // - use the same permalink for notes as they're displayed when creating them
1245 // - let users hack creation date of their posts 1262 // - let users hack creation date of their posts
1246 // See: https://github.com/shaarli/Shaarli/wiki/Datastore-hacks#changing-the-timestamp-for-a-link 1263 // See: https://shaarli.readthedocs.io/en/master/Various-hacks/#changing-the-timestamp-for-a-shaare
1247 $linkdate = escape($_POST['lf_linkdate']); 1264 $linkdate = escape($_POST['lf_linkdate']);
1248 if (isset($LINKSDB[$id])) { 1265 if (isset($LINKSDB[$id])) {
1249 // Edit 1266 // Edit
1250 $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate); 1267 $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate);
1251 $updated = new DateTime(); 1268 $updated = new DateTime();
1252 $shortUrl = $LINKSDB[$id]['shorturl']; 1269 $shortUrl = $LINKSDB[$id]['shorturl'];
1270 $new = false;
1253 } else { 1271 } else {
1254 // New link 1272 // New link
1255 $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate); 1273 $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate);
1256 $updated = null; 1274 $updated = null;
1257 $shortUrl = link_small_hash($created, $id); 1275 $shortUrl = link_small_hash($created, $id);
1276 $new = true;
1258 } 1277 }
1259 1278
1260 // Remove multiple spaces. 1279 // Remove multiple spaces.
@@ -1264,13 +1283,10 @@ function renderPage($conf, $pluginManager)
1264 // Remove duplicates. 1283 // Remove duplicates.
1265 $tags = implode(' ', array_unique(explode(' ', $tags))); 1284 $tags = implode(' ', array_unique(explode(' ', $tags)));
1266 1285
1267 $url = trim($_POST['lf_url']); 1286 if (empty(trim($_POST['lf_url']))) {
1268 if (! startsWith($url, 'http:') && ! startsWith($url, 'https:') 1287 $_POST['lf_url'] = '?' . smallHash($linkdate . $id);
1269 && ! startsWith($url, 'ftp:') && ! startsWith($url, 'magnet:')
1270 && ! startsWith($url, '?') && ! startsWith($url, 'javascript:')
1271 ) {
1272 $url = 'http://' . $url;
1273 } 1288 }
1289 $url = whitelist_protocols(trim($_POST['lf_url']), $conf->get('security.allowed_protocols'));
1274 1290
1275 $link = array( 1291 $link = array(
1276 'id' => $id, 1292 'id' => $id,
@@ -1293,7 +1309,11 @@ function renderPage($conf, $pluginManager)
1293 1309
1294 $LINKSDB[$id] = $link; 1310 $LINKSDB[$id] = $link;
1295 $LINKSDB->save($conf->get('resource.page_cache')); 1311 $LINKSDB->save($conf->get('resource.page_cache'));
1296 pubsubhub($conf); 1312 if ($new) {
1313 $history->addLink($link);
1314 } else {
1315 $history->updateLink($link);
1316 }
1297 1317
1298 // If we are called from the bookmarklet, we must close the popup: 1318 // If we are called from the bookmarklet, we must close the popup:
1299 if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { 1319 if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) {
@@ -1313,9 +1333,13 @@ function renderPage($conf, $pluginManager)
1313 // -------- User clicked the "Cancel" button when editing a link. 1333 // -------- User clicked the "Cancel" button when editing a link.
1314 if (isset($_POST['cancel_edit'])) 1334 if (isset($_POST['cancel_edit']))
1315 { 1335 {
1336 $id = isset($_POST['lf_id']) ? (int) escape($_POST['lf_id']) : false;
1337 if (! isset($LINKSDB[$id])) {
1338 header('Location: ?');
1339 }
1316 // If we are called from the bookmarklet, we must close the popup: 1340 // If we are called from the bookmarklet, we must close the popup:
1317 if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo '<script>self.close();</script>'; exit; } 1341 if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo '<script>self.close();</script>'; exit; }
1318 $link = $LINKSDB[(int) escape($_POST['lf_id'])]; 1342 $link = $LINKSDB[$id];
1319 $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' ); 1343 $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' );
1320 // Scroll to the link which has been edited. 1344 // Scroll to the link which has been edited.
1321 $returnurl .= '#'. $link['shorturl']; 1345 $returnurl .= '#'. $link['shorturl'];
@@ -1325,49 +1349,44 @@ function renderPage($conf, $pluginManager)
1325 } 1349 }
1326 1350
1327 // -------- User clicked the "Delete" button when editing a link: Delete link from database. 1351 // -------- User clicked the "Delete" button when editing a link: Delete link from database.
1328 if (isset($_POST['delete_link'])) 1352 if ($targetPage == Router::$PAGE_DELETELINK)
1329 { 1353 {
1330 if (!tokenOk($_POST['token'])) die('Wrong token.'); 1354 if (! $sessionManager->checkToken($_GET['token'])) {
1331 1355 die(t('Wrong token.'));
1332 // We do not need to ask for confirmation: 1356 }
1333 // - confirmation is handled by JavaScript
1334 // - we are protected from XSRF by the token.
1335
1336 // FIXME! We keep `lf_linkdate` for consistency before a proper API. To be removed.
1337 $id = isset($_POST['lf_id']) ? intval(escape($_POST['lf_id'])) : intval(escape($_POST['lf_linkdate']));
1338
1339 $pluginManager->executeHooks('delete_link', $LINKSDB[$id]);
1340 1357
1341 unset($LINKSDB[$id]); 1358 $ids = trim($_GET['lf_linkdate']);
1342 $LINKSDB->save('resource.page_cache'); // save to disk 1359 if (strpos($ids, ' ') !== false) {
1360 // multiple, space-separated ids provided
1361 $ids = array_values(array_filter(preg_split('/\s+/', escape($ids))));
1362 } else {
1363 // only a single id provided
1364 $ids = [$ids];
1365 }
1366 // assert at least one id is given
1367 if(!count($ids)){
1368 die('no id provided');
1369 }
1370 foreach ($ids as $id) {
1371 $id = (int) escape($id);
1372 $link = $LINKSDB[$id];
1373 $pluginManager->executeHooks('delete_link', $link);
1374 unset($LINKSDB[$id]);
1375 }
1376 $LINKSDB->save($conf->get('resource.page_cache')); // save to disk
1377 $history->deleteLink($link);
1343 1378
1344 // If we are called from the bookmarklet, we must close the popup: 1379 // If we are called from the bookmarklet, we must close the popup:
1345 if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo '<script>self.close();</script>'; exit; } 1380 if (isset($_GET['source']) && ($_GET['source']=='bookmarklet' || $_GET['source']=='firefoxsocialapi')) { echo '<script>self.close();</script>'; exit; }
1346 // Pick where we're going to redirect 1381
1347 // ============================================================= 1382 $location = '?';
1348 // Basically, we can't redirect to where we were previously if it was a permalink 1383 if (isset($_SERVER['HTTP_REFERER'])) {
1349 // or an edit_link, because it would 404. 1384 // Don't redirect to where we were previously if it was a permalink or an edit_link, because it would 404.
1350 // Cases: 1385 $location = generateLocation(
1351 // - / : nothing in $_GET, redirect to self 1386 $_SERVER['HTTP_REFERER'],
1352 // - /?page : redirect to self 1387 $_SERVER['HTTP_HOST'],
1353 // - /?searchterm : redirect to self (there might be other links) 1388 ['delete_link', 'edit_link', $link['shorturl']]
1354 // - /?searchtags : redirect to self 1389 );
1355 // - /permalink : redirect to / (the link does not exist anymore)
1356 // - /?edit_link : redirect to / (the link does not exist anymore)
1357 // PHP treats the permalink as a $_GET variable, so we need to check if every condition for self
1358 // redirect is not satisfied, and only then redirect to /
1359 $location = "?";
1360 // Self redirection
1361 if (count($_GET) == 0
1362 || isset($_GET['page'])
1363 || isset($_GET['searchterm'])
1364 || isset($_GET['searchtags'])
1365 ) {
1366 if (isset($_POST['returnurl'])) {
1367 $location = $_POST['returnurl']; // Handle redirects given by the form
1368 } else {
1369 $location = generateLocation($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'], array('delete_link'));
1370 }
1371 } 1390 }
1372 1391
1373 header('Location: ' . $location); // After deleting the link, redirect to appropriate location 1392 header('Location: ' . $location); // After deleting the link, redirect to appropriate location
@@ -1385,7 +1404,7 @@ function renderPage($conf, $pluginManager)
1385 'link' => $link, 1404 'link' => $link,
1386 'link_is_new' => false, 1405 'link_is_new' => false,
1387 'http_referer' => (isset($_SERVER['HTTP_REFERER']) ? escape($_SERVER['HTTP_REFERER']) : ''), 1406 'http_referer' => (isset($_SERVER['HTTP_REFERER']) ? escape($_SERVER['HTTP_REFERER']) : ''),
1388 'tags' => $LINKSDB->allTags(), 1407 'tags' => $LINKSDB->linksCountPerTag(),
1389 ); 1408 );
1390 $pluginManager->executeHooks('render_editlink', $data); 1409 $pluginManager->executeHooks('render_editlink', $data);
1391 1410
@@ -1417,22 +1436,16 @@ function renderPage($conf, $pluginManager)
1417 // If this is an HTTP(S) link, we try go get the page to extract the title (otherwise we will to straight to the edit form.) 1436 // If this is an HTTP(S) link, we try go get the page to extract the title (otherwise we will to straight to the edit form.)
1418 if (empty($title) && strpos(get_url_scheme($url), 'http') !== false) { 1437 if (empty($title) && strpos(get_url_scheme($url), 'http') !== false) {
1419 // Short timeout to keep the application responsive 1438 // Short timeout to keep the application responsive
1420 list($headers, $content) = get_http_response($url, 4); 1439 // The callback will fill $charset and $title with data from the downloaded page.
1421 if (strpos($headers[0], '200 OK') !== false) { 1440 get_http_response($url, 25, 4194304, get_curl_download_callback($charset, $title));
1422 // Retrieve charset. 1441 if (! empty($title) && strtolower($charset) != 'utf-8') {
1423 $charset = get_charset($headers, $content); 1442 $title = mb_convert_encoding($title, 'utf-8', $charset);
1424 // Extract title.
1425 $title = html_extract_title($content);
1426 // Re-encode title in utf-8 if necessary.
1427 if (! empty($title) && strtolower($charset) != 'utf-8') {
1428 $title = mb_convert_encoding($title, 'utf-8', $charset);
1429 }
1430 } 1443 }
1431 } 1444 }
1432 1445
1433 if ($url == '') { 1446 if ($url == '') {
1434 $url = '?' . smallHash($linkdate . $LINKSDB->getNextId()); 1447 $url = '?' . smallHash($linkdate . $LINKSDB->getNextId());
1435 $title = 'Note: '; 1448 $title = $conf->get('general.default_note_title', t('Note: '));
1436 } 1449 }
1437 $url = escape($url); 1450 $url = escape($url);
1438 $title = escape($title); 1451 $title = escape($title);
@@ -1443,7 +1456,7 @@ function renderPage($conf, $pluginManager)
1443 'url' => $url, 1456 'url' => $url,
1444 'description' => $description, 1457 'description' => $description,
1445 'tags' => $tags, 1458 'tags' => $tags,
1446 'private' => $private 1459 'private' => $private,
1447 ); 1460 );
1448 } else { 1461 } else {
1449 $link['linkdate'] = $link['created']->format(LinkDB::LINK_DATE_FORMAT); 1462 $link['linkdate'] = $link['created']->format(LinkDB::LINK_DATE_FORMAT);
@@ -1454,7 +1467,7 @@ function renderPage($conf, $pluginManager)
1454 'link_is_new' => $link_is_new, 1467 'link_is_new' => $link_is_new,
1455 'http_referer' => (isset($_SERVER['HTTP_REFERER']) ? escape($_SERVER['HTTP_REFERER']) : ''), 1468 'http_referer' => (isset($_SERVER['HTTP_REFERER']) ? escape($_SERVER['HTTP_REFERER']) : ''),
1456 'source' => (isset($_GET['source']) ? $_GET['source'] : ''), 1469 'source' => (isset($_GET['source']) ? $_GET['source'] : ''),
1457 'tags' => $LINKSDB->allTags(), 1470 'tags' => $LINKSDB->linksCountPerTag(),
1458 'default_private_links' => $conf->get('privacy.default_private_links', false), 1471 'default_private_links' => $conf->get('privacy.default_private_links', false),
1459 ); 1472 );
1460 $pluginManager->executeHooks('render_editlink', $data); 1473 $pluginManager->executeHooks('render_editlink', $data);
@@ -1516,7 +1529,22 @@ function renderPage($conf, $pluginManager)
1516 1529
1517 if (! isset($_POST['token']) || ! isset($_FILES['filetoupload'])) { 1530 if (! isset($_POST['token']) || ! isset($_FILES['filetoupload'])) {
1518 // Show import dialog 1531 // Show import dialog
1519 $PAGE->assign('maxfilesize', getMaxFileSize()); 1532 $PAGE->assign(
1533 'maxfilesize',
1534 get_max_upload_size(
1535 ini_get('post_max_size'),
1536 ini_get('upload_max_filesize'),
1537 false
1538 )
1539 );
1540 $PAGE->assign(
1541 'maxfilesizeHuman',
1542 get_max_upload_size(
1543 ini_get('post_max_size'),
1544 ini_get('upload_max_filesize'),
1545 true
1546 )
1547 );
1520 $PAGE->renderPage('import'); 1548 $PAGE->renderPage('import');
1521 exit; 1549 exit;
1522 } 1550 }
@@ -1524,21 +1552,25 @@ function renderPage($conf, $pluginManager)
1524 // Import bookmarks from an uploaded file 1552 // Import bookmarks from an uploaded file
1525 if (isset($_FILES['filetoupload']['size']) && $_FILES['filetoupload']['size'] == 0) { 1553 if (isset($_FILES['filetoupload']['size']) && $_FILES['filetoupload']['size'] == 0) {
1526 // The file is too big or some form field may be missing. 1554 // The file is too big or some form field may be missing.
1527 echo '<script>alert("The file you are trying to upload is probably' 1555 $msg = sprintf(
1528 .' bigger than what this webserver can accept (' 1556 t(
1529 .getMaxFileSize().' bytes).' 1557 'The file you are trying to upload is probably bigger than what this webserver can accept'
1530 .' Please upload in smaller chunks.");document.location=\'?do=' 1558 .' (%s). Please upload in smaller chunks.'
1531 .Router::$PAGE_IMPORT .'\';</script>'; 1559 ),
1560 get_max_upload_size(ini_get('post_max_size'), ini_get('upload_max_filesize'))
1561 );
1562 echo '<script>alert("'. $msg .'");document.location=\'?do='.Router::$PAGE_IMPORT .'\';</script>';
1532 exit; 1563 exit;
1533 } 1564 }
1534 if (! tokenOk($_POST['token'])) { 1565 if (! $sessionManager->checkToken($_POST['token'])) {
1535 die('Wrong token.'); 1566 die('Wrong token.');
1536 } 1567 }
1537 $status = NetscapeBookmarkUtils::import( 1568 $status = NetscapeBookmarkUtils::import(
1538 $_POST, 1569 $_POST,
1539 $_FILES, 1570 $_FILES,
1540 $LINKSDB, 1571 $LINKSDB,
1541 $conf->get('resource.page_cache') 1572 $conf,
1573 $history
1542 ); 1574 );
1543 echo '<script>alert("'.$status.'");document.location=\'?do=' 1575 echo '<script>alert("'.$status.'");document.location=\'?do='
1544 .Router::$PAGE_IMPORT .'\';</script>'; 1576 .Router::$PAGE_IMPORT .'\';</script>';
@@ -1578,6 +1610,7 @@ function renderPage($conf, $pluginManager)
1578 $conf->set('general.enabled_plugins', save_plugin_config($_POST)); 1610 $conf->set('general.enabled_plugins', save_plugin_config($_POST));
1579 } 1611 }
1580 $conf->write(isLoggedIn()); 1612 $conf->write(isLoggedIn());
1613 $history->updateSettings();
1581 } 1614 }
1582 catch (Exception $e) { 1615 catch (Exception $e) {
1583 error_log( 1616 error_log(
@@ -1593,6 +1626,13 @@ function renderPage($conf, $pluginManager)
1593 exit; 1626 exit;
1594 } 1627 }
1595 1628
1629 // Get a fresh token
1630 if ($targetPage == Router::$GET_TOKEN) {
1631 header('Content-Type:text/plain');
1632 echo $sessionManager->generateToken($conf);
1633 exit;
1634 }
1635
1596 // -------- Otherwise, simply display search form and links: 1636 // -------- Otherwise, simply display search form and links:
1597 showLinkList($PAGE, $LINKSDB, $conf, $pluginManager); 1637 showLinkList($PAGE, $LINKSDB, $conf, $pluginManager);
1598 exit; 1638 exit;
@@ -1610,8 +1650,16 @@ function renderPage($conf, $pluginManager)
1610function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager) 1650function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1611{ 1651{
1612 // Used in templates 1652 // Used in templates
1613 $searchtags = !empty($_GET['searchtags']) ? escape($_GET['searchtags']) : ''; 1653 if (isset($_GET['searchtags'])) {
1614 $searchterm = !empty($_GET['searchterm']) ? escape($_GET['searchterm']) : ''; 1654 if (! empty($_GET['searchtags'])) {
1655 $searchtags = escape(normalize_spaces($_GET['searchtags']));
1656 } else {
1657 $searchtags = false;
1658 }
1659 } else {
1660 $searchtags = '';
1661 }
1662 $searchterm = !empty($_GET['searchterm']) ? escape(normalize_spaces($_GET['searchterm'])) : '';
1615 1663
1616 // Smallhash filter 1664 // Smallhash filter
1617 if (! empty($_SERVER['QUERY_STRING']) 1665 if (! empty($_SERVER['QUERY_STRING'])
@@ -1624,8 +1672,12 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1624 } 1672 }
1625 } else { 1673 } else {
1626 // Filter links according search parameters. 1674 // Filter links according search parameters.
1627 $privateonly = !empty($_SESSION['privateonly']); 1675 $visibility = ! empty($_SESSION['privateonly']) ? 'private' : 'all';
1628 $linksToDisplay = $LINKSDB->filterSearch($_GET, false, $privateonly); 1676 $request = [
1677 'searchtags' => $searchtags,
1678 'searchterm' => $searchterm,
1679 ];
1680 $linksToDisplay = $LINKSDB->filterSearch($request, false, $visibility, !empty($_SESSION['untaggedonly']));
1629 } 1681 }
1630 1682
1631 // ---- Handle paging. 1683 // ---- Handle paging.
@@ -1649,7 +1701,11 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1649 while ($i<$end && $i<count($keys)) 1701 while ($i<$end && $i<count($keys))
1650 { 1702 {
1651 $link = $linksToDisplay[$keys[$i]]; 1703 $link = $linksToDisplay[$keys[$i]];
1652 $link['description'] = format_description($link['description'], $conf->get('redirector.url')); 1704 $link['description'] = format_description(
1705 $link['description'],
1706 $conf->get('redirector.url'),
1707 $conf->get('redirector.encode_url')
1708 );
1653 $classLi = ($i % 2) != 0 ? '' : 'publicLinkHightLight'; 1709 $classLi = ($i % 2) != 0 ? '' : 'publicLinkHightLight';
1654 $link['class'] = $link['private'] == 0 ? $classLi : 'private'; 1710 $link['class'] = $link['private'] == 0 ? $classLi : 'private';
1655 $link['timestamp'] = $link['created']->getTimestamp(); 1711 $link['timestamp'] = $link['created']->getTimestamp();
@@ -1658,7 +1714,7 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1658 } else { 1714 } else {
1659 $link['updated_timestamp'] = ''; 1715 $link['updated_timestamp'] = '';
1660 } 1716 }
1661 $taglist = explode(' ', $link['tags']); 1717 $taglist = preg_split('/\s+/', $link['tags'], -1, PREG_SPLIT_NO_EMPTY);
1662 uasort($taglist, 'strcasecmp'); 1718 uasort($taglist, 'strcasecmp');
1663 $link['taglist'] = $taglist; 1719 $link['taglist'] = $taglist;
1664 // Check for both signs of a note: starting with ? and 7 chars long. 1720 // Check for both signs of a note: starting with ? and 7 chars long.
@@ -1672,7 +1728,7 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1672 } 1728 }
1673 1729
1674 // Compute paging navigation 1730 // Compute paging navigation
1675 $searchtagsUrl = empty($searchtags) ? '' : '&searchtags=' . urlencode($searchtags); 1731 $searchtagsUrl = $searchtags === '' ? '' : '&searchtags=' . urlencode($searchtags);
1676 $searchtermUrl = empty($searchterm) ? '' : '&searchterm=' . urlencode($searchterm); 1732 $searchtermUrl = empty($searchterm) ? '' : '&searchterm=' . urlencode($searchterm);
1677 $previous_page_url = ''; 1733 $previous_page_url = '';
1678 if ($i != count($keys)) { 1734 if ($i != count($keys)) {
@@ -1692,9 +1748,9 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager)
1692 'result_count' => count($linksToDisplay), 1748 'result_count' => count($linksToDisplay),
1693 'search_term' => $searchterm, 1749 'search_term' => $searchterm,
1694 'search_tags' => $searchtags, 1750 'search_tags' => $searchtags,
1751 'visibility' => ! empty($_SESSION['privateonly']) ? 'private' : '',
1695 'redirector' => $conf->get('redirector.url'), // Optional redirector URL. 1752 'redirector' => $conf->get('redirector.url'), // Optional redirector URL.
1696 'links' => $linkDisp, 1753 'links' => $linkDisp,
1697 'tags' => $LINKSDB->allTags(),
1698 ); 1754 );
1699 1755
1700 // If there is only a single link, we change on-the-fly the title of the page. 1756 // If there is only a single link, we change on-the-fly the title of the page.
@@ -1903,10 +1959,10 @@ function lazyThumbnail($conf, $url,$href=false)
1903 * Installation 1959 * Installation
1904 * This function should NEVER be called if the file data/config.php exists. 1960 * This function should NEVER be called if the file data/config.php exists.
1905 * 1961 *
1906 * @param ConfigManager $conf Configuration Manager instance. 1962 * @param ConfigManager $conf Configuration Manager instance.
1963 * @param SessionManager $sessionManager SessionManager instance
1907 */ 1964 */
1908function install($conf) 1965function install($conf, $sessionManager) {
1909{
1910 // On free.fr host, make sure the /sessions directory exists, otherwise login will not work. 1966 // On free.fr host, make sure the /sessions directory exists, otherwise login will not work.
1911 if (endsWith($_SERVER['HTTP_HOST'],'.free.fr') && !is_dir($_SERVER['DOCUMENT_ROOT'].'/sessions')) mkdir($_SERVER['DOCUMENT_ROOT'].'/sessions',0705); 1967 if (endsWith($_SERVER['HTTP_HOST'],'.free.fr') && !is_dir($_SERVER['DOCUMENT_ROOT'].'/sessions')) mkdir($_SERVER['DOCUMENT_ROOT'].'/sessions',0705);
1912 1968
@@ -1915,12 +1971,20 @@ function install($conf)
1915 // (Because on some hosts, session.save_path may not be set correctly, 1971 // (Because on some hosts, session.save_path may not be set correctly,
1916 // or we may not have write access to it.) 1972 // or we may not have write access to it.)
1917 if (isset($_GET['test_session']) && ( !isset($_SESSION) || !isset($_SESSION['session_tested']) || $_SESSION['session_tested']!='Working')) 1973 if (isset($_GET['test_session']) && ( !isset($_SESSION) || !isset($_SESSION['session_tested']) || $_SESSION['session_tested']!='Working'))
1918 { // Step 2: Check if data in session is correct. 1974 {
1919 echo '<pre>Sessions do not seem to work correctly on your server.<br>'; 1975 // Step 2: Check if data in session is correct.
1920 echo 'Make sure the variable session.save_path is set correctly in your php config, and that you have write access to it.<br>'; 1976 $msg = t(
1921 echo 'It currently points to '.session_save_path().'<br>'; 1977 '<pre>Sessions do not seem to work correctly on your server.<br>'.
1922 echo 'Check that the hostname used to access Shaarli contains a dot. On some browsers, accessing your server via a hostname like \'localhost\' or any custom hostname without a dot causes cookie storage to fail. We recommend accessing your server via it\'s IP address or Fully Qualified Domain Name.<br>'; 1978 'Make sure the variable "session.save_path" is set correctly in your PHP config, '.
1923 echo '<br><a href="?">Click to try again.</a></pre>'; 1979 'and that you have write access to it.<br>'.
1980 'It currently points to %s.<br>'.
1981 'On some browsers, accessing your server via a hostname like \'localhost\' '.
1982 'or any custom hostname without a dot causes cookie storage to fail. '.
1983 'We recommend accessing your server via it\'s IP address or Fully Qualified Domain Name.<br>'
1984 );
1985 $msg = sprintf($msg, session_save_path());
1986 echo $msg;
1987 echo '<br><a href="?">'. t('Click to try again.') .'</a></pre>';
1924 die; 1988 die;
1925 } 1989 }
1926 if (!isset($_SESSION['session_tested'])) 1990 if (!isset($_SESSION['session_tested']))
@@ -1953,7 +2017,16 @@ function install($conf)
1953 } else { 2017 } else {
1954 $conf->set('general.title', 'Shared links on '.escape(index_url($_SERVER))); 2018 $conf->set('general.title', 'Shared links on '.escape(index_url($_SERVER)));
1955 } 2019 }
2020 $conf->set('translation.language', escape($_POST['language']));
1956 $conf->set('updates.check_updates', !empty($_POST['updateCheck'])); 2021 $conf->set('updates.check_updates', !empty($_POST['updateCheck']));
2022 $conf->set('api.enabled', !empty($_POST['enableApi']));
2023 $conf->set(
2024 'api.secret',
2025 generate_api_secret(
2026 $conf->get('credentials.login'),
2027 $conf->get('credentials.salt')
2028 )
2029 );
1957 try { 2030 try {
1958 // Everything is ok, let's create config file. 2031 // Everything is ok, let's create config file.
1959 $conf->write(isLoggedIn()); 2032 $conf->write(isLoggedIn());
@@ -1972,16 +2045,11 @@ function install($conf)
1972 exit; 2045 exit;
1973 } 2046 }
1974 2047
1975 // Display config form: 2048 $PAGE = new PageBuilder($conf, null, $sessionManager->generateToken());
1976 list($timezone_form, $timezone_js) = generateTimeZoneForm(); 2049 list($continents, $cities) = generateTimeZoneData(timezone_identifiers_list(), date_default_timezone_get());
1977 $timezone_html = ''; 2050 $PAGE->assign('continents', $continents);
1978 if ($timezone_form != '') { 2051 $PAGE->assign('cities', $cities);
1979 $timezone_html = '<tr><td><b>Timezone:</b></td><td>'.$timezone_form.'</td></tr>'; 2052 $PAGE->assign('languages', Languages::getAvailableLanguages());
1980 }
1981
1982 $PAGE = new PageBuilder($conf);
1983 $PAGE->assign('timezone_html',$timezone_html);
1984 $PAGE->assign('timezone_js',$timezone_js);
1985 $PAGE->renderPage('install'); 2053 $PAGE->renderPage('install');
1986 exit; 2054 exit;
1987} 2055}
@@ -2216,4 +2284,45 @@ if (isset($_SERVER['QUERY_STRING']) && startsWith($_SERVER['QUERY_STRING'], 'do=
2216if (!isset($_SESSION['LINKS_PER_PAGE'])) { 2284if (!isset($_SESSION['LINKS_PER_PAGE'])) {
2217 $_SESSION['LINKS_PER_PAGE'] = $conf->get('general.links_per_page', 20); 2285 $_SESSION['LINKS_PER_PAGE'] = $conf->get('general.links_per_page', 20);
2218} 2286}
2219renderPage($conf, $pluginManager); 2287
2288try {
2289 $history = new History($conf->get('resource.history'));
2290} catch(Exception $e) {
2291 die($e->getMessage());
2292}
2293
2294$linkDb = new LinkDB(
2295 $conf->get('resource.datastore'),
2296 isLoggedIn(),
2297 $conf->get('privacy.hide_public_links'),
2298 $conf->get('redirector.url'),
2299 $conf->get('redirector.encode_url')
2300);
2301
2302$container = new \Slim\Container();
2303$container['conf'] = $conf;
2304$container['plugins'] = $pluginManager;
2305$container['history'] = $history;
2306$app = new \Slim\App($container);
2307
2308// REST API routes
2309$app->group('/api/v1', function() {
2310 $this->get('/info', '\Shaarli\Api\Controllers\Info:getInfo')->setName('getInfo');
2311 $this->get('/links', '\Shaarli\Api\Controllers\Links:getLinks')->setName('getLinks');
2312 $this->get('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:getLink')->setName('getLink');
2313 $this->post('/links', '\Shaarli\Api\Controllers\Links:postLink')->setName('postLink');
2314 $this->put('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:putLink')->setName('putLink');
2315 $this->delete('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:deleteLink')->setName('deleteLink');
2316 $this->get('/history', '\Shaarli\Api\Controllers\History:getHistory')->setName('getHistory');
2317})->add('\Shaarli\Api\ApiMiddleware');
2318
2319$response = $app->run(true);
2320// Hack to make Slim and Shaarli router work together:
2321// If a Slim route isn't found and NOT API call, we call renderPage().
2322if ($response->getStatusCode() == 404 && strpos($_SERVER['REQUEST_URI'], '/api/v1') === false) {
2323 // We use UTF-8 for proper international characters handling.
2324 header('Content-Type: text/html; charset=utf-8');
2325 renderPage($conf, $pluginManager, $linkDb, $history, $sessionManager);
2326} else {
2327 $app->respond($response);
2328}
diff --git a/mkdocs.yml b/mkdocs.yml
new file mode 100644
index 00000000..443c3a08
--- /dev/null
+++ b/mkdocs.yml
@@ -0,0 +1,50 @@
1site_name: Shaarli Documentation
2repo_url: https://github.com/shaarli/Shaarli
3edit_uri: edit/master/doc/md
4site_description: The personal, minimalist, super-fast, database free, bookmarking service
5theme: readthedocs
6docs_dir: doc/md
7site_dir: doc/html
8
9pages:
10- Home: index.md
11- Setup:
12 - Download and Installation: Download-and-Installation.md
13 - Upgrade and migration: Upgrade-and-migration.md
14 - Server requirements: Server-requirements.md
15 - Server configuration: Server-configuration.md
16 - Server security: Server-security.md
17 - Shaarli configuration: Shaarli-configuration.md
18 - Plugins: Plugins.md
19- Docker:
20 - Docker 101: docker/docker-101.md
21 - Shaarli images: docker/shaarli-images.md
22 - Reverse proxy configuration: docker/reverse-proxy-configuration.md
23 - Docker resources: docker/resources.md
24- Usage:
25 - Bookmarklet: Bookmarklet.md
26 - Browsing and searching: Browsing-and-searching.md
27 - Firefox share: Firefox-share.md
28 - RSS feeds: RSS-feeds.md
29 - REST API: REST-API.md
30 - Community & Related software: Community-&-Related-software.md
31- How To:
32 - Backup, restore, import and export: Backup,-restore,-import-and-export.md
33 - Various hacks: Various-hacks.md
34- Development:
35 - Development guidelines: Development-guidelines.md
36 - Continuous integration tools: Continuous-integration-tools.md
37 - GnuPG signature: GnuPG-signature.md
38 - Directory structure: Directory-structure.md
39 - 3rd party libraries: 3rd-party-libraries.md
40 - Plugin System: Plugin-System.md
41 - Release Shaarli: Release-Shaarli.md
42 - Versioning and Branches: Versioning-and-Branches.md
43 - Security: Security.md
44 - Static analysis: Static-analysis.md
45 - Translations: Translations.md
46 - Theming: Theming.md
47 - Unit tests: Unit-tests.md
48 - Unit tests inside Docker: Unit-tests-Docker.md
49- FAQ: FAQ.md
50- Troubleshooting: Troubleshooting.md
diff --git a/phpunit.xml b/phpunit.xml
index d6e01c35..8b66e6c5 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -3,13 +3,25 @@
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd" 4 xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd"
5 colors="true"> 5 colors="true">
6 <testsuites>
7 <testsuite name="unit-tests">
8 <directory>tests</directory>
9 <exclude>tests/languages</exclude>
10 </testsuite>
11 <testsuite name="language-de">
12 <directory>tests/languages/de</directory>
13 </testsuite>
14 <testsuite name="language-en">
15 <directory>tests/languages/en</directory>
16 </testsuite>
17 <testsuite name="language-fr">
18 <directory>tests/languages/fr</directory>
19 </testsuite>
20 </testsuites>
21
6 <filter> 22 <filter>
7 <whitelist addUncoveredFilesFromWhitelist="true"> 23 <whitelist addUncoveredFilesFromWhitelist="true">
8 <directory suffix=".php">application</directory> 24 <directory suffix=".php">application</directory>
9 </whitelist> 25 </whitelist>
10 </filter> 26 </filter>
11 <logging>
12 <log type="coverage-html" target="coverage" lowUpperBound="30" highLowerBound="80"/>
13 <log type="coverage-text" target="php://stdout" showUncoveredFiles="true"/>
14 </logging>
15</phpunit> 27</phpunit>
diff --git a/plugins/TODO.md b/plugins/TODO.md
deleted file mode 100644
index e3313d67..00000000
--- a/plugins/TODO.md
+++ /dev/null
@@ -1,28 +0,0 @@
1https://github.com/shaarli/Shaarli/issues/181 - Add Disqus or Isso comments box on a permalink page
2
3 * http://posativ.org/isso/
4 * install debian package https://packages.debian.org/sid/isso
5 * configure server http://posativ.org/isso/docs/configuration/server/
6 * configure client http://posativ.org/isso/docs/configuration/client/
7 * http://posativ.org/isso/docs/quickstart/ and add `<script data-isso="//comments.example.tld/" src="//comments.example.tld/js/embed.min.js"></script>` to includes.html template; then add `<section id="isso-thread"></section>` in the linklist template where you want the comments (in the linklist_plugins loop for example)
8
9
10Problem: by default, Isso thread ID is guessed from the current url (only one thread per page).
11if we want multiple threads on a single page (shaarli linklist), we must use : the `data-isso-id` client config,
12with data-isso-id being the permalink of an item.
13
14`<section data-isso-id="aH7klxW" id="isso-thread"></section>`
15`data-isso-id: Set a custom thread id, defaults to current URI.`
16
17Problem: feature is currently broken https://github.com/posativ/isso/issues/27
18
19Another option, only display isso threads when current URL is a permalink (`\?(A-Z|a-z|0-9|-){7}`) (only show thread
20when displaying only this link), and just display a "comments" button on each linklist item. Optionally show the comment
21count on each item using the API (http://posativ.org/isso/docs/extras/api/#get-comment-count). API requests can be done
22by raintpl `{function` or client-side with js. The former should be faster if isso and shaarli are on ther same server.
23
24Showing all full isso threads in the linklist would destroy layout
25
26-----------------------------------------------------------
27
28http://www.git-attitude.fr/2014/11/04/git-rerere/ for the merge
diff --git a/plugins/addlink_toolbar/addlink_toolbar.php b/plugins/addlink_toolbar/addlink_toolbar.php
index bf8a198a..8c05a231 100644
--- a/plugins/addlink_toolbar/addlink_toolbar.php
+++ b/plugins/addlink_toolbar/addlink_toolbar.php
@@ -26,11 +26,11 @@ function hook_addlink_toolbar_render_header($data)
26 array( 26 array(
27 'type' => 'text', 27 'type' => 'text',
28 'name' => 'post', 28 'name' => 'post',
29 'placeholder' => 'URI', 29 'placeholder' => t('URI'),
30 ), 30 ),
31 array( 31 array(
32 'type' => 'submit', 32 'type' => 'submit',
33 'value' => 'Add link', 33 'value' => t('Add link'),
34 'class' => 'bigbutton', 34 'class' => 'bigbutton',
35 ), 35 ),
36 ), 36 ),
@@ -42,17 +42,10 @@ function hook_addlink_toolbar_render_header($data)
42} 42}
43 43
44/** 44/**
45 * When link list is displayed, include markdown CSS. 45 * This function is never called, but contains translation calls for GNU gettext extraction.
46 *
47 * @param array $data - includes data.
48 *
49 * @return mixed - includes data with markdown CSS file added.
50 */ 46 */
51function hook_addlink_toolbar_render_includes($data) 47function addlink_toolbar_dummy_translation()
52{ 48{
53 if ($data['_PAGE_'] == Router::$PAGE_LINKLIST && $data['_LOGGEDIN_'] === true) { 49 // meta
54 $data['css_files'][] = PluginManager::$PLUGINS_PATH . '/addlink_toolbar/addlink_toolbar.css'; 50 t('Adds the addlink input on the linklist page.');
55 }
56
57 return $data;
58} 51}
diff --git a/plugins/archiveorg/archiveorg.html b/plugins/archiveorg/archiveorg.html
index 0781fe35..ad501f47 100644
--- a/plugins/archiveorg/archiveorg.html
+++ b/plugins/archiveorg/archiveorg.html
@@ -1 +1,5 @@
1<span><a href="https://web.archive.org/web/%s"><img class="linklist-plugin-icon" src="plugins/archiveorg/internetarchive.png" title="View on archive.org" alt="archive.org" /></a></span> 1<span>
2 <a href="https://web.archive.org/web/%s">
3 <img class="linklist-plugin-icon" src="plugins/archiveorg/internetarchive.png" title="%s" alt="archive.org" />
4 </a>
5</span>
diff --git a/plugins/archiveorg/archiveorg.php b/plugins/archiveorg/archiveorg.php
index 03d13d0e..cda35751 100644
--- a/plugins/archiveorg/archiveorg.php
+++ b/plugins/archiveorg/archiveorg.php
@@ -20,9 +20,18 @@ function hook_archiveorg_render_linklist($data)
20 if($value['private'] && preg_match('/^\?[a-zA-Z0-9-_@]{6}($|&|#)/', $value['real_url'])) { 20 if($value['private'] && preg_match('/^\?[a-zA-Z0-9-_@]{6}($|&|#)/', $value['real_url'])) {
21 continue; 21 continue;
22 } 22 }
23 $archive = sprintf($archive_html, $value['url']); 23 $archive = sprintf($archive_html, $value['url'], t('View on archive.org'));
24 $value['link_plugin'][] = $archive; 24 $value['link_plugin'][] = $archive;
25 } 25 }
26 26
27 return $data; 27 return $data;
28} 28}
29
30/**
31 * This function is never called, but contains translation calls for GNU gettext extraction.
32 */
33function archiveorg_dummy_translation()
34{
35 // meta
36 t('For each link, add an Archive.org icon.');
37}
diff --git a/plugins/demo_plugin/demo_plugin.php b/plugins/demo_plugin/demo_plugin.php
index 8fdbf663..b80a2b6d 100644
--- a/plugins/demo_plugin/demo_plugin.php
+++ b/plugins/demo_plugin/demo_plugin.php
@@ -14,6 +14,26 @@
14 * and check user status with _LOGGEDIN_. 14 * and check user status with _LOGGEDIN_.
15 */ 15 */
16 16
17use Shaarli\Config\ConfigManager;
18
19/**
20 * In the footer hook, there is a working example of a translation extension for Shaarli.
21 *
22 * The extension must be attached to a new translation domain (i.e. NOT 'shaarli').
23 * Use case: any custom theme or non official plugin can use the translation system.
24 *
25 * See the documentation for more information.
26 */
27const EXT_TRANSLATION_DOMAIN = 'demo';
28
29/*
30 * This is not necessary, but it's easier if you don't want Poedit to mix up your translations.
31 */
32function demo_plugin_t($text, $nText = '', $nb = 1)
33{
34 return t($text, $nText, $nb, EXT_TRANSLATION_DOMAIN);
35}
36
17/** 37/**
18 * Initialization function. 38 * Initialization function.
19 * It will be called when the plugin is loaded. 39 * It will be called when the plugin is loaded.
@@ -27,6 +47,12 @@ function demo_plugin_init($conf)
27{ 47{
28 $conf->get('toto', 'nope'); 48 $conf->get('toto', 'nope');
29 49
50 if (! $conf->exists('translation.extensions.demo')) {
51 // Custom translation with the domain 'demo'
52 $conf->set('translation.extensions.demo', 'plugins/demo_plugin/languages/');
53 $conf->write(true);
54 }
55
30 $errors[] = 'This a demo init error.'; 56 $errors[] = 'This a demo init error.';
31 return $errors; 57 return $errors;
32} 58}
@@ -160,7 +186,7 @@ function hook_demo_plugin_render_includes($data)
160function hook_demo_plugin_render_footer($data) 186function hook_demo_plugin_render_footer($data)
161{ 187{
162 // footer text 188 // footer text
163 $data['text'][] = 'Shaarli is now enhanced by the awesome demo_plugin.'; 189 $data['text'][] = '<br>'. demo_plugin_t('Shaarli is now enhanced by the awesome demo_plugin.');
164 190
165 // Free elements at the end of the page. 191 // Free elements at the end of the page.
166 $data['endofpage'][] = '<marquee id="demo_marquee">' . 192 $data['endofpage'][] = '<marquee id="demo_marquee">' .
@@ -433,3 +459,12 @@ function hook_demo_plugin_render_feed($data)
433 } 459 }
434 return $data; 460 return $data;
435} 461}
462
463/**
464 * This function is never called, but contains translation calls for GNU gettext extraction.
465 */
466function demo_dummy_translation()
467{
468 // meta
469 t('A demo plugin covering all use cases for template designers and plugin developers.');
470}
diff --git a/plugins/demo_plugin/languages/fr/LC_MESSAGES/demo.mo b/plugins/demo_plugin/languages/fr/LC_MESSAGES/demo.mo
new file mode 100644
index 00000000..0f80f6ed
--- /dev/null
+++ b/plugins/demo_plugin/languages/fr/LC_MESSAGES/demo.mo
Binary files differ
diff --git a/plugins/demo_plugin/languages/fr/LC_MESSAGES/demo.po b/plugins/demo_plugin/languages/fr/LC_MESSAGES/demo.po
new file mode 100644
index 00000000..921379c0
--- /dev/null
+++ b/plugins/demo_plugin/languages/fr/LC_MESSAGES/demo.po
@@ -0,0 +1,21 @@
1msgid ""
2msgstr ""
3"Project-Id-Version: Demo plugin\n"
4"POT-Creation-Date: 2017-08-19 10:45+0200\n"
5"PO-Revision-Date: 2017-08-19 11:28+0200\n"
6"Last-Translator: \n"
7"Language-Team: demo\n"
8"Language: fr\n"
9"MIME-Version: 1.0\n"
10"Content-Type: text/plain; charset=UTF-8\n"
11"Content-Transfer-Encoding: 8bit\n"
12"X-Generator: Poedit 2.0.2\n"
13"X-Poedit-Basepath: ../../..\n"
14"Plural-Forms: nplurals=2; plural=(n > 1);\n"
15"X-Poedit-KeywordsList: ;demo_plugin_t:1,2;demo_plugin_t\n"
16"X-Poedit-SourceCharset: UTF-8\n"
17"X-Poedit-SearchPath-0: .\n"
18
19#: demo_plugin.php:173
20msgid "Shaarli is now enhanced by the awesome demo_plugin."
21msgstr "Shaarli est maintenant amélioré avec le fantastique demo_plugin."
diff --git a/plugins/isso/isso.php b/plugins/isso/isso.php
index ce16645f..5bc1cce2 100644
--- a/plugins/isso/isso.php
+++ b/plugins/isso/isso.php
@@ -4,10 +4,11 @@
4 * Plugin Isso. 4 * Plugin Isso.
5 */ 5 */
6 6
7use Shaarli\Config\ConfigManager;
8
7/** 9/**
8 * Display an error everywhere if the plugin is enabled without configuration. 10 * Display an error everywhere if the plugin is enabled without configuration.
9 * 11 *
10 * @param $data array List of links
11 * @param $conf ConfigManager instance 12 * @param $conf ConfigManager instance
12 * 13 *
13 * @return mixed - linklist data with Isso plugin. 14 * @return mixed - linklist data with Isso plugin.
@@ -16,8 +17,8 @@ function isso_init($conf)
16{ 17{
17 $issoUrl = $conf->get('plugins.ISSO_SERVER'); 18 $issoUrl = $conf->get('plugins.ISSO_SERVER');
18 if (empty($issoUrl)) { 19 if (empty($issoUrl)) {
19 $error = 'Isso plugin error: '. 20 $error = t('Isso plugin error: '.
20 'Please define the "ISSO_SERVER" setting in the plugin administration page.'; 21 'Please define the "ISSO_SERVER" setting in the plugin administration page.');
21 return array($error); 22 return array($error);
22 } 23 }
23} 24}
@@ -52,3 +53,13 @@ function hook_isso_render_linklist($data, $conf)
52 53
53 return $data; 54 return $data;
54} 55}
56
57/**
58 * This function is never called, but contains translation calls for GNU gettext extraction.
59 */
60function isso_dummy_translation()
61{
62 // meta
63 t('Let visitor comment your shaares on permalinks with Isso.');
64 t('Isso server URL (without \'http://\')');
65}
diff --git a/plugins/markdown/help.html b/plugins/markdown/help.html
index 9c4e5ae0..ded3d347 100644
--- a/plugins/markdown/help.html
+++ b/plugins/markdown/help.html
@@ -1,5 +1,5 @@
1<div class="md_help"> 1<div class="md_help">
2 Description will be rendered with 2 %s
3 <a href="http://daringfireball.net/projects/markdown/syntax" title="Markdown syntax documentation"> 3 <a href="http://daringfireball.net/projects/markdown/syntax" title="%s">
4 Markdown syntax</a>. 4 %s</a>.
5</div> 5</div>
diff --git a/plugins/markdown/markdown.css b/plugins/markdown/markdown.css
index 6789ce84..ce19cd2a 100644
--- a/plugins/markdown/markdown.css
+++ b/plugins/markdown/markdown.css
@@ -150,7 +150,7 @@
150 box-shadow: 0 -1px 0 #e5e5e5,0 0 1px rgba(0,0,0,0.12),0 1px 1px rgba(0,0,0,0.24); 150 box-shadow: 0 -1px 0 #e5e5e5,0 0 1px rgba(0,0,0,0.12),0 1px 1px rgba(0,0,0,0.24);
151} 151}
152 152
153.md_help { 153#pageheader .md_help {
154 color: white; 154 color: white;
155} 155}
156 156
diff --git a/plugins/markdown/markdown.meta b/plugins/markdown/markdown.meta
index 8df2ed0b..322856ea 100644
--- a/plugins/markdown/markdown.meta
+++ b/plugins/markdown/markdown.meta
@@ -1,4 +1,4 @@
1description="Render shaare description with Markdown syntax.<br><strong>Warning</strong>: 1description="Render shaare description with Markdown syntax.<br><strong>Warning</strong>:
2If your shaared descriptions containing HTML tags before enabling the markdown plugin, 2If your shaared descriptions contained HTML tags before enabling the markdown plugin,
3enabling it might break your page. 3enabling it might break your page.
4See the <a href=\"https://github.com/shaarli/Shaarli/tree/master/plugins/markdown#html-rendering\">README</a>." 4See the <a href=\"https://github.com/shaarli/Shaarli/tree/master/plugins/markdown#html-rendering\">README</a>."
diff --git a/plugins/markdown/markdown.php b/plugins/markdown/markdown.php
index de7c823d..1531549d 100644
--- a/plugins/markdown/markdown.php
+++ b/plugins/markdown/markdown.php
@@ -26,7 +26,11 @@ function hook_markdown_render_linklist($data, $conf)
26 $value = stripNoMarkdownTag($value); 26 $value = stripNoMarkdownTag($value);
27 continue; 27 continue;
28 } 28 }
29 $value['description'] = process_markdown($value['description'], $conf->get('security.markdown_escape', true)); 29 $value['description'] = process_markdown(
30 $value['description'],
31 $conf->get('security.markdown_escape', true),
32 $conf->get('security.allowed_protocols')
33 );
30 } 34 }
31 return $data; 35 return $data;
32} 36}
@@ -46,7 +50,11 @@ function hook_markdown_render_feed($data, $conf)
46 $value = stripNoMarkdownTag($value); 50 $value = stripNoMarkdownTag($value);
47 continue; 51 continue;
48 } 52 }
49 $value['description'] = process_markdown($value['description'], $conf->get('security.markdown_escape', true)); 53 $value['description'] = process_markdown(
54 $value['description'],
55 $conf->get('security.markdown_escape', true),
56 $conf->get('security.allowed_protocols')
57 );
50 } 58 }
51 59
52 return $data; 60 return $data;
@@ -71,7 +79,8 @@ function hook_markdown_render_daily($data, $conf)
71 } 79 }
72 $value2['formatedDescription'] = process_markdown( 80 $value2['formatedDescription'] = process_markdown(
73 $value2['formatedDescription'], 81 $value2['formatedDescription'],
74 $conf->get('security.markdown_escape', true) 82 $conf->get('security.markdown_escape', true),
83 $conf->get('security.allowed_protocols')
75 ); 84 );
76 } 85 }
77 } 86 }
@@ -145,8 +154,13 @@ function hook_markdown_render_includes($data)
145function hook_markdown_render_editlink($data) 154function hook_markdown_render_editlink($data)
146{ 155{
147 // Load help HTML into a string 156 // Load help HTML into a string
148 $data['edit_link_plugin'][] = file_get_contents(PluginManager::$PLUGINS_PATH .'/markdown/help.html'); 157 $txt = file_get_contents(PluginManager::$PLUGINS_PATH .'/markdown/help.html');
149 158 $translations = [
159 t('Description will be rendered with'),
160 t('Markdown syntax documentation'),
161 t('Markdown syntax'),
162 ];
163 $data['edit_link_plugin'][] = vsprintf($txt, $translations);
150 // Add no markdown 'meta-tag' in tag list if it was never used, for autocompletion. 164 // Add no markdown 'meta-tag' in tag list if it was never used, for autocompletion.
151 if (! in_array(NO_MD_TAG, $data['tags'])) { 165 if (! in_array(NO_MD_TAG, $data['tags'])) {
152 $data['tags'][NO_MD_TAG] = 0; 166 $data['tags'][NO_MD_TAG] = 0;
@@ -232,6 +246,25 @@ function reverse_space2nbsp($description)
232} 246}
233 247
234/** 248/**
249 * Replace not whitelisted protocols with http:// in given description.
250 *
251 * @param string $description input description text.
252 * @param array $allowedProtocols list of allowed protocols.
253 *
254 * @return string $description without malicious link.
255 */
256function filter_protocols($description, $allowedProtocols)
257{
258 return preg_replace_callback(
259 '#]\((.*?)\)#is',
260 function ($match) use ($allowedProtocols) {
261 return ']('. whitelist_protocols($match[1], $allowedProtocols) .')';
262 },
263 $description
264 );
265}
266
267/**
235 * Remove dangerous HTML tags (tags, iframe, etc.). 268 * Remove dangerous HTML tags (tags, iframe, etc.).
236 * Doesn't affect <code> content (already escaped by Parsedown). 269 * Doesn't affect <code> content (already escaped by Parsedown).
237 * 270 *
@@ -275,7 +308,7 @@ function sanitize_html($description)
275 * 308 *
276 * @return string HTML processed $description. 309 * @return string HTML processed $description.
277 */ 310 */
278function process_markdown($description, $escape = true) 311function process_markdown($description, $escape = true, $allowedProtocols = [])
279{ 312{
280 $parsedown = new Parsedown(); 313 $parsedown = new Parsedown();
281 314
@@ -283,6 +316,7 @@ function process_markdown($description, $escape = true)
283 $processedDescription = reverse_nl2br($processedDescription); 316 $processedDescription = reverse_nl2br($processedDescription);
284 $processedDescription = reverse_space2nbsp($processedDescription); 317 $processedDescription = reverse_space2nbsp($processedDescription);
285 $processedDescription = reverse_text2clickable($processedDescription); 318 $processedDescription = reverse_text2clickable($processedDescription);
319 $processedDescription = filter_protocols($processedDescription, $allowedProtocols);
286 $processedDescription = unescape($processedDescription); 320 $processedDescription = unescape($processedDescription);
287 $processedDescription = $parsedown 321 $processedDescription = $parsedown
288 ->setMarkupEscaped($escape) 322 ->setMarkupEscaped($escape)
@@ -296,3 +330,15 @@ function process_markdown($description, $escape = true)
296 330
297 return $processedDescription; 331 return $processedDescription;
298} 332}
333
334/**
335 * This function is never called, but contains translation calls for GNU gettext extraction.
336 */
337function markdown_dummy_translation()
338{
339 // meta
340 t('Render shaare description with Markdown syntax.<br><strong>Warning</strong>:
341If your shaared descriptions contained HTML tags before enabling the markdown plugin,
342enabling it might break your page.
343See the <a href="https://github.com/shaarli/Shaarli/tree/master/plugins/markdown#html-rendering">README</a>.');
344}
diff --git a/plugins/piwik/piwik.html b/plugins/piwik/piwik.html
new file mode 100644
index 00000000..f4bc358a
--- /dev/null
+++ b/plugins/piwik/piwik.html
@@ -0,0 +1,43 @@
1<!-- Piwik -->
2<script type="text/javascript">
3 /** @licstart The following is the entire license notice for the
4 * JavaScript code in this page.
5 *
6 * Copyright: (c) 2011-2015 Sébastien SAUVAGE <sebsauvage@sebsauvage.net>
7 * (c) 2011-2017 The Shaarli Community, see AUTHORS
8 *
9 * This software is provided 'as-is', without any express or implied warranty.
10 * In no event will the authors be held liable for any damages arising from
11 * the use of this software.
12 *
13 * Permission is granted to anyone to use this software for any purpose,
14 * including commercial applications, and to alter it and redistribute it
15 * freely, subject to the following restrictions:
16 *
17 * 1. The origin of this software must not be misrepresented; you must not
18 * claim that you wrote the original software. If you use this software
19 * in a product, an acknowledgment in the product documentation would
20 * be appreciated but is not required.
21 *
22 * 2. Altered source versions must be plainly marked as such, and must
23 * not be misrepresented as being the original software.
24 *
25 * 3. This notice may not be removed or altered from any source distribution.
26 *
27 * @licend The above is the entire license notice
28 * for the JavaScript code in this page.
29 */
30
31 var _paq = _paq || [];
32 _paq.push(['trackPageView']);
33 _paq.push(['enableLinkTracking']);
34 (function() {
35 var u="%s/";
36 _paq.push(['setTrackerUrl', u+'piwik.php']);
37 _paq.push(['setSiteId', '%s']);
38 var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
39 g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
40 })();
41</script>
42<noscript><p><img src="%s/piwik.php?idsite=%s" style="border:0;" alt="" /></p></noscript>
43<!-- End Piwik Code --> \ No newline at end of file
diff --git a/plugins/piwik/piwik.php b/plugins/piwik/piwik.php
index 7c44909c..ca00c2be 100644
--- a/plugins/piwik/piwik.php
+++ b/plugins/piwik/piwik.php
@@ -18,8 +18,8 @@ function piwik_init($conf)
18 $piwikUrl = $conf->get('plugins.PIWIK_URL'); 18 $piwikUrl = $conf->get('plugins.PIWIK_URL');
19 $piwikSiteid = $conf->get('plugins.PIWIK_SITEID'); 19 $piwikSiteid = $conf->get('plugins.PIWIK_SITEID');
20 if (empty($piwikUrl) || empty($piwikSiteid)) { 20 if (empty($piwikUrl) || empty($piwikSiteid)) {
21 $error = 'Piwik plugin error: ' . 21 $error = t('Piwik plugin error: ' .
22 'Please define PIWIK_URL and PIWIK_SITEID in the plugin administration page.'; 22 'Please define PIWIK_URL and PIWIK_SITEID in the plugin administration page.');
23 return array($error); 23 return array($error);
24 } 24 }
25} 25}
@@ -50,22 +50,24 @@ function hook_piwik_render_footer($data, $conf)
50 } 50 }
51 51
52 // Free elements at the end of the page. 52 // Free elements at the end of the page.
53 $data['endofpage'][] = '<!-- Piwik -->' . 53 $data['endofpage'][] = sprintf(
54'<script type="text/javascript">' . 54 file_get_contents(PluginManager::$PLUGINS_PATH . '/piwik/piwik.html'),
55' var _paq = _paq || [];' . 55 $piwikUrl,
56' _paq.push([\'trackPageView\']);' . 56 $piwikSiteid,
57' _paq.push([\'enableLinkTracking\']);' . 57 $piwikUrl,
58' (function() {' . 58 $piwikSiteid
59' var u="//' . $piwikUrl . '/";' . 59 );
60' _paq.push([\'setTrackerUrl\', u+\'piwik.php\']);' .
61' _paq.push([\'setSiteId\', \'' . $piwikSiteid . '\']);' .
62' var d=document, g=d.createElement(\'script\'), s=d.getElementsByTagName(\'script\')[0];' .
63' g.type=\'text/javascript\'; g.async=true; g.defer=true; g.src=u+\'piwik.js\'; s.parentNode.insertBefore(g,s);' .
64' })();' .
65'</script>' .
66'<noscript><p><img src="//' . $piwikUrl . '/piwik.php?idsite=' . $piwikSiteid . '" style="border:0;" alt="" /></p></noscript>' .
67'<!-- End Piwik Code -->';
68 60
69 return $data; 61 return $data;
70} 62}
71 63
64/**
65 * This function is never called, but contains translation calls for GNU gettext extraction.
66 */
67function piwik_dummy_translation()
68{
69 // meta
70 t('A plugin that adds Piwik tracking code to Shaarli pages.');
71 t('Piwik URL');
72 t('Piwik site ID');
73}
diff --git a/plugins/playvideos/README.md b/plugins/playvideos/README.md
index b1698470..ab4be22a 100644
--- a/plugins/playvideos/README.md
+++ b/plugins/playvideos/README.md
@@ -8,7 +8,7 @@ This uses code from https://zaius.github.io/youtube_playlist/ and is currently o
8 8
9#### Installation and setup 9#### Installation and setup
10 10
11This is a default Shaarli plugin, you just have to enable it. See https://github.com/shaarli/Shaarli/wiki/Shaarli-configuration/ 11This is a default Shaarli plugin, you just have to enable it. See https://shaarli.readthedocs.io/en/master/Shaarli-configuration/
12 12
13 13
14#### Troubleshooting 14#### Troubleshooting
diff --git a/plugins/playvideos/playvideos.php b/plugins/playvideos/playvideos.php
index 64484504..c6d6b0cc 100644
--- a/plugins/playvideos/playvideos.php
+++ b/plugins/playvideos/playvideos.php
@@ -19,10 +19,10 @@ function hook_playvideos_render_header($data)
19 $playvideo = array( 19 $playvideo = array(
20 'attr' => array( 20 'attr' => array(
21 'href' => '#', 21 'href' => '#',
22 'title' => 'Video player', 22 'title' => t('Video player'),
23 'id' => 'playvideos', 23 'id' => 'playvideos',
24 ), 24 ),
25 'html' => '► Play Videos' 25 'html' => '► '. t('Play Videos')
26 ); 26 );
27 $data['buttons_toolbar'][] = $playvideo; 27 $data['buttons_toolbar'][] = $playvideo;
28 } 28 }
@@ -46,3 +46,12 @@ function hook_playvideos_render_footer($data)
46 46
47 return $data; 47 return $data;
48} 48}
49
50/**
51 * This function is never called, but contains translation calls for GNU gettext extraction.
52 */
53function playvideos_dummy_translation()
54{
55 // meta
56 t('Add a button in the toolbar allowing to watch all videos.');
57}
diff --git a/plugins/playvideos/youtube_playlist.js b/plugins/playvideos/youtube_playlist.js
index be8d63af..3b608a5d 100644
--- a/plugins/playvideos/youtube_playlist.js
+++ b/plugins/playvideos/youtube_playlist.js
@@ -1,3 +1,31 @@
1/** @licstart The following is the entire license notice for the
2 * JavaScript code in this page.
3 *
4 * Copyright: (c) 2011-2015 Sébastien SAUVAGE <sebsauvage@sebsauvage.net>
5 * (c) 2011-2017 The Shaarli Community, see AUTHORS
6 *
7 * This software is provided 'as-is', without any express or implied warranty.
8 * In no event will the authors be held liable for any damages arising from
9 * the use of this software.
10 *
11 * Permission is granted to anyone to use this software for any purpose,
12 * including commercial applications, and to alter it and redistribute it
13 * freely, subject to the following restrictions:
14 *
15 * 1. The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software. If you use this software
17 * in a product, an acknowledgment in the product documentation would
18 * be appreciated but is not required.
19 *
20 * 2. Altered source versions must be plainly marked as such, and must
21 * not be misrepresented as being the original software.
22 *
23 * 3. This notice may not be removed or altered from any source distribution.
24 *
25 * @licend The above is the entire license notice
26 * for the JavaScript code in this page.
27 */
28
1var run_playideos = (function () { 29var run_playideos = (function () {
2 var e, n, t, o, r, i = [].indexOf || function (e) { 30 var e, n, t, o, r, i = [].indexOf || function (e) {
3 for (var n = 0, t = this.length; n < t; n++) { 31 for (var n = 0, t = this.length; n < t; n++) {
diff --git a/plugins/pubsubhubbub/README.md b/plugins/pubsubhubbub/README.md
new file mode 100644
index 00000000..3a65492a
--- /dev/null
+++ b/plugins/pubsubhubbub/README.md
@@ -0,0 +1,20 @@
1# PubSubHubbub plugin
2
3Enable this plugin to notify a Hub everytime you add or edit a link.
4
5This allow hub subcribers to receive update notifications in real time,
6which is useful for feed syndication service which supports PubSubHubbub.
7
8## Public Hub
9
10By default, Shaarli will use [Google's public hub](http://pubsubhubbub.appspot.com/).
11
12[Here](https://github.com/pubsubhubbub/PubSubHubbub/wiki/Hubs) is a list of public hubs.
13
14You can also host your own PubSubHubbub server implementation, such as [phubb](https://github.com/cweiske/phubb).
15
16## cURL
17
18While there is a fallback function to notify the hub, it's recommended that
19you have PHP cURL extension enabled to use this plugin.
20
diff --git a/plugins/pubsubhubbub/hub.atom.xml b/plugins/pubsubhubbub/hub.atom.xml
new file mode 100644
index 00000000..24d93d3e
--- /dev/null
+++ b/plugins/pubsubhubbub/hub.atom.xml
@@ -0,0 +1 @@
<link rel="hub" href="%s" /> \ No newline at end of file
diff --git a/plugins/pubsubhubbub/hub.rss.xml b/plugins/pubsubhubbub/hub.rss.xml
new file mode 100644
index 00000000..27bf67a6
--- /dev/null
+++ b/plugins/pubsubhubbub/hub.rss.xml
@@ -0,0 +1 @@
<atom:link rel="hub" href="%s" /> \ No newline at end of file
diff --git a/plugins/pubsubhubbub/pubsubhubbub.meta b/plugins/pubsubhubbub/pubsubhubbub.meta
new file mode 100644
index 00000000..289f5cdb
--- /dev/null
+++ b/plugins/pubsubhubbub/pubsubhubbub.meta
@@ -0,0 +1,2 @@
1description="Enable PubSubHubbub feed publishing."
2parameters="PUBSUBHUB_URL"
diff --git a/plugins/pubsubhubbub/pubsubhubbub.php b/plugins/pubsubhubbub/pubsubhubbub.php
new file mode 100644
index 00000000..184b588b
--- /dev/null
+++ b/plugins/pubsubhubbub/pubsubhubbub.php
@@ -0,0 +1,111 @@
1<?php
2
3/**
4 * PubSubHubbub plugin.
5 *
6 * PubSub is a protocol which fasten up RSS fetching:
7 * - Every time a new link is posted, Shaarli notify the hub.
8 * - The hub notify all feed subscribers that a new link has been posted.
9 * - Subscribers retrieve the new link.
10 */
11
12use pubsubhubbub\publisher\Publisher;
13use Shaarli\Config\ConfigManager;
14
15/**
16 * Plugin init function - set the hub to the default appspot one.
17 *
18 * @param ConfigManager $conf instance.
19 */
20function pubsubhubbub_init($conf)
21{
22 $hub = $conf->get('plugins.PUBSUBHUB_URL');
23 if (empty($hub)) {
24 // Default hub.
25 $conf->set('plugins.PUBSUBHUB_URL', 'https://pubsubhubbub.appspot.com/');
26 }
27}
28
29
30/**
31 * Render feed hook.
32 * Adds the hub URL in ATOM and RSS feed.
33 *
34 * @param array $data Template data.
35 * @param ConfigManager $conf instance.
36 *
37 * @return array updated template data.
38 */
39function hook_pubsubhubbub_render_feed($data, $conf)
40{
41 $feedType = $data['_PAGE_'] == Router::$PAGE_FEED_RSS ? FeedBuilder::$FEED_RSS : FeedBuilder::$FEED_ATOM;
42 $template = file_get_contents(PluginManager::$PLUGINS_PATH . '/pubsubhubbub/hub.'. $feedType .'.xml');
43 $data['feed_plugins_header'][] = sprintf($template, $conf->get('plugins.PUBSUBHUB_URL'));
44
45 return $data;
46}
47
48/**
49 * Save link hook.
50 * Publish to the hub when a link is saved.
51 *
52 * @param array $data Template data.
53 * @param ConfigManager $conf instance.
54 *
55 * @return array unaltered data.
56 */
57function hook_pubsubhubbub_save_link($data, $conf)
58{
59 $feeds = array(
60 index_url($_SERVER) .'?do=atom',
61 index_url($_SERVER) .'?do=rss',
62 );
63
64 $httpPost = function_exists('curl_version') ? false : 'nocurl_http_post';
65 try {
66 $p = new Publisher($conf->get('plugins.PUBSUBHUB_URL'));
67 $p->publish_update($feeds, $httpPost);
68 } catch (Exception $e) {
69 error_log(sprintf(t('Could not publish to PubSubHubbub: %s'), $e->getMessage()));
70 }
71
72 return $data;
73}
74
75/**
76 * Http function used to post to the hub endpoint without cURL extension.
77 *
78 * @param string $url Hub endpoint.
79 * @param string $postString String to POST.
80 *
81 * @return bool
82 *
83 * @throws Exception An error occurred.
84 */
85function nocurl_http_post($url, $postString) {
86 $params = array('http' => array(
87 'method' => 'POST',
88 'content' => $postString,
89 'user_agent' => 'PubSubHubbub-Publisher-PHP/1.0',
90 ));
91
92 $context = stream_context_create($params);
93 $fp = @fopen($url, 'rb', false, $context);
94 if (!$fp) {
95 throw new Exception(sprintf(t('Could not post to %s'), $url));
96 }
97 $response = @stream_get_contents($fp);
98 if ($response === false) {
99 throw new Exception(sprintf(t('Bad response from the hub %s'), $url));
100 }
101 return $response;
102}
103
104/**
105 * This function is never called, but contains translation calls for GNU gettext extraction.
106 */
107function pubsubhubbub_dummy_translation()
108{
109 // meta
110 t('Enable PubSubHubbub feed publishing.');
111}
diff --git a/plugins/qrcode/qrcode.meta b/plugins/qrcode/qrcode.meta
index cbf371ea..1812cd21 100644
--- a/plugins/qrcode/qrcode.meta
+++ b/plugins/qrcode/qrcode.meta
@@ -1 +1 @@
description="For each link, add a QRCode icon ." description="For each link, add a QRCode icon."
diff --git a/plugins/qrcode/qrcode.php b/plugins/qrcode/qrcode.php
index 8bc610d1..0f96a106 100644
--- a/plugins/qrcode/qrcode.php
+++ b/plugins/qrcode/qrcode.php
@@ -59,3 +59,12 @@ function hook_qrcode_render_includes($data)
59 59
60 return $data; 60 return $data;
61} 61}
62
63/**
64 * This function is never called, but contains translation calls for GNU gettext extraction.
65 */
66function qrcode_dummy_translation()
67{
68 // meta
69 t('For each link, add a QRCode icon.');
70}
diff --git a/plugins/qrcode/shaarli-qrcode.js b/plugins/qrcode/shaarli-qrcode.js
index 615f54c7..fe77c4cd 100644
--- a/plugins/qrcode/shaarli-qrcode.js
+++ b/plugins/qrcode/shaarli-qrcode.js
@@ -1,3 +1,31 @@
1/** @licstart The following is the entire license notice for the
2 * JavaScript code in this page.
3 *
4 * Copyright: (c) 2011-2015 Sébastien SAUVAGE <sebsauvage@sebsauvage.net>
5 * (c) 2011-2017 The Shaarli Community, see AUTHORS
6 *
7 * This software is provided 'as-is', without any express or implied warranty.
8 * In no event will the authors be held liable for any damages arising from
9 * the use of this software.
10 *
11 * Permission is granted to anyone to use this software for any purpose,
12 * including commercial applications, and to alter it and redistribute it
13 * freely, subject to the following restrictions:
14 *
15 * 1. The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software. If you use this software
17 * in a product, an acknowledgment in the product documentation would
18 * be appreciated but is not required.
19 *
20 * 2. Altered source versions must be plainly marked as such, and must
21 * not be misrepresented as being the original software.
22 *
23 * 3. This notice may not be removed or altered from any source distribution.
24 *
25 * @licend The above is the entire license notice
26 * for the JavaScript code in this page.
27 */
28
1// Show the QR-Code of a permalink (when the QR-Code icon is clicked). 29// Show the QR-Code of a permalink (when the QR-Code icon is clicked).
2function showQrCode(caller,loading) 30function showQrCode(caller,loading)
3{ 31{
diff --git a/plugins/readityourself/book-open.png b/plugins/readityourself/book-open.png
deleted file mode 100644
index 36513d7b..00000000
--- a/plugins/readityourself/book-open.png
+++ /dev/null
Binary files differ
diff --git a/plugins/readityourself/readityourself.html b/plugins/readityourself/readityourself.html
deleted file mode 100644
index 5e200715..00000000
--- a/plugins/readityourself/readityourself.html
+++ /dev/null
@@ -1 +0,0 @@
1<span><a href="%s?url=%s"><img class="linklist-plugin-icon" src="%s/readityourself/book-open.png" title="Read with Readityourself" alt="readityourself" /></a></span>
diff --git a/plugins/readityourself/readityourself.meta b/plugins/readityourself/readityourself.meta
deleted file mode 100644
index bd611dd0..00000000
--- a/plugins/readityourself/readityourself.meta
+++ /dev/null
@@ -1,2 +0,0 @@
1description="For each link, add a ReadItYourself icon to save the shaared URL."
2parameters=READITYOUSELF_URL; \ No newline at end of file
diff --git a/plugins/readityourself/readityourself.php b/plugins/readityourself/readityourself.php
deleted file mode 100644
index 961c5bda..00000000
--- a/plugins/readityourself/readityourself.php
+++ /dev/null
@@ -1,51 +0,0 @@
1<?php
2
3/**
4 * Plugin readityourself
5 */
6
7// If we're talking about https://github.com/memiks/readityourself
8// it seems kinda dead.
9// Not tested.
10
11/**
12 * Init function, return an error if the server is not set.
13 *
14 * @param $conf ConfigManager instance.
15 *
16 * @return array Eventual error.
17 */
18function readityourself_init($conf)
19{
20 $riyUrl = $conf->get('plugins.READITYOUSELF_URL');
21 if (empty($riyUrl)) {
22 $error = 'Readityourself plugin error: '.
23 'Please define the "READITYOUSELF_URL" setting in the plugin administration page.';
24 return array($error);
25 }
26}
27
28/**
29 * Add readityourself icon to link_plugin when rendering linklist.
30 *
31 * @param mixed $data Linklist data.
32 * @param ConfigManager $conf Configuration Manager instance.
33 *
34 * @return mixed - linklist data with readityourself plugin.
35 */
36function hook_readityourself_render_linklist($data, $conf)
37{
38 $riyUrl = $conf->get('plugins.READITYOUSELF_URL');
39 if (empty($riyUrl)) {
40 return $data;
41 }
42
43 $readityourself_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/readityourself/readityourself.html');
44
45 foreach ($data['links'] as &$value) {
46 $readityourself = sprintf($readityourself_html, $riyUrl, $value['url'], PluginManager::$PLUGINS_PATH);
47 $value['link_plugin'][] = $readityourself;
48 }
49
50 return $data;
51}
diff --git a/plugins/wallabag/WallabagInstance.php b/plugins/wallabag/WallabagInstance.php
index 72cc2e5e..eb8ab618 100644
--- a/plugins/wallabag/WallabagInstance.php
+++ b/plugins/wallabag/WallabagInstance.php
@@ -35,7 +35,7 @@ class WallabagInstance
35 */ 35 */
36 private $apiVersion; 36 private $apiVersion;
37 37
38 function __construct($instance, $version) 38 public function __construct($instance, $version)
39 { 39 {
40 if ($this->isVersionAllowed($version)) { 40 if ($this->isVersionAllowed($version)) {
41 $this->apiVersion = self::$wallabagVersions[$version]; 41 $this->apiVersion = self::$wallabagVersions[$version];
diff --git a/plugins/wallabag/wallabag.html b/plugins/wallabag/wallabag.html
index e861536d..4c57691d 100644
--- a/plugins/wallabag/wallabag.html
+++ b/plugins/wallabag/wallabag.html
@@ -1 +1,5 @@
1<span><a href="%s%s" target="_blank"><img class="linklist-plugin-icon" src="%s/wallabag/wallabag.png" title="Save to wallabag" alt="wallabag" /></a></span> 1<span>
2 <a href="%s%s" target="_blank">
3 <img class="linklist-plugin-icon" src="%s/wallabag/wallabag.png" title="%s" alt="wallabag" />
4 </a>
5</span>
diff --git a/plugins/wallabag/wallabag.php b/plugins/wallabag/wallabag.php
index 641e4cc2..9dfd079e 100644
--- a/plugins/wallabag/wallabag.php
+++ b/plugins/wallabag/wallabag.php
@@ -5,6 +5,7 @@
5 */ 5 */
6 6
7require_once 'WallabagInstance.php'; 7require_once 'WallabagInstance.php';
8use Shaarli\Config\ConfigManager;
8 9
9/** 10/**
10 * Init function, return an error if the server is not set. 11 * Init function, return an error if the server is not set.
@@ -17,8 +18,8 @@ function wallabag_init($conf)
17{ 18{
18 $wallabagUrl = $conf->get('plugins.WALLABAG_URL'); 19 $wallabagUrl = $conf->get('plugins.WALLABAG_URL');
19 if (empty($wallabagUrl)) { 20 if (empty($wallabagUrl)) {
20 $error = 'Wallabag plugin error: '. 21 $error = t('Wallabag plugin error: '.
21 'Please define the "WALLABAG_URL" setting in the plugin administration page.'; 22 'Please define the "WALLABAG_URL" setting in the plugin administration page.');
22 return array($error); 23 return array($error);
23 } 24 }
24} 25}
@@ -43,12 +44,14 @@ function hook_wallabag_render_linklist($data, $conf)
43 44
44 $wallabagHtml = file_get_contents(PluginManager::$PLUGINS_PATH . '/wallabag/wallabag.html'); 45 $wallabagHtml = file_get_contents(PluginManager::$PLUGINS_PATH . '/wallabag/wallabag.html');
45 46
47 $linkTitle = t('Save to wallabag');
46 foreach ($data['links'] as &$value) { 48 foreach ($data['links'] as &$value) {
47 $wallabag = sprintf( 49 $wallabag = sprintf(
48 $wallabagHtml, 50 $wallabagHtml,
49 $wallabagInstance->getWallabagUrl(), 51 $wallabagInstance->getWallabagUrl(),
50 urlencode($value['url']), 52 urlencode($value['url']),
51 PluginManager::$PLUGINS_PATH 53 PluginManager::$PLUGINS_PATH,
54 $linkTitle
52 ); 55 );
53 $value['link_plugin'][] = $wallabag; 56 $value['link_plugin'][] = $wallabag;
54 } 57 }
@@ -56,3 +59,14 @@ function hook_wallabag_render_linklist($data, $conf)
56 return $data; 59 return $data;
57} 60}
58 61
62/**
63 * This function is never called, but contains translation calls for GNU gettext extraction.
64 */
65function wallabag_dummy_translation()
66{
67 // meta
68 t('For each link, add a QRCode icon.');
69 t('Wallabag API URL');
70 t('Wallabag API version (1 or 2)');
71}
72
diff --git a/shaarli_version.php b/shaarli_version.php
index c02e55fa..a56e8619 100644
--- a/shaarli_version.php
+++ b/shaarli_version.php
@@ -1 +1 @@
<?php /* 0.8.7 */ ?> <?php /* 0.9.7 */ ?>
diff --git a/tests/ApplicationUtilsTest.php b/tests/ApplicationUtilsTest.php
index 4a0975bf..ff4c9e17 100644
--- a/tests/ApplicationUtilsTest.php
+++ b/tests/ApplicationUtilsTest.php
@@ -1,9 +1,10 @@
1<?php 1<?php
2use Shaarli\Config\ConfigManager;
3
2/** 4/**
3 * ApplicationUtils' tests 5 * ApplicationUtils' tests
4 */ 6 */
5 7
6require_once 'application/config/ConfigManager.php';
7require_once 'application/ApplicationUtils.php'; 8require_once 'application/ApplicationUtils.php';
8 9
9/** 10/**
@@ -16,7 +17,7 @@ class FakeApplicationUtils extends ApplicationUtils
16 /** 17 /**
17 * Toggle HTTP requests, allow overriding the version code 18 * Toggle HTTP requests, allow overriding the version code
18 */ 19 */
19 public static function getLatestGitVersionCode($url, $timeout=0) 20 public static function getVersion($url, $timeout=0)
20 { 21 {
21 return self::$VERSION_CODE; 22 return self::$VERSION_CODE;
22 } 23 }
@@ -44,17 +45,27 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
44 } 45 }
45 46
46 /** 47 /**
48 * Remove test version file if it exists
49 */
50 public function tearDown()
51 {
52 if (is_file('sandbox/version.php')) {
53 unlink('sandbox/version.php');
54 }
55 }
56
57 /**
47 * Retrieve the latest version code available on Git 58 * Retrieve the latest version code available on Git
48 * 59 *
49 * Expected format: Semantic Versioning - major.minor.patch 60 * Expected format: Semantic Versioning - major.minor.patch
50 */ 61 */
51 public function testGetLatestGitVersionCode() 62 public function testGetVersionCode()
52 { 63 {
53 $testTimeout = 10; 64 $testTimeout = 10;
54 65
55 $this->assertEquals( 66 $this->assertEquals(
56 '0.5.4', 67 '0.5.4',
57 ApplicationUtils::getLatestGitVersionCode( 68 ApplicationUtils::getVersion(
58 'https://raw.githubusercontent.com/shaarli/Shaarli/' 69 'https://raw.githubusercontent.com/shaarli/Shaarli/'
59 .'v0.5.4/shaarli_version.php', 70 .'v0.5.4/shaarli_version.php',
60 $testTimeout 71 $testTimeout
@@ -62,23 +73,35 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
62 ); 73 );
63 $this->assertRegExp( 74 $this->assertRegExp(
64 self::$versionPattern, 75 self::$versionPattern,
65 ApplicationUtils::getLatestGitVersionCode( 76 ApplicationUtils::getVersion(
66 'https://raw.githubusercontent.com/shaarli/Shaarli/' 77 'https://raw.githubusercontent.com/shaarli/Shaarli/'
67 .'stable/shaarli_version.php', 78 .'latest/shaarli_version.php',
68 $testTimeout 79 $testTimeout
69 ) 80 )
70 ); 81 );
71 } 82 }
72 83
73 /** 84 /**
74 * Attempt to retrieve the latest version from an invalid URL 85 * Attempt to retrieve the latest version from an invalid File
75 */ 86 */
76 public function testGetLatestGitVersionCodeInvalidUrl() 87 public function testGetVersionCodeFromFile()
88 {
89 file_put_contents('sandbox/version.php', '<?php /* 1.2.3 */ ?>'. PHP_EOL);
90 $this->assertEquals(
91 '1.2.3',
92 ApplicationUtils::getVersion('sandbox/version.php', 1)
93 );
94 }
95
96 /**
97 * Attempt to retrieve the latest version from an invalid File
98 */
99 public function testGetVersionCodeInvalidFile()
77 { 100 {
78 $oldlog = ini_get('error_log'); 101 $oldlog = ini_get('error_log');
79 ini_set('error_log', '/dev/null'); 102 ini_set('error_log', '/dev/null');
80 $this->assertFalse( 103 $this->assertFalse(
81 ApplicationUtils::getLatestGitVersionCode('htttp://null.io', 1) 104 ApplicationUtils::getVersion('idontexist', 1)
82 ); 105 );
83 ini_set('error_log', $oldlog); 106 ini_set('error_log', $oldlog);
84 } 107 }
@@ -289,6 +312,7 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
289 $conf->set('resource.page_cache', 'pagecache'); 312 $conf->set('resource.page_cache', 'pagecache');
290 $conf->set('resource.raintpl_tmp', 'tmp'); 313 $conf->set('resource.raintpl_tmp', 'tmp');
291 $conf->set('resource.raintpl_tpl', 'tpl'); 314 $conf->set('resource.raintpl_tpl', 'tpl');
315 $conf->set('resource.theme', 'default');
292 $conf->set('resource.update_check', 'data/lastupdatecheck.txt'); 316 $conf->set('resource.update_check', 'data/lastupdatecheck.txt');
293 317
294 $this->assertEquals( 318 $this->assertEquals(
@@ -312,10 +336,12 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
312 $conf->set('resource.page_cache', 'null/pagecache'); 336 $conf->set('resource.page_cache', 'null/pagecache');
313 $conf->set('resource.raintpl_tmp', 'null/tmp'); 337 $conf->set('resource.raintpl_tmp', 'null/tmp');
314 $conf->set('resource.raintpl_tpl', 'null/tpl'); 338 $conf->set('resource.raintpl_tpl', 'null/tpl');
339 $conf->set('resource.raintpl_theme', 'null/tpl/default');
315 $conf->set('resource.update_check', 'null/data/lastupdatecheck.txt'); 340 $conf->set('resource.update_check', 'null/data/lastupdatecheck.txt');
316 $this->assertEquals( 341 $this->assertEquals(
317 array( 342 array(
318 '"null/tpl" directory is not readable', 343 '"null/tpl" directory is not readable',
344 '"null/tpl/default" directory is not readable',
319 '"null/cache" directory is not readable', 345 '"null/cache" directory is not readable',
320 '"null/cache" directory is not writable', 346 '"null/cache" directory is not writable',
321 '"null/data" directory is not readable', 347 '"null/data" directory is not readable',
@@ -328,4 +354,15 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
328 ApplicationUtils::checkResourcePermissions($conf) 354 ApplicationUtils::checkResourcePermissions($conf)
329 ); 355 );
330 } 356 }
357
358 /**
359 * Check update with 'dev' as curent version (master branch).
360 * It should always return false.
361 */
362 public function testCheckUpdateDev()
363 {
364 $this->assertFalse(
365 ApplicationUtils::checkUpdate('dev', self::$testUpdateFile, 100, true, true)
366 );
367 }
331} 368}
diff --git a/tests/FeedBuilderTest.php b/tests/FeedBuilderTest.php
index 06a44506..a590306d 100644
--- a/tests/FeedBuilderTest.php
+++ b/tests/FeedBuilderTest.php
@@ -75,7 +75,6 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase
75 $data = $feedBuilder->buildData(); 75 $data = $feedBuilder->buildData();
76 // Test headers (RSS) 76 // Test headers (RSS)
77 $this->assertEquals(self::$RSS_LANGUAGE, $data['language']); 77 $this->assertEquals(self::$RSS_LANGUAGE, $data['language']);
78 $this->assertEmpty($data['pubsubhub_url']);
79 $this->assertRegExp('/Wed, 03 Aug 2016 09:30:33 \+\d{4}/', $data['last_update']); 78 $this->assertRegExp('/Wed, 03 Aug 2016 09:30:33 \+\d{4}/', $data['last_update']);
80 $this->assertEquals(true, $data['show_dates']); 79 $this->assertEquals(true, $data['show_dates']);
81 $this->assertEquals('http://host.tld/index.php?do=feed', $data['self_link']); 80 $this->assertEquals('http://host.tld/index.php?do=feed', $data['self_link']);
@@ -211,19 +210,6 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase
211 } 210 }
212 211
213 /** 212 /**
214 * Test buildData with hide dates settings.
215 */
216 public function testBuildDataPubsubhub()
217 {
218 $feedBuilder = new FeedBuilder(self::$linkDB, FeedBuilder::$FEED_ATOM, self::$serverInfo, null, false);
219 $feedBuilder->setLocale(self::$LOCALE);
220 $feedBuilder->setPubsubhubUrl('http://pubsubhub.io');
221 $data = $feedBuilder->buildData();
222 $this->assertEquals(ReferenceLinkDB::$NB_LINKS_TOTAL, count($data['links']));
223 $this->assertEquals('http://pubsubhub.io', $data['pubsubhub_url']);
224 }
225
226 /**
227 * Test buildData when Shaarli is served from a subdirectory 213 * Test buildData when Shaarli is served from a subdirectory
228 */ 214 */
229 public function testBuildDataServerSubdir() 215 public function testBuildDataServerSubdir()
diff --git a/tests/FileUtilsTest.php b/tests/FileUtilsTest.php
new file mode 100644
index 00000000..d764e495
--- /dev/null
+++ b/tests/FileUtilsTest.php
@@ -0,0 +1,108 @@
1<?php
2
3require_once 'application/FileUtils.php';
4
5/**
6 * Class FileUtilsTest
7 *
8 * Test file utility class.
9 */
10class FileUtilsTest extends PHPUnit_Framework_TestCase
11{
12 /**
13 * @var string Test file path.
14 */
15 protected static $file = 'sandbox/flat.db';
16
17 /**
18 * Delete test file after every test.
19 */
20 public function tearDown()
21 {
22 @unlink(self::$file);
23 }
24
25 /**
26 * Test writeDB, then readDB with different data.
27 */
28 public function testSimpleWriteRead()
29 {
30 $data = ['blue', 'red'];
31 $this->assertTrue(FileUtils::writeFlatDB(self::$file, $data) > 0);
32 $this->assertTrue(startsWith(file_get_contents(self::$file), '<?php /*'));
33 $this->assertEquals($data, FileUtils::readFlatDB(self::$file));
34
35 $data = 0;
36 $this->assertTrue(FileUtils::writeFlatDB(self::$file, $data) > 0);
37 $this->assertEquals($data, FileUtils::readFlatDB(self::$file));
38
39 $data = null;
40 $this->assertTrue(FileUtils::writeFlatDB(self::$file, $data) > 0);
41 $this->assertEquals($data, FileUtils::readFlatDB(self::$file));
42
43 $data = false;
44 $this->assertTrue(FileUtils::writeFlatDB(self::$file, $data) > 0);
45 $this->assertEquals($data, FileUtils::readFlatDB(self::$file));
46 }
47
48 /**
49 * File not writable: raise an exception.
50 *
51 * @expectedException IOException
52 * @expectedExceptionMessage Error accessing "sandbox/flat.db"
53 */
54 public function testWriteWithoutPermission()
55 {
56 touch(self::$file);
57 chmod(self::$file, 0440);
58 FileUtils::writeFlatDB(self::$file, null);
59 }
60
61 /**
62 * Folder non existent: raise an exception.
63 *
64 * @expectedException IOException
65 * @expectedExceptionMessage Error accessing "nopefolder"
66 */
67 public function testWriteFolderDoesNotExist()
68 {
69 FileUtils::writeFlatDB('nopefolder/file', null);
70 }
71
72 /**
73 * Folder non writable: raise an exception.
74 *
75 * @expectedException IOException
76 * @expectedExceptionMessage Error accessing "sandbox"
77 */
78 public function testWriteFolderPermission()
79 {
80 chmod(dirname(self::$file), 0555);
81 try {
82 FileUtils::writeFlatDB(self::$file, null);
83 } catch (Exception $e) {
84 chmod(dirname(self::$file), 0755);
85 throw $e;
86 }
87 }
88
89 /**
90 * Read non existent file, use default parameter.
91 */
92 public function testReadNotExistentFile()
93 {
94 $this->assertEquals(null, FileUtils::readFlatDB(self::$file));
95 $this->assertEquals(['test'], FileUtils::readFlatDB(self::$file, ['test']));
96 }
97
98 /**
99 * Read non readable file, use default parameter.
100 */
101 public function testReadNotReadable()
102 {
103 touch(self::$file);
104 chmod(self::$file, 0220);
105 $this->assertEquals(null, FileUtils::readFlatDB(self::$file));
106 $this->assertEquals(['test'], FileUtils::readFlatDB(self::$file, ['test']));
107 }
108}
diff --git a/tests/HistoryTest.php b/tests/HistoryTest.php
new file mode 100644
index 00000000..d3bef5a3
--- /dev/null
+++ b/tests/HistoryTest.php
@@ -0,0 +1,207 @@
1<?php
2
3require_once 'application/History.php';
4
5
6class HistoryTest extends PHPUnit_Framework_TestCase
7{
8 /**
9 * @var string History file path
10 */
11 protected static $historyFilePath = 'sandbox/history.php';
12
13 /**
14 * Delete history file.
15 */
16 public function tearDown()
17 {
18 @unlink(self::$historyFilePath);
19 }
20
21 /**
22 * Test that the history file is created if it doesn't exist.
23 */
24 public function testConstructLazyLoading()
25 {
26 new History(self::$historyFilePath);
27 $this->assertFileNotExists(self::$historyFilePath);
28 }
29
30 /**
31 * Test that the history file is created if it doesn't exist.
32 */
33 public function testAddEventCreateFile()
34 {
35 $history = new History(self::$historyFilePath);
36 $history->updateSettings();
37 $this->assertFileExists(self::$historyFilePath);
38 }
39
40 /**
41 * Not writable history file: raise an exception.
42 *
43 * @expectedException Exception
44 * @expectedExceptionMessage History file isn't readable or writable
45 */
46 public function testConstructNotWritable()
47 {
48 touch(self::$historyFilePath);
49 chmod(self::$historyFilePath, 0440);
50 $history = new History(self::$historyFilePath);
51 $history->updateSettings();
52 }
53
54 /**
55 * Not parsable history file: raise an exception.
56 *
57 * @expectedException Exception
58 * @expectedExceptionMessageRegExp /Could not parse history file/
59 */
60 public function testConstructNotParsable()
61 {
62 file_put_contents(self::$historyFilePath, 'not parsable');
63 $history = new History(self::$historyFilePath);
64 // gzinflate generates a warning
65 @$history->updateSettings();
66 }
67
68 /**
69 * Test add link event
70 */
71 public function testAddLink()
72 {
73 $history = new History(self::$historyFilePath);
74 $history->addLink(['id' => 0]);
75 $actual = $history->getHistory()[0];
76 $this->assertEquals(History::CREATED, $actual['event']);
77 $this->assertTrue(new DateTime('-2 seconds') < $actual['datetime']);
78 $this->assertEquals(0, $actual['id']);
79
80 $history = new History(self::$historyFilePath);
81 $history->addLink(['id' => 1]);
82 $actual = $history->getHistory()[0];
83 $this->assertEquals(History::CREATED, $actual['event']);
84 $this->assertTrue(new DateTime('-2 seconds') < $actual['datetime']);
85 $this->assertEquals(1, $actual['id']);
86
87 $history = new History(self::$historyFilePath);
88 $history->addLink(['id' => 'str']);
89 $actual = $history->getHistory()[0];
90 $this->assertEquals(History::CREATED, $actual['event']);
91 $this->assertTrue(new DateTime('-2 seconds') < $actual['datetime']);
92 $this->assertEquals('str', $actual['id']);
93 }
94
95 /**
96 * Test updated link event
97 */
98 public function testUpdateLink()
99 {
100 $history = new History(self::$historyFilePath);
101 $history->updateLink(['id' => 1]);
102 $actual = $history->getHistory()[0];
103 $this->assertEquals(History::UPDATED, $actual['event']);
104 $this->assertTrue(new DateTime('-2 seconds') < $actual['datetime']);
105 $this->assertEquals(1, $actual['id']);
106 }
107
108 /**
109 * Test delete link event
110 */
111 public function testDeleteLink()
112 {
113 $history = new History(self::$historyFilePath);
114 $history->deleteLink(['id' => 1]);
115 $actual = $history->getHistory()[0];
116 $this->assertEquals(History::DELETED, $actual['event']);
117 $this->assertTrue(new DateTime('-2 seconds') < $actual['datetime']);
118 $this->assertEquals(1, $actual['id']);
119 }
120
121 /**
122 * Test updated settings event
123 */
124 public function testUpdateSettings()
125 {
126 $history = new History(self::$historyFilePath);
127 $history->updateSettings();
128 $actual = $history->getHistory()[0];
129 $this->assertEquals(History::SETTINGS, $actual['event']);
130 $this->assertTrue(new DateTime('-2 seconds') < $actual['datetime']);
131 $this->assertEmpty($actual['id']);
132 }
133
134 /**
135 * Make sure that new items are stored at the beginning
136 */
137 public function testHistoryOrder()
138 {
139 $history = new History(self::$historyFilePath);
140 $history->updateLink(['id' => 1]);
141 $actual = $history->getHistory()[0];
142 $this->assertEquals(History::UPDATED, $actual['event']);
143 $this->assertTrue(new DateTime('-2 seconds') < $actual['datetime']);
144 $this->assertEquals(1, $actual['id']);
145
146 $history->addLink(['id' => 1]);
147 $actual = $history->getHistory()[0];
148 $this->assertEquals(History::CREATED, $actual['event']);
149 $this->assertTrue(new DateTime('-2 seconds') < $actual['datetime']);
150 $this->assertEquals(1, $actual['id']);
151 }
152
153 /**
154 * Re-read history from file after writing an event
155 */
156 public function testHistoryRead()
157 {
158 $history = new History(self::$historyFilePath);
159 $history->updateLink(['id' => 1]);
160 $history = new History(self::$historyFilePath);
161 $actual = $history->getHistory()[0];
162 $this->assertEquals(History::UPDATED, $actual['event']);
163 $this->assertTrue(new DateTime('-2 seconds') < $actual['datetime']);
164 $this->assertEquals(1, $actual['id']);
165 }
166
167 /**
168 * Re-read history from file after writing an event and make sure that the order is correct
169 */
170 public function testHistoryOrderRead()
171 {
172 $history = new History(self::$historyFilePath);
173 $history->updateLink(['id' => 1]);
174 $history->addLink(['id' => 1]);
175
176 $history = new History(self::$historyFilePath);
177 $actual = $history->getHistory()[0];
178 $this->assertEquals(History::CREATED, $actual['event']);
179 $this->assertTrue(new DateTime('-2 seconds') < $actual['datetime']);
180 $this->assertEquals(1, $actual['id']);
181
182 $actual = $history->getHistory()[1];
183 $this->assertEquals(History::UPDATED, $actual['event']);
184 $this->assertTrue(new DateTime('-2 seconds') < $actual['datetime']);
185 $this->assertEquals(1, $actual['id']);
186 }
187
188 /**
189 * Test retention time: delete old entries.
190 */
191 public function testHistoryRententionTime()
192 {
193 $history = new History(self::$historyFilePath, 5);
194 $history->updateLink(['id' => 1]);
195 $this->assertEquals(1, count($history->getHistory()));
196 $arr = $history->getHistory();
197 $arr[0]['datetime'] = new DateTime('-1 hour');
198 FileUtils::writeFlatDB(self::$historyFilePath, $arr);
199
200 $history = new History(self::$historyFilePath, 60);
201 $this->assertEquals(1, count($history->getHistory()));
202 $this->assertEquals(1, $history->getHistory()[0]['id']);
203 $history->updateLink(['id' => 2]);
204 $this->assertEquals(1, count($history->getHistory()));
205 $this->assertEquals(2, $history->getHistory()[0]['id']);
206 }
207}
diff --git a/tests/HttpUtils/IsHttpsTest.php b/tests/HttpUtils/IsHttpsTest.php
new file mode 100644
index 00000000..097f2bcf
--- /dev/null
+++ b/tests/HttpUtils/IsHttpsTest.php
@@ -0,0 +1,36 @@
1<?php
2
3
4/**
5 * Class IsHttpsTest
6 *
7 * Test class for is_https() function.
8 */
9class IsHttpsTest extends PHPUnit_Framework_TestCase
10{
11
12 /**
13 * Test is_https with HTTPS values.
14 */
15 public function testIsHttpsTrue()
16 {
17 $this->assertTrue(is_https(['HTTPS' => true]));
18 $this->assertTrue(is_https(['HTTPS' => '1']));
19 $this->assertTrue(is_https(['HTTPS' => false, 'HTTP_X_FORWARDED_PORT' => 443]));
20 $this->assertTrue(is_https(['HTTPS' => false, 'HTTP_X_FORWARDED_PORT' => '443']));
21 $this->assertTrue(is_https(['HTTPS' => false, 'HTTP_X_FORWARDED_PORT' => '443,123,456,']));
22 }
23
24 /**
25 * Test is_https with HTTP values.
26 */
27 public function testIsHttpsFalse()
28 {
29 $this->assertFalse(is_https([]));
30 $this->assertFalse(is_https(['HTTPS' => false]));
31 $this->assertFalse(is_https(['HTTPS' => '0']));
32 $this->assertFalse(is_https(['HTTPS' => false, 'HTTP_X_FORWARDED_PORT' => 123]));
33 $this->assertFalse(is_https(['HTTPS' => false, 'HTTP_X_FORWARDED_PORT' => '123']));
34 $this->assertFalse(is_https(['HTTPS' => false, 'HTTP_X_FORWARDED_PORT' => ',123,456,']));
35 }
36}
diff --git a/tests/HttpUtils/ServerUrlTest.php b/tests/HttpUtils/ServerUrlTest.php
index 8a55a220..324b827a 100644
--- a/tests/HttpUtils/ServerUrlTest.php
+++ b/tests/HttpUtils/ServerUrlTest.php
@@ -39,6 +39,34 @@ class ServerUrlTest extends PHPUnit_Framework_TestCase
39 } 39 }
40 40
41 /** 41 /**
42 * Detect a Proxy that sets Forwarded-Host
43 */
44 public function testHttpsProxyForwardedHost()
45 {
46 $this->assertEquals(
47 'https://host.tld:8080',
48 server_url(
49 array(
50 'HTTP_X_FORWARDED_PROTO' => 'https',
51 'HTTP_X_FORWARDED_PORT' => '8080',
52 'HTTP_X_FORWARDED_HOST' => 'host.tld'
53 )
54 )
55 );
56
57 $this->assertEquals(
58 'https://host.tld:4974',
59 server_url(
60 array(
61 'HTTP_X_FORWARDED_PROTO' => 'https, https',
62 'HTTP_X_FORWARDED_PORT' => '4974, 80',
63 'HTTP_X_FORWARDED_HOST' => 'host.tld, example.com'
64 )
65 )
66 );
67 }
68
69 /**
42 * Detect a Proxy with SSL enabled 70 * Detect a Proxy with SSL enabled
43 */ 71 */
44 public function testHttpsProxyForward() 72 public function testHttpsProxyForward()
@@ -69,6 +97,19 @@ class ServerUrlTest extends PHPUnit_Framework_TestCase
69 ); 97 );
70 98
71 $this->assertEquals( 99 $this->assertEquals(
100 'https://host.tld',
101 server_url(
102 array(
103 'HTTPS' => 'Off',
104 'SERVER_NAME' => 'host.tld',
105 'SERVER_PORT' => '80',
106 'HTTP_X_FORWARDED_PROTO' => 'https',
107 'HTTP_X_FORWARDED_PORT' => '443'
108 )
109 )
110 );
111
112 $this->assertEquals(
72 'https://host.tld:4974', 113 'https://host.tld:4974',
73 server_url( 114 server_url(
74 array( 115 array(
@@ -145,4 +186,36 @@ class ServerUrlTest extends PHPUnit_Framework_TestCase
145 ) 186 )
146 ); 187 );
147 } 188 }
189
190 /**
191 * Misconfigured server (see #1022): Proxy HTTP but 443
192 */
193 public function testHttpWithPort433()
194 {
195 $this->assertEquals(
196 'https://host.tld',
197 server_url(
198 array(
199 'HTTPS' => 'Off',
200 'SERVER_NAME' => 'host.tld',
201 'SERVER_PORT' => '80',
202 'HTTP_X_FORWARDED_PROTO' => 'http',
203 'HTTP_X_FORWARDED_PORT' => '443'
204 )
205 )
206 );
207
208 $this->assertEquals(
209 'https://host.tld',
210 server_url(
211 array(
212 'HTTPS' => 'Off',
213 'SERVER_NAME' => 'host.tld',
214 'SERVER_PORT' => '80',
215 'HTTP_X_FORWARDED_PROTO' => 'https, http',
216 'HTTP_X_FORWARDED_PORT' => '443, 80'
217 )
218 )
219 );
220 }
148} 221}
diff --git a/tests/LanguagesTest.php b/tests/LanguagesTest.php
index 79c136c8..864ce630 100644
--- a/tests/LanguagesTest.php
+++ b/tests/LanguagesTest.php
@@ -1,41 +1,203 @@
1<?php 1<?php
2 2
3require_once 'application/Languages.php'; 3namespace Shaarli;
4
5use Shaarli\Config\ConfigManager;
4 6
5/** 7/**
6 * Class LanguagesTest. 8 * Class LanguagesTest.
7 */ 9 */
8class LanguagesTest extends PHPUnit_Framework_TestCase 10class LanguagesTest extends \PHPUnit_Framework_TestCase
9{ 11{
10 /** 12 /**
13 * @var string Config file path (without extension).
14 */
15 protected static $configFile = 'tests/utils/config/configJson';
16
17 /**
18 * @var ConfigManager
19 */
20 protected $conf;
21
22 /**
23 *
24 */
25 public function setUp()
26 {
27 $this->conf = new ConfigManager(self::$configFile);
28 }
29
30 /**
31 * Test t() with a simple non identified value.
32 */
33 public function testTranslateSingleNotIDGettext()
34 {
35 $this->conf->set('translation.mode', 'gettext');
36 new Languages('en', $this->conf);
37 $text = 'abcdé 564 fgK';
38 $this->assertEquals($text, t($text));
39 }
40
41 /**
42 * Test t() with a simple identified value in gettext mode.
43 */
44 public function testTranslateSingleIDGettext()
45 {
46 $this->conf->set('translation.mode', 'gettext');
47 new Languages('en', $this->conf);
48 $text = 'permalink';
49 $this->assertEquals($text, t($text));
50 }
51
52 /**
53 * Test t() with a non identified plural form in gettext mode.
54 */
55 public function testTranslatePluralNotIDGettext()
56 {
57 $this->conf->set('translation.mode', 'gettext');
58 new Languages('en', $this->conf);
59 $text = 'sandwich';
60 $nText = 'sandwiches';
61 $this->assertEquals('sandwiches', t($text, $nText, 0));
62 $this->assertEquals('sandwich', t($text, $nText, 1));
63 $this->assertEquals('sandwiches', t($text, $nText, 2));
64 }
65
66 /**
67 * Test t() with an identified plural form in gettext mode.
68 */
69 public function testTranslatePluralIDGettext()
70 {
71 $this->conf->set('translation.mode', 'gettext');
72 new Languages('en', $this->conf);
73 $text = 'shaare';
74 $nText = 'shaares';
75 // In english, zero is followed by plural form
76 $this->assertEquals('shaares', t($text, $nText, 0));
77 $this->assertEquals('shaare', t($text, $nText, 1));
78 $this->assertEquals('shaares', t($text, $nText, 2));
79 }
80
81 /**
11 * Test t() with a simple non identified value. 82 * Test t() with a simple non identified value.
12 */ 83 */
13 public function testTranslateSingleNotID() 84 public function testTranslateSingleNotIDPhp()
14 { 85 {
86 $this->conf->set('translation.mode', 'php');
87 new Languages('en', $this->conf);
15 $text = 'abcdé 564 fgK'; 88 $text = 'abcdé 564 fgK';
16 $this->assertEquals($text, t($text)); 89 $this->assertEquals($text, t($text));
17 } 90 }
18 91
19 /** 92 /**
20 * Test t() with a non identified plural form. 93 * Test t() with a simple identified value in PHP mode.
21 */ 94 */
22 public function testTranslatePluralNotID() 95 public function testTranslateSingleIDPhp()
23 { 96 {
24 $text = '%s sandwich'; 97 $this->conf->set('translation.mode', 'php');
25 $nText = '%s sandwiches'; 98 new Languages('en', $this->conf);
26 $this->assertEquals('0 sandwich', t($text, $nText)); 99 $text = 'permalink';
27 $this->assertEquals('1 sandwich', t($text, $nText, 1)); 100 $this->assertEquals($text, t($text));
28 $this->assertEquals('2 sandwiches', t($text, $nText, 2));
29 } 101 }
30 102
31 /** 103 /**
32 * Test t() with a non identified invalid plural form. 104 * Test t() with a non identified plural form in PHP mode.
33 */ 105 */
34 public function testTranslatePluralNotIDInvalid() 106 public function testTranslatePluralNotIDPhp()
35 { 107 {
108 $this->conf->set('translation.mode', 'php');
109 new Languages('en', $this->conf);
36 $text = 'sandwich'; 110 $text = 'sandwich';
37 $nText = 'sandwiches'; 111 $nText = 'sandwiches';
112 $this->assertEquals('sandwiches', t($text, $nText, 0));
38 $this->assertEquals('sandwich', t($text, $nText, 1)); 113 $this->assertEquals('sandwich', t($text, $nText, 1));
39 $this->assertEquals('sandwiches', t($text, $nText, 2)); 114 $this->assertEquals('sandwiches', t($text, $nText, 2));
40 } 115 }
116
117 /**
118 * Test t() with an identified plural form in PHP mode.
119 */
120 public function testTranslatePluralIDPhp()
121 {
122 $this->conf->set('translation.mode', 'php');
123 new Languages('en', $this->conf);
124 $text = 'shaare';
125 $nText = 'shaares';
126 // In english, zero is followed by plural form
127 $this->assertEquals('shaares', t($text, $nText, 0));
128 $this->assertEquals('shaare', t($text, $nText, 1));
129 $this->assertEquals('shaares', t($text, $nText, 2));
130 }
131
132 /**
133 * Test t() with an invalid language set in the configuration in gettext mode.
134 */
135 public function testTranslateWithInvalidConfLanguageGettext()
136 {
137 $this->conf->set('translation.mode', 'gettext');
138 $this->conf->set('translation.language', 'nope');
139 new Languages('fr', $this->conf);
140 $text = 'grumble';
141 $this->assertEquals($text, t($text));
142 }
143
144 /**
145 * Test t() with an invalid language set in the configuration in PHP mode.
146 */
147 public function testTranslateWithInvalidConfLanguagePhp()
148 {
149 $this->conf->set('translation.mode', 'php');
150 $this->conf->set('translation.language', 'nope');
151 new Languages('fr', $this->conf);
152 $text = 'grumble';
153 $this->assertEquals($text, t($text));
154 }
155
156 /**
157 * Test t() with an invalid language set with auto language in gettext mode.
158 */
159 public function testTranslateWithInvalidAutoLanguageGettext()
160 {
161 $this->conf->set('translation.mode', 'gettext');
162 new Languages('nope', $this->conf);
163 $text = 'grumble';
164 $this->assertEquals($text, t($text));
165 }
166
167 /**
168 * Test t() with an invalid language set with auto language in PHP mode.
169 */
170 public function testTranslateWithInvalidAutoLanguagePhp()
171 {
172 $this->conf->set('translation.mode', 'php');
173 new Languages('nope', $this->conf);
174 $text = 'grumble';
175 $this->assertEquals($text, t($text));
176 }
177
178 /**
179 * Test t() with an extension language file in gettext mode
180 */
181 public function testTranslationExtensionGettext()
182 {
183 $this->conf->set('translation.mode', 'gettext');
184 $this->conf->set('translation.extensions.test', 'tests/utils/languages/');
185 new Languages('en', $this->conf);
186 $txt = 'car'; // ignore me poedit
187 $this->assertEquals('car', t($txt, $txt, 1, 'test'));
188 $this->assertEquals('Search', t('Search', 'Search', 1, 'test'));
189 }
190
191 /**
192 * Test t() with an extension language file in PHP mode
193 */
194 public function testTranslationExtensionPhp()
195 {
196 $this->conf->set('translation.mode', 'php');
197 $this->conf->set('translation.extensions.test', 'tests/utils/languages/');
198 new Languages('en', $this->conf);
199 $txt = 'car'; // ignore me poedit
200 $this->assertEquals('car', t($txt, $txt, 1, 'test'));
201 $this->assertEquals('Search', t('Search', 'Search', 1, 'test'));
202 }
41} 203}
diff --git a/tests/LinkDBTest.php b/tests/LinkDBTest.php
index 1f62a34a..5b2f3667 100644
--- a/tests/LinkDBTest.php
+++ b/tests/LinkDBTest.php
@@ -101,7 +101,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
101 * Attempt to instantiate a LinkDB whereas the datastore is not writable 101 * Attempt to instantiate a LinkDB whereas the datastore is not writable
102 * 102 *
103 * @expectedException IOException 103 * @expectedException IOException
104 * @expectedExceptionMessageRegExp /Error accessing\nnull/ 104 * @expectedExceptionMessageRegExp /Error accessing "null"/
105 */ 105 */
106 public function testConstructDatastoreNotWriteable() 106 public function testConstructDatastoreNotWriteable()
107 { 107 {
@@ -297,7 +297,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
297 'sTuff' => 2, 297 'sTuff' => 2,
298 'ut' => 1, 298 'ut' => 1,
299 ), 299 ),
300 self::$publicLinkDB->allTags() 300 self::$publicLinkDB->linksCountPerTag()
301 ); 301 );
302 302
303 $this->assertEquals( 303 $this->assertEquals(
@@ -325,7 +325,34 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
325 'tag4' => 1, 325 'tag4' => 1,
326 'ut' => 1, 326 'ut' => 1,
327 ), 327 ),
328 self::$privateLinkDB->allTags() 328 self::$privateLinkDB->linksCountPerTag()
329 );
330 $this->assertEquals(
331 array(
332 'web' => 4,
333 'cartoon' => 2,
334 'gnu' => 1,
335 'dev' => 1,
336 'samba' => 1,
337 'media' => 1,
338 'html' => 1,
339 'w3c' => 1,
340 'css' => 1,
341 'Mercurial' => 1,
342 '.hidden' => 1,
343 'hashtag' => 1,
344 ),
345 self::$privateLinkDB->linksCountPerTag(['web'])
346 );
347 $this->assertEquals(
348 array(
349 'web' => 1,
350 'html' => 1,
351 'w3c' => 1,
352 'css' => 1,
353 'Mercurial' => 1,
354 ),
355 self::$privateLinkDB->linksCountPerTag(['web'], 'private')
329 ); 356 );
330 } 357 }
331 358
@@ -448,7 +475,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
448 public function testReorderLinksDesc() 475 public function testReorderLinksDesc()
449 { 476 {
450 self::$privateLinkDB->reorder('ASC'); 477 self::$privateLinkDB->reorder('ASC');
451 $linkIds = array(42, 4, 1, 0, 7, 6, 8, 41); 478 $linkIds = array(42, 4, 9, 1, 0, 7, 6, 8, 41);
452 $cpt = 0; 479 $cpt = 0;
453 foreach (self::$privateLinkDB as $key => $value) { 480 foreach (self::$privateLinkDB as $key => $value) {
454 $this->assertEquals($linkIds[$cpt++], $key); 481 $this->assertEquals($linkIds[$cpt++], $key);
@@ -460,4 +487,59 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
460 $this->assertEquals($linkIds[$cpt++], $key); 487 $this->assertEquals($linkIds[$cpt++], $key);
461 } 488 }
462 } 489 }
490
491 /**
492 * Test rename tag with a valid value present in multiple links
493 */
494 public function testRenameTagMultiple()
495 {
496 self::$refDB->write(self::$testDatastore);
497 $linkDB = new LinkDB(self::$testDatastore, true, false);
498
499 $res = $linkDB->renameTag('cartoon', 'Taz');
500 $this->assertEquals(3, count($res));
501 $this->assertContains(' Taz ', $linkDB[4]['tags']);
502 $this->assertContains(' Taz ', $linkDB[1]['tags']);
503 $this->assertContains(' Taz ', $linkDB[0]['tags']);
504 }
505
506 /**
507 * Test rename tag with a valid value
508 */
509 public function testRenameTagCaseSensitive()
510 {
511 self::$refDB->write(self::$testDatastore);
512 $linkDB = new LinkDB(self::$testDatastore, true, false, '');
513
514 $res = $linkDB->renameTag('sTuff', 'Taz');
515 $this->assertEquals(1, count($res));
516 $this->assertEquals('Taz', $linkDB[41]['tags']);
517 }
518
519 /**
520 * Test rename tag with invalid values
521 */
522 public function testRenameTagInvalid()
523 {
524 $linkDB = new LinkDB(self::$testDatastore, false, false);
525
526 $this->assertFalse($linkDB->renameTag('', 'test'));
527 $this->assertFalse($linkDB->renameTag('', ''));
528 // tag non existent
529 $this->assertEquals([], $linkDB->renameTag('test', ''));
530 $this->assertEquals([], $linkDB->renameTag('test', 'retest'));
531 }
532
533 /**
534 * Test delete tag with a valid value
535 */
536 public function testDeleteTag()
537 {
538 self::$refDB->write(self::$testDatastore);
539 $linkDB = new LinkDB(self::$testDatastore, true, false);
540
541 $res = $linkDB->renameTag('cartoon', null);
542 $this->assertEquals(3, count($res));
543 $this->assertNotContains('cartoon', $linkDB[4]['tags']);
544 }
463} 545}
diff --git a/tests/LinkFilterTest.php b/tests/LinkFilterTest.php
index 21d680a5..9cd6dbd4 100644
--- a/tests/LinkFilterTest.php
+++ b/tests/LinkFilterTest.php
@@ -8,17 +8,33 @@ require_once 'application/LinkFilter.php';
8class LinkFilterTest extends PHPUnit_Framework_TestCase 8class LinkFilterTest extends PHPUnit_Framework_TestCase
9{ 9{
10 /** 10 /**
11 * @var string Test datastore path.
12 */
13 protected static $testDatastore = 'sandbox/datastore.php';
14 /**
11 * @var LinkFilter instance. 15 * @var LinkFilter instance.
12 */ 16 */
13 protected static $linkFilter; 17 protected static $linkFilter;
14 18
15 /** 19 /**
20 * @var ReferenceLinkDB instance
21 */
22 protected static $refDB;
23
24 /**
25 * @var LinkDB instance
26 */
27 protected static $linkDB;
28
29 /**
16 * Instanciate linkFilter with ReferenceLinkDB data. 30 * Instanciate linkFilter with ReferenceLinkDB data.
17 */ 31 */
18 public static function setUpBeforeClass() 32 public static function setUpBeforeClass()
19 { 33 {
20 $refDB = new ReferenceLinkDB(); 34 self::$refDB = new ReferenceLinkDB();
21 self::$linkFilter = new LinkFilter($refDB->getLinks()); 35 self::$refDB->write(self::$testDatastore);
36 self::$linkDB = new LinkDB(self::$testDatastore, true, false);
37 self::$linkFilter = new LinkFilter(self::$linkDB);
22 } 38 }
23 39
24 /** 40 /**
@@ -27,14 +43,30 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
27 public function testFilter() 43 public function testFilter()
28 { 44 {
29 $this->assertEquals( 45 $this->assertEquals(
30 ReferenceLinkDB::$NB_LINKS_TOTAL, 46 self::$refDB->countLinks(),
31 count(self::$linkFilter->filter('', '')) 47 count(self::$linkFilter->filter('', ''))
32 ); 48 );
33 49
50 $this->assertEquals(
51 self::$refDB->countLinks(),
52 count(self::$linkFilter->filter('', '', 'all'))
53 );
54
55 $this->assertEquals(
56 self::$refDB->countLinks(),
57 count(self::$linkFilter->filter('', '', 'randomstr'))
58 );
59
34 // Private only. 60 // Private only.
35 $this->assertEquals( 61 $this->assertEquals(
36 2, 62 self::$refDB->countPrivateLinks(),
37 count(self::$linkFilter->filter('', '', false, true)) 63 count(self::$linkFilter->filter('', '', false, 'private'))
64 );
65
66 // Public only.
67 $this->assertEquals(
68 self::$refDB->countPublicLinks(),
69 count(self::$linkFilter->filter('', '', false, 'public'))
38 ); 70 );
39 71
40 $this->assertEquals( 72 $this->assertEquals(
@@ -43,6 +75,11 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
43 ); 75 );
44 76
45 $this->assertEquals( 77 $this->assertEquals(
78 self::$refDB->countUntaggedLinks(),
79 count(self::$linkFilter->filter(LinkFilter::$FILTER_TAG, /*$request=*/'', /*$casesensitive=*/false, /*$visibility=*/'all', /*$untaggedonly=*/true))
80 );
81
82 $this->assertEquals(
46 ReferenceLinkDB::$NB_LINKS_TOTAL, 83 ReferenceLinkDB::$NB_LINKS_TOTAL,
47 count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, '')) 84 count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, ''))
48 ); 85 );
@@ -58,10 +95,26 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
58 count(self::$linkFilter->filter(LinkFilter::$FILTER_TAG, 'web', false)) 95 count(self::$linkFilter->filter(LinkFilter::$FILTER_TAG, 'web', false))
59 ); 96 );
60 97
98 $this->assertEquals(
99 4,
100 count(self::$linkFilter->filter(LinkFilter::$FILTER_TAG, 'web', false, 'all'))
101 );
102
103 $this->assertEquals(
104 4,
105 count(self::$linkFilter->filter(LinkFilter::$FILTER_TAG, 'web', false, 'default-blabla'))
106 );
107
61 // Private only. 108 // Private only.
62 $this->assertEquals( 109 $this->assertEquals(
63 1, 110 1,
64 count(self::$linkFilter->filter(LinkFilter::$FILTER_TAG, 'web', false, true)) 111 count(self::$linkFilter->filter(LinkFilter::$FILTER_TAG, 'web', false, 'private'))
112 );
113
114 // Public only.
115 $this->assertEquals(
116 3,
117 count(self::$linkFilter->filter(LinkFilter::$FILTER_TAG, 'web', false, 'public'))
65 ); 118 );
66 } 119 }
67 120
@@ -109,7 +162,7 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
109 public function testFilterDay() 162 public function testFilterDay()
110 { 163 {
111 $this->assertEquals( 164 $this->assertEquals(
112 3, 165 4,
113 count(self::$linkFilter->filter(LinkFilter::$FILTER_DAY, '20121206')) 166 count(self::$linkFilter->filter(LinkFilter::$FILTER_DAY, '20121206'))
114 ); 167 );
115 } 168 }
@@ -253,14 +306,30 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
253 public function testFilterFullTextTags() 306 public function testFilterFullTextTags()
254 { 307 {
255 $this->assertEquals( 308 $this->assertEquals(
256 2, 309 6,
257 count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'gnu')) 310 count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'web'))
311 );
312
313 $this->assertEquals(
314 6,
315 count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'web', 'all'))
316 );
317
318 $this->assertEquals(
319 6,
320 count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'web', 'bla'))
258 ); 321 );
259 322
260 // Private only. 323 // Private only.
261 $this->assertEquals( 324 $this->assertEquals(
262 1, 325 1,
263 count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'web', false, true)) 326 count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'web', false, 'private'))
327 );
328
329 // Public only.
330 $this->assertEquals(
331 5,
332 count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, 'web', false, 'public'))
264 ); 333 );
265 } 334 }
266 335
@@ -286,7 +355,7 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
286 ); 355 );
287 356
288 $this->assertEquals( 357 $this->assertEquals(
289 7, 358 ReferenceLinkDB::$NB_LINKS_TOTAL - 1,
290 count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, '-revolution')) 359 count(self::$linkFilter->filter(LinkFilter::$FILTER_TEXT, '-revolution'))
291 ); 360 );
292 } 361 }
@@ -346,7 +415,7 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
346 ); 415 );
347 416
348 $this->assertEquals( 417 $this->assertEquals(
349 7, 418 ReferenceLinkDB::$NB_LINKS_TOTAL - 1,
350 count(self::$linkFilter->filter(LinkFilter::$FILTER_TAG, '-free')) 419 count(self::$linkFilter->filter(LinkFilter::$FILTER_TAG, '-free'))
351 ); 420 );
352 } 421 }
@@ -376,6 +445,13 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
376 1, 445 1,
377 count(self::$linkFilter->filter( 446 count(self::$linkFilter->filter(
378 LinkFilter::$FILTER_TAG | LinkFilter::$FILTER_TEXT, 447 LinkFilter::$FILTER_TAG | LinkFilter::$FILTER_TEXT,
448 array(false, 'PSR-2')
449 ))
450 );
451 $this->assertEquals(
452 1,
453 count(self::$linkFilter->filter(
454 LinkFilter::$FILTER_TAG | LinkFilter::$FILTER_TEXT,
379 array($tags, '') 455 array($tags, '')
380 )) 456 ))
381 ); 457 );
@@ -409,7 +485,7 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
409 LinkFilter::$FILTER_TAG, 485 LinkFilter::$FILTER_TAG,
410 $hashtag, 486 $hashtag,
411 false, 487 false,
412 true 488 'private'
413 )) 489 ))
414 ); 490 );
415 } 491 }
diff --git a/tests/LinkUtilsTest.php b/tests/LinkUtilsTest.php
index 7c0d4b0b..7fbd59b0 100644
--- a/tests/LinkUtilsTest.php
+++ b/tests/LinkUtilsTest.php
@@ -29,27 +29,13 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase
29 } 29 }
30 30
31 /** 31 /**
32 * Test get_charset() with all priorities.
33 */
34 public function testGetCharset()
35 {
36 $headers = array('Content-Type' => 'text/html; charset=Headers');
37 $html = '<html><meta>stuff</meta><meta charset="Html"/></html>';
38 $default = 'default';
39 $this->assertEquals('headers', get_charset($headers, $html, $default));
40 $this->assertEquals('html', get_charset(array(), $html, $default));
41 $this->assertEquals($default, get_charset(array(), '', $default));
42 $this->assertEquals('utf-8', get_charset(array(), ''));
43 }
44
45 /**
46 * Test headers_extract_charset() when the charset is found. 32 * Test headers_extract_charset() when the charset is found.
47 */ 33 */
48 public function testHeadersExtractExistentCharset() 34 public function testHeadersExtractExistentCharset()
49 { 35 {
50 $charset = 'x-MacCroatian'; 36 $charset = 'x-MacCroatian';
51 $headers = array('Content-Type' => 'text/html; charset='. $charset); 37 $headers = 'text/html; charset='. $charset;
52 $this->assertEquals(strtolower($charset), headers_extract_charset($headers)); 38 $this->assertEquals(strtolower($charset), header_extract_charset($headers));
53 } 39 }
54 40
55 /** 41 /**
@@ -57,11 +43,11 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase
57 */ 43 */
58 public function testHeadersExtractNonExistentCharset() 44 public function testHeadersExtractNonExistentCharset()
59 { 45 {
60 $headers = array(); 46 $headers = '';
61 $this->assertFalse(headers_extract_charset($headers)); 47 $this->assertFalse(header_extract_charset($headers));
62 48
63 $headers = array('Content-Type' => 'text/html'); 49 $headers = 'text/html';
64 $this->assertFalse(headers_extract_charset($headers)); 50 $this->assertFalse(header_extract_charset($headers));
65 } 51 }
66 52
67 /** 53 /**
@@ -86,6 +72,131 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase
86 } 72 }
87 73
88 /** 74 /**
75 * Test the download callback with valid value
76 */
77 public function testCurlDownloadCallbackOk()
78 {
79 $callback = get_curl_download_callback($charset, $title, 'ut_curl_getinfo_ok');
80 $data = [
81 'HTTP/1.1 200 OK',
82 'Server: GitHub.com',
83 'Date: Sat, 28 Oct 2017 12:01:33 GMT',
84 'Content-Type: text/html; charset=utf-8',
85 'Status: 200 OK',
86 'end' => 'th=device-width"><title>Refactoring · GitHub</title><link rel="search" type="application/opensea',
87 '<title>ignored</title>',
88 ];
89 foreach ($data as $key => $line) {
90 $ignore = null;
91 $expected = $key !== 'end' ? strlen($line) : false;
92 $this->assertEquals($expected, $callback($ignore, $line));
93 if ($expected === false) {
94 break;
95 }
96 }
97 $this->assertEquals('utf-8', $charset);
98 $this->assertEquals('Refactoring · GitHub', $title);
99 }
100
101 /**
102 * Test the download callback with valid values and no charset
103 */
104 public function testCurlDownloadCallbackOkNoCharset()
105 {
106 $callback = get_curl_download_callback($charset, $title, 'ut_curl_getinfo_no_charset');
107 $data = [
108 'HTTP/1.1 200 OK',
109 'end' => 'th=device-width"><title>Refactoring · GitHub</title><link rel="search" type="application/opensea',
110 '<title>ignored</title>',
111 ];
112 foreach ($data as $key => $line) {
113 $ignore = null;
114 $this->assertEquals(strlen($line), $callback($ignore, $line));
115 }
116 $this->assertEmpty($charset);
117 $this->assertEquals('Refactoring · GitHub', $title);
118 }
119
120 /**
121 * Test the download callback with valid values and no charset
122 */
123 public function testCurlDownloadCallbackOkHtmlCharset()
124 {
125 $callback = get_curl_download_callback($charset, $title, 'ut_curl_getinfo_no_charset');
126 $data = [
127 'HTTP/1.1 200 OK',
128 '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />',
129 'end' => 'th=device-width"><title>Refactoring · GitHub</title><link rel="search" type="application/opensea',
130 '<title>ignored</title>',
131 ];
132 foreach ($data as $key => $line) {
133 $ignore = null;
134 $expected = $key !== 'end' ? strlen($line) : false;
135 $this->assertEquals($expected, $callback($ignore, $line));
136 if ($expected === false) {
137 break;
138 }
139 }
140 $this->assertEquals('utf-8', $charset);
141 $this->assertEquals('Refactoring · GitHub', $title);
142 }
143
144 /**
145 * Test the download callback with valid values and no title
146 */
147 public function testCurlDownloadCallbackOkNoTitle()
148 {
149 $callback = get_curl_download_callback($charset, $title, 'ut_curl_getinfo_ok');
150 $data = [
151 'HTTP/1.1 200 OK',
152 'end' => 'th=device-width">Refactoring · GitHub<link rel="search" type="application/opensea',
153 'ignored',
154 ];
155 foreach ($data as $key => $line) {
156 $ignore = null;
157 $this->assertEquals(strlen($line), $callback($ignore, $line));
158 }
159 $this->assertEquals('utf-8', $charset);
160 $this->assertEmpty($title);
161 }
162
163 /**
164 * Test the download callback with an invalid content type.
165 */
166 public function testCurlDownloadCallbackInvalidContentType()
167 {
168 $callback = get_curl_download_callback($charset, $title, 'ut_curl_getinfo_ct_ko');
169 $ignore = null;
170 $this->assertFalse($callback($ignore, ''));
171 $this->assertEmpty($charset);
172 $this->assertEmpty($title);
173 }
174
175 /**
176 * Test the download callback with an invalid response code.
177 */
178 public function testCurlDownloadCallbackInvalidResponseCode()
179 {
180 $callback = get_curl_download_callback($charset, $title, 'ut_curl_getinfo_rc_ko');
181 $ignore = null;
182 $this->assertFalse($callback($ignore, ''));
183 $this->assertEmpty($charset);
184 $this->assertEmpty($title);
185 }
186
187 /**
188 * Test the download callback with an invalid content type and response code.
189 */
190 public function testCurlDownloadCallbackInvalidContentTypeAndResponseCode()
191 {
192 $callback = get_curl_download_callback($charset, $title, 'ut_curl_getinfo_rs_ct_ko');
193 $ignore = null;
194 $this->assertFalse($callback($ignore, ''));
195 $this->assertEmpty($charset);
196 $this->assertEmpty($title);
197 }
198
199 /**
89 * Test count_private. 200 * Test count_private.
90 */ 201 */
91 public function testCountPrivateLinks() 202 public function testCountPrivateLinks()
@@ -103,6 +214,16 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase
103 $expectedText = 'stuff <a href="http://hello.there/is=someone#here">http://hello.there/is=someone#here</a> otherstuff'; 214 $expectedText = 'stuff <a href="http://hello.there/is=someone#here">http://hello.there/is=someone#here</a> otherstuff';
104 $processedText = text2clickable($text, ''); 215 $processedText = text2clickable($text, '');
105 $this->assertEquals($expectedText, $processedText); 216 $this->assertEquals($expectedText, $processedText);
217
218 $text = 'stuff http://hello.there/is=someone#here(please) otherstuff';
219 $expectedText = 'stuff <a href="http://hello.there/is=someone#here(please)">http://hello.there/is=someone#here(please)</a> otherstuff';
220 $processedText = text2clickable($text, '');
221 $this->assertEquals($expectedText, $processedText);
222
223 $text = 'stuff http://hello.there/is=someone#here(please)&no otherstuff';
224 $expectedText = 'stuff <a href="http://hello.there/is=someone#here(please)&no">http://hello.there/is=someone#here(please)&no</a> otherstuff';
225 $processedText = text2clickable($text, '');
226 $this->assertEquals($expectedText, $processedText);
106 } 227 }
107 228
108 /** 229 /**
@@ -121,6 +242,21 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase
121 } 242 }
122 243
123 /** 244 /**
245 * Test text2clickable a redirector set and without URL encode.
246 */
247 public function testText2clickableWithRedirectorDontEncode()
248 {
249 $text = 'stuff http://hello.there/?is=someone&or=something#here otherstuff';
250 $redirector = 'http://redirector.to';
251 $expectedText = 'stuff <a href="'.
252 $redirector .
253 'http://hello.there/?is=someone&or=something#here' .
254 '">http://hello.there/?is=someone&or=something#here</a> otherstuff';
255 $processedText = text2clickable($text, $redirector, false);
256 $this->assertEquals($expectedText, $processedText);
257 }
258
259 /**
124 * Test testSpace2nbsp. 260 * Test testSpace2nbsp.
125 */ 261 */
126 public function testSpace2nbsp() 262 public function testSpace2nbsp()
@@ -182,3 +318,96 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase
182 return str_replace('$1', $hashtag, $hashtagLink); 318 return str_replace('$1', $hashtag, $hashtagLink);
183 } 319 }
184} 320}
321
322// old style mock: PHPUnit doesn't allow function mock
323
324/**
325 * Returns code 200 or html content type.
326 *
327 * @param resource $ch cURL resource
328 * @param int $type cURL info type
329 *
330 * @return int|string 200 or 'text/html'
331 */
332function ut_curl_getinfo_ok($ch, $type)
333{
334 switch ($type) {
335 case CURLINFO_RESPONSE_CODE:
336 return 200;
337 case CURLINFO_CONTENT_TYPE:
338 return 'text/html; charset=utf-8';
339 }
340}
341
342/**
343 * Returns code 200 or html content type without charset.
344 *
345 * @param resource $ch cURL resource
346 * @param int $type cURL info type
347 *
348 * @return int|string 200 or 'text/html'
349 */
350function ut_curl_getinfo_no_charset($ch, $type)
351{
352 switch ($type) {
353 case CURLINFO_RESPONSE_CODE:
354 return 200;
355 case CURLINFO_CONTENT_TYPE:
356 return 'text/html';
357 }
358}
359
360/**
361 * Invalid response code.
362 *
363 * @param resource $ch cURL resource
364 * @param int $type cURL info type
365 *
366 * @return int|string 404 or 'text/html'
367 */
368function ut_curl_getinfo_rc_ko($ch, $type)
369{
370 switch ($type) {
371 case CURLINFO_RESPONSE_CODE:
372 return 404;
373 case CURLINFO_CONTENT_TYPE:
374 return 'text/html; charset=utf-8';
375 }
376}
377
378/**
379 * Invalid content type.
380 *
381 * @param resource $ch cURL resource
382 * @param int $type cURL info type
383 *
384 * @return int|string 200 or 'text/plain'
385 */
386function ut_curl_getinfo_ct_ko($ch, $type)
387{
388 switch ($type) {
389 case CURLINFO_RESPONSE_CODE:
390 return 200;
391 case CURLINFO_CONTENT_TYPE:
392 return 'text/plain';
393 }
394}
395
396/**
397 * Invalid response code and content type.
398 *
399 * @param resource $ch cURL resource
400 * @param int $type cURL info type
401 *
402 * @return int|string 404 or 'text/plain'
403 */
404function ut_curl_getinfo_rs_ct_ko($ch, $type)
405{
406 switch ($type) {
407 case CURLINFO_RESPONSE_CODE:
408 return 404;
409 case CURLINFO_CONTENT_TYPE:
410 return 'text/plain';
411 }
412}
413
diff --git a/tests/NetscapeBookmarkUtils/BookmarkImportTest.php b/tests/NetscapeBookmarkUtils/BookmarkImportTest.php
index 0ca07eac..4961aa2c 100644
--- a/tests/NetscapeBookmarkUtils/BookmarkImportTest.php
+++ b/tests/NetscapeBookmarkUtils/BookmarkImportTest.php
@@ -2,6 +2,7 @@
2 2
3require_once 'application/NetscapeBookmarkUtils.php'; 3require_once 'application/NetscapeBookmarkUtils.php';
4 4
5use Shaarli\Config\ConfigManager;
5 6
6/** 7/**
7 * Utility function to load a file's metadata in a $_FILES-like array 8 * Utility function to load a file's metadata in a $_FILES-like array
@@ -33,6 +34,11 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
33 protected static $testDatastore = 'sandbox/datastore.php'; 34 protected static $testDatastore = 'sandbox/datastore.php';
34 35
35 /** 36 /**
37 * @var string History file path
38 */
39 protected static $historyFilePath = 'sandbox/history.php';
40
41 /**
36 * @var LinkDB private LinkDB instance 42 * @var LinkDB private LinkDB instance
37 */ 43 */
38 protected $linkDb = null; 44 protected $linkDb = null;
@@ -43,6 +49,16 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
43 protected $pagecache = 'tests'; 49 protected $pagecache = 'tests';
44 50
45 /** 51 /**
52 * @var ConfigManager instance.
53 */
54 protected $conf;
55
56 /**
57 * @var History instance.
58 */
59 protected $history;
60
61 /**
46 * @var string Save the current timezone. 62 * @var string Save the current timezone.
47 */ 63 */
48 protected static $defaultTimeZone; 64 protected static $defaultTimeZone;
@@ -65,6 +81,17 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
65 // start with an empty datastore 81 // start with an empty datastore
66 file_put_contents(self::$testDatastore, '<?php /* S7QysKquBQA= */ ?>'); 82 file_put_contents(self::$testDatastore, '<?php /* S7QysKquBQA= */ ?>');
67 $this->linkDb = new LinkDB(self::$testDatastore, true, false); 83 $this->linkDb = new LinkDB(self::$testDatastore, true, false);
84 $this->conf = new ConfigManager('tests/utils/config/configJson');
85 $this->conf->set('resource.page_cache', $this->pagecache);
86 $this->history = new History(self::$historyFilePath);
87 }
88
89 /**
90 * Delete history file.
91 */
92 public function tearDown()
93 {
94 @unlink(self::$historyFilePath);
68 } 95 }
69 96
70 public static function tearDownAfterClass() 97 public static function tearDownAfterClass()
@@ -81,7 +108,7 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
81 $this->assertEquals( 108 $this->assertEquals(
82 'File empty.htm (0 bytes) has an unknown file format.' 109 'File empty.htm (0 bytes) has an unknown file format.'
83 .' Nothing was imported.', 110 .' Nothing was imported.',
84 NetscapeBookmarkUtils::import(NULL, $files, NULL, NULL) 111 NetscapeBookmarkUtils::import(null, $files, null, $this->conf, $this->history)
85 ); 112 );
86 $this->assertEquals(0, count($this->linkDb)); 113 $this->assertEquals(0, count($this->linkDb));
87 } 114 }
@@ -94,7 +121,7 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
94 $files = file2array('no_doctype.htm'); 121 $files = file2array('no_doctype.htm');
95 $this->assertEquals( 122 $this->assertEquals(
96 'File no_doctype.htm (350 bytes) has an unknown file format. Nothing was imported.', 123 'File no_doctype.htm (350 bytes) has an unknown file format. Nothing was imported.',
97 NetscapeBookmarkUtils::import(NULL, $files, NULL, NULL) 124 NetscapeBookmarkUtils::import(null, $files, null, $this->conf, $this->history)
98 ); 125 );
99 $this->assertEquals(0, count($this->linkDb)); 126 $this->assertEquals(0, count($this->linkDb));
100 } 127 }
@@ -105,10 +132,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
105 public function testImportInternetExplorerEncoding() 132 public function testImportInternetExplorerEncoding()
106 { 133 {
107 $files = file2array('internet_explorer_encoding.htm'); 134 $files = file2array('internet_explorer_encoding.htm');
108 $this->assertEquals( 135 $this->assertStringMatchesFormat(
109 'File internet_explorer_encoding.htm (356 bytes) was successfully processed:' 136 'File internet_explorer_encoding.htm (356 bytes) was successfully processed in %d seconds:'
110 .' 1 links imported, 0 links overwritten, 0 links skipped.', 137 .' 1 links imported, 0 links overwritten, 0 links skipped.',
111 NetscapeBookmarkUtils::import(array(), $files, $this->linkDb, $this->pagecache) 138 NetscapeBookmarkUtils::import([], $files, $this->linkDb, $this->conf, $this->history)
112 ); 139 );
113 $this->assertEquals(1, count($this->linkDb)); 140 $this->assertEquals(1, count($this->linkDb));
114 $this->assertEquals(0, count_private($this->linkDb)); 141 $this->assertEquals(0, count_private($this->linkDb));
@@ -134,10 +161,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
134 public function testImportNested() 161 public function testImportNested()
135 { 162 {
136 $files = file2array('netscape_nested.htm'); 163 $files = file2array('netscape_nested.htm');
137 $this->assertEquals( 164 $this->assertStringMatchesFormat(
138 'File netscape_nested.htm (1337 bytes) was successfully processed:' 165 'File netscape_nested.htm (1337 bytes) was successfully processed in %d seconds:'
139 .' 8 links imported, 0 links overwritten, 0 links skipped.', 166 .' 8 links imported, 0 links overwritten, 0 links skipped.',
140 NetscapeBookmarkUtils::import(array(), $files, $this->linkDb, $this->pagecache) 167 NetscapeBookmarkUtils::import([], $files, $this->linkDb, $this->conf, $this->history)
141 ); 168 );
142 $this->assertEquals(8, count($this->linkDb)); 169 $this->assertEquals(8, count($this->linkDb));
143 $this->assertEquals(2, count_private($this->linkDb)); 170 $this->assertEquals(2, count_private($this->linkDb));
@@ -256,10 +283,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
256 public function testImportDefaultPrivacyNoPost() 283 public function testImportDefaultPrivacyNoPost()
257 { 284 {
258 $files = file2array('netscape_basic.htm'); 285 $files = file2array('netscape_basic.htm');
259 $this->assertEquals( 286 $this->assertStringMatchesFormat(
260 'File netscape_basic.htm (482 bytes) was successfully processed:' 287 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
261 .' 2 links imported, 0 links overwritten, 0 links skipped.', 288 .' 2 links imported, 0 links overwritten, 0 links skipped.',
262 NetscapeBookmarkUtils::import(array(), $files, $this->linkDb, $this->pagecache) 289 NetscapeBookmarkUtils::import([], $files, $this->linkDb, $this->conf, $this->history)
263 ); 290 );
264 291
265 $this->assertEquals(2, count($this->linkDb)); 292 $this->assertEquals(2, count($this->linkDb));
@@ -301,10 +328,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
301 { 328 {
302 $post = array('privacy' => 'default'); 329 $post = array('privacy' => 'default');
303 $files = file2array('netscape_basic.htm'); 330 $files = file2array('netscape_basic.htm');
304 $this->assertEquals( 331 $this->assertStringMatchesFormat(
305 'File netscape_basic.htm (482 bytes) was successfully processed:' 332 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
306 .' 2 links imported, 0 links overwritten, 0 links skipped.', 333 .' 2 links imported, 0 links overwritten, 0 links skipped.',
307 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->pagecache) 334 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history)
308 ); 335 );
309 $this->assertEquals(2, count($this->linkDb)); 336 $this->assertEquals(2, count($this->linkDb));
310 $this->assertEquals(1, count_private($this->linkDb)); 337 $this->assertEquals(1, count_private($this->linkDb));
@@ -345,10 +372,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
345 { 372 {
346 $post = array('privacy' => 'public'); 373 $post = array('privacy' => 'public');
347 $files = file2array('netscape_basic.htm'); 374 $files = file2array('netscape_basic.htm');
348 $this->assertEquals( 375 $this->assertStringMatchesFormat(
349 'File netscape_basic.htm (482 bytes) was successfully processed:' 376 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
350 .' 2 links imported, 0 links overwritten, 0 links skipped.', 377 .' 2 links imported, 0 links overwritten, 0 links skipped.',
351 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->pagecache) 378 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history)
352 ); 379 );
353 $this->assertEquals(2, count($this->linkDb)); 380 $this->assertEquals(2, count($this->linkDb));
354 $this->assertEquals(0, count_private($this->linkDb)); 381 $this->assertEquals(0, count_private($this->linkDb));
@@ -369,10 +396,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
369 { 396 {
370 $post = array('privacy' => 'private'); 397 $post = array('privacy' => 'private');
371 $files = file2array('netscape_basic.htm'); 398 $files = file2array('netscape_basic.htm');
372 $this->assertEquals( 399 $this->assertStringMatchesFormat(
373 'File netscape_basic.htm (482 bytes) was successfully processed:' 400 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
374 .' 2 links imported, 0 links overwritten, 0 links skipped.', 401 .' 2 links imported, 0 links overwritten, 0 links skipped.',
375 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->pagecache) 402 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history)
376 ); 403 );
377 $this->assertEquals(2, count($this->linkDb)); 404 $this->assertEquals(2, count($this->linkDb));
378 $this->assertEquals(2, count_private($this->linkDb)); 405 $this->assertEquals(2, count_private($this->linkDb));
@@ -395,10 +422,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
395 422
396 // import links as private 423 // import links as private
397 $post = array('privacy' => 'private'); 424 $post = array('privacy' => 'private');
398 $this->assertEquals( 425 $this->assertStringMatchesFormat(
399 'File netscape_basic.htm (482 bytes) was successfully processed:' 426 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
400 .' 2 links imported, 0 links overwritten, 0 links skipped.', 427 .' 2 links imported, 0 links overwritten, 0 links skipped.',
401 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->pagecache) 428 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history)
402 ); 429 );
403 $this->assertEquals(2, count($this->linkDb)); 430 $this->assertEquals(2, count($this->linkDb));
404 $this->assertEquals(2, count_private($this->linkDb)); 431 $this->assertEquals(2, count_private($this->linkDb));
@@ -415,10 +442,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
415 'privacy' => 'public', 442 'privacy' => 'public',
416 'overwrite' => 'true' 443 'overwrite' => 'true'
417 ); 444 );
418 $this->assertEquals( 445 $this->assertStringMatchesFormat(
419 'File netscape_basic.htm (482 bytes) was successfully processed:' 446 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
420 .' 2 links imported, 2 links overwritten, 0 links skipped.', 447 .' 2 links imported, 2 links overwritten, 0 links skipped.',
421 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->pagecache) 448 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history)
422 ); 449 );
423 $this->assertEquals(2, count($this->linkDb)); 450 $this->assertEquals(2, count($this->linkDb));
424 $this->assertEquals(0, count_private($this->linkDb)); 451 $this->assertEquals(0, count_private($this->linkDb));
@@ -441,10 +468,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
441 468
442 // import links as public 469 // import links as public
443 $post = array('privacy' => 'public'); 470 $post = array('privacy' => 'public');
444 $this->assertEquals( 471 $this->assertStringMatchesFormat(
445 'File netscape_basic.htm (482 bytes) was successfully processed:' 472 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
446 .' 2 links imported, 0 links overwritten, 0 links skipped.', 473 .' 2 links imported, 0 links overwritten, 0 links skipped.',
447 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->pagecache) 474 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history)
448 ); 475 );
449 $this->assertEquals(2, count($this->linkDb)); 476 $this->assertEquals(2, count($this->linkDb));
450 $this->assertEquals(0, count_private($this->linkDb)); 477 $this->assertEquals(0, count_private($this->linkDb));
@@ -462,10 +489,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
462 'privacy' => 'private', 489 'privacy' => 'private',
463 'overwrite' => 'true' 490 'overwrite' => 'true'
464 ); 491 );
465 $this->assertEquals( 492 $this->assertStringMatchesFormat(
466 'File netscape_basic.htm (482 bytes) was successfully processed:' 493 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
467 .' 2 links imported, 2 links overwritten, 0 links skipped.', 494 .' 2 links imported, 2 links overwritten, 0 links skipped.',
468 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->pagecache) 495 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history)
469 ); 496 );
470 $this->assertEquals(2, count($this->linkDb)); 497 $this->assertEquals(2, count($this->linkDb));
471 $this->assertEquals(2, count_private($this->linkDb)); 498 $this->assertEquals(2, count_private($this->linkDb));
@@ -486,20 +513,20 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
486 { 513 {
487 $post = array('privacy' => 'public'); 514 $post = array('privacy' => 'public');
488 $files = file2array('netscape_basic.htm'); 515 $files = file2array('netscape_basic.htm');
489 $this->assertEquals( 516 $this->assertStringMatchesFormat(
490 'File netscape_basic.htm (482 bytes) was successfully processed:' 517 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
491 .' 2 links imported, 0 links overwritten, 0 links skipped.', 518 .' 2 links imported, 0 links overwritten, 0 links skipped.',
492 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->pagecache) 519 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history)
493 ); 520 );
494 $this->assertEquals(2, count($this->linkDb)); 521 $this->assertEquals(2, count($this->linkDb));
495 $this->assertEquals(0, count_private($this->linkDb)); 522 $this->assertEquals(0, count_private($this->linkDb));
496 523
497 // re-import as private, DO NOT enable overwriting 524 // re-import as private, DO NOT enable overwriting
498 $post = array('privacy' => 'private'); 525 $post = array('privacy' => 'private');
499 $this->assertEquals( 526 $this->assertStringMatchesFormat(
500 'File netscape_basic.htm (482 bytes) was successfully processed:' 527 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
501 .' 0 links imported, 0 links overwritten, 2 links skipped.', 528 .' 0 links imported, 0 links overwritten, 2 links skipped.',
502 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->pagecache) 529 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history)
503 ); 530 );
504 $this->assertEquals(2, count($this->linkDb)); 531 $this->assertEquals(2, count($this->linkDb));
505 $this->assertEquals(0, count_private($this->linkDb)); 532 $this->assertEquals(0, count_private($this->linkDb));
@@ -515,10 +542,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
515 'default_tags' => 'tag1,tag2 tag3' 542 'default_tags' => 'tag1,tag2 tag3'
516 ); 543 );
517 $files = file2array('netscape_basic.htm'); 544 $files = file2array('netscape_basic.htm');
518 $this->assertEquals( 545 $this->assertStringMatchesFormat(
519 'File netscape_basic.htm (482 bytes) was successfully processed:' 546 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
520 .' 2 links imported, 0 links overwritten, 0 links skipped.', 547 .' 2 links imported, 0 links overwritten, 0 links skipped.',
521 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->pagecache) 548 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history)
522 ); 549 );
523 $this->assertEquals(2, count($this->linkDb)); 550 $this->assertEquals(2, count($this->linkDb));
524 $this->assertEquals(0, count_private($this->linkDb)); 551 $this->assertEquals(0, count_private($this->linkDb));
@@ -542,10 +569,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
542 'default_tags' => 'tag1&,tag2 "tag3"' 569 'default_tags' => 'tag1&,tag2 "tag3"'
543 ); 570 );
544 $files = file2array('netscape_basic.htm'); 571 $files = file2array('netscape_basic.htm');
545 $this->assertEquals( 572 $this->assertStringMatchesFormat(
546 'File netscape_basic.htm (482 bytes) was successfully processed:' 573 'File netscape_basic.htm (482 bytes) was successfully processed in %d seconds:'
547 .' 2 links imported, 0 links overwritten, 0 links skipped.', 574 .' 2 links imported, 0 links overwritten, 0 links skipped.',
548 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->pagecache) 575 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history)
549 ); 576 );
550 $this->assertEquals(2, count($this->linkDb)); 577 $this->assertEquals(2, count($this->linkDb));
551 $this->assertEquals(0, count_private($this->linkDb)); 578 $this->assertEquals(0, count_private($this->linkDb));
@@ -567,10 +594,10 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
567 public function testImportSameDate() 594 public function testImportSameDate()
568 { 595 {
569 $files = file2array('same_date.htm'); 596 $files = file2array('same_date.htm');
570 $this->assertEquals( 597 $this->assertStringMatchesFormat(
571 'File same_date.htm (453 bytes) was successfully processed:' 598 'File same_date.htm (453 bytes) was successfully processed in %d seconds:'
572 .' 3 links imported, 0 links overwritten, 0 links skipped.', 599 .' 3 links imported, 0 links overwritten, 0 links skipped.',
573 NetscapeBookmarkUtils::import(array(), $files, $this->linkDb, $this->pagecache) 600 NetscapeBookmarkUtils::import(array(), $files, $this->linkDb, $this->conf, $this->history)
574 ); 601 );
575 $this->assertEquals(3, count($this->linkDb)); 602 $this->assertEquals(3, count($this->linkDb));
576 $this->assertEquals(0, count_private($this->linkDb)); 603 $this->assertEquals(0, count_private($this->linkDb));
@@ -587,4 +614,27 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
587 $this->linkDb[2]['id'] 614 $this->linkDb[2]['id']
588 ); 615 );
589 } 616 }
617
618 public function testImportCreateUpdateHistory()
619 {
620 $post = [
621 'privacy' => 'public',
622 'overwrite' => 'true',
623 ];
624 $files = file2array('netscape_basic.htm');
625 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history);
626 $history = $this->history->getHistory();
627 $this->assertEquals(1, count($history));
628 $this->assertEquals(History::IMPORT, $history[0]['event']);
629 $this->assertTrue(new DateTime('-5 seconds') < $history[0]['datetime']);
630
631 // re-import as private, enable overwriting
632 NetscapeBookmarkUtils::import($post, $files, $this->linkDb, $this->conf, $this->history);
633 $history = $this->history->getHistory();
634 $this->assertEquals(2, count($history));
635 $this->assertEquals(History::IMPORT, $history[0]['event']);
636 $this->assertTrue(new DateTime('-5 seconds') < $history[0]['datetime']);
637 $this->assertEquals(History::IMPORT, $history[1]['event']);
638 $this->assertTrue(new DateTime('-5 seconds') < $history[1]['datetime']);
639 }
590} 640}
diff --git a/tests/PluginManagerTest.php b/tests/PluginManagerTest.php
index ddf48185..01de959c 100644
--- a/tests/PluginManagerTest.php
+++ b/tests/PluginManagerTest.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2use Shaarli\Config\ConfigManager;
2 3
3/** 4/**
4 * Plugin Manager tests 5 * Plugin Manager tests
diff --git a/tests/SessionManagerTest.php b/tests/SessionManagerTest.php
new file mode 100644
index 00000000..aa75962a
--- /dev/null
+++ b/tests/SessionManagerTest.php
@@ -0,0 +1,149 @@
1<?php
2require_once 'tests/utils/FakeConfigManager.php';
3
4// Initialize reference data _before_ PHPUnit starts a session
5require_once 'tests/utils/ReferenceSessionIdHashes.php';
6ReferenceSessionIdHashes::genAllHashes();
7
8use \Shaarli\SessionManager;
9use \PHPUnit\Framework\TestCase;
10
11
12/**
13 * Test coverage for SessionManager
14 */
15class SessionManagerTest extends TestCase
16{
17 // Session ID hashes
18 protected static $sidHashes = null;
19
20 // Fake ConfigManager
21 protected static $conf = null;
22
23 /**
24 * Assign reference data
25 */
26 public static function setUpBeforeClass()
27 {
28 self::$sidHashes = ReferenceSessionIdHashes::getHashes();
29 self::$conf = new FakeConfigManager();
30 }
31
32 /**
33 * Generate a session token
34 */
35 public function testGenerateToken()
36 {
37 $session = [];
38 $sessionManager = new SessionManager($session, self::$conf);
39
40 $token = $sessionManager->generateToken();
41
42 $this->assertEquals(1, $session['tokens'][$token]);
43 $this->assertEquals(40, strlen($token));
44 }
45
46 /**
47 * Check a session token
48 */
49 public function testCheckToken()
50 {
51 $token = '4dccc3a45ad9d03e5542b90c37d8db6d10f2b38b';
52 $session = [
53 'tokens' => [
54 $token => 1,
55 ],
56 ];
57 $sessionManager = new SessionManager($session, self::$conf);
58
59 // check and destroy the token
60 $this->assertTrue($sessionManager->checkToken($token));
61 $this->assertFalse(isset($session['tokens'][$token]));
62
63 // ensure the token has been destroyed
64 $this->assertFalse($sessionManager->checkToken($token));
65 }
66
67 /**
68 * Generate and check a session token
69 */
70 public function testGenerateAndCheckToken()
71 {
72 $session = [];
73 $sessionManager = new SessionManager($session, self::$conf);
74
75 $token = $sessionManager->generateToken();
76
77 // ensure a token has been generated
78 $this->assertEquals(1, $session['tokens'][$token]);
79 $this->assertEquals(40, strlen($token));
80
81 // check and destroy the token
82 $this->assertTrue($sessionManager->checkToken($token));
83 $this->assertFalse(isset($session['tokens'][$token]));
84
85 // ensure the token has been destroyed
86 $this->assertFalse($sessionManager->checkToken($token));
87 }
88
89 /**
90 * Check an invalid session token
91 */
92 public function testCheckInvalidToken()
93 {
94 $session = [];
95 $sessionManager = new SessionManager($session, self::$conf);
96
97 $this->assertFalse($sessionManager->checkToken('4dccc3a45ad9d03e5542b90c37d8db6d10f2b38b'));
98 }
99
100 /**
101 * Test SessionManager::checkId with a valid ID - TEST ALL THE HASHES!
102 *
103 * This tests extensively covers all hash algorithms / bit representations
104 */
105 public function testIsAnyHashSessionIdValid()
106 {
107 foreach (self::$sidHashes as $algo => $bpcs) {
108 foreach ($bpcs as $bpc => $hash) {
109 $this->assertTrue(SessionManager::checkId($hash));
110 }
111 }
112 }
113
114 /**
115 * Test checkId with a valid ID - SHA-1 hashes
116 */
117 public function testIsSha1SessionIdValid()
118 {
119 $this->assertTrue(SessionManager::checkId(sha1('shaarli')));
120 }
121
122 /**
123 * Test checkId with a valid ID - SHA-256 hashes
124 */
125 public function testIsSha256SessionIdValid()
126 {
127 $this->assertTrue(SessionManager::checkId(hash('sha256', 'shaarli')));
128 }
129
130 /**
131 * Test checkId with a valid ID - SHA-512 hashes
132 */
133 public function testIsSha512SessionIdValid()
134 {
135 $this->assertTrue(SessionManager::checkId(hash('sha512', 'shaarli')));
136 }
137
138 /**
139 * Test checkId with invalid IDs.
140 */
141 public function testIsSessionIdInvalid()
142 {
143 $this->assertFalse(SessionManager::checkId(''));
144 $this->assertFalse(SessionManager::checkId([]));
145 $this->assertFalse(
146 SessionManager::checkId('c0ZqcWF3VFE2NmJBdm1HMVQ0ZHJ3UmZPbTFsNGhkNHI=')
147 );
148 }
149}
diff --git a/tests/ThemeUtilsTest.php b/tests/ThemeUtilsTest.php
new file mode 100644
index 00000000..e44564be
--- /dev/null
+++ b/tests/ThemeUtilsTest.php
@@ -0,0 +1,55 @@
1<?php
2
3namespace Shaarli;
4
5/**
6 * Class ThemeUtilsTest
7 *
8 * @package Shaarli
9 */
10class ThemeUtilsTest extends \PHPUnit_Framework_TestCase
11{
12 /**
13 * Test getThemes() with existing theme directories.
14 */
15 public function testGetThemes()
16 {
17 $themes = ['theme1', 'default', 'Bl1p_- bL0p'];
18 foreach ($themes as $theme) {
19 mkdir('sandbox/tpl/'. $theme, 0755, true);
20 }
21
22 // include a file which should be ignored
23 touch('sandbox/tpl/supertheme');
24
25 $res = ThemeUtils::getThemes('sandbox/tpl/');
26 foreach ($res as $theme) {
27 $this->assertTrue(in_array($theme, $themes));
28 }
29 $this->assertFalse(in_array('supertheme', $res));
30
31 foreach ($themes as $theme) {
32 rmdir('sandbox/tpl/'. $theme);
33 }
34 unlink('sandbox/tpl/supertheme');
35 rmdir('sandbox/tpl');
36 }
37
38 /**
39 * Test getThemes() without any theme dir.
40 */
41 public function testGetThemesEmpty()
42 {
43 mkdir('sandbox/tpl/', 0755, true);
44 $this->assertEquals([], ThemeUtils::getThemes('sandbox/tpl/'));
45 rmdir('sandbox/tpl/');
46 }
47
48 /**
49 * Test getThemes() with an invalid path.
50 */
51 public function testGetThemesInvalid()
52 {
53 $this->assertEquals([], ThemeUtils::getThemes('nope'));
54 }
55}
diff --git a/tests/TimeZoneTest.php b/tests/TimeZoneTest.php
index 2976d116..127fdc19 100644
--- a/tests/TimeZoneTest.php
+++ b/tests/TimeZoneTest.php
@@ -11,24 +11,45 @@ require_once 'application/TimeZone.php';
11class TimeZoneTest extends PHPUnit_Framework_TestCase 11class TimeZoneTest extends PHPUnit_Framework_TestCase
12{ 12{
13 /** 13 /**
14 * @var array of timezones
15 */
16 protected $installedTimezones;
17
18 public function setUp()
19 {
20 $this->installedTimezones = [
21 'Antarctica/Syowa',
22 'Europe/London',
23 'Europe/Paris',
24 'UTC'
25 ];
26 }
27
28 /**
14 * Generate a timezone selection form 29 * Generate a timezone selection form
15 */ 30 */
16 public function testGenerateTimeZoneForm() 31 public function testGenerateTimeZoneForm()
17 { 32 {
18 $generated = generateTimeZoneForm(); 33 $expected = [
34 'continents' => [
35 'Antarctica',
36 'Europe',
37 'UTC',
38 'selected' => '',
39 ],
40 'cities' => [
41 ['continent' => 'Antarctica', 'city' => 'Syowa'],
42 ['continent' => 'Europe', 'city' => 'London'],
43 ['continent' => 'Europe', 'city' => 'Paris'],
44 ['continent' => 'UTC', 'city' => 'UTC'],
45 'selected' => '',
46 ]
47 ];
19 48
20 // HTML form 49 list($continents, $cities) = generateTimeZoneData($this->installedTimezones);
21 $this->assertStringStartsWith('Continent:<select', $generated[0]);
22 $this->assertContains('selected="selected"', $generated[0]);
23 $this->assertStringEndsWith('</select><br />', $generated[0]);
24 50
25 // Javascript handler 51 $this->assertEquals($expected['continents'], $continents);
26 $this->assertStringStartsWith('<script>', $generated[1]); 52 $this->assertEquals($expected['cities'], $cities);
27 $this->assertContains(
28 '<option value=\"Bermuda\">Bermuda<\/option>',
29 $generated[1]
30 );
31 $this->assertStringEndsWith('</script>', $generated[1]);
32 } 53 }
33 54
34 /** 55 /**
@@ -36,28 +57,26 @@ class TimeZoneTest extends PHPUnit_Framework_TestCase
36 */ 57 */
37 public function testGenerateTimeZoneFormPreselected() 58 public function testGenerateTimeZoneFormPreselected()
38 { 59 {
39 $generated = generateTimeZoneForm('Antarctica/Syowa'); 60 $expected = [
40 61 'continents' => [
41 // HTML form 62 'Antarctica',
42 $this->assertStringStartsWith('Continent:<select', $generated[0]); 63 'Europe',
43 $this->assertContains( 64 'UTC',
44 'value="Antarctica" selected="selected"', 65 'selected' => 'Antarctica',
45 $generated[0] 66 ],
46 ); 67 'cities' => [
47 $this->assertContains( 68 ['continent' => 'Antarctica', 'city' => 'Syowa'],
48 'value="Syowa" selected="selected"', 69 ['continent' => 'Europe', 'city' => 'London'],
49 $generated[0] 70 ['continent' => 'Europe', 'city' => 'Paris'],
50 ); 71 ['continent' => 'UTC', 'city' => 'UTC'],
51 $this->assertStringEndsWith('</select><br />', $generated[0]); 72 'selected' => 'Syowa',
73 ]
74 ];
52 75
76 list($continents, $cities) = generateTimeZoneData($this->installedTimezones, 'Antarctica/Syowa');
53 77
54 // Javascript handler 78 $this->assertEquals($expected['continents'], $continents);
55 $this->assertStringStartsWith('<script>', $generated[1]); 79 $this->assertEquals($expected['cities'], $cities);
56 $this->assertContains(
57 '<option value=\"Bermuda\">Bermuda<\/option>',
58 $generated[1]
59 );
60 $this->assertStringEndsWith('</script>', $generated[1]);
61 } 80 }
62 81
63 /** 82 /**
diff --git a/tests/Updater/UpdaterTest.php b/tests/Updater/UpdaterTest.php
index a3e8a4d2..77578528 100644
--- a/tests/Updater/UpdaterTest.php
+++ b/tests/Updater/UpdaterTest.php
@@ -1,7 +1,10 @@
1<?php 1<?php
2use Shaarli\Config\ConfigJson;
3use Shaarli\Config\ConfigManager;
4use Shaarli\Config\ConfigPhp;
2 5
3require_once 'application/config/ConfigManager.php';
4require_once 'tests/Updater/DummyUpdater.php'; 6require_once 'tests/Updater/DummyUpdater.php';
7require_once 'inc/rain.tpl.class.php';
5 8
6/** 9/**
7 * Class UpdaterTest. 10 * Class UpdaterTest.
@@ -271,7 +274,7 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
271 public function testEscapeConfig() 274 public function testEscapeConfig()
272 { 275 {
273 $sandbox = 'sandbox/config'; 276 $sandbox = 'sandbox/config';
274 copy(self::$configFile .'.json.php', $sandbox .'.json.php'); 277 copy(self::$configFile . '.json.php', $sandbox . '.json.php');
275 $this->conf = new ConfigManager($sandbox); 278 $this->conf = new ConfigManager($sandbox);
276 $title = '<script>alert("title");</script>'; 279 $title = '<script>alert("title");</script>';
277 $headerLink = '<script>alert("header_link");</script>'; 280 $headerLink = '<script>alert("header_link");</script>';
@@ -286,7 +289,43 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
286 $this->assertEquals(escape($title), $this->conf->get('general.title')); 289 $this->assertEquals(escape($title), $this->conf->get('general.title'));
287 $this->assertEquals(escape($headerLink), $this->conf->get('general.header_link')); 290 $this->assertEquals(escape($headerLink), $this->conf->get('general.header_link'));
288 $this->assertEquals(escape($redirectorUrl), $this->conf->get('redirector.url')); 291 $this->assertEquals(escape($redirectorUrl), $this->conf->get('redirector.url'));
289 unlink($sandbox .'.json.php'); 292 unlink($sandbox . '.json.php');
293 }
294
295 /**
296 * Test updateMethodApiSettings(): create default settings for the API (enabled + secret).
297 */
298 public function testUpdateApiSettings()
299 {
300 $confFile = 'sandbox/config';
301 copy(self::$configFile .'.json.php', $confFile .'.json.php');
302 $conf = new ConfigManager($confFile);
303 $updater = new Updater(array(), array(), $conf, true);
304
305 $this->assertFalse($conf->exists('api.enabled'));
306 $this->assertFalse($conf->exists('api.secret'));
307 $updater->updateMethodApiSettings();
308 $conf->reload();
309 $this->assertTrue($conf->get('api.enabled'));
310 $this->assertTrue($conf->exists('api.secret'));
311 unlink($confFile .'.json.php');
312 }
313
314 /**
315 * Test updateMethodApiSettings(): already set, do nothing.
316 */
317 public function testUpdateApiSettingsNothingToDo()
318 {
319 $confFile = 'sandbox/config';
320 copy(self::$configFile .'.json.php', $confFile .'.json.php');
321 $conf = new ConfigManager($confFile);
322 $conf->set('api.enabled', false);
323 $conf->set('api.secret', '');
324 $updater = new Updater(array(), array(), $conf, true);
325 $updater->updateMethodApiSettings();
326 $this->assertFalse($conf->get('api.enabled'));
327 $this->assertEmpty($conf->get('api.secret'));
328 unlink($confFile .'.json.php');
290 } 329 }
291 330
292 /** 331 /**
@@ -387,6 +426,50 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
387 } 426 }
388 427
389 /** 428 /**
429 * Test defaultTheme update with default settings: nothing to do.
430 */
431 public function testDefaultThemeWithDefaultSettings()
432 {
433 $sandbox = 'sandbox/config';
434 copy(self::$configFile . '.json.php', $sandbox . '.json.php');
435 $this->conf = new ConfigManager($sandbox);
436 $updater = new Updater([], [], $this->conf, true);
437 $this->assertTrue($updater->updateMethodDefaultTheme());
438
439 $this->assertEquals('tpl/', $this->conf->get('resource.raintpl_tpl'));
440 $this->assertEquals('default', $this->conf->get('resource.theme'));
441 $this->conf = new ConfigManager($sandbox);
442 $this->assertEquals('tpl/', $this->conf->get('resource.raintpl_tpl'));
443 $this->assertEquals('default', $this->conf->get('resource.theme'));
444 unlink($sandbox . '.json.php');
445 }
446
447 /**
448 * Test defaultTheme update with a custom theme in a subfolder
449 */
450 public function testDefaultThemeWithCustomTheme()
451 {
452 $theme = 'iamanartist';
453 $sandbox = 'sandbox/config';
454 copy(self::$configFile . '.json.php', $sandbox . '.json.php');
455 $this->conf = new ConfigManager($sandbox);
456 mkdir('sandbox/'. $theme);
457 touch('sandbox/'. $theme .'/linklist.html');
458 $this->conf->set('resource.raintpl_tpl', 'sandbox/'. $theme .'/');
459 $updater = new Updater([], [], $this->conf, true);
460 $this->assertTrue($updater->updateMethodDefaultTheme());
461
462 $this->assertEquals('sandbox', $this->conf->get('resource.raintpl_tpl'));
463 $this->assertEquals($theme, $this->conf->get('resource.theme'));
464 $this->conf = new ConfigManager($sandbox);
465 $this->assertEquals('sandbox', $this->conf->get('resource.raintpl_tpl'));
466 $this->assertEquals($theme, $this->conf->get('resource.theme'));
467 unlink($sandbox . '.json.php');
468 unlink('sandbox/'. $theme .'/linklist.html');
469 rmdir('sandbox/'. $theme);
470 }
471
472 /**
390 * Test updateMethodEscapeMarkdown with markdown plugin enabled 473 * Test updateMethodEscapeMarkdown with markdown plugin enabled
391 * => setting markdown_escape set to false. 474 * => setting markdown_escape set to false.
392 */ 475 */
@@ -396,8 +479,8 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
396 copy(self::$configFile . '.json.php', $sandboxConf . '.json.php'); 479 copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
397 $this->conf = new ConfigManager($sandboxConf); 480 $this->conf = new ConfigManager($sandboxConf);
398 481
399 $this->conf->set('general.enabled_plugins', array('markdown')); 482 $this->conf->set('general.enabled_plugins', ['markdown']);
400 $updater = new Updater(array(), array(), $this->conf, true); 483 $updater = new Updater([], [], $this->conf, true);
401 $this->assertTrue($updater->updateMethodEscapeMarkdown()); 484 $this->assertTrue($updater->updateMethodEscapeMarkdown());
402 $this->assertFalse($this->conf->get('security.markdown_escape')); 485 $this->assertFalse($this->conf->get('security.markdown_escape'));
403 486
@@ -416,8 +499,8 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
416 copy(self::$configFile . '.json.php', $sandboxConf . '.json.php'); 499 copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
417 $this->conf = new ConfigManager($sandboxConf); 500 $this->conf = new ConfigManager($sandboxConf);
418 501
419 $this->conf->set('general.enabled_plugins', array()); 502 $this->conf->set('general.enabled_plugins', []);
420 $updater = new Updater(array(), array(), $this->conf, true); 503 $updater = new Updater([], [], $this->conf, true);
421 $this->assertTrue($updater->updateMethodEscapeMarkdown()); 504 $this->assertTrue($updater->updateMethodEscapeMarkdown());
422 $this->assertTrue($this->conf->get('security.markdown_escape')); 505 $this->assertTrue($this->conf->get('security.markdown_escape'));
423 506
@@ -435,7 +518,7 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
435 copy(self::$configFile . '.json.php', $sandboxConf . '.json.php'); 518 copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
436 $this->conf = new ConfigManager($sandboxConf); 519 $this->conf = new ConfigManager($sandboxConf);
437 $this->conf->set('security.markdown_escape', true); 520 $this->conf->set('security.markdown_escape', true);
438 $updater = new Updater(array(), array(), $this->conf, true); 521 $updater = new Updater([], [], $this->conf, true);
439 $this->assertTrue($updater->updateMethodEscapeMarkdown()); 522 $this->assertTrue($updater->updateMethodEscapeMarkdown());
440 $this->assertTrue($this->conf->get('security.markdown_escape')); 523 $this->assertTrue($this->conf->get('security.markdown_escape'));
441 } 524 }
@@ -446,8 +529,94 @@ $GLOBALS[\'privateLinkByDefault\'] = true;';
446 public function testEscapeMarkdownSettingNothingToDoDisabled() 529 public function testEscapeMarkdownSettingNothingToDoDisabled()
447 { 530 {
448 $this->conf->set('security.markdown_escape', false); 531 $this->conf->set('security.markdown_escape', false);
449 $updater = new Updater(array(), array(), $this->conf, true); 532 $updater = new Updater([], [], $this->conf, true);
450 $this->assertTrue($updater->updateMethodEscapeMarkdown()); 533 $this->assertTrue($updater->updateMethodEscapeMarkdown());
451 $this->assertFalse($this->conf->get('security.markdown_escape')); 534 $this->assertFalse($this->conf->get('security.markdown_escape'));
452 } 535 }
536
537 /**
538 * Test updateMethodPiwikUrl with valid data
539 */
540 public function testUpdatePiwikUrlValid()
541 {
542 $sandboxConf = 'sandbox/config';
543 copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
544 $this->conf = new ConfigManager($sandboxConf);
545 $url = 'mypiwik.tld';
546 $this->conf->set('plugins.PIWIK_URL', $url);
547 $updater = new Updater([], [], $this->conf, true);
548 $this->assertTrue($updater->updateMethodPiwikUrl());
549 $this->assertEquals('http://'. $url, $this->conf->get('plugins.PIWIK_URL'));
550
551 // reload from file
552 $this->conf = new ConfigManager($sandboxConf);
553 $this->assertEquals('http://'. $url, $this->conf->get('plugins.PIWIK_URL'));
554 }
555
556 /**
557 * Test updateMethodPiwikUrl without setting
558 */
559 public function testUpdatePiwikUrlEmpty()
560 {
561 $updater = new Updater([], [], $this->conf, true);
562 $this->assertTrue($updater->updateMethodPiwikUrl());
563 $this->assertEmpty($this->conf->get('plugins.PIWIK_URL'));
564 }
565
566 /**
567 * Test updateMethodPiwikUrl: valid URL, nothing to do
568 */
569 public function testUpdatePiwikUrlNothingToDo()
570 {
571 $url = 'https://mypiwik.tld';
572 $this->conf->set('plugins.PIWIK_URL', $url);
573 $updater = new Updater([], [], $this->conf, true);
574 $this->assertTrue($updater->updateMethodPiwikUrl());
575 $this->assertEquals($url, $this->conf->get('plugins.PIWIK_URL'));
576 }
577
578 /**
579 * Test updateMethodAtomDefault with show_atom set to false
580 * => update to true.
581 */
582 public function testUpdateMethodAtomDefault()
583 {
584 $sandboxConf = 'sandbox/config';
585 copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
586 $this->conf = new ConfigManager($sandboxConf);
587 $this->conf->set('feed.show_atom', false);
588 $updater = new Updater([], [], $this->conf, true);
589 $this->assertTrue($updater->updateMethodAtomDefault());
590 $this->assertTrue($this->conf->get('feed.show_atom'));
591 // reload from file
592 $this->conf = new ConfigManager($sandboxConf);
593 $this->assertTrue($this->conf->get('feed.show_atom'));
594 }
595 /**
596 * Test updateMethodAtomDefault with show_atom not set.
597 * => nothing to do
598 */
599 public function testUpdateMethodAtomDefaultNoExist()
600 {
601 $sandboxConf = 'sandbox/config';
602 copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
603 $this->conf = new ConfigManager($sandboxConf);
604 $updater = new Updater([], [], $this->conf, true);
605 $this->assertTrue($updater->updateMethodAtomDefault());
606 $this->assertTrue($this->conf->get('feed.show_atom'));
607 }
608 /**
609 * Test updateMethodAtomDefault with show_atom set to true.
610 * => nothing to do
611 */
612 public function testUpdateMethodAtomDefaultAlreadyTrue()
613 {
614 $sandboxConf = 'sandbox/config';
615 copy(self::$configFile . '.json.php', $sandboxConf . '.json.php');
616 $this->conf = new ConfigManager($sandboxConf);
617 $this->conf->set('feed.show_atom', true);
618 $updater = new Updater([], [], $this->conf, true);
619 $this->assertTrue($updater->updateMethodAtomDefault());
620 $this->assertTrue($this->conf->get('feed.show_atom'));
621 }
453} 622}
diff --git a/tests/Url/CleanupUrlTest.php b/tests/Url/CleanupUrlTest.php
index ba9a0437..1407d7d2 100644
--- a/tests/Url/CleanupUrlTest.php
+++ b/tests/Url/CleanupUrlTest.php
@@ -8,7 +8,13 @@ require_once 'application/Url.php';
8class CleanupUrlTest extends PHPUnit_Framework_TestCase 8class CleanupUrlTest extends PHPUnit_Framework_TestCase
9{ 9{
10 /** 10 /**
11 * Clean empty UrlThanks for building nothing 11 * @var string reference URL
12 */
13 protected $ref = 'http://domain.tld:3000';
14
15
16 /**
17 * Clean empty URL
12 */ 18 */
13 public function testCleanupUrlEmpty() 19 public function testCleanupUrlEmpty()
14 { 20 {
@@ -16,59 +22,87 @@ class CleanupUrlTest extends PHPUnit_Framework_TestCase
16 } 22 }
17 23
18 /** 24 /**
19 * Clean an already cleaned Url 25 * Clean an already cleaned URL
20 */ 26 */
21 public function testCleanupUrlAlreadyClean() 27 public function testCleanupUrlAlreadyClean()
22 { 28 {
23 $ref = 'http://domain.tld:3000'; 29 $this->assertEquals($this->ref, cleanup_url($this->ref));
24 $this->assertEquals($ref, cleanup_url($ref)); 30 $this->ref2 = $this->ref.'/path/to/dir/';
25 $ref = $ref.'/path/to/dir/'; 31 $this->assertEquals($this->ref2, cleanup_url($this->ref2));
26 $this->assertEquals($ref, cleanup_url($ref)); 32 }
33
34 /**
35 * Clean URL fragments
36 */
37 public function testCleanupUrlFragment()
38 {
39 $this->assertEquals($this->ref, cleanup_url($this->ref.'#tk.rss_all'));
40 $this->assertEquals($this->ref, cleanup_url($this->ref.'#xtor=RSS-'));
41 $this->assertEquals($this->ref, cleanup_url($this->ref.'#xtor=RSS-U3ht0tkc4b'));
42 }
43
44 /**
45 * Clean URL query - single annoying parameter
46 */
47 public function testCleanupUrlQuerySingle()
48 {
49 $this->assertEquals($this->ref, cleanup_url($this->ref.'?action_object_map=junk'));
50 $this->assertEquals($this->ref, cleanup_url($this->ref.'?action_ref_map=Cr4p!'));
51 $this->assertEquals($this->ref, cleanup_url($this->ref.'?action_type_map=g4R84g3'));
52
53 $this->assertEquals($this->ref, cleanup_url($this->ref.'?fb_stuff=v41u3'));
54 $this->assertEquals($this->ref, cleanup_url($this->ref.'?fb=71m3w4573'));
55
56 $this->assertEquals($this->ref, cleanup_url($this->ref.'?utm_campaign=zomg'));
57 $this->assertEquals($this->ref, cleanup_url($this->ref.'?utm_medium=numnum'));
58 $this->assertEquals($this->ref, cleanup_url($this->ref.'?utm_source=c0d3'));
59 $this->assertEquals($this->ref, cleanup_url($this->ref.'?utm_term=1n4l'));
60
61 $this->assertEquals($this->ref, cleanup_url($this->ref.'?xtor=some-url'));
62
63 $this->assertEquals($this->ref, cleanup_url($this->ref.'?campaign_name=junk'));
64 $this->assertEquals($this->ref, cleanup_url($this->ref.'?campaign_start=junk'));
65 $this->assertEquals($this->ref, cleanup_url($this->ref.'?campaign_item_index=junk'));
27 } 66 }
28 67
29 /** 68 /**
30 * Clean Url needing cleaning 69 * Clean URL query - multiple annoying parameters
31 */ 70 */
32 public function testCleanupUrlNeedClean() 71 public function testCleanupUrlQueryMultiple()
33 { 72 {
34 $ref = 'http://domain.tld:3000'; 73 $this->assertEquals($this->ref, cleanup_url($this->ref.'?xtor=some-url&fb=som3th1ng'));
35 $this->assertEquals($ref, cleanup_url($ref.'#tk.rss_all')); 74
36 $this->assertEquals($ref, cleanup_url($ref.'#xtor=RSS-')); 75 $this->assertEquals($this->ref, cleanup_url(
37 $this->assertEquals($ref, cleanup_url($ref.'#xtor=RSS-U3ht0tkc4b')); 76 $this->ref.'?fb=stuff&utm_campaign=zomg&utm_medium=numnum&utm_source=c0d3'
38 $this->assertEquals($ref, cleanup_url($ref.'?action_object_map=junk'));
39 $this->assertEquals($ref, cleanup_url($ref.'?action_ref_map=Cr4p!'));
40 $this->assertEquals($ref, cleanup_url($ref.'?action_type_map=g4R84g3'));
41
42 $this->assertEquals($ref, cleanup_url($ref.'?fb_stuff=v41u3'));
43 $this->assertEquals($ref, cleanup_url($ref.'?fb=71m3w4573'));
44
45 $this->assertEquals($ref, cleanup_url($ref.'?utm_campaign=zomg'));
46 $this->assertEquals($ref, cleanup_url($ref.'?utm_medium=numnum'));
47 $this->assertEquals($ref, cleanup_url($ref.'?utm_source=c0d3'));
48 $this->assertEquals($ref, cleanup_url($ref.'?utm_term=1n4l'));
49
50 $this->assertEquals($ref, cleanup_url($ref.'?xtor=some-url'));
51 $this->assertEquals($ref, cleanup_url($ref.'?xtor=some-url&fb=som3th1ng'));
52 $this->assertEquals($ref, cleanup_url(
53 $ref.'?fb=stuff&utm_campaign=zomg&utm_medium=numnum&utm_source=c0d3'
54 )); 77 ));
55 $this->assertEquals($ref, cleanup_url( 78
56 $ref.'?xtor=some-url&fb=som3th1ng#tk.rss_all' 79 $this->assertEquals($this->ref, cleanup_url(
80 $this->ref.'?campaign_start=zomg&campaign_name=numnum'
81 ));
82 }
83
84 /**
85 * Clean URL query - multiple annoying parameters and fragment
86 */
87 public function testCleanupUrlQueryFragment()
88 {
89 $this->assertEquals($this->ref, cleanup_url(
90 $this->ref.'?xtor=some-url&fb=som3th1ng#tk.rss_all'
57 )); 91 ));
58 92
59 // ditch annoying query params and fragment, keep useful params 93 // ditch annoying query params and fragment, keep useful params
60 $this->assertEquals( 94 $this->assertEquals(
61 $ref.'?my=stuff&is=kept', 95 $this->ref.'?my=stuff&is=kept',
62 cleanup_url( 96 cleanup_url(
63 $ref.'?fb=zomg&my=stuff&utm_medium=numnum&is=kept#tk.rss_all' 97 $this->ref.'?fb=zomg&my=stuff&utm_medium=numnum&is=kept#tk.rss_all'
64 ) 98 )
65 ); 99 );
66 100
67 // ditch annoying query params, keep useful params and fragment 101 // ditch annoying query params, keep useful params and fragment
68 $this->assertEquals( 102 $this->assertEquals(
69 $ref.'?my=stuff&is=kept#again', 103 $this->ref.'?my=stuff&is=kept#again',
70 cleanup_url( 104 cleanup_url(
71 $ref.'?fb=zomg&my=stuff&utm_medium=numnum&is=kept#again' 105 $this->ref.'?fb=zomg&my=stuff&utm_medium=numnum&is=kept#again'
72 ) 106 )
73 ); 107 );
74 } 108 }
diff --git a/tests/Url/UrlTest.php b/tests/Url/UrlTest.php
index 05862372..aa2f2234 100644
--- a/tests/Url/UrlTest.php
+++ b/tests/Url/UrlTest.php
@@ -157,7 +157,7 @@ class UrlTest extends PHPUnit_Framework_TestCase
157 /** 157 /**
158 * Test add trailing slash. 158 * Test add trailing slash.
159 */ 159 */
160 function testAddTrailingSlash() 160 public function testAddTrailingSlash()
161 { 161 {
162 $strOn = 'http://randomstr.com/test/'; 162 $strOn = 'http://randomstr.com/test/';
163 $strOff = 'http://randomstr.com/test'; 163 $strOff = 'http://randomstr.com/test';
@@ -168,7 +168,7 @@ class UrlTest extends PHPUnit_Framework_TestCase
168 /** 168 /**
169 * Test valid HTTP url. 169 * Test valid HTTP url.
170 */ 170 */
171 function testUrlIsHttp() 171 public function testUrlIsHttp()
172 { 172 {
173 $url = new Url(self::$baseUrl); 173 $url = new Url(self::$baseUrl);
174 $this->assertTrue($url->isHttp()); 174 $this->assertTrue($url->isHttp());
@@ -177,7 +177,7 @@ class UrlTest extends PHPUnit_Framework_TestCase
177 /** 177 /**
178 * Test non HTTP url. 178 * Test non HTTP url.
179 */ 179 */
180 function testUrlIsNotHttp() 180 public function testUrlIsNotHttp()
181 { 181 {
182 $url = new Url('ftp://save.tld/mysave'); 182 $url = new Url('ftp://save.tld/mysave');
183 $this->assertFalse($url->isHttp()); 183 $this->assertFalse($url->isHttp());
@@ -186,7 +186,7 @@ class UrlTest extends PHPUnit_Framework_TestCase
186 /** 186 /**
187 * Test International Domain Name to ASCII conversion 187 * Test International Domain Name to ASCII conversion
188 */ 188 */
189 function testIdnToAscii() 189 public function testIdnToAscii()
190 { 190 {
191 $ind = 'http://www.académie-française.fr/'; 191 $ind = 'http://www.académie-française.fr/';
192 $expected = 'http://www.xn--acadmie-franaise-npb1a.fr/'; 192 $expected = 'http://www.xn--acadmie-franaise-npb1a.fr/';
diff --git a/tests/Url/WhitelistProtocolsTest.php b/tests/Url/WhitelistProtocolsTest.php
new file mode 100644
index 00000000..a3156804
--- /dev/null
+++ b/tests/Url/WhitelistProtocolsTest.php
@@ -0,0 +1,63 @@
1<?php
2
3require_once 'application/Url.php';
4
5use Shaarli\Config\ConfigManager;
6
7/**
8 * Class WhitelistProtocolsTest
9 *
10 * Test whitelist_protocols() function of Url.
11 */
12class WhitelistProtocolsTest extends PHPUnit_Framework_TestCase
13{
14 /**
15 * Test whitelist_protocols() on a note (relative URL).
16 */
17 public function testWhitelistProtocolsRelative()
18 {
19 $whitelist = ['ftp', 'magnet'];
20 $url = '?12443564';
21 $this->assertEquals($url, whitelist_protocols($url, $whitelist));
22 $url = '/path.jpg';
23 $this->assertEquals($url, whitelist_protocols($url, $whitelist));
24 }
25
26 /**
27 * Test whitelist_protocols() on a note (relative URL).
28 */
29 public function testWhitelistProtocolMissing()
30 {
31 $whitelist = ['ftp', 'magnet'];
32 $url = 'test.tld/path/?query=value#hash';
33 $this->assertEquals('http://'. $url, whitelist_protocols($url, $whitelist));
34 }
35
36 /**
37 * Test whitelist_protocols() with allowed protocols.
38 */
39 public function testWhitelistAllowedProtocol()
40 {
41 $whitelist = ['ftp', 'magnet'];
42 $url = 'http://test.tld/path/?query=value#hash';
43 $this->assertEquals($url, whitelist_protocols($url, $whitelist));
44 $url = 'https://test.tld/path/?query=value#hash';
45 $this->assertEquals($url, whitelist_protocols($url, $whitelist));
46 $url = 'ftp://test.tld/path/?query=value#hash';
47 $this->assertEquals($url, whitelist_protocols($url, $whitelist));
48 $url = 'magnet:test.tld/path/?query=value#hash';
49 $this->assertEquals($url, whitelist_protocols($url, $whitelist));
50 }
51
52 /**
53 * Test whitelist_protocols() with allowed protocols.
54 */
55 public function testWhitelistDisallowedProtocol()
56 {
57 $whitelist = ['ftp', 'magnet'];
58 $url = 'javascript:alert("xss");';
59 $this->assertEquals('http://alert("xss");', whitelist_protocols($url, $whitelist));
60 $url = 'other://test.tld/path/?query=value#hash';
61 $this->assertEquals('http://test.tld/path/?query=value#hash', whitelist_protocols($url, $whitelist));
62 }
63}
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php
index 6a7870c4..6cd37a7a 100644
--- a/tests/UtilsTest.php
+++ b/tests/UtilsTest.php
@@ -4,10 +4,7 @@
4 */ 4 */
5 5
6require_once 'application/Utils.php'; 6require_once 'application/Utils.php';
7require_once 'tests/utils/ReferenceSessionIdHashes.php'; 7require_once 'application/Languages.php';
8
9// Initialize reference data before PHPUnit starts a session
10ReferenceSessionIdHashes::genAllHashes();
11 8
12 9
13/** 10/**
@@ -15,22 +12,33 @@ ReferenceSessionIdHashes::genAllHashes();
15 */ 12 */
16class UtilsTest extends PHPUnit_Framework_TestCase 13class UtilsTest extends PHPUnit_Framework_TestCase
17{ 14{
18 // Session ID hashes
19 protected static $sidHashes = null;
20
21 // Log file 15 // Log file
22 protected static $testLogFile = 'tests.log'; 16 protected static $testLogFile = 'tests.log';
23 17
24 // Expected log date format 18 // Expected log date format
25 protected static $dateFormat = 'Y/m/d H:i:s'; 19 protected static $dateFormat = 'Y/m/d H:i:s';
26 20
21 /**
22 * @var string Save the current timezone.
23 */
24 protected static $defaultTimeZone;
27 25
28 /** 26 /**
29 * Assign reference data 27 * Assign reference data
30 */ 28 */
31 public static function setUpBeforeClass() 29 public static function setUpBeforeClass()
32 { 30 {
33 self::$sidHashes = ReferenceSessionIdHashes::getHashes(); 31 self::$defaultTimeZone = date_default_timezone_get();
32 // Timezone without DST for test consistency
33 date_default_timezone_set('Africa/Nairobi');
34 }
35
36 /**
37 * Reset the timezone
38 */
39 public static function tearDownAfterClass()
40 {
41 date_default_timezone_set(self::$defaultTimeZone);
34 } 42 }
35 43
36 /** 44 /**
@@ -204,53 +212,263 @@ class UtilsTest extends PHPUnit_Framework_TestCase
204 $this->assertEquals('?', generateLocation($ref, 'localhost')); 212 $this->assertEquals('?', generateLocation($ref, 'localhost'));
205 } 213 }
206 214
215
207 /** 216 /**
208 * Test is_session_id_valid with a valid ID - TEST ALL THE HASHES! 217 * Test generateSecretApi.
209 *
210 * This tests extensively covers all hash algorithms / bit representations
211 */ 218 */
212 public function testIsAnyHashSessionIdValid() 219 public function testGenerateSecretApi()
213 { 220 {
214 foreach (self::$sidHashes as $algo => $bpcs) { 221 $this->assertEquals(12, strlen(generate_api_secret('foo', 'bar')));
215 foreach ($bpcs as $bpc => $hash) {
216 $this->assertTrue(is_session_id_valid($hash));
217 }
218 }
219 } 222 }
220 223
221 /** 224 /**
222 * Test is_session_id_valid with a valid ID - SHA-1 hashes 225 * Test generateSecretApi with invalid parameters.
223 */ 226 */
224 public function testIsSha1SessionIdValid() 227 public function testGenerateSecretApiInvalid()
225 { 228 {
226 $this->assertTrue(is_session_id_valid(sha1('shaarli'))); 229 $this->assertFalse(generate_api_secret('', ''));
230 $this->assertFalse(generate_api_secret(false, false));
227 } 231 }
228 232
229 /** 233 /**
230 * Test is_session_id_valid with a valid ID - SHA-256 hashes 234 * Test normalize_spaces.
231 */ 235 */
232 public function testIsSha256SessionIdValid() 236 public function testNormalizeSpace()
233 { 237 {
234 $this->assertTrue(is_session_id_valid(hash('sha256', 'shaarli'))); 238 $str = ' foo bar is important ';
239 $this->assertEquals('foo bar is important', normalize_spaces($str));
240 $this->assertEquals('foo', normalize_spaces('foo'));
241 $this->assertEquals('', normalize_spaces(''));
242 $this->assertEquals(null, normalize_spaces(null));
235 } 243 }
236 244
237 /** 245 /**
238 * Test is_session_id_valid with a valid ID - SHA-512 hashes 246 * Test arrays_combine
239 */ 247 */
240 public function testIsSha512SessionIdValid() 248 public function testCartesianProductGenerator()
241 { 249 {
242 $this->assertTrue(is_session_id_valid(hash('sha512', 'shaarli'))); 250 $arr = [['ab', 'cd'], ['ef', 'gh'], ['ij', 'kl'], ['m']];
251 $expected = [
252 ['ab', 'ef', 'ij', 'm'],
253 ['ab', 'ef', 'kl', 'm'],
254 ['ab', 'gh', 'ij', 'm'],
255 ['ab', 'gh', 'kl', 'm'],
256 ['cd', 'ef', 'ij', 'm'],
257 ['cd', 'ef', 'kl', 'm'],
258 ['cd', 'gh', 'ij', 'm'],
259 ['cd', 'gh', 'kl', 'm'],
260 ];
261 $this->assertEquals($expected, iterator_to_array(cartesian_product_generator($arr)));
243 } 262 }
244 263
245 /** 264 /**
246 * Test is_session_id_valid with invalid IDs. 265 * Test date_format() with invalid parameter.
247 */ 266 */
248 public function testIsSessionIdInvalid() 267 public function testDateFormatInvalid()
249 { 268 {
250 $this->assertFalse(is_session_id_valid('')); 269 $this->assertFalse(format_date([]));
251 $this->assertFalse(is_session_id_valid(array())); 270 $this->assertFalse(format_date(null));
252 $this->assertFalse( 271 }
253 is_session_id_valid('c0ZqcWF3VFE2NmJBdm1HMVQ0ZHJ3UmZPbTFsNGhkNHI=') 272
254 ); 273 /**
274 * Test is_integer_mixed with valid values
275 */
276 public function testIsIntegerMixedValid()
277 {
278 $this->assertTrue(is_integer_mixed(12));
279 $this->assertTrue(is_integer_mixed('12'));
280 $this->assertTrue(is_integer_mixed(-12));
281 $this->assertTrue(is_integer_mixed('-12'));
282 $this->assertTrue(is_integer_mixed(0));
283 $this->assertTrue(is_integer_mixed('0'));
284 $this->assertTrue(is_integer_mixed(0x0a));
285 }
286
287 /**
288 * Test is_integer_mixed with invalid values
289 */
290 public function testIsIntegerMixedInvalid()
291 {
292 $this->assertFalse(is_integer_mixed(true));
293 $this->assertFalse(is_integer_mixed(false));
294 $this->assertFalse(is_integer_mixed([]));
295 $this->assertFalse(is_integer_mixed(['test']));
296 $this->assertFalse(is_integer_mixed([12]));
297 $this->assertFalse(is_integer_mixed(new DateTime()));
298 $this->assertFalse(is_integer_mixed('0x0a'));
299 $this->assertFalse(is_integer_mixed('12k'));
300 $this->assertFalse(is_integer_mixed('k12'));
301 $this->assertFalse(is_integer_mixed(''));
302 }
303
304 /**
305 * Test return_bytes
306 */
307 public function testReturnBytes()
308 {
309 $this->assertEquals(2 * 1024, return_bytes('2k'));
310 $this->assertEquals(2 * 1024, return_bytes('2K'));
311 $this->assertEquals(2 * (pow(1024, 2)), return_bytes('2m'));
312 $this->assertEquals(2 * (pow(1024, 2)), return_bytes('2M'));
313 $this->assertEquals(2 * (pow(1024, 3)), return_bytes('2g'));
314 $this->assertEquals(2 * (pow(1024, 3)), return_bytes('2G'));
315 $this->assertEquals(374, return_bytes('374'));
316 $this->assertEquals(374, return_bytes(374));
317 $this->assertEquals(0, return_bytes('0'));
318 $this->assertEquals(0, return_bytes(0));
319 $this->assertEquals(-1, return_bytes('-1'));
320 $this->assertEquals(-1, return_bytes(-1));
321 $this->assertEquals('', return_bytes(''));
322 }
323
324 /**
325 * Test human_bytes
326 */
327 public function testHumanBytes()
328 {
329 $this->assertEquals('2'. t('kiB'), human_bytes(2 * 1024));
330 $this->assertEquals('2'. t('kiB'), human_bytes(strval(2 * 1024)));
331 $this->assertEquals('2'. t('MiB'), human_bytes(2 * (pow(1024, 2))));
332 $this->assertEquals('2'. t('MiB'), human_bytes(strval(2 * (pow(1024, 2)))));
333 $this->assertEquals('2'. t('GiB'), human_bytes(2 * (pow(1024, 3))));
334 $this->assertEquals('2'. t('GiB'), human_bytes(strval(2 * (pow(1024, 3)))));
335 $this->assertEquals('374'. t('B'), human_bytes(374));
336 $this->assertEquals('374'. t('B'), human_bytes('374'));
337 $this->assertEquals('232'. t('kiB'), human_bytes(237481));
338 $this->assertEquals(t('Unlimited'), human_bytes('0'));
339 $this->assertEquals(t('Unlimited'), human_bytes(0));
340 $this->assertEquals(t('Setting not set'), human_bytes(''));
341 }
342
343 /**
344 * Test get_max_upload_size with formatting
345 */
346 public function testGetMaxUploadSize()
347 {
348 $this->assertEquals('1'. t('MiB'), get_max_upload_size(2097152, '1024k'));
349 $this->assertEquals('1'. t('MiB'), get_max_upload_size('1m', '2m'));
350 $this->assertEquals('100'. t('B'), get_max_upload_size(100, 100));
351 }
352
353 /**
354 * Test get_max_upload_size without formatting
355 */
356 public function testGetMaxUploadSizeRaw()
357 {
358 $this->assertEquals('1048576', get_max_upload_size(2097152, '1024k', false));
359 $this->assertEquals('1048576', get_max_upload_size('1m', '2m', false));
360 $this->assertEquals('100', get_max_upload_size(100, 100, false));
361 }
362
363 /**
364 * Test alphabetical_sort by value, not reversed, with php-intl.
365 */
366 public function testAlphabeticalSortByValue()
367 {
368 $arr = [
369 'zZz',
370 'éee',
371 'éae',
372 'eee',
373 'A',
374 'a',
375 'zzz',
376 ];
377 $expected = [
378 'a',
379 'A',
380 'éae',
381 'eee',
382 'éee',
383 'zzz',
384 'zZz',
385 ];
386
387 alphabetical_sort($arr);
388 $this->assertEquals($expected, $arr);
389 }
390
391 /**
392 * Test alphabetical_sort by value, reversed, with php-intl.
393 */
394 public function testAlphabeticalSortByValueReversed()
395 {
396 $arr = [
397 'zZz',
398 'éee',
399 'éae',
400 'eee',
401 'A',
402 'a',
403 'zzz',
404 ];
405 $expected = [
406 'zZz',
407 'zzz',
408 'éee',
409 'eee',
410 'éae',
411 'A',
412 'a',
413 ];
414
415 alphabetical_sort($arr, true);
416 $this->assertEquals($expected, $arr);
417 }
418
419 /**
420 * Test alphabetical_sort by keys, not reversed, with php-intl.
421 */
422 public function testAlphabeticalSortByKeys()
423 {
424 $arr = [
425 'zZz' => true,
426 'éee' => true,
427 'éae' => true,
428 'eee' => true,
429 'A' => true,
430 'a' => true,
431 'zzz' => true,
432 ];
433 $expected = [
434 'a' => true,
435 'A' => true,
436 'éae' => true,
437 'eee' => true,
438 'éee' => true,
439 'zzz' => true,
440 'zZz' => true,
441 ];
442
443 alphabetical_sort($arr, true, true);
444 $this->assertEquals($expected, $arr);
445 }
446
447 /**
448 * Test alphabetical_sort by keys, reversed, with php-intl.
449 */
450 public function testAlphabeticalSortByKeysReversed()
451 {
452 $arr = [
453 'zZz' => true,
454 'éee' => true,
455 'éae' => true,
456 'eee' => true,
457 'A' => true,
458 'a' => true,
459 'zzz' => true,
460 ];
461 $expected = [
462 'zZz' => true,
463 'zzz' => true,
464 'éee' => true,
465 'eee' => true,
466 'éae' => true,
467 'A' => true,
468 'a' => true,
469 ];
470
471 alphabetical_sort($arr, true, true);
472 $this->assertEquals($expected, $arr);
255 } 473 }
256} 474}
diff --git a/tests/api/ApiMiddlewareTest.php b/tests/api/ApiMiddlewareTest.php
new file mode 100644
index 00000000..23a56b1c
--- /dev/null
+++ b/tests/api/ApiMiddlewareTest.php
@@ -0,0 +1,208 @@
1<?php
2namespace Shaarli\Api;
3
4use Shaarli\Config\ConfigManager;
5
6use Slim\Container;
7use Slim\Http\Environment;
8use Slim\Http\Request;
9use Slim\Http\Response;
10
11/**
12 * Class ApiMiddlewareTest
13 *
14 * Test the REST API Slim Middleware.
15 *
16 * Note that we can't test a valid use case here, because the middleware
17 * needs to call a valid controller/action during its execution.
18 *
19 * @package Api
20 */
21class ApiMiddlewareTest extends \PHPUnit_Framework_TestCase
22{
23 /**
24 * @var string datastore to test write operations
25 */
26 protected static $testDatastore = 'sandbox/datastore.php';
27
28 /**
29 * @var \ConfigManager instance
30 */
31 protected $conf;
32
33 /**
34 * @var \ReferenceLinkDB instance.
35 */
36 protected $refDB = null;
37
38 /**
39 * @var Container instance.
40 */
41 protected $container;
42
43 /**
44 * Before every test, instantiate a new Api with its config, plugins and links.
45 */
46 public function setUp()
47 {
48 $this->conf = new ConfigManager('tests/utils/config/configJson.json.php');
49 $this->conf->set('api.secret', 'NapoleonWasALizard');
50
51 $this->refDB = new \ReferenceLinkDB();
52 $this->refDB->write(self::$testDatastore);
53
54 $this->container = new Container();
55 $this->container['conf'] = $this->conf;
56 }
57
58 /**
59 * After every test, remove the test datastore.
60 */
61 public function tearDown()
62 {
63 @unlink(self::$testDatastore);
64 }
65
66 /**
67 * Invoke the middleware with the API disabled:
68 * should return a 401 error Unauthorized.
69 */
70 public function testInvokeMiddlewareApiDisabled()
71 {
72 $this->conf->set('api.enabled', false);
73 $mw = new ApiMiddleware($this->container);
74 $env = Environment::mock([
75 'REQUEST_METHOD' => 'GET',
76 'REQUEST_URI' => '/echo',
77 ]);
78 $request = Request::createFromEnvironment($env);
79 $response = new Response();
80 /** @var Response $response */
81 $response = $mw($request, $response, null);
82
83 $this->assertEquals(401, $response->getStatusCode());
84 $body = json_decode((string) $response->getBody());
85 $this->assertEquals('Not authorized', $body);
86 }
87
88 /**
89 * Invoke the middleware with the API disabled in debug mode:
90 * should return a 401 error Unauthorized - with a specific message and a stacktrace.
91 */
92 public function testInvokeMiddlewareApiDisabledDebug()
93 {
94 $this->conf->set('api.enabled', false);
95 $this->conf->set('dev.debug', true);
96 $mw = new ApiMiddleware($this->container);
97 $env = Environment::mock([
98 'REQUEST_METHOD' => 'GET',
99 'REQUEST_URI' => '/echo',
100 ]);
101 $request = Request::createFromEnvironment($env);
102 $response = new Response();
103 /** @var Response $response */
104 $response = $mw($request, $response, null);
105
106 $this->assertEquals(401, $response->getStatusCode());
107 $body = json_decode((string) $response->getBody());
108 $this->assertEquals('Not authorized: API is disabled', $body->message);
109 $this->assertContains('ApiAuthorizationException', $body->stacktrace);
110 }
111
112 /**
113 * Invoke the middleware without a token (debug):
114 * should return a 401 error Unauthorized - with a specific message and a stacktrace.
115 */
116 public function testInvokeMiddlewareNoTokenProvidedDebug()
117 {
118 $this->conf->set('dev.debug', true);
119 $mw = new ApiMiddleware($this->container);
120 $env = Environment::mock([
121 'REQUEST_METHOD' => 'GET',
122 'REQUEST_URI' => '/echo',
123 ]);
124 $request = Request::createFromEnvironment($env);
125 $response = new Response();
126 /** @var Response $response */
127 $response = $mw($request, $response, null);
128
129 $this->assertEquals(401, $response->getStatusCode());
130 $body = json_decode((string) $response->getBody());
131 $this->assertEquals('Not authorized: JWT token not provided', $body->message);
132 $this->assertContains('ApiAuthorizationException', $body->stacktrace);
133 }
134
135 /**
136 * Invoke the middleware without a secret set in settings (debug):
137 * should return a 401 error Unauthorized - with a specific message and a stacktrace.
138 */
139 public function testInvokeMiddlewareNoSecretSetDebug()
140 {
141 $this->conf->set('dev.debug', true);
142 $this->conf->set('api.secret', '');
143 $mw = new ApiMiddleware($this->container);
144 $env = Environment::mock([
145 'REQUEST_METHOD' => 'GET',
146 'REQUEST_URI' => '/echo',
147 'HTTP_AUTHORIZATION'=> 'Bearer jwt',
148 ]);
149 $request = Request::createFromEnvironment($env);
150 $response = new Response();
151 /** @var Response $response */
152 $response = $mw($request, $response, null);
153
154 $this->assertEquals(401, $response->getStatusCode());
155 $body = json_decode((string) $response->getBody());
156 $this->assertEquals('Not authorized: Token secret must be set in Shaarli\'s administration', $body->message);
157 $this->assertContains('ApiAuthorizationException', $body->stacktrace);
158 }
159
160 /**
161 * Invoke the middleware with an invalid JWT token header
162 */
163 public function testInvalidJwtAuthHeaderDebug()
164 {
165 $this->conf->set('dev.debug', true);
166 $mw = new ApiMiddleware($this->container);
167 $env = Environment::mock([
168 'REQUEST_METHOD' => 'GET',
169 'REQUEST_URI' => '/echo',
170 'HTTP_AUTHORIZATION'=> 'PolarBearer jwt',
171 ]);
172 $request = Request::createFromEnvironment($env);
173 $response = new Response();
174 /** @var Response $response */
175 $response = $mw($request, $response, null);
176
177 $this->assertEquals(401, $response->getStatusCode());
178 $body = json_decode((string) $response->getBody());
179 $this->assertEquals('Not authorized: Invalid JWT header', $body->message);
180 $this->assertContains('ApiAuthorizationException', $body->stacktrace);
181 }
182
183 /**
184 * Invoke the middleware with an invalid JWT token (debug):
185 * should return a 401 error Unauthorized - with a specific message and a stacktrace.
186 *
187 * Note: specific JWT errors tests are handled in ApiUtilsTest.
188 */
189 public function testInvokeMiddlewareInvalidJwtDebug()
190 {
191 $this->conf->set('dev.debug', true);
192 $mw = new ApiMiddleware($this->container);
193 $env = Environment::mock([
194 'REQUEST_METHOD' => 'GET',
195 'REQUEST_URI' => '/echo',
196 'HTTP_AUTHORIZATION'=> 'Bearer jwt',
197 ]);
198 $request = Request::createFromEnvironment($env);
199 $response = new Response();
200 /** @var Response $response */
201 $response = $mw($request, $response, null);
202
203 $this->assertEquals(401, $response->getStatusCode());
204 $body = json_decode((string) $response->getBody());
205 $this->assertEquals('Not authorized: Malformed JWT token', $body->message);
206 $this->assertContains('ApiAuthorizationException', $body->stacktrace);
207 }
208}
diff --git a/tests/api/ApiUtilsTest.php b/tests/api/ApiUtilsTest.php
new file mode 100644
index 00000000..62baf4c5
--- /dev/null
+++ b/tests/api/ApiUtilsTest.php
@@ -0,0 +1,352 @@
1<?php
2
3namespace Shaarli\Api;
4
5use Shaarli\Base64Url;
6
7
8/**
9 * Class ApiUtilsTest
10 */
11class ApiUtilsTest extends \PHPUnit_Framework_TestCase
12{
13 /**
14 * Force the timezone for ISO datetimes.
15 */
16 public static function setUpBeforeClass()
17 {
18 date_default_timezone_set('UTC');
19 }
20
21 /**
22 * Generate a valid JWT token.
23 *
24 * @param string $secret API secret used to generate the signature.
25 *
26 * @return string Generated token.
27 */
28 public static function generateValidJwtToken($secret)
29 {
30 $header = Base64Url::encode('{
31 "typ": "JWT",
32 "alg": "HS512"
33 }');
34 $payload = Base64Url::encode('{
35 "iat": '. time() .'
36 }');
37 $signature = Base64Url::encode(hash_hmac('sha512', $header .'.'. $payload , $secret, true));
38 return $header .'.'. $payload .'.'. $signature;
39 }
40
41 /**
42 * Generate a JWT token from given header and payload.
43 *
44 * @param string $header Header in JSON format.
45 * @param string $payload Payload in JSON format.
46 * @param string $secret API secret used to hash the signature.
47 *
48 * @return string JWT token.
49 */
50 public static function generateCustomJwtToken($header, $payload, $secret)
51 {
52 $header = Base64Url::encode($header);
53 $payload = Base64Url::encode($payload);
54 $signature = Base64Url::encode(hash_hmac('sha512', $header . '.' . $payload, $secret, true));
55 return $header . '.' . $payload . '.' . $signature;
56 }
57
58 /**
59 * Test validateJwtToken() with a valid JWT token.
60 */
61 public function testValidateJwtTokenValid()
62 {
63 $secret = 'WarIsPeace';
64 ApiUtils::validateJwtToken(self::generateValidJwtToken($secret), $secret);
65 }
66
67 /**
68 * Test validateJwtToken() with a malformed JWT token.
69 *
70 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
71 * @expectedExceptionMessage Malformed JWT token
72 */
73 public function testValidateJwtTokenMalformed()
74 {
75 $token = 'ABC.DEF';
76 ApiUtils::validateJwtToken($token, 'foo');
77 }
78
79 /**
80 * Test validateJwtToken() with an empty JWT token.
81 *
82 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
83 * @expectedExceptionMessage Malformed JWT token
84 */
85 public function testValidateJwtTokenMalformedEmpty()
86 {
87 $token = false;
88 ApiUtils::validateJwtToken($token, 'foo');
89 }
90
91 /**
92 * Test validateJwtToken() with a JWT token without header.
93 *
94 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
95 * @expectedExceptionMessage Malformed JWT token
96 */
97 public function testValidateJwtTokenMalformedEmptyHeader()
98 {
99 $token = '.payload.signature';
100 ApiUtils::validateJwtToken($token, 'foo');
101 }
102
103 /**
104 * Test validateJwtToken() with a JWT token without payload
105 *
106 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
107 * @expectedExceptionMessage Malformed JWT token
108 */
109 public function testValidateJwtTokenMalformedEmptyPayload()
110 {
111 $token = 'header..signature';
112 ApiUtils::validateJwtToken($token, 'foo');
113 }
114
115 /**
116 * Test validateJwtToken() with a JWT token with an empty signature.
117 *
118 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
119 * @expectedExceptionMessage Invalid JWT signature
120 */
121 public function testValidateJwtTokenInvalidSignatureEmpty()
122 {
123 $token = 'header.payload.';
124 ApiUtils::validateJwtToken($token, 'foo');
125 }
126
127 /**
128 * Test validateJwtToken() with a JWT token with an invalid signature.
129 *
130 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
131 * @expectedExceptionMessage Invalid JWT signature
132 */
133 public function testValidateJwtTokenInvalidSignature()
134 {
135 $token = 'header.payload.nope';
136 ApiUtils::validateJwtToken($token, 'foo');
137 }
138
139 /**
140 * Test validateJwtToken() with a JWT token with a signature generated with the wrong API secret.
141 *
142 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
143 * @expectedExceptionMessage Invalid JWT signature
144 */
145 public function testValidateJwtTokenInvalidSignatureSecret()
146 {
147 ApiUtils::validateJwtToken(self::generateValidJwtToken('foo'), 'bar');
148 }
149
150 /**
151 * Test validateJwtToken() with a JWT token with a an invalid header (not JSON).
152 *
153 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
154 * @expectedExceptionMessage Invalid JWT header
155 */
156 public function testValidateJwtTokenInvalidHeader()
157 {
158 $token = $this->generateCustomJwtToken('notJSON', '{"JSON":1}', 'secret');
159 ApiUtils::validateJwtToken($token, 'secret');
160 }
161
162 /**
163 * Test validateJwtToken() with a JWT token with a an invalid payload (not JSON).
164 *
165 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
166 * @expectedExceptionMessage Invalid JWT payload
167 */
168 public function testValidateJwtTokenInvalidPayload()
169 {
170 $token = $this->generateCustomJwtToken('{"JSON":1}', 'notJSON', 'secret');
171 ApiUtils::validateJwtToken($token, 'secret');
172 }
173
174 /**
175 * Test validateJwtToken() with a JWT token without issued time.
176 *
177 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
178 * @expectedExceptionMessage Invalid JWT issued time
179 */
180 public function testValidateJwtTokenInvalidTimeEmpty()
181 {
182 $token = $this->generateCustomJwtToken('{"JSON":1}', '{"JSON":1}', 'secret');
183 ApiUtils::validateJwtToken($token, 'secret');
184 }
185
186 /**
187 * Test validateJwtToken() with an expired JWT token.
188 *
189 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
190 * @expectedExceptionMessage Invalid JWT issued time
191 */
192 public function testValidateJwtTokenInvalidTimeExpired()
193 {
194 $token = $this->generateCustomJwtToken('{"JSON":1}', '{"iat":' . (time() - 600) . '}', 'secret');
195 ApiUtils::validateJwtToken($token, 'secret');
196 }
197
198 /**
199 * Test validateJwtToken() with a JWT token issued in the future.
200 *
201 * @expectedException \Shaarli\Api\Exceptions\ApiAuthorizationException
202 * @expectedExceptionMessage Invalid JWT issued time
203 */
204 public function testValidateJwtTokenInvalidTimeFuture()
205 {
206 $token = $this->generateCustomJwtToken('{"JSON":1}', '{"iat":' . (time() + 60) . '}', 'secret');
207 ApiUtils::validateJwtToken($token, 'secret');
208 }
209
210 /**
211 * Test formatLink() with a link using all useful fields.
212 */
213 public function testFormatLinkComplete()
214 {
215 $indexUrl = 'https://domain.tld/sub/';
216 $link = [
217 'id' => 12,
218 'url' => 'http://lol.lol',
219 'shorturl' => 'abc',
220 'title' => 'Important Title',
221 'description' => 'It is very lol<tag>' . PHP_EOL . 'new line',
222 'tags' => 'blip .blop ',
223 'private' => '1',
224 'created' => \DateTime::createFromFormat('Ymd_His', '20170107_160102'),
225 'updated' => \DateTime::createFromFormat('Ymd_His', '20170107_160612'),
226 ];
227
228 $expected = [
229 'id' => 12,
230 'url' => 'http://lol.lol',
231 'shorturl' => 'abc',
232 'title' => 'Important Title',
233 'description' => 'It is very lol<tag>' . PHP_EOL . 'new line',
234 'tags' => ['blip', '.blop'],
235 'private' => true,
236 'created' => '2017-01-07T16:01:02+00:00',
237 'updated' => '2017-01-07T16:06:12+00:00',
238 ];
239
240 $this->assertEquals($expected, ApiUtils::formatLink($link, $indexUrl));
241 }
242
243 /**
244 * Test formatLink() with only minimal fields filled, and internal link.
245 */
246 public function testFormatLinkMinimalNote()
247 {
248 $indexUrl = 'https://domain.tld/sub/';
249 $link = [
250 'id' => 12,
251 'url' => '?abc',
252 'shorturl' => 'abc',
253 'title' => 'Note',
254 'description' => '',
255 'tags' => '',
256 'private' => '',
257 'created' => \DateTime::createFromFormat('Ymd_His', '20170107_160102'),
258 ];
259
260 $expected = [
261 'id' => 12,
262 'url' => 'https://domain.tld/sub/?abc',
263 'shorturl' => 'abc',
264 'title' => 'Note',
265 'description' => '',
266 'tags' => [],
267 'private' => false,
268 'created' => '2017-01-07T16:01:02+00:00',
269 'updated' => '',
270 ];
271
272 $this->assertEquals($expected, ApiUtils::formatLink($link, $indexUrl));
273 }
274
275 /**
276 * Test updateLink with valid data, and also unnecessary fields.
277 */
278 public function testUpdateLink()
279 {
280 $created = \DateTime::createFromFormat('Ymd_His', '20170107_160102');
281 $old = [
282 'id' => 12,
283 'url' => '?abc',
284 'shorturl' => 'abc',
285 'title' => 'Note',
286 'description' => '',
287 'tags' => '',
288 'private' => '',
289 'created' => $created,
290 ];
291
292 $new = [
293 'id' => 13,
294 'shorturl' => 'nope',
295 'url' => 'http://somewhere.else',
296 'title' => 'Le Cid',
297 'description' => 'Percé jusques au fond du cœur [...]',
298 'tags' => 'corneille rodrigue',
299 'private' => true,
300 'created' => 'creation',
301 'updated' => 'updation',
302 ];
303
304 $result = ApiUtils::updateLink($old, $new);
305 $this->assertEquals(12, $result['id']);
306 $this->assertEquals('http://somewhere.else', $result['url']);
307 $this->assertEquals('abc', $result['shorturl']);
308 $this->assertEquals('Le Cid', $result['title']);
309 $this->assertEquals('Percé jusques au fond du cœur [...]', $result['description']);
310 $this->assertEquals('corneille rodrigue', $result['tags']);
311 $this->assertEquals(true, $result['private']);
312 $this->assertEquals($created, $result['created']);
313 $this->assertTrue(new \DateTime('5 seconds ago') < $result['updated']);
314 }
315
316 /**
317 * Test updateLink with minimal data.
318 */
319 public function testUpdateLinkMinimal()
320 {
321 $created = \DateTime::createFromFormat('Ymd_His', '20170107_160102');
322 $old = [
323 'id' => 12,
324 'url' => '?abc',
325 'shorturl' => 'abc',
326 'title' => 'Note',
327 'description' => 'Interesting description!',
328 'tags' => 'doggo',
329 'private' => true,
330 'created' => $created,
331 ];
332
333 $new = [
334 'url' => '',
335 'title' => '',
336 'description' => '',
337 'tags' => '',
338 'private' => false,
339 ];
340
341 $result = ApiUtils::updateLink($old, $new);
342 $this->assertEquals(12, $result['id']);
343 $this->assertEquals('?abc', $result['url']);
344 $this->assertEquals('abc', $result['shorturl']);
345 $this->assertEquals('?abc', $result['title']);
346 $this->assertEquals('', $result['description']);
347 $this->assertEquals('', $result['tags']);
348 $this->assertEquals(false, $result['private']);
349 $this->assertEquals($created, $result['created']);
350 $this->assertTrue(new \DateTime('5 seconds ago') < $result['updated']);
351 }
352}
diff --git a/tests/api/controllers/DeleteLinkTest.php b/tests/api/controllers/DeleteLinkTest.php
new file mode 100644
index 00000000..7d797137
--- /dev/null
+++ b/tests/api/controllers/DeleteLinkTest.php
@@ -0,0 +1,126 @@
1<?php
2
3
4namespace Shaarli\Api\Controllers;
5
6use Shaarli\Config\ConfigManager;
7use Slim\Container;
8use Slim\Http\Environment;
9use Slim\Http\Request;
10use Slim\Http\Response;
11
12class DeleteLinkTest extends \PHPUnit_Framework_TestCase
13{
14 /**
15 * @var string datastore to test write operations
16 */
17 protected static $testDatastore = 'sandbox/datastore.php';
18
19 /**
20 * @var string datastore to test write operations
21 */
22 protected static $testHistory = 'sandbox/history.php';
23
24 /**
25 * @var ConfigManager instance
26 */
27 protected $conf;
28
29 /**
30 * @var \ReferenceLinkDB instance.
31 */
32 protected $refDB = null;
33
34 /**
35 * @var \LinkDB instance.
36 */
37 protected $linkDB;
38
39 /**
40 * @var \History instance.
41 */
42 protected $history;
43
44 /**
45 * @var Container instance.
46 */
47 protected $container;
48
49 /**
50 * @var Links controller instance.
51 */
52 protected $controller;
53
54 /**
55 * Before each test, instantiate a new Api with its config, plugins and links.
56 */
57 public function setUp()
58 {
59 $this->conf = new ConfigManager('tests/utils/config/configJson');
60 $this->refDB = new \ReferenceLinkDB();
61 $this->refDB->write(self::$testDatastore);
62 $this->linkDB = new \LinkDB(self::$testDatastore, true, false);
63 $refHistory = new \ReferenceHistory();
64 $refHistory->write(self::$testHistory);
65 $this->history = new \History(self::$testHistory);
66 $this->container = new Container();
67 $this->container['conf'] = $this->conf;
68 $this->container['db'] = $this->linkDB;
69 $this->container['history'] = $this->history;
70
71 $this->controller = new Links($this->container);
72 }
73
74 /**
75 * After each test, remove the test datastore.
76 */
77 public function tearDown()
78 {
79 @unlink(self::$testDatastore);
80 @unlink(self::$testHistory);
81 }
82
83 /**
84 * Test DELETE link endpoint: the link should be removed.
85 */
86 public function testDeleteLinkValid()
87 {
88 $id = '41';
89 $this->assertTrue(isset($this->linkDB[$id]));
90 $env = Environment::mock([
91 'REQUEST_METHOD' => 'DELETE',
92 ]);
93 $request = Request::createFromEnvironment($env);
94
95 $response = $this->controller->deleteLink($request, new Response(), ['id' => $id]);
96 $this->assertEquals(204, $response->getStatusCode());
97 $this->assertEmpty((string) $response->getBody());
98
99 $this->linkDB = new \LinkDB(self::$testDatastore, true, false);
100 $this->assertFalse(isset($this->linkDB[$id]));
101
102 $historyEntry = $this->history->getHistory()[0];
103 $this->assertEquals(\History::DELETED, $historyEntry['event']);
104 $this->assertTrue(
105 (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime']
106 );
107 $this->assertEquals($id, $historyEntry['id']);
108 }
109
110 /**
111 * Test DELETE link endpoint: reach not existing ID.
112 *
113 * @expectedException Shaarli\Api\Exceptions\ApiLinkNotFoundException
114 */
115 public function testDeleteLink404()
116 {
117 $id = -1;
118 $this->assertFalse(isset($this->linkDB[$id]));
119 $env = Environment::mock([
120 'REQUEST_METHOD' => 'DELETE',
121 ]);
122 $request = Request::createFromEnvironment($env);
123
124 $this->controller->deleteLink($request, new Response(), ['id' => $id]);
125 }
126}
diff --git a/tests/api/controllers/GetLinkIdTest.php b/tests/api/controllers/GetLinkIdTest.php
new file mode 100644
index 00000000..57528d5a
--- /dev/null
+++ b/tests/api/controllers/GetLinkIdTest.php
@@ -0,0 +1,132 @@
1<?php
2
3namespace Shaarli\Api\Controllers;
4
5use Shaarli\Config\ConfigManager;
6
7use Slim\Container;
8use Slim\Http\Environment;
9use Slim\Http\Request;
10use Slim\Http\Response;
11
12/**
13 * Class GetLinkIdTest
14 *
15 * Test getLink by ID API service.
16 *
17 * @see http://shaarli.github.io/api-documentation/#links-link-get
18 *
19 * @package Shaarli\Api\Controllers
20 */
21class GetLinkIdTest extends \PHPUnit_Framework_TestCase
22{
23 /**
24 * @var string datastore to test write operations
25 */
26 protected static $testDatastore = 'sandbox/datastore.php';
27
28 /**
29 * @var ConfigManager instance
30 */
31 protected $conf;
32
33 /**
34 * @var \ReferenceLinkDB instance.
35 */
36 protected $refDB = null;
37
38 /**
39 * @var Container instance.
40 */
41 protected $container;
42
43 /**
44 * @var Links controller instance.
45 */
46 protected $controller;
47
48 /**
49 * Number of JSON fields per link.
50 */
51 const NB_FIELDS_LINK = 9;
52
53 /**
54 * Before each test, instantiate a new Api with its config, plugins and links.
55 */
56 public function setUp()
57 {
58 $this->conf = new ConfigManager('tests/utils/config/configJson');
59 $this->refDB = new \ReferenceLinkDB();
60 $this->refDB->write(self::$testDatastore);
61
62 $this->container = new Container();
63 $this->container['conf'] = $this->conf;
64 $this->container['db'] = new \LinkDB(self::$testDatastore, true, false);
65 $this->container['history'] = null;
66
67 $this->controller = new Links($this->container);
68 }
69
70 /**
71 * After each test, remove the test datastore.
72 */
73 public function tearDown()
74 {
75 @unlink(self::$testDatastore);
76 }
77
78 /**
79 * Test basic getLink service: return link ID=41.
80 */
81 public function testGetLinkId()
82 {
83 // Used by index_url().
84 $_SERVER['SERVER_NAME'] = 'domain.tld';
85 $_SERVER['SERVER_PORT'] = 80;
86 $_SERVER['SCRIPT_NAME'] = '/';
87
88 $id = 41;
89 $env = Environment::mock([
90 'REQUEST_METHOD' => 'GET',
91 ]);
92 $request = Request::createFromEnvironment($env);
93
94 $response = $this->controller->getLink($request, new Response(), ['id' => $id]);
95 $this->assertEquals(200, $response->getStatusCode());
96 $data = json_decode((string) $response->getBody(), true);
97 $this->assertEquals(self::NB_FIELDS_LINK, count($data));
98 $this->assertEquals($id, $data['id']);
99
100 // Check link elements
101 $this->assertEquals('http://domain.tld/?WDWyig', $data['url']);
102 $this->assertEquals('WDWyig', $data['shorturl']);
103 $this->assertEquals('Link title: @website', $data['title']);
104 $this->assertEquals(
105 'Stallman has a beard and is part of the Free Software Foundation (or not). Seriously, read this. #hashtag',
106 $data['description']
107 );
108 $this->assertEquals('sTuff', $data['tags'][0]);
109 $this->assertEquals(false, $data['private']);
110 $this->assertEquals(
111 \DateTime::createFromFormat(\LinkDB::LINK_DATE_FORMAT, '20150310_114651')->format(\DateTime::ATOM),
112 $data['created']
113 );
114 $this->assertEmpty($data['updated']);
115 }
116
117 /**
118 * Test basic getLink service: get non existent link => ApiLinkNotFoundException.
119 *
120 * @expectedException Shaarli\Api\Exceptions\ApiLinkNotFoundException
121 * @expectedExceptionMessage Link not found
122 */
123 public function testGetLink404()
124 {
125 $env = Environment::mock([
126 'REQUEST_METHOD' => 'GET',
127 ]);
128 $request = Request::createFromEnvironment($env);
129
130 $this->controller->getLink($request, new Response(), ['id' => -1]);
131 }
132}
diff --git a/tests/api/controllers/GetLinksTest.php b/tests/api/controllers/GetLinksTest.php
new file mode 100644
index 00000000..d22ed3bf
--- /dev/null
+++ b/tests/api/controllers/GetLinksTest.php
@@ -0,0 +1,472 @@
1<?php
2namespace Shaarli\Api\Controllers;
3
4use Shaarli\Config\ConfigManager;
5
6use Slim\Container;
7use Slim\Http\Environment;
8use Slim\Http\Request;
9use Slim\Http\Response;
10
11/**
12 * Class GetLinksTest
13 *
14 * Test get Link list REST API service.
15 *
16 * @see http://shaarli.github.io/api-documentation/#links-links-collection-get
17 *
18 * @package Shaarli\Api\Controllers
19 */
20class GetLinksTest extends \PHPUnit_Framework_TestCase
21{
22 /**
23 * @var string datastore to test write operations
24 */
25 protected static $testDatastore = 'sandbox/datastore.php';
26
27 /**
28 * @var ConfigManager instance
29 */
30 protected $conf;
31
32 /**
33 * @var \ReferenceLinkDB instance.
34 */
35 protected $refDB = null;
36
37 /**
38 * @var Container instance.
39 */
40 protected $container;
41
42 /**
43 * @var Links controller instance.
44 */
45 protected $controller;
46
47 /**
48 * Number of JSON field per link.
49 */
50 const NB_FIELDS_LINK = 9;
51
52 /**
53 * Before every test, instantiate a new Api with its config, plugins and links.
54 */
55 public function setUp()
56 {
57 $this->conf = new ConfigManager('tests/utils/config/configJson');
58 $this->refDB = new \ReferenceLinkDB();
59 $this->refDB->write(self::$testDatastore);
60
61 $this->container = new Container();
62 $this->container['conf'] = $this->conf;
63 $this->container['db'] = new \LinkDB(self::$testDatastore, true, false);
64 $this->container['history'] = null;
65
66 $this->controller = new Links($this->container);
67 }
68
69 /**
70 * After every test, remove the test datastore.
71 */
72 public function tearDown()
73 {
74 @unlink(self::$testDatastore);
75 }
76
77 /**
78 * Test basic getLinks service: returns all links.
79 */
80 public function testGetLinks()
81 {
82 // Used by index_url().
83 $_SERVER['SERVER_NAME'] = 'domain.tld';
84 $_SERVER['SERVER_PORT'] = 80;
85 $_SERVER['SCRIPT_NAME'] = '/';
86
87 $env = Environment::mock([
88 'REQUEST_METHOD' => 'GET',
89 ]);
90 $request = Request::createFromEnvironment($env);
91
92 $response = $this->controller->getLinks($request, new Response());
93 $this->assertEquals(200, $response->getStatusCode());
94 $data = json_decode((string) $response->getBody(), true);
95 $this->assertEquals($this->refDB->countLinks(), count($data));
96
97 // Check order
98 $order = [41, 8, 6, 7, 0, 1, 9, 4, 42];
99 $cpt = 0;
100 foreach ($data as $link) {
101 $this->assertEquals(self::NB_FIELDS_LINK, count($link));
102 $this->assertEquals($order[$cpt++], $link['id']);
103 }
104
105 // Check first element fields
106 $first = $data[0];
107 $this->assertEquals('http://domain.tld/?WDWyig', $first['url']);
108 $this->assertEquals('WDWyig', $first['shorturl']);
109 $this->assertEquals('Link title: @website', $first['title']);
110 $this->assertEquals(
111 'Stallman has a beard and is part of the Free Software Foundation (or not). Seriously, read this. #hashtag',
112 $first['description']
113 );
114 $this->assertEquals('sTuff', $first['tags'][0]);
115 $this->assertEquals(false, $first['private']);
116 $this->assertEquals(
117 \DateTime::createFromFormat(\LinkDB::LINK_DATE_FORMAT, '20150310_114651')->format(\DateTime::ATOM),
118 $first['created']
119 );
120 $this->assertEmpty($first['updated']);
121
122 // Multi tags
123 $link = $data[1];
124 $this->assertEquals(7, count($link['tags']));
125
126 // Update date
127 $this->assertEquals(
128 \DateTime::createFromFormat(\LinkDB::LINK_DATE_FORMAT, '20160803_093033')->format(\DateTime::ATOM),
129 $link['updated']
130 );
131 }
132
133 /**
134 * Test getLinks service with offset and limit parameter:
135 * limit=1 and offset=1 should return only the second link, ID=8 (ordered by creation date DESC).
136 */
137 public function testGetLinksOffsetLimit()
138 {
139 $env = Environment::mock([
140 'REQUEST_METHOD' => 'GET',
141 'QUERY_STRING' => 'offset=1&limit=1'
142 ]);
143 $request = Request::createFromEnvironment($env);
144 $response = $this->controller->getLinks($request, new Response());
145 $this->assertEquals(200, $response->getStatusCode());
146 $data = json_decode((string) $response->getBody(), true);
147 $this->assertEquals(1, count($data));
148 $this->assertEquals(8, $data[0]['id']);
149 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
150 }
151
152 /**
153 * Test getLinks with limit=all (return all link).
154 */
155 public function testGetLinksLimitAll()
156 {
157 $env = Environment::mock([
158 'REQUEST_METHOD' => 'GET',
159 'QUERY_STRING' => 'limit=all'
160 ]);
161 $request = Request::createFromEnvironment($env);
162 $response = $this->controller->getLinks($request, new Response());
163 $this->assertEquals(200, $response->getStatusCode());
164 $data = json_decode((string) $response->getBody(), true);
165 $this->assertEquals($this->refDB->countLinks(), count($data));
166 // Check order
167 $order = [41, 8, 6, 7, 0, 1, 9, 4, 42];
168 $cpt = 0;
169 foreach ($data as $link) {
170 $this->assertEquals(self::NB_FIELDS_LINK, count($link));
171 $this->assertEquals($order[$cpt++], $link['id']);
172 }
173 }
174
175 /**
176 * Test getLinks service with offset and limit parameter:
177 * limit=1 and offset=1 should return only the second link, ID=8 (ordered by creation date DESC).
178 */
179 public function testGetLinksOffsetTooHigh()
180 {
181 $env = Environment::mock([
182 'REQUEST_METHOD' => 'GET',
183 'QUERY_STRING' => 'offset=100'
184 ]);
185 $request = Request::createFromEnvironment($env);
186 $response = $this->controller->getLinks($request, new Response());
187 $this->assertEquals(200, $response->getStatusCode());
188 $data = json_decode((string) $response->getBody(), true);
189 $this->assertEmpty(count($data));
190 }
191
192 /**
193 * Test getLinks with visibility parameter set to all
194 */
195 public function testGetLinksVisibilityAll()
196 {
197 $env = Environment::mock(
198 [
199 'REQUEST_METHOD' => 'GET',
200 'QUERY_STRING' => 'visibility=all'
201 ]
202 );
203 $request = Request::createFromEnvironment($env);
204 $response = $this->controller->getLinks($request, new Response());
205 $this->assertEquals(200, $response->getStatusCode());
206 $data = json_decode((string)$response->getBody(), true);
207 $this->assertEquals($this->refDB->countLinks(), count($data));
208 $this->assertEquals(41, $data[0]['id']);
209 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
210 }
211
212 /**
213 * Test getLinks with visibility parameter set to private
214 */
215 public function testGetLinksVisibilityPrivate()
216 {
217 $env = Environment::mock([
218 'REQUEST_METHOD' => 'GET',
219 'QUERY_STRING' => 'visibility=private'
220 ]);
221 $request = Request::createFromEnvironment($env);
222 $response = $this->controller->getLinks($request, new Response());
223 $this->assertEquals(200, $response->getStatusCode());
224 $data = json_decode((string) $response->getBody(), true);
225 $this->assertEquals($this->refDB->countPrivateLinks(), count($data));
226 $this->assertEquals(6, $data[0]['id']);
227 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
228 }
229
230 /**
231 * Test getLinks with visibility parameter set to public
232 */
233 public function testGetLinksVisibilityPublic()
234 {
235 $env = Environment::mock(
236 [
237 'REQUEST_METHOD' => 'GET',
238 'QUERY_STRING' => 'visibility=public'
239 ]
240 );
241 $request = Request::createFromEnvironment($env);
242 $response = $this->controller->getLinks($request, new Response());
243 $this->assertEquals(200, $response->getStatusCode());
244 $data = json_decode((string)$response->getBody(), true);
245 $this->assertEquals($this->refDB->countPublicLinks(), count($data));
246 $this->assertEquals(41, $data[0]['id']);
247 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
248 }
249
250 /**
251 * Test getLinks service with offset and limit parameter:
252 * limit=1 and offset=1 should return only the second link, ID=8 (ordered by creation date DESC).
253 */
254 public function testGetLinksSearchTerm()
255 {
256 // Only in description - 1 result
257 $env = Environment::mock([
258 'REQUEST_METHOD' => 'GET',
259 'QUERY_STRING' => 'searchterm=Tropical'
260 ]);
261 $request = Request::createFromEnvironment($env);
262 $response = $this->controller->getLinks($request, new Response());
263 $this->assertEquals(200, $response->getStatusCode());
264 $data = json_decode((string) $response->getBody(), true);
265 $this->assertEquals(1, count($data));
266 $this->assertEquals(1, $data[0]['id']);
267 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
268
269 // Only in tags - 1 result
270 $env = Environment::mock([
271 'REQUEST_METHOD' => 'GET',
272 'QUERY_STRING' => 'searchterm=tag3'
273 ]);
274 $request = Request::createFromEnvironment($env);
275 $response = $this->controller->getLinks($request, new Response());
276 $this->assertEquals(200, $response->getStatusCode());
277 $data = json_decode((string) $response->getBody(), true);
278 $this->assertEquals(1, count($data));
279 $this->assertEquals(0, $data[0]['id']);
280 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
281
282 // Multiple results (2)
283 $env = Environment::mock([
284 'REQUEST_METHOD' => 'GET',
285 'QUERY_STRING' => 'searchterm=stallman'
286 ]);
287 $request = Request::createFromEnvironment($env);
288 $response = $this->controller->getLinks($request, new Response());
289 $this->assertEquals(200, $response->getStatusCode());
290 $data = json_decode((string) $response->getBody(), true);
291 $this->assertEquals(2, count($data));
292 $this->assertEquals(41, $data[0]['id']);
293 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
294 $this->assertEquals(8, $data[1]['id']);
295 $this->assertEquals(self::NB_FIELDS_LINK, count($data[1]));
296
297 // Multiword - 2 results
298 $env = Environment::mock([
299 'REQUEST_METHOD' => 'GET',
300 'QUERY_STRING' => 'searchterm=stallman+software'
301 ]);
302 $request = Request::createFromEnvironment($env);
303 $response = $this->controller->getLinks($request, new Response());
304 $this->assertEquals(200, $response->getStatusCode());
305 $data = json_decode((string) $response->getBody(), true);
306 $this->assertEquals(2, count($data));
307 $this->assertEquals(41, $data[0]['id']);
308 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
309 $this->assertEquals(8, $data[1]['id']);
310 $this->assertEquals(self::NB_FIELDS_LINK, count($data[1]));
311
312 // URL encoding
313 $env = Environment::mock([
314 'REQUEST_METHOD' => 'GET',
315 'QUERY_STRING' => 'searchterm='. urlencode('@web')
316 ]);
317 $request = Request::createFromEnvironment($env);
318 $response = $this->controller->getLinks($request, new Response());
319 $this->assertEquals(200, $response->getStatusCode());
320 $data = json_decode((string) $response->getBody(), true);
321 $this->assertEquals(2, count($data));
322 $this->assertEquals(41, $data[0]['id']);
323 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
324 $this->assertEquals(8, $data[1]['id']);
325 $this->assertEquals(self::NB_FIELDS_LINK, count($data[1]));
326 }
327
328 public function testGetLinksSearchTermNoResult()
329 {
330 $env = Environment::mock([
331 'REQUEST_METHOD' => 'GET',
332 'QUERY_STRING' => 'searchterm=nope'
333 ]);
334 $request = Request::createFromEnvironment($env);
335 $response = $this->controller->getLinks($request, new Response());
336 $this->assertEquals(200, $response->getStatusCode());
337 $data = json_decode((string) $response->getBody(), true);
338 $this->assertEquals(0, count($data));
339 }
340
341 public function testGetLinksSearchTags()
342 {
343 // Single tag
344 $env = Environment::mock([
345 'REQUEST_METHOD' => 'GET',
346 'QUERY_STRING' => 'searchtags=dev',
347 ]);
348 $request = Request::createFromEnvironment($env);
349 $response = $this->controller->getLinks($request, new Response());
350 $this->assertEquals(200, $response->getStatusCode());
351 $data = json_decode((string) $response->getBody(), true);
352 $this->assertEquals(2, count($data));
353 $this->assertEquals(0, $data[0]['id']);
354 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
355 $this->assertEquals(4, $data[1]['id']);
356 $this->assertEquals(self::NB_FIELDS_LINK, count($data[1]));
357
358 // Multitag + exclude
359 $env = Environment::mock([
360 'REQUEST_METHOD' => 'GET',
361 'QUERY_STRING' => 'searchtags=stuff+-gnu',
362 ]);
363 $request = Request::createFromEnvironment($env);
364 $response = $this->controller->getLinks($request, new Response());
365 $this->assertEquals(200, $response->getStatusCode());
366 $data = json_decode((string) $response->getBody(), true);
367 $this->assertEquals(1, count($data));
368 $this->assertEquals(41, $data[0]['id']);
369 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
370
371 // wildcard: placeholder at the start
372 $env = Environment::mock([
373 'REQUEST_METHOD' => 'GET',
374 'QUERY_STRING' => 'searchtags=*Tuff',
375 ]);
376 $request = Request::createFromEnvironment($env);
377 $response = $this->controller->getLinks($request, new Response());
378 $this->assertEquals(200, $response->getStatusCode());
379 $data = json_decode((string) $response->getBody(), true);
380 $this->assertEquals(2, count($data));
381 $this->assertEquals(41, $data[0]['id']);
382
383 // wildcard: placeholder at the end
384 $env = Environment::mock([
385 'REQUEST_METHOD' => 'GET',
386 'QUERY_STRING' => 'searchtags=c*',
387 ]);
388 $request = Request::createFromEnvironment($env);
389 $response = $this->controller->getLinks($request, new Response());
390 $this->assertEquals(200, $response->getStatusCode());
391 $data = json_decode((string) $response->getBody(), true);
392 $this->assertEquals(4, count($data));
393 $this->assertEquals(6, $data[0]['id']);
394
395 // wildcard: placeholder at the middle
396 $env = Environment::mock([
397 'REQUEST_METHOD' => 'GET',
398 'QUERY_STRING' => 'searchtags=w*b',
399 ]);
400 $request = Request::createFromEnvironment($env);
401 $response = $this->controller->getLinks($request, new Response());
402 $this->assertEquals(200, $response->getStatusCode());
403 $data = json_decode((string) $response->getBody(), true);
404 $this->assertEquals(4, count($data));
405 $this->assertEquals(6, $data[0]['id']);
406
407 // wildcard: match all
408 $env = Environment::mock([
409 'REQUEST_METHOD' => 'GET',
410 'QUERY_STRING' => 'searchtags=*',
411 ]);
412 $request = Request::createFromEnvironment($env);
413 $response = $this->controller->getLinks($request, new Response());
414 $this->assertEquals(200, $response->getStatusCode());
415 $data = json_decode((string) $response->getBody(), true);
416 $this->assertEquals(9, count($data));
417 $this->assertEquals(41, $data[0]['id']);
418
419 // wildcard: optional ('*' does not need to expand)
420 $env = Environment::mock([
421 'REQUEST_METHOD' => 'GET',
422 'QUERY_STRING' => 'searchtags=*stuff*',
423 ]);
424 $request = Request::createFromEnvironment($env);
425 $response = $this->controller->getLinks($request, new Response());
426 $this->assertEquals(200, $response->getStatusCode());
427 $data = json_decode((string) $response->getBody(), true);
428 $this->assertEquals(2, count($data));
429 $this->assertEquals(41, $data[0]['id']);
430
431 // wildcard: exclusions
432 $env = Environment::mock([
433 'REQUEST_METHOD' => 'GET',
434 'QUERY_STRING' => 'searchtags=*a*+-*e*',
435 ]);
436 $request = Request::createFromEnvironment($env);
437 $response = $this->controller->getLinks($request, new Response());
438 $this->assertEquals(200, $response->getStatusCode());
439 $data = json_decode((string) $response->getBody(), true);
440 $this->assertEquals(1, count($data));
441 $this->assertEquals(41, $data[0]['id']); // finds '#hashtag' in descr.
442
443 // wildcard: exclude all
444 $env = Environment::mock([
445 'REQUEST_METHOD' => 'GET',
446 'QUERY_STRING' => 'searchtags=-*',
447 ]);
448 $request = Request::createFromEnvironment($env);
449 $response = $this->controller->getLinks($request, new Response());
450 $this->assertEquals(200, $response->getStatusCode());
451 $data = json_decode((string) $response->getBody(), true);
452 $this->assertEquals(0, count($data));
453 }
454
455 /**
456 * Test getLinks service with search tags+terms.
457 */
458 public function testGetLinksSearchTermsAndTags()
459 {
460 $env = Environment::mock([
461 'REQUEST_METHOD' => 'GET',
462 'QUERY_STRING' => 'searchterm=poke&searchtags=dev',
463 ]);
464 $request = Request::createFromEnvironment($env);
465 $response = $this->controller->getLinks($request, new Response());
466 $this->assertEquals(200, $response->getStatusCode());
467 $data = json_decode((string) $response->getBody(), true);
468 $this->assertEquals(1, count($data));
469 $this->assertEquals(0, $data[0]['id']);
470 $this->assertEquals(self::NB_FIELDS_LINK, count($data[0]));
471 }
472}
diff --git a/tests/api/controllers/HistoryTest.php b/tests/api/controllers/HistoryTest.php
new file mode 100644
index 00000000..61046d97
--- /dev/null
+++ b/tests/api/controllers/HistoryTest.php
@@ -0,0 +1,216 @@
1<?php
2
3
4namespace Shaarli\Api\Controllers;
5
6
7use Shaarli\Config\ConfigManager;
8use Slim\Container;
9use Slim\Http\Environment;
10use Slim\Http\Request;
11use Slim\Http\Response;
12
13require_once 'tests/utils/ReferenceHistory.php';
14
15class HistoryTest extends \PHPUnit_Framework_TestCase
16{
17 /**
18 * @var string datastore to test write operations
19 */
20 protected static $testHistory = 'sandbox/history.php';
21
22 /**
23 * @var ConfigManager instance
24 */
25 protected $conf;
26
27 /**
28 * @var \ReferenceHistory instance.
29 */
30 protected $refHistory = null;
31
32 /**
33 * @var Container instance.
34 */
35 protected $container;
36
37 /**
38 * @var History controller instance.
39 */
40 protected $controller;
41
42 /**
43 * Before every test, instantiate a new Api with its config, plugins and links.
44 */
45 public function setUp()
46 {
47 $this->conf = new ConfigManager('tests/utils/config/configJson.json.php');
48 $this->refHistory = new \ReferenceHistory();
49 $this->refHistory->write(self::$testHistory);
50 $this->container = new Container();
51 $this->container['conf'] = $this->conf;
52 $this->container['db'] = true;
53 $this->container['history'] = new \History(self::$testHistory);
54
55 $this->controller = new History($this->container);
56 }
57
58 /**
59 * After every test, remove the test datastore.
60 */
61 public function tearDown()
62 {
63 @unlink(self::$testHistory);
64 }
65
66 /**
67 * Test /history service without parameter.
68 */
69 public function testGetHistory()
70 {
71 $env = Environment::mock([
72 'REQUEST_METHOD' => 'GET',
73 ]);
74 $request = Request::createFromEnvironment($env);
75
76 $response = $this->controller->getHistory($request, new Response());
77 $this->assertEquals(200, $response->getStatusCode());
78 $data = json_decode((string) $response->getBody(), true);
79
80 $this->assertEquals($this->refHistory->count(), count($data));
81
82 $this->assertEquals(\History::DELETED, $data[0]['event']);
83 $this->assertEquals(
84 \DateTime::createFromFormat('Ymd_His', '20170303_121216')->format(\DateTime::ATOM),
85 $data[0]['datetime']
86 );
87 $this->assertEquals(124, $data[0]['id']);
88
89 $this->assertEquals(\History::SETTINGS, $data[1]['event']);
90 $this->assertEquals(
91 \DateTime::createFromFormat('Ymd_His', '20170302_121215')->format(\DateTime::ATOM),
92 $data[1]['datetime']
93 );
94 $this->assertNull($data[1]['id']);
95
96 $this->assertEquals(\History::UPDATED, $data[2]['event']);
97 $this->assertEquals(
98 \DateTime::createFromFormat('Ymd_His', '20170301_121214')->format(\DateTime::ATOM),
99 $data[2]['datetime']
100 );
101 $this->assertEquals(123, $data[2]['id']);
102
103 $this->assertEquals(\History::CREATED, $data[3]['event']);
104 $this->assertEquals(
105 \DateTime::createFromFormat('Ymd_His', '20170201_121214')->format(\DateTime::ATOM),
106 $data[3]['datetime']
107 );
108 $this->assertEquals(124, $data[3]['id']);
109
110 $this->assertEquals(\History::CREATED, $data[4]['event']);
111 $this->assertEquals(
112 \DateTime::createFromFormat('Ymd_His', '20170101_121212')->format(\DateTime::ATOM),
113 $data[4]['datetime']
114 );
115 $this->assertEquals(123, $data[4]['id']);
116 }
117
118 /**
119 * Test /history service with limit parameter.
120 */
121 public function testGetHistoryLimit()
122 {
123 $env = Environment::mock([
124 'REQUEST_METHOD' => 'GET',
125 'QUERY_STRING' => 'limit=1'
126 ]);
127 $request = Request::createFromEnvironment($env);
128
129 $response = $this->controller->getHistory($request, new Response());
130 $this->assertEquals(200, $response->getStatusCode());
131 $data = json_decode((string) $response->getBody(), true);
132
133 $this->assertEquals(1, count($data));
134
135 $this->assertEquals(\History::DELETED, $data[0]['event']);
136 $this->assertEquals(
137 \DateTime::createFromFormat('Ymd_His', '20170303_121216')->format(\DateTime::ATOM),
138 $data[0]['datetime']
139 );
140 $this->assertEquals(124, $data[0]['id']);
141 }
142
143 /**
144 * Test /history service with offset parameter.
145 */
146 public function testGetHistoryOffset()
147 {
148 $env = Environment::mock([
149 'REQUEST_METHOD' => 'GET',
150 'QUERY_STRING' => 'offset=4'
151 ]);
152 $request = Request::createFromEnvironment($env);
153
154 $response = $this->controller->getHistory($request, new Response());
155 $this->assertEquals(200, $response->getStatusCode());
156 $data = json_decode((string) $response->getBody(), true);
157
158 $this->assertEquals(1, count($data));
159
160 $this->assertEquals(\History::CREATED, $data[0]['event']);
161 $this->assertEquals(
162 \DateTime::createFromFormat('Ymd_His', '20170101_121212')->format(\DateTime::ATOM),
163 $data[0]['datetime']
164 );
165 $this->assertEquals(123, $data[0]['id']);
166 }
167
168 /**
169 * Test /history service with since parameter.
170 */
171 public function testGetHistorySince()
172 {
173 $env = Environment::mock([
174 'REQUEST_METHOD' => 'GET',
175 'QUERY_STRING' => 'since=2017-03-03T00:00:00%2B00:00'
176 ]);
177 $request = Request::createFromEnvironment($env);
178
179 $response = $this->controller->getHistory($request, new Response());
180 $this->assertEquals(200, $response->getStatusCode());
181 $data = json_decode((string) $response->getBody(), true);
182
183 $this->assertEquals(1, count($data));
184
185 $this->assertEquals(\History::DELETED, $data[0]['event']);
186 $this->assertEquals(
187 \DateTime::createFromFormat('Ymd_His', '20170303_121216')->format(\DateTime::ATOM),
188 $data[0]['datetime']
189 );
190 $this->assertEquals(124, $data[0]['id']);
191 }
192
193 /**
194 * Test /history service with since parameter.
195 */
196 public function testGetHistorySinceOffsetLimit()
197 {
198 $env = Environment::mock([
199 'REQUEST_METHOD' => 'GET',
200 'QUERY_STRING' => 'since=2017-02-01T00:00:00%2B00:00&offset=1&limit=1'
201 ]);
202 $request = Request::createFromEnvironment($env);
203
204 $response = $this->controller->getHistory($request, new Response());
205 $this->assertEquals(200, $response->getStatusCode());
206 $data = json_decode((string) $response->getBody(), true);
207
208 $this->assertEquals(1, count($data));
209
210 $this->assertEquals(\History::SETTINGS, $data[0]['event']);
211 $this->assertEquals(
212 \DateTime::createFromFormat('Ymd_His', '20170302_121215')->format(\DateTime::ATOM),
213 $data[0]['datetime']
214 );
215 }
216}
diff --git a/tests/api/controllers/InfoTest.php b/tests/api/controllers/InfoTest.php
new file mode 100644
index 00000000..f7e63bfa
--- /dev/null
+++ b/tests/api/controllers/InfoTest.php
@@ -0,0 +1,115 @@
1<?php
2namespace Shaarli\Api\Controllers;
3
4use Shaarli\Config\ConfigManager;
5
6use Slim\Container;
7use Slim\Http\Environment;
8use Slim\Http\Request;
9use Slim\Http\Response;
10
11/**
12 * Class InfoTest
13 *
14 * Test REST API controller Info.
15 *
16 * @package Api\Controllers
17 */
18class InfoTest extends \PHPUnit_Framework_TestCase
19{
20 /**
21 * @var string datastore to test write operations
22 */
23 protected static $testDatastore = 'sandbox/datastore.php';
24
25 /**
26 * @var ConfigManager instance
27 */
28 protected $conf;
29
30 /**
31 * @var \ReferenceLinkDB instance.
32 */
33 protected $refDB = null;
34
35 /**
36 * @var Container instance.
37 */
38 protected $container;
39
40 /**
41 * @var Info controller instance.
42 */
43 protected $controller;
44
45 /**
46 * Before every test, instantiate a new Api with its config, plugins and links.
47 */
48 public function setUp()
49 {
50 $this->conf = new ConfigManager('tests/utils/config/configJson.json.php');
51 $this->refDB = new \ReferenceLinkDB();
52 $this->refDB->write(self::$testDatastore);
53
54 $this->container = new Container();
55 $this->container['conf'] = $this->conf;
56 $this->container['db'] = new \LinkDB(self::$testDatastore, true, false);
57 $this->container['history'] = null;
58
59 $this->controller = new Info($this->container);
60 }
61
62 /**
63 * After every test, remove the test datastore.
64 */
65 public function tearDown()
66 {
67 @unlink(self::$testDatastore);
68 }
69
70 /**
71 * Test /info service.
72 */
73 public function testGetInfo()
74 {
75 $env = Environment::mock([
76 'REQUEST_METHOD' => 'GET',
77 ]);
78 $request = Request::createFromEnvironment($env);
79
80 $response = $this->controller->getInfo($request, new Response());
81 $this->assertEquals(200, $response->getStatusCode());
82 $data = json_decode((string) $response->getBody(), true);
83
84 $this->assertEquals(\ReferenceLinkDB::$NB_LINKS_TOTAL, $data['global_counter']);
85 $this->assertEquals(2, $data['private_counter']);
86 $this->assertEquals('Shaarli', $data['settings']['title']);
87 $this->assertEquals('?', $data['settings']['header_link']);
88 $this->assertEquals('UTC', $data['settings']['timezone']);
89 $this->assertEquals(ConfigManager::$DEFAULT_PLUGINS, $data['settings']['enabled_plugins']);
90 $this->assertEquals(false, $data['settings']['default_private_links']);
91
92 $title = 'My links';
93 $headerLink = 'http://shaarli.tld';
94 $timezone = 'Europe/Paris';
95 $enabledPlugins = array('foo', 'bar');
96 $defaultPrivateLinks = true;
97 $this->conf->set('general.title', $title);
98 $this->conf->set('general.header_link', $headerLink);
99 $this->conf->set('general.timezone', $timezone);
100 $this->conf->set('general.enabled_plugins', $enabledPlugins);
101 $this->conf->set('privacy.default_private_links', $defaultPrivateLinks);
102
103 $response = $this->controller->getInfo($request, new Response());
104 $this->assertEquals(200, $response->getStatusCode());
105 $data = json_decode((string) $response->getBody(), true);
106
107 $this->assertEquals(\ReferenceLinkDB::$NB_LINKS_TOTAL, $data['global_counter']);
108 $this->assertEquals(2, $data['private_counter']);
109 $this->assertEquals($title, $data['settings']['title']);
110 $this->assertEquals($headerLink, $data['settings']['header_link']);
111 $this->assertEquals($timezone, $data['settings']['timezone']);
112 $this->assertEquals($enabledPlugins, $data['settings']['enabled_plugins']);
113 $this->assertEquals($defaultPrivateLinks, $data['settings']['default_private_links']);
114 }
115}
diff --git a/tests/api/controllers/PostLinkTest.php b/tests/api/controllers/PostLinkTest.php
new file mode 100644
index 00000000..31954e39
--- /dev/null
+++ b/tests/api/controllers/PostLinkTest.php
@@ -0,0 +1,216 @@
1<?php
2
3namespace Shaarli\Api\Controllers;
4
5
6use Shaarli\Config\ConfigManager;
7use Slim\Container;
8use Slim\Http\Environment;
9use Slim\Http\Request;
10use Slim\Http\Response;
11
12/**
13 * Class PostLinkTest
14 *
15 * Test POST Link REST API service.
16 *
17 * @package Shaarli\Api\Controllers
18 */
19class PostLinkTest extends \PHPUnit_Framework_TestCase
20{
21 /**
22 * @var string datastore to test write operations
23 */
24 protected static $testDatastore = 'sandbox/datastore.php';
25
26 /**
27 * @var string datastore to test write operations
28 */
29 protected static $testHistory = 'sandbox/history.php';
30
31 /**
32 * @var ConfigManager instance
33 */
34 protected $conf;
35
36 /**
37 * @var \ReferenceLinkDB instance.
38 */
39 protected $refDB = null;
40
41 /**
42 * @var \History instance.
43 */
44 protected $history;
45
46 /**
47 * @var Container instance.
48 */
49 protected $container;
50
51 /**
52 * @var Links controller instance.
53 */
54 protected $controller;
55
56 /**
57 * Number of JSON field per link.
58 */
59 const NB_FIELDS_LINK = 9;
60
61 /**
62 * Before every test, instantiate a new Api with its config, plugins and links.
63 */
64 public function setUp()
65 {
66 $this->conf = new ConfigManager('tests/utils/config/configJson.json.php');
67 $this->refDB = new \ReferenceLinkDB();
68 $this->refDB->write(self::$testDatastore);
69
70 $refHistory = new \ReferenceHistory();
71 $refHistory->write(self::$testHistory);
72 $this->history = new \History(self::$testHistory);
73
74 $this->container = new Container();
75 $this->container['conf'] = $this->conf;
76 $this->container['db'] = new \LinkDB(self::$testDatastore, true, false);
77 $this->container['history'] = new \History(self::$testHistory);
78
79 $this->controller = new Links($this->container);
80
81 $mock = $this->getMock('\Slim\Router', ['relativePathFor']);
82 $mock->expects($this->any())
83 ->method('relativePathFor')
84 ->willReturn('api/v1/links/1');
85
86 // affect @property-read... seems to work
87 $this->controller->getCi()->router = $mock;
88
89 // Used by index_url().
90 $this->controller->getCi()['environment'] = [
91 'SERVER_NAME' => 'domain.tld',
92 'SERVER_PORT' => 80,
93 'SCRIPT_NAME' => '/',
94 ];
95 }
96
97 /**
98 * After every test, remove the test datastore.
99 */
100 public function tearDown()
101 {
102 @unlink(self::$testDatastore);
103 @unlink(self::$testHistory);
104 }
105
106 /**
107 * Test link creation without any field: creates a blank note.
108 */
109 public function testPostLinkMinimal()
110 {
111 $env = Environment::mock([
112 'REQUEST_METHOD' => 'POST',
113 ]);
114
115 $request = Request::createFromEnvironment($env);
116
117 $response = $this->controller->postLink($request, new Response());
118 $this->assertEquals(201, $response->getStatusCode());
119 $this->assertEquals('api/v1/links/1', $response->getHeader('Location')[0]);
120 $data = json_decode((string) $response->getBody(), true);
121 $this->assertEquals(self::NB_FIELDS_LINK, count($data));
122 $this->assertEquals(43, $data['id']);
123 $this->assertRegExp('/[\w-_]{6}/', $data['shorturl']);
124 $this->assertEquals('http://domain.tld/?' . $data['shorturl'], $data['url']);
125 $this->assertEquals('?' . $data['shorturl'], $data['title']);
126 $this->assertEquals('', $data['description']);
127 $this->assertEquals([], $data['tags']);
128 $this->assertEquals(false, $data['private']);
129 $this->assertTrue(new \DateTime('5 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['created']));
130 $this->assertEquals('', $data['updated']);
131
132 $historyEntry = $this->history->getHistory()[0];
133 $this->assertEquals(\History::CREATED, $historyEntry['event']);
134 $this->assertTrue(
135 (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime']
136 );
137 $this->assertEquals(43, $historyEntry['id']);
138 }
139
140 /**
141 * Test link creation with all available fields.
142 */
143 public function testPostLinkFull()
144 {
145 $link = [
146 'url' => 'website.tld/test?foo=bar',
147 'title' => 'new entry',
148 'description' => 'shaare description',
149 'tags' => ['one', 'two'],
150 'private' => true,
151 ];
152 $env = Environment::mock([
153 'REQUEST_METHOD' => 'POST',
154 'CONTENT_TYPE' => 'application/json'
155 ]);
156
157 $request = Request::createFromEnvironment($env);
158 $request = $request->withParsedBody($link);
159 $response = $this->controller->postLink($request, new Response());
160
161 $this->assertEquals(201, $response->getStatusCode());
162 $this->assertEquals('api/v1/links/1', $response->getHeader('Location')[0]);
163 $data = json_decode((string) $response->getBody(), true);
164 $this->assertEquals(self::NB_FIELDS_LINK, count($data));
165 $this->assertEquals(43, $data['id']);
166 $this->assertRegExp('/[\w-_]{6}/', $data['shorturl']);
167 $this->assertEquals('http://' . $link['url'], $data['url']);
168 $this->assertEquals($link['title'], $data['title']);
169 $this->assertEquals($link['description'], $data['description']);
170 $this->assertEquals($link['tags'], $data['tags']);
171 $this->assertEquals(true, $data['private']);
172 $this->assertTrue(new \DateTime('2 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['created']));
173 $this->assertEquals('', $data['updated']);
174 }
175
176 /**
177 * Test link creation with an existing link (duplicate URL). Should return a 409 HTTP error and the existing link.
178 */
179 public function testPostLinkDuplicate()
180 {
181 $link = [
182 'url' => 'mediagoblin.org/',
183 'title' => 'new entry',
184 'description' => 'shaare description',
185 'tags' => ['one', 'two'],
186 'private' => true,
187 ];
188 $env = Environment::mock([
189 'REQUEST_METHOD' => 'POST',
190 'CONTENT_TYPE' => 'application/json'
191 ]);
192
193 $request = Request::createFromEnvironment($env);
194 $request = $request->withParsedBody($link);
195 $response = $this->controller->postLink($request, new Response());
196
197 $this->assertEquals(409, $response->getStatusCode());
198 $data = json_decode((string) $response->getBody(), true);
199 $this->assertEquals(self::NB_FIELDS_LINK, count($data));
200 $this->assertEquals(7, $data['id']);
201 $this->assertEquals('IuWvgA', $data['shorturl']);
202 $this->assertEquals('http://mediagoblin.org/', $data['url']);
203 $this->assertEquals('MediaGoblin', $data['title']);
204 $this->assertEquals('A free software media publishing platform #hashtagOther', $data['description']);
205 $this->assertEquals(['gnu', 'media', 'web', '.hidden', 'hashtag'], $data['tags']);
206 $this->assertEquals(false, $data['private']);
207 $this->assertEquals(
208 \DateTime::createFromFormat(\LinkDB::LINK_DATE_FORMAT, '20130614_184135'),
209 \DateTime::createFromFormat(\DateTime::ATOM, $data['created'])
210 );
211 $this->assertEquals(
212 \DateTime::createFromFormat(\LinkDB::LINK_DATE_FORMAT, '20130615_184230'),
213 \DateTime::createFromFormat(\DateTime::ATOM, $data['updated'])
214 );
215 }
216}
diff --git a/tests/api/controllers/PutLinkTest.php b/tests/api/controllers/PutLinkTest.php
new file mode 100644
index 00000000..8a562571
--- /dev/null
+++ b/tests/api/controllers/PutLinkTest.php
@@ -0,0 +1,222 @@
1<?php
2
3
4namespace Shaarli\Api\Controllers;
5
6
7use Shaarli\Config\ConfigManager;
8use Slim\Container;
9use Slim\Http\Environment;
10use Slim\Http\Request;
11use Slim\Http\Response;
12
13class PutLinkTest extends \PHPUnit_Framework_TestCase
14{
15 /**
16 * @var string datastore to test write operations
17 */
18 protected static $testDatastore = 'sandbox/datastore.php';
19
20 /**
21 * @var string datastore to test write operations
22 */
23 protected static $testHistory = 'sandbox/history.php';
24
25 /**
26 * @var ConfigManager instance
27 */
28 protected $conf;
29
30 /**
31 * @var \ReferenceLinkDB instance.
32 */
33 protected $refDB = null;
34
35 /**
36 * @var \History instance.
37 */
38 protected $history;
39
40 /**
41 * @var Container instance.
42 */
43 protected $container;
44
45 /**
46 * @var Links controller instance.
47 */
48 protected $controller;
49
50 /**
51 * Number of JSON field per link.
52 */
53 const NB_FIELDS_LINK = 9;
54
55 /**
56 * Before every test, instantiate a new Api with its config, plugins and links.
57 */
58 public function setUp()
59 {
60 $this->conf = new ConfigManager('tests/utils/config/configJson.json.php');
61 $this->refDB = new \ReferenceLinkDB();
62 $this->refDB->write(self::$testDatastore);
63
64 $refHistory = new \ReferenceHistory();
65 $refHistory->write(self::$testHistory);
66 $this->history = new \History(self::$testHistory);
67
68 $this->container = new Container();
69 $this->container['conf'] = $this->conf;
70 $this->container['db'] = new \LinkDB(self::$testDatastore, true, false);
71 $this->container['history'] = new \History(self::$testHistory);
72
73 $this->controller = new Links($this->container);
74
75 // Used by index_url().
76 $this->controller->getCi()['environment'] = [
77 'SERVER_NAME' => 'domain.tld',
78 'SERVER_PORT' => 80,
79 'SCRIPT_NAME' => '/',
80 ];
81 }
82
83 /**
84 * After every test, remove the test datastore.
85 */
86 public function tearDown()
87 {
88 @unlink(self::$testDatastore);
89 @unlink(self::$testHistory);
90 }
91
92 /**
93 * Test link update without value: reset the link to default values
94 */
95 public function testPutLinkMinimal()
96 {
97 $env = Environment::mock([
98 'REQUEST_METHOD' => 'PUT',
99 ]);
100 $id = '41';
101 $request = Request::createFromEnvironment($env);
102
103 $response = $this->controller->putLink($request, new Response(), ['id' => $id]);
104 $this->assertEquals(200, $response->getStatusCode());
105 $data = json_decode((string) $response->getBody(), true);
106 $this->assertEquals(self::NB_FIELDS_LINK, count($data));
107 $this->assertEquals($id, $data['id']);
108 $this->assertEquals('WDWyig', $data['shorturl']);
109 $this->assertEquals('http://domain.tld/?WDWyig', $data['url']);
110 $this->assertEquals('?WDWyig', $data['title']);
111 $this->assertEquals('', $data['description']);
112 $this->assertEquals([], $data['tags']);
113 $this->assertEquals(false, $data['private']);
114 $this->assertEquals(
115 \DateTime::createFromFormat('Ymd_His', '20150310_114651'),
116 \DateTime::createFromFormat(\DateTime::ATOM, $data['created'])
117 );
118 $this->assertTrue(new \DateTime('5 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['updated']));
119
120 $historyEntry = $this->history->getHistory()[0];
121 $this->assertEquals(\History::UPDATED, $historyEntry['event']);
122 $this->assertTrue(
123 (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime']
124 );
125 $this->assertEquals($id, $historyEntry['id']);
126 }
127
128 /**
129 * Test link update with new values
130 */
131 public function testPutLinkWithValues()
132 {
133 $env = Environment::mock([
134 'REQUEST_METHOD' => 'PUT',
135 'CONTENT_TYPE' => 'application/json'
136 ]);
137 $id = 41;
138 $update = [
139 'url' => 'http://somewhere.else',
140 'title' => 'Le Cid',
141 'description' => 'Percé jusques au fond du cœur [...]',
142 'tags' => ['corneille', 'rodrigue'],
143 'private' => true,
144 ];
145 $request = Request::createFromEnvironment($env);
146 $request = $request->withParsedBody($update);
147
148 $response = $this->controller->putLink($request, new Response(), ['id' => $id]);
149 $this->assertEquals(200, $response->getStatusCode());
150 $data = json_decode((string) $response->getBody(), true);
151 $this->assertEquals(self::NB_FIELDS_LINK, count($data));
152 $this->assertEquals($id, $data['id']);
153 $this->assertEquals('WDWyig', $data['shorturl']);
154 $this->assertEquals('http://somewhere.else', $data['url']);
155 $this->assertEquals('Le Cid', $data['title']);
156 $this->assertEquals('Percé jusques au fond du cœur [...]', $data['description']);
157 $this->assertEquals(['corneille', 'rodrigue'], $data['tags']);
158 $this->assertEquals(true, $data['private']);
159 $this->assertEquals(
160 \DateTime::createFromFormat('Ymd_His', '20150310_114651'),
161 \DateTime::createFromFormat(\DateTime::ATOM, $data['created'])
162 );
163 $this->assertTrue(new \DateTime('5 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['updated']));
164 }
165
166 /**
167 * Test link update with an existing URL: 409 Conflict with the existing link as body
168 */
169 public function testPutLinkDuplicate()
170 {
171 $link = [
172 'url' => 'mediagoblin.org/',
173 'title' => 'new entry',
174 'description' => 'shaare description',
175 'tags' => ['one', 'two'],
176 'private' => true,
177 ];
178 $env = Environment::mock([
179 'REQUEST_METHOD' => 'PUT',
180 'CONTENT_TYPE' => 'application/json'
181 ]);
182
183 $request = Request::createFromEnvironment($env);
184 $request = $request->withParsedBody($link);
185 $response = $this->controller->putLink($request, new Response(), ['id' => 41]);
186
187 $this->assertEquals(409, $response->getStatusCode());
188 $data = json_decode((string) $response->getBody(), true);
189 $this->assertEquals(self::NB_FIELDS_LINK, count($data));
190 $this->assertEquals(7, $data['id']);
191 $this->assertEquals('IuWvgA', $data['shorturl']);
192 $this->assertEquals('http://mediagoblin.org/', $data['url']);
193 $this->assertEquals('MediaGoblin', $data['title']);
194 $this->assertEquals('A free software media publishing platform #hashtagOther', $data['description']);
195 $this->assertEquals(['gnu', 'media', 'web', '.hidden', 'hashtag'], $data['tags']);
196 $this->assertEquals(false, $data['private']);
197 $this->assertEquals(
198 \DateTime::createFromFormat(\LinkDB::LINK_DATE_FORMAT, '20130614_184135'),
199 \DateTime::createFromFormat(\DateTime::ATOM, $data['created'])
200 );
201 $this->assertEquals(
202 \DateTime::createFromFormat(\LinkDB::LINK_DATE_FORMAT, '20130615_184230'),
203 \DateTime::createFromFormat(\DateTime::ATOM, $data['updated'])
204 );
205 }
206
207 /**
208 * Test link update on non existent link => ApiLinkNotFoundException.
209 *
210 * @expectedException Shaarli\Api\Exceptions\ApiLinkNotFoundException
211 * @expectedExceptionMessage Link not found
212 */
213 public function testGetLink404()
214 {
215 $env = Environment::mock([
216 'REQUEST_METHOD' => 'PUT',
217 ]);
218 $request = Request::createFromEnvironment($env);
219
220 $this->controller->putLink($request, new Response(), ['id' => -1]);
221 }
222}
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
new file mode 100644
index 00000000..d36d73cd
--- /dev/null
+++ b/tests/bootstrap.php
@@ -0,0 +1,6 @@
1<?php
2
3require_once 'vendor/autoload.php';
4
5$conf = new \Shaarli\Config\ConfigManager('tests/utils/config/configJson');
6new \Shaarli\Languages('en', $conf);
diff --git a/tests/config/ConfigJsonTest.php b/tests/config/ConfigJsonTest.php
index 07f6ab49..d237bc80 100644
--- a/tests/config/ConfigJsonTest.php
+++ b/tests/config/ConfigJsonTest.php
@@ -1,11 +1,10 @@
1<?php 1<?php
2 2namespace Shaarli\Config;
3require_once 'application/config/ConfigJson.php';
4 3
5/** 4/**
6 * Class ConfigJsonTest 5 * Class ConfigJsonTest
7 */ 6 */
8class ConfigJsonTest extends PHPUnit_Framework_TestCase 7class ConfigJsonTest extends \PHPUnit_Framework_TestCase
9{ 8{
10 /** 9 /**
11 * @var ConfigJson 10 * @var ConfigJson
@@ -40,8 +39,8 @@ class ConfigJsonTest extends PHPUnit_Framework_TestCase
40 /** 39 /**
41 * Read a non existent config file -> empty array. 40 * Read a non existent config file -> empty array.
42 * 41 *
43 * @expectedException Exception 42 * @expectedException \Exception
44 * @expectedExceptionMessage An error occurred while parsing JSON file: error code #4 43 * @expectedExceptionMessageRegExp /An error occurred while parsing JSON configuration file \([\w\/\.]+\): error code #4/
45 */ 44 */
46 public function testReadInvalidJson() 45 public function testReadInvalidJson()
47 { 46 {
@@ -112,7 +111,7 @@ class ConfigJsonTest extends PHPUnit_Framework_TestCase
112 /** 111 /**
113 * Write to invalid path. 112 * Write to invalid path.
114 * 113 *
115 * @expectedException IOException 114 * @expectedException \IOException
116 */ 115 */
117 public function testWriteInvalidArray() 116 public function testWriteInvalidArray()
118 { 117 {
@@ -123,7 +122,7 @@ class ConfigJsonTest extends PHPUnit_Framework_TestCase
123 /** 122 /**
124 * Write to invalid path. 123 * Write to invalid path.
125 * 124 *
126 * @expectedException IOException 125 * @expectedException \IOException
127 */ 126 */
128 public function testWriteInvalidBlank() 127 public function testWriteInvalidBlank()
129 { 128 {
diff --git a/tests/config/ConfigManagerTest.php b/tests/config/ConfigManagerTest.php
index 436e3d67..1ec447b2 100644
--- a/tests/config/ConfigManagerTest.php
+++ b/tests/config/ConfigManagerTest.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2namespace Shaarli\Config;
2 3
3/** 4/**
4 * Unit tests for Class ConfigManagerTest 5 * Unit tests for Class ConfigManagerTest
@@ -6,7 +7,7 @@
6 * Note: it only test the manager with ConfigJson, 7 * Note: it only test the manager with ConfigJson,
7 * ConfigPhp is only a workaround to handle the transition to JSON type. 8 * ConfigPhp is only a workaround to handle the transition to JSON type.
8 */ 9 */
9class ConfigManagerTest extends PHPUnit_Framework_TestCase 10class ConfigManagerTest extends \PHPUnit_Framework_TestCase
10{ 11{
11 /** 12 /**
12 * @var ConfigManager 13 * @var ConfigManager
@@ -83,7 +84,7 @@ class ConfigManagerTest extends PHPUnit_Framework_TestCase
83 /** 84 /**
84 * Set with an empty key. 85 * Set with an empty key.
85 * 86 *
86 * @expectedException Exception 87 * @expectedException \Exception
87 * @expectedExceptionMessageRegExp #^Invalid setting key parameter. String expected, got.*# 88 * @expectedExceptionMessageRegExp #^Invalid setting key parameter. String expected, got.*#
88 */ 89 */
89 public function testSetEmptyKey() 90 public function testSetEmptyKey()
@@ -94,7 +95,7 @@ class ConfigManagerTest extends PHPUnit_Framework_TestCase
94 /** 95 /**
95 * Set with an array key. 96 * Set with an array key.
96 * 97 *
97 * @expectedException Exception 98 * @expectedException \Exception
98 * @expectedExceptionMessageRegExp #^Invalid setting key parameter. String expected, got.*# 99 * @expectedExceptionMessageRegExp #^Invalid setting key parameter. String expected, got.*#
99 */ 100 */
100 public function testSetArrayKey() 101 public function testSetArrayKey()
@@ -105,7 +106,7 @@ class ConfigManagerTest extends PHPUnit_Framework_TestCase
105 /** 106 /**
106 * Try to write the config without mandatory parameter (e.g. 'login'). 107 * Try to write the config without mandatory parameter (e.g. 'login').
107 * 108 *
108 * @expectedException MissingFieldConfigException 109 * @expectedException Shaarli\Config\Exception\MissingFieldConfigException
109 */ 110 */
110 public function testWriteMissingParameter() 111 public function testWriteMissingParameter()
111 { 112 {
diff --git a/tests/config/ConfigPhpTest.php b/tests/config/ConfigPhpTest.php
index 58cd8d2a..be23eea1 100644
--- a/tests/config/ConfigPhpTest.php
+++ b/tests/config/ConfigPhpTest.php
@@ -1,11 +1,10 @@
1<?php 1<?php
2 2namespace Shaarli\Config;
3require_once 'application/config/ConfigPhp.php';
4 3
5/** 4/**
6 * Class ConfigPhpTest 5 * Class ConfigPhpTest
7 */ 6 */
8class ConfigPhpTest extends PHPUnit_Framework_TestCase 7class ConfigPhpTest extends \PHPUnit_Framework_TestCase
9{ 8{
10 /** 9 /**
11 * @var ConfigPhp 10 * @var ConfigPhp
@@ -38,6 +37,20 @@ class ConfigPhpTest extends PHPUnit_Framework_TestCase
38 } 37 }
39 38
40 /** 39 /**
40 * Read an empty existent config file -> array with blank default values.
41 */
42 public function testReadEmpty()
43 {
44 $dataFile = 'tests/utils/config/emptyConfigPhp.php';
45 $conf = $this->configIO->read($dataFile);
46 $this->assertEmpty($conf['login']);
47 $this->assertEmpty($conf['title']);
48 $this->assertEmpty($conf['titleLink']);
49 $this->assertEmpty($conf['config']);
50 $this->assertEmpty($conf['plugins']);
51 }
52
53 /**
41 * Write a new config file. 54 * Write a new config file.
42 */ 55 */
43 public function testWriteNew() 56 public function testWriteNew()
diff --git a/tests/config/ConfigPluginTest.php b/tests/config/ConfigPluginTest.php
index 3b37cd79..deb02c9e 100644
--- a/tests/config/ConfigPluginTest.php
+++ b/tests/config/ConfigPluginTest.php
@@ -1,14 +1,14 @@
1<?php 1<?php
2/** 2namespace Shaarli\Config;
3 * Config' tests 3
4 */ 4use Shaarli\Config\Exception\PluginConfigOrderException;
5 5
6require_once 'application/config/ConfigPlugin.php'; 6require_once 'application/config/ConfigPlugin.php';
7 7
8/** 8/**
9 * Unitary tests for Shaarli config related functions 9 * Unitary tests for Shaarli config related functions
10 */ 10 */
11class ConfigPluginTest extends PHPUnit_Framework_TestCase 11class ConfigPluginTest extends \PHPUnit_Framework_TestCase
12{ 12{
13 /** 13 /**
14 * Test save_plugin_config with valid data. 14 * Test save_plugin_config with valid data.
@@ -39,7 +39,7 @@ class ConfigPluginTest extends PHPUnit_Framework_TestCase
39 /** 39 /**
40 * Test save_plugin_config with invalid data. 40 * Test save_plugin_config with invalid data.
41 * 41 *
42 * @expectedException PluginConfigOrderException 42 * @expectedException Shaarli\Config\Exception\PluginConfigOrderException
43 */ 43 */
44 public function testSavePluginConfigInvalid() 44 public function testSavePluginConfigInvalid()
45 { 45 {
diff --git a/tests/docker/alpine36/Dockerfile b/tests/docker/alpine36/Dockerfile
new file mode 100644
index 00000000..fa84f6e2
--- /dev/null
+++ b/tests/docker/alpine36/Dockerfile
@@ -0,0 +1,34 @@
1FROM alpine:3.6
2MAINTAINER Shaarli Community
3
4RUN apk --update --no-cache add \
5 ca-certificates \
6 curl \
7 make \
8 php7 \
9 php7-ctype \
10 php7-curl \
11 php7-dom \
12 php7-gd \
13 php7-iconv \
14 php7-intl \
15 php7-json \
16 php7-mbstring \
17 php7-openssl \
18 php7-phar \
19 php7-session \
20 php7-simplexml \
21 php7-tokenizer \
22 php7-xdebug \
23 php7-xml \
24 php7-zlib \
25 rsync
26
27RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
28
29RUN mkdir /shaarli
30WORKDIR /shaarli
31VOLUME /shaarli
32
33ENTRYPOINT ["make"]
34CMD []
diff --git a/tests/docker/debian8/Dockerfile b/tests/docker/debian8/Dockerfile
new file mode 100644
index 00000000..eaa34e9b
--- /dev/null
+++ b/tests/docker/debian8/Dockerfile
@@ -0,0 +1,35 @@
1FROM debian:jessie
2MAINTAINER Shaarli Community
3
4ENV TERM dumb
5ENV DEBIAN_FRONTEND noninteractive
6ENV LANG en_US.UTF-8
7ENV LANGUAGE en_US:en
8
9RUN apt-get update \
10 && apt-get install --no-install-recommends -y \
11 ca-certificates \
12 curl \
13 locales \
14 make \
15 php5 \
16 php5-curl \
17 php5-gd \
18 php5-intl \
19 php5-xdebug \
20 rsync \
21 && apt-get clean
22
23RUN locale-gen en_US.UTF-8 \
24 && locale-gen de_DE.UTF-8 \
25 && locale-gen fr_FR.UTF-8
26
27ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
28RUN chmod 755 /usr/local/bin/composer
29
30RUN mkdir /shaarli
31WORKDIR /shaarli
32VOLUME /shaarli
33
34ENTRYPOINT ["make"]
35CMD []
diff --git a/tests/docker/debian9/Dockerfile b/tests/docker/debian9/Dockerfile
new file mode 100644
index 00000000..3ab4b93d
--- /dev/null
+++ b/tests/docker/debian9/Dockerfile
@@ -0,0 +1,36 @@
1FROM debian:stretch
2MAINTAINER Shaarli Community
3
4ENV TERM dumb
5ENV DEBIAN_FRONTEND noninteractive
6ENV LANG en_US.UTF-8
7ENV LANGUAGE en_US:en
8
9RUN apt-get update \
10 && apt-get install --no-install-recommends -y \
11 ca-certificates \
12 curl \
13 locales \
14 make \
15 php7.0 \
16 php7.0-curl \
17 php7.0-gd \
18 php7.0-intl \
19 php7.0-xml \
20 php-xdebug \
21 rsync \
22 && apt-get clean
23
24RUN locale-gen en_US.UTF-8 \
25 && locale-gen de_DE.UTF-8 \
26 && locale-gen fr_FR.UTF-8
27
28ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
29RUN chmod 755 /usr/local/bin/composer
30
31RUN mkdir /shaarli
32WORKDIR /shaarli
33VOLUME /shaarli
34
35ENTRYPOINT ["make"]
36CMD []
diff --git a/tests/docker/ubuntu16/Dockerfile b/tests/docker/ubuntu16/Dockerfile
new file mode 100644
index 00000000..e53ed9e3
--- /dev/null
+++ b/tests/docker/ubuntu16/Dockerfile
@@ -0,0 +1,36 @@
1FROM ubuntu:16.04
2MAINTAINER Shaarli Community
3
4ENV TERM dumb
5ENV DEBIAN_FRONTEND noninteractive
6ENV LANG en_US.UTF-8
7ENV LANGUAGE en_US:en
8
9RUN apt-get update \
10 && apt-get install --no-install-recommends -y \
11 ca-certificates \
12 curl \
13 language-pack-de \
14 language-pack-en \
15 language-pack-fr \
16 locales \
17 make \
18 php7.0 \
19 php7.0-curl \
20 php7.0-gd \
21 php7.0-intl \
22 php7.0-xml \
23 php-xdebug \
24 rsync \
25 && apt-get clean
26
27ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
28RUN chmod 755 /usr/local/bin/composer
29
30RUN useradd -m dev \
31 && mkdir /shaarli
32USER dev
33WORKDIR /shaarli
34
35ENTRYPOINT ["make"]
36CMD []
diff --git a/tests/languages/bootstrap.php b/tests/languages/bootstrap.php
new file mode 100644
index 00000000..da6ac2e4
--- /dev/null
+++ b/tests/languages/bootstrap.php
@@ -0,0 +1,6 @@
1<?php
2require_once 'tests/bootstrap.php';
3
4if (! empty(getenv('UT_LOCALE'))) {
5 setlocale(LC_ALL, getenv('UT_LOCALE'));
6}
diff --git a/tests/languages/de/UtilsDeTest.php b/tests/languages/de/UtilsDeTest.php
new file mode 100644
index 00000000..4569c923
--- /dev/null
+++ b/tests/languages/de/UtilsDeTest.php
@@ -0,0 +1,119 @@
1<?php
2
3require_once 'tests/UtilsTest.php';
4
5
6class UtilsDeTest extends UtilsTest
7{
8 /**
9 * Test date_format().
10 */
11 public function testDateFormat()
12 {
13 $date = DateTime::createFromFormat('Ymd_His', '20170101_101112');
14 $this->assertRegExp('/1\. Januar 2017 (um )?10:11:12 GMT\+0?3(:00)?/', format_date($date, true, true));
15 }
16
17 /**
18 * Test date_format() without time.
19 */
20 public function testDateFormatNoTime()
21 {
22 $date = DateTime::createFromFormat('Ymd_His', '20170101_101112');
23 $this->assertRegExp('/1\. Januar 2017/', format_date($date, false,true));
24 }
25
26 /**
27 * Test date_format() using builtin PHP function strftime.
28 */
29 public function testDateFormatDefault()
30 {
31 $date = DateTime::createFromFormat('Ymd_His', '20170101_101112');
32 $this->assertEquals('So 01 Jan 2017 10:11:12 EAT', format_date($date, true, false));
33 }
34
35 /**
36 * Test date_format() using builtin PHP function strftime without time.
37 */
38 public function testDateFormatDefaultNoTime()
39 {
40 $date = DateTime::createFromFormat('Ymd_His', '20170201_101112');
41 $this->assertEquals('01.02.2017', format_date($date, false, false));
42 }
43
44 /**
45 * Test autoLocale with a simple value
46 */
47 public function testAutoLocaleValid()
48 {
49 $current = setlocale(LC_ALL, 0);
50 $header = 'en-us';
51 autoLocale($header);
52 $this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
53
54 setlocale(LC_ALL, $current);
55 }
56
57 /**
58 * Test autoLocale with an alternative locale value
59 */
60 public function testAutoLocaleValidAlternative()
61 {
62 $current = setlocale(LC_ALL, 0);
63 $header = 'en_us.UTF8';
64 autoLocale($header);
65 $this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
66
67 setlocale(LC_ALL, $current);
68 }
69
70 /**
71 * Test autoLocale with multiples value, the first one is valid
72 */
73 public function testAutoLocaleMultipleFirstValid()
74 {
75 $current = setlocale(LC_ALL, 0);
76 $header = 'en-us,de-de';
77 autoLocale($header);
78 $this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
79
80 setlocale(LC_ALL, $current);
81 }
82
83 /**
84 * Test autoLocale with multiples value, the second one is available
85 */
86 public function testAutoLocaleMultipleSecondAvailable()
87 {
88 $current = setlocale(LC_ALL, 0);
89 $header = 'mag_IN,fr-fr';
90 autoLocale($header);
91 $this->assertEquals('fr_FR.utf8', setlocale(LC_ALL, 0));
92
93 setlocale(LC_ALL, $current);
94 }
95
96 /**
97 * Test autoLocale without value: defaults to en_US.
98 */
99 public function testAutoLocaleBlank()
100 {
101 $current = setlocale(LC_ALL, 0);
102 autoLocale('');
103 $this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
104
105 setlocale(LC_ALL, $current);
106 }
107
108 /**
109 * Test autoLocale with an unavailable value: defaults to en_US.
110 */
111 public function testAutoLocaleUnavailable()
112 {
113 $current = setlocale(LC_ALL, 0);
114 autoLocale('mag_IN');
115 $this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
116
117 setlocale(LC_ALL, $current);
118 }
119}
diff --git a/tests/languages/en/UtilsEnTest.php b/tests/languages/en/UtilsEnTest.php
new file mode 100644
index 00000000..a74063ae
--- /dev/null
+++ b/tests/languages/en/UtilsEnTest.php
@@ -0,0 +1,119 @@
1<?php
2
3require_once 'tests/UtilsTest.php';
4
5
6class UtilsEnTest extends UtilsTest
7{
8 /**
9 * Test date_format().
10 */
11 public function testDateFormat()
12 {
13 $date = DateTime::createFromFormat('Ymd_His', '20170101_101112');
14 $this->assertRegExp('/January 1, 2017 (at )?10:11:12 AM GMT\+0?3(:00)?/', format_date($date, true, true));
15 }
16
17 /**
18 * Test date_format() without time.
19 */
20 public function testDateFormatNoTime()
21 {
22 $date = DateTime::createFromFormat('Ymd_His', '20170101_101112');
23 $this->assertRegExp('/January 1, 2017/', format_date($date, false, true));
24 }
25
26 /**
27 * Test date_format() using builtin PHP function strftime.
28 */
29 public function testDateFormatDefault()
30 {
31 $date = DateTime::createFromFormat('Ymd_His', '20170101_101112');
32 $this->assertEquals('Sun 01 Jan 2017 10:11:12 AM EAT', format_date($date, true, false));
33 }
34
35 /**
36 * Test date_format() using builtin PHP function strftime without time.
37 */
38 public function testDateFormatDefaultNoTime()
39 {
40 $date = DateTime::createFromFormat('Ymd_His', '20170201_101112');
41 $this->assertEquals('02/01/2017', format_date($date, false, false));
42 }
43
44 /**
45 * Test autoLocale with a simple value
46 */
47 public function testAutoLocaleValid()
48 {
49 $current = setlocale(LC_ALL, 0);
50 $header = 'de-de';
51 autoLocale($header);
52 $this->assertEquals('de_DE.utf8', setlocale(LC_ALL, 0));
53
54 setlocale(LC_ALL, $current);
55 }
56
57 /**
58 * Test autoLocale with an alternative locale value
59 */
60 public function testAutoLocaleValidAlternative()
61 {
62 $current = setlocale(LC_ALL, 0);
63 $header = 'de_de.UTF8';
64 autoLocale($header);
65 $this->assertEquals('de_DE.utf8', setlocale(LC_ALL, 0));
66
67 setlocale(LC_ALL, $current);
68 }
69
70 /**
71 * Test autoLocale with multiples value, the first one is valid
72 */
73 public function testAutoLocaleMultipleFirstValid()
74 {
75 $current = setlocale(LC_ALL, 0);
76 $header = 'de-de;en-us';
77 autoLocale($header);
78 $this->assertEquals('de_DE.utf8', setlocale(LC_ALL, 0));
79
80 setlocale(LC_ALL, $current);
81 }
82
83 /**
84 * Test autoLocale with multiples value, the second one is available
85 */
86 public function testAutoLocaleMultipleSecondAvailable()
87 {
88 $current = setlocale(LC_ALL, 0);
89 $header = 'mag_IN,fr-fr';
90 autoLocale($header);
91 $this->assertEquals('fr_FR.utf8', setlocale(LC_ALL, 0));
92
93 setlocale(LC_ALL, $current);
94 }
95
96 /**
97 * Test autoLocale without value: defaults to en_US.
98 */
99 public function testAutoLocaleBlank()
100 {
101 $current = setlocale(LC_ALL, 0);
102 autoLocale('');
103 $this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
104
105 setlocale(LC_ALL, $current);
106 }
107
108 /**
109 * Test autoLocale with an unavailable value: defaults to en_US.
110 */
111 public function testAutoLocaleUnavailable()
112 {
113 $current = setlocale(LC_ALL, 0);
114 autoLocale('mag_IN');
115 $this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
116
117 setlocale(LC_ALL, $current);
118 }
119}
diff --git a/tests/languages/fr/LanguagesFrTest.php b/tests/languages/fr/LanguagesFrTest.php
new file mode 100644
index 00000000..79d05172
--- /dev/null
+++ b/tests/languages/fr/LanguagesFrTest.php
@@ -0,0 +1,175 @@
1<?php
2
3
4namespace Shaarli;
5
6
7use Shaarli\Config\ConfigManager;
8
9/**
10 * Class LanguagesFrTest
11 *
12 * Test the translation system in PHP and gettext mode with French language.
13 *
14 * @package Shaarli
15 */
16class LanguagesFrTest extends \PHPUnit_Framework_TestCase
17{
18 /**
19 * @var string Config file path (without extension).
20 */
21 protected static $configFile = 'tests/utils/config/configJson';
22
23 /**
24 * @var ConfigManager
25 */
26 protected $conf;
27
28 /**
29 * Init: force French
30 */
31 public function setUp()
32 {
33 $this->conf = new ConfigManager(self::$configFile);
34 $this->conf->set('translation.language', 'fr');
35 }
36
37 /**
38 * Reset the locale since gettext seems to mess with it, making it too long
39 */
40 public static function tearDownAfterClass()
41 {
42 if (! empty(getenv('UT_LOCALE'))) {
43 setlocale(LC_ALL, getenv('UT_LOCALE'));
44 }
45 }
46
47 /**
48 * Test t() with a simple non identified value.
49 */
50 public function testTranslateSingleNotIDGettext()
51 {
52 $this->conf->set('translation.mode', 'gettext');
53 new Languages('en', $this->conf);
54 $text = 'abcdé 564 fgK';
55 $this->assertEquals($text, t($text));
56 }
57
58 /**
59 * Test t() with a simple identified value in gettext mode.
60 */
61 public function testTranslateSingleIDGettext()
62 {
63 $this->conf->set('translation.mode', 'gettext');
64 new Languages('en', $this->conf);
65 $text = 'permalink';
66 $this->assertEquals('permalien', t($text));
67 }
68
69 /**
70 * Test t() with a non identified plural form in gettext mode.
71 */
72 public function testTranslatePluralNotIDGettext()
73 {
74 $this->conf->set('translation.mode', 'gettext');
75 new Languages('en', $this->conf);
76 $text = 'sandwich';
77 $nText = 'sandwiches';
78 // Not ID, so English fallback, and in english, plural 0
79 $this->assertEquals('sandwiches', t($text, $nText, 0));
80 $this->assertEquals('sandwich', t($text, $nText, 1));
81 $this->assertEquals('sandwiches', t($text, $nText, 2));
82 }
83
84 /**
85 * Test t() with an identified plural form in gettext mode.
86 */
87 public function testTranslatePluralIDGettext()
88 {
89 $this->conf->set('translation.mode', 'gettext');
90 new Languages('en', $this->conf);
91 $text = 'shaare';
92 $nText = 'shaares';
93 $this->assertEquals('shaare', t($text, $nText, 0));
94 $this->assertEquals('shaare', t($text, $nText, 1));
95 $this->assertEquals('shaares', t($text, $nText, 2));
96 }
97
98 /**
99 * Test t() with a simple non identified value.
100 */
101 public function testTranslateSingleNotIDPhp()
102 {
103 $this->conf->set('translation.mode', 'php');
104 new Languages('en', $this->conf);
105 $text = 'abcdé 564 fgK';
106 $this->assertEquals($text, t($text));
107 }
108
109 /**
110 * Test t() with a simple identified value in PHP mode.
111 */
112 public function testTranslateSingleIDPhp()
113 {
114 $this->conf->set('translation.mode', 'php');
115 new Languages('en', $this->conf);
116 $text = 'permalink';
117 $this->assertEquals('permalien', t($text));
118 }
119
120 /**
121 * Test t() with a non identified plural form in PHP mode.
122 */
123 public function testTranslatePluralNotIDPhp()
124 {
125 $this->conf->set('translation.mode', 'php');
126 new Languages('en', $this->conf);
127 $text = 'sandwich';
128 $nText = 'sandwiches';
129 // Not ID, so English fallback, and in english, plural 0
130 $this->assertEquals('sandwiches', t($text, $nText, 0));
131 $this->assertEquals('sandwich', t($text, $nText, 1));
132 $this->assertEquals('sandwiches', t($text, $nText, 2));
133 }
134
135 /**
136 * Test t() with an identified plural form in PHP mode.
137 */
138 public function testTranslatePluralIDPhp()
139 {
140 $this->conf->set('translation.mode', 'php');
141 new Languages('en', $this->conf);
142 $text = 'shaare';
143 $nText = 'shaares';
144 // In english, zero is followed by plural form
145 $this->assertEquals('shaare', t($text, $nText, 0));
146 $this->assertEquals('shaare', t($text, $nText, 1));
147 $this->assertEquals('shaares', t($text, $nText, 2));
148 }
149
150 /**
151 * Test t() with an extension language file in gettext mode
152 */
153 public function testTranslationExtensionGettext()
154 {
155 $this->conf->set('translation.mode', 'gettext');
156 $this->conf->set('translation.extensions.test', 'tests/utils/languages/');
157 new Languages('en', $this->conf);
158 $txt = 'car'; // ignore me poedit
159 $this->assertEquals('voiture', t($txt, $txt, 1, 'test'));
160 $this->assertEquals('Fouille', t('Search', 'Search', 1, 'test'));
161 }
162
163 /**
164 * Test t() with an extension language file in PHP mode
165 */
166 public function testTranslationExtensionPhp()
167 {
168 $this->conf->set('translation.mode', 'php');
169 $this->conf->set('translation.extensions.test', 'tests/utils/languages/');
170 new Languages('en', $this->conf);
171 $txt = 'car'; // ignore me poedit
172 $this->assertEquals('voiture', t($txt, $txt, 1, 'test'));
173 $this->assertEquals('Fouille', t('Search', 'Search', 1, 'test'));
174 }
175}
diff --git a/tests/languages/fr/UtilsFrTest.php b/tests/languages/fr/UtilsFrTest.php
new file mode 100644
index 00000000..3dbb126f
--- /dev/null
+++ b/tests/languages/fr/UtilsFrTest.php
@@ -0,0 +1,119 @@
1<?php
2
3require_once 'tests/UtilsTest.php';
4
5
6class UtilsFrTest extends UtilsTest
7{
8 /**
9 * Test date_format().
10 */
11 public function testDateFormat()
12 {
13 $date = DateTime::createFromFormat('Ymd_His', '20170101_101112');
14 $this->assertRegExp('/1 janvier 2017 (à )?10:11:12 UTC\+0?3(:00)?/', format_date($date));
15 }
16
17 /**
18 * Test date_format() without time.
19 */
20 public function testDateFormatNoTime()
21 {
22 $date = DateTime::createFromFormat('Ymd_His', '20170101_101112');
23 $this->assertRegExp('/1 janvier 2017/', format_date($date, false, true));
24 }
25
26 /**
27 * Test date_format() using builtin PHP function strftime.
28 */
29 public function testDateFormatDefault()
30 {
31 $date = DateTime::createFromFormat('Ymd_His', '20170101_101112');
32 $this->assertEquals('dim. 01 janv. 2017 10:11:12 EAT', format_date($date, true, false));
33 }
34
35 /**
36 * Test date_format() using builtin PHP function strftime without time.
37 */
38 public function testDateFormatDefaultNoTime()
39 {
40 $date = DateTime::createFromFormat('Ymd_His', '20170201_101112');
41 $this->assertEquals('01/02/2017', format_date($date, false, false));
42 }
43
44 /**
45 * Test autoLocale with a simple value
46 */
47 public function testAutoLocaleValid()
48 {
49 $current = setlocale(LC_ALL, 0);
50 $header = 'de-de';
51 autoLocale($header);
52 $this->assertEquals('de_DE.utf8', setlocale(LC_ALL, 0));
53
54 setlocale(LC_ALL, $current);
55 }
56
57 /**
58 * Test autoLocale with an alternative locale value
59 */
60 public function testAutoLocaleValidAlternative()
61 {
62 $current = setlocale(LC_ALL, 0);
63 $header = 'de_de.UTF8';
64 autoLocale($header);
65 $this->assertEquals('de_DE.utf8', setlocale(LC_ALL, 0));
66
67 setlocale(LC_ALL, $current);
68 }
69
70 /**
71 * Test autoLocale with multiples value, the first one is valid
72 */
73 public function testAutoLocaleMultipleFirstValid()
74 {
75 $current = setlocale(LC_ALL, 0);
76 $header = 'de-de;en-us';
77 autoLocale($header);
78 $this->assertEquals('de_DE.utf8', setlocale(LC_ALL, 0));
79
80 setlocale(LC_ALL, $current);
81 }
82
83 /**
84 * Test autoLocale with multiples value, the second one is available
85 */
86 public function testAutoLocaleMultipleSecondAvailable()
87 {
88 $current = setlocale(LC_ALL, 0);
89 $header = 'mag_IN,de-de';
90 autoLocale($header);
91 $this->assertEquals('de_DE.utf8', setlocale(LC_ALL, 0));
92
93 setlocale(LC_ALL, $current);
94 }
95
96 /**
97 * Test autoLocale without value: defaults to en_US.
98 */
99 public function testAutoLocaleBlank()
100 {
101 $current = setlocale(LC_ALL, 0);
102 autoLocale('');
103 $this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
104
105 setlocale(LC_ALL, $current);
106 }
107
108 /**
109 * Test autoLocale with an unavailable value: defaults to en_US.
110 */
111 public function testAutoLocaleUnavailable()
112 {
113 $current = setlocale(LC_ALL, 0);
114 autoLocale('mag_IN');
115 $this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
116
117 setlocale(LC_ALL, $current);
118 }
119}
diff --git a/tests/plugins/PluginAddlinkTest.php b/tests/plugins/PluginAddlinkTest.php
index a2f25bec..b6239e7f 100644
--- a/tests/plugins/PluginAddlinkTest.php
+++ b/tests/plugins/PluginAddlinkTest.php
@@ -16,7 +16,7 @@ class PluginAddlinkTest extends PHPUnit_Framework_TestCase
16 /** 16 /**
17 * Reset plugin path. 17 * Reset plugin path.
18 */ 18 */
19 function setUp() 19 public function setUp()
20 { 20 {
21 PluginManager::$PLUGINS_PATH = 'plugins'; 21 PluginManager::$PLUGINS_PATH = 'plugins';
22 } 22 }
@@ -24,7 +24,7 @@ class PluginAddlinkTest extends PHPUnit_Framework_TestCase
24 /** 24 /**
25 * Test render_header hook while logged in. 25 * Test render_header hook while logged in.
26 */ 26 */
27 function testAddlinkHeaderLoggedIn() 27 public function testAddlinkHeaderLoggedIn()
28 { 28 {
29 $str = 'stuff'; 29 $str = 'stuff';
30 $data = array($str => $str); 30 $data = array($str => $str);
@@ -46,7 +46,7 @@ class PluginAddlinkTest extends PHPUnit_Framework_TestCase
46 /** 46 /**
47 * Test render_header hook while logged out. 47 * Test render_header hook while logged out.
48 */ 48 */
49 function testAddlinkHeaderLoggedOut() 49 public function testAddlinkHeaderLoggedOut()
50 { 50 {
51 $str = 'stuff'; 51 $str = 'stuff';
52 $data = array($str => $str); 52 $data = array($str => $str);
@@ -57,44 +57,4 @@ class PluginAddlinkTest extends PHPUnit_Framework_TestCase
57 $this->assertEquals($str, $data[$str]); 57 $this->assertEquals($str, $data[$str]);
58 $this->assertArrayNotHasKey('fields_toolbar', $data); 58 $this->assertArrayNotHasKey('fields_toolbar', $data);
59 } 59 }
60
61 /**
62 * Test render_includes hook while logged in.
63 */
64 function testAddlinkIncludesLoggedIn()
65 {
66 $str = 'stuff';
67 $data = array($str => $str);
68 $data['_PAGE_'] = Router::$PAGE_LINKLIST;
69 $data['_LOGGEDIN_'] = true;
70
71 $data = hook_addlink_toolbar_render_includes($data);
72 $this->assertEquals($str, $data[$str]);
73 $this->assertEquals(1, count($data['css_files']));
74
75 $str = 'stuff';
76 $data = array($str => $str);
77 $data['_PAGE_'] = $str;
78 $data['_LOGGEDIN_'] = true;
79
80 $data = hook_addlink_toolbar_render_includes($data);
81 $this->assertEquals($str, $data[$str]);
82 $this->assertArrayNotHasKey('css_files', $data);
83 }
84
85 /**
86 * Test render_includes hook.
87 * Should not affect css files while logged out.
88 */
89 function testAddlinkIncludesLoggedOut()
90 {
91 $str = 'stuff';
92 $data = array($str => $str);
93 $data['_PAGE_'] = Router::$PAGE_LINKLIST;
94 $data['_LOGGEDIN_'] = false;
95
96 $data = hook_addlink_toolbar_render_includes($data);
97 $this->assertEquals($str, $data[$str]);
98 $this->assertArrayNotHasKey('css_files', $data);
99 }
100} 60}
diff --git a/tests/plugins/PluginArchiveorgTest.php b/tests/plugins/PluginArchiveorgTest.php
index 4daa4c9d..fecd5f2c 100644
--- a/tests/plugins/PluginArchiveorgTest.php
+++ b/tests/plugins/PluginArchiveorgTest.php
@@ -15,7 +15,7 @@ class PluginArchiveorgTest extends PHPUnit_Framework_TestCase
15 /** 15 /**
16 * Reset plugin path 16 * Reset plugin path
17 */ 17 */
18 function setUp() 18 public function setUp()
19 { 19 {
20 PluginManager::$PLUGINS_PATH = 'plugins'; 20 PluginManager::$PLUGINS_PATH = 'plugins';
21 } 21 }
@@ -23,7 +23,7 @@ class PluginArchiveorgTest extends PHPUnit_Framework_TestCase
23 /** 23 /**
24 * Test render_linklist hook on external links. 24 * Test render_linklist hook on external links.
25 */ 25 */
26 function testArchiveorgLinklistOnExternalLinks() 26 public function testArchiveorgLinklistOnExternalLinks()
27 { 27 {
28 $str = 'http://randomstr.com/test'; 28 $str = 'http://randomstr.com/test';
29 29
@@ -48,13 +48,12 @@ class PluginArchiveorgTest extends PHPUnit_Framework_TestCase
48 // plugin data 48 // plugin data
49 $this->assertEquals(1, count($link['link_plugin'])); 49 $this->assertEquals(1, count($link['link_plugin']));
50 $this->assertNotFalse(strpos($link['link_plugin'][0], $str)); 50 $this->assertNotFalse(strpos($link['link_plugin'][0], $str));
51
52 } 51 }
53 52
54 /** 53 /**
55 * Test render_linklist hook on internal links. 54 * Test render_linklist hook on internal links.
56 */ 55 */
57 function testArchiveorgLinklistOnInternalLinks() 56 public function testArchiveorgLinklistOnInternalLinks()
58 { 57 {
59 $internalLink1 = 'http://shaarli.shaarli/?qvMAqg'; 58 $internalLink1 = 'http://shaarli.shaarli/?qvMAqg';
60 $internalLinkRealURL1 = '?qvMAqg'; 59 $internalLinkRealURL1 = '?qvMAqg';
@@ -101,7 +100,6 @@ class PluginArchiveorgTest extends PHPUnit_Framework_TestCase
101 ) 100 )
102 ); 101 );
103 102
104
105 $data = hook_archiveorg_render_linklist($data); 103 $data = hook_archiveorg_render_linklist($data);
106 104
107 // Case n°1: first link type, public 105 // Case n°1: first link type, public
@@ -136,7 +134,5 @@ class PluginArchiveorgTest extends PHPUnit_Framework_TestCase
136 $link = $data['links'][5]; 134 $link = $data['links'][5];
137 135
138 $this->assertArrayNotHasKey('link_plugin', $link); 136 $this->assertArrayNotHasKey('link_plugin', $link);
139
140 } 137 }
141
142} 138}
diff --git a/tests/plugins/PluginIssoTest.php b/tests/plugins/PluginIssoTest.php
index 6b7904dd..0ae73183 100644
--- a/tests/plugins/PluginIssoTest.php
+++ b/tests/plugins/PluginIssoTest.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2use Shaarli\Config\ConfigManager;
2 3
3require_once 'plugins/isso/isso.php'; 4require_once 'plugins/isso/isso.php';
4 5
@@ -12,7 +13,7 @@ class PluginIssoTest extends PHPUnit_Framework_TestCase
12 /** 13 /**
13 * Reset plugin path 14 * Reset plugin path
14 */ 15 */
15 function setUp() 16 public function setUp()
16 { 17 {
17 PluginManager::$PLUGINS_PATH = 'plugins'; 18 PluginManager::$PLUGINS_PATH = 'plugins';
18 } 19 }
@@ -20,7 +21,7 @@ class PluginIssoTest extends PHPUnit_Framework_TestCase
20 /** 21 /**
21 * Test Isso init without errors. 22 * Test Isso init without errors.
22 */ 23 */
23 function testWallabagInitNoError() 24 public function testWallabagInitNoError()
24 { 25 {
25 $conf = new ConfigManager(''); 26 $conf = new ConfigManager('');
26 $conf->set('plugins.ISSO_SERVER', 'value'); 27 $conf->set('plugins.ISSO_SERVER', 'value');
@@ -31,7 +32,7 @@ class PluginIssoTest extends PHPUnit_Framework_TestCase
31 /** 32 /**
32 * Test Isso init with errors. 33 * Test Isso init with errors.
33 */ 34 */
34 function testWallabagInitError() 35 public function testWallabagInitError()
35 { 36 {
36 $conf = new ConfigManager(''); 37 $conf = new ConfigManager('');
37 $errors = isso_init($conf); 38 $errors = isso_init($conf);
@@ -41,7 +42,7 @@ class PluginIssoTest extends PHPUnit_Framework_TestCase
41 /** 42 /**
42 * Test render_linklist hook with valid settings to display the comment form. 43 * Test render_linklist hook with valid settings to display the comment form.
43 */ 44 */
44 function testIssoDisplayed() 45 public function testIssoDisplayed()
45 { 46 {
46 $conf = new ConfigManager(''); 47 $conf = new ConfigManager('');
47 $conf->set('plugins.ISSO_SERVER', 'value'); 48 $conf->set('plugins.ISSO_SERVER', 'value');
@@ -81,7 +82,7 @@ class PluginIssoTest extends PHPUnit_Framework_TestCase
81 /** 82 /**
82 * Test isso plugin when multiple links are displayed (shouldn't be displayed). 83 * Test isso plugin when multiple links are displayed (shouldn't be displayed).
83 */ 84 */
84 function testIssoMultipleLinks() 85 public function testIssoMultipleLinks()
85 { 86 {
86 $conf = new ConfigManager(''); 87 $conf = new ConfigManager('');
87 $conf->set('plugins.ISSO_SERVER', 'value'); 88 $conf->set('plugins.ISSO_SERVER', 'value');
@@ -113,7 +114,7 @@ class PluginIssoTest extends PHPUnit_Framework_TestCase
113 /** 114 /**
114 * Test isso plugin when using search (shouldn't be displayed). 115 * Test isso plugin when using search (shouldn't be displayed).
115 */ 116 */
116 function testIssoNotDisplayedWhenSearch() 117 public function testIssoNotDisplayedWhenSearch()
117 { 118 {
118 $conf = new ConfigManager(''); 119 $conf = new ConfigManager('');
119 $conf->set('plugins.ISSO_SERVER', 'value'); 120 $conf->set('plugins.ISSO_SERVER', 'value');
@@ -141,7 +142,7 @@ class PluginIssoTest extends PHPUnit_Framework_TestCase
141 /** 142 /**
142 * Test isso plugin without server configuration (shouldn't be displayed). 143 * Test isso plugin without server configuration (shouldn't be displayed).
143 */ 144 */
144 function testIssoWithoutConf() 145 public function testIssoWithoutConf()
145 { 146 {
146 $data = 'abc'; 147 $data = 'abc';
147 $conf = new ConfigManager(''); 148 $conf = new ConfigManager('');
diff --git a/tests/plugins/PluginMarkdownTest.php b/tests/plugins/PluginMarkdownTest.php
index f1e1acf8..96891f1f 100644
--- a/tests/plugins/PluginMarkdownTest.php
+++ b/tests/plugins/PluginMarkdownTest.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2use Shaarli\Config\ConfigManager;
2 3
3/** 4/**
4 * PluginMarkdownTest.php 5 * PluginMarkdownTest.php
@@ -21,17 +22,18 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
21 /** 22 /**
22 * Reset plugin path 23 * Reset plugin path
23 */ 24 */
24 function setUp() 25 public function setUp()
25 { 26 {
26 PluginManager::$PLUGINS_PATH = 'plugins'; 27 PluginManager::$PLUGINS_PATH = 'plugins';
27 $this->conf = new ConfigManager('tests/utils/config/configJson'); 28 $this->conf = new ConfigManager('tests/utils/config/configJson');
29 $this->conf->set('security.allowed_protocols', ['ftp', 'magnet']);
28 } 30 }
29 31
30 /** 32 /**
31 * Test render_linklist hook. 33 * Test render_linklist hook.
32 * Only check that there is basic markdown rendering. 34 * Only check that there is basic markdown rendering.
33 */ 35 */
34 function testMarkdownLinklist() 36 public function testMarkdownLinklist()
35 { 37 {
36 $markdown = '# My title' . PHP_EOL . 'Very interesting content.'; 38 $markdown = '# My title' . PHP_EOL . 'Very interesting content.';
37 $data = array( 39 $data = array(
@@ -51,7 +53,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
51 * Test render_daily hook. 53 * Test render_daily hook.
52 * Only check that there is basic markdown rendering. 54 * Only check that there is basic markdown rendering.
53 */ 55 */
54 function testMarkdownDaily() 56 public function testMarkdownDaily()
55 { 57 {
56 $markdown = '# My title' . PHP_EOL . 'Very interesting content.'; 58 $markdown = '# My title' . PHP_EOL . 'Very interesting content.';
57 $data = array( 59 $data = array(
@@ -75,7 +77,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
75 /** 77 /**
76 * Test reverse_text2clickable(). 78 * Test reverse_text2clickable().
77 */ 79 */
78 function testReverseText2clickable() 80 public function testReverseText2clickable()
79 { 81 {
80 $text = 'stuff http://hello.there/is=someone#here otherstuff'; 82 $text = 'stuff http://hello.there/is=someone#here otherstuff';
81 $clickableText = text2clickable($text, ''); 83 $clickableText = text2clickable($text, '');
@@ -86,7 +88,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
86 /** 88 /**
87 * Test reverse_nl2br(). 89 * Test reverse_nl2br().
88 */ 90 */
89 function testReverseNl2br() 91 public function testReverseNl2br()
90 { 92 {
91 $text = 'stuff' . PHP_EOL . 'otherstuff'; 93 $text = 'stuff' . PHP_EOL . 'otherstuff';
92 $processedText = nl2br($text); 94 $processedText = nl2br($text);
@@ -97,7 +99,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
97 /** 99 /**
98 * Test reverse_space2nbsp(). 100 * Test reverse_space2nbsp().
99 */ 101 */
100 function testReverseSpace2nbsp() 102 public function testReverseSpace2nbsp()
101 { 103 {
102 $text = ' stuff' . PHP_EOL . ' otherstuff and another'; 104 $text = ' stuff' . PHP_EOL . ' otherstuff and another';
103 $processedText = space2nbsp($text); 105 $processedText = space2nbsp($text);
@@ -108,7 +110,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
108 /** 110 /**
109 * Test sanitize_html(). 111 * Test sanitize_html().
110 */ 112 */
111 function testSanitizeHtml() 113 public function testSanitizeHtml()
112 { 114 {
113 $input = '< script src="js.js"/>'; 115 $input = '< script src="js.js"/>';
114 $input .= '< script attr>alert(\'xss\');</script>'; 116 $input .= '< script attr>alert(\'xss\');</script>';
@@ -127,7 +129,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
127 /** 129 /**
128 * Test the no markdown tag. 130 * Test the no markdown tag.
129 */ 131 */
130 function testNoMarkdownTag() 132 public function testNoMarkdownTag()
131 { 133 {
132 $str = 'All _work_ and `no play` makes Jack a *dull* boy.'; 134 $str = 'All _work_ and `no play` makes Jack a *dull* boy.';
133 $data = array( 135 $data = array(
@@ -166,7 +168,7 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
166 /** 168 /**
167 * Test that a close value to nomarkdown is not understand as nomarkdown (previous value `.nomarkdown`). 169 * Test that a close value to nomarkdown is not understand as nomarkdown (previous value `.nomarkdown`).
168 */ 170 */
169 function testNoMarkdownNotExcactlyMatching() 171 public function testNoMarkdownNotExcactlyMatching()
170 { 172 {
171 $str = 'All _work_ and `no play` makes Jack a *dull* boy.'; 173 $str = 'All _work_ and `no play` makes Jack a *dull* boy.';
172 $data = array( 174 $data = array(
@@ -182,15 +184,19 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
182 } 184 }
183 185
184 /** 186 /**
185 * Test hashtag links processed with markdown. 187 * Make sure that the generated HTML match the reference HTML file.
186 */ 188 */
187 function testMarkdownHashtagLinks() 189 public function testMarkdownGlobalProcessDescription()
188 { 190 {
189 $md = file_get_contents('tests/plugins/resources/markdown.md'); 191 $md = file_get_contents('tests/plugins/resources/markdown.md');
190 $md = format_description($md); 192 $md = format_description($md);
191 $html = file_get_contents('tests/plugins/resources/markdown.html'); 193 $html = file_get_contents('tests/plugins/resources/markdown.html');
192 194
193 $data = process_markdown($md); 195 $data = process_markdown(
196 $md,
197 $this->conf->get('security.markdown_escape', true),
198 $this->conf->get('security.allowed_protocols')
199 );
194 $this->assertEquals($html, $data); 200 $this->assertEquals($html, $data);
195 } 201 }
196 202
diff --git a/tests/plugins/PluginPlayvideosTest.php b/tests/plugins/PluginPlayvideosTest.php
index be1ef774..29ad047f 100644
--- a/tests/plugins/PluginPlayvideosTest.php
+++ b/tests/plugins/PluginPlayvideosTest.php
@@ -16,7 +16,7 @@ class PluginPlayvideosTest extends PHPUnit_Framework_TestCase
16 /** 16 /**
17 * Reset plugin path 17 * Reset plugin path
18 */ 18 */
19 function setUp() 19 public function setUp()
20 { 20 {
21 PluginManager::$PLUGINS_PATH = 'plugins'; 21 PluginManager::$PLUGINS_PATH = 'plugins';
22 } 22 }
@@ -24,7 +24,7 @@ class PluginPlayvideosTest extends PHPUnit_Framework_TestCase
24 /** 24 /**
25 * Test render_linklist hook. 25 * Test render_linklist hook.
26 */ 26 */
27 function testPlayvideosHeader() 27 public function testPlayvideosHeader()
28 { 28 {
29 $str = 'stuff'; 29 $str = 'stuff';
30 $data = array($str => $str); 30 $data = array($str => $str);
@@ -43,7 +43,7 @@ class PluginPlayvideosTest extends PHPUnit_Framework_TestCase
43 /** 43 /**
44 * Test render_footer hook. 44 * Test render_footer hook.
45 */ 45 */
46 function testPlayvideosFooter() 46 public function testPlayvideosFooter()
47 { 47 {
48 $str = 'stuff'; 48 $str = 'stuff';
49 $data = array($str => $str); 49 $data = array($str => $str);
diff --git a/tests/plugins/PluginPubsubhubbubTest.php b/tests/plugins/PluginPubsubhubbubTest.php
new file mode 100644
index 00000000..69d00936
--- /dev/null
+++ b/tests/plugins/PluginPubsubhubbubTest.php
@@ -0,0 +1,55 @@
1<?php
2use Shaarli\Config\ConfigManager;
3
4require_once 'plugins/pubsubhubbub/pubsubhubbub.php';
5require_once 'application/Router.php';
6
7/**
8 * Class PluginPubsubhubbubTest
9 * Unit test for the pubsubhubbub plugin
10 */
11class PluginPubsubhubbubTest extends PHPUnit_Framework_TestCase
12{
13 /**
14 * @var string Config file path (without extension).
15 */
16 protected static $configFile = 'tests/utils/config/configJson';
17
18 /**
19 * Reset plugin path
20 */
21 public function setUp()
22 {
23 PluginManager::$PLUGINS_PATH = 'plugins';
24 }
25
26 /**
27 * Test render_feed hook with an RSS feed.
28 */
29 public function testPubSubRssRenderFeed()
30 {
31 $hub = 'http://domain.hub';
32 $conf = new ConfigManager(self::$configFile);
33 $conf->set('plugins.PUBSUBHUB_URL', $hub);
34 $data['_PAGE_'] = Router::$PAGE_FEED_RSS;
35
36 $data = hook_pubsubhubbub_render_feed($data, $conf);
37 $expected = '<atom:link rel="hub" href="'. $hub .'" />';
38 $this->assertEquals($expected, $data['feed_plugins_header'][0]);
39 }
40
41 /**
42 * Test render_feed hook with an ATOM feed.
43 */
44 public function testPubSubAtomRenderFeed()
45 {
46 $hub = 'http://domain.hub';
47 $conf = new ConfigManager(self::$configFile);
48 $conf->set('plugins.PUBSUBHUB_URL', $hub);
49 $data['_PAGE_'] = Router::$PAGE_FEED_ATOM;
50
51 $data = hook_pubsubhubbub_render_feed($data, $conf);
52 $expected = '<link rel="hub" href="'. $hub .'" />';
53 $this->assertEquals($expected, $data['feed_plugins_header'][0]);
54 }
55}
diff --git a/tests/plugins/PlugQrcodeTest.php b/tests/plugins/PluginQrcodeTest.php
index 86dc7f29..ebfadddf 100644
--- a/tests/plugins/PlugQrcodeTest.php
+++ b/tests/plugins/PluginQrcodeTest.php
@@ -1,29 +1,28 @@
1<?php 1<?php
2
3/** 2/**
4 * PlugQrcodeTest.php 3 * PluginQrcodeTest.php
5 */ 4 */
6 5
7require_once 'plugins/qrcode/qrcode.php'; 6require_once 'plugins/qrcode/qrcode.php';
8require_once 'application/Router.php'; 7require_once 'application/Router.php';
9 8
10/** 9/**
11 * Class PlugQrcodeTest 10 * Class PluginQrcodeTest
12 * Unit test for the QR-Code plugin 11 * Unit test for the QR-Code plugin
13 */ 12 */
14class PlugQrcodeTest extends PHPUnit_Framework_TestCase 13class PluginQrcodeTest extends PHPUnit_Framework_TestCase
15{ 14{
16 /** 15 /**
17 * Reset plugin path 16 * Reset plugin path
18 */ 17 */
19 function setUp() { 18 public function setUp() {
20 PluginManager::$PLUGINS_PATH = 'plugins'; 19 PluginManager::$PLUGINS_PATH = 'plugins';
21 } 20 }
22 21
23 /** 22 /**
24 * Test render_linklist hook. 23 * Test render_linklist hook.
25 */ 24 */
26 function testQrcodeLinklist() 25 public function testQrcodeLinklist()
27 { 26 {
28 $str = 'http://randomstr.com/test'; 27 $str = 'http://randomstr.com/test';
29 $data = array( 28 $data = array(
@@ -49,7 +48,7 @@ class PlugQrcodeTest extends PHPUnit_Framework_TestCase
49 /** 48 /**
50 * Test render_footer hook. 49 * Test render_footer hook.
51 */ 50 */
52 function testQrcodeFooter() 51 public function testQrcodeFooter()
53 { 52 {
54 $str = 'stuff'; 53 $str = 'stuff';
55 $data = array($str => $str); 54 $data = array($str => $str);
diff --git a/tests/plugins/PluginReadityourselfTest.php b/tests/plugins/PluginReadityourselfTest.php
deleted file mode 100644
index 532db146..00000000
--- a/tests/plugins/PluginReadityourselfTest.php
+++ /dev/null
@@ -1,98 +0,0 @@
1<?php
2
3/**
4 * PluginReadityourselfTest.php.php
5 */
6
7require_once 'plugins/readityourself/readityourself.php';
8
9/**
10 * Class PluginWallabagTest
11 * Unit test for the Wallabag plugin
12 */
13class PluginReadityourselfTest extends PHPUnit_Framework_TestCase
14{
15 /**
16 * Reset plugin path
17 */
18 function setUp()
19 {
20 PluginManager::$PLUGINS_PATH = 'plugins';
21 }
22
23 /**
24 * Test Readityourself init without errors.
25 */
26 function testReadityourselfInitNoError()
27 {
28 $conf = new ConfigManager('');
29 $conf->set('plugins.READITYOUSELF_URL', 'value');
30 $errors = readityourself_init($conf);
31 $this->assertEmpty($errors);
32 }
33
34 /**
35 * Test Readityourself init with errors.
36 */
37 function testReadityourselfInitError()
38 {
39 $conf = new ConfigManager('');
40 $errors = readityourself_init($conf);
41 $this->assertNotEmpty($errors);
42 }
43
44 /**
45 * Test render_linklist hook.
46 */
47 function testReadityourselfLinklist()
48 {
49 $conf = new ConfigManager('');
50 $conf->set('plugins.READITYOUSELF_URL', 'value');
51 $str = 'http://randomstr.com/test';
52 $data = array(
53 'title' => $str,
54 'links' => array(
55 array(
56 'url' => $str,
57 )
58 )
59 );
60
61 $data = hook_readityourself_render_linklist($data, $conf);
62 $link = $data['links'][0];
63 // data shouldn't be altered
64 $this->assertEquals($str, $data['title']);
65 $this->assertEquals($str, $link['url']);
66
67 // plugin data
68 $this->assertEquals(1, count($link['link_plugin']));
69 $this->assertNotFalse(strpos($link['link_plugin'][0], $str));
70 }
71
72 /**
73 * Test without config: nothing should happened.
74 */
75 function testReadityourselfLinklistWithoutConfig()
76 {
77 $conf = new ConfigManager('');
78 $conf->set('plugins.READITYOUSELF_URL', null);
79 $str = 'http://randomstr.com/test';
80 $data = array(
81 'title' => $str,
82 'links' => array(
83 array(
84 'url' => $str,
85 )
86 )
87 );
88
89 $data = hook_readityourself_render_linklist($data, $conf);
90 $link = $data['links'][0];
91 // data shouldn't be altered
92 $this->assertEquals($str, $data['title']);
93 $this->assertEquals($str, $link['url']);
94
95 // plugin data
96 $this->assertArrayNotHasKey('link_plugin', $link);
97 }
98}
diff --git a/tests/plugins/PluginWallabagTest.php b/tests/plugins/PluginWallabagTest.php
index 2c268cbd..76b7887e 100644
--- a/tests/plugins/PluginWallabagTest.php
+++ b/tests/plugins/PluginWallabagTest.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2use Shaarli\Config\ConfigManager;
2 3
3/** 4/**
4 * PluginWallabagTest.php.php 5 * PluginWallabagTest.php.php
@@ -15,7 +16,7 @@ class PluginWallabagTest extends PHPUnit_Framework_TestCase
15 /** 16 /**
16 * Reset plugin path 17 * Reset plugin path
17 */ 18 */
18 function setUp() 19 public function setUp()
19 { 20 {
20 PluginManager::$PLUGINS_PATH = 'plugins'; 21 PluginManager::$PLUGINS_PATH = 'plugins';
21 } 22 }
@@ -23,7 +24,7 @@ class PluginWallabagTest extends PHPUnit_Framework_TestCase
23 /** 24 /**
24 * Test wallabag init without errors. 25 * Test wallabag init without errors.
25 */ 26 */
26 function testWallabagInitNoError() 27 public function testWallabagInitNoError()
27 { 28 {
28 $conf = new ConfigManager(''); 29 $conf = new ConfigManager('');
29 $conf->set('plugins.WALLABAG_URL', 'value'); 30 $conf->set('plugins.WALLABAG_URL', 'value');
@@ -34,7 +35,7 @@ class PluginWallabagTest extends PHPUnit_Framework_TestCase
34 /** 35 /**
35 * Test wallabag init with errors. 36 * Test wallabag init with errors.
36 */ 37 */
37 function testWallabagInitError() 38 public function testWallabagInitError()
38 { 39 {
39 $conf = new ConfigManager(''); 40 $conf = new ConfigManager('');
40 $errors = wallabag_init($conf); 41 $errors = wallabag_init($conf);
@@ -44,7 +45,7 @@ class PluginWallabagTest extends PHPUnit_Framework_TestCase
44 /** 45 /**
45 * Test render_linklist hook. 46 * Test render_linklist hook.
46 */ 47 */
47 function testWallabagLinklist() 48 public function testWallabagLinklist()
48 { 49 {
49 $conf = new ConfigManager(''); 50 $conf = new ConfigManager('');
50 $conf->set('plugins.WALLABAG_URL', 'value'); 51 $conf->set('plugins.WALLABAG_URL', 'value');
diff --git a/tests/plugins/WallabagInstanceTest.php b/tests/plugins/WallabagInstanceTest.php
index 7c14c1df..2c466871 100644
--- a/tests/plugins/WallabagInstanceTest.php
+++ b/tests/plugins/WallabagInstanceTest.php
@@ -15,7 +15,7 @@ class WallabagInstanceTest extends PHPUnit_Framework_TestCase
15 /** 15 /**
16 * Reset plugin path 16 * Reset plugin path
17 */ 17 */
18 function setUp() 18 public function setUp()
19 { 19 {
20 $this->instance = 'http://some.url'; 20 $this->instance = 'http://some.url';
21 } 21 }
@@ -23,7 +23,7 @@ class WallabagInstanceTest extends PHPUnit_Framework_TestCase
23 /** 23 /**
24 * Test WallabagInstance with API V1. 24 * Test WallabagInstance with API V1.
25 */ 25 */
26 function testWallabagInstanceV1() 26 public function testWallabagInstanceV1()
27 { 27 {
28 $instance = new WallabagInstance($this->instance, 1); 28 $instance = new WallabagInstance($this->instance, 1);
29 $expected = $this->instance . '/?plainurl='; 29 $expected = $this->instance . '/?plainurl=';
@@ -34,7 +34,7 @@ class WallabagInstanceTest extends PHPUnit_Framework_TestCase
34 /** 34 /**
35 * Test WallabagInstance with API V2. 35 * Test WallabagInstance with API V2.
36 */ 36 */
37 function testWallabagInstanceV2() 37 public function testWallabagInstanceV2()
38 { 38 {
39 $instance = new WallabagInstance($this->instance, 2); 39 $instance = new WallabagInstance($this->instance, 2);
40 $expected = $this->instance . '/bookmarklet?url='; 40 $expected = $this->instance . '/bookmarklet?url=';
@@ -45,7 +45,7 @@ class WallabagInstanceTest extends PHPUnit_Framework_TestCase
45 /** 45 /**
46 * Test WallabagInstance with an invalid API version. 46 * Test WallabagInstance with an invalid API version.
47 */ 47 */
48 function testWallabagInstanceInvalidVersion() 48 public function testWallabagInstanceInvalidVersion()
49 { 49 {
50 $instance = new WallabagInstance($this->instance, false); 50 $instance = new WallabagInstance($this->instance, false);
51 $expected = $this->instance . '/?plainurl='; 51 $expected = $this->instance . '/?plainurl=';
diff --git a/tests/plugins/resources/markdown.html b/tests/plugins/resources/markdown.html
index 07a5a32e..844a6f31 100644
--- a/tests/plugins/resources/markdown.html
+++ b/tests/plugins/resources/markdown.html
@@ -21,4 +21,13 @@
21next #foo</code></pre> 21next #foo</code></pre>
22<p>Block:</p> 22<p>Block:</p>
23<pre><code>lorem ipsum #foobar http://link.tld 23<pre><code>lorem ipsum #foobar http://link.tld
24#foobar http://link.tld</code></pre></div> \ No newline at end of file 24#foobar http://link.tld</code></pre>
25<p><a href="?123456">link</a><br />
26<img src="/img/train.png" alt="link" /><br />
27<a href="http://test.tld/path/?query=value#hash">link</a><br />
28<a href="http://test.tld/path/?query=value#hash">link</a><br />
29<a href="https://test.tld/path/?query=value#hash">link</a><br />
30<a href="ftp://test.tld/path/?query=value#hash">link</a><br />
31<a href="magnet:test.tld/path/?query=value#hash">link</a><br />
32<a href="http://alert('xss')">link</a><br />
33<a href="http://test.tld/path/?query=value#hash">link</a></p></div> \ No newline at end of file
diff --git a/tests/plugins/resources/markdown.md b/tests/plugins/resources/markdown.md
index 0b8be7c5..b8ebd934 100644
--- a/tests/plugins/resources/markdown.md
+++ b/tests/plugins/resources/markdown.md
@@ -21,4 +21,14 @@ Block:
21``` 21```
22lorem ipsum #foobar http://link.tld 22lorem ipsum #foobar http://link.tld
23#foobar http://link.tld 23#foobar http://link.tld
24``` \ No newline at end of file 24```
25
26[link](?123456)
27![link](/img/train.png)
28[link](test.tld/path/?query=value#hash)
29[link](http://test.tld/path/?query=value#hash)
30[link](https://test.tld/path/?query=value#hash)
31[link](ftp://test.tld/path/?query=value#hash)
32[link](magnet:test.tld/path/?query=value#hash)
33[link](javascript:alert('xss'))
34[link](other://test.tld/path/?query=value#hash) \ No newline at end of file
diff --git a/tests/utils/FakeConfigManager.php b/tests/utils/FakeConfigManager.php
new file mode 100644
index 00000000..f29760cb
--- /dev/null
+++ b/tests/utils/FakeConfigManager.php
@@ -0,0 +1,12 @@
1<?php
2
3/**
4 * Fake ConfigManager
5 */
6class FakeConfigManager
7{
8 public static function get($key)
9 {
10 return $key;
11 }
12}
diff --git a/tests/utils/ReferenceHistory.php b/tests/utils/ReferenceHistory.php
new file mode 100644
index 00000000..75cbb326
--- /dev/null
+++ b/tests/utils/ReferenceHistory.php
@@ -0,0 +1,82 @@
1<?php
2
3/**
4 * Populates a reference history
5 */
6class ReferenceHistory
7{
8 private $count;
9
10 private $history = [];
11
12 /**
13 * Populates the test DB with reference data
14 */
15 public function __construct()
16 {
17 $this->addEntry(
18 History::DELETED,
19 DateTime::createFromFormat('Ymd_His', '20170303_121216'),
20 124
21 );
22
23 $this->addEntry(
24 History::SETTINGS,
25 DateTime::createFromFormat('Ymd_His', '20170302_121215')
26 );
27
28 $this->addEntry(
29 History::UPDATED,
30 DateTime::createFromFormat('Ymd_His', '20170301_121214'),
31 123
32 );
33
34 $this->addEntry(
35 History::CREATED,
36 DateTime::createFromFormat('Ymd_His', '20170201_121214'),
37 124
38 );
39
40 $this->addEntry(
41 History::CREATED,
42 DateTime::createFromFormat('Ymd_His', '20170101_121212'),
43 123
44 );
45 }
46
47 /**
48 * Adds a new history entry
49 *
50 * @param string $event Event identifier
51 * @param DateTime $datetime creation date
52 * @param int $id optional: related link ID
53 */
54 protected function addEntry($event, $datetime, $id = null)
55 {
56 $link = [
57 'event' => $event,
58 'datetime' => $datetime,
59 'id' => $id,
60 ];
61 $this->history[] = $link;
62 $this->count++;
63 }
64
65 /**
66 * Writes data to the datastore
67 *
68 * @param string $filename write history content to.
69 */
70 public function write($filename)
71 {
72 FileUtils::writeFlatDB($filename, $this->history);
73 }
74
75 /**
76 * Returns the number of links in the reference data
77 */
78 public function count()
79 {
80 return $this->count;
81 }
82}
diff --git a/tests/utils/ReferenceLinkDB.php b/tests/utils/ReferenceLinkDB.php
index 36d58c68..e887aa78 100644
--- a/tests/utils/ReferenceLinkDB.php
+++ b/tests/utils/ReferenceLinkDB.php
@@ -4,7 +4,7 @@
4 */ 4 */
5class ReferenceLinkDB 5class ReferenceLinkDB
6{ 6{
7 public static $NB_LINKS_TOTAL = 8; 7 public static $NB_LINKS_TOTAL = 9;
8 8
9 private $_links = array(); 9 private $_links = array();
10 private $_publicCount = 0; 10 private $_publicCount = 0;
@@ -38,6 +38,16 @@ class ReferenceLinkDB
38 ); 38 );
39 39
40 $this->addLink( 40 $this->addLink(
41 9,
42 'PSR-2: Coding Style Guide',
43 'http://www.php-fig.org/psr/psr-2/',
44 'This guide extends and expands on PSR-1, the basic coding standard.',
45 0,
46 DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20121206_152312'),
47 ''
48 );
49
50 $this->addLink(
41 8, 51 8,
42 'Free as in Freedom 2.0 @website', 52 'Free as in Freedom 2.0 @website',
43 'https://static.fsf.org/nosvn/faif-2.0.pdf', 53 'https://static.fsf.org/nosvn/faif-2.0.pdf',
@@ -56,7 +66,7 @@ class ReferenceLinkDB
56 0, 66 0,
57 DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20130614_184135'), 67 DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20130614_184135'),
58 'gnu media web .hidden hashtag', 68 'gnu media web .hidden hashtag',
59 null, 69 DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20130615_184230'),
60 'IuWvgA' 70 'IuWvgA'
61 ); 71 );
62 72
@@ -131,6 +141,7 @@ class ReferenceLinkDB
131 */ 141 */
132 public function write($filename) 142 public function write($filename)
133 { 143 {
144 $this->reorder();
134 file_put_contents( 145 file_put_contents(
135 $filename, 146 $filename,
136 '<?php /* '.base64_encode(gzdeflate(serialize($this->_links))).' */ ?>' 147 '<?php /* '.base64_encode(gzdeflate(serialize($this->_links))).' */ ?>'
@@ -138,6 +149,27 @@ class ReferenceLinkDB
138 } 149 }
139 150
140 /** 151 /**
152 * Reorder links by creation date (newest first).
153 *
154 * Also update the urls and ids mapping arrays.
155 *
156 * @param string $order ASC|DESC
157 */
158 public function reorder($order = 'DESC')
159 {
160 // backward compatibility: ignore reorder if the the `created` field doesn't exist
161 if (! isset(array_values($this->_links)[0]['created'])) {
162 return;
163 }
164
165 $order = $order === 'ASC' ? -1 : 1;
166 // Reorder array by dates.
167 usort($this->_links, function($a, $b) use ($order) {
168 return $a['created'] < $b['created'] ? 1 * $order : -1 * $order;
169 });
170 }
171
172 /**
141 * Returns the number of links in the reference data 173 * Returns the number of links in the reference data
142 */ 174 */
143 public function countLinks() 175 public function countLinks()
@@ -161,8 +193,23 @@ class ReferenceLinkDB
161 return $this->_privateCount; 193 return $this->_privateCount;
162 } 194 }
163 195
196 /**
197 * Returns the number of links without tag
198 */
199 public function countUntaggedLinks()
200 {
201 $cpt = 0;
202 foreach ($this->_links as $link) {
203 if (empty($link['tags'])) {
204 ++$cpt;
205 }
206 }
207 return $cpt;
208 }
209
164 public function getLinks() 210 public function getLinks()
165 { 211 {
212 $this->reorder();
166 return $this->_links; 213 return $this->_links;
167 } 214 }
168 215
diff --git a/tests/utils/config/configJson.json.php b/tests/utils/config/configJson.json.php
index 06a302e8..9c9288f3 100644
--- a/tests/utils/config/configJson.json.php
+++ b/tests/utils/config/configJson.json.php
@@ -24,7 +24,8 @@
24 }, 24 },
25 "resource": { 25 "resource": {
26 "datastore": "tests\/utils\/config\/datastore.php", 26 "datastore": "tests\/utils\/config\/datastore.php",
27 "data_dir": "tests\/utils\/config" 27 "data_dir": "sandbox/",
28 "raintpl_tpl": "tpl/"
28 }, 29 },
29 "plugins": { 30 "plugins": {
30 "WALLABAG_VERSION": 1 31 "WALLABAG_VERSION": 1
diff --git a/tests/utils/config/emptyConfigPhp.php b/tests/utils/config/emptyConfigPhp.php
new file mode 100644
index 00000000..b3d9bbc7
--- /dev/null
+++ b/tests/utils/config/emptyConfigPhp.php
@@ -0,0 +1 @@
<?php
diff --git a/tests/utils/languages/fr/LC_MESSAGES/test.mo b/tests/utils/languages/fr/LC_MESSAGES/test.mo
new file mode 100644
index 00000000..416c7831
--- /dev/null
+++ b/tests/utils/languages/fr/LC_MESSAGES/test.mo
Binary files differ
diff --git a/tests/utils/languages/fr/LC_MESSAGES/test.po b/tests/utils/languages/fr/LC_MESSAGES/test.po
new file mode 100644
index 00000000..89a4fd9b
--- /dev/null
+++ b/tests/utils/languages/fr/LC_MESSAGES/test.po
@@ -0,0 +1,19 @@
1msgid ""
2msgstr ""
3"Project-Id-Version: Extension test\n"
4"POT-Creation-Date: 2017-05-20 13:54+0200\n"
5"PO-Revision-Date: 2017-05-20 14:16+0200\n"
6"Last-Translator: \n"
7"Language-Team: Shaarli\n"
8"Language: fr_FR\n"
9"MIME-Version: 1.0\n"
10"Content-Type: text/plain; charset=UTF-8\n"
11"Content-Transfer-Encoding: 8bit\n"
12"Plural-Forms: nplurals=2; plural=(n > 1);\n"
13"X-Generator: Poedit 2.0.1\n"
14
15msgid "car"
16msgstr "voiture"
17
18msgid "Search"
19msgstr "Fouille"
diff --git a/tpl/default/404.html b/tpl/default/404.html
new file mode 100644
index 00000000..2de6b6da
--- /dev/null
+++ b/tpl/default/404.html
@@ -0,0 +1,16 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7<div id="pageheader">
8 {include="page.header"}
9<div class="center" id="page404">
10 <h2>{'Sorry, nothing to see here.'|t}</h2>
11 <img src="img/sad_star.png">
12 <p>{$error_message}</p>
13</div>
14{include="page.footer"}
15</body>
16</html>
diff --git a/tpl/default/addlink.html b/tpl/default/addlink.html
new file mode 100644
index 00000000..2f956e06
--- /dev/null
+++ b/tpl/default/addlink.html
@@ -0,0 +1,24 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8<div class="pure-g">
9 <div class="pure-u-lg-1-3 pure-u-1-24"></div>
10 <div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
11 <h2 class="window-title">{"Shaare a new link"|t}</h2>
12 <form method="GET" action="#" name="addform" class="addform">
13 <div>
14 <input type="text" name="post" placeholder="{'URL or leave empty to post a note'|t}" class="autofocus">
15 </div>
16 <div>
17 <input type="submit" value="{'Add link'|t}">
18 </div>
19 </form>
20 </div>
21</div>
22{include="page.footer"}
23</body>
24</html>
diff --git a/tpl/default/changepassword.html b/tpl/default/changepassword.html
new file mode 100644
index 00000000..2d15c92a
--- /dev/null
+++ b/tpl/default/changepassword.html
@@ -0,0 +1,28 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8<div class="pure-g">
9 <div class="pure-u-lg-1-3 pure-u-1-24"></div>
10 <div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
11 <h2 class="window-title">{"Change password"|t}</h2>
12 <form method="POST" action="#" name="changepasswordform" id="changepasswordform">
13 <div>
14 <input type="password" name="oldpassword" placeholder="{'Current password'|t}" class="autofocus">
15 </div>
16 <div>
17 <input type="password" name="setpassword" placeholder="{'New password'|t}">
18 </div>
19 <input type="hidden" name="token" value="{$token}">
20 <div>
21 <input type="submit" value="{'Change'|t}">
22 </div>
23 </form>
24 </div>
25</div>
26{include="page.footer"}
27</body>
28</html>
diff --git a/tpl/default/changetag.html b/tpl/default/changetag.html
new file mode 100644
index 00000000..6606c4fa
--- /dev/null
+++ b/tpl/default/changetag.html
@@ -0,0 +1,40 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8<div class="pure-g">
9 <div class="pure-u-lg-1-3 pure-u-1-24"></div>
10 <div id="addlink-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
11 <h2 class="window-title">{"Manage tags"|t}</h2>
12 <form method="POST" action="#" name="changetag" id="changetag">
13 <div>
14 <input type="text" name="fromtag" placeholder="{'Tag'|t}" value="{$fromtag}"
15 list="tagsList" autocomplete="off" class="awesomplete autofocus" data-minChars="1">
16 <datalist id="tagsList">
17 {loop="$tags"}<option>{$key}</option>{/loop}
18 </datalist>
19 </div>
20 <div>
21 <input type="text" name="totag" placeholder="{'New name'|t}"
22 list="toTagsList" autocomplete="off" class="awesomplete" data-minChars="1">
23 <datalist id="toTagsList">
24 {loop="$tags"}<option>{$key}</option>{/loop}
25 </datalist>
26 </div>
27 <div><i class="fa fa-info-circle"></i> {'Case sensitive'|t}</div>
28 <input type="hidden" name="token" value="{$token}">
29 <div>
30 <input type="submit" value="{'Rename'|t}" name="renametag">
31 <input type="submit" value="{'Delete'|t}" name="deletetag" class="button button-red confirm-delete">
32 </div>
33 </form>
34
35 <p>{'You can also edit tags in the'|t} <a href="?do=taglist&sort=usage">{'tag list'|t}</a>.</p>
36 </div>
37</div>
38{include="page.footer"}
39</body>
40</html>
diff --git a/tpl/default/configure.html b/tpl/default/configure.html
new file mode 100644
index 00000000..a63c7ad3
--- /dev/null
+++ b/tpl/default/configure.html
@@ -0,0 +1,256 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9{$ratioLabel='5-12'}
10{$ratioLabelMobile='7-8'}
11{$ratioInput='7-12'}
12{$ratioInputMobile='1-8'}
13
14<form method="POST" action="#" name="configform" id="configform">
15 <div class="pure-g">
16 <div class="pure-u-lg-1-8 pure-u-1-24"></div>
17 <div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete">
18 <h2 class="window-title">{'Configure'|t}</h2>
19 <div class="pure-g">
20 <div class="pure-u-lg-{$ratioLabel} pure-u-1">
21 <div class="form-label">
22 <label for="title">
23 <span class="label-name">Shaarli {'title'|t}</span>
24 </label>
25 </div>
26 </div>
27 <div class="pure-u-lg-7-12 pure-u-1">
28 <div class="form-input">
29 <input type="text" name="title" id="title" size="50" value="{$title}">
30 </div>
31 </div>
32 </div>
33 <div class="pure-g">
34 <div class="pure-u-lg-{$ratioLabel} pure-u-1">
35 <div class="form-label">
36 <label for="titleLink">
37 <span class="label-name">{'Home link'|t}</span><br>
38 <span class="label-desc">{'Default value'|t}: ?</span>
39 </label>
40 </div>
41 </div>
42 <div class="pure-u-lg-{$ratioInput} pure-u-1">
43 <div class="form-input">
44 <input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}">
45 </div>
46 </div>
47 </div>
48 <div class="pure-g">
49 <div class="pure-u-lg-{$ratioLabel} pure-u-1">
50 <div class="form-label">
51 <label for="titleLink">
52 <span class="label-name">{'Theme'|t}</span>
53 </label>
54 </div>
55 </div>
56 <div class="pure-u-lg-{$ratioInput} pure-u-1">
57 <div class="form-input">
58 <select name="theme" id="theme" class="align">
59 {loop="$theme_available"}
60 <option value="{$value}"
61 {if="$value===$theme"}
62 selected="selected"
63 {/if}
64 >
65 {$value|ucfirst}
66 </option>
67 {/loop}
68 </select>
69 </div>
70 </div>
71 </div>
72 <div class="pure-g">
73 <div class="pure-u-lg-{$ratioLabel} pure-u-1">
74 <div class="form-label">
75 <label for="language">
76 <span class="label-name">{'Language'|t}</span>
77 </label>
78 </div>
79 </div>
80 <div class="pure-u-lg-{$ratioInput} pure-u-1">
81 <div class="form-input">
82 <select name="language" id="language" class="align">
83 {loop="$languages"}
84 <option value="{$key}"
85 {if="$key===$language"}
86 selected="selected"
87 {/if}
88 >
89 {$value}
90 </option>
91 {/loop}
92 </select>
93 </div>
94 </div>
95 </div>
96 <div class="pure-g">
97 <div class="pure-u-lg-{$ratioLabel} pure-u-1 ">
98 <div class="form-label">
99 <label>
100 <span class="label-name">{'Timezone'|t}</span><br>
101 <span class="label-desc">{'Continent'|t} &middot; {'City'|t}</span>
102 </label>
103 </div>
104 </div>
105 <div class="pure-u-lg-{$ratioInput} pure-u-1 ">
106 <div class="form-input">
107 <div class="timezone">
108 <select id="continent" name="continent">
109 {loop="$continents"}
110 {if="$key !== 'selected'"}
111 <option value="{$value}" {if="$continents.selected === $value"}selected{/if}>
112 {$value}
113 </option>
114 {/if}
115 {/loop}
116 </select>
117 <select id="city" name="city">
118 {loop="$cities"}
119 {if="$key !== 'selected'"}
120 <option value="{$value.city}"
121 {if="$cities.selected === $value.city"}selected{/if}
122 data-continent="{$value.continent}">
123 {$value.city}
124 </option>
125 {/if}
126 {/loop}
127 </select>
128 </div>
129 </div>
130 </div>
131 </div>
132 <div class="clear"></div>
133 <div class="pure-g">
134 <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile} ">
135 <div class="form-label">
136 <label for="disablesessionprotection">
137 <span class="label-name">{'Disable session cookie hijacking protection'|t}</span><br>
138 <span class="label-desc">
139 {'Check this if you get disconnected or if your IP address changes often'|t}
140 </span>
141 </label>
142 </div>
143 </div>
144 <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile} ">
145 <div class="form-input">
146 <input type="checkbox" name="disablesessionprotection" id="disablesessionprotection"
147 {if="$session_protection_disabled"}checked{/if}>
148 </div>
149 </div>
150 </div>
151 <div class="pure-g">
152 <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile} ">
153 <div class="form-label">
154 <label for="privateLinkByDefault">
155 <span class="label-name">{'Private links by default'|t}</span><br>
156 <span class="label-desc">{'All new links are private by default'|t}</span>
157 </label>
158 </div>
159 </div>
160 <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile} ">
161 <div class="form-input">
162 <input type="checkbox" name="privateLinkByDefault" id="privateLinkByDefault"
163 {if="$private_links_default"}checked{/if}/>
164 </div>
165 </div>
166 </div>
167 <div class="pure-g">
168 <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile} ">
169 <div class="form-label">
170 <label for="enableRssPermalinks">
171 <span class="label-name">{'RSS direct links'|t}</span><br>
172 <span class="label-desc">{'Check this to use direct URL instead of permalink in feeds'|t}</span>
173 </label>
174 </div>
175 </div>
176 <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile} ">
177 <div class="form-input">
178 <input type="checkbox" name="enableRssPermalinks" id="enableRssPermalinks"
179 {if="$enable_rss_permalinks"}checked{/if}/>
180 </div>
181 </div>
182 </div>
183 <div class="pure-g">
184 <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile}">
185 <div class="form-label">
186 <label for="hidePublicLinks">
187 <span class="label-name">{'Hide public links'|t}</span><br>
188 <span class="label-desc">{'Do not show any links if the user is not logged in'|t}</span>
189 </label>
190 </div>
191 </div>
192 <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}">
193 <div class="form-input">
194 <input type="checkbox" name="hidePublicLinks" id="hidePublicLinks"
195 {if="$hide_public_links"}checked{/if}/>
196 </div>
197 </div>
198 </div>
199 <div class="pure-g">
200 <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile}">
201 <div class="form-label">
202 <label for="hidePublicLinks">
203 <span class="label-name">{'Check updates'|t}</span><br>
204 <span class="label-desc">{'Notify me when a new release is ready'|t}</span>
205 </label>
206 </div>
207 </div>
208 <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}">
209 <div class="form-input">
210 <input type="checkbox" name="updateCheck" id="updateCheck"
211 {if="$enable_update_check"}checked{/if}/>
212 </div>
213 </div>
214 </div>
215 <div class="pure-g">
216 <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile}">
217 <div class="form-label">
218 <label for="enableApi">
219 <span class="label-name">{'Enable REST API'|t}</span><br>
220 <span class="label-desc">{'Allow third party software to use Shaarli such as mobile application'|t}</span>
221 </label>
222 </div>
223 </div>
224 <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}">
225 <div class="form-input">
226 <input type="checkbox" name="enableApi" id="enableApi"
227 {if="$api_enabled"}checked{/if}/>
228 </div>
229 </div>
230 </div>
231 <div class="pure-g">
232 <div class="pure-u-lg-{$ratioLabel} pure-u-1">
233 <div class="form-label">
234 <label for="apiSecret">
235 <span class="label-name">{'API secret'|t}</span><br>
236 </label>
237 </div>
238 </div>
239 <div class="pure-u-lg-{$ratioLabel} pure-u-1">
240 <div class="form-input">
241 <input type="text" name="apiSecret" id="apiSecret" size="50" value="{$api_secret}">
242 </div>
243 </div>
244 </div>
245 <div class="center">
246 <input type="submit" value="{'Save'|t}" name="save">
247 </div>
248 </div>
249 </div>
250 <input type="hidden" name="token" value="{$token}">
251</form>
252
253{include="page.footer"}
254</body>
255</html>
256
diff --git a/tpl/default/css/font-awesome.css b/tpl/default/css/font-awesome.css
new file mode 100644
index 00000000..b2a5fe2f
--- /dev/null
+++ b/tpl/default/css/font-awesome.css
@@ -0,0 +1,2086 @@
1/*!
2 * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome
3 * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 */
5/* FONT PATH
6 * -------------------------- */
7@font-face {
8 font-family: 'FontAwesome';
9 src: url('../fonts/fontawesome-webfont.eot?v=4.5.0');
10 src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');
11 font-weight: normal;
12 font-style: normal;
13}
14.fa {
15 display: inline-block;
16 font: normal normal normal 14px/1 FontAwesome;
17 font-size: inherit;
18 text-rendering: auto;
19 -webkit-font-smoothing: antialiased;
20 -moz-osx-font-smoothing: grayscale;
21}
22/* makes the font 33% larger relative to the icon container */
23.fa-lg {
24 font-size: 1.33333333em;
25 line-height: 0.75em;
26 vertical-align: -15%;
27}
28.fa-2x {
29 font-size: 2em;
30}
31.fa-3x {
32 font-size: 3em;
33}
34.fa-4x {
35 font-size: 4em;
36}
37.fa-5x {
38 font-size: 5em;
39}
40.fa-fw {
41 width: 1.28571429em;
42 text-align: center;
43}
44.fa-ul {
45 padding-left: 0;
46 margin-left: 2.14285714em;
47 list-style-type: none;
48}
49.fa-ul > li {
50 position: relative;
51}
52.fa-li {
53 position: absolute;
54 left: -2.14285714em;
55 width: 2.14285714em;
56 top: 0.14285714em;
57 text-align: center;
58}
59.fa-li.fa-lg {
60 left: -1.85714286em;
61}
62.fa-border {
63 padding: .2em .25em .15em;
64 border: solid 0.08em #eeeeee;
65 border-radius: .1em;
66}
67.fa-pull-left {
68 float: left;
69}
70.fa-pull-right {
71 float: right;
72}
73.fa.fa-pull-left {
74 margin-right: .3em;
75}
76.fa.fa-pull-right {
77 margin-left: .3em;
78}
79/* Deprecated as of 4.4.0 */
80.pull-right {
81 float: right;
82}
83.pull-left {
84 float: left;
85}
86.fa.pull-left {
87 margin-right: .3em;
88}
89.fa.pull-right {
90 margin-left: .3em;
91}
92.fa-spin {
93 -webkit-animation: fa-spin 2s infinite linear;
94 animation: fa-spin 2s infinite linear;
95}
96.fa-pulse {
97 -webkit-animation: fa-spin 1s infinite steps(8);
98 animation: fa-spin 1s infinite steps(8);
99}
100@-webkit-keyframes fa-spin {
101 0% {
102 -webkit-transform: rotate(0deg);
103 transform: rotate(0deg);
104 }
105 100% {
106 -webkit-transform: rotate(359deg);
107 transform: rotate(359deg);
108 }
109}
110@keyframes fa-spin {
111 0% {
112 -webkit-transform: rotate(0deg);
113 transform: rotate(0deg);
114 }
115 100% {
116 -webkit-transform: rotate(359deg);
117 transform: rotate(359deg);
118 }
119}
120.fa-rotate-90 {
121 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
122 -webkit-transform: rotate(90deg);
123 -ms-transform: rotate(90deg);
124 transform: rotate(90deg);
125}
126.fa-rotate-180 {
127 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
128 -webkit-transform: rotate(180deg);
129 -ms-transform: rotate(180deg);
130 transform: rotate(180deg);
131}
132.fa-rotate-270 {
133 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
134 -webkit-transform: rotate(270deg);
135 -ms-transform: rotate(270deg);
136 transform: rotate(270deg);
137}
138.fa-flip-horizontal {
139 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
140 -webkit-transform: scale(-1, 1);
141 -ms-transform: scale(-1, 1);
142 transform: scale(-1, 1);
143}
144.fa-flip-vertical {
145 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
146 -webkit-transform: scale(1, -1);
147 -ms-transform: scale(1, -1);
148 transform: scale(1, -1);
149}
150:root .fa-rotate-90,
151:root .fa-rotate-180,
152:root .fa-rotate-270,
153:root .fa-flip-horizontal,
154:root .fa-flip-vertical {
155 filter: none;
156}
157.fa-stack {
158 position: relative;
159 display: inline-block;
160 width: 2em;
161 height: 2em;
162 line-height: 2em;
163 vertical-align: middle;
164}
165.fa-stack-1x,
166.fa-stack-2x {
167 position: absolute;
168 left: 0;
169 width: 100%;
170 text-align: center;
171}
172.fa-stack-1x {
173 line-height: inherit;
174}
175.fa-stack-2x {
176 font-size: 2em;
177}
178.fa-inverse {
179 color: #ffffff;
180}
181/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
182 readers do not read off random characters that represent icons */
183.fa-glass:before {
184 content: "\f000";
185}
186.fa-music:before {
187 content: "\f001";
188}
189.fa-search:before {
190 content: "\f002";
191}
192.fa-envelope-o:before {
193 content: "\f003";
194}
195.fa-heart:before {
196 content: "\f004";
197}
198.fa-star:before {
199 content: "\f005";
200}
201.fa-star-o:before {
202 content: "\f006";
203}
204.fa-user:before {
205 content: "\f007";
206}
207.fa-film:before {
208 content: "\f008";
209}
210.fa-th-large:before {
211 content: "\f009";
212}
213.fa-th:before {
214 content: "\f00a";
215}
216.fa-th-list:before {
217 content: "\f00b";
218}
219.fa-check:before {
220 content: "\f00c";
221}
222.fa-remove:before,
223.fa-close:before,
224.fa-times:before {
225 content: "\f00d";
226}
227.fa-search-plus:before {
228 content: "\f00e";
229}
230.fa-search-minus:before {
231 content: "\f010";
232}
233.fa-power-off:before {
234 content: "\f011";
235}
236.fa-signal:before {
237 content: "\f012";
238}
239.fa-gear:before,
240.fa-cog:before {
241 content: "\f013";
242}
243.fa-trash-o:before {
244 content: "\f014";
245}
246.fa-home:before {
247 content: "\f015";
248}
249.fa-file-o:before {
250 content: "\f016";
251}
252.fa-clock-o:before {
253 content: "\f017";
254}
255.fa-road:before {
256 content: "\f018";
257}
258.fa-download:before {
259 content: "\f019";
260}
261.fa-arrow-circle-o-down:before {
262 content: "\f01a";
263}
264.fa-arrow-circle-o-up:before {
265 content: "\f01b";
266}
267.fa-inbox:before {
268 content: "\f01c";
269}
270.fa-play-circle-o:before {
271 content: "\f01d";
272}
273.fa-rotate-right:before,
274.fa-repeat:before {
275 content: "\f01e";
276}
277.fa-refresh:before {
278 content: "\f021";
279}
280.fa-list-alt:before {
281 content: "\f022";
282}
283.fa-lock:before {
284 content: "\f023";
285}
286.fa-flag:before {
287 content: "\f024";
288}
289.fa-headphones:before {
290 content: "\f025";
291}
292.fa-volume-off:before {
293 content: "\f026";
294}
295.fa-volume-down:before {
296 content: "\f027";
297}
298.fa-volume-up:before {
299 content: "\f028";
300}
301.fa-qrcode:before {
302 content: "\f029";
303}
304.fa-barcode:before {
305 content: "\f02a";
306}
307.fa-tag:before {
308 content: "\f02b";
309}
310.fa-tags:before {
311 content: "\f02c";
312}
313.fa-book:before {
314 content: "\f02d";
315}
316.fa-bookmark:before {
317 content: "\f02e";
318}
319.fa-print:before {
320 content: "\f02f";
321}
322.fa-camera:before {
323 content: "\f030";
324}
325.fa-font:before {
326 content: "\f031";
327}
328.fa-bold:before {
329 content: "\f032";
330}
331.fa-italic:before {
332 content: "\f033";
333}
334.fa-text-height:before {
335 content: "\f034";
336}
337.fa-text-width:before {
338 content: "\f035";
339}
340.fa-align-left:before {
341 content: "\f036";
342}
343.fa-align-center:before {
344 content: "\f037";
345}
346.fa-align-right:before {
347 content: "\f038";
348}
349.fa-align-justify:before {
350 content: "\f039";
351}
352.fa-list:before {
353 content: "\f03a";
354}
355.fa-dedent:before,
356.fa-outdent:before {
357 content: "\f03b";
358}
359.fa-indent:before {
360 content: "\f03c";
361}
362.fa-video-camera:before {
363 content: "\f03d";
364}
365.fa-photo:before,
366.fa-image:before,
367.fa-picture-o:before {
368 content: "\f03e";
369}
370.fa-pencil:before {
371 content: "\f040";
372}
373.fa-map-marker:before {
374 content: "\f041";
375}
376.fa-adjust:before {
377 content: "\f042";
378}
379.fa-tint:before {
380 content: "\f043";
381}
382.fa-edit:before,
383.fa-pencil-square-o:before {
384 content: "\f044";
385}
386.fa-share-square-o:before {
387 content: "\f045";
388}
389.fa-check-square-o:before {
390 content: "\f046";
391}
392.fa-arrows:before {
393 content: "\f047";
394}
395.fa-step-backward:before {
396 content: "\f048";
397}
398.fa-fast-backward:before {
399 content: "\f049";
400}
401.fa-backward:before {
402 content: "\f04a";
403}
404.fa-play:before {
405 content: "\f04b";
406}
407.fa-pause:before {
408 content: "\f04c";
409}
410.fa-stop:before {
411 content: "\f04d";
412}
413.fa-forward:before {
414 content: "\f04e";
415}
416.fa-fast-forward:before {
417 content: "\f050";
418}
419.fa-step-forward:before {
420 content: "\f051";
421}
422.fa-eject:before {
423 content: "\f052";
424}
425.fa-chevron-left:before {
426 content: "\f053";
427}
428.fa-chevron-right:before {
429 content: "\f054";
430}
431.fa-plus-circle:before {
432 content: "\f055";
433}
434.fa-minus-circle:before {
435 content: "\f056";
436}
437.fa-times-circle:before {
438 content: "\f057";
439}
440.fa-check-circle:before {
441 content: "\f058";
442}
443.fa-question-circle:before {
444 content: "\f059";
445}
446.fa-info-circle:before {
447 content: "\f05a";
448}
449.fa-crosshairs:before {
450 content: "\f05b";
451}
452.fa-times-circle-o:before {
453 content: "\f05c";
454}
455.fa-check-circle-o:before {
456 content: "\f05d";
457}
458.fa-ban:before {
459 content: "\f05e";
460}
461.fa-arrow-left:before {
462 content: "\f060";
463}
464.fa-arrow-right:before {
465 content: "\f061";
466}
467.fa-arrow-up:before {
468 content: "\f062";
469}
470.fa-arrow-down:before {
471 content: "\f063";
472}
473.fa-mail-forward:before,
474.fa-share:before {
475 content: "\f064";
476}
477.fa-expand:before {
478 content: "\f065";
479}
480.fa-compress:before {
481 content: "\f066";
482}
483.fa-plus:before {
484 content: "\f067";
485}
486.fa-minus:before {
487 content: "\f068";
488}
489.fa-asterisk:before {
490 content: "\f069";
491}
492.fa-exclamation-circle:before {
493 content: "\f06a";
494}
495.fa-gift:before {
496 content: "\f06b";
497}
498.fa-leaf:before {
499 content: "\f06c";
500}
501.fa-fire:before {
502 content: "\f06d";
503}
504.fa-eye:before {
505 content: "\f06e";
506}
507.fa-eye-slash:before {
508 content: "\f070";
509}
510.fa-warning:before,
511.fa-exclamation-triangle:before {
512 content: "\f071";
513}
514.fa-plane:before {
515 content: "\f072";
516}
517.fa-calendar:before {
518 content: "\f073";
519}
520.fa-random:before {
521 content: "\f074";
522}
523.fa-comment:before {
524 content: "\f075";
525}
526.fa-magnet:before {
527 content: "\f076";
528}
529.fa-chevron-up:before {
530 content: "\f077";
531}
532.fa-chevron-down:before {
533 content: "\f078";
534}
535.fa-retweet:before {
536 content: "\f079";
537}
538.fa-shopping-cart:before {
539 content: "\f07a";
540}
541.fa-folder:before {
542 content: "\f07b";
543}
544.fa-folder-open:before {
545 content: "\f07c";
546}
547.fa-arrows-v:before {
548 content: "\f07d";
549}
550.fa-arrows-h:before {
551 content: "\f07e";
552}
553.fa-bar-chart-o:before,
554.fa-bar-chart:before {
555 content: "\f080";
556}
557.fa-twitter-square:before {
558 content: "\f081";
559}
560.fa-facebook-square:before {
561 content: "\f082";
562}
563.fa-camera-retro:before {
564 content: "\f083";
565}
566.fa-key:before {
567 content: "\f084";
568}
569.fa-gears:before,
570.fa-cogs:before {
571 content: "\f085";
572}
573.fa-comments:before {
574 content: "\f086";
575}
576.fa-thumbs-o-up:before {
577 content: "\f087";
578}
579.fa-thumbs-o-down:before {
580 content: "\f088";
581}
582.fa-star-half:before {
583 content: "\f089";
584}
585.fa-heart-o:before {
586 content: "\f08a";
587}
588.fa-sign-out:before {
589 content: "\f08b";
590}
591.fa-linkedin-square:before {
592 content: "\f08c";
593}
594.fa-thumb-tack:before {
595 content: "\f08d";
596}
597.fa-external-link:before {
598 content: "\f08e";
599}
600.fa-sign-in:before {
601 content: "\f090";
602}
603.fa-trophy:before {
604 content: "\f091";
605}
606.fa-github-square:before {
607 content: "\f092";
608}
609.fa-upload:before {
610 content: "\f093";
611}
612.fa-lemon-o:before {
613 content: "\f094";
614}
615.fa-phone:before {
616 content: "\f095";
617}
618.fa-square-o:before {
619 content: "\f096";
620}
621.fa-bookmark-o:before {
622 content: "\f097";
623}
624.fa-phone-square:before {
625 content: "\f098";
626}
627.fa-twitter:before {
628 content: "\f099";
629}
630.fa-facebook-f:before,
631.fa-facebook:before {
632 content: "\f09a";
633}
634.fa-github:before {
635 content: "\f09b";
636}
637.fa-unlock:before {
638 content: "\f09c";
639}
640.fa-credit-card:before {
641 content: "\f09d";
642}
643.fa-feed:before,
644.fa-rss:before {
645 content: "\f09e";
646}
647.fa-hdd-o:before {
648 content: "\f0a0";
649}
650.fa-bullhorn:before {
651 content: "\f0a1";
652}
653.fa-bell:before {
654 content: "\f0f3";
655}
656.fa-certificate:before {
657 content: "\f0a3";
658}
659.fa-hand-o-right:before {
660 content: "\f0a4";
661}
662.fa-hand-o-left:before {
663 content: "\f0a5";
664}
665.fa-hand-o-up:before {
666 content: "\f0a6";
667}
668.fa-hand-o-down:before {
669 content: "\f0a7";
670}
671.fa-arrow-circle-left:before {
672 content: "\f0a8";
673}
674.fa-arrow-circle-right:before {
675 content: "\f0a9";
676}
677.fa-arrow-circle-up:before {
678 content: "\f0aa";
679}
680.fa-arrow-circle-down:before {
681 content: "\f0ab";
682}
683.fa-globe:before {
684 content: "\f0ac";
685}
686.fa-wrench:before {
687 content: "\f0ad";
688}
689.fa-tasks:before {
690 content: "\f0ae";
691}
692.fa-filter:before {
693 content: "\f0b0";
694}
695.fa-briefcase:before {
696 content: "\f0b1";
697}
698.fa-arrows-alt:before {
699 content: "\f0b2";
700}
701.fa-group:before,
702.fa-users:before {
703 content: "\f0c0";
704}
705.fa-chain:before,
706.fa-link:before {
707 content: "\f0c1";
708}
709.fa-cloud:before {
710 content: "\f0c2";
711}
712.fa-flask:before {
713 content: "\f0c3";
714}
715.fa-cut:before,
716.fa-scissors:before {
717 content: "\f0c4";
718}
719.fa-copy:before,
720.fa-files-o:before {
721 content: "\f0c5";
722}
723.fa-paperclip:before {
724 content: "\f0c6";
725}
726.fa-save:before,
727.fa-floppy-o:before {
728 content: "\f0c7";
729}
730.fa-square:before {
731 content: "\f0c8";
732}
733.fa-navicon:before,
734.fa-reorder:before,
735.fa-bars:before {
736 content: "\f0c9";
737}
738.fa-list-ul:before {
739 content: "\f0ca";
740}
741.fa-list-ol:before {
742 content: "\f0cb";
743}
744.fa-strikethrough:before {
745 content: "\f0cc";
746}
747.fa-underline:before {
748 content: "\f0cd";
749}
750.fa-table:before {
751 content: "\f0ce";
752}
753.fa-magic:before {
754 content: "\f0d0";
755}
756.fa-truck:before {
757 content: "\f0d1";
758}
759.fa-pinterest:before {
760 content: "\f0d2";
761}
762.fa-pinterest-square:before {
763 content: "\f0d3";
764}
765.fa-google-plus-square:before {
766 content: "\f0d4";
767}
768.fa-google-plus:before {
769 content: "\f0d5";
770}
771.fa-money:before {
772 content: "\f0d6";
773}
774.fa-caret-down:before {
775 content: "\f0d7";
776}
777.fa-caret-up:before {
778 content: "\f0d8";
779}
780.fa-caret-left:before {
781 content: "\f0d9";
782}
783.fa-caret-right:before {
784 content: "\f0da";
785}
786.fa-columns:before {
787 content: "\f0db";
788}
789.fa-unsorted:before,
790.fa-sort:before {
791 content: "\f0dc";
792}
793.fa-sort-down:before,
794.fa-sort-desc:before {
795 content: "\f0dd";
796}
797.fa-sort-up:before,
798.fa-sort-asc:before {
799 content: "\f0de";
800}
801.fa-envelope:before {
802 content: "\f0e0";
803}
804.fa-linkedin:before {
805 content: "\f0e1";
806}
807.fa-rotate-left:before,
808.fa-undo:before {
809 content: "\f0e2";
810}
811.fa-legal:before,
812.fa-gavel:before {
813 content: "\f0e3";
814}
815.fa-dashboard:before,
816.fa-tachometer:before {
817 content: "\f0e4";
818}
819.fa-comment-o:before {
820 content: "\f0e5";
821}
822.fa-comments-o:before {
823 content: "\f0e6";
824}
825.fa-flash:before,
826.fa-bolt:before {
827 content: "\f0e7";
828}
829.fa-sitemap:before {
830 content: "\f0e8";
831}
832.fa-umbrella:before {
833 content: "\f0e9";
834}
835.fa-paste:before,
836.fa-clipboard:before {
837 content: "\f0ea";
838}
839.fa-lightbulb-o:before {
840 content: "\f0eb";
841}
842.fa-exchange:before {
843 content: "\f0ec";
844}
845.fa-cloud-download:before {
846 content: "\f0ed";
847}
848.fa-cloud-upload:before {
849 content: "\f0ee";
850}
851.fa-user-md:before {
852 content: "\f0f0";
853}
854.fa-stethoscope:before {
855 content: "\f0f1";
856}
857.fa-suitcase:before {
858 content: "\f0f2";
859}
860.fa-bell-o:before {
861 content: "\f0a2";
862}
863.fa-coffee:before {
864 content: "\f0f4";
865}
866.fa-cutlery:before {
867 content: "\f0f5";
868}
869.fa-file-text-o:before {
870 content: "\f0f6";
871}
872.fa-building-o:before {
873 content: "\f0f7";
874}
875.fa-hospital-o:before {
876 content: "\f0f8";
877}
878.fa-ambulance:before {
879 content: "\f0f9";
880}
881.fa-medkit:before {
882 content: "\f0fa";
883}
884.fa-fighter-jet:before {
885 content: "\f0fb";
886}
887.fa-beer:before {
888 content: "\f0fc";
889}
890.fa-h-square:before {
891 content: "\f0fd";
892}
893.fa-plus-square:before {
894 content: "\f0fe";
895}
896.fa-angle-double-left:before {
897 content: "\f100";
898}
899.fa-angle-double-right:before {
900 content: "\f101";
901}
902.fa-angle-double-up:before {
903 content: "\f102";
904}
905.fa-angle-double-down:before {
906 content: "\f103";
907}
908.fa-angle-left:before {
909 content: "\f104";
910}
911.fa-angle-right:before {
912 content: "\f105";
913}
914.fa-angle-up:before {
915 content: "\f106";
916}
917.fa-angle-down:before {
918 content: "\f107";
919}
920.fa-desktop:before {
921 content: "\f108";
922}
923.fa-laptop:before {
924 content: "\f109";
925}
926.fa-tablet:before {
927 content: "\f10a";
928}
929.fa-mobile-phone:before,
930.fa-mobile:before {
931 content: "\f10b";
932}
933.fa-circle-o:before {
934 content: "\f10c";
935}
936.fa-quote-left:before {
937 content: "\f10d";
938}
939.fa-quote-right:before {
940 content: "\f10e";
941}
942.fa-spinner:before {
943 content: "\f110";
944}
945.fa-circle:before {
946 content: "\f111";
947}
948.fa-mail-reply:before,
949.fa-reply:before {
950 content: "\f112";
951}
952.fa-github-alt:before {
953 content: "\f113";
954}
955.fa-folder-o:before {
956 content: "\f114";
957}
958.fa-folder-open-o:before {
959 content: "\f115";
960}
961.fa-smile-o:before {
962 content: "\f118";
963}
964.fa-frown-o:before {
965 content: "\f119";
966}
967.fa-meh-o:before {
968 content: "\f11a";
969}
970.fa-gamepad:before {
971 content: "\f11b";
972}
973.fa-keyboard-o:before {
974 content: "\f11c";
975}
976.fa-flag-o:before {
977 content: "\f11d";
978}
979.fa-flag-checkered:before {
980 content: "\f11e";
981}
982.fa-terminal:before {
983 content: "\f120";
984}
985.fa-code:before {
986 content: "\f121";
987}
988.fa-mail-reply-all:before,
989.fa-reply-all:before {
990 content: "\f122";
991}
992.fa-star-half-empty:before,
993.fa-star-half-full:before,
994.fa-star-half-o:before {
995 content: "\f123";
996}
997.fa-location-arrow:before {
998 content: "\f124";
999}
1000.fa-crop:before {
1001 content: "\f125";
1002}
1003.fa-code-fork:before {
1004 content: "\f126";
1005}
1006.fa-unlink:before,
1007.fa-chain-broken:before {
1008 content: "\f127";
1009}
1010.fa-question:before {
1011 content: "\f128";
1012}
1013.fa-info:before {
1014 content: "\f129";
1015}
1016.fa-exclamation:before {
1017 content: "\f12a";
1018}
1019.fa-superscript:before {
1020 content: "\f12b";
1021}
1022.fa-subscript:before {
1023 content: "\f12c";
1024}
1025.fa-eraser:before {
1026 content: "\f12d";
1027}
1028.fa-puzzle-piece:before {
1029 content: "\f12e";
1030}
1031.fa-microphone:before {
1032 content: "\f130";
1033}
1034.fa-microphone-slash:before {
1035 content: "\f131";
1036}
1037.fa-shield:before {
1038 content: "\f132";
1039}
1040.fa-calendar-o:before {
1041 content: "\f133";
1042}
1043.fa-fire-extinguisher:before {
1044 content: "\f134";
1045}
1046.fa-rocket:before {
1047 content: "\f135";
1048}
1049.fa-maxcdn:before {
1050 content: "\f136";
1051}
1052.fa-chevron-circle-left:before {
1053 content: "\f137";
1054}
1055.fa-chevron-circle-right:before {
1056 content: "\f138";
1057}
1058.fa-chevron-circle-up:before {
1059 content: "\f139";
1060}
1061.fa-chevron-circle-down:before {
1062 content: "\f13a";
1063}
1064.fa-html5:before {
1065 content: "\f13b";
1066}
1067.fa-css3:before {
1068 content: "\f13c";
1069}
1070.fa-anchor:before {
1071 content: "\f13d";
1072}
1073.fa-unlock-alt:before {
1074 content: "\f13e";
1075}
1076.fa-bullseye:before {
1077 content: "\f140";
1078}
1079.fa-ellipsis-h:before {
1080 content: "\f141";
1081}
1082.fa-ellipsis-v:before {
1083 content: "\f142";
1084}
1085.fa-rss-square:before {
1086 content: "\f143";
1087}
1088.fa-play-circle:before {
1089 content: "\f144";
1090}
1091.fa-ticket:before {
1092 content: "\f145";
1093}
1094.fa-minus-square:before {
1095 content: "\f146";
1096}
1097.fa-minus-square-o:before {
1098 content: "\f147";
1099}
1100.fa-level-up:before {
1101 content: "\f148";
1102}
1103.fa-level-down:before {
1104 content: "\f149";
1105}
1106.fa-check-square:before {
1107 content: "\f14a";
1108}
1109.fa-pencil-square:before {
1110 content: "\f14b";
1111}
1112.fa-external-link-square:before {
1113 content: "\f14c";
1114}
1115.fa-share-square:before {
1116 content: "\f14d";
1117}
1118.fa-compass:before {
1119 content: "\f14e";
1120}
1121.fa-toggle-down:before,
1122.fa-caret-square-o-down:before {
1123 content: "\f150";
1124}
1125.fa-toggle-up:before,
1126.fa-caret-square-o-up:before {
1127 content: "\f151";
1128}
1129.fa-toggle-right:before,
1130.fa-caret-square-o-right:before {
1131 content: "\f152";
1132}
1133.fa-euro:before,
1134.fa-eur:before {
1135 content: "\f153";
1136}
1137.fa-gbp:before {
1138 content: "\f154";
1139}
1140.fa-dollar:before,
1141.fa-usd:before {
1142 content: "\f155";
1143}
1144.fa-rupee:before,
1145.fa-inr:before {
1146 content: "\f156";
1147}
1148.fa-cny:before,
1149.fa-rmb:before,
1150.fa-yen:before,
1151.fa-jpy:before {
1152 content: "\f157";
1153}
1154.fa-ruble:before,
1155.fa-rouble:before,
1156.fa-rub:before {
1157 content: "\f158";
1158}
1159.fa-won:before,
1160.fa-krw:before {
1161 content: "\f159";
1162}
1163.fa-bitcoin:before,
1164.fa-btc:before {
1165 content: "\f15a";
1166}
1167.fa-file:before {
1168 content: "\f15b";
1169}
1170.fa-file-text:before {
1171 content: "\f15c";
1172}
1173.fa-sort-alpha-asc:before {
1174 content: "\f15d";
1175}
1176.fa-sort-alpha-desc:before {
1177 content: "\f15e";
1178}
1179.fa-sort-amount-asc:before {
1180 content: "\f160";
1181}
1182.fa-sort-amount-desc:before {
1183 content: "\f161";
1184}
1185.fa-sort-numeric-asc:before {
1186 content: "\f162";
1187}
1188.fa-sort-numeric-desc:before {
1189 content: "\f163";
1190}
1191.fa-thumbs-up:before {
1192 content: "\f164";
1193}
1194.fa-thumbs-down:before {
1195 content: "\f165";
1196}
1197.fa-youtube-square:before {
1198 content: "\f166";
1199}
1200.fa-youtube:before {
1201 content: "\f167";
1202}
1203.fa-xing:before {
1204 content: "\f168";
1205}
1206.fa-xing-square:before {
1207 content: "\f169";
1208}
1209.fa-youtube-play:before {
1210 content: "\f16a";
1211}
1212.fa-dropbox:before {
1213 content: "\f16b";
1214}
1215.fa-stack-overflow:before {
1216 content: "\f16c";
1217}
1218.fa-instagram:before {
1219 content: "\f16d";
1220}
1221.fa-flickr:before {
1222 content: "\f16e";
1223}
1224.fa-adn:before {
1225 content: "\f170";
1226}
1227.fa-bitbucket:before {
1228 content: "\f171";
1229}
1230.fa-bitbucket-square:before {
1231 content: "\f172";
1232}
1233.fa-tumblr:before {
1234 content: "\f173";
1235}
1236.fa-tumblr-square:before {
1237 content: "\f174";
1238}
1239.fa-long-arrow-down:before {
1240 content: "\f175";
1241}
1242.fa-long-arrow-up:before {
1243 content: "\f176";
1244}
1245.fa-long-arrow-left:before {
1246 content: "\f177";
1247}
1248.fa-long-arrow-right:before {
1249 content: "\f178";
1250}
1251.fa-apple:before {
1252 content: "\f179";
1253}
1254.fa-windows:before {
1255 content: "\f17a";
1256}
1257.fa-android:before {
1258 content: "\f17b";
1259}
1260.fa-linux:before {
1261 content: "\f17c";
1262}
1263.fa-dribbble:before {
1264 content: "\f17d";
1265}
1266.fa-skype:before {
1267 content: "\f17e";
1268}
1269.fa-foursquare:before {
1270 content: "\f180";
1271}
1272.fa-trello:before {
1273 content: "\f181";
1274}
1275.fa-female:before {
1276 content: "\f182";
1277}
1278.fa-male:before {
1279 content: "\f183";
1280}
1281.fa-gittip:before,
1282.fa-gratipay:before {
1283 content: "\f184";
1284}
1285.fa-sun-o:before {
1286 content: "\f185";
1287}
1288.fa-moon-o:before {
1289 content: "\f186";
1290}
1291.fa-archive:before {
1292 content: "\f187";
1293}
1294.fa-bug:before {
1295 content: "\f188";
1296}
1297.fa-vk:before {
1298 content: "\f189";
1299}
1300.fa-weibo:before {
1301 content: "\f18a";
1302}
1303.fa-renren:before {
1304 content: "\f18b";
1305}
1306.fa-pagelines:before {
1307 content: "\f18c";
1308}
1309.fa-stack-exchange:before {
1310 content: "\f18d";
1311}
1312.fa-arrow-circle-o-right:before {
1313 content: "\f18e";
1314}
1315.fa-arrow-circle-o-left:before {
1316 content: "\f190";
1317}
1318.fa-toggle-left:before,
1319.fa-caret-square-o-left:before {
1320 content: "\f191";
1321}
1322.fa-dot-circle-o:before {
1323 content: "\f192";
1324}
1325.fa-wheelchair:before {
1326 content: "\f193";
1327}
1328.fa-vimeo-square:before {
1329 content: "\f194";
1330}
1331.fa-turkish-lira:before,
1332.fa-try:before {
1333 content: "\f195";
1334}
1335.fa-plus-square-o:before {
1336 content: "\f196";
1337}
1338.fa-space-shuttle:before {
1339 content: "\f197";
1340}
1341.fa-slack:before {
1342 content: "\f198";
1343}
1344.fa-envelope-square:before {
1345 content: "\f199";
1346}
1347.fa-wordpress:before {
1348 content: "\f19a";
1349}
1350.fa-openid:before {
1351 content: "\f19b";
1352}
1353.fa-institution:before,
1354.fa-bank:before,
1355.fa-university:before {
1356 content: "\f19c";
1357}
1358.fa-mortar-board:before,
1359.fa-graduation-cap:before {
1360 content: "\f19d";
1361}
1362.fa-yahoo:before {
1363 content: "\f19e";
1364}
1365.fa-google:before {
1366 content: "\f1a0";
1367}
1368.fa-reddit:before {
1369 content: "\f1a1";
1370}
1371.fa-reddit-square:before {
1372 content: "\f1a2";
1373}
1374.fa-stumbleupon-circle:before {
1375 content: "\f1a3";
1376}
1377.fa-stumbleupon:before {
1378 content: "\f1a4";
1379}
1380.fa-delicious:before {
1381 content: "\f1a5";
1382}
1383.fa-digg:before {
1384 content: "\f1a6";
1385}
1386.fa-pied-piper:before {
1387 content: "\f1a7";
1388}
1389.fa-pied-piper-alt:before {
1390 content: "\f1a8";
1391}
1392.fa-drupal:before {
1393 content: "\f1a9";
1394}
1395.fa-joomla:before {
1396 content: "\f1aa";
1397}
1398.fa-language:before {
1399 content: "\f1ab";
1400}
1401.fa-fax:before {
1402 content: "\f1ac";
1403}
1404.fa-building:before {
1405 content: "\f1ad";
1406}
1407.fa-child:before {
1408 content: "\f1ae";
1409}
1410.fa-paw:before {
1411 content: "\f1b0";
1412}
1413.fa-spoon:before {
1414 content: "\f1b1";
1415}
1416.fa-cube:before {
1417 content: "\f1b2";
1418}
1419.fa-cubes:before {
1420 content: "\f1b3";
1421}
1422.fa-behance:before {
1423 content: "\f1b4";
1424}
1425.fa-behance-square:before {
1426 content: "\f1b5";
1427}
1428.fa-steam:before {
1429 content: "\f1b6";
1430}
1431.fa-steam-square:before {
1432 content: "\f1b7";
1433}
1434.fa-recycle:before {
1435 content: "\f1b8";
1436}
1437.fa-automobile:before,
1438.fa-car:before {
1439 content: "\f1b9";
1440}
1441.fa-cab:before,
1442.fa-taxi:before {
1443 content: "\f1ba";
1444}
1445.fa-tree:before {
1446 content: "\f1bb";
1447}
1448.fa-spotify:before {
1449 content: "\f1bc";
1450}
1451.fa-deviantart:before {
1452 content: "\f1bd";
1453}
1454.fa-soundcloud:before {
1455 content: "\f1be";
1456}
1457.fa-database:before {
1458 content: "\f1c0";
1459}
1460.fa-file-pdf-o:before {
1461 content: "\f1c1";
1462}
1463.fa-file-word-o:before {
1464 content: "\f1c2";
1465}
1466.fa-file-excel-o:before {
1467 content: "\f1c3";
1468}
1469.fa-file-powerpoint-o:before {
1470 content: "\f1c4";
1471}
1472.fa-file-photo-o:before,
1473.fa-file-picture-o:before,
1474.fa-file-image-o:before {
1475 content: "\f1c5";
1476}
1477.fa-file-zip-o:before,
1478.fa-file-archive-o:before {
1479 content: "\f1c6";
1480}
1481.fa-file-sound-o:before,
1482.fa-file-audio-o:before {
1483 content: "\f1c7";
1484}
1485.fa-file-movie-o:before,
1486.fa-file-video-o:before {
1487 content: "\f1c8";
1488}
1489.fa-file-code-o:before {
1490 content: "\f1c9";
1491}
1492.fa-vine:before {
1493 content: "\f1ca";
1494}
1495.fa-codepen:before {
1496 content: "\f1cb";
1497}
1498.fa-jsfiddle:before {
1499 content: "\f1cc";
1500}
1501.fa-life-bouy:before,
1502.fa-life-buoy:before,
1503.fa-life-saver:before,
1504.fa-support:before,
1505.fa-life-ring:before {
1506 content: "\f1cd";
1507}
1508.fa-circle-o-notch:before {
1509 content: "\f1ce";
1510}
1511.fa-ra:before,
1512.fa-rebel:before {
1513 content: "\f1d0";
1514}
1515.fa-ge:before,
1516.fa-empire:before {
1517 content: "\f1d1";
1518}
1519.fa-git-square:before {
1520 content: "\f1d2";
1521}
1522.fa-git:before {
1523 content: "\f1d3";
1524}
1525.fa-y-combinator-square:before,
1526.fa-yc-square:before,
1527.fa-hacker-news:before {
1528 content: "\f1d4";
1529}
1530.fa-tencent-weibo:before {
1531 content: "\f1d5";
1532}
1533.fa-qq:before {
1534 content: "\f1d6";
1535}
1536.fa-wechat:before,
1537.fa-weixin:before {
1538 content: "\f1d7";
1539}
1540.fa-send:before,
1541.fa-paper-plane:before {
1542 content: "\f1d8";
1543}
1544.fa-send-o:before,
1545.fa-paper-plane-o:before {
1546 content: "\f1d9";
1547}
1548.fa-history:before {
1549 content: "\f1da";
1550}
1551.fa-circle-thin:before {
1552 content: "\f1db";
1553}
1554.fa-header:before {
1555 content: "\f1dc";
1556}
1557.fa-paragraph:before {
1558 content: "\f1dd";
1559}
1560.fa-sliders:before {
1561 content: "\f1de";
1562}
1563.fa-share-alt:before {
1564 content: "\f1e0";
1565}
1566.fa-share-alt-square:before {
1567 content: "\f1e1";
1568}
1569.fa-bomb:before {
1570 content: "\f1e2";
1571}
1572.fa-soccer-ball-o:before,
1573.fa-futbol-o:before {
1574 content: "\f1e3";
1575}
1576.fa-tty:before {
1577 content: "\f1e4";
1578}
1579.fa-binoculars:before {
1580 content: "\f1e5";
1581}
1582.fa-plug:before {
1583 content: "\f1e6";
1584}
1585.fa-slideshare:before {
1586 content: "\f1e7";
1587}
1588.fa-twitch:before {
1589 content: "\f1e8";
1590}
1591.fa-yelp:before {
1592 content: "\f1e9";
1593}
1594.fa-newspaper-o:before {
1595 content: "\f1ea";
1596}
1597.fa-wifi:before {
1598 content: "\f1eb";
1599}
1600.fa-calculator:before {
1601 content: "\f1ec";
1602}
1603.fa-paypal:before {
1604 content: "\f1ed";
1605}
1606.fa-google-wallet:before {
1607 content: "\f1ee";
1608}
1609.fa-cc-visa:before {
1610 content: "\f1f0";
1611}
1612.fa-cc-mastercard:before {
1613 content: "\f1f1";
1614}
1615.fa-cc-discover:before {
1616 content: "\f1f2";
1617}
1618.fa-cc-amex:before {
1619 content: "\f1f3";
1620}
1621.fa-cc-paypal:before {
1622 content: "\f1f4";
1623}
1624.fa-cc-stripe:before {
1625 content: "\f1f5";
1626}
1627.fa-bell-slash:before {
1628 content: "\f1f6";
1629}
1630.fa-bell-slash-o:before {
1631 content: "\f1f7";
1632}
1633.fa-trash:before {
1634 content: "\f1f8";
1635}
1636.fa-copyright:before {
1637 content: "\f1f9";
1638}
1639.fa-at:before {
1640 content: "\f1fa";
1641}
1642.fa-eyedropper:before {
1643 content: "\f1fb";
1644}
1645.fa-paint-brush:before {
1646 content: "\f1fc";
1647}
1648.fa-birthday-cake:before {
1649 content: "\f1fd";
1650}
1651.fa-area-chart:before {
1652 content: "\f1fe";
1653}
1654.fa-pie-chart:before {
1655 content: "\f200";
1656}
1657.fa-line-chart:before {
1658 content: "\f201";
1659}
1660.fa-lastfm:before {
1661 content: "\f202";
1662}
1663.fa-lastfm-square:before {
1664 content: "\f203";
1665}
1666.fa-toggle-off:before {
1667 content: "\f204";
1668}
1669.fa-toggle-on:before {
1670 content: "\f205";
1671}
1672.fa-bicycle:before {
1673 content: "\f206";
1674}
1675.fa-bus:before {
1676 content: "\f207";
1677}
1678.fa-ioxhost:before {
1679 content: "\f208";
1680}
1681.fa-angellist:before {
1682 content: "\f209";
1683}
1684.fa-cc:before {
1685 content: "\f20a";
1686}
1687.fa-shekel:before,
1688.fa-sheqel:before,
1689.fa-ils:before {
1690 content: "\f20b";
1691}
1692.fa-meanpath:before {
1693 content: "\f20c";
1694}
1695.fa-buysellads:before {
1696 content: "\f20d";
1697}
1698.fa-connectdevelop:before {
1699 content: "\f20e";
1700}
1701.fa-dashcube:before {
1702 content: "\f210";
1703}
1704.fa-forumbee:before {
1705 content: "\f211";
1706}
1707.fa-leanpub:before {
1708 content: "\f212";
1709}
1710.fa-sellsy:before {
1711 content: "\f213";
1712}
1713.fa-shirtsinbulk:before {
1714 content: "\f214";
1715}
1716.fa-simplybuilt:before {
1717 content: "\f215";
1718}
1719.fa-skyatlas:before {
1720 content: "\f216";
1721}
1722.fa-cart-plus:before {
1723 content: "\f217";
1724}
1725.fa-cart-arrow-down:before {
1726 content: "\f218";
1727}
1728.fa-diamond:before {
1729 content: "\f219";
1730}
1731.fa-ship:before {
1732 content: "\f21a";
1733}
1734.fa-user-secret:before {
1735 content: "\f21b";
1736}
1737.fa-motorcycle:before {
1738 content: "\f21c";
1739}
1740.fa-street-view:before {
1741 content: "\f21d";
1742}
1743.fa-heartbeat:before {
1744 content: "\f21e";
1745}
1746.fa-venus:before {
1747 content: "\f221";
1748}
1749.fa-mars:before {
1750 content: "\f222";
1751}
1752.fa-mercury:before {
1753 content: "\f223";
1754}
1755.fa-intersex:before,
1756.fa-transgender:before {
1757 content: "\f224";
1758}
1759.fa-transgender-alt:before {
1760 content: "\f225";
1761}
1762.fa-venus-double:before {
1763 content: "\f226";
1764}
1765.fa-mars-double:before {
1766 content: "\f227";
1767}
1768.fa-venus-mars:before {
1769 content: "\f228";
1770}
1771.fa-mars-stroke:before {
1772 content: "\f229";
1773}
1774.fa-mars-stroke-v:before {
1775 content: "\f22a";
1776}
1777.fa-mars-stroke-h:before {
1778 content: "\f22b";
1779}
1780.fa-neuter:before {
1781 content: "\f22c";
1782}
1783.fa-genderless:before {
1784 content: "\f22d";
1785}
1786.fa-facebook-official:before {
1787 content: "\f230";
1788}
1789.fa-pinterest-p:before {
1790 content: "\f231";
1791}
1792.fa-whatsapp:before {
1793 content: "\f232";
1794}
1795.fa-server:before {
1796 content: "\f233";
1797}
1798.fa-user-plus:before {
1799 content: "\f234";
1800}
1801.fa-user-times:before {
1802 content: "\f235";
1803}
1804.fa-hotel:before,
1805.fa-bed:before {
1806 content: "\f236";
1807}
1808.fa-viacoin:before {
1809 content: "\f237";
1810}
1811.fa-train:before {
1812 content: "\f238";
1813}
1814.fa-subway:before {
1815 content: "\f239";
1816}
1817.fa-medium:before {
1818 content: "\f23a";
1819}
1820.fa-yc:before,
1821.fa-y-combinator:before {
1822 content: "\f23b";
1823}
1824.fa-optin-monster:before {
1825 content: "\f23c";
1826}
1827.fa-opencart:before {
1828 content: "\f23d";
1829}
1830.fa-expeditedssl:before {
1831 content: "\f23e";
1832}
1833.fa-battery-4:before,
1834.fa-battery-full:before {
1835 content: "\f240";
1836}
1837.fa-battery-3:before,
1838.fa-battery-three-quarters:before {
1839 content: "\f241";
1840}
1841.fa-battery-2:before,
1842.fa-battery-half:before {
1843 content: "\f242";
1844}
1845.fa-battery-1:before,
1846.fa-battery-quarter:before {
1847 content: "\f243";
1848}
1849.fa-battery-0:before,
1850.fa-battery-empty:before {
1851 content: "\f244";
1852}
1853.fa-mouse-pointer:before {
1854 content: "\f245";
1855}
1856.fa-i-cursor:before {
1857 content: "\f246";
1858}
1859.fa-object-group:before {
1860 content: "\f247";
1861}
1862.fa-object-ungroup:before {
1863 content: "\f248";
1864}
1865.fa-sticky-note:before {
1866 content: "\f249";
1867}
1868.fa-sticky-note-o:before {
1869 content: "\f24a";
1870}
1871.fa-cc-jcb:before {
1872 content: "\f24b";
1873}
1874.fa-cc-diners-club:before {
1875 content: "\f24c";
1876}
1877.fa-clone:before {
1878 content: "\f24d";
1879}
1880.fa-balance-scale:before {
1881 content: "\f24e";
1882}
1883.fa-hourglass-o:before {
1884 content: "\f250";
1885}
1886.fa-hourglass-1:before,
1887.fa-hourglass-start:before {
1888 content: "\f251";
1889}
1890.fa-hourglass-2:before,
1891.fa-hourglass-half:before {
1892 content: "\f252";
1893}
1894.fa-hourglass-3:before,
1895.fa-hourglass-end:before {
1896 content: "\f253";
1897}
1898.fa-hourglass:before {
1899 content: "\f254";
1900}
1901.fa-hand-grab-o:before,
1902.fa-hand-rock-o:before {
1903 content: "\f255";
1904}
1905.fa-hand-stop-o:before,
1906.fa-hand-paper-o:before {
1907 content: "\f256";
1908}
1909.fa-hand-scissors-o:before {
1910 content: "\f257";
1911}
1912.fa-hand-lizard-o:before {
1913 content: "\f258";
1914}
1915.fa-hand-spock-o:before {
1916 content: "\f259";
1917}
1918.fa-hand-pointer-o:before {
1919 content: "\f25a";
1920}
1921.fa-hand-peace-o:before {
1922 content: "\f25b";
1923}
1924.fa-trademark:before {
1925 content: "\f25c";
1926}
1927.fa-registered:before {
1928 content: "\f25d";
1929}
1930.fa-creative-commons:before {
1931 content: "\f25e";
1932}
1933.fa-gg:before {
1934 content: "\f260";
1935}
1936.fa-gg-circle:before {
1937 content: "\f261";
1938}
1939.fa-tripadvisor:before {
1940 content: "\f262";
1941}
1942.fa-odnoklassniki:before {
1943 content: "\f263";
1944}
1945.fa-odnoklassniki-square:before {
1946 content: "\f264";
1947}
1948.fa-get-pocket:before {
1949 content: "\f265";
1950}
1951.fa-wikipedia-w:before {
1952 content: "\f266";
1953}
1954.fa-safari:before {
1955 content: "\f267";
1956}
1957.fa-chrome:before {
1958 content: "\f268";
1959}
1960.fa-firefox:before {
1961 content: "\f269";
1962}
1963.fa-opera:before {
1964 content: "\f26a";
1965}
1966.fa-internet-explorer:before {
1967 content: "\f26b";
1968}
1969.fa-tv:before,
1970.fa-television:before {
1971 content: "\f26c";
1972}
1973.fa-contao:before {
1974 content: "\f26d";
1975}
1976.fa-500px:before {
1977 content: "\f26e";
1978}
1979.fa-amazon:before {
1980 content: "\f270";
1981}
1982.fa-calendar-plus-o:before {
1983 content: "\f271";
1984}
1985.fa-calendar-minus-o:before {
1986 content: "\f272";
1987}
1988.fa-calendar-times-o:before {
1989 content: "\f273";
1990}
1991.fa-calendar-check-o:before {
1992 content: "\f274";
1993}
1994.fa-industry:before {
1995 content: "\f275";
1996}
1997.fa-map-pin:before {
1998 content: "\f276";
1999}
2000.fa-map-signs:before {
2001 content: "\f277";
2002}
2003.fa-map-o:before {
2004 content: "\f278";
2005}
2006.fa-map:before {
2007 content: "\f279";
2008}
2009.fa-commenting:before {
2010 content: "\f27a";
2011}
2012.fa-commenting-o:before {
2013 content: "\f27b";
2014}
2015.fa-houzz:before {
2016 content: "\f27c";
2017}
2018.fa-vimeo:before {
2019 content: "\f27d";
2020}
2021.fa-black-tie:before {
2022 content: "\f27e";
2023}
2024.fa-fonticons:before {
2025 content: "\f280";
2026}
2027.fa-reddit-alien:before {
2028 content: "\f281";
2029}
2030.fa-edge:before {
2031 content: "\f282";
2032}
2033.fa-credit-card-alt:before {
2034 content: "\f283";
2035}
2036.fa-codiepie:before {
2037 content: "\f284";
2038}
2039.fa-modx:before {
2040 content: "\f285";
2041}
2042.fa-fort-awesome:before {
2043 content: "\f286";
2044}
2045.fa-usb:before {
2046 content: "\f287";
2047}
2048.fa-product-hunt:before {
2049 content: "\f288";
2050}
2051.fa-mixcloud:before {
2052 content: "\f289";
2053}
2054.fa-scribd:before {
2055 content: "\f28a";
2056}
2057.fa-pause-circle:before {
2058 content: "\f28b";
2059}
2060.fa-pause-circle-o:before {
2061 content: "\f28c";
2062}
2063.fa-stop-circle:before {
2064 content: "\f28d";
2065}
2066.fa-stop-circle-o:before {
2067 content: "\f28e";
2068}
2069.fa-shopping-bag:before {
2070 content: "\f290";
2071}
2072.fa-shopping-basket:before {
2073 content: "\f291";
2074}
2075.fa-hashtag:before {
2076 content: "\f292";
2077}
2078.fa-bluetooth:before {
2079 content: "\f293";
2080}
2081.fa-bluetooth-b:before {
2082 content: "\f294";
2083}
2084.fa-percent:before {
2085 content: "\f295";
2086}
diff --git a/tpl/default/css/font-awesome.min.css b/tpl/default/css/font-awesome.min.css
new file mode 100644
index 00000000..d0603cb4
--- /dev/null
+++ b/tpl/default/css/font-awesome.min.css
@@ -0,0 +1,4 @@
1/*!
2 * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome
3 * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.5.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}
diff --git a/tpl/default/css/grids-responsive.css b/tpl/default/css/grids-responsive.css
new file mode 100644
index 00000000..dc9f7718
--- /dev/null
+++ b/tpl/default/css/grids-responsive.css
@@ -0,0 +1,861 @@
1/*!
2Pure v0.6.0
3Copyright 2014 Yahoo! Inc. All rights reserved.
4Licensed under the BSD License.
5https://github.com/yahoo/pure/blob/master/LICENSE.md
6*/
7@media screen and (min-width: 35.5em) {
8 .pure-u-sm-1,
9 .pure-u-sm-1-1,
10 .pure-u-sm-1-2,
11 .pure-u-sm-1-3,
12 .pure-u-sm-2-3,
13 .pure-u-sm-1-4,
14 .pure-u-sm-3-4,
15 .pure-u-sm-1-5,
16 .pure-u-sm-2-5,
17 .pure-u-sm-3-5,
18 .pure-u-sm-4-5,
19 .pure-u-sm-5-5,
20 .pure-u-sm-1-6,
21 .pure-u-sm-5-6,
22 .pure-u-sm-1-8,
23 .pure-u-sm-3-8,
24 .pure-u-sm-5-8,
25 .pure-u-sm-7-8,
26 .pure-u-sm-1-12,
27 .pure-u-sm-5-12,
28 .pure-u-sm-7-12,
29 .pure-u-sm-11-12,
30 .pure-u-sm-1-24,
31 .pure-u-sm-2-24,
32 .pure-u-sm-3-24,
33 .pure-u-sm-4-24,
34 .pure-u-sm-5-24,
35 .pure-u-sm-6-24,
36 .pure-u-sm-7-24,
37 .pure-u-sm-8-24,
38 .pure-u-sm-9-24,
39 .pure-u-sm-10-24,
40 .pure-u-sm-11-24,
41 .pure-u-sm-12-24,
42 .pure-u-sm-13-24,
43 .pure-u-sm-14-24,
44 .pure-u-sm-15-24,
45 .pure-u-sm-16-24,
46 .pure-u-sm-17-24,
47 .pure-u-sm-18-24,
48 .pure-u-sm-19-24,
49 .pure-u-sm-20-24,
50 .pure-u-sm-21-24,
51 .pure-u-sm-22-24,
52 .pure-u-sm-23-24,
53 .pure-u-sm-24-24 {
54 display: inline-block;
55 *display: inline;
56 zoom: 1;
57 letter-spacing: normal;
58 word-spacing: normal;
59 vertical-align: top;
60 text-rendering: auto;
61 }
62
63 .pure-u-sm-1-24 {
64 width: 4.1667%;
65 *width: 4.1357%;
66 }
67
68 .pure-u-sm-1-12,
69 .pure-u-sm-2-24 {
70 width: 8.3333%;
71 *width: 8.3023%;
72 }
73
74 .pure-u-sm-1-8,
75 .pure-u-sm-3-24 {
76 width: 12.5000%;
77 *width: 12.4690%;
78 }
79
80 .pure-u-sm-1-6,
81 .pure-u-sm-4-24 {
82 width: 16.6667%;
83 *width: 16.6357%;
84 }
85
86 .pure-u-sm-1-5 {
87 width: 20%;
88 *width: 19.9690%;
89 }
90
91 .pure-u-sm-5-24 {
92 width: 20.8333%;
93 *width: 20.8023%;
94 }
95
96 .pure-u-sm-1-4,
97 .pure-u-sm-6-24 {
98 width: 25%;
99 *width: 24.9690%;
100 }
101
102 .pure-u-sm-7-24 {
103 width: 29.1667%;
104 *width: 29.1357%;
105 }
106
107 .pure-u-sm-1-3,
108 .pure-u-sm-8-24 {
109 width: 33.3333%;
110 *width: 33.3023%;
111 }
112
113 .pure-u-sm-3-8,
114 .pure-u-sm-9-24 {
115 width: 37.5000%;
116 *width: 37.4690%;
117 }
118
119 .pure-u-sm-2-5 {
120 width: 40%;
121 *width: 39.9690%;
122 }
123
124 .pure-u-sm-5-12,
125 .pure-u-sm-10-24 {
126 width: 41.6667%;
127 *width: 41.6357%;
128 }
129
130 .pure-u-sm-11-24 {
131 width: 45.8333%;
132 *width: 45.8023%;
133 }
134
135 .pure-u-sm-1-2,
136 .pure-u-sm-12-24 {
137 width: 50%;
138 *width: 49.9690%;
139 }
140
141 .pure-u-sm-13-24 {
142 width: 54.1667%;
143 *width: 54.1357%;
144 }
145
146 .pure-u-sm-7-12,
147 .pure-u-sm-14-24 {
148 width: 58.3333%;
149 *width: 58.3023%;
150 }
151
152 .pure-u-sm-3-5 {
153 width: 60%;
154 *width: 59.9690%;
155 }
156
157 .pure-u-sm-5-8,
158 .pure-u-sm-15-24 {
159 width: 62.5000%;
160 *width: 62.4690%;
161 }
162
163 .pure-u-sm-2-3,
164 .pure-u-sm-16-24 {
165 width: 66.6667%;
166 *width: 66.6357%;
167 }
168
169 .pure-u-sm-17-24 {
170 width: 70.8333%;
171 *width: 70.8023%;
172 }
173
174 .pure-u-sm-3-4,
175 .pure-u-sm-18-24 {
176 width: 75%;
177 *width: 74.9690%;
178 }
179
180 .pure-u-sm-19-24 {
181 width: 79.1667%;
182 *width: 79.1357%;
183 }
184
185 .pure-u-sm-4-5 {
186 width: 80%;
187 *width: 79.9690%;
188 }
189
190 .pure-u-sm-5-6,
191 .pure-u-sm-20-24 {
192 width: 83.3333%;
193 *width: 83.3023%;
194 }
195
196 .pure-u-sm-7-8,
197 .pure-u-sm-21-24 {
198 width: 87.5000%;
199 *width: 87.4690%;
200 }
201
202 .pure-u-sm-11-12,
203 .pure-u-sm-22-24 {
204 width: 91.6667%;
205 *width: 91.6357%;
206 }
207
208 .pure-u-sm-23-24 {
209 width: 95.8333%;
210 *width: 95.8023%;
211 }
212
213 .pure-u-sm-1,
214 .pure-u-sm-1-1,
215 .pure-u-sm-5-5,
216 .pure-u-sm-24-24 {
217 width: 100%;
218 }
219}
220
221@media screen and (min-width: 48em) {
222 .pure-u-md-1,
223 .pure-u-md-1-1,
224 .pure-u-md-1-2,
225 .pure-u-md-1-3,
226 .pure-u-md-2-3,
227 .pure-u-md-1-4,
228 .pure-u-md-3-4,
229 .pure-u-md-1-5,
230 .pure-u-md-2-5,
231 .pure-u-md-3-5,
232 .pure-u-md-4-5,
233 .pure-u-md-5-5,
234 .pure-u-md-1-6,
235 .pure-u-md-5-6,
236 .pure-u-md-1-8,
237 .pure-u-md-3-8,
238 .pure-u-md-5-8,
239 .pure-u-md-7-8,
240 .pure-u-md-1-12,
241 .pure-u-md-5-12,
242 .pure-u-md-7-12,
243 .pure-u-md-11-12,
244 .pure-u-md-1-24,
245 .pure-u-md-2-24,
246 .pure-u-md-3-24,
247 .pure-u-md-4-24,
248 .pure-u-md-5-24,
249 .pure-u-md-6-24,
250 .pure-u-md-7-24,
251 .pure-u-md-8-24,
252 .pure-u-md-9-24,
253 .pure-u-md-10-24,
254 .pure-u-md-11-24,
255 .pure-u-md-12-24,
256 .pure-u-md-13-24,
257 .pure-u-md-14-24,
258 .pure-u-md-15-24,
259 .pure-u-md-16-24,
260 .pure-u-md-17-24,
261 .pure-u-md-18-24,
262 .pure-u-md-19-24,
263 .pure-u-md-20-24,
264 .pure-u-md-21-24,
265 .pure-u-md-22-24,
266 .pure-u-md-23-24,
267 .pure-u-md-24-24 {
268 display: inline-block;
269 *display: inline;
270 zoom: 1;
271 letter-spacing: normal;
272 word-spacing: normal;
273 vertical-align: top;
274 text-rendering: auto;
275 }
276
277 .pure-u-md-1-24 {
278 width: 4.1667%;
279 *width: 4.1357%;
280 }
281
282 .pure-u-md-1-12,
283 .pure-u-md-2-24 {
284 width: 8.3333%;
285 *width: 8.3023%;
286 }
287
288 .pure-u-md-1-8,
289 .pure-u-md-3-24 {
290 width: 12.5000%;
291 *width: 12.4690%;
292 }
293
294 .pure-u-md-1-6,
295 .pure-u-md-4-24 {
296 width: 16.6667%;
297 *width: 16.6357%;
298 }
299
300 .pure-u-md-1-5 {
301 width: 20%;
302 *width: 19.9690%;
303 }
304
305 .pure-u-md-5-24 {
306 width: 20.8333%;
307 *width: 20.8023%;
308 }
309
310 .pure-u-md-1-4,
311 .pure-u-md-6-24 {
312 width: 25%;
313 *width: 24.9690%;
314 }
315
316 .pure-u-md-7-24 {
317 width: 29.1667%;
318 *width: 29.1357%;
319 }
320
321 .pure-u-md-1-3,
322 .pure-u-md-8-24 {
323 width: 33.3333%;
324 *width: 33.3023%;
325 }
326
327 .pure-u-md-3-8,
328 .pure-u-md-9-24 {
329 width: 37.5000%;
330 *width: 37.4690%;
331 }
332
333 .pure-u-md-2-5 {
334 width: 40%;
335 *width: 39.9690%;
336 }
337
338 .pure-u-md-5-12,
339 .pure-u-md-10-24 {
340 width: 41.6667%;
341 *width: 41.6357%;
342 }
343
344 .pure-u-md-11-24 {
345 width: 45.8333%;
346 *width: 45.8023%;
347 }
348
349 .pure-u-md-1-2,
350 .pure-u-md-12-24 {
351 width: 50%;
352 *width: 49.9690%;
353 }
354
355 .pure-u-md-13-24 {
356 width: 54.1667%;
357 *width: 54.1357%;
358 }
359
360 .pure-u-md-7-12,
361 .pure-u-md-14-24 {
362 width: 58.3333%;
363 *width: 58.3023%;
364 }
365
366 .pure-u-md-3-5 {
367 width: 60%;
368 *width: 59.9690%;
369 }
370
371 .pure-u-md-5-8,
372 .pure-u-md-15-24 {
373 width: 62.5000%;
374 *width: 62.4690%;
375 }
376
377 .pure-u-md-2-3,
378 .pure-u-md-16-24 {
379 width: 66.6667%;
380 *width: 66.6357%;
381 }
382
383 .pure-u-md-17-24 {
384 width: 70.8333%;
385 *width: 70.8023%;
386 }
387
388 .pure-u-md-3-4,
389 .pure-u-md-18-24 {
390 width: 75%;
391 *width: 74.9690%;
392 }
393
394 .pure-u-md-19-24 {
395 width: 79.1667%;
396 *width: 79.1357%;
397 }
398
399 .pure-u-md-4-5 {
400 width: 80%;
401 *width: 79.9690%;
402 }
403
404 .pure-u-md-5-6,
405 .pure-u-md-20-24 {
406 width: 83.3333%;
407 *width: 83.3023%;
408 }
409
410 .pure-u-md-7-8,
411 .pure-u-md-21-24 {
412 width: 87.5000%;
413 *width: 87.4690%;
414 }
415
416 .pure-u-md-11-12,
417 .pure-u-md-22-24 {
418 width: 91.6667%;
419 *width: 91.6357%;
420 }
421
422 .pure-u-md-23-24 {
423 width: 95.8333%;
424 *width: 95.8023%;
425 }
426
427 .pure-u-md-1,
428 .pure-u-md-1-1,
429 .pure-u-md-5-5,
430 .pure-u-md-24-24 {
431 width: 100%;
432 }
433}
434
435@media screen and (min-width: 64em) {
436 .pure-u-lg-1,
437 .pure-u-lg-1-1,
438 .pure-u-lg-1-2,
439 .pure-u-lg-1-3,
440 .pure-u-lg-2-3,
441 .pure-u-lg-1-4,
442 .pure-u-lg-3-4,
443 .pure-u-lg-1-5,
444 .pure-u-lg-2-5,
445 .pure-u-lg-3-5,
446 .pure-u-lg-4-5,
447 .pure-u-lg-5-5,
448 .pure-u-lg-1-6,
449 .pure-u-lg-5-6,
450 .pure-u-lg-1-8,
451 .pure-u-lg-3-8,
452 .pure-u-lg-5-8,
453 .pure-u-lg-7-8,
454 .pure-u-lg-1-12,
455 .pure-u-lg-5-12,
456 .pure-u-lg-7-12,
457 .pure-u-lg-11-12,
458 .pure-u-lg-1-24,
459 .pure-u-lg-2-24,
460 .pure-u-lg-3-24,
461 .pure-u-lg-4-24,
462 .pure-u-lg-5-24,
463 .pure-u-lg-6-24,
464 .pure-u-lg-7-24,
465 .pure-u-lg-8-24,
466 .pure-u-lg-9-24,
467 .pure-u-lg-10-24,
468 .pure-u-lg-11-24,
469 .pure-u-lg-12-24,
470 .pure-u-lg-13-24,
471 .pure-u-lg-14-24,
472 .pure-u-lg-15-24,
473 .pure-u-lg-16-24,
474 .pure-u-lg-17-24,
475 .pure-u-lg-18-24,
476 .pure-u-lg-19-24,
477 .pure-u-lg-20-24,
478 .pure-u-lg-21-24,
479 .pure-u-lg-22-24,
480 .pure-u-lg-23-24,
481 .pure-u-lg-24-24 {
482 display: inline-block;
483 *display: inline;
484 zoom: 1;
485 letter-spacing: normal;
486 word-spacing: normal;
487 vertical-align: top;
488 text-rendering: auto;
489 }
490
491 .pure-u-lg-1-24 {
492 width: 4.1667%;
493 *width: 4.1357%;
494 }
495
496 .pure-u-lg-1-12,
497 .pure-u-lg-2-24 {
498 width: 8.3333%;
499 *width: 8.3023%;
500 }
501
502 .pure-u-lg-1-8,
503 .pure-u-lg-3-24 {
504 width: 12.5000%;
505 *width: 12.4690%;
506 }
507
508 .pure-u-lg-1-6,
509 .pure-u-lg-4-24 {
510 width: 16.6667%;
511 *width: 16.6357%;
512 }
513
514 .pure-u-lg-1-5 {
515 width: 20%;
516 *width: 19.9690%;
517 }
518
519 .pure-u-lg-5-24 {
520 width: 20.8333%;
521 *width: 20.8023%;
522 }
523
524 .pure-u-lg-1-4,
525 .pure-u-lg-6-24 {
526 width: 25%;
527 *width: 24.9690%;
528 }
529
530 .pure-u-lg-7-24 {
531 width: 29.1667%;
532 *width: 29.1357%;
533 }
534
535 .pure-u-lg-1-3,
536 .pure-u-lg-8-24 {
537 width: 33.3333%;
538 *width: 33.3023%;
539 }
540
541 .pure-u-lg-3-8,
542 .pure-u-lg-9-24 {
543 width: 37.5000%;
544 *width: 37.4690%;
545 }
546
547 .pure-u-lg-2-5 {
548 width: 40%;
549 *width: 39.9690%;
550 }
551
552 .pure-u-lg-5-12,
553 .pure-u-lg-10-24 {
554 width: 41.6667%;
555 *width: 41.6357%;
556 }
557
558 .pure-u-lg-11-24 {
559 width: 45.8333%;
560 *width: 45.8023%;
561 }
562
563 .pure-u-lg-1-2,
564 .pure-u-lg-12-24 {
565 width: 50%;
566 *width: 49.9690%;
567 }
568
569 .pure-u-lg-13-24 {
570 width: 54.1667%;
571 *width: 54.1357%;
572 }
573
574 .pure-u-lg-7-12,
575 .pure-u-lg-14-24 {
576 width: 58.3333%;
577 *width: 58.3023%;
578 }
579
580 .pure-u-lg-3-5 {
581 width: 60%;
582 *width: 59.9690%;
583 }
584
585 .pure-u-lg-5-8,
586 .pure-u-lg-15-24 {
587 width: 62.5000%;
588 *width: 62.4690%;
589 }
590
591 .pure-u-lg-2-3,
592 .pure-u-lg-16-24 {
593 width: 66.6667%;
594 *width: 66.6357%;
595 }
596
597 .pure-u-lg-17-24 {
598 width: 70.8333%;
599 *width: 70.8023%;
600 }
601
602 .pure-u-lg-3-4,
603 .pure-u-lg-18-24 {
604 width: 75%;
605 *width: 74.9690%;
606 }
607
608 .pure-u-lg-19-24 {
609 width: 79.1667%;
610 *width: 79.1357%;
611 }
612
613 .pure-u-lg-4-5 {
614 width: 80%;
615 *width: 79.9690%;
616 }
617
618 .pure-u-lg-5-6,
619 .pure-u-lg-20-24 {
620 width: 83.3333%;
621 *width: 83.3023%;
622 }
623
624 .pure-u-lg-7-8,
625 .pure-u-lg-21-24 {
626 width: 87.5000%;
627 *width: 87.4690%;
628 }
629
630 .pure-u-lg-11-12,
631 .pure-u-lg-22-24 {
632 width: 91.6667%;
633 *width: 91.6357%;
634 }
635
636 .pure-u-lg-23-24 {
637 width: 95.8333%;
638 *width: 95.8023%;
639 }
640
641 .pure-u-lg-1,
642 .pure-u-lg-1-1,
643 .pure-u-lg-5-5,
644 .pure-u-lg-24-24 {
645 width: 100%;
646 }
647}
648
649@media screen and (min-width: 80em) {
650 .pure-u-xl-1,
651 .pure-u-xl-1-1,
652 .pure-u-xl-1-2,
653 .pure-u-xl-1-3,
654 .pure-u-xl-2-3,
655 .pure-u-xl-1-4,
656 .pure-u-xl-3-4,
657 .pure-u-xl-1-5,
658 .pure-u-xl-2-5,
659 .pure-u-xl-3-5,
660 .pure-u-xl-4-5,
661 .pure-u-xl-5-5,
662 .pure-u-xl-1-6,
663 .pure-u-xl-5-6,
664 .pure-u-xl-1-8,
665 .pure-u-xl-3-8,
666 .pure-u-xl-5-8,
667 .pure-u-xl-7-8,
668 .pure-u-xl-1-12,
669 .pure-u-xl-5-12,
670 .pure-u-xl-7-12,
671 .pure-u-xl-11-12,
672 .pure-u-xl-1-24,
673 .pure-u-xl-2-24,
674 .pure-u-xl-3-24,
675 .pure-u-xl-4-24,
676 .pure-u-xl-5-24,
677 .pure-u-xl-6-24,
678 .pure-u-xl-7-24,
679 .pure-u-xl-8-24,
680 .pure-u-xl-9-24,
681 .pure-u-xl-10-24,
682 .pure-u-xl-11-24,
683 .pure-u-xl-12-24,
684 .pure-u-xl-13-24,
685 .pure-u-xl-14-24,
686 .pure-u-xl-15-24,
687 .pure-u-xl-16-24,
688 .pure-u-xl-17-24,
689 .pure-u-xl-18-24,
690 .pure-u-xl-19-24,
691 .pure-u-xl-20-24,
692 .pure-u-xl-21-24,
693 .pure-u-xl-22-24,
694 .pure-u-xl-23-24,
695 .pure-u-xl-24-24 {
696 display: inline-block;
697 *display: inline;
698 zoom: 1;
699 letter-spacing: normal;
700 word-spacing: normal;
701 vertical-align: top;
702 text-rendering: auto;
703 }
704
705 .pure-u-xl-1-24 {
706 width: 4.1667%;
707 *width: 4.1357%;
708 }
709
710 .pure-u-xl-1-12,
711 .pure-u-xl-2-24 {
712 width: 8.3333%;
713 *width: 8.3023%;
714 }
715
716 .pure-u-xl-1-8,
717 .pure-u-xl-3-24 {
718 width: 12.5000%;
719 *width: 12.4690%;
720 }
721
722 .pure-u-xl-1-6,
723 .pure-u-xl-4-24 {
724 width: 16.6667%;
725 *width: 16.6357%;
726 }
727
728 .pure-u-xl-1-5 {
729 width: 20%;
730 *width: 19.9690%;
731 }
732
733 .pure-u-xl-5-24 {
734 width: 20.8333%;
735 *width: 20.8023%;
736 }
737
738 .pure-u-xl-1-4,
739 .pure-u-xl-6-24 {
740 width: 25%;
741 *width: 24.9690%;
742 }
743
744 .pure-u-xl-7-24 {
745 width: 29.1667%;
746 *width: 29.1357%;
747 }
748
749 .pure-u-xl-1-3,
750 .pure-u-xl-8-24 {
751 width: 33.3333%;
752 *width: 33.3023%;
753 }
754
755 .pure-u-xl-3-8,
756 .pure-u-xl-9-24 {
757 width: 37.5000%;
758 *width: 37.4690%;
759 }
760
761 .pure-u-xl-2-5 {
762 width: 40%;
763 *width: 39.9690%;
764 }
765
766 .pure-u-xl-5-12,
767 .pure-u-xl-10-24 {
768 width: 41.6667%;
769 *width: 41.6357%;
770 }
771
772 .pure-u-xl-11-24 {
773 width: 45.8333%;
774 *width: 45.8023%;
775 }
776
777 .pure-u-xl-1-2,
778 .pure-u-xl-12-24 {
779 width: 50%;
780 *width: 49.9690%;
781 }
782
783 .pure-u-xl-13-24 {
784 width: 54.1667%;
785 *width: 54.1357%;
786 }
787
788 .pure-u-xl-7-12,
789 .pure-u-xl-14-24 {
790 width: 58.3333%;
791 *width: 58.3023%;
792 }
793
794 .pure-u-xl-3-5 {
795 width: 60%;
796 *width: 59.9690%;
797 }
798
799 .pure-u-xl-5-8,
800 .pure-u-xl-15-24 {
801 width: 62.5000%;
802 *width: 62.4690%;
803 }
804
805 .pure-u-xl-2-3,
806 .pure-u-xl-16-24 {
807 width: 66.6667%;
808 *width: 66.6357%;
809 }
810
811 .pure-u-xl-17-24 {
812 width: 70.8333%;
813 *width: 70.8023%;
814 }
815
816 .pure-u-xl-3-4,
817 .pure-u-xl-18-24 {
818 width: 75%;
819 *width: 74.9690%;
820 }
821
822 .pure-u-xl-19-24 {
823 width: 79.1667%;
824 *width: 79.1357%;
825 }
826
827 .pure-u-xl-4-5 {
828 width: 80%;
829 *width: 79.9690%;
830 }
831
832 .pure-u-xl-5-6,
833 .pure-u-xl-20-24 {
834 width: 83.3333%;
835 *width: 83.3023%;
836 }
837
838 .pure-u-xl-7-8,
839 .pure-u-xl-21-24 {
840 width: 87.5000%;
841 *width: 87.4690%;
842 }
843
844 .pure-u-xl-11-12,
845 .pure-u-xl-22-24 {
846 width: 91.6667%;
847 *width: 91.6357%;
848 }
849
850 .pure-u-xl-23-24 {
851 width: 95.8333%;
852 *width: 95.8023%;
853 }
854
855 .pure-u-xl-1,
856 .pure-u-xl-1-1,
857 .pure-u-xl-5-5,
858 .pure-u-xl-24-24 {
859 width: 100%;
860 }
861} \ No newline at end of file
diff --git a/tpl/default/css/grids-responsive.min.css b/tpl/default/css/grids-responsive.min.css
new file mode 100644
index 00000000..1df05db8
--- /dev/null
+++ b/tpl/default/css/grids-responsive.min.css
@@ -0,0 +1,7 @@
1/*!
2Pure v0.6.0
3Copyright 2014 Yahoo! Inc. All rights reserved.
4Licensed under the BSD License.
5https://github.com/yahoo/pure/blob/master/LICENSE.md
6*/
7@media screen and (min-width:35.5em){.pure-u-sm-1,.pure-u-sm-1-1,.pure-u-sm-1-2,.pure-u-sm-1-3,.pure-u-sm-2-3,.pure-u-sm-1-4,.pure-u-sm-3-4,.pure-u-sm-1-5,.pure-u-sm-2-5,.pure-u-sm-3-5,.pure-u-sm-4-5,.pure-u-sm-5-5,.pure-u-sm-1-6,.pure-u-sm-5-6,.pure-u-sm-1-8,.pure-u-sm-3-8,.pure-u-sm-5-8,.pure-u-sm-7-8,.pure-u-sm-1-12,.pure-u-sm-5-12,.pure-u-sm-7-12,.pure-u-sm-11-12,.pure-u-sm-1-24,.pure-u-sm-2-24,.pure-u-sm-3-24,.pure-u-sm-4-24,.pure-u-sm-5-24,.pure-u-sm-6-24,.pure-u-sm-7-24,.pure-u-sm-8-24,.pure-u-sm-9-24,.pure-u-sm-10-24,.pure-u-sm-11-24,.pure-u-sm-12-24,.pure-u-sm-13-24,.pure-u-sm-14-24,.pure-u-sm-15-24,.pure-u-sm-16-24,.pure-u-sm-17-24,.pure-u-sm-18-24,.pure-u-sm-19-24,.pure-u-sm-20-24,.pure-u-sm-21-24,.pure-u-sm-22-24,.pure-u-sm-23-24,.pure-u-sm-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-sm-1-24{width:4.1667%;*width:4.1357%}.pure-u-sm-1-12,.pure-u-sm-2-24{width:8.3333%;*width:8.3023%}.pure-u-sm-1-8,.pure-u-sm-3-24{width:12.5%;*width:12.469%}.pure-u-sm-1-6,.pure-u-sm-4-24{width:16.6667%;*width:16.6357%}.pure-u-sm-1-5{width:20%;*width:19.969%}.pure-u-sm-5-24{width:20.8333%;*width:20.8023%}.pure-u-sm-1-4,.pure-u-sm-6-24{width:25%;*width:24.969%}.pure-u-sm-7-24{width:29.1667%;*width:29.1357%}.pure-u-sm-1-3,.pure-u-sm-8-24{width:33.3333%;*width:33.3023%}.pure-u-sm-3-8,.pure-u-sm-9-24{width:37.5%;*width:37.469%}.pure-u-sm-2-5{width:40%;*width:39.969%}.pure-u-sm-5-12,.pure-u-sm-10-24{width:41.6667%;*width:41.6357%}.pure-u-sm-11-24{width:45.8333%;*width:45.8023%}.pure-u-sm-1-2,.pure-u-sm-12-24{width:50%;*width:49.969%}.pure-u-sm-13-24{width:54.1667%;*width:54.1357%}.pure-u-sm-7-12,.pure-u-sm-14-24{width:58.3333%;*width:58.3023%}.pure-u-sm-3-5{width:60%;*width:59.969%}.pure-u-sm-5-8,.pure-u-sm-15-24{width:62.5%;*width:62.469%}.pure-u-sm-2-3,.pure-u-sm-16-24{width:66.6667%;*width:66.6357%}.pure-u-sm-17-24{width:70.8333%;*width:70.8023%}.pure-u-sm-3-4,.pure-u-sm-18-24{width:75%;*width:74.969%}.pure-u-sm-19-24{width:79.1667%;*width:79.1357%}.pure-u-sm-4-5{width:80%;*width:79.969%}.pure-u-sm-5-6,.pure-u-sm-20-24{width:83.3333%;*width:83.3023%}.pure-u-sm-7-8,.pure-u-sm-21-24{width:87.5%;*width:87.469%}.pure-u-sm-11-12,.pure-u-sm-22-24{width:91.6667%;*width:91.6357%}.pure-u-sm-23-24{width:95.8333%;*width:95.8023%}.pure-u-sm-1,.pure-u-sm-1-1,.pure-u-sm-5-5,.pure-u-sm-24-24{width:100%}}@media screen and (min-width:48em){.pure-u-md-1,.pure-u-md-1-1,.pure-u-md-1-2,.pure-u-md-1-3,.pure-u-md-2-3,.pure-u-md-1-4,.pure-u-md-3-4,.pure-u-md-1-5,.pure-u-md-2-5,.pure-u-md-3-5,.pure-u-md-4-5,.pure-u-md-5-5,.pure-u-md-1-6,.pure-u-md-5-6,.pure-u-md-1-8,.pure-u-md-3-8,.pure-u-md-5-8,.pure-u-md-7-8,.pure-u-md-1-12,.pure-u-md-5-12,.pure-u-md-7-12,.pure-u-md-11-12,.pure-u-md-1-24,.pure-u-md-2-24,.pure-u-md-3-24,.pure-u-md-4-24,.pure-u-md-5-24,.pure-u-md-6-24,.pure-u-md-7-24,.pure-u-md-8-24,.pure-u-md-9-24,.pure-u-md-10-24,.pure-u-md-11-24,.pure-u-md-12-24,.pure-u-md-13-24,.pure-u-md-14-24,.pure-u-md-15-24,.pure-u-md-16-24,.pure-u-md-17-24,.pure-u-md-18-24,.pure-u-md-19-24,.pure-u-md-20-24,.pure-u-md-21-24,.pure-u-md-22-24,.pure-u-md-23-24,.pure-u-md-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-md-1-24{width:4.1667%;*width:4.1357%}.pure-u-md-1-12,.pure-u-md-2-24{width:8.3333%;*width:8.3023%}.pure-u-md-1-8,.pure-u-md-3-24{width:12.5%;*width:12.469%}.pure-u-md-1-6,.pure-u-md-4-24{width:16.6667%;*width:16.6357%}.pure-u-md-1-5{width:20%;*width:19.969%}.pure-u-md-5-24{width:20.8333%;*width:20.8023%}.pure-u-md-1-4,.pure-u-md-6-24{width:25%;*width:24.969%}.pure-u-md-7-24{width:29.1667%;*width:29.1357%}.pure-u-md-1-3,.pure-u-md-8-24{width:33.3333%;*width:33.3023%}.pure-u-md-3-8,.pure-u-md-9-24{width:37.5%;*width:37.469%}.pure-u-md-2-5{width:40%;*width:39.969%}.pure-u-md-5-12,.pure-u-md-10-24{width:41.6667%;*width:41.6357%}.pure-u-md-11-24{width:45.8333%;*width:45.8023%}.pure-u-md-1-2,.pure-u-md-12-24{width:50%;*width:49.969%}.pure-u-md-13-24{width:54.1667%;*width:54.1357%}.pure-u-md-7-12,.pure-u-md-14-24{width:58.3333%;*width:58.3023%}.pure-u-md-3-5{width:60%;*width:59.969%}.pure-u-md-5-8,.pure-u-md-15-24{width:62.5%;*width:62.469%}.pure-u-md-2-3,.pure-u-md-16-24{width:66.6667%;*width:66.6357%}.pure-u-md-17-24{width:70.8333%;*width:70.8023%}.pure-u-md-3-4,.pure-u-md-18-24{width:75%;*width:74.969%}.pure-u-md-19-24{width:79.1667%;*width:79.1357%}.pure-u-md-4-5{width:80%;*width:79.969%}.pure-u-md-5-6,.pure-u-md-20-24{width:83.3333%;*width:83.3023%}.pure-u-md-7-8,.pure-u-md-21-24{width:87.5%;*width:87.469%}.pure-u-md-11-12,.pure-u-md-22-24{width:91.6667%;*width:91.6357%}.pure-u-md-23-24{width:95.8333%;*width:95.8023%}.pure-u-md-1,.pure-u-md-1-1,.pure-u-md-5-5,.pure-u-md-24-24{width:100%}}@media screen and (min-width:64em){.pure-u-lg-1,.pure-u-lg-1-1,.pure-u-lg-1-2,.pure-u-lg-1-3,.pure-u-lg-2-3,.pure-u-lg-1-4,.pure-u-lg-3-4,.pure-u-lg-1-5,.pure-u-lg-2-5,.pure-u-lg-3-5,.pure-u-lg-4-5,.pure-u-lg-5-5,.pure-u-lg-1-6,.pure-u-lg-5-6,.pure-u-lg-1-8,.pure-u-lg-3-8,.pure-u-lg-5-8,.pure-u-lg-7-8,.pure-u-lg-1-12,.pure-u-lg-5-12,.pure-u-lg-7-12,.pure-u-lg-11-12,.pure-u-lg-1-24,.pure-u-lg-2-24,.pure-u-lg-3-24,.pure-u-lg-4-24,.pure-u-lg-5-24,.pure-u-lg-6-24,.pure-u-lg-7-24,.pure-u-lg-8-24,.pure-u-lg-9-24,.pure-u-lg-10-24,.pure-u-lg-11-24,.pure-u-lg-12-24,.pure-u-lg-13-24,.pure-u-lg-14-24,.pure-u-lg-15-24,.pure-u-lg-16-24,.pure-u-lg-17-24,.pure-u-lg-18-24,.pure-u-lg-19-24,.pure-u-lg-20-24,.pure-u-lg-21-24,.pure-u-lg-22-24,.pure-u-lg-23-24,.pure-u-lg-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-lg-1-24{width:4.1667%;*width:4.1357%}.pure-u-lg-1-12,.pure-u-lg-2-24{width:8.3333%;*width:8.3023%}.pure-u-lg-1-8,.pure-u-lg-3-24{width:12.5%;*width:12.469%}.pure-u-lg-1-6,.pure-u-lg-4-24{width:16.6667%;*width:16.6357%}.pure-u-lg-1-5{width:20%;*width:19.969%}.pure-u-lg-5-24{width:20.8333%;*width:20.8023%}.pure-u-lg-1-4,.pure-u-lg-6-24{width:25%;*width:24.969%}.pure-u-lg-7-24{width:29.1667%;*width:29.1357%}.pure-u-lg-1-3,.pure-u-lg-8-24{width:33.3333%;*width:33.3023%}.pure-u-lg-3-8,.pure-u-lg-9-24{width:37.5%;*width:37.469%}.pure-u-lg-2-5{width:40%;*width:39.969%}.pure-u-lg-5-12,.pure-u-lg-10-24{width:41.6667%;*width:41.6357%}.pure-u-lg-11-24{width:45.8333%;*width:45.8023%}.pure-u-lg-1-2,.pure-u-lg-12-24{width:50%;*width:49.969%}.pure-u-lg-13-24{width:54.1667%;*width:54.1357%}.pure-u-lg-7-12,.pure-u-lg-14-24{width:58.3333%;*width:58.3023%}.pure-u-lg-3-5{width:60%;*width:59.969%}.pure-u-lg-5-8,.pure-u-lg-15-24{width:62.5%;*width:62.469%}.pure-u-lg-2-3,.pure-u-lg-16-24{width:66.6667%;*width:66.6357%}.pure-u-lg-17-24{width:70.8333%;*width:70.8023%}.pure-u-lg-3-4,.pure-u-lg-18-24{width:75%;*width:74.969%}.pure-u-lg-19-24{width:79.1667%;*width:79.1357%}.pure-u-lg-4-5{width:80%;*width:79.969%}.pure-u-lg-5-6,.pure-u-lg-20-24{width:83.3333%;*width:83.3023%}.pure-u-lg-7-8,.pure-u-lg-21-24{width:87.5%;*width:87.469%}.pure-u-lg-11-12,.pure-u-lg-22-24{width:91.6667%;*width:91.6357%}.pure-u-lg-23-24{width:95.8333%;*width:95.8023%}.pure-u-lg-1,.pure-u-lg-1-1,.pure-u-lg-5-5,.pure-u-lg-24-24{width:100%}}@media screen and (min-width:80em){.pure-u-xl-1,.pure-u-xl-1-1,.pure-u-xl-1-2,.pure-u-xl-1-3,.pure-u-xl-2-3,.pure-u-xl-1-4,.pure-u-xl-3-4,.pure-u-xl-1-5,.pure-u-xl-2-5,.pure-u-xl-3-5,.pure-u-xl-4-5,.pure-u-xl-5-5,.pure-u-xl-1-6,.pure-u-xl-5-6,.pure-u-xl-1-8,.pure-u-xl-3-8,.pure-u-xl-5-8,.pure-u-xl-7-8,.pure-u-xl-1-12,.pure-u-xl-5-12,.pure-u-xl-7-12,.pure-u-xl-11-12,.pure-u-xl-1-24,.pure-u-xl-2-24,.pure-u-xl-3-24,.pure-u-xl-4-24,.pure-u-xl-5-24,.pure-u-xl-6-24,.pure-u-xl-7-24,.pure-u-xl-8-24,.pure-u-xl-9-24,.pure-u-xl-10-24,.pure-u-xl-11-24,.pure-u-xl-12-24,.pure-u-xl-13-24,.pure-u-xl-14-24,.pure-u-xl-15-24,.pure-u-xl-16-24,.pure-u-xl-17-24,.pure-u-xl-18-24,.pure-u-xl-19-24,.pure-u-xl-20-24,.pure-u-xl-21-24,.pure-u-xl-22-24,.pure-u-xl-23-24,.pure-u-xl-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-xl-1-24{width:4.1667%;*width:4.1357%}.pure-u-xl-1-12,.pure-u-xl-2-24{width:8.3333%;*width:8.3023%}.pure-u-xl-1-8,.pure-u-xl-3-24{width:12.5%;*width:12.469%}.pure-u-xl-1-6,.pure-u-xl-4-24{width:16.6667%;*width:16.6357%}.pure-u-xl-1-5{width:20%;*width:19.969%}.pure-u-xl-5-24{width:20.8333%;*width:20.8023%}.pure-u-xl-1-4,.pure-u-xl-6-24{width:25%;*width:24.969%}.pure-u-xl-7-24{width:29.1667%;*width:29.1357%}.pure-u-xl-1-3,.pure-u-xl-8-24{width:33.3333%;*width:33.3023%}.pure-u-xl-3-8,.pure-u-xl-9-24{width:37.5%;*width:37.469%}.pure-u-xl-2-5{width:40%;*width:39.969%}.pure-u-xl-5-12,.pure-u-xl-10-24{width:41.6667%;*width:41.6357%}.pure-u-xl-11-24{width:45.8333%;*width:45.8023%}.pure-u-xl-1-2,.pure-u-xl-12-24{width:50%;*width:49.969%}.pure-u-xl-13-24{width:54.1667%;*width:54.1357%}.pure-u-xl-7-12,.pure-u-xl-14-24{width:58.3333%;*width:58.3023%}.pure-u-xl-3-5{width:60%;*width:59.969%}.pure-u-xl-5-8,.pure-u-xl-15-24{width:62.5%;*width:62.469%}.pure-u-xl-2-3,.pure-u-xl-16-24{width:66.6667%;*width:66.6357%}.pure-u-xl-17-24{width:70.8333%;*width:70.8023%}.pure-u-xl-3-4,.pure-u-xl-18-24{width:75%;*width:74.969%}.pure-u-xl-19-24{width:79.1667%;*width:79.1357%}.pure-u-xl-4-5{width:80%;*width:79.969%}.pure-u-xl-5-6,.pure-u-xl-20-24{width:83.3333%;*width:83.3023%}.pure-u-xl-7-8,.pure-u-xl-21-24{width:87.5%;*width:87.469%}.pure-u-xl-11-12,.pure-u-xl-22-24{width:91.6667%;*width:91.6357%}.pure-u-xl-23-24{width:95.8333%;*width:95.8023%}.pure-u-xl-1,.pure-u-xl-1-1,.pure-u-xl-5-5,.pure-u-xl-24-24{width:100%}} \ No newline at end of file
diff --git a/tpl/default/css/pure-extras.css b/tpl/default/css/pure-extras.css
new file mode 100644
index 00000000..d72fc94c
--- /dev/null
+++ b/tpl/default/css/pure-extras.css
@@ -0,0 +1,262 @@
1/* Images */
2.pure-img-eliptical {
3 border-radius: 80%;
4}
5.pure-img-rounded {
6 border-radius: 3px;
7}
8.pure-img-bordered {
9 background-color: #FFFFFF;
10 border: 1px solid rgba(0, 0, 0, 0.2);
11 padding: 5px;
12}
13
14
15/* Thumbnails */
16.pure-thumbnails li {
17 text-align: center;
18 display: inline-block;
19 *display: inline;
20 /* IE7 inline-block hack */
21 *zoom: 1;
22 vertical-align: top;
23 -webkit-box-sizing: border-box;
24 -moz-box-sizing: border-box;
25 box-sizing: border-box;
26 padding: 0.5em;
27}
28.pure-thumbnails {
29 list-style: none;
30 margin: 0;
31 padding: 0;
32}
33
34.pure-thumbnails a:focus {
35 outline: 0 none;
36}
37
38.pure-thumb {
39 display: block;
40 text-decoration: none;
41 color: inherit;
42}
43.pure-thumb img {
44 max-width: 100%;
45 margin-right: auto;
46 margin-left: auto;
47 vertical-align: middle; /* this will remove a thin line below the image */
48 -webkit-box-sizing: border-box;
49 -moz-box-sizing: border-box;
50 box-sizing: border-box;
51}
52
53.pure-thumb-bordered {
54 border: 1px solid rgba(0, 0, 0, 0.2);
55}
56.pure-thumb .caption {
57 text-align: left;
58 display: block;
59 margin: 0 5px 6px;
60
61}
62.pure-thumb .caption p {
63 margin: 0.3em 0 0;
64 font-size: 75%;
65}
66.pure-thumb .caption .caption-head {
67 font-weight: bold;
68 margin-top: 0.3em;
69}
70
71.pure-thumb-eliptical img {
72 border-radius: 50%;
73}
74.pure-thumb-rounded img {
75 border-radius: 3px;
76}
77
78/* Badges/Pills */
79.pure-badge,
80.pure-badge-error,
81.pure-badge-warning,
82.pure-badge-success,
83.pure-badge-info,
84.pure-badge-inverse {
85 padding: 0.35em 0.9em 0.35em;
86 background-color: #9D988E;
87 color: #fff;
88 display: inline-block;
89 font-size: 11.844px;
90 font-weight: bold;
91 line-height: 1.2em;
92 vertical-align: baseline;
93 white-space: nowrap;
94 border-radius: 20px;
95 margin: 0.2em;
96}
97.pure-badge-error {
98 background-color: #D13C38;
99}
100.pure-badge-warning {
101 background-color: #E78C05;
102}
103.pure-badge-success {
104 background-color: rgb(83, 180, 79);
105}
106.pure-badge-info {
107 background-color: rgb(18, 169, 218);
108}
109.pure-badge-inverse {
110 background-color: #4D370C;
111}
112
113/* Alerts */
114.pure-alert {
115 position: relative;
116 margin-bottom: 1em;
117 padding: 1em;
118 background: #ccc;
119 border-radius: 3px;
120}
121
122.pure-alert label {
123 display: inline-block;
124 *display: inline;
125 /* IE7 inline-block hack */
126 *zoom: 1;
127 white-space: nowrap;
128}
129
130.pure-alert {
131 background-color: rgb(209, 235, 238);
132 color: rgb(102, 131, 145);
133}
134.pure-alert-error {
135 background-color: #D13C38;
136 color: #fff;
137}
138
139.pure-alert-warning {
140 background-color: rgb(250, 191, 103);
141 color: rgb(151, 96, 13);
142}
143
144.pure-alert-success {
145 background-color: rgb(83, 180, 79);
146 color: #fff;
147}
148
149
150/* Contextual Modals */
151
152.pure-popover {
153 position: relative;
154 width: 300px;
155 background-color: #f0f1f3;
156 color: #2f3034;
157 padding: 15px;
158 border: 1px solid #bfc0c8;
159 border-radius: 2px;
160 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
161 box-padding: border-box;
162 -webkit-background-clip: padding-box;
163 -moz-background-clip: padding;
164 background-clip: padding-box;
165}
166
167.pure-arrow-border, .pure-arrow {
168 border-style: solid;
169 border-width: 10px;
170 height:0;
171 width:0;
172 position:absolute;
173}
174
175
176/* POPOVER ARROW POSITIONING BOTTOM */
177
178.pure-popover.bottom .pure-arrow-border {
179 border-color: #bfc0c8 transparent transparent transparent;
180 bottom: -20px;
181 left: 50%;
182}
183.pure-popover.bottom .pure-arrow {
184 border-color: #f0f1f3 transparent transparent transparent;
185 bottom:-19px;
186 left: 50%;
187}
188
189/* POPOVER ARROW POSITIONING TOP*/
190
191.pure-popover.top .pure-arrow-border {
192 border-color: transparent transparent #bfc0c8 transparent;
193 top: -21px;
194 left: 50%;
195}
196.pure-popover.top .pure-arrow {
197 border-color: transparent transparent #f0f1f3 transparent;
198 top:-20px;
199 left: 50%;
200}
201
202/* POPOVER ARROW POSITIONING RIGHT*/
203
204.pure-popover.right .pure-arrow-border {
205 border-color: transparent transparent transparent #bfc0c8;
206 top: 45%;
207 right: -21px;
208}
209.pure-popover.right .pure-arrow {
210 border-color: transparent transparent transparent #f0f1f3;
211 top:45%;
212 right: -20px;
213}
214
215
216/* POPOVER ARROW POSITIONING LEFT*/
217
218.pure-popover.left .pure-arrow-border {
219 border-color: transparent #bfc0c8 transparent transparent;
220 top: 45%;
221 left: -21px;
222}
223.pure-popover.left .pure-arrow {
224 border-color: transparent #f0f1f3 transparent transparent;
225 top:45%;
226 left: -20px;
227}
228
229
230/* BUTTON IMPROVEMENTS */
231.pure-button-block {
232 display: block;
233}
234.pure-button-small {
235 padding: .6em 2em .65em;
236 font-size:70%;
237}
238.pure-button-large {
239 padding: .8em 5em .9em;
240 font-size:110%;
241}
242.pure-button-selected {
243 background-color: #345fcb;
244 color: #fff;
245}
246.pure-button-secondary {
247 background: rgb(161, 195, 238);
248 color: rgb(26, 88, 122);
249}
250.pure-button-error {
251 background: rgb(214, 86, 75);
252 color: white;
253}
254.pure-button-success {
255 background: rgb(54, 197, 71);
256 color: white;
257}
258.pure-button-warning {
259 background: rgb(255, 163, 0);
260 color: white;
261}
262
diff --git a/tpl/default/css/pure.css b/tpl/default/css/pure.css
new file mode 100644
index 00000000..a07d74cf
--- /dev/null
+++ b/tpl/default/css/pure.css
@@ -0,0 +1,1475 @@
1/*!
2Pure v0.6.0
3Copyright 2014 Yahoo! Inc. All rights reserved.
4Licensed under the BSD License.
5https://github.com/yahoo/pure/blob/master/LICENSE.md
6*/
7/*!
8normalize.css v^3.0 | MIT License | git.io/normalize
9Copyright (c) Nicolas Gallagher and Jonathan Neal
10*/
11/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
12
13/**
14 * 1. Set default font family to sans-serif.
15 * 2. Prevent iOS text size adjust after orientation change, without disabling
16 * user zoom.
17 */
18
19html {
20 font-family: sans-serif; /* 1 */
21 -ms-text-size-adjust: 100%; /* 2 */
22 -webkit-text-size-adjust: 100%; /* 2 */
23}
24
25/**
26 * Remove default margin.
27 */
28
29body {
30 margin: 0;
31}
32
33/* HTML5 display definitions
34 ========================================================================== */
35
36/**
37 * Correct `block` display not defined for any HTML5 element in IE 8/9.
38 * Correct `block` display not defined for `details` or `summary` in IE 10/11
39 * and Firefox.
40 * Correct `block` display not defined for `main` in IE 11.
41 */
42
43article,
44aside,
45details,
46figcaption,
47figure,
48footer,
49header,
50hgroup,
51main,
52menu,
53nav,
54section,
55summary {
56 display: block;
57}
58
59/**
60 * 1. Correct `inline-block` display not defined in IE 8/9.
61 * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
62 */
63
64audio,
65canvas,
66progress,
67video {
68 display: inline-block; /* 1 */
69 vertical-align: baseline; /* 2 */
70}
71
72/**
73 * Prevent modern browsers from displaying `audio` without controls.
74 * Remove excess height in iOS 5 devices.
75 */
76
77audio:not([controls]) {
78 display: none;
79 height: 0;
80}
81
82/**
83 * Address `[hidden]` styling not present in IE 8/9/10.
84 * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
85 */
86
87[hidden],
88template {
89 display: none;
90}
91
92/* Links
93 ========================================================================== */
94
95/**
96 * Remove the gray background color from active links in IE 10.
97 */
98
99a {
100 background-color: transparent;
101}
102
103/**
104 * Improve readability when focused and also mouse hovered in all browsers.
105 */
106
107a:active,
108a:hover {
109 outline: 0;
110}
111
112/* Text-level semantics
113 ========================================================================== */
114
115/**
116 * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
117 */
118
119abbr[title] {
120 border-bottom: 1px dotted;
121}
122
123/**
124 * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
125 */
126
127b,
128strong {
129 font-weight: bold;
130}
131
132/**
133 * Address styling not present in Safari and Chrome.
134 */
135
136dfn {
137 font-style: italic;
138}
139
140/**
141 * Address variable `h1` font-size and margin within `section` and `article`
142 * contexts in Firefox 4+, Safari, and Chrome.
143 */
144
145h1 {
146 font-size: 2em;
147 margin: 0.67em 0;
148}
149
150/**
151 * Address styling not present in IE 8/9.
152 */
153
154mark {
155 background: #ff0;
156 color: #000;
157}
158
159/**
160 * Address inconsistent and variable font size in all browsers.
161 */
162
163small {
164 font-size: 80%;
165}
166
167/**
168 * Prevent `sub` and `sup` affecting `line-height` in all browsers.
169 */
170
171sub,
172sup {
173 font-size: 75%;
174 line-height: 0;
175 position: relative;
176 vertical-align: baseline;
177}
178
179sup {
180 top: -0.5em;
181}
182
183sub {
184 bottom: -0.25em;
185}
186
187/* Embedded content
188 ========================================================================== */
189
190/**
191 * Remove border when inside `a` element in IE 8/9/10.
192 */
193
194img {
195 border: 0;
196}
197
198/**
199 * Correct overflow not hidden in IE 9/10/11.
200 */
201
202svg:not(:root) {
203 overflow: hidden;
204}
205
206/* Grouping content
207 ========================================================================== */
208
209/**
210 * Address margin not present in IE 8/9 and Safari.
211 */
212
213figure {
214 margin: 1em 40px;
215}
216
217/**
218 * Address differences between Firefox and other browsers.
219 */
220
221hr {
222 -moz-box-sizing: content-box;
223 box-sizing: content-box;
224 height: 0;
225}
226
227/**
228 * Contain overflow in all browsers.
229 */
230
231pre {
232 overflow: auto;
233}
234
235/**
236 * Address odd `em`-unit font size rendering in all browsers.
237 */
238
239code,
240kbd,
241pre,
242samp {
243 font-family: monospace, monospace;
244 font-size: 1em;
245}
246
247/* Forms
248 ========================================================================== */
249
250/**
251 * Known limitation: by default, Chrome and Safari on OS X allow very limited
252 * styling of `select`, unless a `border` property is set.
253 */
254
255/**
256 * 1. Correct color not being inherited.
257 * Known issue: affects color of disabled elements.
258 * 2. Correct font properties not being inherited.
259 * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
260 */
261
262button,
263input,
264optgroup,
265select,
266textarea {
267 color: inherit; /* 1 */
268 font: inherit; /* 2 */
269 margin: 0; /* 3 */
270}
271
272/**
273 * Address `overflow` set to `hidden` in IE 8/9/10/11.
274 */
275
276button {
277 overflow: visible;
278}
279
280/**
281 * Address inconsistent `text-transform` inheritance for `button` and `select`.
282 * All other form control elements do not inherit `text-transform` values.
283 * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
284 * Correct `select` style inheritance in Firefox.
285 */
286
287button,
288select {
289 text-transform: none;
290}
291
292/**
293 * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
294 * and `video` controls.
295 * 2. Correct inability to style clickable `input` types in iOS.
296 * 3. Improve usability and consistency of cursor style between image-type
297 * `input` and others.
298 */
299
300button,
301html input[type="button"], /* 1 */
302input[type="reset"],
303input[type="submit"] {
304 -webkit-appearance: button; /* 2 */
305 cursor: pointer; /* 3 */
306}
307
308/**
309 * Re-set default cursor for disabled elements.
310 */
311
312button[disabled],
313html input[disabled] {
314 cursor: default;
315}
316
317/**
318 * Remove inner padding and border in Firefox 4+.
319 */
320
321button::-moz-focus-inner,
322input::-moz-focus-inner {
323 border: 0;
324 padding: 0;
325}
326
327/**
328 * Address Firefox 4+ setting `line-height` on `input` using `!important` in
329 * the UA stylesheet.
330 */
331
332input {
333 line-height: normal;
334}
335
336/**
337 * It's recommended that you don't attempt to style these elements.
338 * Firefox's implementation doesn't respect box-sizing, padding, or width.
339 *
340 * 1. Address box sizing set to `content-box` in IE 8/9/10.
341 * 2. Remove excess padding in IE 8/9/10.
342 */
343
344input[type="checkbox"],
345input[type="radio"] {
346 box-sizing: border-box; /* 1 */
347 padding: 0; /* 2 */
348}
349
350/**
351 * Fix the cursor style for Chrome's increment/decrement buttons. For certain
352 * `font-size` values of the `input`, it causes the cursor style of the
353 * decrement button to change from `default` to `text`.
354 */
355
356input[type="number"]::-webkit-inner-spin-button,
357input[type="number"]::-webkit-outer-spin-button {
358 height: auto;
359}
360
361/**
362 * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
363 * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
364 * (include `-moz` to future-proof).
365 */
366
367input[type="search"] {
368 -webkit-appearance: textfield; /* 1 */
369 -moz-box-sizing: content-box;
370 -webkit-box-sizing: content-box; /* 2 */
371 box-sizing: content-box;
372}
373
374/**
375 * Remove inner padding and search cancel button in Safari and Chrome on OS X.
376 * Safari (but not Chrome) clips the cancel button when the search input has
377 * padding (and `textfield` appearance).
378 */
379
380input[type="search"]::-webkit-search-cancel-button,
381input[type="search"]::-webkit-search-decoration {
382 -webkit-appearance: none;
383}
384
385/**
386 * Define consistent border, margin, and padding.
387 */
388
389fieldset {
390 border: 1px solid #c0c0c0;
391 margin: 0 2px;
392 padding: 0.35em 0.625em 0.75em;
393}
394
395/**
396 * 1. Correct `color` not being inherited in IE 8/9/10/11.
397 * 2. Remove padding so people aren't caught out if they zero out fieldsets.
398 */
399
400legend {
401 border: 0; /* 1 */
402 padding: 0; /* 2 */
403}
404
405/**
406 * Remove default vertical scrollbar in IE 8/9/10/11.
407 */
408
409textarea {
410 overflow: auto;
411}
412
413/**
414 * Don't inherit the `font-weight` (applied by a rule above).
415 * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
416 */
417
418optgroup {
419 font-weight: bold;
420}
421
422/* Tables
423 ========================================================================== */
424
425/**
426 * Remove most spacing between table cells.
427 */
428
429table {
430 border-collapse: collapse;
431 border-spacing: 0;
432}
433
434td,
435th {
436 padding: 0;
437}
438
439/*csslint important:false*/
440
441/* ==========================================================================
442 Pure Base Extras
443 ========================================================================== */
444
445/**
446 * Extra rules that Pure adds on top of Normalize.css
447 */
448
449/**
450 * Always hide an element when it has the `hidden` HTML attribute.
451 */
452
453.hidden,
454[hidden] {
455 display: none !important;
456}
457
458/**
459 * Add this class to an image to make it fit within it's fluid parent wrapper while maintaining
460 * aspect ratio.
461 */
462.pure-img {
463 max-width: 100%;
464 height: auto;
465 display: block;
466}
467
468/*csslint regex-selectors:false, known-properties:false, duplicate-properties:false*/
469
470.pure-g {
471 letter-spacing: -0.31em; /* Webkit: collapse white-space between units */
472 *letter-spacing: normal; /* reset IE < 8 */
473 *word-spacing: -0.43em; /* IE < 8: collapse white-space between units */
474 text-rendering: optimizespeed; /* Webkit: fixes text-rendering: optimizeLegibility */
475
476 /*
477 Sets the font stack to fonts known to work properly with the above letter
478 and word spacings. See: https://github.com/yahoo/pure/issues/41/
479
480 The following font stack makes Pure Grids work on all known environments.
481
482 * FreeSans: Ships with many Linux distros, including Ubuntu
483
484 * Arimo: Ships with Chrome OS. Arimo has to be defined before Helvetica and
485 Arial to get picked up by the browser, even though neither is available
486 in Chrome OS.
487
488 * Droid Sans: Ships with all versions of Android.
489
490 * Helvetica, Arial, sans-serif: Common font stack on OS X and Windows.
491 */
492 font-family: FreeSans, Arimo, "Droid Sans", Helvetica, Arial, sans-serif;
493
494 /*
495 Use flexbox when possible to avoid `letter-spacing` side-effects.
496
497 NOTE: Firefox (as of 25) does not currently support flex-wrap, so the
498 `-moz-` prefix version is omitted.
499 */
500
501 display: -webkit-flex;
502 -webkit-flex-flow: row wrap;
503
504 /* IE10 uses display: flexbox */
505 display: -ms-flexbox;
506 -ms-flex-flow: row wrap;
507
508 /* Prevents distributing space between rows */
509 -ms-align-content: flex-start;
510 -webkit-align-content: flex-start;
511 align-content: flex-start;
512}
513
514/* Opera as of 12 on Windows needs word-spacing.
515 The ".opera-only" selector is used to prevent actual prefocus styling
516 and is not required in markup.
517*/
518.opera-only :-o-prefocus,
519.pure-g {
520 word-spacing: -0.43em;
521}
522
523.pure-u {
524 display: inline-block;
525 *display: inline; /* IE < 8: fake inline-block */
526 zoom: 1;
527 letter-spacing: normal;
528 word-spacing: normal;
529 vertical-align: top;
530 text-rendering: auto;
531}
532
533/*
534Resets the font family back to the OS/browser's default sans-serif font,
535this the same font stack that Normalize.css sets for the `body`.
536*/
537.pure-g [class *= "pure-u"] {
538 font-family: sans-serif;
539}
540
541.pure-u-1,
542.pure-u-1-1,
543.pure-u-1-2,
544.pure-u-1-3,
545.pure-u-2-3,
546.pure-u-1-4,
547.pure-u-3-4,
548.pure-u-1-5,
549.pure-u-2-5,
550.pure-u-3-5,
551.pure-u-4-5,
552.pure-u-5-5,
553.pure-u-1-6,
554.pure-u-5-6,
555.pure-u-1-8,
556.pure-u-3-8,
557.pure-u-5-8,
558.pure-u-7-8,
559.pure-u-1-12,
560.pure-u-5-12,
561.pure-u-7-12,
562.pure-u-11-12,
563.pure-u-1-24,
564.pure-u-2-24,
565.pure-u-3-24,
566.pure-u-4-24,
567.pure-u-5-24,
568.pure-u-6-24,
569.pure-u-7-24,
570.pure-u-8-24,
571.pure-u-9-24,
572.pure-u-10-24,
573.pure-u-11-24,
574.pure-u-12-24,
575.pure-u-13-24,
576.pure-u-14-24,
577.pure-u-15-24,
578.pure-u-16-24,
579.pure-u-17-24,
580.pure-u-18-24,
581.pure-u-19-24,
582.pure-u-20-24,
583.pure-u-21-24,
584.pure-u-22-24,
585.pure-u-23-24,
586.pure-u-24-24 {
587 display: inline-block;
588 *display: inline;
589 zoom: 1;
590 letter-spacing: normal;
591 word-spacing: normal;
592 vertical-align: top;
593 text-rendering: auto;
594}
595
596.pure-u-1-24 {
597 width: 4.1667%;
598 *width: 4.1357%;
599}
600
601.pure-u-1-12,
602.pure-u-2-24 {
603 width: 8.3333%;
604 *width: 8.3023%;
605}
606
607.pure-u-1-8,
608.pure-u-3-24 {
609 width: 12.5000%;
610 *width: 12.4690%;
611}
612
613.pure-u-1-6,
614.pure-u-4-24 {
615 width: 16.6667%;
616 *width: 16.6357%;
617}
618
619.pure-u-1-5 {
620 width: 20%;
621 *width: 19.9690%;
622}
623
624.pure-u-5-24 {
625 width: 20.8333%;
626 *width: 20.8023%;
627}
628
629.pure-u-1-4,
630.pure-u-6-24 {
631 width: 25%;
632 *width: 24.9690%;
633}
634
635.pure-u-7-24 {
636 width: 29.1667%;
637 *width: 29.1357%;
638}
639
640.pure-u-1-3,
641.pure-u-8-24 {
642 width: 33.3333%;
643 *width: 33.3023%;
644}
645
646.pure-u-3-8,
647.pure-u-9-24 {
648 width: 37.5000%;
649 *width: 37.4690%;
650}
651
652.pure-u-2-5 {
653 width: 40%;
654 *width: 39.9690%;
655}
656
657.pure-u-5-12,
658.pure-u-10-24 {
659 width: 41.6667%;
660 *width: 41.6357%;
661}
662
663.pure-u-11-24 {
664 width: 45.8333%;
665 *width: 45.8023%;
666}
667
668.pure-u-1-2,
669.pure-u-12-24 {
670 width: 50%;
671 *width: 49.9690%;
672}
673
674.pure-u-13-24 {
675 width: 54.1667%;
676 *width: 54.1357%;
677}
678
679.pure-u-7-12,
680.pure-u-14-24 {
681 width: 58.3333%;
682 *width: 58.3023%;
683}
684
685.pure-u-3-5 {
686 width: 60%;
687 *width: 59.9690%;
688}
689
690.pure-u-5-8,
691.pure-u-15-24 {
692 width: 62.5000%;
693 *width: 62.4690%;
694}
695
696.pure-u-2-3,
697.pure-u-16-24 {
698 width: 66.6667%;
699 *width: 66.6357%;
700}
701
702.pure-u-17-24 {
703 width: 70.8333%;
704 *width: 70.8023%;
705}
706
707.pure-u-3-4,
708.pure-u-18-24 {
709 width: 75%;
710 *width: 74.9690%;
711}
712
713.pure-u-19-24 {
714 width: 79.1667%;
715 *width: 79.1357%;
716}
717
718.pure-u-4-5 {
719 width: 80%;
720 *width: 79.9690%;
721}
722
723.pure-u-5-6,
724.pure-u-20-24 {
725 width: 83.3333%;
726 *width: 83.3023%;
727}
728
729.pure-u-7-8,
730.pure-u-21-24 {
731 width: 87.5000%;
732 *width: 87.4690%;
733}
734
735.pure-u-11-12,
736.pure-u-22-24 {
737 width: 91.6667%;
738 *width: 91.6357%;
739}
740
741.pure-u-23-24 {
742 width: 95.8333%;
743 *width: 95.8023%;
744}
745
746.pure-u-1,
747.pure-u-1-1,
748.pure-u-5-5,
749.pure-u-24-24 {
750 width: 100%;
751}
752.pure-button {
753 /* Structure */
754 display: inline-block;
755 zoom: 1;
756 line-height: normal;
757 white-space: nowrap;
758 vertical-align: middle;
759 text-align: center;
760 cursor: pointer;
761 -webkit-user-drag: none;
762 -webkit-user-select: none;
763 -moz-user-select: none;
764 -ms-user-select: none;
765 user-select: none;
766 -webkit-box-sizing: border-box;
767 -moz-box-sizing: border-box;
768 box-sizing: border-box;
769}
770
771/* Firefox: Get rid of the inner focus border */
772.pure-button::-moz-focus-inner {
773 padding: 0;
774 border: 0;
775}
776
777/*csslint outline-none:false*/
778
779.pure-button {
780 font-family: inherit;
781 font-size: 100%;
782 padding: 0.5em 1em;
783 color: #444; /* rgba not supported (IE 8) */
784 color: rgba(0, 0, 0, 0.80); /* rgba supported */
785 border: 1px solid #999; /*IE 6/7/8*/
786 border: none rgba(0, 0, 0, 0); /*IE9 + everything else*/
787 background-color: #E6E6E6;
788 text-decoration: none;
789 border-radius: 2px;
790}
791
792.pure-button-hover,
793.pure-button:hover,
794.pure-button:focus {
795 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#1a000000',GradientType=0);
796 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(40%, rgba(0,0,0, 0.05)), to(rgba(0,0,0, 0.10)));
797 background-image: -webkit-linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.10));
798 background-image: -moz-linear-gradient(top, rgba(0,0,0, 0.05) 0%, rgba(0,0,0, 0.10));
799 background-image: -o-linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.10));
800 background-image: linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.10));
801}
802.pure-button:focus {
803 outline: 0;
804}
805.pure-button-active,
806.pure-button:active {
807 box-shadow: 0 0 0 1px rgba(0,0,0, 0.15) inset, 0 0 6px rgba(0,0,0, 0.20) inset;
808 border-color: #000\9;
809}
810
811.pure-button[disabled],
812.pure-button-disabled,
813.pure-button-disabled:hover,
814.pure-button-disabled:focus,
815.pure-button-disabled:active {
816 border: none;
817 background-image: none;
818 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
819 filter: alpha(opacity=40);
820 -khtml-opacity: 0.40;
821 -moz-opacity: 0.40;
822 opacity: 0.40;
823 cursor: not-allowed;
824 box-shadow: none;
825}
826
827.pure-button-hidden {
828 display: none;
829}
830
831/* Firefox: Get rid of the inner focus border */
832.pure-button::-moz-focus-inner{
833 padding: 0;
834 border: 0;
835}
836
837.pure-button-primary,
838.pure-button-selected,
839a.pure-button-primary,
840a.pure-button-selected {
841 background-color: rgb(0, 120, 231);
842 color: #fff;
843}
844
845/*csslint box-model:false*/
846/*
847Box-model set to false because we're setting a height on select elements, which
848also have border and padding. This is done because some browsers don't render
849the padding. We explicitly set the box-model for select elements to border-box,
850so we can ignore the csslint warning.
851*/
852
853.pure-form input[type="text"],
854.pure-form input[type="password"],
855.pure-form input[type="email"],
856.pure-form input[type="url"],
857.pure-form input[type="date"],
858.pure-form input[type="month"],
859.pure-form input[type="time"],
860.pure-form input[type="datetime"],
861.pure-form input[type="datetime-local"],
862.pure-form input[type="week"],
863.pure-form input[type="number"],
864.pure-form input[type="search"],
865.pure-form input[type="tel"],
866.pure-form input[type="color"],
867.pure-form select,
868.pure-form textarea {
869 padding: 0.5em 0.6em;
870 display: inline-block;
871 border: 1px solid #ccc;
872 box-shadow: inset 0 1px 3px #ddd;
873 border-radius: 4px;
874 vertical-align: middle;
875 -webkit-box-sizing: border-box;
876 -moz-box-sizing: border-box;
877 box-sizing: border-box;
878}
879
880/*
881Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
882since IE8 won't execute CSS that contains a CSS3 selector.
883*/
884.pure-form input:not([type]) {
885 padding: 0.5em 0.6em;
886 display: inline-block;
887 border: 1px solid #ccc;
888 box-shadow: inset 0 1px 3px #ddd;
889 border-radius: 4px;
890 -webkit-box-sizing: border-box;
891 -moz-box-sizing: border-box;
892 box-sizing: border-box;
893}
894
895
896/* Chrome (as of v.32/34 on OS X) needs additional room for color to display. */
897/* May be able to remove this tweak as color inputs become more standardized across browsers. */
898.pure-form input[type="color"] {
899 padding: 0.2em 0.5em;
900}
901
902
903.pure-form input[type="text"]:focus,
904.pure-form input[type="password"]:focus,
905.pure-form input[type="email"]:focus,
906.pure-form input[type="url"]:focus,
907.pure-form input[type="date"]:focus,
908.pure-form input[type="month"]:focus,
909.pure-form input[type="time"]:focus,
910.pure-form input[type="datetime"]:focus,
911.pure-form input[type="datetime-local"]:focus,
912.pure-form input[type="week"]:focus,
913.pure-form input[type="number"]:focus,
914.pure-form input[type="search"]:focus,
915.pure-form input[type="tel"]:focus,
916.pure-form input[type="color"]:focus,
917.pure-form select:focus,
918.pure-form textarea:focus {
919 outline: 0;
920 border-color: #129FEA;
921}
922
923/*
924Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
925since IE8 won't execute CSS that contains a CSS3 selector.
926*/
927.pure-form input:not([type]):focus {
928 outline: 0;
929 border-color: #129FEA;
930}
931
932.pure-form input[type="file"]:focus,
933.pure-form input[type="radio"]:focus,
934.pure-form input[type="checkbox"]:focus {
935 outline: thin solid #129FEA;
936 outline: 1px auto #129FEA;
937}
938.pure-form .pure-checkbox,
939.pure-form .pure-radio {
940 margin: 0.5em 0;
941 display: block;
942}
943
944.pure-form input[type="text"][disabled],
945.pure-form input[type="password"][disabled],
946.pure-form input[type="email"][disabled],
947.pure-form input[type="url"][disabled],
948.pure-form input[type="date"][disabled],
949.pure-form input[type="month"][disabled],
950.pure-form input[type="time"][disabled],
951.pure-form input[type="datetime"][disabled],
952.pure-form input[type="datetime-local"][disabled],
953.pure-form input[type="week"][disabled],
954.pure-form input[type="number"][disabled],
955.pure-form input[type="search"][disabled],
956.pure-form input[type="tel"][disabled],
957.pure-form input[type="color"][disabled],
958.pure-form select[disabled],
959.pure-form textarea[disabled] {
960 cursor: not-allowed;
961 background-color: #eaeded;
962 color: #cad2d3;
963}
964
965/*
966Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
967since IE8 won't execute CSS that contains a CSS3 selector.
968*/
969.pure-form input:not([type])[disabled] {
970 cursor: not-allowed;
971 background-color: #eaeded;
972 color: #cad2d3;
973}
974.pure-form input[readonly],
975.pure-form select[readonly],
976.pure-form textarea[readonly] {
977 background-color: #eee; /* menu hover bg color */
978 color: #777; /* menu text color */
979 border-color: #ccc;
980}
981
982.pure-form input:focus:invalid,
983.pure-form textarea:focus:invalid,
984.pure-form select:focus:invalid {
985 color: #b94a48;
986 border-color: #e9322d;
987}
988.pure-form input[type="file"]:focus:invalid:focus,
989.pure-form input[type="radio"]:focus:invalid:focus,
990.pure-form input[type="checkbox"]:focus:invalid:focus {
991 outline-color: #e9322d;
992}
993.pure-form select {
994 /* Normalizes the height; padding is not sufficient. */
995 height: 2.25em;
996 border: 1px solid #ccc;
997 background-color: white;
998}
999.pure-form select[multiple] {
1000 height: auto;
1001}
1002.pure-form label {
1003 margin: 0.5em 0 0.2em;
1004}
1005.pure-form fieldset {
1006 margin: 0;
1007 padding: 0.35em 0 0.75em;
1008 border: 0;
1009}
1010.pure-form legend {
1011 display: block;
1012 width: 100%;
1013 padding: 0.3em 0;
1014 margin-bottom: 0.3em;
1015 color: #333;
1016 border-bottom: 1px solid #e5e5e5;
1017}
1018
1019.pure-form-stacked input[type="text"],
1020.pure-form-stacked input[type="password"],
1021.pure-form-stacked input[type="email"],
1022.pure-form-stacked input[type="url"],
1023.pure-form-stacked input[type="date"],
1024.pure-form-stacked input[type="month"],
1025.pure-form-stacked input[type="time"],
1026.pure-form-stacked input[type="datetime"],
1027.pure-form-stacked input[type="datetime-local"],
1028.pure-form-stacked input[type="week"],
1029.pure-form-stacked input[type="number"],
1030.pure-form-stacked input[type="search"],
1031.pure-form-stacked input[type="tel"],
1032.pure-form-stacked input[type="color"],
1033.pure-form-stacked input[type="file"],
1034.pure-form-stacked select,
1035.pure-form-stacked label,
1036.pure-form-stacked textarea {
1037 display: block;
1038 margin: 0.25em 0;
1039}
1040
1041/*
1042Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
1043since IE8 won't execute CSS that contains a CSS3 selector.
1044*/
1045.pure-form-stacked input:not([type]) {
1046 display: block;
1047 margin: 0.25em 0;
1048}
1049.pure-form-aligned input,
1050.pure-form-aligned textarea,
1051.pure-form-aligned select,
1052/* NOTE: pure-help-inline is deprecated. Use .pure-form-message-inline instead. */
1053.pure-form-aligned .pure-help-inline,
1054.pure-form-message-inline {
1055 display: inline-block;
1056 *display: inline;
1057 *zoom: 1;
1058 vertical-align: middle;
1059}
1060.pure-form-aligned textarea {
1061 vertical-align: top;
1062}
1063
1064/* Aligned Forms */
1065.pure-form-aligned .pure-control-group {
1066 margin-bottom: 0.5em;
1067}
1068.pure-form-aligned .pure-control-group label {
1069 text-align: right;
1070 display: inline-block;
1071 vertical-align: middle;
1072 width: 10em;
1073 margin: 0 1em 0 0;
1074}
1075.pure-form-aligned .pure-controls {
1076 margin: 1.5em 0 0 11em;
1077}
1078
1079/* Rounded Inputs */
1080.pure-form input.pure-input-rounded,
1081.pure-form .pure-input-rounded {
1082 border-radius: 2em;
1083 padding: 0.5em 1em;
1084}
1085
1086/* Grouped Inputs */
1087.pure-form .pure-group fieldset {
1088 margin-bottom: 10px;
1089}
1090.pure-form .pure-group input,
1091.pure-form .pure-group textarea {
1092 display: block;
1093 padding: 10px;
1094 margin: 0 0 -1px;
1095 border-radius: 0;
1096 position: relative;
1097 top: -1px;
1098}
1099.pure-form .pure-group input:focus,
1100.pure-form .pure-group textarea:focus {
1101 z-index: 3;
1102}
1103.pure-form .pure-group input:first-child,
1104.pure-form .pure-group textarea:first-child {
1105 top: 1px;
1106 border-radius: 4px 4px 0 0;
1107 margin: 0;
1108}
1109.pure-form .pure-group input:first-child:last-child,
1110.pure-form .pure-group textarea:first-child:last-child {
1111 top: 1px;
1112 border-radius: 4px;
1113 margin: 0;
1114}
1115.pure-form .pure-group input:last-child,
1116.pure-form .pure-group textarea:last-child {
1117 top: -2px;
1118 border-radius: 0 0 4px 4px;
1119 margin: 0;
1120}
1121.pure-form .pure-group button {
1122 margin: 0.35em 0;
1123}
1124
1125.pure-form .pure-input-1 {
1126 width: 100%;
1127}
1128.pure-form .pure-input-2-3 {
1129 width: 66%;
1130}
1131.pure-form .pure-input-1-2 {
1132 width: 50%;
1133}
1134.pure-form .pure-input-1-3 {
1135 width: 33%;
1136}
1137.pure-form .pure-input-1-4 {
1138 width: 25%;
1139}
1140
1141/* Inline help for forms */
1142/* NOTE: pure-help-inline is deprecated. Use .pure-form-message-inline instead. */
1143.pure-form .pure-help-inline,
1144.pure-form-message-inline {
1145 display: inline-block;
1146 padding-left: 0.3em;
1147 color: #666;
1148 vertical-align: middle;
1149 font-size: 0.875em;
1150}
1151
1152/* Block help for forms */
1153.pure-form-message {
1154 display: block;
1155 color: #666;
1156 font-size: 0.875em;
1157}
1158
1159@media only screen and (max-width : 480px) {
1160 .pure-form button[type="submit"] {
1161 margin: 0.7em 0 0;
1162 }
1163
1164 .pure-form input:not([type]),
1165 .pure-form input[type="text"],
1166 .pure-form input[type="password"],
1167 .pure-form input[type="email"],
1168 .pure-form input[type="url"],
1169 .pure-form input[type="date"],
1170 .pure-form input[type="month"],
1171 .pure-form input[type="time"],
1172 .pure-form input[type="datetime"],
1173 .pure-form input[type="datetime-local"],
1174 .pure-form input[type="week"],
1175 .pure-form input[type="number"],
1176 .pure-form input[type="search"],
1177 .pure-form input[type="tel"],
1178 .pure-form input[type="color"],
1179 .pure-form label {
1180 margin-bottom: 0.3em;
1181 display: block;
1182 }
1183
1184 .pure-group input:not([type]),
1185 .pure-group input[type="text"],
1186 .pure-group input[type="password"],
1187 .pure-group input[type="email"],
1188 .pure-group input[type="url"],
1189 .pure-group input[type="date"],
1190 .pure-group input[type="month"],
1191 .pure-group input[type="time"],
1192 .pure-group input[type="datetime"],
1193 .pure-group input[type="datetime-local"],
1194 .pure-group input[type="week"],
1195 .pure-group input[type="number"],
1196 .pure-group input[type="search"],
1197 .pure-group input[type="tel"],
1198 .pure-group input[type="color"] {
1199 margin-bottom: 0;
1200 }
1201
1202 .pure-form-aligned .pure-control-group label {
1203 margin-bottom: 0.3em;
1204 text-align: left;
1205 display: block;
1206 width: 100%;
1207 }
1208
1209 .pure-form-aligned .pure-controls {
1210 margin: 1.5em 0 0 0;
1211 }
1212
1213 /* NOTE: pure-help-inline is deprecated. Use .pure-form-message-inline instead. */
1214 .pure-form .pure-help-inline,
1215 .pure-form-message-inline,
1216 .pure-form-message {
1217 display: block;
1218 font-size: 0.75em;
1219 /* Increased bottom padding to make it group with its related input element. */
1220 padding: 0.2em 0 0.8em;
1221 }
1222}
1223
1224/*csslint adjoining-classes: false, box-model:false*/
1225.pure-menu {
1226 -webkit-box-sizing: border-box;
1227 -moz-box-sizing: border-box;
1228 box-sizing: border-box;
1229}
1230
1231.pure-menu-fixed {
1232 position: fixed;
1233 left: 0;
1234 top: 0;
1235 z-index: 3;
1236}
1237
1238.pure-menu-list,
1239.pure-menu-item {
1240 position: relative;
1241}
1242
1243.pure-menu-list {
1244 list-style: none;
1245 margin: 0;
1246 padding: 0;
1247}
1248
1249.pure-menu-item {
1250 padding: 0;
1251 margin: 0;
1252 height: 100%;
1253}
1254
1255.pure-menu-link,
1256.pure-menu-heading {
1257 display: block;
1258 text-decoration: none;
1259 white-space: nowrap;
1260}
1261
1262/* HORIZONTAL MENU */
1263.pure-menu-horizontal {
1264 width: 100%;
1265 white-space: nowrap;
1266}
1267
1268.pure-menu-horizontal .pure-menu-list {
1269 display: inline-block;
1270}
1271
1272/* Initial menus should be inline-block so that they are horizontal */
1273.pure-menu-horizontal .pure-menu-item,
1274.pure-menu-horizontal .pure-menu-heading,
1275.pure-menu-horizontal .pure-menu-separator {
1276 display: inline-block;
1277 *display: inline;
1278 zoom: 1;
1279 vertical-align: middle;
1280}
1281
1282/* Submenus should still be display: block; */
1283.pure-menu-item .pure-menu-item {
1284 display: block;
1285}
1286
1287.pure-menu-children {
1288 display: none;
1289 position: absolute;
1290 left: 100%;
1291 top: 0;
1292 margin: 0;
1293 padding: 0;
1294 z-index: 3;
1295}
1296
1297.pure-menu-horizontal .pure-menu-children {
1298 left: 0;
1299 top: auto;
1300 width: inherit;
1301}
1302
1303.pure-menu-allow-hover:hover > .pure-menu-children,
1304.pure-menu-active > .pure-menu-children {
1305 display: block;
1306 position: absolute;
1307}
1308
1309/* Vertical Menus - show the dropdown arrow */
1310.pure-menu-has-children > .pure-menu-link:after {
1311 padding-left: 0.5em;
1312 content: "\25B8";
1313 font-size: small;
1314}
1315
1316/* Horizontal Menus - show the dropdown arrow */
1317.pure-menu-horizontal .pure-menu-has-children > .pure-menu-link:after {
1318 content: "\25BE";
1319}
1320
1321/* scrollable menus */
1322.pure-menu-scrollable {
1323 overflow-y: scroll;
1324 overflow-x: hidden;
1325}
1326
1327.pure-menu-scrollable .pure-menu-list {
1328 display: block;
1329}
1330
1331.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list {
1332 display: inline-block;
1333}
1334
1335.pure-menu-horizontal.pure-menu-scrollable {
1336 white-space: nowrap;
1337 overflow-y: hidden;
1338 overflow-x: auto;
1339 -ms-overflow-style: none;
1340 -webkit-overflow-scrolling: touch;
1341 /* a little extra padding for this style to allow for scrollbars */
1342 padding: .5em 0;
1343}
1344
1345.pure-menu-horizontal.pure-menu-scrollable::-webkit-scrollbar {
1346 display: none;
1347}
1348
1349/* misc default styling */
1350
1351.pure-menu-separator {
1352 background-color: #ccc;
1353 height: 1px;
1354 margin: .3em 0;
1355}
1356
1357.pure-menu-horizontal .pure-menu-separator {
1358 width: 1px;
1359 height: 1.3em;
1360 margin: 0 .3em ;
1361}
1362
1363.pure-menu-heading {
1364 text-transform: uppercase;
1365 color: #565d64;
1366}
1367
1368.pure-menu-link {
1369 color: #777;
1370}
1371
1372.pure-menu-children {
1373 background-color: #fff;
1374}
1375
1376.pure-menu-link,
1377.pure-menu-disabled,
1378.pure-menu-heading {
1379 padding: .5em 1em;
1380}
1381
1382.pure-menu-disabled {
1383 opacity: .5;
1384}
1385
1386.pure-menu-disabled .pure-menu-link:hover {
1387 background-color: transparent;
1388}
1389
1390.pure-menu-active > .pure-menu-link,
1391.pure-menu-link:hover,
1392.pure-menu-link:focus {
1393 background-color: #eee;
1394}
1395
1396.pure-menu-selected .pure-menu-link,
1397.pure-menu-selected .pure-menu-link:visited {
1398 color: #000;
1399}
1400
1401.pure-table {
1402 /* Remove spacing between table cells (from Normalize.css) */
1403 border-collapse: collapse;
1404 border-spacing: 0;
1405 empty-cells: show;
1406 border: 1px solid #cbcbcb;
1407}
1408
1409.pure-table caption {
1410 color: #000;
1411 font: italic 85%/1 arial, sans-serif;
1412 padding: 1em 0;
1413 text-align: center;
1414}
1415
1416.pure-table td,
1417.pure-table th {
1418 border-left: 1px solid #cbcbcb;/* inner column border */
1419 border-width: 0 0 0 1px;
1420 font-size: inherit;
1421 margin: 0;
1422 overflow: visible; /*to make ths where the title is really long work*/
1423 padding: 0.5em 1em; /* cell padding */
1424}
1425
1426/* Consider removing this next declaration block, as it causes problems when
1427there's a rowspan on the first cell. Case added to the tests. issue#432 */
1428.pure-table td:first-child,
1429.pure-table th:first-child {
1430 border-left-width: 0;
1431}
1432
1433.pure-table thead {
1434 background-color: #e0e0e0;
1435 color: #000;
1436 text-align: left;
1437 vertical-align: bottom;
1438}
1439
1440/*
1441striping:
1442 even - #fff (white)
1443 odd - #f2f2f2 (light gray)
1444*/
1445.pure-table td {
1446 background-color: transparent;
1447}
1448.pure-table-odd td {
1449 background-color: #f2f2f2;
1450}
1451
1452/* nth-child selector for modern browsers */
1453.pure-table-striped tr:nth-child(2n-1) td {
1454 background-color: #f2f2f2;
1455}
1456
1457/* BORDERED TABLES */
1458.pure-table-bordered td {
1459 border-bottom: 1px solid #cbcbcb;
1460}
1461.pure-table-bordered tbody > tr:last-child > td {
1462 border-bottom-width: 0;
1463}
1464
1465
1466/* HORIZONTAL BORDERED TABLES */
1467
1468.pure-table-horizontal td,
1469.pure-table-horizontal th {
1470 border-width: 0 0 1px 0;
1471 border-bottom: 1px solid #cbcbcb;
1472}
1473.pure-table-horizontal tbody > tr:last-child > td {
1474 border-bottom-width: 0;
1475}
diff --git a/tpl/default/css/pure.min.css b/tpl/default/css/pure.min.css
new file mode 100644
index 00000000..f0aa374f
--- /dev/null
+++ b/tpl/default/css/pure.min.css
@@ -0,0 +1,11 @@
1/*!
2Pure v0.6.0
3Copyright 2014 Yahoo! Inc. All rights reserved.
4Licensed under the BSD License.
5https://github.com/yahoo/pure/blob/master/LICENSE.md
6*/
7/*!
8normalize.css v^3.0 | MIT License | git.io/normalize
9Copyright (c) Nicolas Gallagher and Jonathan Neal
10*/
11/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.hidden,[hidden]{display:none!important}.pure-img{max-width:100%;height:auto;display:block}.pure-g{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-flex;-webkit-flex-flow:row wrap;display:-ms-flexbox;-ms-flex-flow:row wrap;-ms-align-content:flex-start;-webkit-align-content:flex-start;align-content:flex-start}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-g [class *="pure-u"]{font-family:sans-serif}.pure-u-1,.pure-u-1-1,.pure-u-1-2,.pure-u-1-3,.pure-u-2-3,.pure-u-1-4,.pure-u-3-4,.pure-u-1-5,.pure-u-2-5,.pure-u-3-5,.pure-u-4-5,.pure-u-5-5,.pure-u-1-6,.pure-u-5-6,.pure-u-1-8,.pure-u-3-8,.pure-u-5-8,.pure-u-7-8,.pure-u-1-12,.pure-u-5-12,.pure-u-7-12,.pure-u-11-12,.pure-u-1-24,.pure-u-2-24,.pure-u-3-24,.pure-u-4-24,.pure-u-5-24,.pure-u-6-24,.pure-u-7-24,.pure-u-8-24,.pure-u-9-24,.pure-u-10-24,.pure-u-11-24,.pure-u-12-24,.pure-u-13-24,.pure-u-14-24,.pure-u-15-24,.pure-u-16-24,.pure-u-17-24,.pure-u-18-24,.pure-u-19-24,.pure-u-20-24,.pure-u-21-24,.pure-u-22-24,.pure-u-23-24,.pure-u-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1-24{width:4.1667%;*width:4.1357%}.pure-u-1-12,.pure-u-2-24{width:8.3333%;*width:8.3023%}.pure-u-1-8,.pure-u-3-24{width:12.5%;*width:12.469%}.pure-u-1-6,.pure-u-4-24{width:16.6667%;*width:16.6357%}.pure-u-1-5{width:20%;*width:19.969%}.pure-u-5-24{width:20.8333%;*width:20.8023%}.pure-u-1-4,.pure-u-6-24{width:25%;*width:24.969%}.pure-u-7-24{width:29.1667%;*width:29.1357%}.pure-u-1-3,.pure-u-8-24{width:33.3333%;*width:33.3023%}.pure-u-3-8,.pure-u-9-24{width:37.5%;*width:37.469%}.pure-u-2-5{width:40%;*width:39.969%}.pure-u-5-12,.pure-u-10-24{width:41.6667%;*width:41.6357%}.pure-u-11-24{width:45.8333%;*width:45.8023%}.pure-u-1-2,.pure-u-12-24{width:50%;*width:49.969%}.pure-u-13-24{width:54.1667%;*width:54.1357%}.pure-u-7-12,.pure-u-14-24{width:58.3333%;*width:58.3023%}.pure-u-3-5{width:60%;*width:59.969%}.pure-u-5-8,.pure-u-15-24{width:62.5%;*width:62.469%}.pure-u-2-3,.pure-u-16-24{width:66.6667%;*width:66.6357%}.pure-u-17-24{width:70.8333%;*width:70.8023%}.pure-u-3-4,.pure-u-18-24{width:75%;*width:74.969%}.pure-u-19-24{width:79.1667%;*width:79.1357%}.pure-u-4-5{width:80%;*width:79.969%}.pure-u-5-6,.pure-u-20-24{width:83.3333%;*width:83.3023%}.pure-u-7-8,.pure-u-21-24{width:87.5%;*width:87.469%}.pure-u-11-12,.pure-u-22-24{width:91.6667%;*width:91.6357%}.pure-u-23-24{width:95.8333%;*width:95.8023%}.pure-u-1,.pure-u-1-1,.pure-u-5-5,.pure-u-24-24{width:100%}.pure-button{display:inline-block;zoom:1;line-height:normal;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button{font-family:inherit;font-size:100%;padding:.5em 1em;color:#444;color:rgba(0,0,0,.8);border:1px solid #999;border:0 rgba(0,0,0,0);background-color:#E6E6E6;text-decoration:none;border-radius:2px}.pure-button-hover,.pure-button:hover,.pure-button:focus{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#1a000000', GradientType=0);background-image:-webkit-gradient(linear,0 0,0 100%,from(transparent),color-stop(40%,rgba(0,0,0,.05)),to(rgba(0,0,0,.1)));background-image:-webkit-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:-moz-linear-gradient(top,rgba(0,0,0,.05) 0,rgba(0,0,0,.1));background-image:-o-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 0 6px rgba(0,0,0,.2) inset;border-color:#000\9}.pure-button[disabled],.pure-button-disabled,.pure-button-disabled:hover,.pure-button-disabled:focus,.pure-button-disabled:active{border:0;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);filter:alpha(opacity=40);-khtml-opacity:.4;-moz-opacity:.4;opacity:.4;cursor:not-allowed;box-shadow:none}.pure-button-hidden{display:none}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:#0078e7;color:#fff}.pure-form input[type=text],.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=color],.pure-form select,.pure-form textarea{padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;vertical-align:middle;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-form input:not([type]){padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-form input[type=color]{padding:.2em .5em}.pure-form input[type=text]:focus,.pure-form input[type=password]:focus,.pure-form input[type=email]:focus,.pure-form input[type=url]:focus,.pure-form input[type=date]:focus,.pure-form input[type=month]:focus,.pure-form input[type=time]:focus,.pure-form input[type=datetime]:focus,.pure-form input[type=datetime-local]:focus,.pure-form input[type=week]:focus,.pure-form input[type=number]:focus,.pure-form input[type=search]:focus,.pure-form input[type=tel]:focus,.pure-form input[type=color]:focus,.pure-form select:focus,.pure-form textarea:focus{outline:0;border-color:#129FEA}.pure-form input:not([type]):focus{outline:0;border-color:#129FEA}.pure-form input[type=file]:focus,.pure-form input[type=radio]:focus,.pure-form input[type=checkbox]:focus{outline:thin solid #129FEA;outline:1px auto #129FEA}.pure-form .pure-checkbox,.pure-form .pure-radio{margin:.5em 0;display:block}.pure-form input[type=text][disabled],.pure-form input[type=password][disabled],.pure-form input[type=email][disabled],.pure-form input[type=url][disabled],.pure-form input[type=date][disabled],.pure-form input[type=month][disabled],.pure-form input[type=time][disabled],.pure-form input[type=datetime][disabled],.pure-form input[type=datetime-local][disabled],.pure-form input[type=week][disabled],.pure-form input[type=number][disabled],.pure-form input[type=search][disabled],.pure-form input[type=tel][disabled],.pure-form input[type=color][disabled],.pure-form select[disabled],.pure-form textarea[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input:not([type])[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input[readonly],.pure-form select[readonly],.pure-form textarea[readonly]{background-color:#eee;color:#777;border-color:#ccc}.pure-form input:focus:invalid,.pure-form textarea:focus:invalid,.pure-form select:focus:invalid{color:#b94a48;border-color:#e9322d}.pure-form input[type=file]:focus:invalid:focus,.pure-form input[type=radio]:focus:invalid:focus,.pure-form input[type=checkbox]:focus:invalid:focus{outline-color:#e9322d}.pure-form select{height:2.25em;border:1px solid #ccc;background-color:#fff}.pure-form select[multiple]{height:auto}.pure-form label{margin:.5em 0 .2em}.pure-form fieldset{margin:0;padding:.35em 0 .75em;border:0}.pure-form legend{display:block;width:100%;padding:.3em 0;margin-bottom:.3em;color:#333;border-bottom:1px solid #e5e5e5}.pure-form-stacked input[type=text],.pure-form-stacked input[type=password],.pure-form-stacked input[type=email],.pure-form-stacked input[type=url],.pure-form-stacked input[type=date],.pure-form-stacked input[type=month],.pure-form-stacked input[type=time],.pure-form-stacked input[type=datetime],.pure-form-stacked input[type=datetime-local],.pure-form-stacked input[type=week],.pure-form-stacked input[type=number],.pure-form-stacked input[type=search],.pure-form-stacked input[type=tel],.pure-form-stacked input[type=color],.pure-form-stacked input[type=file],.pure-form-stacked select,.pure-form-stacked label,.pure-form-stacked textarea{display:block;margin:.25em 0}.pure-form-stacked input:not([type]){display:block;margin:.25em 0}.pure-form-aligned input,.pure-form-aligned textarea,.pure-form-aligned select,.pure-form-aligned .pure-help-inline,.pure-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.pure-form-aligned textarea{vertical-align:top}.pure-form-aligned .pure-control-group{margin-bottom:.5em}.pure-form-aligned .pure-control-group label{text-align:right;display:inline-block;vertical-align:middle;width:10em;margin:0 1em 0 0}.pure-form-aligned .pure-controls{margin:1.5em 0 0 11em}.pure-form input.pure-input-rounded,.pure-form .pure-input-rounded{border-radius:2em;padding:.5em 1em}.pure-form .pure-group fieldset{margin-bottom:10px}.pure-form .pure-group input,.pure-form .pure-group textarea{display:block;padding:10px;margin:0 0 -1px;border-radius:0;position:relative;top:-1px}.pure-form .pure-group input:focus,.pure-form .pure-group textarea:focus{z-index:3}.pure-form .pure-group input:first-child,.pure-form .pure-group textarea:first-child{top:1px;border-radius:4px 4px 0 0;margin:0}.pure-form .pure-group input:first-child:last-child,.pure-form .pure-group textarea:first-child:last-child{top:1px;border-radius:4px;margin:0}.pure-form .pure-group input:last-child,.pure-form .pure-group textarea:last-child{top:-2px;border-radius:0 0 4px 4px;margin:0}.pure-form .pure-group button{margin:.35em 0}.pure-form .pure-input-1{width:100%}.pure-form .pure-input-2-3{width:66%}.pure-form .pure-input-1-2{width:50%}.pure-form .pure-input-1-3{width:33%}.pure-form .pure-input-1-4{width:25%}.pure-form .pure-help-inline,.pure-form-message-inline{display:inline-block;padding-left:.3em;color:#666;vertical-align:middle;font-size:.875em}.pure-form-message{display:block;color:#666;font-size:.875em}@media only screen and (max-width :480px){.pure-form button[type=submit]{margin:.7em 0 0}.pure-form input:not([type]),.pure-form input[type=text],.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=color],.pure-form label{margin-bottom:.3em;display:block}.pure-group input:not([type]),.pure-group input[type=text],.pure-group input[type=password],.pure-group input[type=email],.pure-group input[type=url],.pure-group input[type=date],.pure-group input[type=month],.pure-group input[type=time],.pure-group input[type=datetime],.pure-group input[type=datetime-local],.pure-group input[type=week],.pure-group input[type=number],.pure-group input[type=search],.pure-group input[type=tel],.pure-group input[type=color]{margin-bottom:0}.pure-form-aligned .pure-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.pure-form-aligned .pure-controls{margin:1.5em 0 0}.pure-form .pure-help-inline,.pure-form-message-inline,.pure-form-message{display:block;font-size:.75em;padding:.2em 0 .8em}}.pure-menu{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-menu-fixed{position:fixed;left:0;top:0;z-index:3}.pure-menu-list,.pure-menu-item{position:relative}.pure-menu-list{list-style:none;margin:0;padding:0}.pure-menu-item{padding:0;margin:0;height:100%}.pure-menu-link,.pure-menu-heading{display:block;text-decoration:none;white-space:nowrap}.pure-menu-horizontal{width:100%;white-space:nowrap}.pure-menu-horizontal .pure-menu-list{display:inline-block}.pure-menu-horizontal .pure-menu-item,.pure-menu-horizontal .pure-menu-heading,.pure-menu-horizontal .pure-menu-separator{display:inline-block;*display:inline;zoom:1;vertical-align:middle}.pure-menu-item .pure-menu-item{display:block}.pure-menu-children{display:none;position:absolute;left:100%;top:0;margin:0;padding:0;z-index:3}.pure-menu-horizontal .pure-menu-children{left:0;top:auto;width:inherit}.pure-menu-allow-hover:hover>.pure-menu-children,.pure-menu-active>.pure-menu-children{display:block;position:absolute}.pure-menu-has-children>.pure-menu-link:after{padding-left:.5em;content:"\25B8";font-size:small}.pure-menu-horizontal .pure-menu-has-children>.pure-menu-link:after{content:"\25BE"}.pure-menu-scrollable{overflow-y:scroll;overflow-x:hidden}.pure-menu-scrollable .pure-menu-list{display:block}.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list{display:inline-block}.pure-menu-horizontal.pure-menu-scrollable{white-space:nowrap;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;padding:.5em 0}.pure-menu-horizontal.pure-menu-scrollable::-webkit-scrollbar{display:none}.pure-menu-separator{background-color:#ccc;height:1px;margin:.3em 0}.pure-menu-horizontal .pure-menu-separator{width:1px;height:1.3em;margin:0 .3em}.pure-menu-heading{text-transform:uppercase;color:#565d64}.pure-menu-link{color:#777}.pure-menu-children{background-color:#fff}.pure-menu-link,.pure-menu-disabled,.pure-menu-heading{padding:.5em 1em}.pure-menu-disabled{opacity:.5}.pure-menu-disabled .pure-menu-link:hover{background-color:transparent}.pure-menu-active>.pure-menu-link,.pure-menu-link:hover,.pure-menu-link:focus{background-color:#eee}.pure-menu-selected .pure-menu-link,.pure-menu-selected .pure-menu-link:visited{color:#000}.pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid #cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid #cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:.5em 1em}.pure-table td:first-child,.pure-table th:first-child{border-left-width:0}.pure-table thead{background-color:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-odd td{background-color:#f2f2f2}.pure-table-striped tr:nth-child(2n-1) td{background-color:#f2f2f2}.pure-table-bordered td{border-bottom:1px solid #cbcbcb}.pure-table-bordered tbody>tr:last-child>td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #cbcbcb}.pure-table-horizontal tbody>tr:last-child>td{border-bottom-width:0} \ No newline at end of file
diff --git a/tpl/default/css/shaarli.css b/tpl/default/css/shaarli.css
new file mode 100644
index 00000000..14439402
--- /dev/null
+++ b/tpl/default/css/shaarli.css
@@ -0,0 +1,1348 @@
1/**
2 * General
3 */
4body {
5 background: #d0d0d0;
6}
7
8.strong {
9 font-weight: bold;
10}
11
12.clear {
13 clear: both;
14}
15
16.center {
17 text-align: center;
18 margin: auto;
19}
20
21.label {
22 display: inline-block;
23 padding: .25em .4em;
24 font-size: 75%;
25 font-weight: 700;
26 line-height: 1;
27 text-align: center;
28 white-space: nowrap;
29 vertical-align: baseline;
30 border-radius: .25rem;
31}
32
33pre {
34 max-width: 100%;
35}
36
37@font-face {
38 font-family: 'Roboto';
39 font-weight: 400;
40 font-style: normal;
41 src:
42 local('Roboto'),
43 local('Roboto-Regular'),
44 url('../fonts/Roboto-Regular.woff2') format('woff2'),
45 url('../fonts/Roboto-Regular.woff') format('woff');
46}
47
48@font-face {
49 font-family: 'Roboto';
50 font-weight: 700;
51 font-style: normal;
52 src:
53 local('Roboto'),
54 local('Roboto-Bold'),
55 url('../fonts/Roboto-Bold.woff2') format('woff2'),
56 url('../fonts/Roboto-Bold.woff') format('woff');
57}
58
59body, .pure-g [class*="pure-u"] {
60 font-family: Roboto, Arial, sans-serif;
61}
62
63/**
64 * Extends Pure grids responsive to hide items.
65 * Use xx-0 to hide an item on xx screen.
66 * Display it at any level with xx-visible.
67 */
68.pure-u-0 { display: none !important; }
69@media screen and (min-width: 35.5em) {
70 .pure-u-sm-0 { display: none !important; }
71 .pure-u-sm-visible { display: inline-block !important; }
72}
73@media screen and (min-width: 48em) {
74 .pure-u-md-0 { display: none !important; }
75 .pure-u-md-visible { display: inline-block !important; }
76}
77@media screen and (min-width: 64em) {
78 .pure-u-lg-0 { display: none !important; }
79 .pure-u-lg-visible { display: inline-block !important; }
80}
81@media screen and (min-width: 80em) {
82 .pure-u-xl-0 { display: none !important; }
83 .pure-u-xl-visible { display: inline-block !important; }
84}
85
86/**
87 * Make pure-extras alert closable.
88 */
89.pure-alert-closable .fa-times {
90 float: right;
91}
92.pure-alert-close {
93 cursor: pointer;
94}
95
96.pure-alert-success {
97 background-color: #1b926c;
98}
99
100.anchor:target {
101 padding-top: 40px;
102}
103/**
104 * MENU
105 **/
106.shaarli-menu {
107 position: fixed;
108 top: 0;
109 width: 100%;
110 --height: 50px;
111 background: #1b926c;
112 -webkit-font-smoothing: antialiased;
113 /* Hack to transition with auto height: http://stackoverflow.com/a/8331169/1484919 */
114 max-height: 45px;
115 transition: max-height 0.5s;
116 overflow: hidden;
117 z-index: 999;
118}
119
120/* Chrome bugfix: with 100% height, it only displays the first element. */
121.pure-menu-item {
122 height: 45px;
123}
124
125.shaarli-menu.open {
126 max-height: 500px;
127 transition: max-height 0.75s;
128}
129
130.head-logo {
131 float: left;
132 margin: 0 5px 0 0;
133}
134
135.pure-menu-link,
136.pure-menu-link:visited,
137.pure-menu-selected .pure-menu-link,
138.pure-menu-selected .pure-menu-link:visited {
139 padding: 0.8em 1em;
140 color: #f5f5f5;
141}
142
143.pure-menu-link:hover, .pure-menu-link:focus,
144.pure-menu-selected .pure-menu-link:hover,
145.pure-menu-selected .pure-menu-link:focus {
146 color: #fff;
147 background: transparent;
148}
149
150.pure-menu-item:hover::after {
151 margin: -4px auto 0 auto;
152 display: block;
153 content:"";
154 background: #fff;
155 height: 4px;
156 width: 100%;
157}
158
159.menu-toggle {
160 width: 34px;
161 height: 45px;
162 position: absolute;
163 top: 5px;
164 right: 0;
165 display: none;
166}
167
168.menu-toggle .bar {
169 background-color: #b0ddce;
170 display: block;
171 width: 20px;
172 height: 2px;
173 border-radius: 100px;
174 position: absolute;
175 top: 18px;
176 right: 7px;
177 transition: all 0.5s;
178}
179
180.menu-toggle .bar:first-child {
181 transform: translateY(-6px);
182}
183
184.menu-toggle.x .bar {
185 transform: rotate(45deg);
186}
187
188.menu-toggle.x .bar:first-child {
189 transform: rotate(-45deg);
190}
191
192@media screen and (max-width: 64em) {
193 .menu-toggle {
194 display: block;
195 }
196}
197
198.header-buttons {
199 text-align: right;
200}
201
202.linkcount {
203 color: #252525;
204 font-size: 0.8em;
205}
206
207@media screen and (min-width: 64em) {
208 .linkcount {
209 position: absolute;
210 right: 5px;
211 }
212}
213
214#search, #search-linklist, #search-tagcloud {
215 text-align: center;
216 width: 100%;
217}
218
219#search input[type="text"], #search-linklist input[type="text"] {
220 padding: 0 5px;
221 height: 30px;
222 width: 260px;
223 background: #f5f5f5;
224 border: medium none currentColor;
225 box-shadow: 0 1px 0 rgba(255, 255, 255, 0.078), 0 1px 1px rgba(0, 0, 0, 0.298) inset;
226 border-radius: 2px;
227 color: #252525;
228}
229@media screen and (max-width: 64em) {
230 .searchform {
231 max-width: 260px;
232 margin: 0 auto;
233 }
234}
235
236/* because chrome */
237#search input[type="text"]::-webkit-input-placeholder,
238#search-linklist input[type="text"]::-webkit-input-placeholder {
239 color: #777777;
240}
241
242#search button,
243#search-tagcloud button,
244#search-linklist button {
245 padding: 4px 8px 6px 8px;
246 background-color: #1B926C;
247 color: #f5f5f5;
248 border: none;
249 border-radius: 2px;
250}
251
252#search-tagcloud button {
253 width: 90%;
254}
255
256@media screen and (max-width: 64em) {
257 #search-linklist button {
258 width: 100%;
259 }
260 #search-linklist .awesomplete {
261 margin: 5px 0;
262 }
263}
264
265#search button:hover,
266#search-linklist button:hover,
267#search-tagcloud button:hover {
268 color: #d0d0d0;
269}
270
271#search,
272#search-linklist {
273 padding: 6px 0;
274}
275
276@media screen and (max-width: 64em) {
277 #search, #search * {
278 visibility: hidden;
279 }
280}
281
282.subheader-form a.button {
283 color: #f5f5f5;
284 font-weight: bold;
285 text-decoration: none;
286 border: 2px solid #f5f5f5;
287 border-radius: 5px;
288 padding: 3px 10px;
289}
290
291.linklist-item-editbuttons .delete-checkbox {
292 display: none;
293}
294
295#header-login-form input[type="text"], #header-login-form input[type="password"] {
296 width: 200px;
297}
298
299/* because chrome */
300#header-login-form input[type="text"]::-webkit-input-placeholder,
301#header-login-form input[type="password"]::-webkit-input-placeholder {
302 color: #777777;
303}
304
305.subheader-form {
306 visibility: hidden;
307 position: fixed;
308 width: 100%;
309 text-align: center;
310 background: #1b926c;
311 display: block;
312 z-index: 999;
313 height: 30px;
314 padding: 5px 0;
315}
316
317@media screen and (min-width: 64em) {
318 .subheader-form.open, .subheader-form.open * {
319 visibility: visible;
320 }
321}
322
323.subheader-form input[type="text"], .subheader-form input[type="password"], .subheader-form .remember-me {
324 padding: 5px 5px 3px 15px;
325 height: 20px;
326 width: 20%;
327 background: #f5f5f5;
328 border: medium none currentColor;
329 border-radius: 2px;
330 box-shadow: 0 1px 0 rgba(255, 255, 255, 0.078), 0 1px 4px rgba(0, 0, 0, 0.298) inset;
331 color: #252525;
332}
333
334/* because chrome */
335.subheader-form input[type="text"]::-webkit-input-placeholder,
336.subheader-form input[type="password"]::-webkit-input-placeholder
337{
338 color: #252525;
339}
340
341.subheader-form .remember-me {
342 display: inline-block;
343 width: auto;
344 padding: 5px 20px 3px 20px;
345 cursor: pointer;
346}
347
348.subheader-form .remember-me label, .subheader-form .remember-me input {
349 cursor: pointer;
350}
351
352.subheader-form input[type="submit"] {
353 display: inline-block;
354 margin: 0 0 5px 0;
355 padding: 4px 0 4px 0;
356 height: 28px;
357 width: 100px;
358 background: #1b926c;
359 border: 1px solid #f5f5f5;
360 color: #f5f5f5;
361 border-radius: 2px;
362}
363
364.subheader-form input[type="submit"]:hover {
365 background: #f5f5f5;
366 color: #1b926c;
367}
368
369.new-version-message {
370 text-align: center;
371}
372
373.new-version-message a {
374 color: rgb(151, 96, 13);
375 font-weight: bold;
376}
377
378/**
379 * CONTENT - GENERAL
380 */
381#content {
382 position: relative;
383 z-index: 2;
384 margin-top: 45px;
385}
386
387/**
388 * Plugins additional forms
389 */
390.toolbar-plugin {
391 margin: 5px 0;
392 text-align: center;
393}
394
395.toolbar-plugin input[type="text"] {
396 padding: 0 5px;
397 height: 30px;
398 width: 300px;
399 background: #f5f5f5;
400 border: medium none currentColor;
401 box-shadow: 0 1px 0 rgba(255, 255, 255, 0.078), 0 1px 1px rgba(0, 0, 0, 0.298) inset;
402 border-radius: 2px;
403 color: #252525;
404}
405
406/* because chrome */
407.toolbar-plugin input[type="text"]::-webkit-input-placeholder {
408 color: #777777;
409}
410
411.toolbar-plugin input[type="submit"] {
412 padding: 0 10px;
413 height: 30px;
414 background: #f5f5f5;
415 border: medium none currentColor;
416 border-radius: 2px;
417 color: #252525;
418}
419
420.toolbar-plugin input[type="submit"]:hover {
421 background: #fff;
422}
423
424@media screen and (max-width: 64em) {
425 .toolbar-plugin input[type="text"] {
426 width: 70%;
427
428 }
429}
430
431/**
432 * CONTENT - LINKLIST PAGING
433 * 64em -> lg
434 */
435.linklist-filters {
436 margin: 5px 0;
437 color: #252525;
438 font-size: 0.9em;
439}
440
441.linklist-filters a {
442 padding: 5px 8px;
443 text-decoration: none;
444}
445
446.linklist-filters .filter-off {
447 color: #252525;
448 background: #f5f5f5;
449}
450
451.linklist-filters .filter-on {
452 color: #b0ddce;
453 background: #1b926c;
454}
455
456.linklist-pages {
457 margin: 5px 0;
458 color: #252525;
459 text-align: center;
460}
461
462.linklist-pages a {
463 color: #252525;
464 text-decoration: none;
465}
466
467.linklist-pages a:hover {
468 color: #fff;
469}
470
471.linksperpage {
472 margin: 5px 0;
473 text-align: right;
474 color: #252525;
475 font-size: 0.9em;
476}
477
478.linksperpage a {
479 padding: 5px 5px;
480 text-decoration: none;
481 color: #252525;
482 background: #f5f5f5;
483}
484
485.linksperpage a, .linksperpage input[type="text"] {
486 display: inline-block;
487 width: 20px;
488 text-align: center;
489}
490
491.linksperpage form {
492 display: inline;
493}
494
495.linksperpage input[type="text"] {
496 height: 20px;
497 margin: 0;
498 padding: 4px 5px 3px 8px;
499 background: #f5f5f5;
500 border: medium none currentColor;
501 color: #252525;
502 font-size: 0.8em;
503}
504
505/**
506 * CONTENT - LINKLIST ITEMS
507 */
508.linklist-item {
509 margin: 0 0 10px 0;
510 background: #f5f5f5;
511 box-shadow: 1px 1px 3px #797979;
512}
513
514.linklist-item-buttons {
515 background: transparent;
516 position: relative;
517 width: 23px;
518 z-index: 99;
519}
520
521.linklist-item-buttons-right {
522 float: right;
523 margin-right: -25px;
524}
525
526.linklist-item-buttons * {
527 display: block;
528 float: left;
529 width:100%;
530 margin: auto;
531 text-align: center;
532}
533
534.linklist-item-title, .linklist-item-title h2 {
535 margin: 0;
536 word-wrap: break-word;
537}
538
539.linklist-item-title {
540 position: relative;
541 background: #f5f5f5;
542}
543
544.linklist-item-title h2 {
545 padding: 3px 10px 0 10px;
546 line-height: 30px;
547}
548
549.linklist-item-title h2 a {
550 font-size: 0.7em;
551 color: #252525;
552 text-decoration: none;
553 vertical-align: middle;
554}
555
556.linklist-item-title .linklist-link {
557 font-size: 1.1em;
558 color: #1b926c;
559}
560
561.linklist-item-title h2 a:visited .linklist-link {
562 color: #2a4c41;
563}
564
565.linklist-item-title h2 a:hover, .linklist-item-title .linklist-link:hover{
566 color: #252525;
567}
568
569
570.linklist-item-title .label-private {
571 border: solid 1px #F89406;
572 font-family: Arial, sans-serif;
573 font-size: 0.65em;
574 color: #F89406;
575}
576
577.fold-button {
578 display: none;
579 color: #252525;
580}
581
582.linklist-item-editbuttons {
583 float: right;
584 padding: 8px 5px;
585}
586
587.linklist-item-editbuttons * {
588 display: block;
589 float: left;
590 margin: 0 1px;
591}
592
593.linklist-item-editbuttons a {
594 font-size: 1em;
595}
596
597.edit-link {
598 font-size: 1.2em;
599 color: #0b5ea6;
600}
601
602.delete-link {
603 font-size: 1.3em;
604 color: #ac2925 !important;
605}
606
607.linklist-item-description {
608 position: relative;
609 padding: 0 10px;
610 word-wrap: break-word;
611 color: #252525;
612 line-height: 1.3em;
613}
614
615.linklist-item-description a {
616 text-decoration: none;
617 color: #1b926c;
618}
619
620.linklist-item-description a:hover {
621 color: #252525;
622}
623
624.linklist-item-description a:visited {
625 color: #14553f;
626}
627
628.linklist-item-thumbnail {
629 position: relative;
630 padding: 0 0 0 5px;
631 margin: 0;
632 float: right;
633 z-index: 50;
634 height: 90px;
635}
636
637.linklist-item.private .linklist-item-title::before,
638.linklist-item.private .linklist-item-description::before {
639 position: absolute;
640 left: 3px;
641 top: 0;
642 display: block;
643 content:"";
644 background: #F89406;
645 height: 96%;
646 width: 2px;
647 z-index: 1;
648}
649
650.linklist-item.private .linklist-item-description::before {
651 height: 100%;
652}
653
654.linklist-item.private .linklist-item-title::before {
655 margin-top: 3px;
656}
657
658.linklist-item-infos {
659 padding: 4px 8px 4px 8px;
660 background: #ddd;
661 color: #252525;
662}
663
664.linklist-item-infos a {
665 color: #252525;
666 text-decoration: none;
667}
668
669.linklist-item-infos a:hover {
670 color: #000;
671}
672
673.linklist-item-infos .linklist-item-tags {
674 font-size: 0.8em;
675}
676
677.linklist-item-infos .label-tag {
678 font-size: 1em;
679}
680
681.linklist-item-infos-dateblock {
682 font-size: 0.9em;
683}
684
685.linklist-plugin-icon {
686 width: 13px;
687 height: 13px;
688}
689
690.linklist-item-infos-url {
691 text-align: right;
692 white-space: nowrap;
693 overflow: hidden;
694 text-overflow: ellipsis;
695 font-size: 0.8em;
696 height:23px;
697 line-height:23px;
698}
699
700.linklist-item-infos .mobile-buttons {
701 text-align: right;
702}
703
704.linklist-item-infos .linklist-plugin-icon {
705 display: inline-block;
706 margin: 0 2px;
707 width: 16px;
708 height: 16px;
709}
710
711.linklist-item-infos-controls-group {
712 display: inline-block;
713 border-right: 1px solid #5d5d5d;
714 padding-right: 6px;
715}
716
717.ctrl-edit {
718 margin: 0 7px;
719}
720
721/** 64em -> lg **/
722@media screen and (max-width: 64em) {
723 .linklist-item-infos-url {
724 text-align: left;
725 }
726}
727
728/**
729 * Footer
730 */
731#footer {
732 margin: 20px 0;
733 padding: 5px;
734 text-align: center;
735 color: #252525;
736}
737
738#footer:before {
739 display: block;
740 content:"";
741 background: linear-gradient(to right, #949393, #252525, #949393);
742 height: 1px;
743 width: 80%;
744 margin: 10px auto;
745}
746
747#footer a {
748 color: #252525;
749}
750
751/**
752 * PAGE FORM
753 */
754.page-form {
755 margin: 20px 0 0 0;
756 background: #f5f5f5;
757 box-shadow: 1px 1px 2px #797979;
758 color: #252525;
759 overflow: hidden;
760}
761
762.page-form .window-title {
763 margin: 0 0 10px 0;
764 padding: 10px 0;
765 width: 100%;
766 color: #1b926c;
767 background: #f5f5f5;
768 text-align: center;
769}
770
771.page-form .window-subtitle {
772 text-align: center;
773}
774
775.page-form a {
776 color: #1b926c;
777 font-weight: bold;
778 text-decoration: none;
779}
780
781.page-form p {
782 padding: 5px 10px;
783 margin: 0;
784}
785
786.page-form input[type="text"],
787.page-form input[type="password"],
788.page-form textarea {
789 box-sizing: border-box;
790 margin: 10px 0;
791 padding: 5px 5px 3px 15px;
792 height: 35px;
793 width: 90%;
794 background: #eeeeee;
795 border: solid 1px #d8d8d8;
796 border-radius: 2px;
797 color: #252525;
798}
799
800.page-form textarea {
801 min-height: 240px;
802 padding: 15px 5px 3px 15px;
803 resize: vertical;
804 overflow-y: auto;
805 word-wrap:break-word
806}
807
808/* because chrome */
809.page-form input[type="text"]::-webkit-input-placeholder,
810.page-form input[type="password"]::-webkit-input-placeholder {
811 color: #777777;
812}
813
814.page-form input[type="submit"], .page-form a.button {
815 margin: 15px 5px;
816 height: 35px;
817 line-height: 35px;
818 width: 150px;
819 background: #1b926c;
820 color: #f5f5f5;
821 border: none;
822 box-shadow: 1px 1px 1px #ddd, -1px -1px 6px #ddd, -1px 1px 2px #ddd, 1px -1px 2px #ddd;
823 font-size: 1.2em;
824 text-decoration: none;
825 vertical-align: center;
826 font-weight: normal;
827 display: inline-block;
828}
829
830
831.page-form .button.button-red {
832 background: #ac2925;
833}
834
835.page-form .submit-buttons {
836 margin-bottom: 10px;
837}
838
839@media screen and (min-width: 64em) {
840 .page-form .submit-buttons {
841 position: relative;
842 }
843
844 .page-form .submit-buttons .button.button-red {
845 position: absolute;
846 right: 5%;
847 }
848}
849
850@media screen and (max-width: 64em) {
851 .page-form .submit-buttons .button {
852 display: block;
853 margin: auto;
854 }
855}
856
857.page-form select {
858 color: #252525;
859}
860
861/**
862 * PAGE FORM - LIGHT
863 */
864.page-form-light div, .page-form-light p {
865 text-align: center;
866}
867
868/**
869 * PAGE FORM - COMPLETE
870 */
871.page-form-complete {
872 #background: #f5f5f5;
873}
874
875.page-form-complete div, .page-form-complete p {
876 color: #252525;
877}
878
879.page-form-complete .form-label, .page-form-complete .form-input {
880 position: relative;
881 height: 60px;
882}
883
884.page-form-complete .form-label label,
885.page-form-complete .form-input input,
886.page-form-complete .form-input select.align,
887.page-form-complete .timezone {
888 position: absolute;
889 top: 50%;
890 transform: translateY(-50%);
891}
892
893.page-form-complete .form-label label {
894 text-align: right;
895 right: 0;
896 padding: 0 20px;
897}
898
899.page-form-complete .label-name {
900 font-weight: bold;
901}
902
903.page-form-complete .label-desc {
904 font-size: 0.8em;
905}
906
907.page-form-complete input[type="text"],
908.page-form-complete input[type="password"],
909.page-form-complete textarea {
910 margin: 0;
911}
912
913.page-form section {
914 margin: 10px 0 25px 0;
915}
916
917.page-form table {
918 margin: auto;
919 width: 90%;
920}
921
922.page-form table .order {
923 text-decoration: none;
924 color: #252525;
925}
926
927.page-form table, .page-form th, .page-form td {
928 border-width: 1px 0;
929 border-style: solid;
930 border-color: #aaaaaa;
931}
932
933.page-form th, .page-form td {
934 padding: 5px;
935
936}
937
938/* Awesomeplete fix */
939div.awesomplete {
940 width: inherit;
941}
942
943div.awesomplete > input {
944 display: inherit;
945}
946
947div.awesomplete > ul {
948 z-index: 9999;
949}
950
951.page-form .awesomplete {
952 width: 90%;
953}
954
955.page-form .awesomplete input {
956 width: 100%;
957}
958
959.page-form div.awesomplete > ul {
960 color: black;
961}
962
963form[name="linkform"].page-form {
964 overflow: visible;
965}
966
967@media screen and (max-width: 64em) {
968 .page-form-complete .form-label {
969 height: inherit;
970 }
971
972 .page-form-complete .form-label label,
973 .page-form-complete .form-input input,
974 .page-form-complete .timezone {
975 position: inherit;
976 top: inherit;
977 transform: translateY(0);
978 }
979
980 .page-form-complete .form-input input[type="checkbox"] {
981 position: absolute;
982 top: 50%;
983 right: 50%;
984 transform: translateY(-50%);
985 }
986
987 .page-form-complete .form-input {
988 text-align: center;
989 }
990
991 .page-form-complete .form-label label {
992 display: block;
993 text-align: left;
994 margin: 10px 0 0 0;
995 }
996
997 .timezone-continent:after {
998 content:"\a\a";
999 white-space: pre;
1000 }
1001
1002 .page-form-complete .radio-buttons {
1003 text-align: left;
1004 padding: 5px 15px;
1005 }
1006}
1007
1008/**
1009 * Page visitor (page form extended)
1010 */
1011.page-visitor {
1012 color: #252525;
1013}
1014
1015#page404 {
1016 color: #3f3f3f;
1017}
1018
1019/**
1020 * EDIT LINK
1021 */
1022#editlinkform .created-date {
1023 color: #767676;
1024 margin-bottom: 10px;
1025}
1026
1027/**
1028 * LOGIN
1029 */
1030#login-form .remember-me {
1031 margin: 5px 0;
1032}
1033
1034/**
1035 * Search results
1036 */
1037.search-result a {
1038 color: white;
1039 text-decoration: none;
1040}
1041
1042.search-result .label-tag {
1043 border-color: white;
1044}
1045
1046.search-result .label-tag .remove {
1047 border-left: white 1px solid;
1048 padding: 0 0 0 5px;
1049 margin: 0 0 0 5px;
1050}
1051
1052.search-result .label-private {
1053 border: 1px solid white;
1054}
1055
1056/**
1057 * TOOLS
1058 */
1059.tools-item {
1060 margin: 10px 0;
1061}
1062
1063.tools-item .pure-button:hover {
1064 background-image: none;
1065 background-color: #1b926c;
1066 color: #f5f5f5;
1067}
1068
1069/**
1070 * PLUGIN ADMIN
1071 */
1072#pluginform .mobile-row {
1073 font-size: 0.9em;
1074}
1075
1076#pluginform .more {
1077 margin-top: 10px;
1078}
1079
1080@media screen and (max-width: 64em) {
1081 #pluginform .main-row, #pluginform .main-row td {
1082 border-bottom-style: none;
1083 }
1084
1085 #pluginform .mobile-row, #pluginform .mobile-row td {
1086 border-top-style: none;
1087 }
1088}
1089
1090/**
1091 * IMPORT
1092 */
1093#import-field {
1094 margin: 15px 0;
1095}
1096
1097/**
1098 * TAG CLOUD
1099 */
1100#cloudtag {
1101 padding: 10px;
1102 text-align: center;
1103}
1104
1105#cloudtag, #cloudtag a {
1106 color: #252525;
1107 text-decoration: none;
1108}
1109
1110#cloudtag .count {
1111 color: #7f7f7f;
1112}
1113
1114/**
1115 * TAG LIST
1116 */
1117#taglist {
1118 padding: 0 10px;
1119}
1120
1121#taglist a {
1122 color: #252525;
1123 text-decoration: none;
1124}
1125
1126#taglist .count {
1127 display: inline-block;
1128 width: 35px;
1129 text-align: right;
1130 color: #7f7f7f;
1131}
1132
1133#taglist .rename-tag-form {
1134 display: none;
1135}
1136
1137#taglist .delete-tag {
1138 color: #ac2925;
1139 display: none;
1140}
1141
1142#taglist .rename-tag {
1143 color: #0b5ea6;
1144}
1145
1146#taglist .validate-rename-tag {
1147 color: #1b926c;
1148}
1149
1150/**
1151 * Picture wall CSS
1152 */
1153#picwall_container {
1154 margin: 0 10px 10px 10px;
1155 color: #252525;
1156 background-color: #f5f5f5;
1157 clear: both;
1158}
1159
1160.picwall_pictureframe {
1161 margin: 2px;
1162 background-color: #f5f5f5;
1163 z-index: 5;
1164 position: relative;
1165 display: table-cell;
1166 vertical-align: middle;
1167 width: 90px;
1168 height: 90px;
1169 overflow: hidden;
1170 text-align: center;
1171 float: left;
1172}
1173
1174.b-lazy {
1175 -webkit-transition: opacity 500ms ease-in-out;
1176 -moz-transition: opacity 500ms ease-in-out;
1177 -o-transition: opacity 500ms ease-in-out;
1178 transition: opacity 500ms ease-in-out;
1179 opacity: 0;
1180}
1181.b-lazy.b-loaded {
1182 opacity: 1;
1183}
1184
1185.picwall_pictureframe img {
1186 max-width: 100%;
1187 height: auto;
1188 color: transparent;
1189} /* Adapt the width of the image */
1190
1191.picwall_pictureframe a {
1192 text-decoration: none;
1193}
1194
1195/* CSS to show title when hovering an image - no javascript required. */
1196.picwall_pictureframe span.info {
1197 display: none;
1198 font-family: Arial, sans-serif;
1199}
1200
1201.picwall_pictureframe:hover span.info {
1202 display: block;
1203 position: absolute;
1204 top: 0;
1205 left: 0;
1206 width: 90px;
1207 height: 90px;
1208 font-weight: bold;
1209 font-size: 9pt;
1210 color: #f5f5f5;
1211 text-align: left;
1212 background-color: rgba(0, 0, 0, 0.8);
1213}
1214
1215/**
1216 * DAILY
1217 */
1218.daily-desc {
1219 color: #7f7f7f;
1220 font-size: 0.8em;
1221}
1222
1223.daily-about a {
1224 color: #343434;
1225 text-decoration: none;
1226}
1227
1228.daily-about a:hover {
1229 color: #7f7f7f;
1230}
1231
1232.daily-about h3:before, .daily-about h3:after {
1233 display: block;
1234 content:"";
1235 background: linear-gradient(to right, #d5d4d4, #252525, #d5d4d4);
1236 height: 1px;
1237 width: 90%;
1238 margin: 10px auto;
1239}
1240
1241.daily-entry {
1242 padding: 0 10px;
1243}
1244
1245.daily-entry .daily-entry-title:after {
1246 display: block;
1247 content:"";
1248 background: linear-gradient(to right, #fff, #515151, #fff);
1249 height: 1px;
1250 width: 70%;
1251 margin: 5px auto;
1252}
1253
1254.daily-entry .daily-entry-title {
1255 margin: 10px 0 0 0;
1256}
1257
1258.daily-entry .daily-entry-title a {
1259 color: #000;
1260 text-decoration: none;
1261}
1262
1263.daily-entry .daily-entry-description {
1264 padding: 5px 5px 0 5px;
1265 font-size: 0.9em;
1266 text-align: justify;
1267 word-wrap: break-word;
1268}
1269
1270.daily-entry .daily-entry-tags {
1271 padding: 0 5px 5px 5px;
1272 font-size: 0.8em;
1273}
1274
1275.daily-entry-thumbnail {
1276 float: left;
1277 margin: 15px 5px 5px 15px;
1278}
1279
1280.daily-entry-description a {
1281 text-decoration: none;
1282 color: #1b926c;
1283}
1284
1285.daily-entry-description a:hover {
1286 text-shadow: 1px 1px #ddd;
1287}
1288
1289.daily-entry-description a:visited {
1290 color: #20b988;
1291}
1292
1293/*
1294 * Fix empty bookmarklet name in Firefox
1295 */
1296.pure-button {
1297 -moz-user-select: auto;
1298}
1299
1300.tag-sort {
1301 margin-top: 30px;
1302 text-align: center;
1303}
1304
1305.tag-sort a {
1306 display: inline-block;
1307 margin: 0 15px;
1308 color: white;
1309 text-decoration: none;
1310 font-weight: bold;
1311}
1312
1313/**
1314 * Markdown
1315 */
1316.markdown p {
1317 margin: 0 !important;
1318}
1319
1320.markdown p + p {
1321 margin: 0.5em 0 0 0 !important;
1322}
1323
1324.markdown *:first-child {
1325 margin-top: 0 !important;
1326}
1327
1328.markdown *:last-child {
1329 margin-bottom: 5px !important;
1330}
1331
1332/**
1333 * Pure Button
1334 */
1335.pure-button-success,
1336.pure-button-error,
1337.pure-button-warning,
1338.pure-button-primary,
1339.pure-button-shaarli,
1340.pure-button-secondary {
1341 color: white !important;
1342 border-radius: 4px;
1343 text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
1344}
1345
1346.pure-button-shaarli {
1347 background-color: #1B926C;
1348}
diff --git a/tpl/default/daily.html b/tpl/default/daily.html
new file mode 100644
index 00000000..29d845d5
--- /dev/null
+++ b/tpl/default/daily.html
@@ -0,0 +1,113 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9<div class="pure-g">
10 <div class="pure-u-lg-1-6 pure-u-1-24"></div>
11 <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor" id="daily">
12 <h2 class="window-title">
13 {'The Daily Shaarli'|t}
14 <a href="?do=dailyrss" title="{'1 RSS entry per day'|t}"><i class="fa fa-rss"></i></a>
15 </h2>
16
17 <div id="plugin_zone_start_daily" class="plugin_zone">
18 {loop="$plugin_start_zone"}
19 {$value}
20 {/loop}
21 </div>
22
23 <div class="daily-about">
24
25 <div class="pure-g">
26 <div class="pure-u-lg-1-3 pure-u-1 center">
27 {if="$previousday"}
28 <a href="?do=daily&amp;day={$previousday}">
29 <i class="fa fa-arrow-left"></i>
30 {'Previous day'|t}
31 </a>
32 {/if}
33 </div>
34 <div class="daily-desc pure-u-lg-1-3 pure-u-1 center">
35 {'All links of one day in a single page.'|t}
36 </div>
37 <div class="pure-u-lg-1-3 pure-u-1 center">
38 {if="$nextday"}
39 <a href="?do=daily&amp;day={$nextday}">
40 {'Next day'|t}
41 <i class="fa fa-arrow-right"></i>
42 </a>
43 {/if}
44 </div>
45 </div>
46 <div>
47 <h3 class="window-subtitle">{function="format_date($dayDate, false)"}</h3>
48
49 <div id="plugin_zone_about_daily" class="plugin_zone">
50 {loop="$daily_about_plugin"}
51 {$value}
52 {/loop}
53 </div>
54 </div>
55 </div>
56
57
58 {if="$linksToDisplay"}
59 <div class="pure-g">
60 {loop="$cols"}
61 {if="isset($value[0])"}
62 <div class="pure-u-lg-1-3 pure-u-1">
63 {loop="value"}
64 {$link=$value}
65 <div class="daily-entry">
66 <div class="daily-entry-title center">
67 <a href="?{$link.shorturl}" title="{'Permalink'|t}">
68 <i class="fa fa-link"></i>
69 </a>
70 <a href="{$link.real_url}">{$link.title}</a>
71 </div>
72 {$thumb=thumbnail($value.url)}
73 {if="$thumb!=false"}
74 <div class="daily-entry-thumbnail">{$thumb}</div>
75 {/if}
76 <div class="daily-entry-description">{$link.formatedDescription}</div>
77 {if="$link.tags"}
78 <div class="daily-entry-tags center">
79 {loop="link.taglist"}
80 <span class="label label-tag" title="Add tag">
81 {$value}
82 </span>
83 {/loop}
84 </div>
85 {/if}
86 <div class="dailyEntryFooter">
87 {loop="$link.link_plugin"}
88 {$value}
89 {/loop}
90 </div>
91 </div>
92 {/loop}
93 </div>
94 {/if}
95 {/loop}
96 </div>
97 {else}
98 <div class="dailyNoEntry">No articles on this day.</div>
99 {/if}
100
101 <div class="clear"></div>
102
103 <div id="plugin_zone_end_picwall" class="plugin_zone">
104 {loop="$plugin_end_zone"}
105 {$value}
106 {/loop}
107 </div>
108 </div>
109</div>
110{include="page.footer"}
111</body>
112</html>
113
diff --git a/tpl/default/dailyrss.html b/tpl/default/dailyrss.html
new file mode 100644
index 00000000..b14a3859
--- /dev/null
+++ b/tpl/default/dailyrss.html
@@ -0,0 +1,16 @@
1<item>
2 <title>{$title} - {function="strftime('%A %e %B %Y', $daydate)"}</title>
3 <guid>{$absurl}</guid>
4 <link>{$absurl}</link>
5 <pubDate>{$rssdate}</pubDate>
6 <description><![CDATA[
7 {loop="links"}
8 <h3><a href="{$value.url}">{$value.title}</a></h3>
9 <small>{if="!$hide_timestamps"}{function="strftime('%c', $value.timestamp)"} - {/if}{if="$value.tags"}{$value.tags}{/if}<br>
10 {$value.url}</small><br>
11 {if="$value.thumbnail"}{$value.thumbnail}{/if}<br>
12 {if="$value.description"}{$value.formatedDescription}{/if}
13 <br><br><hr>
14 {/loop}
15 ]]></description>
16</item>
diff --git a/tpl/default/editlink.html b/tpl/default/editlink.html
new file mode 100644
index 00000000..d03fd72f
--- /dev/null
+++ b/tpl/default/editlink.html
@@ -0,0 +1,80 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7 {include="page.header"}
8 <div id="editlinkform" class="pure-g">
9 <div class="pure-u-lg-1-5 pure-u-1-24"></div>
10 <form method="post" name="linkform" class="page-form pure-u-lg-3-5 pure-u-22-24 page-form page-form-light">
11 <h2 class="window-title">
12 {if="!$link_is_new"}{'Edit'|t}{/if}
13 {'Shaare'|t}
14 </h2>
15 <input type="hidden" name="lf_linkdate" value="{$link.linkdate}">
16 {if="isset($link.id)"}
17 <input type="hidden" name="lf_id" value="{$link.id}">
18 {/if}
19 {if="!$link_is_new"}<div class="created-date">{'Created:'|t} {$link.created|format_date}</div>{/if}
20 <div>
21 <label for="lf_url">{'URL'|t}</label>
22 </div>
23 <div>
24 <input type="text" name="lf_url" id="lf_url" value="{$link.url}" class="lf_input autofocus">
25 </div>
26 <div>
27 <label for="lf_title">{'Title'|t}</label>
28 </div>
29 <div>
30 <input type="text" name="lf_title" id="lf_title" value="{$link.title}" class="lf_input autofocus">
31 </div>
32 <div>
33 <label for="lf_description">{'Description'|t}</label>
34 </div>
35 <div>
36 <textarea name="lf_description" id="lf_description" class="autofocus">{$link.description}</textarea>
37 </div>
38 <div>
39 <label for="lf_tags">{'Tags'|t}</label>
40 </div>
41 <div>
42 <input type="text" name="lf_tags" id="lf_tags" value="{$link.tags}" class="lf_input autofocus"
43 data-list="{loop="$tags"}{$key}, {/loop}" data-multiple data-autofirst autocomplete="off" >
44 </div>
45
46 <div>
47 <input type="checkbox" name="lf_private" id="lf_private"
48 {if="($link_is_new && $default_private_links || $link.private == true)"}
49 checked="checked"
50 {/if}>
51 &nbsp;<label for="lf_private">{'Private'|t}</label>
52 </div>
53
54 <div id="editlink-plugins">
55 {loop="$edit_link_plugin"}
56 {$value}
57 {/loop}
58 </div>
59
60
61 <div class="submit-buttons center">
62 <input type="submit" name="save_edit" class="" id="button-save-edit"
63 value="{if="$link_is_new"}{'Save'|t}{else}{'Apply Changes'|t}{/if}">
64 {if="!$link_is_new"}
65 <a href="?delete_link&amp;lf_linkdate={$link.id}&amp;token={$token}"
66 title="" name="delete_link" class="button button-red confirm-delete">
67 {'Delete'|t}
68 </a>
69 {/if}
70 </div>
71
72 <input type="hidden" name="token" value="{$token}">
73 {if="$http_referer"}
74 <input type="hidden" name="returnurl" value="{$http_referer}">
75 {/if}
76 </form>
77 </div>
78 {include="page.footer"}
79</body>
80</html>
diff --git a/tpl/default/export.bookmarks.html b/tpl/default/export.bookmarks.html
new file mode 100644
index 00000000..da733257
--- /dev/null
+++ b/tpl/default/export.bookmarks.html
@@ -0,0 +1,10 @@
1<!DOCTYPE NETSCAPE-Bookmark-file-1>
2<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
3<!-- This is an automatically generated file.
4 It will be read and overwritten.
5 Do Not Edit! -->{ignore}The RainTPL loop is formatted to avoid generating extra newlines{/ignore}
6<TITLE>{$pagetitle}</TITLE>
7<H1>Shaarli export of {$selection} bookmarks on {$date}</H1>
8<DL><p>{loop="links"}
9<DT><A HREF="{$value.url}" ADD_DATE="{$value.timestamp}" PRIVATE="{$value.private}" TAGS="{$value.taglist}">{$value.title}</A>{if="$value.description"}{$eol}<DD>{$value.description}{/if}{/loop}
10</DL><p>
diff --git a/tpl/default/export.html b/tpl/default/export.html
new file mode 100644
index 00000000..af1d6e33
--- /dev/null
+++ b/tpl/default/export.html
@@ -0,0 +1,68 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9<form method="GET" action="#" name="exportform" id="exportform">
10 <div class="pure-g">
11 <div class="pure-u-lg-1-4 pure-u-1-24"></div>
12 <div class="pure-u-lg-1-2 pure-u-22-24 page-form page-form-complete">
13 <div>
14 <h2 class="window-title">{"Export Database"|t}</h2>
15 </div>
16 <input type="hidden" name="do" value="export">
17 <input type="hidden" name="token" value="{$token}">
18
19 <div class="pure-g">
20 <div class="pure-u-lg-1-2 pure-u-1">
21 <div class="form-label">
22 <label><span class="label-name">{'Selection'|t}</span></label>
23 </div>
24 </div>
25 <div class="pure-u-lg-1-2 pure-u-1">
26 <div class="radio-buttons">
27 <div>
28 <input type="radio" name="selection" value="all" checked="checked">
29 {'All'|t}
30 </div>
31 <div>
32 <input type="radio" name="selection" value="private">
33 {'Private'|t}
34 </div>
35 <div>
36 <input type="radio" name="selection" value="public">
37 {'Public'|t}
38 </div>
39 </div>
40 </div>
41 </div>
42
43 <div class="pure-g">
44 <div class="pure-u-lg-1-2 pure-u-7-8">
45 <div class="form-label">
46 <label for="prepend_note_url">
47 <span class="label-name">{'Prepend note permalinks with this Shaarli instance\'s URL'|t}</span><br>
48 <span class="label-desc">{'Useful to import bookmarks in a web browser'|t}</span>
49 </label>
50 </div>
51 </div>
52 <div class="pure-u-lg-1-2 pure-u-1-8">
53 <div class="form-input">
54 <input type="checkbox" name="prepend_note_url" id="prepend_note_url">
55 </div>
56 </div>
57 </div>
58
59 <div class="center">
60 <input type="submit" value="{'Export'|t}">
61 </div>
62 </div>
63 </div>
64</form>
65
66{include="page.footer"}
67</body>
68</html>
diff --git a/tpl/feed.atom.html b/tpl/default/feed.atom.html
index aead0459..29187505 100644
--- a/tpl/feed.atom.html
+++ b/tpl/default/feed.atom.html
@@ -6,11 +6,9 @@
6 <updated>{$last_update}</updated> 6 <updated>{$last_update}</updated>
7 {/if} 7 {/if}
8 <link rel="self" href="{$self_link}#" /> 8 <link rel="self" href="{$self_link}#" />
9 {if="!empty($pubsubhub_url)"} 9 {loop="$plugins_feed_header"}
10 <!-- PubSubHubbub Discovery --> 10 {$value}
11 <link rel="hub" href="{$pubsubhub_url}#" /> 11 {/loop}
12 <!-- End Of PubSubHubbub Discovery -->
13 {/if}
14 <author> 12 <author>
15 <name>{$index_url}</name> 13 <name>{$index_url}</name>
16 <uri>{$index_url}</uri> 14 <uri>{$index_url}</uri>
@@ -34,6 +32,9 @@
34 {loop="$value.taglist"} 32 {loop="$value.taglist"}
35 <category scheme="{$index_url}?searchtags=" term="{$value|strtolower}" label="{$value}" /> 33 <category scheme="{$index_url}?searchtags=" term="{$value|strtolower}" label="{$value}" />
36 {/loop} 34 {/loop}
35 {loop="$value.feed_plugins"}
36 {$value}
37 {/loop}
37 </entry> 38 </entry>
38 {/loop} 39 {/loop}
39</feed> 40</feed>
diff --git a/tpl/feed.rss.html b/tpl/default/feed.rss.html
index e18dbf9b..66d9a869 100644
--- a/tpl/feed.rss.html
+++ b/tpl/default/feed.rss.html
@@ -8,10 +8,9 @@
8 <copyright>{$index_url}</copyright> 8 <copyright>{$index_url}</copyright>
9 <generator>Shaarli</generator> 9 <generator>Shaarli</generator>
10 <atom:link rel="self" href="{$self_link}" /> 10 <atom:link rel="self" href="{$self_link}" />
11 {if="!empty($pubsubhub_url)"} 11 {loop="$plugins_feed_header"}
12 <!-- PubSubHubbub Discovery --> 12 {$value}
13 <atom:link rel="hub" href="{$pubsubhub_url}" /> 13 {/loop}
14 {/if}
15 {loop="$links"} 14 {loop="$links"}
16 <item> 15 <item>
17 <title>{$value.title}</title> 16 <title>{$value.title}</title>
@@ -29,6 +28,9 @@
29 {loop="$value.taglist"} 28 {loop="$value.taglist"}
30 <category domain="{$index_url}?searchtags=">{$value}</category> 29 <category domain="{$index_url}?searchtags=">{$value}</category>
31 {/loop} 30 {/loop}
31 {loop="$value.feed_plugins"}
32 {$value}
33 {/loop}
32 </item> 34 </item>
33 {/loop} 35 {/loop}
34 </channel> 36 </channel>
diff --git a/tpl/default/fonts/FontAwesome.otf b/tpl/default/fonts/FontAwesome.otf
new file mode 100644
index 00000000..401ec0f3
--- /dev/null
+++ b/tpl/default/fonts/FontAwesome.otf
Binary files differ
diff --git a/tpl/default/fonts/Roboto-Bold.woff b/tpl/default/fonts/Roboto-Bold.woff
new file mode 100644
index 00000000..3d86753b
--- /dev/null
+++ b/tpl/default/fonts/Roboto-Bold.woff
Binary files differ
diff --git a/tpl/default/fonts/Roboto-Bold.woff2 b/tpl/default/fonts/Roboto-Bold.woff2
new file mode 100644
index 00000000..bd05e2ea
--- /dev/null
+++ b/tpl/default/fonts/Roboto-Bold.woff2
Binary files differ
diff --git a/tpl/default/fonts/Roboto-Regular.woff b/tpl/default/fonts/Roboto-Regular.woff
new file mode 100644
index 00000000..464d2062
--- /dev/null
+++ b/tpl/default/fonts/Roboto-Regular.woff
Binary files differ
diff --git a/tpl/default/fonts/Roboto-Regular.woff2 b/tpl/default/fonts/Roboto-Regular.woff2
new file mode 100644
index 00000000..f9661967
--- /dev/null
+++ b/tpl/default/fonts/Roboto-Regular.woff2
Binary files differ
diff --git a/tpl/default/fonts/fontawesome-webfont.eot b/tpl/default/fonts/fontawesome-webfont.eot
new file mode 100644
index 00000000..e9f60ca9
--- /dev/null
+++ b/tpl/default/fonts/fontawesome-webfont.eot
Binary files differ
diff --git a/tpl/default/fonts/fontawesome-webfont.svg b/tpl/default/fonts/fontawesome-webfont.svg
new file mode 100644
index 00000000..855c845e
--- /dev/null
+++ b/tpl/default/fonts/fontawesome-webfont.svg
@@ -0,0 +1,2671 @@
1<?xml version="1.0" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3<svg>
4<metadata>
5Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016
6 By ,,,
7Copyright Dave Gandy 2016. All rights reserved.
8</metadata>
9<defs>
10<font id="FontAwesome" horiz-adv-x="1536" >
11 <font-face
12 font-family="FontAwesome"
13 font-weight="400"
14 font-stretch="normal"
15 units-per-em="1792"
16 panose-1="0 0 0 0 0 0 0 0 0 0"
17 ascent="1536"
18 descent="-256"
19 bbox="-1.02083 -256.962 2304.6 1537.02"
20 underline-thickness="0"
21 underline-position="0"
22 unicode-range="U+0020-F500"
23 />
24<missing-glyph horiz-adv-x="896"
25d="M224 112h448v1312h-448v-1312zM112 0v1536h672v-1536h-672z" />
26 <glyph glyph-name=".notdef" horiz-adv-x="896"
27d="M224 112h448v1312h-448v-1312zM112 0v1536h672v-1536h-672z" />
28 <glyph glyph-name=".null" horiz-adv-x="0"
29 />
30 <glyph glyph-name="nonmarkingreturn" horiz-adv-x="597"
31 />
32 <glyph glyph-name="space" unicode=" " horiz-adv-x="448"
33 />
34 <glyph glyph-name="dieresis" unicode="&#xa8;" horiz-adv-x="1792"
35 />
36 <glyph glyph-name="copyright" unicode="&#xa9;" horiz-adv-x="1792"
37 />
38 <glyph glyph-name="registered" unicode="&#xae;" horiz-adv-x="1792"
39 />
40 <glyph glyph-name="acute" unicode="&#xb4;" horiz-adv-x="1792"
41 />
42 <glyph glyph-name="AE" unicode="&#xc6;" horiz-adv-x="1792"
43 />
44 <glyph glyph-name="Oslash" unicode="&#xd8;" horiz-adv-x="1792"
45 />
46 <glyph glyph-name="trademark" unicode="&#x2122;" horiz-adv-x="1792"
47 />
48 <glyph glyph-name="infinity" unicode="&#x221e;" horiz-adv-x="1792"
49 />
50 <glyph glyph-name="notequal" unicode="&#x2260;" horiz-adv-x="1792"
51 />
52 <glyph glyph-name="glass" unicode="&#xf000;" horiz-adv-x="1792"
53d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" />
54 <glyph glyph-name="music" unicode="&#xf001;"
55d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89
56t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" />
57 <glyph glyph-name="search" unicode="&#xf002;" horiz-adv-x="1664"
58d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5
59t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
60 <glyph glyph-name="envelope" unicode="&#xf003;" horiz-adv-x="1792"
61d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13
62t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z
63M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
64 <glyph glyph-name="heart" unicode="&#xf004;" horiz-adv-x="1792"
65d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600
66q-18 -18 -44 -18z" />
67 <glyph glyph-name="star" unicode="&#xf005;" horiz-adv-x="1664"
68d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455
69l502 -73q56 -9 56 -46z" />
70 <glyph glyph-name="star_empty" unicode="&#xf006;" horiz-adv-x="1664"
71d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500
72l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" />
73 <glyph glyph-name="user" unicode="&#xf007;" horiz-adv-x="1280"
74d="M1280 137q0 -109 -62.5 -187t-150.5 -78h-854q-88 0 -150.5 78t-62.5 187q0 85 8.5 160.5t31.5 152t58.5 131t94 89t134.5 34.5q131 -128 313 -128t313 128q76 0 134.5 -34.5t94 -89t58.5 -131t31.5 -152t8.5 -160.5zM1024 1024q0 -159 -112.5 -271.5t-271.5 -112.5
75t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
76 <glyph glyph-name="film" unicode="&#xf008;" horiz-adv-x="1920"
77d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128
78q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45
79t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128
80q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19
81t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
82 <glyph glyph-name="th_large" unicode="&#xf009;" horiz-adv-x="1664"
83d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38
84h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
85 <glyph glyph-name="th" unicode="&#xf00a;" horiz-adv-x="1792"
86d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320
87q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28
88h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192
89q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68z" />
90 <glyph glyph-name="th_list" unicode="&#xf00b;" horiz-adv-x="1792"
91d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960
92q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28
93h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" />
94 <glyph glyph-name="ok" unicode="&#xf00c;" horiz-adv-x="1792"
95d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" />
96 <glyph glyph-name="remove" unicode="&#xf00d;" horiz-adv-x="1408"
97d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68
98t-28 -68l-294 -294l294 -294q28 -28 28 -68z" />
99 <glyph glyph-name="zoom_in" unicode="&#xf00e;" horiz-adv-x="1664"
100d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224
101q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5
102t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
103 <glyph glyph-name="zoom_out" unicode="&#xf010;" horiz-adv-x="1664"
104d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z
105M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z
106" />
107 <glyph glyph-name="off" unicode="&#xf011;"
108d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5
109t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" />
110 <glyph glyph-name="signal" unicode="&#xf012;" horiz-adv-x="1792"
111d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23
112v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" />
113 <glyph glyph-name="cog" unicode="&#xf013;"
114d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38
115q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13
116l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22
117q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" />
118 <glyph glyph-name="trash" unicode="&#xf014;" horiz-adv-x="1408"
119d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576
120q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832
121q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
122 <glyph glyph-name="home" unicode="&#xf015;" horiz-adv-x="1664"
123d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5
124l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" />
125 <glyph glyph-name="file_alt" unicode="&#xf016;"
126d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z
127" />
128 <glyph glyph-name="time" unicode="&#xf017;"
129d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640
130q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
131 <glyph glyph-name="road" unicode="&#xf018;" horiz-adv-x="1920"
132d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256
133q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" />
134 <glyph glyph-name="download_alt" unicode="&#xf019;" horiz-adv-x="1664"
135d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136
136q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" />
137 <glyph glyph-name="download" unicode="&#xf01a;"
138d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273
139t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
140 <glyph glyph-name="upload" unicode="&#xf01b;"
141d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198
142t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
143 <glyph glyph-name="inbox" unicode="&#xf01c;"
144d="M1023 576h316q-1 3 -2.5 8.5t-2.5 7.5l-212 496h-708l-212 -496q-1 -3 -2.5 -8.5t-2.5 -7.5h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552
145q25 -61 25 -123z" />
146 <glyph glyph-name="play_circle" unicode="&#xf01d;"
147d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640
148q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
149 <glyph glyph-name="repeat" unicode="&#xf01e;"
150d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q15 0 25 -9
151l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" />
152 <glyph glyph-name="refresh" unicode="&#xf021;"
153d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117
154q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5
155q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" />
156 <glyph glyph-name="list_alt" unicode="&#xf022;" horiz-adv-x="1792"
157d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
158M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z
159M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5
160t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47
161t47 -113z" />
162 <glyph glyph-name="lock" unicode="&#xf023;" horiz-adv-x="1152"
163d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" />
164 <glyph glyph-name="flag" unicode="&#xf024;" horiz-adv-x="1792"
165d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48
166t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" />
167 <glyph glyph-name="headphones" unicode="&#xf025;" horiz-adv-x="1664"
168d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78
169t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5
170t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" />
171 <glyph glyph-name="volume_off" unicode="&#xf026;" horiz-adv-x="768"
172d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" />
173 <glyph glyph-name="volume_down" unicode="&#xf027;" horiz-adv-x="1152"
174d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 36
175t12 56.5t-12 56.5t-29 36t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" />
176 <glyph glyph-name="volume_up" unicode="&#xf028;" horiz-adv-x="1664"
177d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 36
178t12 56.5t-12 56.5t-29 36t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5
179t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289
180t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" />
181 <glyph glyph-name="qrcode" unicode="&#xf029;" horiz-adv-x="1408"
182d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z
183M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" />
184 <glyph glyph-name="barcode" unicode="&#xf02a;" horiz-adv-x="1792"
185d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z
186M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" />
187 <glyph glyph-name="tag" unicode="&#xf02b;"
188d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5
189l715 -714q37 -39 37 -91z" />
190 <glyph glyph-name="tags" unicode="&#xf02c;" horiz-adv-x="1920"
191d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5
192l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" />
193 <glyph glyph-name="book" unicode="&#xf02d;" horiz-adv-x="1664"
194d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23
195q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906
196q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5
197t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
198 <glyph glyph-name="bookmark" unicode="&#xf02e;" horiz-adv-x="1280"
199d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
200 <glyph glyph-name="print" unicode="&#xf02f;" horiz-adv-x="1664"
201d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68
202v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" />
203 <glyph glyph-name="camera" unicode="&#xf030;" horiz-adv-x="1920"
204d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136
205q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
206 <glyph glyph-name="font" unicode="&#xf031;" horiz-adv-x="1664"
207d="M725 977l-170 -450q33 0 136.5 -2t160.5 -2q19 0 57 2q-87 253 -184 452zM0 -128l2 79q23 7 56 12.5t57 10.5t49.5 14.5t44.5 29t31 50.5l237 616l280 724h75h53q8 -14 11 -21l205 -480q33 -78 106 -257.5t114 -274.5q15 -34 58 -144.5t72 -168.5q20 -45 35 -57
208q19 -15 88 -29.5t84 -20.5q6 -38 6 -57q0 -5 -0.5 -13.5t-0.5 -12.5q-63 0 -190 8t-191 8q-76 0 -215 -7t-178 -8q0 43 4 78l131 28q1 0 12.5 2.5t15.5 3.5t14.5 4.5t15 6.5t11 8t9 11t2.5 14q0 16 -31 96.5t-72 177.5t-42 100l-450 2q-26 -58 -76.5 -195.5t-50.5 -162.5
209q0 -22 14 -37.5t43.5 -24.5t48.5 -13.5t57 -8.5t41 -4q1 -19 1 -58q0 -9 -2 -27q-58 0 -174.5 10t-174.5 10q-8 0 -26.5 -4t-21.5 -4q-80 -14 -188 -14z" />
210 <glyph glyph-name="bold" unicode="&#xf032;" horiz-adv-x="1408"
211d="M555 15q74 -32 140 -32q376 0 376 335q0 114 -41 180q-27 44 -61.5 74t-67.5 46.5t-80.5 25t-84 10.5t-94.5 2q-73 0 -101 -10q0 -53 -0.5 -159t-0.5 -158q0 -8 -1 -67.5t-0.5 -96.5t4.5 -83.5t12 -66.5zM541 761q42 -7 109 -7q82 0 143 13t110 44.5t74.5 89.5t25.5 142
212q0 70 -29 122.5t-79 82t-108 43.5t-124 14q-50 0 -130 -13q0 -50 4 -151t4 -152q0 -27 -0.5 -80t-0.5 -79q0 -46 1 -69zM0 -128l2 94q15 4 85 16t106 27q7 12 12.5 27t8.5 33.5t5.5 32.5t3 37.5t0.5 34v35.5v30q0 982 -22 1025q-4 8 -22 14.5t-44.5 11t-49.5 7t-48.5 4.5
213t-30.5 3l-4 83q98 2 340 11.5t373 9.5q23 0 68 -0.5t68 -0.5q70 0 136.5 -13t128.5 -42t108 -71t74 -104.5t28 -137.5q0 -52 -16.5 -95.5t-39 -72t-64.5 -57.5t-73 -45t-84 -40q154 -35 256.5 -134t102.5 -248q0 -100 -35 -179.5t-93.5 -130.5t-138 -85.5t-163.5 -48.5
214t-176 -14q-44 0 -132 3t-132 3q-106 0 -307 -11t-231 -12z" />
215 <glyph glyph-name="italic" unicode="&#xf033;" horiz-adv-x="1024"
216d="M0 -126l17 85q22 7 61.5 16.5t72 19t59.5 23.5q28 35 41 101q1 7 62 289t114 543.5t52 296.5v25q-24 13 -54.5 18.5t-69.5 8t-58 5.5l19 103q33 -2 120 -6.5t149.5 -7t120.5 -2.5q48 0 98.5 2.5t121 7t98.5 6.5q-5 -39 -19 -89q-30 -10 -101.5 -28.5t-108.5 -33.5
217q-8 -19 -14 -42.5t-9 -40t-7.5 -45.5t-6.5 -42q-27 -148 -87.5 -419.5t-77.5 -355.5q-2 -9 -13 -58t-20 -90t-16 -83.5t-6 -57.5l1 -18q17 -4 185 -31q-3 -44 -16 -99q-11 0 -32.5 -1.5t-32.5 -1.5q-29 0 -87 10t-86 10q-138 2 -206 2q-51 0 -143 -9t-121 -11z" />
218 <glyph glyph-name="text_height" unicode="&#xf034;" horiz-adv-x="1792"
219d="M1744 128q33 0 42 -18.5t-11 -44.5l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80zM81 1407l54 -27q12 -5 211 -5q44 0 132 2
220t132 2q36 0 107.5 -0.5t107.5 -0.5h293q6 0 21 -0.5t20.5 0t16 3t17.5 9t15 17.5l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 48t-14.5 73.5t-7.5 35.5q-6 8 -12 12.5t-15.5 6t-13 2.5t-18 0.5t-16.5 -0.5
221q-17 0 -66.5 0.5t-74.5 0.5t-64 -2t-71 -6q-9 -81 -8 -136q0 -94 2 -388t2 -455q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27
222q19 42 19 383q0 101 -3 303t-3 303v117q0 2 0.5 15.5t0.5 25t-1 25.5t-3 24t-5 14q-11 12 -162 12q-33 0 -93 -12t-80 -26q-19 -13 -34 -72.5t-31.5 -111t-42.5 -53.5q-42 26 -56 44v383z" />
223 <glyph glyph-name="text_width" unicode="&#xf035;"
224d="M81 1407l54 -27q12 -5 211 -5q44 0 132 2t132 2q70 0 246.5 1t304.5 0.5t247 -4.5q33 -1 56 31l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 47.5t-15 73.5t-7 36q-10 13 -27 19q-5 2 -66 2q-30 0 -93 1t-103 1
225t-94 -2t-96 -7q-9 -81 -8 -136l1 -152v52q0 -55 1 -154t1.5 -180t0.5 -153q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27
226q7 16 11.5 74t6 145.5t1.5 155t-0.5 153.5t-0.5 89q0 7 -2.5 21.5t-2.5 22.5q0 7 0.5 44t1 73t0 76.5t-3 67.5t-6.5 32q-11 12 -162 12q-41 0 -163 -13.5t-138 -24.5q-19 -12 -34 -71.5t-31.5 -111.5t-42.5 -54q-42 26 -56 44v383zM1310 125q12 0 42 -19.5t57.5 -41.5
227t59.5 -49t36 -30q26 -21 26 -49t-26 -49q-4 -3 -36 -30t-59.5 -49t-57.5 -41.5t-42 -19.5q-13 0 -20.5 10.5t-10 28.5t-2.5 33.5t1.5 33t1.5 19.5h-1024q0 -2 1.5 -19.5t1.5 -33t-2.5 -33.5t-10 -28.5t-20.5 -10.5q-12 0 -42 19.5t-57.5 41.5t-59.5 49t-36 30q-26 21 -26 49
228t26 49q4 3 36 30t59.5 49t57.5 41.5t42 19.5q13 0 20.5 -10.5t10 -28.5t2.5 -33.5t-1.5 -33t-1.5 -19.5h1024q0 2 -1.5 19.5t-1.5 33t2.5 33.5t10 28.5t20.5 10.5z" />
229 <glyph glyph-name="align_left" unicode="&#xf036;" horiz-adv-x="1792"
230d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45
231t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
232 <glyph glyph-name="align_center" unicode="&#xf037;" horiz-adv-x="1792"
233d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19
234h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" />
235 <glyph glyph-name="align_right" unicode="&#xf038;" horiz-adv-x="1792"
236d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45
237t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
238 <glyph glyph-name="align_justify" unicode="&#xf039;" horiz-adv-x="1792"
239d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45
240t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
241 <glyph glyph-name="list" unicode="&#xf03a;" horiz-adv-x="1792"
242d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5
243t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344
244q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5
245t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192
246q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" />
247 <glyph glyph-name="indent_left" unicode="&#xf03b;" horiz-adv-x="1792"
248d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5
249t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088
250q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
251 <glyph glyph-name="indent_right" unicode="&#xf03c;" horiz-adv-x="1792"
252d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5
253t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088
254q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
255 <glyph glyph-name="facetime_video" unicode="&#xf03d;" horiz-adv-x="1792"
256d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5
257q39 -17 39 -59z" />
258 <glyph glyph-name="picture" unicode="&#xf03e;" horiz-adv-x="1920"
259d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216
260q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
261 <glyph glyph-name="pencil" unicode="&#xf040;"
262d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38
263q53 0 91 -38l235 -234q37 -39 37 -91z" />
264 <glyph glyph-name="map_marker" unicode="&#xf041;" horiz-adv-x="1024"
265d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" />
266 <glyph glyph-name="adjust" unicode="&#xf042;"
267d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
268 <glyph glyph-name="tint" unicode="&#xf043;" horiz-adv-x="1024"
269d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362
270q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" />
271 <glyph glyph-name="edit" unicode="&#xf044;" horiz-adv-x="1792"
272d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832
273q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92
274l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" />
275 <glyph glyph-name="share" unicode="&#xf045;" horiz-adv-x="1664"
276d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832
277q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5
278t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" />
279 <glyph glyph-name="check" unicode="&#xf046;" horiz-adv-x="1664"
280d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832
281q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110
282q24 -24 24 -57t-24 -57z" />
283 <glyph glyph-name="move" unicode="&#xf047;" horiz-adv-x="1792"
284d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45
285t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
286 <glyph glyph-name="step_backward" unicode="&#xf048;" horiz-adv-x="1024"
287d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 10 13 19z" />
288 <glyph glyph-name="fast_backward" unicode="&#xf049;" horiz-adv-x="1792"
289d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 10 13 19l710 710
290q19 19 32 13t13 -32v-710q4 10 13 19z" />
291 <glyph glyph-name="backward" unicode="&#xf04a;" horiz-adv-x="1664"
292d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q4 10 13 19z" />
293 <glyph glyph-name="play" unicode="&#xf04b;" horiz-adv-x="1408"
294d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" />
295 <glyph glyph-name="pause" unicode="&#xf04c;"
296d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" />
297 <glyph glyph-name="stop" unicode="&#xf04d;"
298d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
299 <glyph glyph-name="forward" unicode="&#xf04e;" horiz-adv-x="1664"
300d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q9 -9 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-4 -10 -13 -19z" />
301 <glyph glyph-name="fast_forward" unicode="&#xf050;" horiz-adv-x="1792"
302d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q9 -9 13 -19v710q0 26 13 32t32 -13l710 -710q9 -9 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-4 -10 -13 -19l-710 -710
303q-19 -19 -32 -13t-13 32v710q-4 -10 -13 -19z" />
304 <glyph glyph-name="step_forward" unicode="&#xf051;" horiz-adv-x="1024"
305d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q9 -9 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-4 -10 -13 -19z" />
306 <glyph glyph-name="eject" unicode="&#xf052;" horiz-adv-x="1538"
307d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" />
308 <glyph glyph-name="chevron_left" unicode="&#xf053;" horiz-adv-x="1280"
309d="M1171 1235l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45t19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45z" />
310 <glyph glyph-name="chevron_right" unicode="&#xf054;" horiz-adv-x="1280"
311d="M1107 659l-742 -742q-19 -19 -45 -19t-45 19l-166 166q-19 19 -19 45t19 45l531 531l-531 531q-19 19 -19 45t19 45l166 166q19 19 45 19t45 -19l742 -742q19 -19 19 -45t-19 -45z" />
312 <glyph glyph-name="plus_sign" unicode="&#xf055;"
313d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5
314t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
315 <glyph glyph-name="minus_sign" unicode="&#xf056;"
316d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5
317t103 -385.5z" />
318 <glyph glyph-name="remove_sign" unicode="&#xf057;"
319d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19
320q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
321 <glyph glyph-name="ok_sign" unicode="&#xf058;"
322d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103
323t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
324 <glyph glyph-name="question_sign" unicode="&#xf059;"
325d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59
326q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5
327t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
328 <glyph glyph-name="info_sign" unicode="&#xf05a;"
329d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23
330t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
331 <glyph glyph-name="screenshot" unicode="&#xf05b;"
332d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109
333q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143
334q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" />
335 <glyph glyph-name="remove_circle" unicode="&#xf05c;"
336d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23
337l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5
338t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
339 <glyph glyph-name="ok_circle" unicode="&#xf05d;"
340d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198
341t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
342 <glyph glyph-name="ban_circle" unicode="&#xf05e;"
343d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61
344t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" />
345 <glyph glyph-name="arrow_left" unicode="&#xf060;"
346d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5
347t32.5 -90.5z" />
348 <glyph glyph-name="arrow_right" unicode="&#xf061;"
349d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" />
350 <glyph glyph-name="arrow_up" unicode="&#xf062;" horiz-adv-x="1664"
351d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651
352q37 -39 37 -91z" />
353 <glyph glyph-name="arrow_down" unicode="&#xf063;" horiz-adv-x="1664"
354d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
355 <glyph glyph-name="share_alt" unicode="&#xf064;" horiz-adv-x="1792"
356d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22
357t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" />
358 <glyph glyph-name="resize_full" unicode="&#xf065;"
359d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332
360q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" />
361 <glyph glyph-name="resize_small" unicode="&#xf066;"
362d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45
363t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" />
364 <glyph glyph-name="plus" unicode="&#xf067;" horiz-adv-x="1408"
365d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" />
366 <glyph glyph-name="minus" unicode="&#xf068;" horiz-adv-x="1408"
367d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" />
368 <glyph glyph-name="asterisk" unicode="&#xf069;" horiz-adv-x="1664"
369d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154
370q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" />
371 <glyph glyph-name="exclamation_sign" unicode="&#xf06a;"
372d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192
373q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" />
374 <glyph glyph-name="gift" unicode="&#xf06b;"
375d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320
376q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5
377t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" />
378 <glyph glyph-name="leaf" unicode="&#xf06c;" horiz-adv-x="1792"
379d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268
380q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-43 0 -63.5 17.5t-45.5 59.5q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5
381t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" />
382 <glyph glyph-name="fire" unicode="&#xf06d;" horiz-adv-x="1408"
383d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1
384q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" />
385 <glyph glyph-name="eye_open" unicode="&#xf06e;" horiz-adv-x="1792"
386d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5
387t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" />
388 <glyph glyph-name="eye_close" unicode="&#xf070;" horiz-adv-x="1792"
389d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9
390q-106 -189 -316 -567t-315 -566l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5
391q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z
392" />
393 <glyph glyph-name="warning_sign" unicode="&#xf071;" horiz-adv-x="1792"
394d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185
395q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" />
396 <glyph glyph-name="plane" unicode="&#xf072;" horiz-adv-x="1408"
397d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9
398q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" />
399 <glyph glyph-name="calendar" unicode="&#xf073;" horiz-adv-x="1664"
400d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z
401M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64
402q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47
403h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
404 <glyph glyph-name="random" unicode="&#xf074;" horiz-adv-x="1792"
405d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1
406t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5
407v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111
408t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
409 <glyph glyph-name="comment" unicode="&#xf075;" horiz-adv-x="1792"
410d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281
411q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" />
412 <glyph glyph-name="magnet" unicode="&#xf076;"
413d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384
414q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" />
415 <glyph glyph-name="chevron_up" unicode="&#xf077;" horiz-adv-x="1792"
416d="M1683 205l-166 -165q-19 -19 -45 -19t-45 19l-531 531l-531 -531q-19 -19 -45 -19t-45 19l-166 165q-19 19 -19 45.5t19 45.5l742 741q19 19 45 19t45 -19l742 -741q19 -19 19 -45.5t-19 -45.5z" />
417 <glyph glyph-name="chevron_down" unicode="&#xf078;" horiz-adv-x="1792"
418d="M1683 728l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5t19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5z" />
419 <glyph glyph-name="retweet" unicode="&#xf079;" horiz-adv-x="1920"
420d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -10 7 -21
421zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z
422" />
423 <glyph glyph-name="shopping_cart" unicode="&#xf07a;" horiz-adv-x="1664"
424d="M640 0q0 -52 -38 -90t-90 -38t-90 38t-38 90t38 90t90 38t90 -38t38 -90zM1536 0q0 -52 -38 -90t-90 -38t-90 38t-38 90t38 90t90 38t90 -38t38 -90zM1664 1088v-512q0 -24 -16.5 -42.5t-40.5 -21.5l-1044 -122q13 -60 13 -70q0 -16 -24 -64h920q26 0 45 -19t19 -45
425t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 11 8 31.5t16 36t21.5 40t15.5 29.5l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t19.5 -15.5t13 -24.5t8 -26t5.5 -29.5t4.5 -26h1201q26 0 45 -19t19 -45z" />
426 <glyph glyph-name="folder_close" unicode="&#xf07b;" horiz-adv-x="1664"
427d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
428 <glyph glyph-name="folder_open" unicode="&#xf07c;" horiz-adv-x="1920"
429d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5
430t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" />
431 <glyph glyph-name="resize_vertical" unicode="&#xf07d;" horiz-adv-x="768"
432d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" />
433 <glyph glyph-name="resize_horizontal" unicode="&#xf07e;" horiz-adv-x="1792"
434d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
435 <glyph glyph-name="bar_chart" unicode="&#xf080;" horiz-adv-x="2048"
436d="M640 640v-512h-256v512h256zM1024 1152v-1024h-256v1024h256zM2048 0v-128h-2048v1536h128v-1408h1920zM1408 896v-768h-256v768h256zM1792 1280v-1152h-256v1152h256z" />
437 <glyph glyph-name="twitter_sign" unicode="&#xf081;"
438d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4
439q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5
440t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
441 <glyph glyph-name="facebook_sign" unicode="&#xf082;"
442d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-188v595h199l30 232h-229v148q0 56 23.5 84t91.5 28l122 1v207q-63 9 -178 9q-136 0 -217.5 -80t-81.5 -226v-171h-200v-232h200v-595h-532q-119 0 -203.5 84.5t-84.5 203.5v960
443q0 119 84.5 203.5t203.5 84.5h960z" />
444 <glyph glyph-name="camera_retro" unicode="&#xf083;" horiz-adv-x="1792"
445d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5
446t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280
447q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" />
448 <glyph glyph-name="key" unicode="&#xf084;" horiz-adv-x="1792"
449d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26
450l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5
451t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" />
452 <glyph glyph-name="cogs" unicode="&#xf085;" horiz-adv-x="1920"
453d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5
454t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -11 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5
455l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7
456l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -8 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31
457q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20
458t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68
459q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70
460q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" />
461 <glyph glyph-name="comments" unicode="&#xf086;" horiz-adv-x="1792"
462d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224
463q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7
464q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" />
465 <glyph glyph-name="thumbs_up_alt" unicode="&#xf087;"
466d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5
467t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769
468q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128
469q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" />
470 <glyph glyph-name="thumbs_down_alt" unicode="&#xf088;"
471d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 31 18 69q0 37 -17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5
472t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z
473M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5
474h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -73 49 -163z" />
475 <glyph glyph-name="star_half" unicode="&#xf089;" horiz-adv-x="896"
476d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" />
477 <glyph glyph-name="heart_empty" unicode="&#xf08a;" horiz-adv-x="1792"
478d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559
479q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5
480q224 0 351 -124t127 -344z" />
481 <glyph glyph-name="signout" unicode="&#xf08b;" horiz-adv-x="1664"
482d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704
483q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" />
484 <glyph glyph-name="linkedin_sign" unicode="&#xf08c;"
485d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5
486q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
487 <glyph glyph-name="pushpin" unicode="&#xf08d;" horiz-adv-x="1152"
488d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38
489t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" />
490 <glyph glyph-name="external_link" unicode="&#xf08e;" horiz-adv-x="1792"
491d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320
492q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" />
493 <glyph glyph-name="signin" unicode="&#xf090;"
494d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5
495q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" />
496 <glyph glyph-name="trophy" unicode="&#xf091;" horiz-adv-x="1664"
497d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91
498t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96
499q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" />
500 <glyph glyph-name="github_sign" unicode="&#xf092;"
501d="M519 336q4 6 -3 13q-9 7 -14 2q-4 -6 3 -13q9 -7 14 -2zM491 377q-5 7 -12 4q-6 -4 0 -12q7 -8 12 -5q6 4 0 13zM450 417q2 4 -5 8q-7 2 -8 -2q-3 -5 4 -8q8 -2 9 2zM471 394q2 1 1.5 4.5t-3.5 5.5q-6 7 -10 3t1 -11q6 -6 11 -2zM557 319q2 7 -9 11q-9 3 -13 -4
502q-2 -7 9 -11q9 -3 13 4zM599 316q0 8 -12 8q-10 0 -10 -8t11 -8t11 8zM638 323q-2 7 -13 5t-9 -9q2 -8 12 -6t10 10zM1280 640q0 212 -150 362t-362 150t-362 -150t-150 -362q0 -167 98 -300.5t252 -185.5q18 -3 26.5 5t8.5 20q0 52 -1 95q-6 -1 -15.5 -2.5t-35.5 -2t-48 4
503t-43.5 20t-29.5 41.5q-23 59 -57 74q-2 1 -4.5 3.5l-8 8t-7 9.5t4 7.5t19.5 3.5q6 0 15 -2t30 -15.5t33 -35.5q16 -28 37.5 -42t43.5 -14t38 3.5t30 9.5q7 47 33 69q-49 6 -86 18.5t-73 39t-55.5 76t-19.5 119.5q0 79 53 137q-24 62 5 136q19 6 54.5 -7.5t60.5 -29.5l26 -16
504q58 17 128 17t128 -17q11 7 28.5 18t55.5 26t57 9q29 -74 5 -136q53 -58 53 -137q0 -57 -14 -100.5t-35.5 -70t-53.5 -44.5t-62.5 -26t-68.5 -12q35 -31 35 -95q0 -40 -0.5 -89t-0.5 -51q0 -12 8.5 -20t26.5 -5q154 52 252 185.5t98 300.5zM1536 1120v-960
505q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
506 <glyph glyph-name="upload_alt" unicode="&#xf093;" horiz-adv-x="1664"
507d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92
508t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" />
509 <glyph glyph-name="lemon" unicode="&#xf094;"
510d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5
511q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44
512q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5
513q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -13 2 -25t3.5 -16.5t7.5 -20.5t8 -20q16 -40 25 -118.5t9 -136.5z" />
514 <glyph glyph-name="phone" unicode="&#xf095;" horiz-adv-x="1408"
515d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -53 3.5t-57.5 12.5t-47 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-127 79 -264 216t-216 264q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47t-12.5 57.5t-3.5 53q0 92 51 186
516q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174q2 -1 19 -11.5t24 -14
517t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" />
518 <glyph glyph-name="check_empty" unicode="&#xf096;" horiz-adv-x="1408"
519d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832
520q119 0 203.5 -84.5t84.5 -203.5z" />
521 <glyph glyph-name="bookmark_empty" unicode="&#xf097;" horiz-adv-x="1280"
522d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289
523q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
524 <glyph glyph-name="phone_sign" unicode="&#xf098;"
525d="M1280 343q0 11 -2 16t-18 16.5t-40.5 25t-47.5 26.5t-45.5 25t-28.5 15q-5 3 -19 13t-25 15t-21 5q-15 0 -36.5 -20.5t-39.5 -45t-38.5 -45t-33.5 -20.5q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170 126.5t-127 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5
526t-3.5 16.5q0 13 20.5 33.5t45 38.5t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5
527t320.5 -216.5q6 -2 30 -11t33 -12.5t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z
528" />
529 <glyph glyph-name="twitter" unicode="&#xf099;" horiz-adv-x="1664"
530d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41
531q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" />
532 <glyph glyph-name="facebook" unicode="&#xf09a;" horiz-adv-x="1024"
533d="M959 1524v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12z" />
534 <glyph glyph-name="github" unicode="&#xf09b;"
535d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -40 7t-13 30q0 3 0.5 76.5t0.5 134.5q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 119 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24
536q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-85 13.5q-45 -113 -8 -204q-79 -87 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-39 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5
537t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -88.5t0.5 -54.5q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103zM291 305q3 7 -7 12
538q-10 3 -13 -2q-3 -7 7 -12q9 -6 13 2zM322 271q7 5 -2 16q-10 9 -16 3q-7 -5 2 -16q10 -10 16 -3zM352 226q9 7 0 19q-8 13 -17 6q-9 -5 0 -18t17 -7zM394 184q8 8 -4 19q-12 12 -20 3q-9 -8 4 -19q12 -12 20 -3zM451 159q3 11 -13 16q-15 4 -19 -7t13 -15q15 -6 19 6z
539M514 154q0 13 -17 11q-16 0 -16 -11q0 -13 17 -11q16 0 16 11zM572 164q-2 11 -18 9q-16 -3 -14 -15t18 -8t14 14z" />
540 <glyph glyph-name="unlock" unicode="&#xf09c;" horiz-adv-x="1664"
541d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5
542t316.5 -131.5t131.5 -316.5z" />
543 <glyph glyph-name="credit_card" unicode="&#xf09d;" horiz-adv-x="1920"
544d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608
545q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
546 <glyph glyph-name="rss" unicode="&#xf09e;" horiz-adv-x="1408"
547d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5
548t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294
549q187 -186 294 -425.5t120 -501.5z" />
550 <glyph glyph-name="hdd" unicode="&#xf0a0;"
551d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5
552h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75
553l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" />
554 <glyph glyph-name="bullhorn" unicode="&#xf0a1;" horiz-adv-x="1792"
555d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5
556t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" />
557 <glyph glyph-name="bell" unicode="&#xf0a2;" horiz-adv-x="1792"
558d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM246 128h1300q-266 300 -266 832q0 51 -24 105t-69 103t-121.5 80.5t-169.5 31.5t-169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -532 -266 -832z
559M1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5
560t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
561 <glyph glyph-name="certificate" unicode="&#xf0a3;"
562d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70
563l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70
564l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" />
565 <glyph glyph-name="hand_right" unicode="&#xf0a4;" horiz-adv-x="1792"
566d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106
567q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43
568q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5
569t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" />
570 <glyph glyph-name="hand_left" unicode="&#xf0a5;" horiz-adv-x="1792"
571d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-8 9 -12 14q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576q-50 0 -89 -38.5
572t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45z
573M1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128q0 122 81.5 189t206.5 67
574q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" />
575 <glyph glyph-name="hand_up" unicode="&#xf0a6;"
576d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576
577q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5
578t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76
579q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" />
580 <glyph glyph-name="hand_down" unicode="&#xf0a7;"
581d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33
582t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580
583q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100
584q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" />
585 <glyph glyph-name="circle_arrow_left" unicode="&#xf0a8;"
586d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640
587q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
588 <glyph glyph-name="circle_arrow_right" unicode="&#xf0a9;"
589d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640
590q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
591 <glyph glyph-name="circle_arrow_up" unicode="&#xf0aa;"
592d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640
593q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
594 <glyph glyph-name="circle_arrow_down" unicode="&#xf0ab;"
595d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640
596q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
597 <glyph glyph-name="globe" unicode="&#xf0ac;"
598d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11
599q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 11t-9.5 10q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5
600q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5
601q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5
602t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-4 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3
603q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25
604q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5
605t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5
606t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10.5t17 -19.5q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21
607q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5
608q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3
609q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5
610t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q8 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5
611q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7
612q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5q0 -6 2 -16z" />
613 <glyph glyph-name="wrench" unicode="&#xf0ad;" horiz-adv-x="1664"
614d="M384 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1028 484l-682 -682q-37 -37 -90 -37q-52 0 -91 37l-106 108q-38 36 -38 90q0 53 38 91l681 681q39 -98 114.5 -173.5t173.5 -114.5zM1662 919q0 -39 -23 -106q-47 -134 -164.5 -217.5
615t-258.5 -83.5q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q58 0 121.5 -16.5t107.5 -46.5q16 -11 16 -28t-16 -28l-293 -169v-224l193 -107q5 3 79 48.5t135.5 81t70.5 35.5q15 0 23.5 -10t8.5 -25z" />
616 <glyph glyph-name="tasks" unicode="&#xf0ae;" horiz-adv-x="1792"
617d="M1024 128h640v128h-640v-128zM640 640h1024v128h-1024v-128zM1280 1152h384v128h-384v-128zM1792 320v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 832v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19
618t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
619 <glyph glyph-name="filter" unicode="&#xf0b0;" horiz-adv-x="1408"
620d="M1403 1241q17 -41 -14 -70l-493 -493v-742q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-256 256q-19 19 -19 45v486l-493 493q-31 29 -14 70q17 39 59 39h1280q42 0 59 -39z" />
621 <glyph glyph-name="briefcase" unicode="&#xf0b1;" horiz-adv-x="1792"
622d="M640 1280h512v128h-512v-128zM1792 640v-480q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v480h672v-160q0 -26 19 -45t45 -19h320q26 0 45 19t19 45v160h672zM1024 640v-128h-256v128h256zM1792 1120v-384h-1792v384q0 66 47 113t113 47h352v160q0 40 28 68
623t68 28h576q40 0 68 -28t28 -68v-160h352q66 0 113 -47t47 -113z" />
624 <glyph glyph-name="fullscreen" unicode="&#xf0b2;"
625d="M1283 995l-355 -355l355 -355l144 144q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l144 144l-355 355l-355 -355l144 -144q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l144 -144
626l355 355l-355 355l-144 -144q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v448q0 26 19 45t45 19h448q42 0 59 -40q17 -39 -14 -69l-144 -144l355 -355l355 355l-144 144q-31 30 -14 69q17 40 59 40h448q26 0 45 -19t19 -45v-448q0 -42 -39 -59q-13 -5 -25 -5q-26 0 -45 19z
627" />
628 <glyph glyph-name="group" unicode="&#xf0c0;" horiz-adv-x="1920"
629d="M593 640q-162 -5 -265 -128h-134q-82 0 -138 40.5t-56 118.5q0 353 124 353q6 0 43.5 -21t97.5 -42.5t119 -21.5q67 0 133 23q-5 -37 -5 -66q0 -139 81 -256zM1664 3q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5
630t43 97.5t62 81t85.5 53.5t111.5 20q10 0 43 -21.5t73 -48t107 -48t135 -21.5t135 21.5t107 48t73 48t43 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM640 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75
631t75 -181zM1344 896q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5zM1920 671q0 -78 -56 -118.5t-138 -40.5h-134q-103 123 -265 128q81 117 81 256q0 29 -5 66q66 -23 133 -23q59 0 119 21.5t97.5 42.5
632t43.5 21q124 0 124 -353zM1792 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181z" />
633 <glyph glyph-name="link" unicode="&#xf0c1;" horiz-adv-x="1664"
634d="M1456 320q0 40 -28 68l-208 208q-28 28 -68 28q-42 0 -72 -32q3 -3 19 -18.5t21.5 -21.5t15 -19t13 -25.5t3.5 -27.5q0 -40 -28 -68t-68 -28q-15 0 -27.5 3.5t-25.5 13t-19 15t-21.5 21.5t-18.5 19q-33 -31 -33 -73q0 -40 28 -68l206 -207q27 -27 68 -27q40 0 68 26
635l147 146q28 28 28 67zM753 1025q0 40 -28 68l-206 207q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l208 -208q27 -27 68 -27q42 0 72 31q-3 3 -19 18.5t-21.5 21.5t-15 19t-13 25.5t-3.5 27.5q0 40 28 68t68 28q15 0 27.5 -3.5t25.5 -13t19 -15
636t21.5 -21.5t18.5 -19q33 31 33 73zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-206 207q-83 83 -83 203q0 123 88 209l-88 88q-86 -88 -208 -88q-120 0 -204 84l-208 208q-84 84 -84 204t85 203l147 146q83 83 203 83q121 0 204 -85l206 -207
637q83 -83 83 -203q0 -123 -88 -209l88 -88q86 88 208 88q120 0 204 -84l208 -208q84 -84 84 -204z" />
638 <glyph glyph-name="cloud" unicode="&#xf0c2;" horiz-adv-x="1920"
639d="M1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088q-185 0 -316.5 131.5t-131.5 316.5q0 132 71 241.5t187 163.5q-2 28 -2 43q0 212 150 362t362 150q158 0 286.5 -88t187.5 -230q70 62 166 62q106 0 181 -75t75 -181q0 -75 -41 -138q129 -30 213 -134.5t84 -239.5z
640" />
641 <glyph glyph-name="beaker" unicode="&#xf0c3;" horiz-adv-x="1664"
642d="M1527 88q56 -89 21.5 -152.5t-140.5 -63.5h-1152q-106 0 -140.5 63.5t21.5 152.5l503 793v399h-64q-26 0 -45 19t-19 45t19 45t45 19h512q26 0 45 -19t19 -45t-19 -45t-45 -19h-64v-399zM748 813l-272 -429h712l-272 429l-20 31v37v399h-128v-399v-37z" />
643 <glyph glyph-name="cut" unicode="&#xf0c4;" horiz-adv-x="1792"
644d="M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84
645q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148
646q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108
647q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6
648q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z" />
649 <glyph glyph-name="copy" unicode="&#xf0c5;" horiz-adv-x="1792"
650d="M1696 1152q40 0 68 -28t28 -68v-1216q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v288h-544q-40 0 -68 28t-28 68v672q0 40 20 88t48 76l408 408q28 28 76 48t88 20h416q40 0 68 -28t28 -68v-328q68 40 128 40h416zM1152 939l-299 -299h299v299zM512 1323l-299 -299
651h299v299zM708 676l316 316v416h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h512v256q0 40 20 88t48 76zM1664 -128v1152h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h896z" />
652 <glyph glyph-name="paper_clip" unicode="&#xf0c6;" horiz-adv-x="1408"
653d="M1404 151q0 -117 -79 -196t-196 -79q-135 0 -235 100l-777 776q-113 115 -113 271q0 159 110 270t269 111q158 0 273 -113l605 -606q10 -10 10 -22q0 -16 -30.5 -46.5t-46.5 -30.5q-13 0 -23 10l-606 607q-79 77 -181 77q-106 0 -179 -75t-73 -181q0 -105 76 -181
654l776 -777q63 -63 145 -63q64 0 106 42t42 106q0 82 -63 145l-581 581q-26 24 -60 24q-29 0 -48 -19t-19 -48q0 -32 25 -59l410 -410q10 -10 10 -22q0 -16 -31 -47t-47 -31q-12 0 -22 10l-410 410q-63 61 -63 149q0 82 57 139t139 57q88 0 149 -63l581 -581q100 -98 100 -235
655z" />
656 <glyph glyph-name="save" unicode="&#xf0c7;"
657d="M384 0h768v384h-768v-384zM1280 0h128v896q0 14 -10 38.5t-20 34.5l-281 281q-10 10 -34 20t-39 10v-416q0 -40 -28 -68t-68 -28h-576q-40 0 -68 28t-28 68v416h-128v-1280h128v416q0 40 28 68t68 28h832q40 0 68 -28t28 -68v-416zM896 928v320q0 13 -9.5 22.5t-22.5 9.5
658h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5zM1536 896v-928q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h928q40 0 88 -20t76 -48l280 -280q28 -28 48 -76t20 -88z" />
659 <glyph glyph-name="sign_blank" unicode="&#xf0c8;"
660d="M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
661 <glyph glyph-name="reorder" unicode="&#xf0c9;"
662d="M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45
663t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
664 <glyph glyph-name="ul" unicode="&#xf0ca;" horiz-adv-x="1792"
665d="M384 128q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 640q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5
666t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1152q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z
667M1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
668 <glyph glyph-name="ol" unicode="&#xf0cb;" horiz-adv-x="1792"
669d="M381 -84q0 -80 -54.5 -126t-135.5 -46q-106 0 -172 66l57 88q49 -45 106 -45q29 0 50.5 14.5t21.5 42.5q0 64 -105 56l-26 56q8 10 32.5 43.5t42.5 54t37 38.5v1q-16 0 -48.5 -1t-48.5 -1v-53h-106v152h333v-88l-95 -115q51 -12 81 -49t30 -88zM383 543v-159h-362
670q-6 36 -6 54q0 51 23.5 93t56.5 68t66 47.5t56.5 43.5t23.5 45q0 25 -14.5 38.5t-39.5 13.5q-46 0 -81 -58l-85 59q24 51 71.5 79.5t105.5 28.5q73 0 123 -41.5t50 -112.5q0 -50 -34 -91.5t-75 -64.5t-75.5 -50.5t-35.5 -52.5h127v60h105zM1792 224v-192q0 -13 -9.5 -22.5
671t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1123v-99h-335v99h107q0 41 0.5 121.5t0.5 121.5v12h-2q-8 -17 -50 -54l-71 76l136 127h106v-404h108zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216
672q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
673 <glyph glyph-name="strikethrough" unicode="&#xf0cc;" horiz-adv-x="1792"
674d="M1760 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h1728zM483 704q-28 35 -51 80q-48 98 -48 188q0 181 134 309q133 127 393 127q50 0 167 -19q66 -12 177 -48q10 -38 21 -118q14 -123 14 -183q0 -18 -5 -45l-12 -3l-84 6
675l-14 2q-50 149 -103 205q-88 91 -210 91q-114 0 -182 -59q-67 -58 -67 -146q0 -73 66 -140t279 -129q69 -20 173 -66q58 -28 95 -52h-743zM990 448h411q7 -39 7 -92q0 -111 -41 -212q-23 -56 -71 -104q-37 -35 -109 -81q-80 -48 -153 -66q-80 -21 -203 -21q-114 0 -195 23
676l-140 40q-57 16 -72 28q-8 8 -8 22v13q0 108 -2 156q-1 30 0 68l2 37v44l102 2q15 -34 30 -71t22.5 -56t12.5 -27q35 -57 80 -94q43 -36 105 -57q59 -22 132 -22q64 0 139 27q77 26 122 86q47 61 47 129q0 84 -81 157q-34 29 -137 71z" />
677 <glyph glyph-name="underline" unicode="&#xf0cd;"
678d="M48 1313q-37 2 -45 4l-3 88q13 1 40 1q60 0 112 -4q132 -7 166 -7q86 0 168 3q116 4 146 5q56 0 86 2l-1 -14l2 -64v-9q-60 -9 -124 -9q-60 0 -79 -25q-13 -14 -13 -132q0 -13 0.5 -32.5t0.5 -25.5l1 -229l14 -280q6 -124 51 -202q35 -59 96 -92q88 -47 177 -47
679q104 0 191 28q56 18 99 51q48 36 65 64q36 56 53 114q21 73 21 229q0 79 -3.5 128t-11 122.5t-13.5 159.5l-4 59q-5 67 -24 88q-34 35 -77 34l-100 -2l-14 3l2 86h84l205 -10q76 -3 196 10l18 -2q6 -38 6 -51q0 -7 -4 -31q-45 -12 -84 -13q-73 -11 -79 -17q-15 -15 -15 -41
680q0 -7 1.5 -27t1.5 -31q8 -19 22 -396q6 -195 -15 -304q-15 -76 -41 -122q-38 -65 -112 -123q-75 -57 -182 -89q-109 -33 -255 -33q-167 0 -284 46q-119 47 -179 122q-61 76 -83 195q-16 80 -16 237v333q0 188 -17 213q-25 36 -147 39zM1536 -96v64q0 14 -9 23t-23 9h-1472
681q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h1472q14 0 23 9t9 23z" />
682 <glyph glyph-name="table" unicode="&#xf0ce;" horiz-adv-x="1664"
683d="M512 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23
684v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 160v192
685q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192
686q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1664 1248v-1088q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1344q66 0 113 -47t47 -113
687z" />
688 <glyph glyph-name="magic" unicode="&#xf0d0;" horiz-adv-x="1664"
689d="M1190 955l293 293l-107 107l-293 -293zM1637 1248q0 -27 -18 -45l-1286 -1286q-18 -18 -45 -18t-45 18l-198 198q-18 18 -18 45t18 45l1286 1286q18 18 45 18t45 -18l198 -198q18 -18 18 -45zM286 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM636 1276
690l196 -60l-196 -60l-60 -196l-60 196l-196 60l196 60l60 196zM1566 798l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM926 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98z" />
691 <glyph glyph-name="truck" unicode="&#xf0d1;" horiz-adv-x="1792"
692d="M640 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM256 640h384v256h-158q-13 0 -22 -9l-195 -195q-9 -9 -9 -22v-30zM1536 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1792 1216v-1024q0 -15 -4 -26.5t-13.5 -18.5
693t-16.5 -11.5t-23.5 -6t-22.5 -2t-25.5 0t-22.5 0.5q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-64q-3 0 -22.5 -0.5t-25.5 0t-22.5 2t-23.5 6t-16.5 11.5t-13.5 18.5t-4 26.5q0 26 19 45t45 19v320q0 8 -0.5 35t0 38
694t2.5 34.5t6.5 37t14 30.5t22.5 30l198 198q19 19 50.5 32t58.5 13h160v192q0 26 19 45t45 19h1024q26 0 45 -19t19 -45z" />
695 <glyph glyph-name="pinterest" unicode="&#xf0d2;"
696d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103q-111 0 -218 32q59 93 78 164q9 34 54 211q20 -39 73 -67.5t114 -28.5q121 0 216 68.5t147 188.5t52 270q0 114 -59.5 214t-172.5 163t-255 63q-105 0 -196 -29t-154.5 -77t-109 -110.5t-67 -129.5t-21.5 -134
697q0 -104 40 -183t117 -111q30 -12 38 20q2 7 8 31t8 30q6 23 -11 43q-51 61 -51 151q0 151 104.5 259.5t273.5 108.5q151 0 235.5 -82t84.5 -213q0 -170 -68.5 -289t-175.5 -119q-61 0 -98 43.5t-23 104.5q8 35 26.5 93.5t30 103t11.5 75.5q0 50 -27 83t-77 33
698q-62 0 -105 -57t-43 -142q0 -73 25 -122l-99 -418q-17 -70 -13 -177q-206 91 -333 281t-127 423q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
699 <glyph glyph-name="pinterest_sign" unicode="&#xf0d3;"
700d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-725q85 122 108 210q9 34 53 209q21 -39 73.5 -67t112.5 -28q181 0 295.5 147.5t114.5 373.5q0 84 -35 162.5t-96.5 139t-152.5 97t-197 36.5q-104 0 -194.5 -28.5t-153 -76.5
701t-107.5 -109.5t-66.5 -128t-21.5 -132.5q0 -102 39.5 -180t116.5 -110q13 -5 23.5 0t14.5 19q10 44 15 61q6 23 -11 42q-50 62 -50 150q0 150 103.5 256.5t270.5 106.5q149 0 232.5 -81t83.5 -210q0 -168 -67.5 -286t-173.5 -118q-60 0 -97 43.5t-23 103.5q8 34 26.5 92.5
702t29.5 102t11 74.5q0 49 -26.5 81.5t-75.5 32.5q-61 0 -103.5 -56.5t-42.5 -139.5q0 -72 24 -121l-98 -414q-24 -100 -7 -254h-183q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960z" />
703 <glyph glyph-name="google_plus_sign" unicode="&#xf0d4;"
704d="M917 631q0 26 -6 64h-362v-132h217q-3 -24 -16.5 -50t-37.5 -53t-66.5 -44.5t-96.5 -17.5q-99 0 -169 71t-70 171t70 171t169 71q92 0 153 -59l104 101q-108 100 -257 100q-160 0 -272 -112.5t-112 -271.5t112 -271.5t272 -112.5q165 0 266.5 105t101.5 270zM1262 585
705h109v110h-109v110h-110v-110h-110v-110h110v-110h110v110zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
706 <glyph glyph-name="google_plus" unicode="&#xf0d5;" horiz-adv-x="2304"
707d="M1437 623q0 -208 -87 -370.5t-248 -254t-369 -91.5q-149 0 -285 58t-234 156t-156 234t-58 285t58 285t156 234t234 156t285 58q286 0 491 -192l-199 -191q-117 113 -292 113q-123 0 -227.5 -62t-165.5 -168.5t-61 -232.5t61 -232.5t165.5 -168.5t227.5 -62
708q83 0 152.5 23t114.5 57.5t78.5 78.5t49 83t21.5 74h-416v252h692q12 -63 12 -122zM2304 745v-210h-209v-209h-210v209h-209v210h209v209h210v-209h209z" />
709 <glyph glyph-name="money" unicode="&#xf0d6;" horiz-adv-x="1920"
710d="M768 384h384v96h-128v448h-114l-148 -137l77 -80q42 37 55 57h2v-288h-128v-96zM1280 640q0 -70 -21 -142t-59.5 -134t-101.5 -101t-138 -39t-138 39t-101.5 101t-59.5 134t-21 142t21 142t59.5 134t101.5 101t138 39t138 -39t101.5 -101t59.5 -134t21 -142zM1792 384
711v512q-106 0 -181 75t-75 181h-1152q0 -106 -75 -181t-181 -75v-512q106 0 181 -75t75 -181h1152q0 106 75 181t181 75zM1920 1216v-1152q0 -26 -19 -45t-45 -19h-1792q-26 0 -45 19t-19 45v1152q0 26 19 45t45 19h1792q26 0 45 -19t19 -45z" />
712 <glyph glyph-name="caret_down" unicode="&#xf0d7;" horiz-adv-x="1024"
713d="M1024 832q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
714 <glyph glyph-name="caret_up" unicode="&#xf0d8;" horiz-adv-x="1024"
715d="M1024 320q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
716 <glyph glyph-name="caret_left" unicode="&#xf0d9;" horiz-adv-x="640"
717d="M640 1088v-896q0 -26 -19 -45t-45 -19t-45 19l-448 448q-19 19 -19 45t19 45l448 448q19 19 45 19t45 -19t19 -45z" />
718 <glyph glyph-name="caret_right" unicode="&#xf0da;" horiz-adv-x="640"
719d="M576 640q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19t-19 45v896q0 26 19 45t45 19t45 -19l448 -448q19 -19 19 -45z" />
720 <glyph glyph-name="columns" unicode="&#xf0db;" horiz-adv-x="1664"
721d="M160 0h608v1152h-640v-1120q0 -13 9.5 -22.5t22.5 -9.5zM1536 32v1120h-640v-1152h608q13 0 22.5 9.5t9.5 22.5zM1664 1248v-1216q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1344q66 0 113 -47t47 -113z" />
722 <glyph glyph-name="sort" unicode="&#xf0dc;" horiz-adv-x="1024"
723d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45zM1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
724 <glyph glyph-name="sort_down" unicode="&#xf0dd;" horiz-adv-x="1024"
725d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
726 <glyph glyph-name="sort_up" unicode="&#xf0de;" horiz-adv-x="1024"
727d="M1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
728 <glyph glyph-name="envelope_alt" unicode="&#xf0e0;" horiz-adv-x="1792"
729d="M1792 826v-794q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v794q44 -49 101 -87q362 -246 497 -345q57 -42 92.5 -65.5t94.5 -48t110 -24.5h1h1q51 0 110 24.5t94.5 48t92.5 65.5q170 123 498 345q57 39 100 87zM1792 1120q0 -79 -49 -151t-122 -123
730q-376 -261 -468 -325q-10 -7 -42.5 -30.5t-54 -38t-52 -32.5t-57.5 -27t-50 -9h-1h-1q-23 0 -50 9t-57.5 27t-52 32.5t-54 38t-42.5 30.5q-91 64 -262 182.5t-205 142.5q-62 42 -117 115.5t-55 136.5q0 78 41.5 130t118.5 52h1472q65 0 112.5 -47t47.5 -113z" />
731 <glyph glyph-name="linkedin" unicode="&#xf0e1;"
732d="M349 911v-991h-330v991h330zM370 1217q1 -73 -50.5 -122t-135.5 -49h-2q-82 0 -132 49t-50 122q0 74 51.5 122.5t134.5 48.5t133 -48.5t51 -122.5zM1536 488v-568h-329v530q0 105 -40.5 164.5t-126.5 59.5q-63 0 -105.5 -34.5t-63.5 -85.5q-11 -30 -11 -81v-553h-329
733q2 399 2 647t-1 296l-1 48h329v-144h-2q20 32 41 56t56.5 52t87 43.5t114.5 15.5q171 0 275 -113.5t104 -332.5z" />
734 <glyph glyph-name="undo" unicode="&#xf0e2;"
735d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5
736t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z" />
737 <glyph glyph-name="legal" unicode="&#xf0e3;" horiz-adv-x="1792"
738d="M1771 0q0 -53 -37 -90l-107 -108q-39 -37 -91 -37q-53 0 -90 37l-363 364q-38 36 -38 90q0 53 43 96l-256 256l-126 -126q-14 -14 -34 -14t-34 14q2 -2 12.5 -12t12.5 -13t10 -11.5t10 -13.5t6 -13.5t5.5 -16.5t1.5 -18q0 -38 -28 -68q-3 -3 -16.5 -18t-19 -20.5
739t-18.5 -16.5t-22 -15.5t-22 -9t-26 -4.5q-40 0 -68 28l-408 408q-28 28 -28 68q0 13 4.5 26t9 22t15.5 22t16.5 18.5t20.5 19t18 16.5q30 28 68 28q10 0 18 -1.5t16.5 -5.5t13.5 -6t13.5 -10t11.5 -10t13 -12.5t12 -12.5q-14 14 -14 34t14 34l348 348q14 14 34 14t34 -14
740q-2 2 -12.5 12t-12.5 13t-10 11.5t-10 13.5t-6 13.5t-5.5 16.5t-1.5 18q0 38 28 68q3 3 16.5 18t19 20.5t18.5 16.5t22 15.5t22 9t26 4.5q40 0 68 -28l408 -408q28 -28 28 -68q0 -13 -4.5 -26t-9 -22t-15.5 -22t-16.5 -18.5t-20.5 -19t-18 -16.5q-30 -28 -68 -28
741q-10 0 -18 1.5t-16.5 5.5t-13.5 6t-13.5 10t-11.5 10t-13 12.5t-12 12.5q14 -14 14 -34t-14 -34l-126 -126l256 -256q43 43 96 43q52 0 91 -37l363 -363q37 -39 37 -91z" />
742 <glyph glyph-name="dashboard" unicode="&#xf0e4;" horiz-adv-x="1792"
743d="M384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM576 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1004 351l101 382q6 26 -7.5 48.5t-38.5 29.5
744t-48 -6.5t-30 -39.5l-101 -382q-60 -5 -107 -43.5t-63 -98.5q-20 -77 20 -146t117 -89t146 20t89 117q16 60 -6 117t-72 91zM1664 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 1024q0 53 -37.5 90.5
745t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1472 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 384q0 -261 -141 -483q-19 -29 -54 -29h-1402q-35 0 -54 29
746q-141 221 -141 483q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
747 <glyph glyph-name="comment_alt" unicode="&#xf0e5;" horiz-adv-x="1792"
748d="M896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640
749q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 174 120 321.5
750t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" />
751 <glyph glyph-name="comments_alt" unicode="&#xf0e6;" horiz-adv-x="1792"
752d="M704 1152q-153 0 -286 -52t-211.5 -141t-78.5 -191q0 -82 53 -158t149 -132l97 -56l-35 -84q34 20 62 39l44 31l53 -10q78 -14 153 -14q153 0 286 52t211.5 141t78.5 191t-78.5 191t-211.5 141t-286 52zM704 1280q191 0 353.5 -68.5t256.5 -186.5t94 -257t-94 -257
753t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224q0 139 94 257t256.5 186.5
754t353.5 68.5zM1526 111q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129
755q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5z" />
756 <glyph glyph-name="bolt" unicode="&#xf0e7;" horiz-adv-x="896"
757d="M885 970q18 -20 7 -44l-540 -1157q-13 -25 -42 -25q-4 0 -14 2q-17 5 -25.5 19t-4.5 30l197 808l-406 -101q-4 -1 -12 -1q-18 0 -31 11q-18 15 -13 39l201 825q4 14 16 23t28 9h328q19 0 32 -12.5t13 -29.5q0 -8 -5 -18l-171 -463l396 98q8 2 12 2q19 0 34 -15z" />
758 <glyph glyph-name="sitemap" unicode="&#xf0e8;" horiz-adv-x="1792"
759d="M1792 288v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320
760q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192q0 52 38 90t90 38h512v192h-96q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-96v-192h512q52 0 90 -38t38 -90v-192h96q40 0 68 -28t28 -68
761z" />
762 <glyph glyph-name="umbrella" unicode="&#xf0e9;" horiz-adv-x="1664"
763d="M896 708v-580q0 -104 -76 -180t-180 -76t-180 76t-76 180q0 26 19 45t45 19t45 -19t19 -45q0 -50 39 -89t89 -39t89 39t39 89v580q33 11 64 11t64 -11zM1664 681q0 -13 -9.5 -22.5t-22.5 -9.5q-11 0 -23 10q-49 46 -93 69t-102 23q-68 0 -128 -37t-103 -97
764q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -28 -17q-18 0 -29 17q-4 6 -14.5 24t-17.5 28q-43 60 -102.5 97t-127.5 37t-127.5 -37t-102.5 -97q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -29 -17q-17 0 -28 17q-4 6 -14.5 24t-17.5 28q-43 60 -103 97t-128 37q-58 0 -102 -23t-93 -69
765q-12 -10 -23 -10q-13 0 -22.5 9.5t-9.5 22.5q0 5 1 7q45 183 172.5 319.5t298 204.5t360.5 68q140 0 274.5 -40t246.5 -113.5t194.5 -187t115.5 -251.5q1 -2 1 -7zM896 1408v-98q-42 2 -64 2t-64 -2v98q0 26 19 45t45 19t45 -19t19 -45z" />
766 <glyph glyph-name="paste" unicode="&#xf0ea;" horiz-adv-x="1792"
767d="M768 -128h896v640h-416q-40 0 -68 28t-28 68v416h-384v-1152zM1024 1312v64q0 13 -9.5 22.5t-22.5 9.5h-704q-13 0 -22.5 -9.5t-9.5 -22.5v-64q0 -13 9.5 -22.5t22.5 -9.5h704q13 0 22.5 9.5t9.5 22.5zM1280 640h299l-299 299v-299zM1792 512v-672q0 -40 -28 -68t-68 -28
768h-960q-40 0 -68 28t-28 68v160h-544q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1088q40 0 68 -28t28 -68v-328q21 -13 36 -28l408 -408q28 -28 48 -76t20 -88z" />
769 <glyph glyph-name="light_bulb" unicode="&#xf0eb;" horiz-adv-x="1024"
770d="M736 960q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5q0 46 -54 71t-106 25q-13 0 -22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5q50 0 99.5 -16t87 -54t37.5 -90zM896 960q0 72 -34.5 134t-90 101.5t-123 62t-136.5 22.5t-136.5 -22.5t-123 -62t-90 -101.5t-34.5 -134
771q0 -101 68 -180q10 -11 30.5 -33t30.5 -33q128 -153 141 -298h228q13 145 141 298q10 11 30.5 33t30.5 33q68 79 68 180zM1024 960q0 -155 -103 -268q-45 -49 -74.5 -87t-59.5 -95.5t-34 -107.5q47 -28 47 -82q0 -37 -25 -64q25 -27 25 -64q0 -52 -45 -81q13 -23 13 -47
772q0 -46 -31.5 -71t-77.5 -25q-20 -44 -60 -70t-87 -26t-87 26t-60 70q-46 0 -77.5 25t-31.5 71q0 24 13 47q-45 29 -45 81q0 37 25 64q-25 27 -25 64q0 54 47 82q-4 50 -34 107.5t-59.5 95.5t-74.5 87q-103 113 -103 268q0 99 44.5 184.5t117 142t164 89t186.5 32.5
773t186.5 -32.5t164 -89t117 -142t44.5 -184.5z" />
774 <glyph glyph-name="exchange" unicode="&#xf0ec;" horiz-adv-x="1792"
775d="M1792 352v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5q-12 0 -24 10l-319 320q-9 9 -9 22q0 14 9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h1376q13 0 22.5 -9.5t9.5 -22.5zM1792 896q0 -14 -9 -23l-320 -320q-9 -9 -23 -9
776q-13 0 -22.5 9.5t-9.5 22.5v192h-1376q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1376v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
777 <glyph glyph-name="cloud_download" unicode="&#xf0ed;" horiz-adv-x="1920"
778d="M1280 608q0 14 -9 23t-23 9h-224v352q0 13 -9.5 22.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-352h-224q-13 0 -22.5 -9.5t-9.5 -22.5q0 -14 9 -23l352 -352q9 -9 23 -9t23 9l351 351q10 12 10 24zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088
779q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
780 <glyph glyph-name="cloud_upload" unicode="&#xf0ee;" horiz-adv-x="1920"
781d="M1280 672q0 14 -9 23l-352 352q-9 9 -23 9t-23 -9l-351 -351q-10 -12 -10 -24q0 -14 9 -23t23 -9h224v-352q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5v352h224q13 0 22.5 9.5t9.5 22.5zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088
782q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
783 <glyph glyph-name="user_md" unicode="&#xf0f0;" horiz-adv-x="1408"
784d="M384 192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 68 5.5 131t24 138t47.5 132.5t81 103t120 60.5q-22 -52 -22 -120v-203q-58 -20 -93 -70t-35 -111q0 -80 56 -136t136 -56
785t136 56t56 136q0 61 -35.5 111t-92.5 70v203q0 62 25 93q132 -104 295 -104t295 104q25 -31 25 -93v-64q-106 0 -181 -75t-75 -181v-89q-32 -29 -32 -71q0 -40 28 -68t68 -28t68 28t28 68q0 42 -32 71v89q0 52 38 90t90 38t90 -38t38 -90v-89q-32 -29 -32 -71q0 -40 28 -68
786t68 -28t68 28t28 68q0 42 -32 71v89q0 68 -34.5 127.5t-93.5 93.5q0 10 0.5 42.5t0 48t-2.5 41.5t-7 47t-13 40q68 -15 120 -60.5t81 -103t47.5 -132.5t24 -138t5.5 -131zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5
787t271.5 -112.5t112.5 -271.5z" />
788 <glyph glyph-name="stethoscope" unicode="&#xf0f1;" horiz-adv-x="1408"
789d="M1280 832q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 832q0 -62 -35.5 -111t-92.5 -70v-395q0 -159 -131.5 -271.5t-316.5 -112.5t-316.5 112.5t-131.5 271.5v132q-164 20 -274 128t-110 252v512q0 26 19 45t45 19q6 0 16 -2q17 30 47 48
790t65 18q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5q-33 0 -64 18v-402q0 -106 94 -181t226 -75t226 75t94 181v402q-31 -18 -64 -18q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q35 0 65 -18t47 -48q10 2 16 2q26 0 45 -19t19 -45v-512q0 -144 -110 -252
791t-274 -128v-132q0 -106 94 -181t226 -75t226 75t94 181v395q-57 21 -92.5 70t-35.5 111q0 80 56 136t136 56t136 -56t56 -136z" />
792 <glyph glyph-name="suitcase" unicode="&#xf0f2;" horiz-adv-x="1792"
793d="M640 1152h512v128h-512v-128zM288 1152v-1280h-64q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h64zM1408 1152v-1280h-1024v1280h128v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h128zM1792 928v-832q0 -92 -66 -158t-158 -66h-64v1280h64q92 0 158 -66
794t66 -158z" />
795 <glyph glyph-name="bell_alt" unicode="&#xf0f3;" horiz-adv-x="1792"
796d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5
797t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
798 <glyph glyph-name="coffee" unicode="&#xf0f4;" horiz-adv-x="1920"
799d="M1664 896q0 80 -56 136t-136 56h-64v-384h64q80 0 136 56t56 136zM0 128h1792q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM1856 896q0 -159 -112.5 -271.5t-271.5 -112.5h-64v-32q0 -92 -66 -158t-158 -66h-704q-92 0 -158 66t-66 158v736q0 26 19 45
800t45 19h1152q159 0 271.5 -112.5t112.5 -271.5z" />
801 <glyph glyph-name="food" unicode="&#xf0f5;" horiz-adv-x="1408"
802d="M640 1472v-640q0 -61 -35.5 -111t-92.5 -70v-779q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v779q-57 20 -92.5 70t-35.5 111v640q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45
803t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45zM1408 1472v-1600q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v512h-224q-13 0 -22.5 9.5t-9.5 22.5v800q0 132 94 226t226 94h256q26 0 45 -19t19 -45z" />
804 <glyph glyph-name="file_text_alt" unicode="&#xf0f6;"
805d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z
806M384 736q0 14 9 23t23 9h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64zM1120 512q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704zM1120 256q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704
807q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704z" />
808 <glyph glyph-name="building" unicode="&#xf0f7;" horiz-adv-x="1408"
809d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
810M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
811M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
812M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
813M1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
814M640 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
815M1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
816M640 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
817M896 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
818M896 -128h384v1536h-1152v-1536h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM1408 1472v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280q26 0 45 -19t19 -45z" />
819 <glyph glyph-name="hospital" unicode="&#xf0f8;" horiz-adv-x="1408"
820d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
821M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
822M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
823M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
824M896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z
825M896 -128h384v1152h-256v-32q0 -40 -28 -68t-68 -28h-448q-40 0 -68 28t-28 68v32h-256v-1152h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM896 1056v320q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-96h-128v96q0 13 -9.5 22.5
826t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v96h128v-96q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1408 1088v-1280q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1280q0 26 19 45t45 19h320
827v288q0 40 28 68t68 28h448q40 0 68 -28t28 -68v-288h320q26 0 45 -19t19 -45z" />
828 <glyph glyph-name="ambulance" unicode="&#xf0f9;" horiz-adv-x="1920"
829d="M640 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM256 640h384v256h-158q-14 -2 -22 -9l-195 -195q-7 -12 -9 -22v-30zM1536 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5
830t90.5 37.5t37.5 90.5zM1664 800v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM1920 1344v-1152
831q0 -26 -19 -45t-45 -19h-192q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-128q-26 0 -45 19t-19 45t19 45t45 19v416q0 26 13 58t32 51l198 198q19 19 51 32t58 13h160v320q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
832 <glyph glyph-name="medkit" unicode="&#xf0fa;" horiz-adv-x="1792"
833d="M1280 416v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM640 1152h512v128h-512v-128zM256 1152v-1280h-32
834q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h32zM1440 1152v-1280h-1088v1280h160v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h160zM1792 928v-832q0 -92 -66 -158t-158 -66h-32v1280h32q92 0 158 -66t66 -158z" />
835 <glyph glyph-name="fighter_jet" unicode="&#xf0fb;" horiz-adv-x="1920"
836d="M1920 576q-1 -32 -288 -96l-352 -32l-224 -64h-64l-293 -352h69q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-96h-160h-64v32h64v416h-160l-192 -224h-96l-32 32v192h32v32h128v8l-192 24v128l192 24v8h-128v32h-32v192l32 32h96l192 -224h160v416h-64v32h64h160h96
837q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-69l293 -352h64l224 -64l352 -32q128 -28 200 -52t80 -34z" />
838 <glyph glyph-name="beer" unicode="&#xf0fc;" horiz-adv-x="1664"
839d="M640 640v384h-256v-256q0 -53 37.5 -90.5t90.5 -37.5h128zM1664 192v-192h-1152v192l128 192h-128q-159 0 -271.5 112.5t-112.5 271.5v320l-64 64l32 128h480l32 128h960l32 -192l-64 -32v-800z" />
840 <glyph glyph-name="h_sign" unicode="&#xf0fd;"
841d="M1280 192v896q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-512v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-896q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h512v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1536 1120v-960
842q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
843 <glyph glyph-name="f0fe" unicode="&#xf0fe;"
844d="M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960
845q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
846 <glyph glyph-name="double_angle_left" unicode="&#xf100;" horiz-adv-x="1024"
847d="M627 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23zM1011 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23
848t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23z" />
849 <glyph glyph-name="double_angle_right" unicode="&#xf101;" horiz-adv-x="1024"
850d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM979 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23
851l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
852 <glyph glyph-name="double_angle_up" unicode="&#xf102;" horiz-adv-x="1152"
853d="M1075 224q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM1075 608q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393
854q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
855 <glyph glyph-name="double_angle_down" unicode="&#xf103;" horiz-adv-x="1152"
856d="M1075 672q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23zM1075 1056q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23
857t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
858 <glyph glyph-name="angle_left" unicode="&#xf104;" horiz-adv-x="640"
859d="M627 992q0 -13 -10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
860 <glyph glyph-name="angle_right" unicode="&#xf105;" horiz-adv-x="640"
861d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
862 <glyph glyph-name="angle_up" unicode="&#xf106;" horiz-adv-x="1152"
863d="M1075 352q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
864 <glyph glyph-name="angle_down" unicode="&#xf107;" horiz-adv-x="1152"
865d="M1075 800q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
866 <glyph glyph-name="desktop" unicode="&#xf108;" horiz-adv-x="1920"
867d="M1792 544v832q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1376v-1088q0 -66 -47 -113t-113 -47h-544q0 -37 16 -77.5t32 -71t16 -43.5q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19
868t-19 45q0 14 16 44t32 70t16 78h-544q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
869 <glyph glyph-name="laptop" unicode="&#xf109;" horiz-adv-x="1920"
870d="M416 256q-66 0 -113 47t-47 113v704q0 66 47 113t113 47h1088q66 0 113 -47t47 -113v-704q0 -66 -47 -113t-113 -47h-1088zM384 1120v-704q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5v704q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5z
871M1760 192h160v-96q0 -40 -47 -68t-113 -28h-1600q-66 0 -113 28t-47 68v96h160h1600zM1040 96q16 0 16 16t-16 16h-160q-16 0 -16 -16t16 -16h160z" />
872 <glyph glyph-name="tablet" unicode="&#xf10a;" horiz-adv-x="1152"
873d="M640 128q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1024 288v960q0 13 -9.5 22.5t-22.5 9.5h-832q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h832q13 0 22.5 9.5t9.5 22.5zM1152 1248v-1088q0 -66 -47 -113t-113 -47h-832
874q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h832q66 0 113 -47t47 -113z" />
875 <glyph glyph-name="mobile_phone" unicode="&#xf10b;" horiz-adv-x="768"
876d="M464 128q0 33 -23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5t56.5 23.5t23.5 56.5zM672 288v704q0 13 -9.5 22.5t-22.5 9.5h-512q-13 0 -22.5 -9.5t-9.5 -22.5v-704q0 -13 9.5 -22.5t22.5 -9.5h512q13 0 22.5 9.5t9.5 22.5zM480 1136
877q0 16 -16 16h-160q-16 0 -16 -16t16 -16h160q16 0 16 16zM768 1152v-1024q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v1024q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
878 <glyph glyph-name="circle_blank" unicode="&#xf10c;"
879d="M768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103
880t279.5 -279.5t103 -385.5z" />
881 <glyph glyph-name="quote_left" unicode="&#xf10d;" horiz-adv-x="1664"
882d="M768 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z
883M1664 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z" />
884 <glyph glyph-name="quote_right" unicode="&#xf10e;" horiz-adv-x="1664"
885d="M768 1216v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136zM1664 1216
886v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136z" />
887 <glyph glyph-name="spinner" unicode="&#xf110;" horiz-adv-x="1792"
888d="M526 142q0 -53 -37.5 -90.5t-90.5 -37.5q-52 0 -90 38t-38 90q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 -64q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM320 640q0 -53 -37.5 -90.5t-90.5 -37.5
889t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1522 142q0 -52 -38 -90t-90 -38q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM558 1138q0 -66 -47 -113t-113 -47t-113 47t-47 113t47 113t113 47t113 -47t47 -113z
890M1728 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1088 1344q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1618 1138q0 -93 -66 -158.5t-158 -65.5q-93 0 -158.5 65.5t-65.5 158.5
891q0 92 65.5 158t158.5 66q92 0 158 -66t66 -158z" />
892 <glyph glyph-name="circle" unicode="&#xf111;"
893d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
894 <glyph glyph-name="reply" unicode="&#xf112;" horiz-adv-x="1792"
895d="M1792 416q0 -166 -127 -451q-3 -7 -10.5 -24t-13.5 -30t-13 -22q-12 -17 -28 -17q-15 0 -23.5 10t-8.5 25q0 9 2.5 26.5t2.5 23.5q5 68 5 123q0 101 -17.5 181t-48.5 138.5t-80 101t-105.5 69.5t-133 42.5t-154 21.5t-175.5 6h-224v-256q0 -26 -19 -45t-45 -19t-45 19
896l-512 512q-19 19 -19 45t19 45l512 512q19 19 45 19t45 -19t19 -45v-256h224q713 0 875 -403q53 -134 53 -333z" />
897 <glyph glyph-name="github_alt" unicode="&#xf113;" horiz-adv-x="1664"
898d="M640 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1280 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1440 320
899q0 120 -69 204t-187 84q-41 0 -195 -21q-71 -11 -157 -11t-157 11q-152 21 -195 21q-118 0 -187 -84t-69 -204q0 -88 32 -153.5t81 -103t122 -60t140 -29.5t149 -7h168q82 0 149 7t140 29.5t122 60t81 103t32 153.5zM1664 496q0 -207 -61 -331q-38 -77 -105.5 -133t-141 -86
900t-170 -47.5t-171.5 -22t-167 -4.5q-78 0 -142 3t-147.5 12.5t-152.5 30t-137 51.5t-121 81t-86 115q-62 123 -62 331q0 237 136 396q-27 82 -27 170q0 116 51 218q108 0 190 -39.5t189 -123.5q147 35 309 35q148 0 280 -32q105 82 187 121t189 39q51 -102 51 -218
901q0 -87 -27 -168q136 -160 136 -398z" />
902 <glyph glyph-name="folder_close_alt" unicode="&#xf114;" horiz-adv-x="1664"
903d="M1536 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68v-960q0 -40 28 -68t68 -28h1216q40 0 68 28t28 68zM1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320
904q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
905 <glyph glyph-name="folder_open_alt" unicode="&#xf115;" horiz-adv-x="1920"
906d="M1781 605q0 35 -53 35h-1088q-40 0 -85.5 -21.5t-71.5 -52.5l-294 -363q-18 -24 -18 -40q0 -35 53 -35h1088q40 0 86 22t71 53l294 363q18 22 18 39zM640 768h768v160q0 40 -28 68t-68 28h-576q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68
907v-853l256 315q44 53 116 87.5t140 34.5zM1909 605q0 -62 -46 -120l-295 -363q-43 -53 -116 -87.5t-140 -34.5h-1088q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h192q54 0 99 -24.5t67 -70.5q15 -32 15 -68z
908" />
909 <glyph glyph-name="expand_alt" unicode="&#xf116;" horiz-adv-x="1792"
910 />
911 <glyph glyph-name="collapse_alt" unicode="&#xf117;" horiz-adv-x="1792"
912 />
913 <glyph glyph-name="smile" unicode="&#xf118;"
914d="M1134 461q-37 -121 -138 -195t-228 -74t-228 74t-138 195q-8 25 4 48.5t38 31.5q25 8 48.5 -4t31.5 -38q25 -80 92.5 -129.5t151.5 -49.5t151.5 49.5t92.5 129.5q8 26 32 38t49 4t37 -31.5t4 -48.5zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5
915t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5
916t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
917 <glyph glyph-name="frown" unicode="&#xf119;"
918d="M1134 307q8 -25 -4 -48.5t-37 -31.5t-49 4t-32 38q-25 80 -92.5 129.5t-151.5 49.5t-151.5 -49.5t-92.5 -129.5q-8 -26 -31.5 -38t-48.5 -4q-26 8 -38 31.5t-4 48.5q37 121 138 195t228 74t228 -74t138 -195zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5
919t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204
920t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
921 <glyph glyph-name="meh" unicode="&#xf11a;"
922d="M1152 448q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h640q26 0 45 -19t19 -45zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5
923t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640
924q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
925 <glyph glyph-name="gamepad" unicode="&#xf11b;" horiz-adv-x="1920"
926d="M832 448v128q0 14 -9 23t-23 9h-192v192q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-192h-192q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h192v-192q0 -14 9 -23t23 -9h128q14 0 23 9t9 23v192h192q14 0 23 9t9 23zM1408 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5
927t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1920 512q0 -212 -150 -362t-362 -150q-192 0 -338 128h-220q-146 -128 -338 -128q-212 0 -362 150
928t-150 362t150 362t362 150h896q212 0 362 -150t150 -362z" />
929 <glyph glyph-name="keyboard" unicode="&#xf11c;" horiz-adv-x="1920"
930d="M384 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM512 624v-96q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h224q16 0 16 -16zM384 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 368v-96q0 -16 -16 -16
931h-864q-16 0 -16 16v96q0 16 16 16h864q16 0 16 -16zM768 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM640 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1024 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16
932h96q16 0 16 -16zM896 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1280 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1152 880v-96
933q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 880v-352q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h112v240q0 16 16 16h96q16 0 16 -16zM1792 128v896h-1664v-896
934h1664zM1920 1024v-896q0 -53 -37.5 -90.5t-90.5 -37.5h-1664q-53 0 -90.5 37.5t-37.5 90.5v896q0 53 37.5 90.5t90.5 37.5h1664q53 0 90.5 -37.5t37.5 -90.5z" />
935 <glyph glyph-name="flag_alt" unicode="&#xf11d;" horiz-adv-x="1792"
936d="M1664 491v616q-169 -91 -306 -91q-82 0 -145 32q-100 49 -184 76.5t-178 27.5q-173 0 -403 -127v-599q245 113 433 113q55 0 103.5 -7.5t98 -26t77 -31t82.5 -39.5l28 -14q44 -22 101 -22q120 0 293 92zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9
937h-64q-14 0 -23 9t-9 23v1266q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102
938q-15 -9 -33 -9q-16 0 -32 8q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
939 <glyph glyph-name="flag_checkered" unicode="&#xf11e;" horiz-adv-x="1792"
940d="M832 536v192q-181 -16 -384 -117v-185q205 96 384 110zM832 954v197q-172 -8 -384 -126v-189q215 111 384 118zM1664 491v184q-235 -116 -384 -71v224q-20 6 -39 15q-5 3 -33 17t-34.5 17t-31.5 15t-34.5 15.5t-32.5 13t-36 12.5t-35 8.5t-39.5 7.5t-39.5 4t-44 2
941q-23 0 -49 -3v-222h19q102 0 192.5 -29t197.5 -82q19 -9 39 -15v-188q42 -17 91 -17q120 0 293 92zM1664 918v189q-169 -91 -306 -91q-45 0 -78 8v-196q148 -42 384 90zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v1266
942q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102q-15 -9 -33 -9q-16 0 -32 8
943q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
944 <glyph glyph-name="terminal" unicode="&#xf120;" horiz-adv-x="1664"
945d="M585 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23zM1664 96v-64q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h960q14 0 23 -9
946t9 -23z" />
947 <glyph glyph-name="code" unicode="&#xf121;" horiz-adv-x="1920"
948d="M617 137l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23zM1208 1204l-373 -1291q-4 -13 -15.5 -19.5t-23.5 -2.5l-62 17q-13 4 -19.5 15.5t-2.5 24.5
949l373 1291q4 13 15.5 19.5t23.5 2.5l62 -17q13 -4 19.5 -15.5t2.5 -24.5zM1865 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23z" />
950 <glyph glyph-name="reply_all" unicode="&#xf122;" horiz-adv-x="1792"
951d="M640 454v-70q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-69l-397 -398q-19 -19 -19 -45t19 -45zM1792 416q0 -58 -17 -133.5t-38.5 -138t-48 -125t-40.5 -90.5l-20 -40q-8 -17 -28 -17q-6 0 -9 1
952q-25 8 -23 34q43 400 -106 565q-64 71 -170.5 110.5t-267.5 52.5v-251q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-262q411 -28 599 -221q169 -173 169 -509z" />
953 <glyph glyph-name="star_half_empty" unicode="&#xf123;" horiz-adv-x="1664"
954d="M1186 579l257 250l-356 52l-66 10l-30 60l-159 322v-963l59 -31l318 -168l-60 355l-12 66zM1638 841l-363 -354l86 -500q5 -33 -6 -51.5t-34 -18.5q-17 0 -40 12l-449 236l-449 -236q-23 -12 -40 -12q-23 0 -34 18.5t-6 51.5l86 500l-364 354q-32 32 -23 59.5t54 34.5
955l502 73l225 455q20 41 49 41q28 0 49 -41l225 -455l502 -73q45 -7 54 -34.5t-24 -59.5z" />
956 <glyph glyph-name="location_arrow" unicode="&#xf124;" horiz-adv-x="1408"
957d="M1401 1187l-640 -1280q-17 -35 -57 -35q-5 0 -15 2q-22 5 -35.5 22.5t-13.5 39.5v576h-576q-22 0 -39.5 13.5t-22.5 35.5t4 42t29 30l1280 640q13 7 29 7q27 0 45 -19q15 -14 18.5 -34.5t-6.5 -39.5z" />
958 <glyph glyph-name="crop" unicode="&#xf125;" horiz-adv-x="1664"
959d="M557 256h595v595zM512 301l595 595h-595v-595zM1664 224v-192q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v224h-864q-14 0 -23 9t-9 23v864h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224v224q0 14 9 23t23 9h192q14 0 23 -9t9 -23
960v-224h851l246 247q10 9 23 9t23 -9q9 -10 9 -23t-9 -23l-247 -246v-851h224q14 0 23 -9t9 -23z" />
961 <glyph glyph-name="code_fork" unicode="&#xf126;" horiz-adv-x="1024"
962d="M288 64q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM288 1216q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM928 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1024 1088q0 -52 -26 -96.5t-70 -69.5
963q-2 -287 -226 -414q-67 -38 -203 -81q-128 -40 -169.5 -71t-41.5 -100v-26q44 -25 70 -69.5t26 -96.5q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 52 26 96.5t70 69.5v820q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136q0 -52 -26 -96.5t-70 -69.5v-497
964q54 26 154 57q55 17 87.5 29.5t70.5 31t59 39.5t40.5 51t28 69.5t8.5 91.5q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136z" />
965 <glyph glyph-name="unlink" unicode="&#xf127;" horiz-adv-x="1664"
966d="M439 265l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23zM608 224v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM384 448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23t9 23t23 9h320
967q14 0 23 -9t9 -23zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-334 335q-21 21 -42 56l239 18l273 -274q27 -27 68 -27.5t68 26.5l147 146q28 28 28 67q0 40 -28 68l-274 275l18 239q35 -21 56 -42l336 -336q84 -86 84 -204zM1031 1044l-239 -18
968l-273 274q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l274 -274l-18 -240q-35 21 -56 42l-336 336q-84 86 -84 204q0 120 85 203l147 146q83 83 203 83q121 0 204 -85l334 -335q21 -21 42 -56zM1664 960q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9
969t-9 23t9 23t23 9h320q14 0 23 -9t9 -23zM1120 1504v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM1527 1353l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
970 <glyph glyph-name="question" unicode="&#xf128;" horiz-adv-x="1024"
971d="M704 280v-240q0 -16 -12 -28t-28 -12h-240q-16 0 -28 12t-12 28v240q0 16 12 28t28 12h240q16 0 28 -12t12 -28zM1020 880q0 -54 -15.5 -101t-35 -76.5t-55 -59.5t-57.5 -43.5t-61 -35.5q-41 -23 -68.5 -65t-27.5 -67q0 -17 -12 -32.5t-28 -15.5h-240q-15 0 -25.5 18.5
972t-10.5 37.5v45q0 83 65 156.5t143 108.5q59 27 84 56t25 76q0 42 -46.5 74t-107.5 32q-65 0 -108 -29q-35 -25 -107 -115q-13 -16 -31 -16q-12 0 -25 8l-164 125q-13 10 -15.5 25t5.5 28q160 266 464 266q80 0 161 -31t146 -83t106 -127.5t41 -158.5z" />
973 <glyph glyph-name="_279" unicode="&#xf129;" horiz-adv-x="640"
974d="M640 192v-128q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64v384h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-576h64q26 0 45 -19t19 -45zM512 1344v-192q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v192
975q0 26 19 45t45 19h256q26 0 45 -19t19 -45z" />
976 <glyph glyph-name="exclamation" unicode="&#xf12a;" horiz-adv-x="640"
977d="M512 288v-224q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v224q0 26 19 45t45 19h256q26 0 45 -19t19 -45zM542 1344l-28 -768q-1 -26 -20.5 -45t-45.5 -19h-256q-26 0 -45.5 19t-20.5 45l-28 768q-1 26 17.5 45t44.5 19h320q26 0 44.5 -19t17.5 -45z" />
978 <glyph glyph-name="superscript" unicode="&#xf12b;"
979d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3q-1 -3 -2.5 -6.5t-3.5 -8t-3 -6.5q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109z
980M1534 846v-206h-514l-3 27q-4 28 -4 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q83 65 188 65q110 0 178 -59.5t68 -158.5q0 -56 -24.5 -103t-62 -76.5t-81.5 -58.5t-82 -50.5
981t-65.5 -51.5t-30.5 -63h232v80h126z" />
982 <glyph glyph-name="subscript" unicode="&#xf12c;"
983d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3q-1 -3 -2.5 -6.5t-3.5 -8t-3 -6.5q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109z
984M1536 -50v-206h-514l-4 27q-3 45 -3 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q80 65 188 65q110 0 178 -59.5t68 -158.5q0 -66 -34.5 -118.5t-84 -86t-99.5 -62.5t-87 -63t-41 -73
985h232v80h126z" />
986 <glyph glyph-name="_283" unicode="&#xf12d;" horiz-adv-x="1920"
987d="M896 128l336 384h-768l-336 -384h768zM1909 1205q15 -34 9.5 -71.5t-30.5 -65.5l-896 -1024q-38 -44 -96 -44h-768q-38 0 -69.5 20.5t-47.5 54.5q-15 34 -9.5 71.5t30.5 65.5l896 1024q38 44 96 44h768q38 0 69.5 -20.5t47.5 -54.5z" />
988 <glyph glyph-name="puzzle_piece" unicode="&#xf12e;" horiz-adv-x="1664"
989d="M1664 438q0 -81 -44.5 -135t-123.5 -54q-41 0 -77.5 17.5t-59 38t-56.5 38t-71 17.5q-110 0 -110 -124q0 -39 16 -115t15 -115v-5q-22 0 -33 -1q-34 -3 -97.5 -11.5t-115.5 -13.5t-98 -5q-61 0 -103 26.5t-42 83.5q0 37 17.5 71t38 56.5t38 59t17.5 77.5q0 79 -54 123.5
990t-135 44.5q-84 0 -143 -45.5t-59 -127.5q0 -43 15 -83t33.5 -64.5t33.5 -53t15 -50.5q0 -45 -46 -89q-37 -35 -117 -35q-95 0 -245 24q-9 2 -27.5 4t-27.5 4l-13 2q-1 0 -3 1q-2 0 -2 1v1024q2 -1 17.5 -3.5t34 -5t21.5 -3.5q150 -24 245 -24q80 0 117 35q46 44 46 89
991q0 22 -15 50.5t-33.5 53t-33.5 64.5t-15 83q0 82 59 127.5t144 45.5q80 0 134 -44.5t54 -123.5q0 -41 -17.5 -77.5t-38 -59t-38 -56.5t-17.5 -71q0 -57 42 -83.5t103 -26.5q64 0 180 15t163 17v-2q-1 -2 -3.5 -17.5t-5 -34t-3.5 -21.5q-24 -150 -24 -245q0 -80 35 -117
992q44 -46 89 -46q22 0 50.5 15t53 33.5t64.5 33.5t83 15q82 0 127.5 -59t45.5 -143z" />
993 <glyph glyph-name="microphone" unicode="&#xf130;" horiz-adv-x="1152"
994d="M1152 832v-128q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-217 24 -364.5 187.5t-147.5 384.5v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -185 131.5 -316.5t316.5 -131.5
995t316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45zM896 1216v-512q0 -132 -94 -226t-226 -94t-226 94t-94 226v512q0 132 94 226t226 94t226 -94t94 -226z" />
996 <glyph glyph-name="microphone_off" unicode="&#xf131;" horiz-adv-x="1408"
997d="M271 591l-101 -101q-42 103 -42 214v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -53 15 -113zM1385 1193l-361 -361v-128q0 -132 -94 -226t-226 -94q-55 0 -109 19l-96 -96q97 -51 205 -51q185 0 316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45v-128
998q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-125 13 -235 81l-254 -254q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l1234 1234q10 10 23 10t23 -10l82 -82q10 -10 10 -23
999t-10 -23zM1005 1325l-621 -621v512q0 132 94 226t226 94q102 0 184.5 -59t116.5 -152z" />
1000 <glyph glyph-name="shield" unicode="&#xf132;" horiz-adv-x="1280"
1001d="M1088 576v640h-448v-1137q119 63 213 137q235 184 235 360zM1280 1344v-768q0 -86 -33.5 -170.5t-83 -150t-118 -127.5t-126.5 -103t-121 -77.5t-89.5 -49.5t-42.5 -20q-12 -6 -26 -6t-26 6q-16 7 -42.5 20t-89.5 49.5t-121 77.5t-126.5 103t-118 127.5t-83 150
1002t-33.5 170.5v768q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
1003 <glyph glyph-name="calendar_empty" unicode="&#xf133;" horiz-adv-x="1664"
1004d="M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280
1005q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
1006 <glyph glyph-name="fire_extinguisher" unicode="&#xf134;" horiz-adv-x="1408"
1007d="M512 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 1376v-320q0 -16 -12 -25q-8 -7 -20 -7q-4 0 -7 1l-448 96q-11 2 -18 11t-7 20h-256v-102q111 -23 183.5 -111t72.5 -203v-800q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v800
1008q0 106 62.5 190.5t161.5 114.5v111h-32q-59 0 -115 -23.5t-91.5 -53t-66 -66.5t-40.5 -53.5t-14 -24.5q-17 -35 -57 -35q-16 0 -29 7q-23 12 -31.5 37t3.5 49q5 10 14.5 26t37.5 53.5t60.5 70t85 67t108.5 52.5q-25 42 -25 86q0 66 47 113t113 47t113 -47t47 -113
1009q0 -33 -14 -64h302q0 11 7 20t18 11l448 96q3 1 7 1q12 0 20 -7q12 -9 12 -25z" />
1010 <glyph glyph-name="rocket" unicode="&#xf135;" horiz-adv-x="1664"
1011d="M1440 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1664 1376q0 -249 -75.5 -430.5t-253.5 -360.5q-81 -80 -195 -176l-20 -379q-2 -16 -16 -26l-384 -224q-7 -4 -16 -4q-12 0 -23 9l-64 64q-13 14 -8 32l85 276l-281 281l-276 -85q-3 -1 -9 -1
1012q-14 0 -23 9l-64 64q-17 19 -5 39l224 384q10 14 26 16l379 20q96 114 176 195q188 187 358 258t431 71q14 0 24 -9.5t10 -22.5z" />
1013 <glyph glyph-name="maxcdn" unicode="&#xf136;" horiz-adv-x="1792"
1014d="M1745 763l-164 -763h-334l178 832q13 56 -15 88q-27 33 -83 33h-169l-204 -953h-334l204 953h-286l-204 -953h-334l204 953l-153 327h1276q101 0 189.5 -40.5t147.5 -113.5q60 -73 81 -168.5t0 -194.5z" />
1015 <glyph glyph-name="chevron_sign_left" unicode="&#xf137;"
1016d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5
1017t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1018 <glyph glyph-name="chevron_sign_right" unicode="&#xf138;"
1019d="M717 141l454 454q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l307 -307l-307 -307q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5
1020t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1021 <glyph glyph-name="chevron_sign_up" unicode="&#xf139;"
1022d="M1165 397l102 102q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l307 307l307 -307q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5
1023t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1024 <glyph glyph-name="chevron_sign_down" unicode="&#xf13a;"
1025d="M813 237l454 454q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-307 -307l-307 307q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5
1026t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1027 <glyph glyph-name="html5" unicode="&#xf13b;" horiz-adv-x="1408"
1028d="M1130 939l16 175h-884l47 -534h612l-22 -228l-197 -53l-196 53l-13 140h-175l22 -278l362 -100h4v1l359 99l50 544h-644l-15 181h674zM0 1408h1408l-128 -1438l-578 -162l-574 162z" />
1029 <glyph glyph-name="css3" unicode="&#xf13c;" horiz-adv-x="1792"
1030d="M275 1408h1505l-266 -1333l-804 -267l-698 267l71 356h297l-29 -147l422 -161l486 161l68 339h-1208l58 297h1209l38 191h-1208z" />
1031 <glyph glyph-name="anchor" unicode="&#xf13d;" horiz-adv-x="1792"
1032d="M960 1280q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1792 352v-352q0 -22 -20 -30q-8 -2 -12 -2q-12 0 -23 9l-93 93q-119 -143 -318.5 -226.5t-429.5 -83.5t-429.5 83.5t-318.5 226.5l-93 -93q-9 -9 -23 -9q-4 0 -12 2q-20 8 -20 30v352
1033q0 14 9 23t23 9h352q22 0 30 -20q8 -19 -7 -35l-100 -100q67 -91 189.5 -153.5t271.5 -82.5v647h-192q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h192v163q-58 34 -93 92.5t-35 128.5q0 106 75 181t181 75t181 -75t75 -181q0 -70 -35 -128.5t-93 -92.5v-163h192q26 0 45 -19
1034t19 -45v-128q0 -26 -19 -45t-45 -19h-192v-647q149 20 271.5 82.5t189.5 153.5l-100 100q-15 16 -7 35q8 20 30 20h352q14 0 23 -9t9 -23z" />
1035 <glyph glyph-name="unlock_alt" unicode="&#xf13e;" horiz-adv-x="1152"
1036d="M1056 768q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v320q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45q0 106 -75 181t-181 75t-181 -75t-75 -181
1037v-320h736z" />
1038 <glyph glyph-name="bullseye" unicode="&#xf140;"
1039d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM1152 640q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1280 640q0 -212 -150 -362t-362 -150t-362 150
1040t-150 362t150 362t362 150t362 -150t150 -362zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640
1041q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1042 <glyph glyph-name="ellipsis_horizontal" unicode="&#xf141;" horiz-adv-x="1408"
1043d="M384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM896 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM1408 800v-192q0 -40 -28 -68t-68 -28h-192
1044q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
1045 <glyph glyph-name="ellipsis_vertical" unicode="&#xf142;" horiz-adv-x="384"
1046d="M384 288v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 1312v-192q0 -40 -28 -68t-68 -28h-192
1047q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
1048 <glyph glyph-name="_303" unicode="&#xf143;"
1049d="M512 256q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM863 162q-13 233 -176.5 396.5t-396.5 176.5q-14 1 -24 -9t-10 -23v-128q0 -13 8.5 -22t21.5 -10q154 -11 264 -121t121 -264q1 -13 10 -21.5t22 -8.5h128
1050q13 0 23 10t9 24zM1247 161q-5 154 -56 297.5t-139.5 260t-205 205t-260 139.5t-297.5 56q-14 1 -23 -9q-10 -10 -10 -23v-128q0 -13 9 -22t22 -10q204 -7 378 -111.5t278.5 -278.5t111.5 -378q1 -13 10 -22t22 -9h128q13 0 23 10q11 9 9 23zM1536 1120v-960
1051q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1052 <glyph glyph-name="play_sign" unicode="&#xf144;"
1053d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1152 585q32 18 32 55t-32 55l-544 320q-31 19 -64 1q-32 -19 -32 -56v-640q0 -37 32 -56
1054q16 -8 32 -8q17 0 32 9z" />
1055 <glyph glyph-name="ticket" unicode="&#xf145;" horiz-adv-x="1792"
1056d="M1024 1084l316 -316l-572 -572l-316 316zM813 105l618 618q19 19 19 45t-19 45l-362 362q-18 18 -45 18t-45 -18l-618 -618q-19 -19 -19 -45t19 -45l362 -362q18 -18 45 -18t45 18zM1702 742l-907 -908q-37 -37 -90.5 -37t-90.5 37l-126 126q56 56 56 136t-56 136
1057t-136 56t-136 -56l-125 126q-37 37 -37 90.5t37 90.5l907 906q37 37 90.5 37t90.5 -37l125 -125q-56 -56 -56 -136t56 -136t136 -56t136 56l126 -125q37 -37 37 -90.5t-37 -90.5z" />
1058 <glyph glyph-name="minus_sign_alt" unicode="&#xf146;"
1059d="M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5
1060t84.5 -203.5z" />
1061 <glyph glyph-name="check_minus" unicode="&#xf147;" horiz-adv-x="1408"
1062d="M1152 736v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h832q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5
1063t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
1064 <glyph glyph-name="level_up" unicode="&#xf148;" horiz-adv-x="1024"
1065d="M1018 933q-18 -37 -58 -37h-192v-864q0 -14 -9 -23t-23 -9h-704q-21 0 -29 18q-8 20 4 35l160 192q9 11 25 11h320v640h-192q-40 0 -58 37q-17 37 9 68l320 384q18 22 49 22t49 -22l320 -384q27 -32 9 -68z" />
1066 <glyph glyph-name="level_down" unicode="&#xf149;" horiz-adv-x="1024"
1067d="M32 1280h704q13 0 22.5 -9.5t9.5 -23.5v-863h192q40 0 58 -37t-9 -69l-320 -384q-18 -22 -49 -22t-49 22l-320 384q-26 31 -9 69q18 37 58 37h192v640h-320q-14 0 -25 11l-160 192q-13 14 -4 34q9 19 29 19z" />
1068 <glyph glyph-name="check_sign" unicode="&#xf14a;"
1069d="M685 237l614 614q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-467 -467l-211 211q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l358 -358q19 -19 45 -19t45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5
1070t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1071 <glyph glyph-name="edit_sign" unicode="&#xf14b;"
1072d="M404 428l152 -152l-52 -52h-56v96h-96v56zM818 818q14 -13 -3 -30l-291 -291q-17 -17 -30 -3q-14 13 3 30l291 291q17 17 30 3zM544 128l544 544l-288 288l-544 -544v-288h288zM1152 736l92 92q28 28 28 68t-28 68l-152 152q-28 28 -68 28t-68 -28l-92 -92zM1536 1120
1073v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1074 <glyph glyph-name="_312" unicode="&#xf14c;"
1075d="M1280 608v480q0 26 -19 45t-45 19h-480q-42 0 -59 -39q-17 -41 14 -70l144 -144l-534 -534q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l534 534l144 -144q18 -19 45 -19q12 0 25 5q39 17 39 59zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960
1076q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1077 <glyph glyph-name="share_sign" unicode="&#xf14d;"
1078d="M1005 435l352 352q19 19 19 45t-19 45l-352 352q-30 31 -69 14q-40 -17 -40 -59v-160q-119 0 -216 -19.5t-162.5 -51t-114 -79t-76.5 -95.5t-44.5 -109t-21.5 -111.5t-5 -110.5q0 -181 167 -404q11 -12 25 -12q7 0 13 3q22 9 19 33q-44 354 62 473q46 52 130 75.5
1079t224 23.5v-160q0 -42 40 -59q12 -5 24 -5q26 0 45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1080 <glyph glyph-name="compass" unicode="&#xf14e;"
1081d="M640 448l256 128l-256 128v-256zM1024 1039v-542l-512 -256v542zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103
1082t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1083 <glyph glyph-name="collapse" unicode="&#xf150;"
1084d="M1145 861q18 -35 -5 -66l-320 -448q-19 -27 -52 -27t-52 27l-320 448q-23 31 -5 66q17 35 57 35h640q40 0 57 -35zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120
1085v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1086 <glyph glyph-name="collapse_top" unicode="&#xf151;"
1087d="M1145 419q-17 -35 -57 -35h-640q-40 0 -57 35q-18 35 5 66l320 448q19 27 52 27t52 -27l320 -448q23 -31 5 -66zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120v-960
1088q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1089 <glyph glyph-name="_317" unicode="&#xf152;"
1090d="M1088 640q0 -33 -27 -52l-448 -320q-31 -23 -66 -5q-35 17 -35 57v640q0 40 35 57q35 18 66 -5l448 -320q27 -19 27 -52zM1280 160v960q0 14 -9 23t-23 9h-960q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h960q14 0 23 9t9 23zM1536 1120v-960q0 -119 -84.5 -203.5
1091t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1092 <glyph glyph-name="eur" unicode="&#xf153;" horiz-adv-x="1024"
1093d="M976 229l35 -159q3 -12 -3 -22.5t-17 -14.5l-5 -1q-4 -2 -10.5 -3.5t-16 -4.5t-21.5 -5.5t-25.5 -5t-30 -5t-33.5 -4.5t-36.5 -3t-38.5 -1q-234 0 -409 130.5t-238 351.5h-95q-13 0 -22.5 9.5t-9.5 22.5v113q0 13 9.5 22.5t22.5 9.5h66q-2 57 1 105h-67q-14 0 -23 9
1094t-9 23v114q0 14 9 23t23 9h98q67 210 243.5 338t400.5 128q102 0 194 -23q11 -3 20 -15q6 -11 3 -24l-43 -159q-3 -13 -14 -19.5t-24 -2.5l-4 1q-4 1 -11.5 2.5l-17.5 3.5t-22.5 3.5t-26 3t-29 2.5t-29.5 1q-126 0 -226 -64t-150 -176h468q16 0 25 -12q10 -12 7 -26
1095l-24 -114q-5 -26 -32 -26h-488q-3 -37 0 -105h459q15 0 25 -12q9 -12 6 -27l-24 -112q-2 -11 -11 -18.5t-20 -7.5h-387q48 -117 149.5 -185.5t228.5 -68.5q18 0 36 1.5t33.5 3.5t29.5 4.5t24.5 5t18.5 4.5l12 3l5 2q13 5 26 -2q12 -7 15 -21z" />
1096 <glyph glyph-name="gbp" unicode="&#xf154;" horiz-adv-x="1024"
1097d="M1020 399v-367q0 -14 -9 -23t-23 -9h-956q-14 0 -23 9t-9 23v150q0 13 9.5 22.5t22.5 9.5h97v383h-95q-14 0 -23 9.5t-9 22.5v131q0 14 9 23t23 9h95v223q0 171 123.5 282t314.5 111q185 0 335 -125q9 -8 10 -20.5t-7 -22.5l-103 -127q-9 -11 -22 -12q-13 -2 -23 7
1098q-5 5 -26 19t-69 32t-93 18q-85 0 -137 -47t-52 -123v-215h305q13 0 22.5 -9t9.5 -23v-131q0 -13 -9.5 -22.5t-22.5 -9.5h-305v-379h414v181q0 13 9 22.5t23 9.5h162q14 0 23 -9.5t9 -22.5z" />
1099 <glyph glyph-name="usd" unicode="&#xf155;" horiz-adv-x="1024"
1100d="M978 351q0 -153 -99.5 -263.5t-258.5 -136.5v-175q0 -14 -9 -23t-23 -9h-135q-13 0 -22.5 9.5t-9.5 22.5v175q-66 9 -127.5 31t-101.5 44.5t-74 48t-46.5 37.5t-17.5 18q-17 21 -2 41l103 135q7 10 23 12q15 2 24 -9l2 -2q113 -99 243 -125q37 -8 74 -8q81 0 142.5 43
1101t61.5 122q0 28 -15 53t-33.5 42t-58.5 37.5t-66 32t-80 32.5q-39 16 -61.5 25t-61.5 26.5t-62.5 31t-56.5 35.5t-53.5 42.5t-43.5 49t-35.5 58t-21 66.5t-8.5 78q0 138 98 242t255 134v180q0 13 9.5 22.5t22.5 9.5h135q14 0 23 -9t9 -23v-176q57 -6 110.5 -23t87 -33.5
1102t63.5 -37.5t39 -29t15 -14q17 -18 5 -38l-81 -146q-8 -15 -23 -16q-14 -3 -27 7q-3 3 -14.5 12t-39 26.5t-58.5 32t-74.5 26t-85.5 11.5q-95 0 -155 -43t-60 -111q0 -26 8.5 -48t29.5 -41.5t39.5 -33t56 -31t60.5 -27t70 -27.5q53 -20 81 -31.5t76 -35t75.5 -42.5t62 -50
1103t53 -63.5t31.5 -76.5t13 -94z" />
1104 <glyph glyph-name="inr" unicode="&#xf156;" horiz-adv-x="898"
1105d="M898 1066v-102q0 -14 -9 -23t-23 -9h-168q-23 -144 -129 -234t-276 -110q167 -178 459 -536q14 -16 4 -34q-8 -18 -29 -18h-195q-16 0 -25 12q-306 367 -498 571q-9 9 -9 22v127q0 13 9.5 22.5t22.5 9.5h112q132 0 212.5 43t102.5 125h-427q-14 0 -23 9t-9 23v102
1106q0 14 9 23t23 9h413q-57 113 -268 113h-145q-13 0 -22.5 9.5t-9.5 22.5v133q0 14 9 23t23 9h832q14 0 23 -9t9 -23v-102q0 -14 -9 -23t-23 -9h-233q47 -61 64 -144h171q14 0 23 -9t9 -23z" />
1107 <glyph glyph-name="jpy" unicode="&#xf157;" horiz-adv-x="1027"
1108d="M603 0h-172q-13 0 -22.5 9t-9.5 23v330h-288q-13 0 -22.5 9t-9.5 23v103q0 13 9.5 22.5t22.5 9.5h288v85h-288q-13 0 -22.5 9t-9.5 23v104q0 13 9.5 22.5t22.5 9.5h214l-321 578q-8 16 0 32q10 16 28 16h194q19 0 29 -18l215 -425q19 -38 56 -125q10 24 30.5 68t27.5 61
1109l191 420q8 19 29 19h191q17 0 27 -16q9 -14 1 -31l-313 -579h215q13 0 22.5 -9.5t9.5 -22.5v-104q0 -14 -9.5 -23t-22.5 -9h-290v-85h290q13 0 22.5 -9.5t9.5 -22.5v-103q0 -14 -9.5 -23t-22.5 -9h-290v-330q0 -13 -9.5 -22.5t-22.5 -9.5z" />
1110 <glyph glyph-name="rub" unicode="&#xf158;" horiz-adv-x="1280"
1111d="M1043 971q0 100 -65 162t-171 62h-320v-448h320q106 0 171 62t65 162zM1280 971q0 -193 -126.5 -315t-326.5 -122h-340v-118h505q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-505v-192q0 -14 -9.5 -23t-22.5 -9h-167q-14 0 -23 9t-9 23v192h-224q-14 0 -23 9t-9 23v128
1112q0 14 9 23t23 9h224v118h-224q-14 0 -23 9t-9 23v149q0 13 9 22.5t23 9.5h224v629q0 14 9 23t23 9h539q200 0 326.5 -122t126.5 -315z" />
1113 <glyph glyph-name="krw" unicode="&#xf159;" horiz-adv-x="1792"
1114d="M514 341l81 299h-159l75 -300q1 -1 1 -3t1 -3q0 1 0.5 3.5t0.5 3.5zM630 768l35 128h-292l32 -128h225zM822 768h139l-35 128h-70zM1271 340l78 300h-162l81 -299q0 -1 0.5 -3.5t1.5 -3.5q0 1 0.5 3t0.5 3zM1382 768l33 128h-297l34 -128h230zM1792 736v-64q0 -14 -9 -23
1115t-23 -9h-213l-164 -616q-7 -24 -31 -24h-159q-24 0 -31 24l-166 616h-209l-167 -616q-7 -24 -31 -24h-159q-11 0 -19.5 7t-10.5 17l-160 616h-208q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h175l-33 128h-142q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h109l-89 344q-5 15 5 28
1116q10 12 26 12h137q26 0 31 -24l90 -360h359l97 360q7 24 31 24h126q24 0 31 -24l98 -360h365l93 360q5 24 31 24h137q16 0 26 -12q10 -13 5 -28l-91 -344h111q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-145l-34 -128h179q14 0 23 -9t9 -23z" />
1117 <glyph glyph-name="btc" unicode="&#xf15a;" horiz-adv-x="1280"
1118d="M1167 896q18 -182 -131 -258q117 -28 175 -103t45 -214q-7 -71 -32.5 -125t-64.5 -89t-97 -58.5t-121.5 -34.5t-145.5 -15v-255h-154v251q-80 0 -122 1v-252h-154v255q-18 0 -54 0.5t-55 0.5h-200l31 183h111q50 0 58 51v402h16q-6 1 -16 1v287q-13 68 -89 68h-111v164
1119l212 -1q64 0 97 1v252h154v-247q82 2 122 2v245h154v-252q79 -7 140 -22.5t113 -45t82.5 -78t36.5 -114.5zM952 351q0 36 -15 64t-37 46t-57.5 30.5t-65.5 18.5t-74 9t-69 3t-64.5 -1t-47.5 -1v-338q8 0 37 -0.5t48 -0.5t53 1.5t58.5 4t57 8.5t55.5 14t47.5 21t39.5 30
1120t24.5 40t9.5 51zM881 827q0 33 -12.5 58.5t-30.5 42t-48 28t-55 16.5t-61.5 8t-58 2.5t-54 -1t-39.5 -0.5v-307q5 0 34.5 -0.5t46.5 0t50 2t55 5.5t51.5 11t48.5 18.5t37 27t27 38.5t9 51z" />
1121 <glyph glyph-name="file" unicode="&#xf15b;"
1122d="M1024 1024v472q22 -14 36 -28l408 -408q14 -14 28 -36h-472zM896 992q0 -40 28 -68t68 -28h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544z" />
1123 <glyph glyph-name="file_text" unicode="&#xf15c;"
1124d="M1468 1060q14 -14 28 -36h-472v472q22 -14 36 -28zM992 896h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544q0 -40 28 -68t68 -28zM1152 160v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704
1125q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23z" />
1126 <glyph glyph-name="sort_by_alphabet" unicode="&#xf15d;" horiz-adv-x="1664"
1127d="M1191 1128h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1572 -23
1128v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -11v-2l14 2q9 2 30 2h248v119h121zM1661 874v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162
1129l230 -662h70z" />
1130 <glyph glyph-name="_329" unicode="&#xf15e;" horiz-adv-x="1664"
1131d="M1191 104h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1661 -150
1132v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162l230 -662h70zM1572 1001v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -10v-3l14 3q9 1 30 1h248
1133v119h121z" />
1134 <glyph glyph-name="sort_by_attributes" unicode="&#xf160;" horiz-adv-x="1792"
1135d="M736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1792 -32v-192q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832
1136q14 0 23 -9t9 -23zM1600 480v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1408 992v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1216 1504v-192q0 -14 -9 -23t-23 -9h-256
1137q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23z" />
1138 <glyph glyph-name="sort_by_attributes_alt" unicode="&#xf161;" horiz-adv-x="1792"
1139d="M1216 -32v-192q0 -14 -9 -23t-23 -9h-256q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192
1140q14 0 23 -9t9 -23zM1408 480v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1600 992v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1792 1504v-192q0 -14 -9 -23t-23 -9h-832
1141q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832q14 0 23 -9t9 -23z" />
1142 <glyph glyph-name="sort_by_order" unicode="&#xf162;"
1143d="M1346 223q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23
1144zM1486 165q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5
1145t82 -252.5zM1456 882v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165z" />
1146 <glyph glyph-name="sort_by_order_alt" unicode="&#xf163;"
1147d="M1346 1247q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9
1148t9 -23zM1456 -142v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165zM1486 1189q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13
1149q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5t82 -252.5z" />
1150 <glyph glyph-name="_334" unicode="&#xf164;" horiz-adv-x="1664"
1151d="M256 192q0 26 -19 45t-45 19q-27 0 -45.5 -19t-18.5 -45q0 -27 18.5 -45.5t45.5 -18.5q26 0 45 18.5t19 45.5zM416 704v-640q0 -26 -19 -45t-45 -19h-288q-26 0 -45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45 -19t19 -45zM1600 704q0 -86 -55 -149q15 -44 15 -76
1152q3 -76 -43 -137q17 -56 0 -117q-15 -57 -54 -94q9 -112 -49 -181q-64 -76 -197 -78h-36h-76h-17q-66 0 -144 15.5t-121.5 29t-120.5 39.5q-123 43 -158 44q-26 1 -45 19.5t-19 44.5v641q0 25 18 43.5t43 20.5q24 2 76 59t101 121q68 87 101 120q18 18 31 48t17.5 48.5
1153t13.5 60.5q7 39 12.5 61t19.5 52t34 50q19 19 45 19q46 0 82.5 -10.5t60 -26t40 -40.5t24 -45t12 -50t5 -45t0.5 -39q0 -38 -9.5 -76t-19 -60t-27.5 -56q-3 -6 -10 -18t-11 -22t-8 -24h277q78 0 135 -57t57 -135z" />
1154 <glyph glyph-name="_335" unicode="&#xf165;" horiz-adv-x="1664"
1155d="M256 960q0 -26 -19 -45t-45 -19q-27 0 -45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45 -18.5t19 -45.5zM416 448v640q0 26 -19 45t-45 19h-288q-26 0 -45 -19t-19 -45v-640q0 -26 19 -45t45 -19h288q26 0 45 19t19 45zM1545 597q55 -61 55 -149q-1 -78 -57.5 -135
1156t-134.5 -57h-277q4 -14 8 -24t11 -22t10 -18q18 -37 27 -57t19 -58.5t10 -76.5q0 -24 -0.5 -39t-5 -45t-12 -50t-24 -45t-40 -40.5t-60 -26t-82.5 -10.5q-26 0 -45 19q-20 20 -34 50t-19.5 52t-12.5 61q-9 42 -13.5 60.5t-17.5 48.5t-31 48q-33 33 -101 120q-49 64 -101 121
1157t-76 59q-25 2 -43 20.5t-18 43.5v641q0 26 19 44.5t45 19.5q35 1 158 44q77 26 120.5 39.5t121.5 29t144 15.5h17h76h36q133 -2 197 -78q58 -69 49 -181q39 -37 54 -94q17 -61 0 -117q46 -61 43 -137q0 -32 -15 -76z" />
1158 <glyph glyph-name="youtube_sign" unicode="&#xf166;"
1159d="M919 233v157q0 50 -29 50q-17 0 -33 -16v-224q16 -16 33 -16q29 0 29 49zM1103 355h66v34q0 51 -33 51t-33 -51v-34zM532 621v-70h-80v-423h-74v423h-78v70h232zM733 495v-367h-67v40q-39 -45 -76 -45q-33 0 -42 28q-6 17 -6 54v290h66v-270q0 -24 1 -26q1 -15 15 -15
1160q20 0 42 31v280h67zM985 384v-146q0 -52 -7 -73q-12 -42 -53 -42q-35 0 -68 41v-36h-67v493h67v-161q32 40 68 40q41 0 53 -42q7 -21 7 -74zM1236 255v-9q0 -29 -2 -43q-3 -22 -15 -40q-27 -40 -80 -40q-52 0 -81 38q-21 27 -21 86v129q0 59 20 86q29 38 80 38t78 -38
1161q21 -29 21 -86v-76h-133v-65q0 -51 34 -51q24 0 30 26q0 1 0.5 7t0.5 16.5v21.5h68zM785 1079v-156q0 -51 -32 -51t-32 51v156q0 52 32 52t32 -52zM1318 366q0 177 -19 260q-10 44 -43 73.5t-76 34.5q-136 15 -412 15q-275 0 -411 -15q-44 -5 -76.5 -34.5t-42.5 -73.5
1162q-20 -87 -20 -260q0 -176 20 -260q10 -43 42.5 -73t75.5 -35q137 -15 412 -15t412 15q43 5 75.5 35t42.5 73q20 84 20 260zM563 1017l90 296h-75l-51 -195l-53 195h-78q7 -23 23 -69l24 -69q35 -103 46 -158v-201h74v201zM852 936v130q0 58 -21 87q-29 38 -78 38
1163q-51 0 -78 -38q-21 -29 -21 -87v-130q0 -58 21 -87q27 -38 78 -38q49 0 78 38q21 27 21 87zM1033 816h67v370h-67v-283q-22 -31 -42 -31q-15 0 -16 16q-1 2 -1 26v272h-67v-293q0 -37 6 -55q11 -27 43 -27q36 0 77 45v-40zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5
1164h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1165 <glyph glyph-name="youtube" unicode="&#xf167;"
1166d="M971 292v-211q0 -67 -39 -67q-23 0 -45 22v301q22 22 45 22q39 0 39 -67zM1309 291v-46h-90v46q0 68 45 68t45 -68zM343 509h107v94h-312v-94h105v-569h100v569zM631 -60h89v494h-89v-378q-30 -42 -57 -42q-18 0 -21 21q-1 3 -1 35v364h-89v-391q0 -49 8 -73
1167q12 -37 58 -37q48 0 102 61v-54zM1060 88v197q0 73 -9 99q-17 56 -71 56q-50 0 -93 -54v217h-89v-663h89v48q45 -55 93 -55q54 0 71 55q9 27 9 100zM1398 98v13h-91q0 -51 -2 -61q-7 -36 -40 -36q-46 0 -46 69v87h179v103q0 79 -27 116q-39 51 -106 51q-68 0 -107 -51
1168q-28 -37 -28 -116v-173q0 -79 29 -116q39 -51 108 -51q72 0 108 53q18 27 21 54q2 9 2 58zM790 1011v210q0 69 -43 69t-43 -69v-210q0 -70 43 -70t43 70zM1509 260q0 -234 -26 -350q-14 -59 -58 -99t-102 -46q-184 -21 -555 -21t-555 21q-58 6 -102.5 46t-57.5 99
1169q-26 112 -26 350q0 234 26 350q14 59 58 99t103 47q183 20 554 20t555 -20q58 -7 102.5 -47t57.5 -99q26 -112 26 -350zM511 1536h102l-121 -399v-271h-100v271q-14 74 -61 212q-37 103 -65 187h106l71 -263zM881 1203v-175q0 -81 -28 -118q-38 -51 -106 -51q-67 0 -105 51
1170q-28 38 -28 118v175q0 80 28 117q38 51 105 51q68 0 106 -51q28 -37 28 -117zM1216 1365v-499h-91v55q-53 -62 -103 -62q-46 0 -59 37q-8 24 -8 75v394h91v-367q0 -33 1 -35q3 -22 21 -22q27 0 57 43v381h91z" />
1171 <glyph glyph-name="xing" unicode="&#xf168;" horiz-adv-x="1408"
1172d="M597 869q-10 -18 -257 -456q-27 -46 -65 -46h-239q-21 0 -31 17t0 36l253 448q1 0 0 1l-161 279q-12 22 -1 37q9 15 32 15h239q40 0 66 -45zM1403 1511q11 -16 0 -37l-528 -934v-1l336 -615q11 -20 1 -37q-10 -15 -32 -15h-239q-42 0 -66 45l-339 622q18 32 531 942
1173q25 45 64 45h241q22 0 31 -15z" />
1174 <glyph glyph-name="xing_sign" unicode="&#xf169;"
1175d="M685 771q0 1 -126 222q-21 34 -52 34h-184q-18 0 -26 -11q-7 -12 1 -29l125 -216v-1l-196 -346q-9 -14 0 -28q8 -13 24 -13h185q31 0 50 36zM1309 1268q-7 12 -24 12h-187q-30 0 -49 -35l-411 -729q1 -2 262 -481q20 -35 52 -35h184q18 0 25 12q8 13 -1 28l-260 476v1
1176l409 723q8 16 0 28zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1177 <glyph glyph-name="youtube_play" unicode="&#xf16a;" horiz-adv-x="1792"
1178d="M711 408l484 250l-484 253v-503zM896 1270q168 0 324.5 -4.5t229.5 -9.5l73 -4q1 0 17 -1.5t23 -3t23.5 -4.5t28.5 -8t28 -13t31 -19.5t29 -26.5q6 -6 15.5 -18.5t29 -58.5t26.5 -101q8 -64 12.5 -136.5t5.5 -113.5v-40v-136q1 -145 -18 -290q-7 -55 -25 -99.5t-32 -61.5
1179l-14 -17q-14 -15 -29 -26.5t-31 -19t-28 -12.5t-28.5 -8t-24 -4.5t-23 -3t-16.5 -1.5q-251 -19 -627 -19q-207 2 -359.5 6.5t-200.5 7.5l-49 4l-36 4q-36 5 -54.5 10t-51 21t-56.5 41q-6 6 -15.5 18.5t-29 58.5t-26.5 101q-8 64 -12.5 136.5t-5.5 113.5v40v136
1180q-1 145 18 290q7 55 25 99.5t32 61.5l14 17q14 15 29 26.5t31 19.5t28 13t28.5 8t23.5 4.5t23 3t17 1.5q251 18 627 18z" />
1181 <glyph glyph-name="dropbox" unicode="&#xf16b;" horiz-adv-x="1792"
1182d="M402 829l494 -305l-342 -285l-490 319zM1388 274v-108l-490 -293v-1l-1 1l-1 -1v1l-489 293v108l147 -96l342 284v2l1 -1l1 1v-2l343 -284zM554 1418l342 -285l-494 -304l-338 270zM1390 829l338 -271l-489 -319l-343 285zM1239 1418l489 -319l-338 -270l-494 304z" />
1183 <glyph glyph-name="stackexchange" unicode="&#xf16c;"
1184d="M1289 -96h-1118v480h-160v-640h1438v640h-160v-480zM347 428l33 157l783 -165l-33 -156zM450 802l67 146l725 -339l-67 -145zM651 1158l102 123l614 -513l-102 -123zM1048 1536l477 -641l-128 -96l-477 641zM330 65v159h800v-159h-800z" />
1185 <glyph glyph-name="instagram" unicode="&#xf16d;"
1186d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1162 640q0 -164 -115 -279t-279 -115t-279 115t-115 279t115 279t279 115t279 -115t115 -279zM1270 1050q0 -38 -27 -65t-65 -27t-65 27t-27 65t27 65t65 27t65 -27t27 -65zM768 1270
1187q-7 0 -76.5 0.5t-105.5 0t-96.5 -3t-103 -10t-71.5 -18.5q-50 -20 -88 -58t-58 -88q-11 -29 -18.5 -71.5t-10 -103t-3 -96.5t0 -105.5t0.5 -76.5t-0.5 -76.5t0 -105.5t3 -96.5t10 -103t18.5 -71.5q20 -50 58 -88t88 -58q29 -11 71.5 -18.5t103 -10t96.5 -3t105.5 0t76.5 0.5
1188t76.5 -0.5t105.5 0t96.5 3t103 10t71.5 18.5q50 20 88 58t58 88q11 29 18.5 71.5t10 103t3 96.5t0 105.5t-0.5 76.5t0.5 76.5t0 105.5t-3 96.5t-10 103t-18.5 71.5q-20 50 -58 88t-88 58q-29 11 -71.5 18.5t-103 10t-96.5 3t-105.5 0t-76.5 -0.5zM1536 640q0 -229 -5 -317
1189q-10 -208 -124 -322t-322 -124q-88 -5 -317 -5t-317 5q-208 10 -322 124t-124 322q-5 88 -5 317t5 317q10 208 124 322t322 124q88 5 317 5t317 -5q208 -10 322 -124t124 -322q5 -88 5 -317z" />
1190 <glyph glyph-name="flickr" unicode="&#xf16e;"
1191d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM698 640q0 88 -62 150t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150zM1262 640q0 88 -62 150
1192t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150z" />
1193 <glyph glyph-name="adn" unicode="&#xf170;"
1194d="M768 914l201 -306h-402zM1133 384h94l-459 691l-459 -691h94l104 160h522zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1195 <glyph glyph-name="f171" unicode="&#xf171;" horiz-adv-x="1408"
1196d="M815 677q8 -63 -50.5 -101t-111.5 -6q-39 17 -53.5 58t-0.5 82t52 58q36 18 72.5 12t64 -35.5t27.5 -67.5zM926 698q-14 107 -113 164t-197 13q-63 -28 -100.5 -88.5t-34.5 -129.5q4 -91 77.5 -155t165.5 -56q91 8 152 84t50 168zM1165 1240q-20 27 -56 44.5t-58 22
1197t-71 12.5q-291 47 -566 -2q-43 -7 -66 -12t-55 -22t-50 -43q30 -28 76 -45.5t73.5 -22t87.5 -11.5q228 -29 448 -1q63 8 89.5 12t72.5 21.5t75 46.5zM1222 205q-8 -26 -15.5 -76.5t-14 -84t-28.5 -70t-58 -56.5q-86 -48 -189.5 -71.5t-202 -22t-201.5 18.5q-46 8 -81.5 18
1198t-76.5 27t-73 43.5t-52 61.5q-25 96 -57 292l6 16l18 9q223 -148 506.5 -148t507.5 148q21 -6 24 -23t-5 -45t-8 -37zM1403 1166q-26 -167 -111 -655q-5 -30 -27 -56t-43.5 -40t-54.5 -31q-252 -126 -610 -88q-248 27 -394 139q-15 12 -25.5 26.5t-17 35t-9 34t-6 39.5
1199t-5.5 35q-9 50 -26.5 150t-28 161.5t-23.5 147.5t-22 158q3 26 17.5 48.5t31.5 37.5t45 30t46 22.5t48 18.5q125 46 313 64q379 37 676 -50q155 -46 215 -122q16 -20 16.5 -51t-5.5 -54z" />
1200 <glyph glyph-name="bitbucket_sign" unicode="&#xf172;"
1201d="M848 666q0 43 -41 66t-77 1q-43 -20 -42.5 -72.5t43.5 -70.5q39 -23 81 4t36 72zM928 682q8 -66 -36 -121t-110 -61t-119 40t-56 113q-2 49 25.5 93t72.5 64q70 31 141.5 -10t81.5 -118zM1100 1073q-20 -21 -53.5 -34t-53 -16t-63.5 -8q-155 -20 -324 0q-44 6 -63 9.5
1202t-52.5 16t-54.5 32.5q13 19 36 31t40 15.5t47 8.5q198 35 408 1q33 -5 51 -8.5t43 -16t39 -31.5zM1142 327q0 7 5.5 26.5t3 32t-17.5 16.5q-161 -106 -365 -106t-366 106l-12 -6l-5 -12q26 -154 41 -210q47 -81 204 -108q249 -46 428 53q34 19 49 51.5t22.5 85.5t12.5 71z
1203M1272 1020q9 53 -8 75q-43 55 -155 88q-216 63 -487 36q-132 -12 -226 -46q-38 -15 -59.5 -25t-47 -34t-29.5 -54q8 -68 19 -138t29 -171t24 -137q1 -5 5 -31t7 -36t12 -27t22 -28q105 -80 284 -100q259 -28 440 63q24 13 39.5 23t31 29t19.5 40q48 267 80 473zM1536 1120
1204v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1205 <glyph glyph-name="tumblr" unicode="&#xf173;" horiz-adv-x="1024"
1206d="M944 207l80 -237q-23 -35 -111 -66t-177 -32q-104 -2 -190.5 26t-142.5 74t-95 106t-55.5 120t-16.5 118v544h-168v215q72 26 129 69.5t91 90t58 102t34 99t15 88.5q1 5 4.5 8.5t7.5 3.5h244v-424h333v-252h-334v-518q0 -30 6.5 -56t22.5 -52.5t49.5 -41.5t81.5 -14
1207q78 2 134 29z" />
1208 <glyph glyph-name="tumblr_sign" unicode="&#xf174;"
1209d="M1136 75l-62 183q-44 -22 -103 -22q-36 -1 -62 10.5t-38.5 31.5t-17.5 40.5t-5 43.5v398h257v194h-256v326h-188q-8 0 -9 -10q-5 -44 -17.5 -87t-39 -95t-77 -95t-118.5 -68v-165h130v-418q0 -57 21.5 -115t65 -111t121 -85.5t176.5 -30.5q69 1 136.5 25t85.5 50z
1210M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1211 <glyph glyph-name="long_arrow_down" unicode="&#xf175;" horiz-adv-x="768"
1212d="M765 237q8 -19 -5 -35l-350 -384q-10 -10 -23 -10q-14 0 -24 10l-355 384q-13 16 -5 35q9 19 29 19h224v1248q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1248h224q21 0 29 -19z" />
1213 <glyph glyph-name="long_arrow_up" unicode="&#xf176;" horiz-adv-x="768"
1214d="M765 1043q-9 -19 -29 -19h-224v-1248q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1248h-224q-21 0 -29 19t5 35l350 384q10 10 23 10q14 0 24 -10l355 -384q13 -16 5 -35z" />
1215 <glyph glyph-name="long_arrow_left" unicode="&#xf177;" horiz-adv-x="1792"
1216d="M1792 736v-192q0 -14 -9 -23t-23 -9h-1248v-224q0 -21 -19 -29t-35 5l-384 350q-10 10 -10 23q0 14 10 24l384 354q16 14 35 6q19 -9 19 -29v-224h1248q14 0 23 -9t9 -23z" />
1217 <glyph glyph-name="long_arrow_right" unicode="&#xf178;" horiz-adv-x="1792"
1218d="M1728 643q0 -14 -10 -24l-384 -354q-16 -14 -35 -6q-19 9 -19 29v224h-1248q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h1248v224q0 21 19 29t35 -5l384 -350q10 -10 10 -23z" />
1219 <glyph glyph-name="apple" unicode="&#xf179;" horiz-adv-x="1408"
1220d="M1393 321q-39 -125 -123 -250q-129 -196 -257 -196q-49 0 -140 32q-86 32 -151 32q-61 0 -142 -33q-81 -34 -132 -34q-152 0 -301 259q-147 261 -147 503q0 228 113 374q113 144 284 144q72 0 177 -30q104 -30 138 -30q45 0 143 34q102 34 173 34q119 0 213 -65
1221q52 -36 104 -100q-79 -67 -114 -118q-65 -94 -65 -207q0 -124 69 -223t158 -126zM1017 1494q0 -61 -29 -136q-30 -75 -93 -138q-54 -54 -108 -72q-37 -11 -104 -17q3 149 78 257q74 107 250 148q1 -3 2.5 -11t2.5 -11q0 -4 0.5 -10t0.5 -10z" />
1222 <glyph glyph-name="windows" unicode="&#xf17a;" horiz-adv-x="1664"
1223d="M682 530v-651l-682 94v557h682zM682 1273v-659h-682v565zM1664 530v-786l-907 125v661h907zM1664 1408v-794h-907v669z" />
1224 <glyph glyph-name="android" unicode="&#xf17b;" horiz-adv-x="1408"
1225d="M493 1053q16 0 27.5 11.5t11.5 27.5t-11.5 27.5t-27.5 11.5t-27 -11.5t-11 -27.5t11 -27.5t27 -11.5zM915 1053q16 0 27 11.5t11 27.5t-11 27.5t-27 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27.5t27.5 -11.5zM103 869q42 0 72 -30t30 -72v-430q0 -43 -29.5 -73t-72.5 -30
1226t-73 30t-30 73v430q0 42 30 72t73 30zM1163 850v-666q0 -46 -32 -78t-77 -32h-75v-227q0 -43 -30 -73t-73 -30t-73 30t-30 73v227h-138v-227q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73l-1 227h-74q-46 0 -78 32t-32 78v666h918zM931 1255q107 -55 171 -153.5t64 -215.5
1227h-925q0 117 64 215.5t172 153.5l-71 131q-7 13 5 20q13 6 20 -6l72 -132q95 42 201 42t201 -42l72 132q7 12 20 6q12 -7 5 -20zM1408 767v-430q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73v430q0 43 30 72.5t72 29.5q43 0 73 -29.5t30 -72.5z" />
1228 <glyph glyph-name="linux" unicode="&#xf17c;"
1229d="M663 1125q-11 -1 -15.5 -10.5t-8.5 -9.5q-5 -1 -5 5q0 12 19 15h10zM750 1111q-4 -1 -11.5 6.5t-17.5 4.5q24 11 32 -2q3 -6 -3 -9zM399 684q-4 1 -6 -3t-4.5 -12.5t-5.5 -13.5t-10 -13q-10 -11 -1 -12q4 -1 12.5 7t12.5 18q1 3 2 7t2 6t1.5 4.5t0.5 4v3t-1 2.5t-3 2z
1230M1254 325q0 18 -55 42q4 15 7.5 27.5t5 26t3 21.5t0.5 22.5t-1 19.5t-3.5 22t-4 20.5t-5 25t-5.5 26.5q-10 48 -47 103t-72 75q24 -20 57 -83q87 -162 54 -278q-11 -40 -50 -42q-31 -4 -38.5 18.5t-8 83.5t-11.5 107q-9 39 -19.5 69t-19.5 45.5t-15.5 24.5t-13 15t-7.5 7
1231q-14 62 -31 103t-29.5 56t-23.5 33t-15 40q-4 21 6 53.5t4.5 49.5t-44.5 25q-15 3 -44.5 18t-35.5 16q-8 1 -11 26t8 51t36 27q37 3 51 -30t4 -58q-11 -19 -2 -26.5t30 -0.5q13 4 13 36v37q-5 30 -13.5 50t-21 30.5t-23.5 15t-27 7.5q-107 -8 -89 -134q0 -15 -1 -15
1232q-9 9 -29.5 10.5t-33 -0.5t-15.5 5q1 57 -16 90t-45 34q-27 1 -41.5 -27.5t-16.5 -59.5q-1 -15 3.5 -37t13 -37.5t15.5 -13.5q10 3 16 14q4 9 -7 8q-7 0 -15.5 14.5t-9.5 33.5q-1 22 9 37t34 14q17 0 27 -21t9.5 -39t-1.5 -22q-22 -15 -31 -29q-8 -12 -27.5 -23.5
1233t-20.5 -12.5q-13 -14 -15.5 -27t7.5 -18q14 -8 25 -19.5t16 -19t18.5 -13t35.5 -6.5q47 -2 102 15q2 1 23 7t34.5 10.5t29.5 13t21 17.5q9 14 20 8q5 -3 6.5 -8.5t-3 -12t-16.5 -9.5q-20 -6 -56.5 -21.5t-45.5 -19.5q-44 -19 -70 -23q-25 -5 -79 2q-10 2 -9 -2t17 -19
1234q25 -23 67 -22q17 1 36 7t36 14t33.5 17.5t30 17t24.5 12t17.5 2.5t8.5 -11q0 -2 -1 -4.5t-4 -5t-6 -4.5t-8.5 -5t-9 -4.5t-10 -5t-9.5 -4.5q-28 -14 -67.5 -44t-66.5 -43t-49 -1q-21 11 -63 73q-22 31 -25 22q-1 -3 -1 -10q0 -25 -15 -56.5t-29.5 -55.5t-21 -58t11.5 -63
1235q-23 -6 -62.5 -90t-47.5 -141q-2 -18 -1.5 -69t-5.5 -59q-8 -24 -29 -3q-32 31 -36 94q-2 28 4 56q4 19 -1 18q-2 -1 -4 -5q-36 -65 10 -166q5 -12 25 -28t24 -20q20 -23 104 -90.5t93 -76.5q16 -15 17.5 -38t-14 -43t-45.5 -23q8 -15 29 -44.5t28 -54t7 -70.5q46 24 7 92
1236q-4 8 -10.5 16t-9.5 12t-2 6q3 5 13 9.5t20 -2.5q46 -52 166 -36q133 15 177 87q23 38 34 30q12 -6 10 -52q-1 -25 -23 -92q-9 -23 -6 -37.5t24 -15.5q3 19 14.5 77t13.5 90q2 21 -6.5 73.5t-7.5 97t23 70.5q15 18 51 18q1 37 34.5 53t72.5 10.5t60 -22.5zM626 1152
1237q3 17 -2.5 30t-11.5 15q-9 2 -9 -7q2 -5 5 -6q10 0 7 -15q-3 -20 8 -20q3 0 3 3zM1045 955q-2 8 -6.5 11.5t-13 5t-14.5 5.5q-5 3 -9.5 8t-7 8t-5.5 6.5t-4 4t-4 -1.5q-14 -16 7 -43.5t39 -31.5q9 -1 14.5 8t3.5 20zM867 1168q0 11 -5 19.5t-11 12.5t-9 3q-6 0 -8 -2t0 -4
1238t5 -3q14 -4 18 -31q0 -3 8 2q2 2 2 3zM921 1401q0 2 -2.5 5t-9 7t-9.5 6q-15 15 -24 15q-9 -1 -11.5 -7.5t-1 -13t-0.5 -12.5q-1 -4 -6 -10.5t-6 -9t3 -8.5q4 -3 8 0t11 9t15 9q1 1 9 1t15 2t9 7zM1486 60q20 -12 31 -24.5t12 -24t-2.5 -22.5t-15.5 -22t-23.5 -19.5
1239t-30 -18.5t-31.5 -16.5t-32 -15.5t-27 -13q-38 -19 -85.5 -56t-75.5 -64q-17 -16 -68 -19.5t-89 14.5q-18 9 -29.5 23.5t-16.5 25.5t-22 19.5t-47 9.5q-44 1 -130 1q-19 0 -57 -1.5t-58 -2.5q-44 -1 -79.5 -15t-53.5 -30t-43.5 -28.5t-53.5 -11.5q-29 1 -111 31t-146 43
1240q-19 4 -51 9.5t-50 9t-39.5 9.5t-33.5 14.5t-17 19.5q-10 23 7 66.5t18 54.5q1 16 -4 40t-10 42.5t-4.5 36.5t10.5 27q14 12 57 14t60 12q30 18 42 35t12 51q21 -73 -32 -106q-32 -20 -83 -15q-34 3 -43 -10q-13 -15 5 -57q2 -6 8 -18t8.5 -18t4.5 -17t1 -22q0 -15 -17 -49
1241t-14 -48q3 -17 37 -26q20 -6 84.5 -18.5t99.5 -20.5q24 -6 74 -22t82.5 -23t55.5 -4q43 6 64.5 28t23 48t-7.5 58.5t-19 52t-20 36.5q-121 190 -169 242q-68 74 -113 40q-11 -9 -15 15q-3 16 -2 38q1 29 10 52t24 47t22 42q8 21 26.5 72t29.5 78t30 61t39 54
1242q110 143 124 195q-12 112 -16 310q-2 90 24 151.5t106 104.5q39 21 104 21q53 1 106 -13.5t89 -41.5q57 -42 91.5 -121.5t29.5 -147.5q-5 -95 30 -214q34 -113 133 -218q55 -59 99.5 -163t59.5 -191q8 -49 5 -84.5t-12 -55.5t-20 -22q-10 -2 -23.5 -19t-27 -35.5
1243t-40.5 -33.5t-61 -14q-18 1 -31.5 5t-22.5 13.5t-13.5 15.5t-11.5 20.5t-9 19.5q-22 37 -41 30t-28 -49t7 -97q20 -70 1 -195q-10 -65 18 -100.5t73 -33t85 35.5q59 49 89.5 66.5t103.5 42.5q53 18 77 36.5t18.5 34.5t-25 28.5t-51.5 23.5q-33 11 -49.5 48t-15 72.5
1244t15.5 47.5q1 -31 8 -56.5t14.5 -40.5t20.5 -28.5t21 -19t21.5 -13t16.5 -9.5z" />
1245 <glyph glyph-name="dribble" unicode="&#xf17d;"
1246d="M1024 36q-42 241 -140 498h-2l-2 -1q-16 -6 -43 -16.5t-101 -49t-137 -82t-131 -114.5t-103 -148l-15 11q184 -150 418 -150q132 0 256 52zM839 643q-21 49 -53 111q-311 -93 -673 -93q-1 -7 -1 -21q0 -124 44 -236.5t124 -201.5q50 89 123.5 166.5t142.5 124.5t130.5 81
1247t99.5 48l37 13q4 1 13 3.5t13 4.5zM732 855q-120 213 -244 378q-138 -65 -234 -186t-128 -272q302 0 606 80zM1416 536q-210 60 -409 29q87 -239 128 -469q111 75 185 189.5t96 250.5zM611 1277q-1 0 -2 -1q1 1 2 1zM1201 1132q-185 164 -433 164q-76 0 -155 -19
1248q131 -170 246 -382q69 26 130 60.5t96.5 61.5t65.5 57t37.5 40.5zM1424 647q-3 232 -149 410l-1 -1q-9 -12 -19 -24.5t-43.5 -44.5t-71 -60.5t-100 -65t-131.5 -64.5q25 -53 44 -95q2 -5 6.5 -17t7.5 -17q36 5 74.5 7t73.5 2t69 -1.5t64 -4t56.5 -5.5t48 -6.5t36.5 -6
1249t25 -4.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1250 <glyph glyph-name="skype" unicode="&#xf17e;"
1251d="M1173 473q0 50 -19.5 91.5t-48.5 68.5t-73 49t-82.5 34t-87.5 23l-104 24q-30 7 -44 10.5t-35 11.5t-30 16t-16.5 21t-7.5 30q0 77 144 77q43 0 77 -12t54 -28.5t38 -33.5t40 -29t48 -12q47 0 75.5 32t28.5 77q0 55 -56 99.5t-142 67.5t-182 23q-68 0 -132 -15.5
1252t-119.5 -47t-89 -87t-33.5 -128.5q0 -61 19 -106.5t56 -75.5t80 -48.5t103 -32.5l146 -36q90 -22 112 -36q32 -20 32 -60q0 -39 -40 -64.5t-105 -25.5q-51 0 -91.5 16t-65 38.5t-45.5 45t-46 38.5t-54 16q-50 0 -75.5 -30t-25.5 -75q0 -92 122 -157.5t291 -65.5
1253q73 0 140 18.5t122.5 53.5t88.5 93.5t33 131.5zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5q-130 0 -234 80q-77 -16 -150 -16q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5q0 73 16 150q-80 104 -80 234q0 159 112.5 271.5t271.5 112.5q130 0 234 -80
1254q77 16 150 16q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -73 -16 -150q80 -104 80 -234z" />
1255 <glyph glyph-name="foursquare" unicode="&#xf180;" horiz-adv-x="1280"
1256d="M1000 1102l37 194q5 23 -9 40t-35 17h-712q-23 0 -38.5 -17t-15.5 -37v-1101q0 -7 6 -1l291 352q23 26 38 33.5t48 7.5h239q22 0 37 14.5t18 29.5q24 130 37 191q4 21 -11.5 40t-36.5 19h-294q-29 0 -48 19t-19 48v42q0 29 19 47.5t48 18.5h346q18 0 35 13.5t20 29.5z
1257M1227 1324q-15 -73 -53.5 -266.5t-69.5 -350t-35 -173.5q-6 -22 -9 -32.5t-14 -32.5t-24.5 -33t-38.5 -21t-58 -10h-271q-13 0 -22 -10q-8 -9 -426 -494q-22 -25 -58.5 -28.5t-48.5 5.5q-55 22 -55 98v1410q0 55 38 102.5t120 47.5h888q95 0 127 -53t10 -159zM1227 1324
1258l-158 -790q4 17 35 173.5t69.5 350t53.5 266.5z" />
1259 <glyph glyph-name="trello" unicode="&#xf181;"
1260d="M704 192v1024q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-1024q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1376 576v640q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-640q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408
1261q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
1262 <glyph glyph-name="female" unicode="&#xf182;" horiz-adv-x="1280"
1263d="M1280 480q0 -40 -28 -68t-68 -28q-51 0 -80 43l-227 341h-45v-132l247 -411q9 -15 9 -33q0 -26 -19 -45t-45 -19h-192v-272q0 -46 -33 -79t-79 -33h-160q-46 0 -79 33t-33 79v272h-192q-26 0 -45 19t-19 45q0 18 9 33l247 411v132h-45l-227 -341q-29 -43 -80 -43
1264q-40 0 -68 28t-28 68q0 29 16 53l256 384q73 107 176 107h384q103 0 176 -107l256 -384q16 -24 16 -53zM864 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
1265 <glyph glyph-name="male" unicode="&#xf183;" horiz-adv-x="1024"
1266d="M1024 832v-416q0 -40 -28 -68t-68 -28t-68 28t-28 68v352h-64v-912q0 -46 -33 -79t-79 -33t-79 33t-33 79v464h-64v-464q0 -46 -33 -79t-79 -33t-79 33t-33 79v912h-64v-352q0 -40 -28 -68t-68 -28t-68 28t-28 68v416q0 80 56 136t136 56h640q80 0 136 -56t56 -136z
1267M736 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
1268 <glyph glyph-name="gittip" unicode="&#xf184;"
1269d="M773 234l350 473q16 22 24.5 59t-6 85t-61.5 79q-40 26 -83 25.5t-73.5 -17.5t-54.5 -45q-36 -40 -96 -40q-59 0 -95 40q-24 28 -54.5 45t-73.5 17.5t-84 -25.5q-46 -31 -60.5 -79t-6 -85t24.5 -59zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103
1270t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1271 <glyph glyph-name="sun" unicode="&#xf185;" horiz-adv-x="1792"
1272d="M1472 640q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5t223.5 45.5t184 123t123 184t45.5 223.5zM1748 363q-4 -15 -20 -20l-292 -96v-306q0 -16 -13 -26q-15 -10 -29 -4
1273l-292 94l-180 -248q-10 -13 -26 -13t-26 13l-180 248l-292 -94q-14 -6 -29 4q-13 10 -13 26v306l-292 96q-16 5 -20 20q-5 17 4 29l180 248l-180 248q-9 13 -4 29q4 15 20 20l292 96v306q0 16 13 26q15 10 29 4l292 -94l180 248q9 12 26 12t26 -12l180 -248l292 94
1274q14 6 29 -4q13 -10 13 -26v-306l292 -96q16 -5 20 -20q5 -16 -4 -29l-180 -248l180 -248q9 -12 4 -29z" />
1275 <glyph glyph-name="_366" unicode="&#xf186;"
1276d="M1262 233q-54 -9 -110 -9q-182 0 -337 90t-245 245t-90 337q0 192 104 357q-201 -60 -328.5 -229t-127.5 -384q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51q144 0 273.5 61.5t220.5 171.5zM1465 318q-94 -203 -283.5 -324.5t-413.5 -121.5q-156 0 -298 61
1277t-245 164t-164 245t-61 298q0 153 57.5 292.5t156 241.5t235.5 164.5t290 68.5q44 2 61 -39q18 -41 -15 -72q-86 -78 -131.5 -181.5t-45.5 -218.5q0 -148 73 -273t198 -198t273 -73q118 0 228 51q41 18 72 -13q14 -14 17.5 -34t-4.5 -38z" />
1278 <glyph glyph-name="archive" unicode="&#xf187;" horiz-adv-x="1792"
1279d="M1088 704q0 26 -19 45t-45 19h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19h256q26 0 45 19t19 45zM1664 896v-960q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v960q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1728 1344v-256q0 -26 -19 -45t-45 -19h-1536
1280q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1536q26 0 45 -19t19 -45z" />
1281 <glyph glyph-name="bug" unicode="&#xf188;" horiz-adv-x="1664"
1282d="M1632 576q0 -26 -19 -45t-45 -19h-224q0 -171 -67 -290l208 -209q19 -19 19 -45t-19 -45q-18 -19 -45 -19t-45 19l-198 197q-5 -5 -15 -13t-42 -28.5t-65 -36.5t-82 -29t-97 -13v896h-128v-896q-51 0 -101.5 13.5t-87 33t-66 39t-43.5 32.5l-15 14l-183 -207
1283q-20 -21 -48 -21q-24 0 -43 16q-19 18 -20.5 44.5t15.5 46.5l202 227q-58 114 -58 274h-224q-26 0 -45 19t-19 45t19 45t45 19h224v294l-173 173q-19 19 -19 45t19 45t45 19t45 -19l173 -173h844l173 173q19 19 45 19t45 -19t19 -45t-19 -45l-173 -173v-294h224q26 0 45 -19
1284t19 -45zM1152 1152h-640q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5z" />
1285 <glyph glyph-name="vk" unicode="&#xf189;" horiz-adv-x="1920"
1286d="M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-40 -51 -55 -72t-30.5 -49.5t-12 -42t13 -34.5t32.5 -43t57 -53q4 -2 5 -4q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58
1287t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6
1288q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q16 19 38 30q53 26 239 24
1289q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2
1290q39 5 64 -2.5t31 -16.5z" />
1291 <glyph glyph-name="weibo" unicode="&#xf18a;" horiz-adv-x="1792"
1292d="M675 252q21 34 11 69t-45 50q-34 14 -73 1t-60 -46q-22 -34 -13 -68.5t43 -50.5t74.5 -2.5t62.5 47.5zM769 373q8 13 3.5 26.5t-17.5 18.5q-14 5 -28.5 -0.5t-21.5 -18.5q-17 -31 13 -45q14 -5 29 0.5t22 18.5zM943 266q-45 -102 -158 -150t-224 -12
1293q-107 34 -147.5 126.5t6.5 187.5q47 93 151.5 139t210.5 19q111 -29 158.5 -119.5t2.5 -190.5zM1255 426q-9 96 -89 170t-208.5 109t-274.5 21q-223 -23 -369.5 -141.5t-132.5 -264.5q9 -96 89 -170t208.5 -109t274.5 -21q223 23 369.5 141.5t132.5 264.5zM1563 422
1294q0 -68 -37 -139.5t-109 -137t-168.5 -117.5t-226 -83t-270.5 -31t-275 33.5t-240.5 93t-171.5 151t-65 199.5q0 115 69.5 245t197.5 258q169 169 341.5 236t246.5 -7q65 -64 20 -209q-4 -14 -1 -20t10 -7t14.5 0.5t13.5 3.5l6 2q139 59 246 59t153 -61q45 -63 0 -178
1295q-2 -13 -4.5 -20t4.5 -12.5t12 -7.5t17 -6q57 -18 103 -47t80 -81.5t34 -116.5zM1489 1046q42 -47 54.5 -108.5t-6.5 -117.5q-8 -23 -29.5 -34t-44.5 -4q-23 8 -34 29.5t-4 44.5q20 63 -24 111t-107 35q-24 -5 -45 8t-25 37q-5 24 8 44.5t37 25.5q60 13 119 -5.5t101 -65.5z
1296M1670 1209q87 -96 112.5 -222.5t-13.5 -241.5q-9 -27 -34 -40t-52 -4t-40 34t-5 52q28 82 10 172t-80 158q-62 69 -148 95.5t-173 8.5q-28 -6 -52 9.5t-30 43.5t9.5 51.5t43.5 29.5q123 26 244 -11.5t208 -134.5z" />
1297 <glyph glyph-name="renren" unicode="&#xf18b;"
1298d="M1133 -34q-171 -94 -368 -94q-196 0 -367 94q138 87 235.5 211t131.5 268q35 -144 132.5 -268t235.5 -211zM638 1394v-485q0 -252 -126.5 -459.5t-330.5 -306.5q-181 215 -181 495q0 187 83.5 349.5t229.5 269.5t325 137zM1536 638q0 -280 -181 -495
1299q-204 99 -330.5 306.5t-126.5 459.5v485q179 -30 325 -137t229.5 -269.5t83.5 -349.5z" />
1300 <glyph glyph-name="_372" unicode="&#xf18c;" horiz-adv-x="1408"
1301d="M1402 433q-32 -80 -76 -138t-91 -88.5t-99 -46.5t-101.5 -14.5t-96.5 8.5t-86.5 22t-69.5 27.5t-46 22.5l-17 10q-113 -228 -289.5 -359.5t-384.5 -132.5q-19 0 -32 13t-13 32t13 31.5t32 12.5q173 1 322.5 107.5t251.5 294.5q-36 -14 -72 -23t-83 -13t-91 2.5t-93 28.5
1302t-92 59t-84.5 100t-74.5 146q114 47 214 57t167.5 -7.5t124.5 -56.5t88.5 -77t56.5 -82q53 131 79 291q-7 -1 -18 -2.5t-46.5 -2.5t-69.5 0.5t-81.5 10t-88.5 23t-84 42.5t-75 65t-54.5 94.5t-28.5 127.5q70 28 133.5 36.5t112.5 -1t92 -30t73.5 -50t56 -61t42 -63t27.5 -56
1303t16 -39.5l4 -16q12 122 12 195q-8 6 -21.5 16t-49 44.5t-63.5 71.5t-54 93t-33 112.5t12 127t70 138.5q73 -25 127.5 -61.5t84.5 -76.5t48 -85t20.5 -89t-0.5 -85.5t-13 -76.5t-19 -62t-17 -42l-7 -15q1 -4 1 -50t-1 -72q3 7 10 18.5t30.5 43t50.5 58t71 55.5t91.5 44.5
1304t112 14.5t132.5 -24q-2 -78 -21.5 -141.5t-50 -104.5t-69.5 -71.5t-81.5 -45.5t-84.5 -24t-80 -9.5t-67.5 1t-46.5 4.5l-17 3q-23 -147 -73 -283q6 7 18 18.5t49.5 41t77.5 52.5t99.5 42t117.5 20t129 -23.5t137 -77.5z" />
1305 <glyph glyph-name="stack_exchange" unicode="&#xf18d;" horiz-adv-x="1280"
1306d="M1259 283v-66q0 -85 -57.5 -144.5t-138.5 -59.5h-57l-260 -269v269h-529q-81 0 -138.5 59.5t-57.5 144.5v66h1238zM1259 609v-255h-1238v255h1238zM1259 937v-255h-1238v255h1238zM1259 1077v-67h-1238v67q0 84 57.5 143.5t138.5 59.5h846q81 0 138.5 -59.5t57.5 -143.5z
1307" />
1308 <glyph glyph-name="_374" unicode="&#xf18e;"
1309d="M1152 640q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198
1310t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1311 <glyph glyph-name="arrow_circle_alt_left" unicode="&#xf190;"
1312d="M1152 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-192q0 -14 -9 -23t-23 -9q-12 0 -24 10l-319 319q-9 9 -9 23t9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h352q13 0 22.5 -9.5t9.5 -22.5zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198
1313t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1314 <glyph glyph-name="_376" unicode="&#xf191;"
1315d="M1024 960v-640q0 -26 -19 -45t-45 -19q-20 0 -37 12l-448 320q-27 19 -27 52t27 52l448 320q17 12 37 12q26 0 45 -19t19 -45zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5z
1316M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1317 <glyph glyph-name="dot_circle_alt" unicode="&#xf192;"
1318d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5
1319t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1320 <glyph glyph-name="_378" unicode="&#xf193;" horiz-adv-x="1664"
1321d="M1023 349l102 -204q-58 -179 -210 -290t-339 -111q-156 0 -288.5 77.5t-210 210t-77.5 288.5q0 181 104.5 330t274.5 211l17 -131q-122 -54 -195 -165.5t-73 -244.5q0 -185 131.5 -316.5t316.5 -131.5q126 0 232.5 65t165 175.5t49.5 236.5zM1571 249l58 -114l-256 -128
1322q-13 -7 -29 -7q-40 0 -57 35l-239 477h-472q-24 0 -42.5 16.5t-21.5 40.5l-96 779q-2 17 6 42q14 51 57 82.5t97 31.5q66 0 113 -47t47 -113q0 -69 -52 -117.5t-120 -41.5l37 -289h423v-128h-407l16 -128h455q40 0 57 -35l228 -455z" />
1323 <glyph glyph-name="vimeo_square" unicode="&#xf194;"
1324d="M1292 898q10 216 -161 222q-231 8 -312 -261q44 19 82 19q85 0 74 -96q-4 -57 -74 -167t-105 -110q-43 0 -82 169q-13 54 -45 255q-30 189 -160 177q-59 -7 -164 -100l-81 -72l-81 -72l52 -67q76 52 87 52q57 0 107 -179q15 -55 45 -164.5t45 -164.5q68 -179 164 -179
1325q157 0 383 294q220 283 226 444zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1326 <glyph glyph-name="_380" unicode="&#xf195;" horiz-adv-x="1152"
1327d="M1152 704q0 -191 -94.5 -353t-256.5 -256.5t-353 -94.5h-160q-14 0 -23 9t-9 23v611l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v93l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v250q0 14 9 23t23 9h160
1328q14 0 23 -9t9 -23v-181l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-93l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-487q188 13 318 151t130 328q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
1329 <glyph glyph-name="plus_square_o" unicode="&#xf196;" horiz-adv-x="1408"
1330d="M1152 736v-64q0 -14 -9 -23t-23 -9h-352v-352q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v352h-352q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h352v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-352h352q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832
1331q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
1332 <glyph glyph-name="_382" unicode="&#xf197;" horiz-adv-x="2176"
1333d="M620 416q-110 -64 -268 -64h-128v64h-64q-13 0 -22.5 23.5t-9.5 56.5q0 24 7 49q-58 2 -96.5 10.5t-38.5 20.5t38.5 20.5t96.5 10.5q-7 25 -7 49q0 33 9.5 56.5t22.5 23.5h64v64h128q158 0 268 -64h1113q42 -7 106.5 -18t80.5 -14q89 -15 150 -40.5t83.5 -47.5t22.5 -40
1334t-22.5 -40t-83.5 -47.5t-150 -40.5q-16 -3 -80.5 -14t-106.5 -18h-1113zM1739 668q53 -36 53 -92t-53 -92l81 -30q68 48 68 122t-68 122zM625 400h1015q-217 -38 -456 -80q-57 0 -113 -24t-83 -48l-28 -24l-288 -288q-26 -26 -70.5 -45t-89.5 -19h-96l-93 464h29
1335q157 0 273 64zM352 816h-29l93 464h96q46 0 90 -19t70 -45l288 -288q4 -4 11 -10.5t30.5 -23t48.5 -29t61.5 -23t72.5 -10.5l456 -80h-1015q-116 64 -273 64z" />
1336 <glyph glyph-name="_383" unicode="&#xf198;" horiz-adv-x="1664"
1337d="M1519 760q62 0 103.5 -40.5t41.5 -101.5q0 -97 -93 -130l-172 -59l56 -167q7 -21 7 -47q0 -59 -42 -102t-101 -43q-47 0 -85.5 27t-53.5 72l-55 165l-310 -106l55 -164q8 -24 8 -47q0 -59 -42 -102t-102 -43q-47 0 -85 27t-53 72l-55 163l-153 -53q-29 -9 -50 -9
1338q-61 0 -101.5 40t-40.5 101q0 47 27.5 85t71.5 53l156 53l-105 313l-156 -54q-26 -8 -48 -8q-60 0 -101 40.5t-41 100.5q0 47 27.5 85t71.5 53l157 53l-53 159q-8 24 -8 47q0 60 42 102.5t102 42.5q47 0 85 -27t53 -72l54 -160l310 105l-54 160q-8 24 -8 47q0 59 42.5 102
1339t101.5 43q47 0 85.5 -27.5t53.5 -71.5l53 -161l162 55q21 6 43 6q60 0 102.5 -39.5t42.5 -98.5q0 -45 -30 -81.5t-74 -51.5l-157 -54l105 -316l164 56q24 8 46 8zM725 498l310 105l-105 315l-310 -107z" />
1340 <glyph glyph-name="_384" unicode="&#xf199;"
1341d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM1280 352v436q-31 -35 -64 -55q-34 -22 -132.5 -85t-151.5 -99q-98 -69 -164 -69v0v0q-66 0 -164 69
1342q-47 32 -142 92.5t-142 92.5q-12 8 -33 27t-31 27v-436q0 -40 28 -68t68 -28h832q40 0 68 28t28 68zM1280 925q0 41 -27.5 70t-68.5 29h-832q-40 0 -68 -28t-28 -68q0 -37 30.5 -76.5t67.5 -64.5q47 -32 137.5 -89t129.5 -83q3 -2 17 -11.5t21 -14t21 -13t23.5 -13
1343t21.5 -9.5t22.5 -7.5t20.5 -2.5t20.5 2.5t22.5 7.5t21.5 9.5t23.5 13t21 13t21 14t17 11.5l267 174q35 23 66.5 62.5t31.5 73.5z" />
1344 <glyph glyph-name="_385" unicode="&#xf19a;" horiz-adv-x="1792"
1345d="M127 640q0 163 67 313l367 -1005q-196 95 -315 281t-119 411zM1415 679q0 -19 -2.5 -38.5t-10 -49.5t-11.5 -44t-17.5 -59t-17.5 -58l-76 -256l-278 826q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-75 1 -202 10q-12 1 -20.5 -5t-11.5 -15t-1.5 -18.5t9 -16.5
1346t19.5 -8l80 -8l120 -328l-168 -504l-280 832q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-7 0 -23 0.5t-26 0.5q105 160 274.5 253.5t367.5 93.5q147 0 280.5 -53t238.5 -149h-10q-55 0 -92 -40.5t-37 -95.5q0 -12 2 -24t4 -21.5t8 -23t9 -21t12 -22.5t12.5 -21
1347t14.5 -24t14 -23q63 -107 63 -212zM909 573l237 -647q1 -6 5 -11q-126 -44 -255 -44q-112 0 -217 32zM1570 1009q95 -174 95 -369q0 -209 -104 -385.5t-279 -278.5l235 678q59 169 59 276q0 42 -6 79zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286
1348t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 -215q173 0 331.5 68t273 182.5t182.5 273t68 331.5t-68 331.5t-182.5 273t-273 182.5t-331.5 68t-331.5 -68t-273 -182.5t-182.5 -273t-68 -331.5t68 -331.5t182.5 -273
1349t273 -182.5t331.5 -68z" />
1350 <glyph glyph-name="_386" unicode="&#xf19b;" horiz-adv-x="1792"
1351d="M1086 1536v-1536l-272 -128q-228 20 -414 102t-293 208.5t-107 272.5q0 140 100.5 263.5t275 205.5t391.5 108v-172q-217 -38 -356.5 -150t-139.5 -255q0 -152 154.5 -267t388.5 -145v1360zM1755 954l37 -390l-525 114l147 83q-119 70 -280 99v172q277 -33 481 -157z" />
1352 <glyph glyph-name="_387" unicode="&#xf19c;" horiz-adv-x="2048"
1353d="M960 1536l960 -384v-128h-128q0 -26 -20.5 -45t-48.5 -19h-1526q-28 0 -48.5 19t-20.5 45h-128v128zM256 896h256v-768h128v768h256v-768h128v768h256v-768h128v768h256v-768h59q28 0 48.5 -19t20.5 -45v-64h-1664v64q0 26 20.5 45t48.5 19h59v768zM1851 -64
1354q28 0 48.5 -19t20.5 -45v-128h-1920v128q0 26 20.5 45t48.5 19h1782z" />
1355 <glyph glyph-name="_388" unicode="&#xf19d;" horiz-adv-x="2304"
1356d="M1774 700l18 -316q4 -69 -82 -128t-235 -93.5t-323 -34.5t-323 34.5t-235 93.5t-82 128l18 316l574 -181q22 -7 48 -7t48 7zM2304 1024q0 -23 -22 -31l-1120 -352q-4 -1 -10 -1t-10 1l-652 206q-43 -34 -71 -111.5t-34 -178.5q63 -36 63 -109q0 -69 -58 -107l58 -433
1357q2 -14 -8 -25q-9 -11 -24 -11h-192q-15 0 -24 11q-10 11 -8 25l58 433q-58 38 -58 107q0 73 65 111q11 207 98 330l-333 104q-22 8 -22 31t22 31l1120 352q4 1 10 1t10 -1l1120 -352q22 -8 22 -31z" />
1358 <glyph glyph-name="_389" unicode="&#xf19e;"
1359d="M859 579l13 -707q-62 11 -105 11q-41 0 -105 -11l13 707q-40 69 -168.5 295.5t-216.5 374.5t-181 287q58 -15 108 -15q44 0 111 15q63 -111 133.5 -229.5t167 -276.5t138.5 -227q37 61 109.5 177.5t117.5 190t105 176t107 189.5q54 -14 107 -14q56 0 114 14v0
1360q-28 -39 -60 -88.5t-49.5 -78.5t-56.5 -96t-49 -84q-146 -248 -353 -610z" />
1361 <glyph glyph-name="uniF1A0" unicode="&#xf1a0;"
1362d="M768 750h725q12 -67 12 -128q0 -217 -91 -387.5t-259.5 -266.5t-386.5 -96q-157 0 -299 60.5t-245 163.5t-163.5 245t-60.5 299t60.5 299t163.5 245t245 163.5t299 60.5q300 0 515 -201l-209 -201q-123 119 -306 119q-129 0 -238.5 -65t-173.5 -176.5t-64 -243.5
1363t64 -243.5t173.5 -176.5t238.5 -65q87 0 160 24t120 60t82 82t51.5 87t22.5 78h-436v264z" />
1364 <glyph glyph-name="f1a1" unicode="&#xf1a1;" horiz-adv-x="1792"
1365d="M1095 369q16 -16 0 -31q-62 -62 -199 -62t-199 62q-16 15 0 31q6 6 15 6t15 -6q48 -49 169 -49q120 0 169 49q6 6 15 6t15 -6zM788 550q0 -37 -26 -63t-63 -26t-63.5 26t-26.5 63q0 38 26.5 64t63.5 26t63 -26.5t26 -63.5zM1183 550q0 -37 -26.5 -63t-63.5 -26t-63 26
1366t-26 63t26 63.5t63 26.5t63.5 -26t26.5 -64zM1434 670q0 49 -35 84t-85 35t-86 -36q-130 90 -311 96l63 283l200 -45q0 -37 26 -63t63 -26t63.5 26.5t26.5 63.5t-26.5 63.5t-63.5 26.5q-54 0 -80 -50l-221 49q-19 5 -25 -16l-69 -312q-180 -7 -309 -97q-35 37 -87 37
1367q-50 0 -85 -35t-35 -84q0 -35 18.5 -64t49.5 -44q-6 -27 -6 -56q0 -142 140 -243t337 -101q198 0 338 101t140 243q0 32 -7 57q30 15 48 43.5t18 63.5zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191
1368t348 71t348 -71t286 -191t191 -286t71 -348z" />
1369 <glyph glyph-name="_392" unicode="&#xf1a2;"
1370d="M939 407q13 -13 0 -26q-53 -53 -171 -53t-171 53q-13 13 0 26q5 6 13 6t13 -6q42 -42 145 -42t145 42q5 6 13 6t13 -6zM676 563q0 -31 -23 -54t-54 -23t-54 23t-23 54q0 32 22.5 54.5t54.5 22.5t54.5 -22.5t22.5 -54.5zM1014 563q0 -31 -23 -54t-54 -23t-54 23t-23 54
1371q0 32 22.5 54.5t54.5 22.5t54.5 -22.5t22.5 -54.5zM1229 666q0 42 -30 72t-73 30q-42 0 -73 -31q-113 78 -267 82l54 243l171 -39q1 -32 23.5 -54t53.5 -22q32 0 54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5q-48 0 -69 -43l-189 42q-17 5 -21 -13l-60 -268q-154 -6 -265 -83
1372q-30 32 -74 32q-43 0 -73 -30t-30 -72q0 -30 16 -55t42 -38q-5 -25 -5 -48q0 -122 120 -208.5t289 -86.5q170 0 290 86.5t120 208.5q0 25 -6 49q25 13 40.5 37.5t15.5 54.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960
1373q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1374 <glyph glyph-name="_393" unicode="&#xf1a3;"
1375d="M866 697l90 27v62q0 79 -58 135t-138 56t-138 -55.5t-58 -134.5v-283q0 -20 -14 -33.5t-33 -13.5t-32.5 13.5t-13.5 33.5v120h-151v-122q0 -82 57.5 -139t139.5 -57q81 0 138.5 56.5t57.5 136.5v280q0 19 13.5 33t33.5 14q19 0 32.5 -14t13.5 -33v-54zM1199 502v122h-150
1376v-126q0 -20 -13.5 -33.5t-33.5 -13.5q-19 0 -32.5 14t-13.5 33v123l-90 -26l-60 28v-123q0 -80 58 -137t139 -57t138.5 57t57.5 139zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103
1377t385.5 -103t279.5 -279.5t103 -385.5z" />
1378 <glyph glyph-name="f1a4" unicode="&#xf1a4;" horiz-adv-x="1920"
1379d="M1062 824v118q0 42 -30 72t-72 30t-72 -30t-30 -72v-612q0 -175 -126 -299t-303 -124q-178 0 -303.5 125.5t-125.5 303.5v266h328v-262q0 -43 30 -72.5t72 -29.5t72 29.5t30 72.5v620q0 171 126.5 292t301.5 121q176 0 302 -122t126 -294v-136l-195 -58zM1592 602h328
1380v-266q0 -178 -125.5 -303.5t-303.5 -125.5q-177 0 -303 124.5t-126 300.5v268l131 -61l195 58v-270q0 -42 30 -71.5t72 -29.5t72 29.5t30 71.5v275z" />
1381 <glyph glyph-name="_395" unicode="&#xf1a5;"
1382d="M1472 160v480h-704v704h-480q-93 0 -158.5 -65.5t-65.5 -158.5v-480h704v-704h480q93 0 158.5 65.5t65.5 158.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5
1383t84.5 -203.5z" />
1384 <glyph glyph-name="_396" unicode="&#xf1a6;" horiz-adv-x="2048"
1385d="M328 1254h204v-983h-532v697h328v286zM328 435v369h-123v-369h123zM614 968v-697h205v697h-205zM614 1254v-204h205v204h-205zM901 968h533v-942h-533v163h328v82h-328v697zM1229 435v369h-123v-369h123zM1516 968h532v-942h-532v163h327v82h-327v697zM1843 435v369h-123
1386v-369h123z" />
1387 <glyph glyph-name="_397" unicode="&#xf1a7;"
1388d="M1046 516q0 -64 -38 -109t-91 -45q-43 0 -70 15v277q28 17 70 17q53 0 91 -45.5t38 -109.5zM703 944q0 -64 -38 -109.5t-91 -45.5q-43 0 -70 15v277q28 17 70 17q53 0 91 -45t38 -109zM1265 513q0 134 -88 229t-213 95q-20 0 -39 -3q-23 -78 -78 -136q-87 -95 -211 -101
1389v-636l211 41v206q51 -19 117 -19q125 0 213 95t88 229zM922 940q0 134 -88.5 229t-213.5 95q-74 0 -141 -36h-186v-840l211 41v206q55 -19 116 -19q125 0 213.5 95t88.5 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960
1390q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1391 <glyph glyph-name="_398" unicode="&#xf1a8;" horiz-adv-x="2038"
1392d="M1222 607q75 3 143.5 -20.5t118 -58.5t101 -94.5t84 -108t75.5 -120.5q33 -56 78.5 -109t75.5 -80.5t99 -88.5q-48 -30 -108.5 -57.5t-138.5 -59t-114 -47.5q-44 37 -74 115t-43.5 164.5t-33 180.5t-42.5 168.5t-72.5 123t-122.5 48.5l-10 -2l-6 -4q4 -5 13 -14
1393q6 -5 28 -23.5t25.5 -22t19 -18t18 -20.5t11.5 -21t10.5 -27.5t4.5 -31t4 -40.5l1 -33q1 -26 -2.5 -57.5t-7.5 -52t-12.5 -58.5t-11.5 -53q-35 1 -101 -9.5t-98 -10.5q-39 0 -72 10q-2 16 -2 47q0 74 3 96q2 13 31.5 41.5t57 59t26.5 51.5q-24 2 -43 -24
1394q-36 -53 -111.5 -99.5t-136.5 -46.5q-25 0 -75.5 63t-106.5 139.5t-84 96.5q-6 4 -27 30q-482 -112 -513 -112q-16 0 -28 11t-12 27q0 15 8.5 26.5t22.5 14.5l486 106q-8 14 -8 25t5.5 17.5t16 11.5t20 7t23 4.5t18.5 4.5q4 1 15.5 7.5t17.5 6.5q15 0 28 -16t20 -33
1395q163 37 172 37q17 0 29.5 -11t12.5 -28q0 -15 -8.5 -26t-23.5 -14l-182 -40l-1 -16q-1 -26 81.5 -117.5t104.5 -91.5q47 0 119 80t72 129q0 36 -23.5 53t-51 18.5t-51 11.5t-23.5 34q0 16 10 34l-68 19q43 44 43 117q0 26 -5 58q82 16 144 16q44 0 71.5 -1.5t48.5 -8.5
1396t31 -13.5t20.5 -24.5t15.5 -33.5t17 -47.5t24 -60l50 25q-3 -40 -23 -60t-42.5 -21t-40 -6.5t-16.5 -20.5zM1282 842q-5 5 -13.5 15.5t-12 14.5t-10.5 11.5t-10 10.5l-8 8t-8.5 7.5t-8 5t-8.5 4.5q-7 3 -14.5 5t-20.5 2.5t-22 0.5h-32.5h-37.5q-126 0 -217 -43
1397q16 30 36 46.5t54 29.5t65.5 36t46 36.5t50 55t43.5 50.5q12 -9 28 -31.5t32 -36.5t38 -13l12 1v-76l22 -1q247 95 371 190q28 21 50 39t42.5 37.5t33 31t29.5 34t24 31t24.5 37t23 38t27 47.5t29.5 53l7 9q-2 -53 -43 -139q-79 -165 -205 -264t-306 -142q-14 -3 -42 -7.5
1398t-50 -9.5t-39 -14q3 -19 24.5 -46t21.5 -34q0 -11 -26 -30zM1061 -79q39 26 131.5 47.5t146.5 21.5q9 0 22.5 -15.5t28 -42.5t26 -50t24 -51t14.5 -33q-121 -45 -244 -45q-61 0 -125 11zM822 568l48 12l109 -177l-73 -48zM1323 51q3 -15 3 -16q0 -7 -17.5 -14.5t-46 -13
1399t-54 -9.5t-53.5 -7.5t-32 -4.5l-7 43q21 2 60.5 8.5t72 10t60.5 3.5h14zM866 679l-96 -20l-6 17q10 1 32.5 7t34.5 6q19 0 35 -10zM1061 45h31l10 -83l-41 -12v95zM1950 1535v1v-1zM1950 1535l-1 -5l-2 -2l1 3zM1950 1535l1 1z" />
1400 <glyph glyph-name="_399" unicode="&#xf1a9;"
1401d="M1167 -50q-5 19 -24 5q-30 -22 -87 -39t-131 -17q-129 0 -193 49q-5 4 -13 4q-11 0 -26 -12q-7 -6 -7.5 -16t7.5 -20q34 -32 87.5 -46t102.5 -12.5t99 4.5q41 4 84.5 20.5t65 30t28.5 20.5q12 12 7 29zM1128 65q-19 47 -39 61q-23 15 -76 15q-47 0 -71 -10
1402q-29 -12 -78 -56q-26 -24 -12 -44q9 -8 17.5 -4.5t31.5 23.5q3 2 10.5 8.5t10.5 8.5t10 7t11.5 7t12.5 5t15 4.5t16.5 2.5t20.5 1q27 0 44.5 -7.5t23 -14.5t13.5 -22q10 -17 12.5 -20t12.5 1q23 12 14 34zM1483 346q0 22 -5 44.5t-16.5 45t-34 36.5t-52.5 14
1403q-33 0 -97 -41.5t-129 -83.5t-101 -42q-27 -1 -63.5 19t-76 49t-83.5 58t-100 49t-111 19q-115 -1 -197 -78.5t-84 -178.5q-2 -112 74 -164q29 -20 62.5 -28.5t103.5 -8.5q57 0 132 32.5t134 71t120 70.5t93 31q26 -1 65 -31.5t71.5 -67t68 -67.5t55.5 -32q35 -3 58.5 14
1404t55.5 63q28 41 42.5 101t14.5 106zM1536 506q0 -164 -62 -304.5t-166 -236t-242.5 -149.5t-290.5 -54t-293 57.5t-247.5 157t-170.5 241.5t-64 302q0 89 19.5 172.5t49 145.5t70.5 118.5t78.5 94t78.5 69.5t64.5 46.5t42.5 24.5q14 8 51 26.5t54.5 28.5t48 30t60.5 44
1405q36 28 58 72.5t30 125.5q129 -155 186 -193q44 -29 130 -68t129 -66q21 -13 39 -25t60.5 -46.5t76 -70.5t75 -95t69 -122t47 -148.5t19.5 -177.5z" />
1406 <glyph glyph-name="_400" unicode="&#xf1aa;"
1407d="M1070 463l-160 -160l-151 -152l-30 -30q-65 -64 -151.5 -87t-171.5 -2q-16 -70 -72 -115t-129 -45q-85 0 -145 60.5t-60 145.5q0 72 44.5 128t113.5 72q-22 86 1 173t88 152l12 12l151 -152l-11 -11q-37 -37 -37 -89t37 -90q37 -37 89 -37t89 37l30 30l151 152l161 160z
1408M729 1145l12 -12l-152 -152l-12 12q-37 37 -89 37t-89 -37t-37 -89.5t37 -89.5l29 -29l152 -152l160 -160l-151 -152l-161 160l-151 152l-30 30q-68 67 -90 159.5t5 179.5q-70 15 -115 71t-45 129q0 85 60 145.5t145 60.5q76 0 133.5 -49t69.5 -123q84 20 169.5 -3.5
1409t149.5 -87.5zM1536 78q0 -85 -60 -145.5t-145 -60.5q-74 0 -131 47t-71 118q-86 -28 -179.5 -6t-161.5 90l-11 12l151 152l12 -12q37 -37 89 -37t89 37t37 89t-37 89l-30 30l-152 152l-160 160l152 152l160 -160l152 -152l29 -30q64 -64 87.5 -150.5t2.5 -171.5
1410q76 -11 126.5 -68.5t50.5 -134.5zM1534 1202q0 -77 -51 -135t-127 -69q26 -85 3 -176.5t-90 -158.5l-12 -12l-151 152l12 12q37 37 37 89t-37 89t-89 37t-89 -37l-30 -30l-152 -152l-160 -160l-152 152l161 160l152 152l29 30q67 67 159 89.5t178 -3.5q11 75 68.5 126
1411t135.5 51q85 0 145 -60.5t60 -145.5z" />
1412 <glyph glyph-name="f1ab" unicode="&#xf1ab;"
1413d="M654 458q-1 -3 -12.5 0.5t-31.5 11.5l-20 9q-44 20 -87 49q-7 5 -41 31.5t-38 28.5q-67 -103 -134 -181q-81 -95 -105 -110q-4 -2 -19.5 -4t-18.5 0q6 4 82 92q21 24 85.5 115t78.5 118q17 30 51 98.5t36 77.5q-8 1 -110 -33q-8 -2 -27.5 -7.5t-34.5 -9.5t-17 -5
1414q-2 -2 -2 -10.5t-1 -9.5q-5 -10 -31 -15q-23 -7 -47 0q-18 4 -28 21q-4 6 -5 23q6 2 24.5 5t29.5 6q58 16 105 32q100 35 102 35q10 2 43 19.5t44 21.5q9 3 21.5 8t14.5 5.5t6 -0.5q2 -12 -1 -33q0 -2 -12.5 -27t-26.5 -53.5t-17 -33.5q-25 -50 -77 -131l64 -28
1415q12 -6 74.5 -32t67.5 -28q4 -1 10.5 -25.5t4.5 -30.5zM449 944q3 -15 -4 -28q-12 -23 -50 -38q-30 -12 -60 -12q-26 3 -49 26q-14 15 -18 41l1 3q3 -3 19.5 -5t26.5 0t58 16q36 12 55 14q17 0 21 -17zM1147 815l63 -227l-139 42zM39 15l694 232v1032l-694 -233v-1031z
1416M1280 332l102 -31l-181 657l-100 31l-216 -536l102 -31l45 110l211 -65zM777 1294l573 -184v380zM1088 -29l158 -13l-54 -160l-40 66q-130 -83 -276 -108q-58 -12 -91 -12h-84q-79 0 -199.5 39t-183.5 85q-8 7 -8 16q0 8 5 13.5t13 5.5q4 0 18 -7.5t30.5 -16.5t20.5 -11
1417q73 -37 159.5 -61.5t157.5 -24.5q95 0 167 14.5t157 50.5q15 7 30.5 15.5t34 19t28.5 16.5zM1536 1050v-1079l-774 246q-14 -6 -375 -127.5t-368 -121.5q-13 0 -18 13q0 1 -1 3v1078q3 9 4 10q5 6 20 11q107 36 149 50v384l558 -198q2 0 160.5 55t316 108.5t161.5 53.5
1418q20 0 20 -21v-418z" />
1419 <glyph glyph-name="_402" unicode="&#xf1ac;" horiz-adv-x="1792"
1420d="M288 1152q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-128q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h128zM1664 989q58 -34 93 -93t35 -128v-768q0 -106 -75 -181t-181 -75h-864q-66 0 -113 47t-47 113v1536q0 40 28 68t68 28h672q40 0 88 -20t76 -48
1421l152 -152q28 -28 48 -76t20 -88v-163zM928 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 512v128q0 14 -9 23
1422t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128
1423q14 0 23 9t9 23zM1184 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 256v128q0 14 -9 23t-23 9h-128
1424q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1536 896v256h-160q-40 0 -68 28t-28 68v160h-640v-512h896z" />
1425 <glyph glyph-name="_403" unicode="&#xf1ad;"
1426d="M1344 1536q26 0 45 -19t19 -45v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280zM512 1248v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 992v-64q0 -14 9 -23t23 -9h64q14 0 23 9
1427t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 736v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 480v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 160v64
1428q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64
1429q14 0 23 9t9 23zM384 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 -96v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9
1430t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM896 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 928v64
1431q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 160v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64
1432q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9
1433t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23z" />
1434 <glyph glyph-name="_404" unicode="&#xf1ae;" horiz-adv-x="1280"
1435d="M1188 988l-292 -292v-824q0 -46 -33 -79t-79 -33t-79 33t-33 79v384h-64v-384q0 -46 -33 -79t-79 -33t-79 33t-33 79v824l-292 292q-28 28 -28 68t28 68q29 28 68.5 28t67.5 -28l228 -228h368l228 228q28 28 68 28t68 -28q28 -29 28 -68.5t-28 -67.5zM864 1152
1436q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
1437 <glyph glyph-name="uniF1B1" unicode="&#xf1b0;" horiz-adv-x="1664"
1438d="M780 1064q0 -60 -19 -113.5t-63 -92.5t-105 -39q-76 0 -138 57.5t-92 135.5t-30 151q0 60 19 113.5t63 92.5t105 39q77 0 138.5 -57.5t91.5 -135t30 -151.5zM438 581q0 -80 -42 -139t-119 -59q-76 0 -141.5 55.5t-100.5 133.5t-35 152q0 80 42 139.5t119 59.5
1439q76 0 141.5 -55.5t100.5 -134t35 -152.5zM832 608q118 0 255 -97.5t229 -237t92 -254.5q0 -46 -17 -76.5t-48.5 -45t-64.5 -20t-76 -5.5q-68 0 -187.5 45t-182.5 45q-66 0 -192.5 -44.5t-200.5 -44.5q-183 0 -183 146q0 86 56 191.5t139.5 192.5t187.5 146t193 59zM1071 819
1440q-61 0 -105 39t-63 92.5t-19 113.5q0 74 30 151.5t91.5 135t138.5 57.5q61 0 105 -39t63 -92.5t19 -113.5q0 -73 -30 -151t-92 -135.5t-138 -57.5zM1503 923q77 0 119 -59.5t42 -139.5q0 -74 -35 -152t-100.5 -133.5t-141.5 -55.5q-77 0 -119 59t-42 139q0 74 35 152.5
1441t100.5 134t141.5 55.5z" />
1442 <glyph glyph-name="_406" unicode="&#xf1b1;" horiz-adv-x="768"
1443d="M704 1008q0 -145 -57 -243.5t-152 -135.5l45 -821q2 -26 -16 -45t-44 -19h-192q-26 0 -44 19t-16 45l45 821q-95 37 -152 135.5t-57 243.5q0 128 42.5 249.5t117.5 200t160 78.5t160 -78.5t117.5 -200t42.5 -249.5z" />
1444 <glyph glyph-name="_407" unicode="&#xf1b2;" horiz-adv-x="1792"
1445d="M896 -93l640 349v636l-640 -233v-752zM832 772l698 254l-698 254l-698 -254zM1664 1024v-768q0 -35 -18 -65t-49 -47l-704 -384q-28 -16 -61 -16t-61 16l-704 384q-31 17 -49 47t-18 65v768q0 40 23 73t61 47l704 256q22 8 44 8t44 -8l704 -256q38 -14 61 -47t23 -73z
1446" />
1447 <glyph glyph-name="_408" unicode="&#xf1b3;" horiz-adv-x="2304"
1448d="M640 -96l384 192v314l-384 -164v-342zM576 358l404 173l-404 173l-404 -173zM1664 -96l384 192v314l-384 -164v-342zM1600 358l404 173l-404 173l-404 -173zM1152 651l384 165v266l-384 -164v-267zM1088 1030l441 189l-441 189l-441 -189zM2176 512v-416q0 -36 -19 -67
1449t-52 -47l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-4 2 -7 4q-2 -2 -7 -4l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-33 16 -52 47t-19 67v416q0 38 21.5 70t56.5 48l434 186v400q0 38 21.5 70t56.5 48l448 192q23 10 50 10t50 -10l448 -192q35 -16 56.5 -48t21.5 -70
1450v-400l434 -186q36 -16 57 -48t21 -70z" />
1451 <glyph glyph-name="_409" unicode="&#xf1b4;" horiz-adv-x="2048"
1452d="M1848 1197h-511v-124h511v124zM1596 771q-90 0 -146 -52.5t-62 -142.5h408q-18 195 -200 195zM1612 186q63 0 122 32t76 87h221q-100 -307 -427 -307q-214 0 -340.5 132t-126.5 347q0 208 130.5 345.5t336.5 137.5q138 0 240.5 -68t153 -179t50.5 -248q0 -17 -2 -47h-658
1453q0 -111 57.5 -171.5t166.5 -60.5zM277 236h296q205 0 205 167q0 180 -199 180h-302v-347zM277 773h281q78 0 123.5 36.5t45.5 113.5q0 144 -190 144h-260v-294zM0 1282h594q87 0 155 -14t126.5 -47.5t90 -96.5t31.5 -154q0 -181 -172 -263q114 -32 172 -115t58 -204
1454q0 -75 -24.5 -136.5t-66 -103.5t-98.5 -71t-121 -42t-134 -13h-611v1260z" />
1455 <glyph glyph-name="_410" unicode="&#xf1b5;"
1456d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM499 1041h-371v-787h382q117 0 197 57.5t80 170.5q0 158 -143 200q107 52 107 164q0 57 -19.5 96.5
1457t-56.5 60.5t-79 29.5t-97 8.5zM477 723h-176v184h163q119 0 119 -90q0 -94 -106 -94zM486 388h-185v217h189q124 0 124 -113q0 -104 -128 -104zM1136 356q-68 0 -104 38t-36 107h411q1 10 1 30q0 132 -74.5 220.5t-203.5 88.5q-128 0 -210 -86t-82 -216q0 -135 79 -217
1458t213 -82q205 0 267 191h-138q-11 -34 -47.5 -54t-75.5 -20zM1126 722q113 0 124 -122h-254q4 56 39 89t91 33zM964 988h319v-77h-319v77z" />
1459 <glyph glyph-name="_411" unicode="&#xf1b6;" horiz-adv-x="1792"
1460d="M1582 954q0 -101 -71.5 -172.5t-172.5 -71.5t-172.5 71.5t-71.5 172.5t71.5 172.5t172.5 71.5t172.5 -71.5t71.5 -172.5zM812 212q0 104 -73 177t-177 73q-27 0 -54 -6l104 -42q77 -31 109.5 -106.5t1.5 -151.5q-31 -77 -107 -109t-152 -1q-21 8 -62 24.5t-61 24.5
1461q32 -60 91 -96.5t130 -36.5q104 0 177 73t73 177zM1642 953q0 126 -89.5 215.5t-215.5 89.5q-127 0 -216.5 -89.5t-89.5 -215.5q0 -127 89.5 -216t216.5 -89q126 0 215.5 89t89.5 216zM1792 953q0 -189 -133.5 -322t-321.5 -133l-437 -319q-12 -129 -109 -218t-229 -89
1462q-121 0 -214 76t-118 192l-230 92v429l389 -157q79 48 173 48q13 0 35 -2l284 407q2 187 135.5 319t320.5 132q188 0 321.5 -133.5t133.5 -321.5z" />
1463 <glyph glyph-name="_412" unicode="&#xf1b7;"
1464d="M1242 889q0 80 -57 136.5t-137 56.5t-136.5 -57t-56.5 -136q0 -80 56.5 -136.5t136.5 -56.5t137 56.5t57 136.5zM632 301q0 -83 -58 -140.5t-140 -57.5q-56 0 -103 29t-72 77q52 -20 98 -40q60 -24 120 1.5t85 86.5q24 60 -1.5 120t-86.5 84l-82 33q22 5 42 5
1465q82 0 140 -57.5t58 -140.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v153l172 -69q20 -92 93.5 -152t168.5 -60q104 0 181 70t87 173l345 252q150 0 255.5 105.5t105.5 254.5q0 150 -105.5 255.5t-255.5 105.5
1466q-148 0 -253 -104.5t-107 -252.5l-225 -322q-9 1 -28 1q-75 0 -137 -37l-297 119v468q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5zM1289 887q0 -100 -71 -170.5t-171 -70.5t-170.5 70.5t-70.5 170.5t70.5 171t170.5 71q101 0 171.5 -70.5t70.5 -171.5z
1467" />
1468 <glyph glyph-name="_413" unicode="&#xf1b8;" horiz-adv-x="1792"
1469d="M836 367l-15 -368l-2 -22l-420 29q-36 3 -67 31.5t-47 65.5q-11 27 -14.5 55t4 65t12 55t21.5 64t19 53q78 -12 509 -28zM449 953l180 -379l-147 92q-63 -72 -111.5 -144.5t-72.5 -125t-39.5 -94.5t-18.5 -63l-4 -21l-190 357q-17 26 -18 56t6 47l8 18q35 63 114 188
1470l-140 86zM1680 436l-188 -359q-12 -29 -36.5 -46.5t-43.5 -20.5l-18 -4q-71 -7 -219 -12l8 -164l-230 367l211 362l7 -173q170 -16 283 -5t170 33zM895 1360q-47 -63 -265 -435l-317 187l-19 12l225 356q20 31 60 45t80 10q24 -2 48.5 -12t42 -21t41.5 -33t36 -34.5
1471t36 -39.5t32 -35zM1550 1053l212 -363q18 -37 12.5 -76t-27.5 -74q-13 -20 -33 -37t-38 -28t-48.5 -22t-47 -16t-51.5 -14t-46 -12q-34 72 -265 436l313 195zM1407 1279l142 83l-220 -373l-419 20l151 86q-34 89 -75 166t-75.5 123.5t-64.5 80t-47 46.5l-17 13l405 -1
1472q31 3 58 -10.5t39 -28.5l11 -15q39 -61 112 -190z" />
1473 <glyph glyph-name="_414" unicode="&#xf1b9;" horiz-adv-x="2048"
1474d="M480 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM516 768h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5zM1888 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM2048 544v-384
1475q0 -14 -9 -23t-23 -9h-96v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-1024v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5t179 63.5h768q98 0 179 -63.5t104 -157.5
1476l105 -419h28q93 0 158.5 -65.5t65.5 -158.5z" />
1477 <glyph glyph-name="_415" unicode="&#xf1ba;" horiz-adv-x="2048"
1478d="M1824 640q93 0 158.5 -65.5t65.5 -158.5v-384q0 -14 -9 -23t-23 -9h-96v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-1024v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5
1479t179 63.5h128v224q0 14 9 23t23 9h448q14 0 23 -9t9 -23v-224h128q98 0 179 -63.5t104 -157.5l105 -419h28zM320 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM516 640h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5z
1480M1728 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47z" />
1481 <glyph glyph-name="_416" unicode="&#xf1bb;"
1482d="M1504 64q0 -26 -19 -45t-45 -19h-462q1 -17 6 -87.5t5 -108.5q0 -25 -18 -42.5t-43 -17.5h-320q-25 0 -43 17.5t-18 42.5q0 38 5 108.5t6 87.5h-462q-26 0 -45 19t-19 45t19 45l402 403h-229q-26 0 -45 19t-19 45t19 45l402 403h-197q-26 0 -45 19t-19 45t19 45l384 384
1483q19 19 45 19t45 -19l384 -384q19 -19 19 -45t-19 -45t-45 -19h-197l402 -403q19 -19 19 -45t-19 -45t-45 -19h-229l402 -403q19 -19 19 -45z" />
1484 <glyph glyph-name="_417" unicode="&#xf1bc;"
1485d="M1127 326q0 32 -30 51q-193 115 -447 115q-133 0 -287 -34q-42 -9 -42 -52q0 -20 13.5 -34.5t35.5 -14.5q5 0 37 8q132 27 243 27q226 0 397 -103q19 -11 33 -11q19 0 33 13.5t14 34.5zM1223 541q0 40 -35 61q-237 141 -548 141q-153 0 -303 -42q-48 -13 -48 -64
1486q0 -25 17.5 -42.5t42.5 -17.5q7 0 37 8q122 33 251 33q279 0 488 -124q24 -13 38 -13q25 0 42.5 17.5t17.5 42.5zM1331 789q0 47 -40 70q-126 73 -293 110.5t-343 37.5q-204 0 -364 -47q-23 -7 -38.5 -25.5t-15.5 -48.5q0 -31 20.5 -52t51.5 -21q11 0 40 8q133 37 307 37
1487q159 0 309.5 -34t253.5 -95q21 -12 40 -12q29 0 50.5 20.5t21.5 51.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1488 <glyph glyph-name="_418" unicode="&#xf1bd;" horiz-adv-x="1024"
1489d="M1024 1233l-303 -582l24 -31h279v-415h-507l-44 -30l-142 -273l-30 -30h-301v303l303 583l-24 30h-279v415h507l44 30l142 273l30 30h301v-303z" />
1490 <glyph glyph-name="_419" unicode="&#xf1be;" horiz-adv-x="2304"
1491d="M784 164l16 241l-16 523q-1 10 -7.5 17t-16.5 7q-9 0 -16 -7t-7 -17l-14 -523l14 -241q1 -10 7.5 -16.5t15.5 -6.5q22 0 24 23zM1080 193l11 211l-12 586q0 16 -13 24q-8 5 -16 5t-16 -5q-13 -8 -13 -24l-1 -6l-10 -579q0 -1 11 -236v-1q0 -10 6 -17q9 -11 23 -11
1492q11 0 20 9q9 7 9 20zM35 533l20 -128l-20 -126q-2 -9 -9 -9t-9 9l-17 126l17 128q2 9 9 9t9 -9zM121 612l26 -207l-26 -203q-2 -9 -10 -9q-9 0 -9 10l-23 202l23 207q0 9 9 9q8 0 10 -9zM401 159zM213 650l25 -245l-25 -237q0 -11 -11 -11q-10 0 -12 11l-21 237l21 245
1493q2 12 12 12q11 0 11 -12zM307 657l23 -252l-23 -244q-2 -13 -14 -13q-13 0 -13 13l-21 244l21 252q0 13 13 13q12 0 14 -13zM401 639l21 -234l-21 -246q-2 -16 -16 -16q-6 0 -10.5 4.5t-4.5 11.5l-20 246l20 234q0 6 4.5 10.5t10.5 4.5q14 0 16 -15zM784 164zM495 785
1494l21 -380l-21 -246q0 -7 -5 -12.5t-12 -5.5q-16 0 -18 18l-18 246l18 380q2 18 18 18q7 0 12 -5.5t5 -12.5zM589 871l19 -468l-19 -244q0 -8 -5.5 -13.5t-13.5 -5.5q-18 0 -20 19l-16 244l16 468q2 19 20 19q8 0 13.5 -5.5t5.5 -13.5zM687 911l18 -506l-18 -242
1495q-2 -21 -22 -21q-19 0 -21 21l-16 242l16 506q0 9 6.5 15.5t14.5 6.5q9 0 15 -6.5t7 -15.5zM1079 169v0v0v0zM881 915l15 -510l-15 -239q0 -10 -7.5 -17.5t-17.5 -7.5t-17 7t-8 18l-14 239l14 510q0 11 7.5 18t17.5 7t17.5 -7t7.5 -18zM980 896l14 -492l-14 -236
1496q0 -11 -8 -19t-19 -8t-19 8t-9 19l-12 236l12 492q1 12 9 20t19 8t18.5 -8t8.5 -20zM1192 404l-14 -231v0q0 -13 -9 -22t-22 -9t-22 9t-10 22l-6 114l-6 117l12 636v3q2 15 12 24q9 7 20 7q8 0 15 -5q14 -8 16 -26zM2304 423q0 -117 -83 -199.5t-200 -82.5h-786
1497q-13 2 -22 11t-9 22v899q0 23 28 33q85 34 181 34q195 0 338 -131.5t160 -323.5q53 22 110 22q117 0 200 -83t83 -201z" />
1498 <glyph glyph-name="uniF1C0" unicode="&#xf1c0;"
1499d="M768 768q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 0q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127
1500t443 -43zM768 384q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 1536q208 0 385 -34.5t280 -93.5t103 -128v-128q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5
1501t-103 128v128q0 69 103 128t280 93.5t385 34.5z" />
1502 <glyph glyph-name="uniF1C1" unicode="&#xf1c1;"
1503d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z
1504M894 465q33 -26 84 -56q59 7 117 7q147 0 177 -49q16 -22 2 -52q0 -1 -1 -2l-2 -2v-1q-6 -38 -71 -38q-48 0 -115 20t-130 53q-221 -24 -392 -83q-153 -262 -242 -262q-15 0 -28 7l-24 12q-1 1 -6 5q-10 10 -6 36q9 40 56 91.5t132 96.5q14 9 23 -6q2 -2 2 -4q52 85 107 197
1505q68 136 104 262q-24 82 -30.5 159.5t6.5 127.5q11 40 42 40h21h1q23 0 35 -15q18 -21 9 -68q-2 -6 -4 -8q1 -3 1 -8v-30q-2 -123 -14 -192q55 -164 146 -238zM318 54q52 24 137 158q-51 -40 -87.5 -84t-49.5 -74zM716 974q-15 -42 -2 -132q1 7 7 44q0 3 7 43q1 4 4 8
1506q-1 1 -1 2q-1 2 -1 3q-1 22 -13 36q0 -1 -1 -2v-2zM592 313q135 54 284 81q-2 1 -13 9.5t-16 13.5q-76 67 -127 176q-27 -86 -83 -197q-30 -56 -45 -83zM1238 329q-24 24 -140 24q76 -28 124 -28q14 0 18 1q0 1 -2 3z" />
1507 <glyph glyph-name="_422" unicode="&#xf1c2;"
1508d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z
1509M233 768v-107h70l164 -661h159l128 485q7 20 10 46q2 16 2 24h4l3 -24q1 -3 3.5 -20t5.5 -26l128 -485h159l164 661h70v107h-300v-107h90l-99 -438q-5 -20 -7 -46l-2 -21h-4q0 3 -0.5 6.5t-1.5 8t-1 6.5q-1 5 -4 21t-5 25l-144 545h-114l-144 -545q-2 -9 -4.5 -24.5
1510t-3.5 -21.5l-4 -21h-4l-2 21q-2 26 -7 46l-99 438h90v107h-300z" />
1511 <glyph glyph-name="_423" unicode="&#xf1c3;"
1512d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z
1513M429 106v-106h281v106h-75l103 161q5 7 10 16.5t7.5 13.5t3.5 4h2q1 -4 5 -10q2 -4 4.5 -7.5t6 -8t6.5 -8.5l107 -161h-76v-106h291v106h-68l-192 273l195 282h67v107h-279v-107h74l-103 -159q-4 -7 -10 -16.5t-9 -13.5l-2 -3h-2q-1 4 -5 10q-6 11 -17 23l-106 159h76v107
1514h-290v-107h68l189 -272l-194 -283h-68z" />
1515 <glyph glyph-name="_424" unicode="&#xf1c4;"
1516d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z
1517M416 106v-106h327v106h-93v167h137q76 0 118 15q67 23 106.5 87t39.5 146q0 81 -37 141t-100 87q-48 19 -130 19h-368v-107h92v-555h-92zM769 386h-119v268h120q52 0 83 -18q56 -33 56 -115q0 -89 -62 -120q-31 -15 -78 -15z" />
1518 <glyph glyph-name="_425" unicode="&#xf1c5;"
1519d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z
1520M1280 320v-320h-1024v192l192 192l128 -128l384 384zM448 512q-80 0 -136 56t-56 136t56 136t136 56t136 -56t56 -136t-56 -136t-136 -56z" />
1521 <glyph glyph-name="_426" unicode="&#xf1c6;"
1522d="M640 1152v128h-128v-128h128zM768 1024v128h-128v-128h128zM640 896v128h-128v-128h128zM768 768v128h-128v-128h128zM1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400
1523v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-128v-128h-128v128h-512v-1536h1280zM781 593l107 -349q8 -27 8 -52q0 -83 -72.5 -137.5t-183.5 -54.5t-183.5 54.5t-72.5 137.5q0 25 8 52q21 63 120 396v128h128v-128h79
1524q22 0 39 -13t23 -34zM640 128q53 0 90.5 19t37.5 45t-37.5 45t-90.5 19t-90.5 -19t-37.5 -45t37.5 -45t90.5 -19z" />
1525 <glyph glyph-name="_427" unicode="&#xf1c7;"
1526d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z
1527M620 686q20 -8 20 -30v-544q0 -22 -20 -30q-8 -2 -12 -2q-12 0 -23 9l-166 167h-131q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h131l166 167q16 15 35 7zM1037 -3q31 0 50 24q129 159 129 363t-129 363q-16 21 -43 24t-47 -14q-21 -17 -23.5 -43.5t14.5 -47.5
1528q100 -123 100 -282t-100 -282q-17 -21 -14.5 -47.5t23.5 -42.5q18 -15 40 -15zM826 145q27 0 47 20q87 93 87 219t-87 219q-18 19 -45 20t-46 -17t-20 -44.5t18 -46.5q52 -57 52 -131t-52 -131q-19 -20 -18 -46.5t20 -44.5q20 -17 44 -17z" />
1529 <glyph glyph-name="_428" unicode="&#xf1c8;"
1530d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z
1531M768 768q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-384q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h384zM1260 766q20 -8 20 -30v-576q0 -22 -20 -30q-8 -2 -12 -2q-14 0 -23 9l-265 266v90l265 266q9 9 23 9q4 0 12 -2z" />
1532 <glyph glyph-name="_429" unicode="&#xf1c9;"
1533d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z
1534M480 768q8 11 21 12.5t24 -6.5l51 -38q11 -8 12.5 -21t-6.5 -24l-182 -243l182 -243q8 -11 6.5 -24t-12.5 -21l-51 -38q-11 -8 -24 -6.5t-21 12.5l-226 301q-14 19 0 38zM1282 467q14 -19 0 -38l-226 -301q-8 -11 -21 -12.5t-24 6.5l-51 38q-11 8 -12.5 21t6.5 24l182 243
1535l-182 243q-8 11 -6.5 24t12.5 21l51 38q11 8 24 6.5t21 -12.5zM662 6q-13 2 -20.5 13t-5.5 24l138 831q2 13 13 20.5t24 5.5l63 -10q13 -2 20.5 -13t5.5 -24l-138 -831q-2 -13 -13 -20.5t-24 -5.5z" />
1536 <glyph glyph-name="_430" unicode="&#xf1ca;"
1537d="M1497 709v-198q-101 -23 -198 -23q-65 -136 -165.5 -271t-181.5 -215.5t-128 -106.5q-80 -45 -162 3q-28 17 -60.5 43.5t-85 83.5t-102.5 128.5t-107.5 184t-105.5 244t-91.5 314.5t-70.5 390h283q26 -218 70 -398.5t104.5 -317t121.5 -235.5t140 -195q169 169 287 406
1538q-142 72 -223 220t-81 333q0 192 104 314.5t284 122.5q178 0 273 -105.5t95 -297.5q0 -159 -58 -286q-7 -1 -19.5 -3t-46 -2t-63 6t-62 25.5t-50.5 51.5q31 103 31 184q0 87 -29 132t-79 45q-53 0 -85 -49.5t-32 -140.5q0 -186 105 -293.5t267 -107.5q62 0 121 14z" />
1539 <glyph glyph-name="_431" unicode="&#xf1cb;" horiz-adv-x="1792"
1540d="M216 367l603 -402v359l-334 223zM154 511l193 129l-193 129v-258zM973 -35l603 402l-269 180l-334 -223v-359zM896 458l272 182l-272 182l-272 -182zM485 733l334 223v359l-603 -402zM1445 640l193 -129v258zM1307 733l269 180l-603 402v-359zM1792 913v-546
1541q0 -41 -34 -64l-819 -546q-21 -13 -43 -13t-43 13l-819 546q-34 23 -34 64v546q0 41 34 64l819 546q21 13 43 13t43 -13l819 -546q34 -23 34 -64z" />
1542 <glyph glyph-name="_432" unicode="&#xf1cc;" horiz-adv-x="2048"
1543d="M1800 764q111 -46 179.5 -145.5t68.5 -221.5q0 -164 -118 -280.5t-285 -116.5q-4 0 -11.5 0.5t-10.5 0.5h-1209h-1h-2h-5q-170 10 -288 125.5t-118 280.5q0 110 55 203t147 147q-12 39 -12 82q0 115 82 196t199 81q95 0 172 -58q75 154 222.5 248t326.5 94
1544q166 0 306 -80.5t221.5 -218.5t81.5 -301q0 -6 -0.5 -18t-0.5 -18zM468 498q0 -122 84 -193t208 -71q137 0 240 99q-16 20 -47.5 56.5t-43.5 50.5q-67 -65 -144 -65q-55 0 -93.5 33.5t-38.5 87.5q0 53 38.5 87t91.5 34q44 0 84.5 -21t73 -55t65 -75t69 -82t77 -75t97 -55
1545t121.5 -21q121 0 204.5 71.5t83.5 190.5q0 121 -84 192t-207 71q-143 0 -241 -97l93 -108q66 64 142 64q52 0 92 -33t40 -84q0 -57 -37 -91.5t-94 -34.5q-43 0 -82.5 21t-72 55t-65.5 75t-69.5 82t-77.5 75t-96.5 55t-118.5 21q-122 0 -207 -70.5t-85 -189.5z" />
1546 <glyph glyph-name="_433" unicode="&#xf1cd;" horiz-adv-x="1792"
1547d="M896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 1408q-190 0 -361 -90l194 -194q82 28 167 28t167 -28l194 194q-171 90 -361 90zM218 279l194 194
1548q-28 82 -28 167t28 167l-194 194q-90 -171 -90 -361t90 -361zM896 -128q190 0 361 90l-194 194q-82 -28 -167 -28t-167 28l-194 -194q171 -90 361 -90zM896 256q159 0 271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5
1549t271.5 -112.5zM1380 473l194 -194q90 171 90 361t-90 361l-194 -194q28 -82 28 -167t-28 -167z" />
1550 <glyph glyph-name="_434" unicode="&#xf1ce;" horiz-adv-x="1792"
1551d="M1760 640q0 -176 -68.5 -336t-184 -275.5t-275.5 -184t-336 -68.5t-336 68.5t-275.5 184t-184 275.5t-68.5 336q0 213 97 398.5t265 305.5t374 151v-228q-221 -45 -366.5 -221t-145.5 -406q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5
1552t136.5 204t51 248.5q0 230 -145.5 406t-366.5 221v228q206 -31 374 -151t265 -305.5t97 -398.5z" />
1553 <glyph glyph-name="uniF1D0" unicode="&#xf1d0;" horiz-adv-x="1792"
1554d="M19 662q8 217 116 406t305 318h5q0 -1 -1 -3q-8 -8 -28 -33.5t-52 -76.5t-60 -110.5t-44.5 -135.5t-14 -150.5t39 -157.5t108.5 -154q50 -50 102 -69.5t90.5 -11.5t69.5 23.5t47 32.5l16 16q39 51 53 116.5t6.5 122.5t-21 107t-26.5 80l-14 29q-10 25 -30.5 49.5t-43 41
1555t-43.5 29.5t-35 19l-13 6l104 115q39 -17 78 -52t59 -61l19 -27q1 48 -18.5 103.5t-40.5 87.5l-20 31l161 183l160 -181q-33 -46 -52.5 -102.5t-22.5 -90.5l-4 -33q22 37 61.5 72.5t67.5 52.5l28 17l103 -115q-44 -14 -85 -50t-60 -65l-19 -29q-31 -56 -48 -133.5t-7 -170
1556t57 -156.5q33 -45 77.5 -60.5t85 -5.5t76 26.5t57.5 33.5l21 16q60 53 96.5 115t48.5 121.5t10 121.5t-18 118t-37 107.5t-45.5 93t-45 72t-34.5 47.5l-13 17q-14 13 -7 13l10 -3q40 -29 62.5 -46t62 -50t64 -58t58.5 -65t55.5 -77t45.5 -88t38 -103t23.5 -117t10.5 -136
1557q3 -259 -108 -465t-312 -321t-456 -115q-185 0 -351 74t-283.5 198t-184 293t-60.5 353z" />
1558 <glyph glyph-name="uniF1D1" unicode="&#xf1d1;" horiz-adv-x="1792"
1559d="M874 -102v-66q-208 6 -385 109.5t-283 275.5l58 34q29 -49 73 -99l65 57q148 -168 368 -212l-17 -86q65 -12 121 -13zM276 428l-83 -28q22 -60 49 -112l-57 -33q-98 180 -98 385t98 385l57 -33q-30 -56 -49 -112l82 -28q-35 -100 -35 -212q0 -109 36 -212zM1528 251
1560l58 -34q-106 -172 -283 -275.5t-385 -109.5v66q56 1 121 13l-17 86q220 44 368 212l65 -57q44 50 73 99zM1377 805l-233 -80q14 -42 14 -85t-14 -85l232 -80q-31 -92 -98 -169l-185 162q-57 -67 -147 -85l48 -241q-52 -10 -98 -10t-98 10l48 241q-90 18 -147 85l-185 -162
1561q-67 77 -98 169l232 80q-14 42 -14 85t14 85l-233 80q33 93 99 169l185 -162q59 68 147 86l-48 240q44 10 98 10t98 -10l-48 -240q88 -18 147 -86l185 162q66 -76 99 -169zM874 1448v-66q-65 -2 -121 -13l17 -86q-220 -42 -368 -211l-65 56q-38 -42 -73 -98l-57 33
1562q106 172 282 275.5t385 109.5zM1705 640q0 -205 -98 -385l-57 33q27 52 49 112l-83 28q36 103 36 212q0 112 -35 212l82 28q-19 56 -49 112l57 33q98 -180 98 -385zM1585 1063l-57 -33q-35 56 -73 98l-65 -56q-148 169 -368 211l17 86q-56 11 -121 13v66q209 -6 385 -109.5
1563t282 -275.5zM1748 640q0 173 -67.5 331t-181.5 272t-272 181.5t-331 67.5t-331 -67.5t-272 -181.5t-181.5 -272t-67.5 -331t67.5 -331t181.5 -272t272 -181.5t331 -67.5t331 67.5t272 181.5t181.5 272t67.5 331zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71
1564t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
1565 <glyph glyph-name="uniF1D2" unicode="&#xf1d2;"
1566d="M582 228q0 -66 -93 -66q-107 0 -107 63q0 64 98 64q102 0 102 -61zM546 694q0 -85 -74 -85q-77 0 -77 84q0 90 77 90q36 0 55 -25.5t19 -63.5zM712 769v125q-78 -29 -135 -29q-50 29 -110 29q-86 0 -145 -57t-59 -143q0 -50 29.5 -102t73.5 -67v-3q-38 -17 -38 -85
1567q0 -53 41 -77v-3q-113 -37 -113 -139q0 -45 20 -78.5t54 -51t72 -25.5t81 -8q224 0 224 188q0 67 -48 99t-126 46q-27 5 -51.5 20.5t-24.5 39.5q0 44 49 52q77 15 122 70t45 134q0 24 -10 52q37 9 49 13zM771 350h137q-2 27 -2 82v387q0 46 2 69h-137q3 -23 3 -71v-392
1568q0 -50 -3 -75zM1280 366v121q-30 -21 -68 -21q-53 0 -53 82v225h52q9 0 26.5 -1t26.5 -1v117h-105q0 82 3 102h-140q4 -24 4 -55v-47h-60v-117q36 3 37 3q3 0 11 -0.5t12 -0.5v-2h-2v-217q0 -37 2.5 -64t11.5 -56.5t24.5 -48.5t43.5 -31t66 -12q64 0 108 24zM924 1072
1569q0 36 -24 63.5t-60 27.5t-60.5 -27t-24.5 -64q0 -36 25 -62.5t60 -26.5t59.5 27t24.5 62zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1570 <glyph glyph-name="_438" unicode="&#xf1d3;" horiz-adv-x="1792"
1571d="M595 22q0 100 -165 100q-158 0 -158 -104q0 -101 172 -101q151 0 151 105zM536 777q0 61 -30 102t-89 41q-124 0 -124 -145q0 -135 124 -135q119 0 119 137zM805 1101v-202q-36 -12 -79 -22q16 -43 16 -84q0 -127 -73 -216.5t-197 -112.5q-40 -8 -59.5 -27t-19.5 -58
1572q0 -31 22.5 -51.5t58 -32t78.5 -22t86 -25.5t78.5 -37.5t58 -64t22.5 -98.5q0 -304 -363 -304q-69 0 -130 12.5t-116 41t-87.5 82t-32.5 127.5q0 165 182 225v4q-67 41 -67 126q0 109 63 137v4q-72 24 -119.5 108.5t-47.5 165.5q0 139 95 231.5t235 92.5q96 0 178 -47
1573q98 0 218 47zM1123 220h-222q4 45 4 134v609q0 94 -4 128h222q-4 -33 -4 -124v-613q0 -89 4 -134zM1724 442v-196q-71 -39 -174 -39q-62 0 -107 20t-70 50t-39.5 78t-18.5 92t-4 103v351h2v4q-7 0 -19 1t-18 1q-21 0 -59 -6v190h96v76q0 54 -6 89h227q-6 -41 -6 -165h171
1574v-190q-15 0 -43.5 2t-42.5 2h-85v-365q0 -131 87 -131q61 0 109 33zM1148 1389q0 -58 -39 -101.5t-96 -43.5q-58 0 -98 43.5t-40 101.5q0 59 39.5 103t98.5 44q58 0 96.5 -44.5t38.5 -102.5z" />
1575 <glyph glyph-name="_439" unicode="&#xf1d4;"
1576d="M809 532l266 499h-112l-157 -312q-24 -48 -44 -92l-42 92l-155 312h-120l263 -493v-324h101v318zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1577 <glyph glyph-name="uniF1D5" unicode="&#xf1d5;" horiz-adv-x="1280"
1578d="M842 964q0 -80 -57 -136.5t-136 -56.5q-60 0 -111 35q-62 -67 -115 -146q-247 -371 -202 -859q1 -22 -12.5 -38.5t-34.5 -18.5h-5q-20 0 -35 13.5t-17 33.5q-14 126 -3.5 247.5t29.5 217t54 186t69 155.5t74 125q61 90 132 165q-16 35 -16 77q0 80 56.5 136.5t136.5 56.5
1579t136.5 -56.5t56.5 -136.5zM1223 953q0 -158 -78 -292t-212.5 -212t-292.5 -78q-64 0 -131 14q-21 5 -32.5 23.5t-6.5 39.5q5 20 23 31.5t39 7.5q51 -13 108 -13q97 0 186 38t153 102t102 153t38 186t-38 186t-102 153t-153 102t-186 38t-186 -38t-153 -102t-102 -153
1580t-38 -186q0 -114 52 -218q10 -20 3.5 -40t-25.5 -30t-39.5 -3t-30.5 26q-64 123 -64 265q0 119 46.5 227t124.5 186t186 124t226 46q158 0 292.5 -78t212.5 -212.5t78 -292.5z" />
1581 <glyph glyph-name="uniF1D6" unicode="&#xf1d6;" horiz-adv-x="1792"
1582d="M270 730q-8 19 -8 52q0 20 11 49t24 45q-1 22 7.5 53t22.5 43q0 139 92.5 288.5t217.5 209.5q139 66 324 66q133 0 266 -55q49 -21 90 -48t71 -56t55 -68t42 -74t32.5 -84.5t25.5 -89.5t22 -98l1 -5q55 -83 55 -150q0 -14 -9 -40t-9 -38q0 -1 1.5 -3.5t3.5 -5t2 -3.5
1583q77 -114 120.5 -214.5t43.5 -208.5q0 -43 -19.5 -100t-55.5 -57q-9 0 -19.5 7.5t-19 17.5t-19 26t-16 26.5t-13.5 26t-9 17.5q-1 1 -3 1l-5 -4q-59 -154 -132 -223q20 -20 61.5 -38.5t69 -41.5t35.5 -65q-2 -4 -4 -16t-7 -18q-64 -97 -302 -97q-53 0 -110.5 9t-98 20
1584t-104.5 30q-15 5 -23 7q-14 4 -46 4.5t-40 1.5q-41 -45 -127.5 -65t-168.5 -20q-35 0 -69 1.5t-93 9t-101 20.5t-74.5 40t-32.5 64q0 40 10 59.5t41 48.5q11 2 40.5 13t49.5 12q4 0 14 2q2 2 2 4l-2 3q-48 11 -108 105.5t-73 156.5l-5 3q-4 0 -12 -20q-18 -41 -54.5 -74.5
1585t-77.5 -37.5h-1q-4 0 -6 4.5t-5 5.5q-23 54 -23 100q0 275 252 466z" />
1586 <glyph glyph-name="uniF1D7" unicode="&#xf1d7;" horiz-adv-x="2048"
1587d="M580 1075q0 41 -25 66t-66 25q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 66 24.5t25 65.5zM1323 568q0 28 -25.5 50t-65.5 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q40 0 65.5 22t25.5 51zM1087 1075q0 41 -24.5 66t-65.5 25
1588q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 65.5 24.5t24.5 65.5zM1722 568q0 28 -26 50t-65 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q39 0 65 22t26 51zM1456 965q-31 4 -70 4q-169 0 -311 -77t-223.5 -208.5t-81.5 -287.5
1589q0 -78 23 -152q-35 -3 -68 -3q-26 0 -50 1.5t-55 6.5t-44.5 7t-54.5 10.5t-50 10.5l-253 -127l72 218q-290 203 -290 490q0 169 97.5 311t264 223.5t363.5 81.5q176 0 332.5 -66t262 -182.5t136.5 -260.5zM2048 404q0 -117 -68.5 -223.5t-185.5 -193.5l55 -181l-199 109
1590q-150 -37 -218 -37q-169 0 -311 70.5t-223.5 191.5t-81.5 264t81.5 264t223.5 191.5t311 70.5q161 0 303 -70.5t227.5 -192t85.5 -263.5z" />
1591 <glyph glyph-name="_443" unicode="&#xf1d8;" horiz-adv-x="1792"
1592d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-453 185l-242 -295q-18 -23 -49 -23q-13 0 -22 4q-19 7 -30.5 23.5t-11.5 36.5v349l864 1059l-1069 -925l-395 162q-37 14 -40 55q-2 40 32 59l1664 960q15 9 32 9q20 0 36 -11z" />
1593 <glyph glyph-name="_444" unicode="&#xf1d9;" horiz-adv-x="1792"
1594d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-527 215l-298 -327q-18 -21 -47 -21q-14 0 -23 4q-19 7 -30 23.5t-11 36.5v452l-472 193q-37 14 -40 55q-3 39 32 59l1664 960q35 21 68 -2zM1422 26l221 1323l-1434 -827l336 -137
1595l863 639l-478 -797z" />
1596 <glyph glyph-name="_445" unicode="&#xf1da;"
1597d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5
1598t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298zM896 928v-448q0 -14 -9 -23
1599t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23z" />
1600 <glyph glyph-name="_446" unicode="&#xf1db;"
1601d="M768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103
1602t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1603 <glyph glyph-name="_447" unicode="&#xf1dc;" horiz-adv-x="1792"
1604d="M1682 -128q-44 0 -132.5 3.5t-133.5 3.5q-44 0 -132 -3.5t-132 -3.5q-24 0 -37 20.5t-13 45.5q0 31 17 46t39 17t51 7t45 15q33 21 33 140l-1 391q0 21 -1 31q-13 4 -50 4h-675q-38 0 -51 -4q-1 -10 -1 -31l-1 -371q0 -142 37 -164q16 -10 48 -13t57 -3.5t45 -15
1605t20 -45.5q0 -26 -12.5 -48t-36.5 -22q-47 0 -139.5 3.5t-138.5 3.5q-43 0 -128 -3.5t-127 -3.5q-23 0 -35.5 21t-12.5 45q0 30 15.5 45t36 17.5t47.5 7.5t42 15q33 23 33 143l-1 57v813q0 3 0.5 26t0 36.5t-1.5 38.5t-3.5 42t-6.5 36.5t-11 31.5t-16 18q-15 10 -45 12t-53 2
1606t-41 14t-18 45q0 26 12 48t36 22q46 0 138.5 -3.5t138.5 -3.5q42 0 126.5 3.5t126.5 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17 -43.5t-38.5 -14.5t-49.5 -4t-43 -13q-35 -21 -35 -160l1 -320q0 -21 1 -32q13 -3 39 -3h699q25 0 38 3q1 11 1 32l1 320q0 139 -35 160
1607q-18 11 -58.5 12.5t-66 13t-25.5 49.5q0 26 12.5 48t37.5 22q44 0 132 -3.5t132 -3.5q43 0 129 3.5t129 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17.5 -44t-40 -14.5t-51.5 -3t-44 -12.5q-35 -23 -35 -161l1 -943q0 -119 34 -140q16 -10 46 -13.5t53.5 -4.5t41.5 -15.5t18 -44.5
1608q0 -26 -12 -48t-36 -22z" />
1609 <glyph glyph-name="_448" unicode="&#xf1dd;" horiz-adv-x="1280"
1610d="M1278 1347v-73q0 -29 -18.5 -61t-42.5 -32q-50 0 -54 -1q-26 -6 -32 -31q-3 -11 -3 -64v-1152q0 -25 -18 -43t-43 -18h-108q-25 0 -43 18t-18 43v1218h-143v-1218q0 -25 -17.5 -43t-43.5 -18h-108q-26 0 -43.5 18t-17.5 43v496q-147 12 -245 59q-126 58 -192 179
1611q-64 117 -64 259q0 166 88 286q88 118 209 159q111 37 417 37h479q25 0 43 -18t18 -43z" />
1612 <glyph glyph-name="_449" unicode="&#xf1de;"
1613d="M352 128v-128h-352v128h352zM704 256q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM864 640v-128h-864v128h864zM224 1152v-128h-224v128h224zM1536 128v-128h-736v128h736zM576 1280q26 0 45 -19t19 -45v-256
1614q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1216 768q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1536 640v-128h-224v128h224zM1536 1152v-128h-864v128h864z" />
1615 <glyph glyph-name="uniF1E0" unicode="&#xf1e0;"
1616d="M1216 512q133 0 226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5q0 12 2 34l-360 180q-92 -86 -218 -86q-133 0 -226.5 93.5t-93.5 226.5t93.5 226.5t226.5 93.5q126 0 218 -86l360 180q-2 22 -2 34q0 133 93.5 226.5t226.5 93.5
1617t226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5q-126 0 -218 86l-360 -180q2 -22 2 -34t-2 -34l360 -180q92 86 218 86z" />
1618 <glyph glyph-name="_451" unicode="&#xf1e1;"
1619d="M1280 341q0 88 -62.5 151t-150.5 63q-84 0 -145 -58l-241 120q2 16 2 23t-2 23l241 120q61 -58 145 -58q88 0 150.5 63t62.5 151t-62.5 150.5t-150.5 62.5t-151 -62.5t-63 -150.5q0 -7 2 -23l-241 -120q-62 57 -145 57q-88 0 -150.5 -62.5t-62.5 -150.5t62.5 -150.5
1620t150.5 -62.5q83 0 145 57l241 -120q-2 -16 -2 -23q0 -88 63 -150.5t151 -62.5t150.5 62.5t62.5 150.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1621 <glyph glyph-name="_452" unicode="&#xf1e2;" horiz-adv-x="1792"
1622d="M571 947q-10 25 -34 35t-49 0q-108 -44 -191 -127t-127 -191q-10 -25 0 -49t35 -34q13 -5 24 -5q42 0 60 40q34 84 98.5 148.5t148.5 98.5q25 11 35 35t0 49zM1513 1303l46 -46l-244 -243l68 -68q19 -19 19 -45.5t-19 -45.5l-64 -64q89 -161 89 -343q0 -143 -55.5 -273.5
1623t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5q182 0 343 -89l64 64q19 19 45.5 19t45.5 -19l68 -68zM1521 1359q-10 -10 -22 -10q-13 0 -23 10l-91 90q-9 10 -9 23t9 23q10 9 23 9t23 -9l90 -91
1624q10 -9 10 -22.5t-10 -22.5zM1751 1129q-11 -9 -23 -9t-23 9l-90 91q-10 9 -10 22.5t10 22.5q9 10 22.5 10t22.5 -10l91 -90q9 -10 9 -23t-9 -23zM1792 1312q0 -14 -9 -23t-23 -9h-96q-14 0 -23 9t-9 23t9 23t23 9h96q14 0 23 -9t9 -23zM1600 1504v-96q0 -14 -9 -23t-23 -9
1625t-23 9t-9 23v96q0 14 9 23t23 9t23 -9t9 -23zM1751 1449l-91 -90q-10 -10 -22 -10q-13 0 -23 10q-10 9 -10 22.5t10 22.5l90 91q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
1626 <glyph glyph-name="_453" unicode="&#xf1e3;" horiz-adv-x="1792"
1627d="M609 720l287 208l287 -208l-109 -336h-355zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM1515 186q149 203 149 454v3l-102 -89l-240 224l63 323
1628l134 -12q-150 206 -389 282l53 -124l-287 -159l-287 159l53 124q-239 -76 -389 -282l135 12l62 -323l-240 -224l-102 89v-3q0 -251 149 -454l30 132l326 -40l139 -298l-116 -69q117 -39 240 -39t240 39l-116 69l139 298l326 40z" />
1629 <glyph glyph-name="_454" unicode="&#xf1e4;" horiz-adv-x="1792"
1630d="M448 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM256 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM832 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23
1631v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM66 768q-28 0 -47 19t-19 46v129h514v-129q0 -27 -19 -46t-46 -19h-383zM1216 224v-192q0 -14 -9 -23t-23 -9h-192
1632q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1600 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23
1633zM1408 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1016v-13h-514v10q0 104 -382 102q-382 -1 -382 -102v-10h-514v13q0 17 8.5 43t34 64t65.5 75.5t110.5 76t160 67.5t224 47.5t293.5 18.5t293 -18.5t224 -47.5
1634t160.5 -67.5t110.5 -76t65.5 -75.5t34 -64t8.5 -43zM1792 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 962v-129q0 -27 -19 -46t-46 -19h-384q-27 0 -46 19t-19 46v129h514z" />
1635 <glyph glyph-name="_455" unicode="&#xf1e5;" horiz-adv-x="1792"
1636d="M704 1216v-768q0 -26 -19 -45t-45 -19v-576q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v512l249 873q7 23 31 23h424zM1024 1216v-704h-256v704h256zM1792 320v-512q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v576q-26 0 -45 19t-19 45v768h424q24 0 31 -23z
1637M736 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23zM1408 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23z" />
1638 <glyph glyph-name="_456" unicode="&#xf1e6;" horiz-adv-x="1792"
1639d="M1755 1083q37 -38 37 -90.5t-37 -90.5l-401 -400l150 -150l-160 -160q-163 -163 -389.5 -186.5t-411.5 100.5l-362 -362h-181v181l362 362q-124 185 -100.5 411.5t186.5 389.5l160 160l150 -150l400 401q38 37 91 37t90 -37t37 -90.5t-37 -90.5l-400 -401l234 -234
1640l401 400q38 37 91 37t90 -37z" />
1641 <glyph glyph-name="_457" unicode="&#xf1e7;" horiz-adv-x="1792"
1642d="M873 796q0 -83 -63.5 -142.5t-152.5 -59.5t-152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59t152.5 -59t63.5 -143zM1375 796q0 -83 -63 -142.5t-153 -59.5q-89 0 -152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59q90 0 153 -59t63 -143zM1600 616v667q0 87 -32 123.5
1643t-111 36.5h-1112q-83 0 -112.5 -34t-29.5 -126v-673q43 -23 88.5 -40t81 -28t81 -18.5t71 -11t70 -4t58.5 -0.5t56.5 2t44.5 2q68 1 95 -27q6 -6 10 -9q26 -25 61 -51q7 91 118 87q5 0 36.5 -1.5t43 -2t45.5 -1t53 1t54.5 4.5t61 8.5t62 13.5t67 19.5t67.5 27t72 34.5z
1644M1763 621q-121 -149 -372 -252q84 -285 -23 -465q-66 -113 -183 -148q-104 -32 -182 15q-86 51 -82 164l-1 326v1q-8 2 -24.5 6t-23.5 5l-1 -338q4 -114 -83 -164q-79 -47 -183 -15q-117 36 -182 150q-105 180 -22 463q-251 103 -372 252q-25 37 -4 63t60 -1q4 -2 11.5 -7
1645t10.5 -8v694q0 72 47 123t114 51h1257q67 0 114 -51t47 -123v-694l21 15q39 27 60 1t-4 -63z" />
1646 <glyph glyph-name="_458" unicode="&#xf1e8;" horiz-adv-x="1792"
1647d="M896 1102v-434h-145v434h145zM1294 1102v-434h-145v434h145zM1294 342l253 254v795h-1194v-1049h326v-217l217 217h398zM1692 1536v-1013l-434 -434h-326l-217 -217h-217v217h-398v1158l109 289h1483z" />
1648 <glyph glyph-name="_459" unicode="&#xf1e9;"
1649d="M773 217v-127q-1 -292 -6 -305q-12 -32 -51 -40q-54 -9 -181.5 38t-162.5 89q-13 15 -17 36q-1 12 4 26q4 10 34 47t181 216q1 0 60 70q15 19 39.5 24.5t49.5 -3.5q24 -10 37.5 -29t12.5 -42zM624 468q-3 -55 -52 -70l-120 -39q-275 -88 -292 -88q-35 2 -54 36
1650q-12 25 -17 75q-8 76 1 166.5t30 124.5t56 32q13 0 202 -77q71 -29 115 -47l84 -34q23 -9 35.5 -30.5t11.5 -48.5zM1450 171q-7 -54 -91.5 -161t-135.5 -127q-37 -14 -63 7q-14 10 -184 287l-47 77q-14 21 -11.5 46t19.5 46q35 43 83 26q1 -1 119 -40q203 -66 242 -79.5
1651t47 -20.5q28 -22 22 -61zM778 803q5 -102 -54 -122q-58 -17 -114 71l-378 598q-8 35 19 62q41 43 207.5 89.5t224.5 31.5q40 -10 49 -45q3 -18 22 -305.5t24 -379.5zM1440 695q3 -39 -26 -59q-15 -10 -329 -86q-67 -15 -91 -23l1 2q-23 -6 -46 4t-37 32q-30 47 0 87
1652q1 1 75 102q125 171 150 204t34 39q28 19 65 2q48 -23 123 -133.5t81 -167.5v-3z" />
1653 <glyph glyph-name="_460" unicode="&#xf1ea;" horiz-adv-x="2048"
1654d="M1024 1024h-384v-384h384v384zM1152 384v-128h-640v128h640zM1152 1152v-640h-640v640h640zM1792 384v-128h-512v128h512zM1792 640v-128h-512v128h512zM1792 896v-128h-512v128h512zM1792 1152v-128h-512v128h512zM256 192v960h-128v-960q0 -26 19 -45t45 -19t45 19
1655t19 45zM1920 192v1088h-1536v-1088q0 -33 -11 -64h1483q26 0 45 19t19 45zM2048 1408v-1216q0 -80 -56 -136t-136 -56h-1664q-80 0 -136 56t-56 136v1088h256v128h1792z" />
1656 <glyph glyph-name="_461" unicode="&#xf1eb;" horiz-adv-x="2048"
1657d="M1024 13q-20 0 -93 73.5t-73 93.5q0 32 62.5 54t103.5 22t103.5 -22t62.5 -54q0 -20 -73 -93.5t-93 -73.5zM1294 284q-2 0 -40 25t-101.5 50t-128.5 25t-128.5 -25t-101 -50t-40.5 -25q-18 0 -93.5 75t-75.5 93q0 13 10 23q78 77 196 121t233 44t233 -44t196 -121
1658q10 -10 10 -23q0 -18 -75.5 -93t-93.5 -75zM1567 556q-11 0 -23 8q-136 105 -252 154.5t-268 49.5q-85 0 -170.5 -22t-149 -53t-113.5 -62t-79 -53t-31 -22q-17 0 -92 75t-75 93q0 12 10 22q132 132 320 205t380 73t380 -73t320 -205q10 -10 10 -22q0 -18 -75 -93t-92 -75z
1659M1838 827q-11 0 -22 9q-179 157 -371.5 236.5t-420.5 79.5t-420.5 -79.5t-371.5 -236.5q-11 -9 -22 -9q-17 0 -92.5 75t-75.5 93q0 13 10 23q187 186 445 288t527 102t527 -102t445 -288q10 -10 10 -23q0 -18 -75.5 -93t-92.5 -75z" />
1660 <glyph glyph-name="_462" unicode="&#xf1ec;" horiz-adv-x="1792"
1661d="M384 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5
1662t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5
1663t37.5 90.5zM384 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 768q0 53 -37.5 90.5t-90.5 37.5
1664t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1536 0v384q0 52 -38 90t-90 38t-90 -38t-38 -90v-384q0 -52 38 -90t90 -38t90 38t38 90zM1152 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z
1665M1536 1088v256q0 26 -19 45t-45 19h-1280q-26 0 -45 -19t-19 -45v-256q0 -26 19 -45t45 -19h1280q26 0 45 19t19 45zM1536 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1408v-1536q0 -52 -38 -90t-90 -38
1666h-1408q-52 0 -90 38t-38 90v1536q0 52 38 90t90 38h1408q52 0 90 -38t38 -90z" />
1667 <glyph glyph-name="_463" unicode="&#xf1ed;"
1668d="M1519 890q18 -84 -4 -204q-87 -444 -565 -444h-44q-25 0 -44 -16.5t-24 -42.5l-4 -19l-55 -346l-2 -15q-5 -26 -24.5 -42.5t-44.5 -16.5h-251q-21 0 -33 15t-9 36q9 56 26.5 168t26.5 168t27 167.5t27 167.5q5 37 43 37h131q133 -2 236 21q175 39 287 144q102 95 155 246
1669q24 70 35 133q1 6 2.5 7.5t3.5 1t6 -3.5q79 -59 98 -162zM1347 1172q0 -107 -46 -236q-80 -233 -302 -315q-113 -40 -252 -42q0 -1 -90 -1l-90 1q-100 0 -118 -96q-2 -8 -85 -530q-1 -10 -12 -10h-295q-22 0 -36.5 16.5t-11.5 38.5l232 1471q5 29 27.5 48t51.5 19h598
1670q34 0 97.5 -13t111.5 -32q107 -41 163.5 -123t56.5 -196z" />
1671 <glyph glyph-name="_464" unicode="&#xf1ee;" horiz-adv-x="1792"
1672d="M441 864q33 0 52 -26q266 -364 362 -774h-446q-127 441 -367 749q-12 16 -3 33.5t29 17.5h373zM1000 507q-49 -199 -125 -393q-79 310 -256 594q40 221 44 449q211 -340 337 -650zM1099 1216q235 -324 384.5 -698.5t184.5 -773.5h-451q-41 665 -553 1472h435zM1792 640
1673q0 -424 -101 -812q-67 560 -359 1083q-25 301 -106 584q-4 16 5.5 28.5t25.5 12.5h359q21 0 38.5 -13t22.5 -33q115 -409 115 -850z" />
1674 <glyph glyph-name="uniF1F0" unicode="&#xf1f0;" horiz-adv-x="2304"
1675d="M1975 546h-138q14 37 66 179l3 9q4 10 10 26t9 26l12 -55zM531 611l-58 295q-11 54 -75 54h-268l-2 -13q311 -79 403 -336zM710 960l-162 -438l-17 89q-26 70 -85 129.5t-131 88.5l135 -510h175l261 641h-176zM849 318h166l104 642h-166zM1617 944q-69 27 -149 27
1676q-123 0 -201 -59t-79 -153q-1 -102 145 -174q48 -23 67 -41t19 -39q0 -30 -30 -46t-69 -16q-86 0 -156 33l-22 11l-23 -144q74 -34 185 -34q130 -1 208.5 59t80.5 160q0 106 -140 174q-49 25 -71 42t-22 38q0 22 24.5 38.5t70.5 16.5q70 1 124 -24l15 -8zM2042 960h-128
1677q-65 0 -87 -54l-246 -588h174l35 96h212q5 -22 20 -96h154zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
1678 <glyph glyph-name="_466" unicode="&#xf1f1;" horiz-adv-x="2304"
1679d="M1119 1195q-128 85 -281 85q-103 0 -197.5 -40.5t-162.5 -108.5t-108.5 -162t-40.5 -197q0 -104 40.5 -198t108.5 -162t162 -108.5t198 -40.5q153 0 281 85q-131 107 -178 265.5t0.5 316.5t177.5 265zM1152 1171q-126 -99 -172 -249.5t-0.5 -300.5t172.5 -249
1680q127 99 172.5 249t-0.5 300.5t-172 249.5zM1185 1195q130 -107 177.5 -265.5t0.5 -317t-178 -264.5q128 -85 281 -85q104 0 198 40.5t162 108.5t108.5 162t40.5 198q0 103 -40.5 197t-108.5 162t-162.5 108.5t-197.5 40.5q-153 0 -281 -85zM1926 473h7v3h-17v-3h7v-17h3v17z
1681M1955 456h4v20h-5l-6 -13l-6 13h-5v-20h3v15l6 -13h4l5 13v-15zM1947 16v-2h-2h-3v3h3h2v-1zM1947 7h3l-4 5h2l1 1q1 1 1 3t-1 3l-1 1h-3h-6v-13h3v5h1zM685 75q0 19 11 31t30 12q18 0 29 -12.5t11 -30.5q0 -19 -11 -31t-29 -12q-19 0 -30 12t-11 31zM1158 119q30 0 35 -32
1682h-70q5 32 35 32zM1514 75q0 19 11 31t29 12t29.5 -12.5t11.5 -30.5q0 -19 -11 -31t-30 -12q-18 0 -29 12t-11 31zM1786 75q0 18 11.5 30.5t29.5 12.5t29.5 -12.5t11.5 -30.5q0 -19 -11.5 -31t-29.5 -12t-29.5 12.5t-11.5 30.5zM1944 3q-2 0 -4 1q-1 0 -3 2t-2 3q-1 2 -1 4
1683q0 3 1 4q0 2 2 4l1 1q2 0 2 1q2 1 4 1q3 0 4 -1l4 -2l2 -4v-1q1 -2 1 -3l-1 -1v-3t-1 -1l-1 -2q-2 -2 -4 -2q-1 -1 -4 -1zM599 7h30v85q0 24 -14.5 38.5t-39.5 15.5q-32 0 -47 -24q-14 24 -45 24q-24 0 -39 -20v16h-30v-135h30v75q0 36 33 36q30 0 30 -36v-75h29v75
1684q0 36 33 36q30 0 30 -36v-75zM765 7h29v68v67h-29v-16q-17 20 -43 20q-29 0 -48 -20t-19 -51t19 -51t48 -20q28 0 43 20v-17zM943 48q0 34 -47 40l-14 2q-23 4 -23 14q0 15 25 15q23 0 43 -11l12 24q-22 14 -55 14q-26 0 -41 -12t-15 -32q0 -33 47 -39l13 -2q24 -4 24 -14
1685q0 -17 -31 -17q-25 0 -45 14l-13 -23q25 -17 58 -17q29 0 45.5 12t16.5 32zM1073 14l-8 25q-13 -7 -26 -7q-19 0 -19 22v61h48v27h-48v41h-30v-41h-28v-27h28v-61q0 -50 47 -50q21 0 36 10zM1159 146q-29 0 -48 -20t-19 -51q0 -32 19.5 -51.5t49.5 -19.5q33 0 55 19l-14 22
1686q-18 -15 -39 -15q-34 0 -41 33h101v12q0 32 -18 51.5t-46 19.5zM1318 146q-23 0 -35 -20v16h-30v-135h30v76q0 35 29 35q10 0 18 -4l9 28q-9 4 -21 4zM1348 75q0 -31 19.5 -51t52.5 -20q29 0 48 16l-14 24q-18 -13 -35 -12q-18 0 -29.5 12t-11.5 31t11.5 31t29.5 12
1687q19 0 35 -12l14 24q-20 16 -48 16q-33 0 -52.5 -20t-19.5 -51zM1593 7h30v68v67h-30v-16q-15 20 -42 20q-29 0 -48.5 -20t-19.5 -51t19.5 -51t48.5 -20q28 0 42 20v-17zM1726 146q-23 0 -35 -20v16h-29v-135h29v76q0 35 29 35q10 0 18 -4l9 28q-8 4 -21 4zM1866 7h29v68v122
1688h-29v-71q-15 20 -43 20t-47.5 -20.5t-19.5 -50.5t19.5 -50.5t47.5 -20.5q29 0 43 20v-17zM1944 27l-2 -1h-3q-2 -1 -4 -3q-3 -1 -3 -4q-1 -2 -1 -6q0 -3 1 -5q0 -2 3 -4q2 -2 4 -3t5 -1q4 0 6 1q0 1 2 2l2 1q1 1 3 4q1 2 1 5q0 4 -1 6q-1 1 -3 4q0 1 -2 2l-2 1q-1 0 -3 0.5
1689t-3 0.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
1690 <glyph glyph-name="_467" unicode="&#xf1f2;" horiz-adv-x="2304"
1691d="M313 759q0 -51 -36 -84q-29 -26 -89 -26h-17v220h17q61 0 89 -27q36 -31 36 -83zM2089 824q0 -52 -64 -52h-19v101h20q63 0 63 -49zM380 759q0 74 -50 120.5t-129 46.5h-95v-333h95q74 0 119 38q60 51 60 128zM410 593h65v333h-65v-333zM730 694q0 40 -20.5 62t-75.5 42
1692q-29 10 -39.5 19t-10.5 23q0 16 13.5 26.5t34.5 10.5q29 0 53 -27l34 44q-41 37 -98 37q-44 0 -74 -27.5t-30 -67.5q0 -35 18 -55.5t64 -36.5q37 -13 45 -19q19 -12 19 -34q0 -20 -14 -33.5t-36 -13.5q-48 0 -71 44l-42 -40q44 -64 115 -64q51 0 83 30.5t32 79.5zM1008 604
1693v77q-37 -37 -78 -37q-49 0 -80.5 32.5t-31.5 82.5q0 48 31.5 81.5t77.5 33.5q43 0 81 -38v77q-40 20 -80 20q-74 0 -125.5 -50.5t-51.5 -123.5t51 -123.5t125 -50.5q42 0 81 19zM2240 0v527q-65 -40 -144.5 -84t-237.5 -117t-329.5 -137.5t-417.5 -134.5t-504 -118h1569
1694q26 0 45 19t19 45zM1389 757q0 75 -53 128t-128 53t-128 -53t-53 -128t53 -128t128 -53t128 53t53 128zM1541 584l144 342h-71l-90 -224l-89 224h-71l142 -342h35zM1714 593h184v56h-119v90h115v56h-115v74h119v57h-184v-333zM2105 593h80l-105 140q76 16 76 94q0 47 -31 73
1695t-87 26h-97v-333h65v133h9zM2304 1274v-1268q0 -56 -38.5 -95t-93.5 -39h-2040q-55 0 -93.5 39t-38.5 95v1268q0 56 38.5 95t93.5 39h2040q55 0 93.5 -39t38.5 -95z" />
1696 <glyph glyph-name="f1f3" unicode="&#xf1f3;" horiz-adv-x="2304"
1697d="M119 854h89l-45 108zM740 328l74 79l-70 79h-163v-49h142v-55h-142v-54h159zM898 406l99 -110v217zM1186 453q0 33 -40 33h-84v-69h83q41 0 41 36zM1475 457q0 29 -42 29h-82v-61h81q43 0 43 32zM1197 923q0 29 -42 29h-82v-60h81q43 0 43 31zM1656 854h89l-44 108z
1698M699 1009v-271h-66v212l-94 -212h-57l-94 212v-212h-132l-25 60h-135l-25 -60h-70l116 271h96l110 -257v257h106l85 -184l77 184h108zM1255 453q0 -20 -5.5 -35t-14 -25t-22.5 -16.5t-26 -10t-31.5 -4.5t-31.5 -1t-32.5 0.5t-29.5 0.5v-91h-126l-80 90l-83 -90h-256v271h260
1699l80 -89l82 89h207q109 0 109 -89zM964 794v-56h-217v271h217v-57h-152v-49h148v-55h-148v-54h152zM2304 235v-229q0 -55 -38.5 -94.5t-93.5 -39.5h-2040q-55 0 -93.5 39.5t-38.5 94.5v678h111l25 61h55l25 -61h218v46l19 -46h113l20 47v-47h541v99l10 1q10 0 10 -14v-86h279
1700v23q23 -12 55 -18t52.5 -6.5t63 0.5t51.5 1l25 61h56l25 -61h227v58l34 -58h182v378h-180v-44l-25 44h-185v-44l-23 44h-249q-69 0 -109 -22v22h-172v-22q-24 22 -73 22h-628l-43 -97l-43 97h-198v-44l-22 44h-169l-78 -179v391q0 55 38.5 94.5t93.5 39.5h2040
1701q55 0 93.5 -39.5t38.5 -94.5v-678h-120q-51 0 -81 -22v22h-177q-55 0 -78 -22v22h-316v-22q-31 22 -87 22h-209v-22q-23 22 -91 22h-234l-54 -58l-50 58h-349v-378h343l55 59l52 -59h211v89h21q59 0 90 13v-102h174v99h8q8 0 10 -2t2 -10v-87h529q57 0 88 24v-24h168
1702q60 0 95 17zM1546 469q0 -23 -12 -43t-34 -29q25 -9 34 -26t9 -46v-54h-65v45q0 33 -12 43.5t-46 10.5h-69v-99h-65v271h154q48 0 77 -15t29 -58zM1269 936q0 -24 -12.5 -44t-33.5 -29q26 -9 34.5 -25.5t8.5 -46.5v-53h-65q0 9 0.5 26.5t0 25t-3 18.5t-8.5 16t-17.5 8.5
1703t-29.5 3.5h-70v-98h-64v271l153 -1q49 0 78 -14.5t29 -57.5zM1798 327v-56h-216v271h216v-56h-151v-49h148v-55h-148v-54zM1372 1009v-271h-66v271h66zM2065 357q0 -86 -102 -86h-126v58h126q34 0 34 25q0 16 -17 21t-41.5 5t-49.5 3.5t-42 22.5t-17 55q0 39 26 60t66 21
1704h130v-57h-119q-36 0 -36 -25q0 -16 17.5 -20.5t42 -4t49 -2.5t42 -21.5t17.5 -54.5zM2304 407v-101q-24 -35 -88 -35h-125v58h125q33 0 33 25q0 13 -12.5 19t-31 5.5t-40 2t-40 8t-31 24t-12.5 48.5q0 39 26.5 60t66.5 21h129v-57h-118q-36 0 -36 -25q0 -20 29 -22t68.5 -5
1705t56.5 -26zM2139 1008v-270h-92l-122 203v-203h-132l-26 60h-134l-25 -60h-75q-129 0 -129 133q0 138 133 138h63v-59q-7 0 -28 1t-28.5 0.5t-23 -2t-21.5 -6.5t-14.5 -13.5t-11.5 -23t-3 -33.5q0 -38 13.5 -58t49.5 -20h29l92 213h97l109 -256v256h99l114 -188v188h66z" />
1706 <glyph glyph-name="_469" unicode="&#xf1f4;" horiz-adv-x="2304"
1707d="M745 630q0 -37 -25.5 -61.5t-62.5 -24.5q-29 0 -46.5 16t-17.5 44q0 37 25 62.5t62 25.5q28 0 46.5 -16.5t18.5 -45.5zM1530 779q0 -42 -22 -57t-66 -15l-32 -1l17 107q2 11 13 11h18q22 0 35 -2t25 -12.5t12 -30.5zM1881 630q0 -36 -25.5 -61t-61.5 -25q-29 0 -47 16
1708t-18 44q0 37 25 62.5t62 25.5q28 0 46.5 -16.5t18.5 -45.5zM513 801q0 59 -38.5 85.5t-100.5 26.5h-160q-19 0 -21 -19l-65 -408q-1 -6 3 -11t10 -5h76q20 0 22 19l18 110q1 8 7 13t15 6.5t17 1.5t19 -1t14 -1q86 0 135 48.5t49 134.5zM822 489l41 261q1 6 -3 11t-10 5h-76
1709q-14 0 -17 -33q-27 40 -95 40q-72 0 -122.5 -54t-50.5 -127q0 -59 34.5 -94t92.5 -35q28 0 58 12t48 32q-4 -12 -4 -21q0 -16 13 -16h69q19 0 22 19zM1269 752q0 5 -4 9.5t-9 4.5h-77q-11 0 -18 -10l-106 -156l-44 150q-5 16 -22 16h-75q-5 0 -9 -4.5t-4 -9.5q0 -2 19.5 -59
1710t42 -123t23.5 -70q-82 -112 -82 -120q0 -13 13 -13h77q11 0 18 10l255 368q2 2 2 7zM1649 801q0 59 -38.5 85.5t-100.5 26.5h-159q-20 0 -22 -19l-65 -408q-1 -6 3 -11t10 -5h82q12 0 16 13l18 116q1 8 7 13t15 6.5t17 1.5t19 -1t14 -1q86 0 135 48.5t49 134.5zM1958 489
1711l41 261q1 6 -3 11t-10 5h-76q-14 0 -17 -33q-26 40 -95 40q-72 0 -122.5 -54t-50.5 -127q0 -59 34.5 -94t92.5 -35q29 0 59 12t47 32q0 -1 -2 -9t-2 -12q0 -16 13 -16h69q19 0 22 19zM2176 898v1q0 14 -13 14h-74q-11 0 -13 -11l-65 -416l-1 -2q0 -5 4 -9.5t10 -4.5h66
1712q19 0 21 19zM392 764q-5 -35 -26 -46t-60 -11l-33 -1l17 107q2 11 13 11h19q40 0 58 -11.5t12 -48.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
1713 <glyph glyph-name="_470" unicode="&#xf1f5;" horiz-adv-x="2304"
1714d="M1597 633q0 -69 -21 -106q-19 -35 -52 -35q-23 0 -41 9v224q29 30 57 30q57 0 57 -122zM2035 669h-110q6 98 56 98q51 0 54 -98zM476 534q0 59 -33 91.5t-101 57.5q-36 13 -52 24t-16 25q0 26 38 26q58 0 124 -33l18 112q-67 32 -149 32q-77 0 -123 -38q-48 -39 -48 -109
1715q0 -58 32.5 -90.5t99.5 -56.5q39 -14 54.5 -25.5t15.5 -27.5q0 -31 -48 -31q-29 0 -70 12.5t-72 30.5l-18 -113q72 -41 168 -41q81 0 129 37q51 41 51 117zM771 749l19 111h-96v135l-129 -21l-18 -114l-46 -8l-17 -103h62v-219q0 -84 44 -120q38 -30 111 -30q32 0 79 11v118
1716q-32 -7 -44 -7q-42 0 -42 50v197h77zM1087 724v139q-15 3 -28 3q-32 0 -55.5 -16t-33.5 -46l-10 56h-131v-471h150v306q26 31 82 31q16 0 26 -2zM1124 389h150v471h-150v-471zM1746 638q0 122 -45 179q-40 52 -111 52q-64 0 -117 -56l-8 47h-132v-645l150 25v151
1717q36 -11 68 -11q83 0 134 56q61 65 61 202zM1278 986q0 33 -23 56t-56 23t-56 -23t-23 -56t23 -56.5t56 -23.5t56 23.5t23 56.5zM2176 629q0 113 -48 176q-50 64 -144 64q-96 0 -151.5 -66t-55.5 -180q0 -128 63 -188q55 -55 161 -55q101 0 160 40l-16 103q-57 -31 -128 -31
1718q-43 0 -63 19q-23 19 -28 66h248q2 14 2 52zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
1719 <glyph glyph-name="_471" unicode="&#xf1f6;" horiz-adv-x="2048"
1720d="M1558 684q61 -356 298 -556q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5zM1024 -176q16 0 16 16t-16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5zM2026 1424q8 -10 7.5 -23.5t-10.5 -22.5
1721l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5
1722l418 363q10 8 23.5 7t21.5 -11z" />
1723 <glyph glyph-name="_472" unicode="&#xf1f7;" horiz-adv-x="2048"
1724d="M1040 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM503 315l877 760q-42 88 -132.5 146.5t-223.5 58.5q-93 0 -169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -384 -137 -645zM1856 128
1725q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5l149 129h757q-166 187 -227 459l111 97q61 -356 298 -556zM1942 1520l84 -96q8 -10 7.5 -23.5t-10.5 -22.5l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161
1726q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5l418 363q10 8 23.5 7t21.5 -11z" />
1727 <glyph glyph-name="_473" unicode="&#xf1f8;" horiz-adv-x="1408"
1728d="M512 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM768 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1024 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704
1729q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167
1730q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
1731 <glyph glyph-name="_474" unicode="&#xf1f9;"
1732d="M1150 462v-109q0 -50 -36.5 -89t-94 -60.5t-118 -32.5t-117.5 -11q-205 0 -342.5 139t-137.5 346q0 203 136 339t339 136q34 0 75.5 -4.5t93 -18t92.5 -34t69 -56.5t28 -81v-109q0 -16 -16 -16h-118q-16 0 -16 16v70q0 43 -65.5 67.5t-137.5 24.5q-140 0 -228.5 -91.5
1733t-88.5 -237.5q0 -151 91.5 -249.5t233.5 -98.5q68 0 138 24t70 66v70q0 7 4.5 11.5t10.5 4.5h119q6 0 11 -4.5t5 -11.5zM768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5
1734t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
1735 <glyph glyph-name="_475" unicode="&#xf1fa;"
1736d="M972 761q0 108 -53.5 169t-147.5 61q-63 0 -124 -30.5t-110 -84.5t-79.5 -137t-30.5 -180q0 -112 53.5 -173t150.5 -61q96 0 176 66.5t122.5 166t42.5 203.5zM1536 640q0 -111 -37 -197t-98.5 -135t-131.5 -74.5t-145 -27.5q-6 0 -15.5 -0.5t-16.5 -0.5q-95 0 -142 53
1737q-28 33 -33 83q-52 -66 -131.5 -110t-173.5 -44q-161 0 -249.5 95.5t-88.5 269.5q0 157 66 290t179 210.5t246 77.5q87 0 155 -35.5t106 -99.5l2 19l11 56q1 6 5.5 12t9.5 6h118q5 0 13 -11q5 -5 3 -16l-120 -614q-5 -24 -5 -48q0 -39 12.5 -52t44.5 -13q28 1 57 5.5t73 24
1738t77 50t57 89.5t24 137q0 292 -174 466t-466 174q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51q228 0 405 144q11 9 24 8t21 -12l41 -49q8 -12 7 -24q-2 -13 -12 -22q-102 -83 -227.5 -128t-258.5 -45q-156 0 -298 61
1739t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q344 0 556 -212t212 -556z" />
1740 <glyph glyph-name="_476" unicode="&#xf1fb;" horiz-adv-x="1792"
1741d="M1698 1442q94 -94 94 -226.5t-94 -225.5l-225 -223l104 -104q10 -10 10 -23t-10 -23l-210 -210q-10 -10 -23 -10t-23 10l-105 105l-603 -603q-37 -37 -90 -37h-203l-256 -128l-64 64l128 256v203q0 53 37 90l603 603l-105 105q-10 10 -10 23t10 23l210 210q10 10 23 10
1742t23 -10l104 -104l223 225q93 94 225.5 94t226.5 -94zM512 64l576 576l-192 192l-576 -576v-192h192z" />
1743 <glyph glyph-name="f1fc" unicode="&#xf1fc;" horiz-adv-x="1792"
1744d="M1615 1536q70 0 122.5 -46.5t52.5 -116.5q0 -63 -45 -151q-332 -629 -465 -752q-97 -91 -218 -91q-126 0 -216.5 92.5t-90.5 219.5q0 128 92 212l638 579q59 54 130 54zM706 502q39 -76 106.5 -130t150.5 -76l1 -71q4 -213 -129.5 -347t-348.5 -134q-123 0 -218 46.5
1745t-152.5 127.5t-86.5 183t-29 220q7 -5 41 -30t62 -44.5t59 -36.5t46 -17q41 0 55 37q25 66 57.5 112.5t69.5 76t88 47.5t103 25.5t125 10.5z" />
1746 <glyph glyph-name="_478" unicode="&#xf1fd;" horiz-adv-x="1792"
1747d="M1792 128v-384h-1792v384q45 0 85 14t59 27.5t47 37.5q30 27 51.5 38t56.5 11q24 0 44 -7t31 -15t33 -27q29 -25 47 -38t58 -27t86 -14q45 0 85 14.5t58 27t48 37.5q21 19 32.5 27t31 15t43.5 7q35 0 56.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14t85 14t59 27.5
1748t47 37.5q30 27 51.5 38t56.5 11q34 0 55.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14zM1792 448v-192q-24 0 -44 7t-31 15t-33 27q-29 25 -47 38t-58 27t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-22 -19 -33 -27t-31 -15t-44 -7q-35 0 -56.5 11t-51.5 38q-29 25 -47 38
1749t-58 27t-86 14q-45 0 -85 -14.5t-58 -27t-48 -37.5q-21 -19 -32.5 -27t-31 -15t-43.5 -7q-35 0 -56.5 11t-51.5 38q-28 24 -47 37.5t-59 27.5t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-30 -27 -51.5 -38t-56.5 -11v192q0 80 56 136t136 56h64v448h256v-448h256v448h256v-448
1750h256v448h256v-448h64q80 0 136 -56t56 -136zM512 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1024 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5
1751q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1536 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150z" />
1752 <glyph glyph-name="_479" unicode="&#xf1fe;" horiz-adv-x="2048"
1753d="M2048 0v-128h-2048v1536h128v-1408h1920zM1664 1024l256 -896h-1664v576l448 576l576 -576z" />
1754 <glyph glyph-name="_480" unicode="&#xf200;" horiz-adv-x="1792"
1755d="M768 646l546 -546q-106 -108 -247.5 -168t-298.5 -60q-209 0 -385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103v-762zM955 640h773q0 -157 -60 -298.5t-168 -247.5zM1664 768h-768v768q209 0 385.5 -103t279.5 -279.5t103 -385.5z" />
1756 <glyph glyph-name="_481" unicode="&#xf201;" horiz-adv-x="2048"
1757d="M2048 0v-128h-2048v1536h128v-1408h1920zM1920 1248v-435q0 -21 -19.5 -29.5t-35.5 7.5l-121 121l-633 -633q-10 -10 -23 -10t-23 10l-233 233l-416 -416l-192 192l585 585q10 10 23 10t23 -10l233 -233l464 464l-121 121q-16 16 -7.5 35.5t29.5 19.5h435q14 0 23 -9
1758t9 -23z" />
1759 <glyph glyph-name="_482" unicode="&#xf202;" horiz-adv-x="1792"
1760d="M1292 832q0 -6 10 -41q10 -29 25 -49.5t41 -34t44 -20t55 -16.5q325 -91 325 -332q0 -146 -105.5 -242.5t-254.5 -96.5q-59 0 -111.5 18.5t-91.5 45.5t-77 74.5t-63 87.5t-53.5 103.5t-43.5 103t-39.5 106.5t-35.5 95q-32 81 -61.5 133.5t-73.5 96.5t-104 64t-142 20
1761q-96 0 -183 -55.5t-138 -144.5t-51 -185q0 -160 106.5 -279.5t263.5 -119.5q177 0 258 95q56 63 83 116l84 -152q-15 -34 -44 -70l1 -1q-131 -152 -388 -152q-147 0 -269.5 79t-190.5 207.5t-68 274.5q0 105 43.5 206t116 176.5t172 121.5t204.5 46q87 0 159 -19t123.5 -50
1762t95 -80t72.5 -99t58.5 -117t50.5 -124.5t50 -130.5t55 -127q96 -200 233 -200q81 0 138.5 48.5t57.5 128.5q0 42 -19 72t-50.5 46t-72.5 31.5t-84.5 27t-87.5 34t-81 52t-65 82t-39 122.5q-3 16 -3 33q0 110 87.5 192t198.5 78q78 -3 120.5 -14.5t90.5 -53.5h-1
1763q12 -11 23 -24.5t26 -36t19 -27.5l-129 -99q-26 49 -54 70v1q-23 21 -97 21q-49 0 -84 -33t-35 -83z" />
1764 <glyph glyph-name="_483" unicode="&#xf203;"
1765d="M1432 484q0 173 -234 239q-35 10 -53 16.5t-38 25t-29 46.5q0 2 -2 8.5t-3 12t-1 7.5q0 36 24.5 59.5t60.5 23.5q54 0 71 -15h-1q20 -15 39 -51l93 71q-39 54 -49 64q-33 29 -67.5 39t-85.5 10q-80 0 -142 -57.5t-62 -137.5q0 -7 2 -23q16 -96 64.5 -140t148.5 -73
1766q29 -8 49 -15.5t45 -21.5t38.5 -34.5t13.5 -46.5v-5q1 -58 -40.5 -93t-100.5 -35q-97 0 -167 144q-23 47 -51.5 121.5t-48 125.5t-54 110.5t-74 95.5t-103.5 60.5t-147 24.5q-101 0 -192 -56t-144 -148t-50 -192v-1q4 -108 50.5 -199t133.5 -147.5t196 -56.5q186 0 279 110
1767q20 27 31 51l-60 109q-42 -80 -99 -116t-146 -36q-115 0 -191 87t-76 204q0 105 82 189t186 84q112 0 170 -53.5t104 -172.5q8 -21 25.5 -68.5t28.5 -76.5t31.5 -74.5t38.5 -74t45.5 -62.5t55.5 -53.5t66 -33t80 -13.5q107 0 183 69.5t76 174.5zM1536 1120v-960
1768q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
1769 <glyph glyph-name="_484" unicode="&#xf204;" horiz-adv-x="2048"
1770d="M1152 640q0 104 -40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM1920 640q0 104 -40.5 198.5
1771t-109.5 163.5t-163.5 109.5t-198.5 40.5h-386q119 -90 188.5 -224t69.5 -288t-69.5 -288t-188.5 -224h386q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM2048 640q0 -130 -51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5
1772t-136.5 204t-51 248.5t51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5z" />
1773 <glyph glyph-name="_485" unicode="&#xf205;" horiz-adv-x="2048"
1774d="M0 640q0 130 51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5t-51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5t-136.5 204t-51 248.5zM1408 128q104 0 198.5 40.5t163.5 109.5
1775t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5z" />
1776 <glyph glyph-name="_486" unicode="&#xf206;" horiz-adv-x="2304"
1777d="M762 384h-314q-40 0 -57.5 35t6.5 67l188 251q-65 31 -137 31q-132 0 -226 -94t-94 -226t94 -226t226 -94q115 0 203 72.5t111 183.5zM576 512h186q-18 85 -75 148zM1056 512l288 384h-480l-99 -132q105 -103 126 -252h165zM2176 448q0 132 -94 226t-226 94
1778q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94t226 94t94 226zM2304 448q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 97 39.5 183.5t109.5 149.5l-65 98l-353 -469
1779q-18 -26 -51 -26h-197q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q114 0 215 -55l137 183h-224q-26 0 -45 19t-19 45t19 45t45 19h384v-128h435l-85 128h-222q-26 0 -45 19t-19 45t19 45t45 19h256q33 0 53 -28l267 -400
1780q91 44 192 44q185 0 316.5 -131.5t131.5 -316.5z" />
1781 <glyph glyph-name="_487" unicode="&#xf207;"
1782d="M384 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1362 716l-72 384q-5 23 -22.5 37.5t-40.5 14.5
1783h-918q-23 0 -40.5 -14.5t-22.5 -37.5l-72 -384q-5 -30 14 -53t49 -23h1062q30 0 49 23t14 53zM1136 1328q0 20 -14 34t-34 14h-640q-20 0 -34 -14t-14 -34t14 -34t34 -14h640q20 0 34 14t14 34zM1536 603v-603h-128v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5
1784t-37.5 90.5v128h-768v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5v128h-128v603q0 112 25 223l103 454q9 78 97.5 137t230 89t312.5 30t312.5 -30t230 -89t97.5 -137l105 -454q23 -102 23 -223z" />
1785 <glyph glyph-name="_488" unicode="&#xf208;" horiz-adv-x="2048"
1786d="M1463 704q0 -35 -25 -60.5t-61 -25.5h-702q-36 0 -61 25.5t-25 60.5t25 60.5t61 25.5h702q36 0 61 -25.5t25 -60.5zM1677 704q0 86 -23 170h-982q-36 0 -61 25t-25 60q0 36 25 61t61 25h908q-88 143 -235 227t-320 84q-177 0 -327.5 -87.5t-238 -237.5t-87.5 -327
1787q0 -86 23 -170h982q36 0 61 -25t25 -60q0 -36 -25 -61t-61 -25h-908q88 -143 235.5 -227t320.5 -84q132 0 253 51.5t208 139t139 208t52 253.5zM2048 959q0 -35 -25 -60t-61 -25h-131q17 -85 17 -170q0 -167 -65.5 -319.5t-175.5 -263t-262.5 -176t-319.5 -65.5
1788q-246 0 -448.5 133t-301.5 350h-189q-36 0 -61 25t-25 61q0 35 25 60t61 25h132q-17 85 -17 170q0 167 65.5 319.5t175.5 263t262.5 176t320.5 65.5q245 0 447.5 -133t301.5 -350h188q36 0 61 -25t25 -61z" />
1789 <glyph glyph-name="_489" unicode="&#xf209;" horiz-adv-x="1280"
1790d="M953 1158l-114 -328l117 -21q165 451 165 518q0 56 -38 56q-57 0 -130 -225zM654 471l33 -88q37 42 71 67l-33 5.5t-38.5 7t-32.5 8.5zM362 1367q0 -98 159 -521q17 10 49 10q15 0 75 -5l-121 351q-75 220 -123 220q-19 0 -29 -17.5t-10 -37.5zM283 608q0 -36 51.5 -119
1791t117.5 -153t100 -70q14 0 25.5 13t11.5 27q0 24 -32 102q-13 32 -32 72t-47.5 89t-61.5 81t-62 32q-20 0 -45.5 -27t-25.5 -47zM125 273q0 -41 25 -104q59 -145 183.5 -227t281.5 -82q227 0 382 170q152 169 152 427q0 43 -1 67t-11.5 62t-30.5 56q-56 49 -211.5 75.5
1792t-270.5 26.5q-37 0 -49 -11q-12 -5 -12 -35q0 -34 21.5 -60t55.5 -40t77.5 -23.5t87.5 -11.5t85 -4t70 0h23q24 0 40 -19q15 -19 19 -55q-28 -28 -96 -54q-61 -22 -93 -46q-64 -46 -108.5 -114t-44.5 -137q0 -31 18.5 -88.5t18.5 -87.5l-3 -12q-4 -12 -4 -14
1793q-137 10 -146 216q-8 -2 -41 -2q2 -7 2 -21q0 -53 -40.5 -89.5t-94.5 -36.5q-82 0 -166.5 78t-84.5 159q0 34 33 67q52 -64 60 -76q77 -104 133 -104q12 0 26.5 8.5t14.5 20.5q0 34 -87.5 145t-116.5 111q-43 0 -70 -44.5t-27 -90.5zM11 264q0 101 42.5 163t136.5 88
1794q-28 74 -28 104q0 62 61 123t122 61q29 0 70 -15q-163 462 -163 567q0 80 41 130.5t119 50.5q131 0 325 -581q6 -17 8 -23q6 16 29 79.5t43.5 118.5t54 127.5t64.5 123t70.5 86.5t76.5 36q71 0 112 -49t41 -122q0 -108 -159 -550q61 -15 100.5 -46t58.5 -78t26 -93.5
1795t7 -110.5q0 -150 -47 -280t-132 -225t-211 -150t-278 -55q-111 0 -223 42q-149 57 -258 191.5t-109 286.5z" />
1796 <glyph glyph-name="_490" unicode="&#xf20a;" horiz-adv-x="2048"
1797d="M785 528h207q-14 -158 -98.5 -248.5t-214.5 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-203q-5 64 -35.5 99t-81.5 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t40 -51.5t66 -18q95 0 109 139zM1497 528h206
1798q-14 -158 -98 -248.5t-214 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-204q-4 64 -35 99t-81 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t39.5 -51.5t65.5 -18q49 0 76.5 38t33.5 101zM1856 647q0 207 -15.5 307
1799t-60.5 161q-6 8 -13.5 14t-21.5 15t-16 11q-86 63 -697 63q-625 0 -710 -63q-5 -4 -17.5 -11.5t-21 -14t-14.5 -14.5q-45 -60 -60 -159.5t-15 -308.5q0 -208 15 -307.5t60 -160.5q6 -8 15 -15t20.5 -14t17.5 -12q44 -33 239.5 -49t470.5 -16q610 0 697 65q5 4 17 11t20.5 14
1800t13.5 16q46 60 61 159t15 309zM2048 1408v-1536h-2048v1536h2048z" />
1801 <glyph glyph-name="_491" unicode="&#xf20b;"
1802d="M992 912v-496q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v496q0 112 -80 192t-192 80h-272v-1152q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v1344q0 14 9 23t23 9h464q135 0 249 -66.5t180.5 -180.5t66.5 -249zM1376 1376v-880q0 -135 -66.5 -249t-180.5 -180.5
1803t-249 -66.5h-464q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h160q14 0 23 -9t9 -23v-768h272q112 0 192 80t80 192v880q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
1804 <glyph glyph-name="_492" unicode="&#xf20c;"
1805d="M1311 694v-114q0 -24 -13.5 -38t-37.5 -14h-202q-24 0 -38 14t-14 38v114q0 24 14 38t38 14h202q24 0 37.5 -14t13.5 -38zM821 464v250q0 53 -32.5 85.5t-85.5 32.5h-133q-68 0 -96 -52q-28 52 -96 52h-130q-53 0 -85.5 -32.5t-32.5 -85.5v-250q0 -22 21 -22h55
1806q22 0 22 22v230q0 24 13.5 38t38.5 14h94q24 0 38 -14t14 -38v-230q0 -22 21 -22h54q22 0 22 22v230q0 24 14 38t38 14h97q24 0 37.5 -14t13.5 -38v-230q0 -22 22 -22h55q21 0 21 22zM1410 560v154q0 53 -33 85.5t-86 32.5h-264q-53 0 -86 -32.5t-33 -85.5v-410
1807q0 -21 22 -21h55q21 0 21 21v180q31 -42 94 -42h191q53 0 86 32.5t33 85.5zM1536 1176v-1072q0 -96 -68 -164t-164 -68h-1072q-96 0 -164 68t-68 164v1072q0 96 68 164t164 68h1072q96 0 164 -68t68 -164z" />
1808 <glyph glyph-name="_493" unicode="&#xf20d;"
1809d="M915 450h-294l147 551zM1001 128h311l-324 1024h-440l-324 -1024h311l383 314zM1536 1120v-960q0 -118 -85 -203t-203 -85h-960q-118 0 -203 85t-85 203v960q0 118 85 203t203 85h960q118 0 203 -85t85 -203z" />
1810 <glyph glyph-name="_494" unicode="&#xf20e;" horiz-adv-x="2048"
1811d="M2048 641q0 -21 -13 -36.5t-33 -19.5l-205 -356q3 -9 3 -18q0 -20 -12.5 -35.5t-32.5 -19.5l-193 -337q3 -8 3 -16q0 -23 -16.5 -40t-40.5 -17q-25 0 -41 18h-400q-17 -20 -43 -20t-43 20h-399q-17 -20 -43 -20q-23 0 -40 16.5t-17 40.5q0 8 4 20l-193 335
1812q-20 4 -32.5 19.5t-12.5 35.5q0 9 3 18l-206 356q-20 5 -32.5 20.5t-12.5 35.5q0 21 13.5 36.5t33.5 19.5l199 344q0 1 -0.5 3t-0.5 3q0 36 34 51l209 363q-4 10 -4 18q0 24 17 40.5t40 16.5q26 0 44 -21h396q16 21 43 21t43 -21h398q18 21 44 21q23 0 40 -16.5t17 -40.5
1813q0 -6 -4 -18l207 -358q23 -1 39 -17.5t16 -38.5q0 -13 -7 -27l187 -324q19 -4 31.5 -19.5t12.5 -35.5zM1063 -158h389l-342 354h-143l-342 -354h360q18 16 39 16t39 -16zM112 654q1 -4 1 -13q0 -10 -2 -15l208 -360l15 -6l188 199v347l-187 194q-13 -8 -29 -10zM986 1438
1814h-388l190 -200l554 200h-280q-16 -16 -38 -16t-38 16zM1689 226q1 6 5 11l-64 68l-17 -79h76zM1583 226l22 105l-252 266l-296 -307l63 -64h463zM1495 -142l16 28l65 310h-427l333 -343q8 4 13 5zM578 -158h5l342 354h-373v-335l4 -6q14 -5 22 -13zM552 226h402l64 66
1815l-309 321l-157 -166v-221zM359 226h163v189l-168 -177q4 -8 5 -12zM358 1051q0 -1 0.5 -2t0.5 -2q0 -16 -8 -29l171 -177v269zM552 1121v-311l153 -157l297 314l-223 236zM556 1425l-4 -8v-264l205 74l-191 201q-6 -2 -10 -3zM1447 1438h-16l-621 -224l213 -225zM1023 946
1816l-297 -315l311 -319l296 307zM688 634l-136 141v-284zM1038 270l-42 -44h85zM1374 618l238 -251l132 624l-3 5l-1 1zM1718 1018q-8 13 -8 29v2l-216 376q-5 1 -13 5l-437 -463l310 -327zM522 1142v223l-163 -282zM522 196h-163l163 -283v283zM1607 196l-48 -227l130 227h-82
1817zM1729 266l207 361q-2 10 -2 14q0 1 3 16l-171 296l-129 -612l77 -82q5 3 15 7z" />
1818 <glyph glyph-name="f210" unicode="&#xf210;"
1819d="M0 856q0 131 91.5 226.5t222.5 95.5h742l352 358v-1470q0 -132 -91.5 -227t-222.5 -95h-780q-131 0 -222.5 95t-91.5 227v790zM1232 102l-176 180v425q0 46 -32 79t-78 33h-484q-46 0 -78 -33t-32 -79v-492q0 -46 32.5 -79.5t77.5 -33.5h770z" />
1820 <glyph glyph-name="_496" unicode="&#xf211;"
1821d="M934 1386q-317 -121 -556 -362.5t-358 -560.5q-20 89 -20 176q0 208 102.5 384.5t278.5 279t384 102.5q82 0 169 -19zM1203 1267q93 -65 164 -155q-389 -113 -674.5 -400.5t-396.5 -676.5q-93 72 -155 162q112 386 395 671t667 399zM470 -67q115 356 379.5 622t619.5 384
1822q40 -92 54 -195q-292 -120 -516 -345t-343 -518q-103 14 -194 52zM1536 -125q-193 50 -367 115q-135 -84 -290 -107q109 205 274 370.5t369 275.5q-21 -152 -101 -284q65 -175 115 -370z" />
1823 <glyph glyph-name="f212" unicode="&#xf212;" horiz-adv-x="2048"
1824d="M1893 1144l155 -1272q-131 0 -257 57q-200 91 -393 91q-226 0 -374 -148q-148 148 -374 148q-193 0 -393 -91q-128 -57 -252 -57h-5l155 1272q224 127 482 127q233 0 387 -106q154 106 387 106q258 0 482 -127zM1398 157q129 0 232 -28.5t260 -93.5l-124 1021
1825q-171 78 -368 78q-224 0 -374 -141q-150 141 -374 141q-197 0 -368 -78l-124 -1021q105 43 165.5 65t148.5 39.5t178 17.5q202 0 374 -108q172 108 374 108zM1438 191l-55 907q-211 -4 -359 -155q-152 155 -374 155q-176 0 -336 -66l-114 -941q124 51 228.5 76t221.5 25
1826q209 0 374 -102q172 107 374 102z" />
1827 <glyph glyph-name="_498" unicode="&#xf213;" horiz-adv-x="2048"
1828d="M1500 165v733q0 21 -15 36t-35 15h-93q-20 0 -35 -15t-15 -36v-733q0 -20 15 -35t35 -15h93q20 0 35 15t15 35zM1216 165v531q0 20 -15 35t-35 15h-101q-20 0 -35 -15t-15 -35v-531q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM924 165v429q0 20 -15 35t-35 15h-101
1829q-20 0 -35 -15t-15 -35v-429q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM632 165v362q0 20 -15 35t-35 15h-101q-20 0 -35 -15t-15 -35v-362q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM2048 311q0 -166 -118 -284t-284 -118h-1244q-166 0 -284 118t-118 284
1830q0 116 63 214.5t168 148.5q-10 34 -10 73q0 113 80.5 193.5t193.5 80.5q102 0 180 -67q45 183 194 300t338 117q149 0 275 -73.5t199.5 -199.5t73.5 -275q0 -66 -14 -122q135 -33 221 -142.5t86 -247.5z" />
1831 <glyph glyph-name="_499" unicode="&#xf214;"
1832d="M0 1536h1536v-1392l-776 -338l-760 338v1392zM1436 209v926h-1336v-926l661 -294zM1436 1235v201h-1336v-201h1336zM181 937v-115h-37v115h37zM181 789v-115h-37v115h37zM181 641v-115h-37v115h37zM181 493v-115h-37v115h37zM181 345v-115h-37v115h37zM207 202l15 34
1833l105 -47l-15 -33zM343 142l15 34l105 -46l-15 -34zM478 82l15 34l105 -46l-15 -34zM614 23l15 33l104 -46l-15 -34zM797 10l105 46l15 -33l-105 -47zM932 70l105 46l15 -34l-105 -46zM1068 130l105 46l15 -34l-105 -46zM1203 189l105 47l15 -34l-105 -46zM259 1389v-36h-114
1834v36h114zM421 1389v-36h-115v36h115zM583 1389v-36h-115v36h115zM744 1389v-36h-114v36h114zM906 1389v-36h-114v36h114zM1068 1389v-36h-115v36h115zM1230 1389v-36h-115v36h115zM1391 1389v-36h-114v36h114zM181 1049v-79h-37v115h115v-36h-78zM421 1085v-36h-115v36h115z
1835M583 1085v-36h-115v36h115zM744 1085v-36h-114v36h114zM906 1085v-36h-114v36h114zM1068 1085v-36h-115v36h115zM1230 1085v-36h-115v36h115zM1355 970v79h-78v36h115v-115h-37zM1355 822v115h37v-115h-37zM1355 674v115h37v-115h-37zM1355 526v115h37v-115h-37zM1355 378
1836v115h37v-115h-37zM1355 230v115h37v-115h-37zM760 265q-129 0 -221 91.5t-92 221.5q0 129 92 221t221 92q130 0 221.5 -92t91.5 -221q0 -130 -91.5 -221.5t-221.5 -91.5zM595 646q0 -36 19.5 -56.5t49.5 -25t64 -7t64 -2t49.5 -9t19.5 -30.5q0 -49 -112 -49q-97 0 -123 51
1837h-3l-31 -63q67 -42 162 -42q29 0 56.5 5t55.5 16t45.5 33t17.5 53q0 46 -27.5 69.5t-67.5 27t-79.5 3t-67 5t-27.5 25.5q0 21 20.5 33t40.5 15t41 3q34 0 70.5 -11t51.5 -34h3l30 58q-3 1 -21 8.5t-22.5 9t-19.5 7t-22 7t-20 4.5t-24 4t-23 1q-29 0 -56.5 -5t-54 -16.5
1838t-43 -34t-16.5 -53.5z" />
1839 <glyph glyph-name="_500" unicode="&#xf215;" horiz-adv-x="2048"
1840d="M863 504q0 112 -79.5 191.5t-191.5 79.5t-191 -79.5t-79 -191.5t79 -191t191 -79t191.5 79t79.5 191zM1726 505q0 112 -79 191t-191 79t-191.5 -79t-79.5 -191q0 -113 79.5 -192t191.5 -79t191 79.5t79 191.5zM2048 1314v-1348q0 -44 -31.5 -75.5t-76.5 -31.5h-1832
1841q-45 0 -76.5 31.5t-31.5 75.5v1348q0 44 31.5 75.5t76.5 31.5h431q44 0 76 -31.5t32 -75.5v-161h754v161q0 44 32 75.5t76 31.5h431q45 0 76.5 -31.5t31.5 -75.5z" />
1842 <glyph glyph-name="_501" unicode="&#xf216;" horiz-adv-x="2048"
1843d="M1430 953zM1690 749q148 0 253 -98.5t105 -244.5q0 -157 -109 -261.5t-267 -104.5q-85 0 -162 27.5t-138 73.5t-118 106t-109 126t-103.5 132.5t-108.5 126.5t-117 106t-136 73.5t-159 27.5q-154 0 -251.5 -91.5t-97.5 -244.5q0 -157 104 -250t263 -93q100 0 208 37.5
1844t193 98.5q5 4 21 18.5t30 24t22 9.5q14 0 24.5 -10.5t10.5 -24.5q0 -24 -60 -77q-101 -88 -234.5 -142t-260.5 -54q-133 0 -245.5 58t-180 165t-67.5 241q0 205 141.5 341t347.5 136q120 0 226.5 -43.5t185.5 -113t151.5 -153t139 -167.5t133.5 -153.5t149.5 -113
1845t172.5 -43.5q102 0 168.5 61.5t66.5 162.5q0 95 -64.5 159t-159.5 64q-30 0 -81.5 -18.5t-68.5 -18.5q-20 0 -35.5 15t-15.5 35q0 18 8.5 57t8.5 59q0 159 -107.5 263t-266.5 104q-58 0 -111.5 -18.5t-84 -40.5t-55.5 -40.5t-33 -18.5q-15 0 -25.5 10.5t-10.5 25.5
1846q0 19 25 46q59 67 147 103.5t182 36.5q191 0 318 -125.5t127 -315.5q0 -37 -4 -66q57 15 115 15z" />
1847 <glyph glyph-name="_502" unicode="&#xf217;" horiz-adv-x="1664"
1848d="M1216 832q0 26 -19 45t-45 19h-128v128q0 26 -19 45t-45 19t-45 -19t-19 -45v-128h-128q-26 0 -45 -19t-19 -45t19 -45t45 -19h128v-128q0 -26 19 -45t45 -19t45 19t19 45v128h128q26 0 45 19t19 45zM640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5
1849t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920
1850q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
1851 <glyph glyph-name="_503" unicode="&#xf218;" horiz-adv-x="1664"
1852d="M1280 832q0 26 -19 45t-45 19t-45 -19l-147 -146v293q0 26 -19 45t-45 19t-45 -19t-19 -45v-293l-147 146q-19 19 -45 19t-45 -19t-19 -45t19 -45l256 -256q19 -19 45 -19t45 19l256 256q19 19 19 45zM640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5
1853t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920
1854q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
1855 <glyph glyph-name="_504" unicode="&#xf219;" horiz-adv-x="2048"
1856d="M212 768l623 -665l-300 665h-323zM1024 -4l349 772h-698zM538 896l204 384h-262l-288 -384h346zM1213 103l623 665h-323zM683 896h682l-204 384h-274zM1510 896h346l-288 384h-262zM1651 1382l384 -512q14 -18 13 -41.5t-17 -40.5l-960 -1024q-18 -20 -47 -20t-47 20
1857l-960 1024q-16 17 -17 40.5t13 41.5l384 512q18 26 51 26h1152q33 0 51 -26z" />
1858 <glyph glyph-name="_505" unicode="&#xf21a;" horiz-adv-x="2048"
1859d="M1811 -19q19 19 45 19t45 -19l128 -128l-90 -90l-83 83l-83 -83q-18 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83
1860q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-128 128l90 90l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83
1861q19 19 45 19t45 -19l83 -83zM237 19q-19 -19 -45 -19t-45 19l-128 128l90 90l83 -82l83 82q19 19 45 19t45 -19l83 -82l64 64v293l-210 314q-17 26 -7 56.5t40 40.5l177 58v299h128v128h256v128h256v-128h256v-128h128v-299l177 -58q30 -10 40 -40.5t-7 -56.5l-210 -314
1862v-293l19 18q19 19 45 19t45 -19l83 -82l83 82q19 19 45 19t45 -19l128 -128l-90 -90l-83 83l-83 -83q-18 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83
1863q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83zM640 1152v-128l384 128l384 -128v128h-128v128h-512v-128h-128z" />
1864 <glyph glyph-name="_506" unicode="&#xf21b;"
1865d="M576 0l96 448l-96 128l-128 64zM832 0l128 640l-128 -64l-96 -128zM992 1010q-2 4 -4 6q-10 8 -96 8q-70 0 -167 -19q-7 -2 -21 -2t-21 2q-97 19 -167 19q-86 0 -96 -8q-2 -2 -4 -6q2 -18 4 -27q2 -3 7.5 -6.5t7.5 -10.5q2 -4 7.5 -20.5t7 -20.5t7.5 -17t8.5 -17t9 -14
1866t12 -13.5t14 -9.5t17.5 -8t20.5 -4t24.5 -2q36 0 59 12.5t32.5 30t14.5 34.5t11.5 29.5t17.5 12.5h12q11 0 17.5 -12.5t11.5 -29.5t14.5 -34.5t32.5 -30t59 -12.5q13 0 24.5 2t20.5 4t17.5 8t14 9.5t12 13.5t9 14t8.5 17t7.5 17t7 20.5t7.5 20.5q2 7 7.5 10.5t7.5 6.5
1867q2 9 4 27zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 61 4.5 118t19 125.5t37.5 123.5t63.5 103.5t93.5 74.5l-90 220h214q-22 64 -22 128q0 12 2 32q-194 40 -194 96q0 57 210 99q17 62 51.5 134t70.5 114q32 37 76 37q30 0 84 -31t84 -31t84 31
1868t84 31q44 0 76 -37q36 -42 70.5 -114t51.5 -134q210 -42 210 -99q0 -56 -194 -96q7 -81 -20 -160h214l-82 -225q63 -33 107.5 -96.5t65.5 -143.5t29 -151.5t8 -148.5z" />
1869 <glyph glyph-name="_507" unicode="&#xf21c;" horiz-adv-x="2304"
1870d="M2301 500q12 -103 -22 -198.5t-99 -163.5t-158.5 -106t-196.5 -31q-161 11 -279.5 125t-134.5 274q-12 111 27.5 210.5t118.5 170.5l-71 107q-96 -80 -151 -194t-55 -244q0 -27 -18.5 -46.5t-45.5 -19.5h-256h-69q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5
1871t-131.5 316.5t131.5 316.5t316.5 131.5q76 0 152 -27l24 45q-123 110 -304 110h-64q-26 0 -45 19t-19 45t19 45t45 19h128q78 0 145 -13.5t116.5 -38.5t71.5 -39.5t51 -36.5h512h115l-85 128h-222q-30 0 -49 22.5t-14 52.5q4 23 23 38t43 15h253q33 0 53 -28l70 -105
1872l114 114q19 19 46 19h101q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-179l115 -172q131 63 275 36q143 -26 244 -134.5t118 -253.5zM448 128q115 0 203 72.5t111 183.5h-314q-35 0 -55 31q-18 32 -1 63l147 277q-47 13 -91 13q-132 0 -226 -94t-94 -226t94 -226
1873t226 -94zM1856 128q132 0 226 94t94 226t-94 226t-226 94q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94z" />
1874 <glyph glyph-name="_508" unicode="&#xf21d;"
1875d="M1408 0q0 -63 -61.5 -113.5t-164 -81t-225 -46t-253.5 -15.5t-253.5 15.5t-225 46t-164 81t-61.5 113.5q0 49 33 88.5t91 66.5t118 44.5t131 29.5q26 5 48 -10.5t26 -41.5q5 -26 -10.5 -48t-41.5 -26q-58 -10 -106 -23.5t-76.5 -25.5t-48.5 -23.5t-27.5 -19.5t-8.5 -12
1876q3 -11 27 -26.5t73 -33t114 -32.5t160.5 -25t201.5 -10t201.5 10t160.5 25t114 33t73 33.5t27 27.5q-1 4 -8.5 11t-27.5 19t-48.5 23.5t-76.5 25t-106 23.5q-26 4 -41.5 26t-10.5 48q4 26 26 41.5t48 10.5q71 -12 131 -29.5t118 -44.5t91 -66.5t33 -88.5zM1024 896v-384
1877q0 -26 -19 -45t-45 -19h-64v-384q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v384h-64q-26 0 -45 19t-19 45v384q0 53 37.5 90.5t90.5 37.5h384q53 0 90.5 -37.5t37.5 -90.5zM928 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5
1878t158.5 -65.5t65.5 -158.5z" />
1879 <glyph glyph-name="_509" unicode="&#xf21e;" horiz-adv-x="1792"
1880d="M1280 512h305q-5 -6 -10 -10.5t-9 -7.5l-3 -4l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-5 2 -21 20h369q22 0 39.5 13.5t22.5 34.5l70 281l190 -667q6 -20 23 -33t39 -13q21 0 38 13t23 33l146 485l56 -112q18 -35 57 -35zM1792 940q0 -145 -103 -300h-369l-111 221
1881q-8 17 -25.5 27t-36.5 8q-45 -5 -56 -46l-129 -430l-196 686q-6 20 -23.5 33t-39.5 13t-39 -13.5t-22 -34.5l-116 -464h-423q-103 155 -103 300q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124
1882t127 -344z" />
1883 <glyph glyph-name="venus" unicode="&#xf221;" horiz-adv-x="1280"
1884d="M1152 960q0 -221 -147.5 -384.5t-364.5 -187.5v-260h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v260q-150 16 -271.5 103t-186 224t-52.5 292
1885q11 134 80.5 249t182 188t245.5 88q170 19 319 -54t236 -212t87 -306zM128 960q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5z" />
1886 <glyph glyph-name="_511" unicode="&#xf222;"
1887d="M1472 1408q26 0 45 -19t19 -45v-416q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v262l-382 -383q126 -156 126 -359q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5
1888q203 0 359 -126l382 382h-261q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h416zM576 0q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
1889 <glyph glyph-name="_512" unicode="&#xf223;" horiz-adv-x="1280"
1890d="M830 1220q145 -72 233.5 -210.5t88.5 -305.5q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-217 24 -364.5 187.5
1891t-147.5 384.5q0 167 88.5 305.5t233.5 210.5q-165 96 -228 273q-6 16 3.5 29.5t26.5 13.5h69q21 0 29 -20q44 -106 140 -171t214 -65t214 65t140 171q8 20 37 20h61q17 0 26.5 -13.5t3.5 -29.5q-63 -177 -228 -273zM576 256q185 0 316.5 131.5t131.5 316.5t-131.5 316.5
1892t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
1893 <glyph glyph-name="_513" unicode="&#xf224;"
1894d="M1024 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q126 -158 126 -359q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64
1895q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-149 16 -270.5 103t-186.5 223.5t-53 291.5q16 204 160 353.5t347 172.5q118 14 228 -19t198 -103l255 254h-134q-14 0 -23 9t-9 23v64zM576 256q185 0 316.5 131.5t131.5 316.5t-131.5 316.5
1896t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
1897 <glyph glyph-name="_514" unicode="&#xf225;" horiz-adv-x="1792"
1898d="M1280 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q126 -158 126 -359q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64
1899q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-217 24 -364.5 187.5t-147.5 384.5q0 201 126 359l-52 53l-101 -111q-9 -10 -22 -10.5t-23 7.5l-48 44q-10 8 -10.5 21.5t8.5 23.5l105 115l-111 112v-134q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9
1900t-9 23v288q0 26 19 45t45 19h288q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-133l106 -107l86 94q9 10 22 10.5t23 -7.5l48 -44q10 -8 10.5 -21.5t-8.5 -23.5l-90 -99l57 -56q158 126 359 126t359 -126l255 254h-134q-14 0 -23 9t-9 23v64zM832 256q185 0 316.5 131.5
1901t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
1902 <glyph glyph-name="_515" unicode="&#xf226;" horiz-adv-x="1792"
1903d="M1790 1007q12 -155 -52.5 -292t-186 -224t-271.5 -103v-260h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-512v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23
1904t23 9h224v260q-150 16 -271.5 103t-186 224t-52.5 292q17 206 164.5 356.5t352.5 169.5q206 21 377 -94q171 115 377 94q205 -19 352.5 -169.5t164.5 -356.5zM896 647q128 131 128 313t-128 313q-128 -131 -128 -313t128 -313zM576 512q115 0 218 57q-154 165 -154 391
1905q0 224 154 391q-103 57 -218 57q-185 0 -316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5zM1152 128v260q-137 15 -256 94q-119 -79 -256 -94v-260h512zM1216 512q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5q-115 0 -218 -57q154 -167 154 -391
1906q0 -226 -154 -391q103 -57 218 -57z" />
1907 <glyph glyph-name="_516" unicode="&#xf227;" horiz-adv-x="1920"
1908d="M1536 1120q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q76 -95 107.5 -214t9.5 -247q-31 -182 -166 -312t-318 -156q-210 -29 -384.5 80t-241.5 300q-117 6 -221 57.5t-177.5 133t-113.5 192.5t-32 230
1909q9 135 78 252t182 191.5t248 89.5q118 14 227.5 -19t198.5 -103l255 254h-134q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q59 -74 93 -169q182 -9 328 -124l255 254h-134q-14 0 -23 9
1910t-9 23v64zM1024 704q0 20 -4 58q-162 -25 -271 -150t-109 -292q0 -20 4 -58q162 25 271 150t109 292zM128 704q0 -168 111 -294t276 -149q-3 29 -3 59q0 210 135 369.5t338 196.5q-53 120 -163.5 193t-245.5 73q-185 0 -316.5 -131.5t-131.5 -316.5zM1088 -128
1911q185 0 316.5 131.5t131.5 316.5q0 168 -111 294t-276 149q3 -28 3 -59q0 -210 -135 -369.5t-338 -196.5q53 -120 163.5 -193t245.5 -73z" />
1912 <glyph glyph-name="_517" unicode="&#xf228;" horiz-adv-x="2048"
1913d="M1664 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q76 -95 107.5 -214t9.5 -247q-32 -180 -164.5 -310t-313.5 -157q-223 -34 -409 90q-117 -78 -256 -93v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23
1914t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-155 17 -279.5 109.5t-187 237.5t-39.5 307q25 187 159.5 322.5t320.5 164.5q224 34 410 -90q146 97 320 97q201 0 359 -126l255 254h-134q-14 0 -23 9
1915t-9 23v64zM896 391q128 131 128 313t-128 313q-128 -131 -128 -313t128 -313zM128 704q0 -185 131.5 -316.5t316.5 -131.5q117 0 218 57q-154 167 -154 391t154 391q-101 57 -218 57q-185 0 -316.5 -131.5t-131.5 -316.5zM1216 256q185 0 316.5 131.5t131.5 316.5
1916t-131.5 316.5t-316.5 131.5q-117 0 -218 -57q154 -167 154 -391t-154 -391q101 -57 218 -57z" />
1917 <glyph glyph-name="_518" unicode="&#xf229;"
1918d="M1472 1408q26 0 45 -19t19 -45v-416q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v262l-213 -214l140 -140q9 -10 9 -23t-9 -22l-46 -46q-9 -9 -22 -9t-23 9l-140 141l-78 -79q126 -156 126 -359q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5
1919t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5q203 0 359 -126l78 78l-172 172q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l172 -172l213 213h-261q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h416zM576 0q185 0 316.5 131.5t131.5 316.5t-131.5 316.5
1920t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
1921 <glyph glyph-name="_519" unicode="&#xf22a;" horiz-adv-x="1280"
1922d="M640 892q217 -24 364.5 -187.5t147.5 -384.5q0 -167 -87 -306t-236 -212t-319 -54q-133 15 -245.5 88t-182 188t-80.5 249q-12 155 52.5 292t186 224t271.5 103v132h-160q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h160v165l-92 -92q-10 -9 -23 -9t-22 9l-46 46q-9 9 -9 22
1923t9 23l202 201q19 19 45 19t45 -19l202 -201q9 -10 9 -23t-9 -22l-46 -46q-9 -9 -22 -9t-23 9l-92 92v-165h160q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-160v-132zM576 -128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5
1924t131.5 -316.5t316.5 -131.5z" />
1925 <glyph glyph-name="_520" unicode="&#xf22b;" horiz-adv-x="2048"
1926d="M1901 621q19 -19 19 -45t-19 -45l-294 -294q-9 -10 -22.5 -10t-22.5 10l-45 45q-10 9 -10 22.5t10 22.5l185 185h-294v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-132q-24 -217 -187.5 -364.5t-384.5 -147.5q-167 0 -306 87t-212 236t-54 319q15 133 88 245.5
1927t188 182t249 80.5q155 12 292 -52.5t224 -186t103 -271.5h132v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224h294l-185 185q-10 9 -10 22.5t10 22.5l45 45q9 10 22.5 10t22.5 -10zM576 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5
1928t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
1929 <glyph glyph-name="_521" unicode="&#xf22c;" horiz-adv-x="1280"
1930d="M1152 960q0 -221 -147.5 -384.5t-364.5 -187.5v-612q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v612q-217 24 -364.5 187.5t-147.5 384.5q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5zM576 512q185 0 316.5 131.5
1931t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
1932 <glyph glyph-name="_522" unicode="&#xf22d;" horiz-adv-x="1280"
1933d="M1024 576q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1152 576q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123
1934t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5z" />
1935 <glyph glyph-name="_523" unicode="&#xf22e;" horiz-adv-x="1792"
1936 />
1937 <glyph glyph-name="_524" unicode="&#xf22f;" horiz-adv-x="1792"
1938 />
1939 <glyph glyph-name="_525" unicode="&#xf230;"
1940d="M1451 1408q35 0 60 -25t25 -60v-1366q0 -35 -25 -60t-60 -25h-391v595h199l30 232h-229v148q0 56 23.5 84t91.5 28l122 1v207q-63 9 -178 9q-136 0 -217.5 -80t-81.5 -226v-171h-200v-232h200v-595h-735q-35 0 -60 25t-25 60v1366q0 35 25 60t60 25h1366z" />
1941 <glyph glyph-name="_526" unicode="&#xf231;" horiz-adv-x="1280"
1942d="M0 939q0 108 37.5 203.5t103.5 166.5t152 123t185 78t202 26q158 0 294 -66.5t221 -193.5t85 -287q0 -96 -19 -188t-60 -177t-100 -149.5t-145 -103t-189 -38.5q-68 0 -135 32t-96 88q-10 -39 -28 -112.5t-23.5 -95t-20.5 -71t-26 -71t-32 -62.5t-46 -77.5t-62 -86.5
1943l-14 -5l-9 10q-15 157 -15 188q0 92 21.5 206.5t66.5 287.5t52 203q-32 65 -32 169q0 83 52 156t132 73q61 0 95 -40.5t34 -102.5q0 -66 -44 -191t-44 -187q0 -63 45 -104.5t109 -41.5q55 0 102 25t78.5 68t56 95t38 110.5t20 111t6.5 99.5q0 173 -109.5 269.5t-285.5 96.5
1944q-200 0 -334 -129.5t-134 -328.5q0 -44 12.5 -85t27 -65t27 -45.5t12.5 -30.5q0 -28 -15 -73t-37 -45q-2 0 -17 3q-51 15 -90.5 56t-61 94.5t-32.5 108t-11 106.5z" />
1945 <glyph glyph-name="_527" unicode="&#xf232;"
1946d="M985 562q13 0 97.5 -44t89.5 -53q2 -5 2 -15q0 -33 -17 -76q-16 -39 -71 -65.5t-102 -26.5q-57 0 -190 62q-98 45 -170 118t-148 185q-72 107 -71 194v8q3 91 74 158q24 22 52 22q6 0 18 -1.5t19 -1.5q19 0 26.5 -6.5t15.5 -27.5q8 -20 33 -88t25 -75q0 -21 -34.5 -57.5
1947t-34.5 -46.5q0 -7 5 -15q34 -73 102 -137q56 -53 151 -101q12 -7 22 -7q15 0 54 48.5t52 48.5zM782 32q127 0 243.5 50t200.5 134t134 200.5t50 243.5t-50 243.5t-134 200.5t-200.5 134t-243.5 50t-243.5 -50t-200.5 -134t-134 -200.5t-50 -243.5q0 -203 120 -368l-79 -233
1948l242 77q158 -104 345 -104zM782 1414q153 0 292.5 -60t240.5 -161t161 -240.5t60 -292.5t-60 -292.5t-161 -240.5t-240.5 -161t-292.5 -60q-195 0 -365 94l-417 -134l136 405q-108 178 -108 389q0 153 60 292.5t161 240.5t240.5 161t292.5 60z" />
1949 <glyph glyph-name="_528" unicode="&#xf233;" horiz-adv-x="1792"
1950d="M128 128h1024v128h-1024v-128zM128 640h1024v128h-1024v-128zM1696 192q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM128 1152h1024v128h-1024v-128zM1696 704q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1696 1216
1951q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1792 384v-384h-1792v384h1792zM1792 896v-384h-1792v384h1792zM1792 1408v-384h-1792v384h1792z" />
1952 <glyph glyph-name="_529" unicode="&#xf234;" horiz-adv-x="2048"
1953d="M704 640q-159 0 -271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5zM1664 512h352q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-352q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5
1954t-9.5 22.5v352h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v352q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-352zM928 288q0 -52 38 -90t90 -38h256v-238q-68 -50 -171 -50h-874q-121 0 -194 69t-73 190q0 53 3.5 103.5t14 109t26.5 108.5
1955t43 97.5t62 81t85.5 53.5t111.5 20q19 0 39 -17q79 -61 154.5 -91.5t164.5 -30.5t164.5 30.5t154.5 91.5q20 17 39 17q132 0 217 -96h-223q-52 0 -90 -38t-38 -90v-192z" />
1956 <glyph glyph-name="_530" unicode="&#xf235;" horiz-adv-x="2048"
1957d="M704 640q-159 0 -271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5zM1781 320l249 -249q9 -9 9 -23q0 -13 -9 -22l-136 -136q-9 -9 -22 -9q-14 0 -23 9l-249 249l-249 -249q-9 -9 -23 -9q-13 0 -22 9l-136 136
1958q-9 9 -9 22q0 14 9 23l249 249l-249 249q-9 9 -9 23q0 13 9 22l136 136q9 9 22 9q14 0 23 -9l249 -249l249 249q9 9 23 9q13 0 22 -9l136 -136q9 -9 9 -22q0 -14 -9 -23zM1283 320l-181 -181q-37 -37 -37 -91q0 -53 37 -90l83 -83q-21 -3 -44 -3h-874q-121 0 -194 69
1959t-73 190q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q19 0 39 -17q154 -122 319 -122t319 122q20 17 39 17q28 0 57 -6q-28 -27 -41 -50t-13 -56q0 -54 37 -91z" />
1960 <glyph glyph-name="_531" unicode="&#xf236;" horiz-adv-x="2048"
1961d="M256 512h1728q26 0 45 -19t19 -45v-448h-256v256h-1536v-256h-256v1216q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-704zM832 832q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM2048 576v64q0 159 -112.5 271.5t-271.5 112.5h-704
1962q-26 0 -45 -19t-19 -45v-384h1152z" />
1963 <glyph glyph-name="_532" unicode="&#xf237;"
1964d="M1536 1536l-192 -448h192v-192h-274l-55 -128h329v-192h-411l-357 -832l-357 832h-411v192h329l-55 128h-274v192h192l-192 448h256l323 -768h378l323 768h256zM768 320l108 256h-216z" />
1965 <glyph glyph-name="_533" unicode="&#xf238;"
1966d="M1088 1536q185 0 316.5 -93.5t131.5 -226.5v-896q0 -130 -125.5 -222t-305.5 -97l213 -202q16 -15 8 -35t-30 -20h-1056q-22 0 -30 20t8 35l213 202q-180 5 -305.5 97t-125.5 222v896q0 133 131.5 226.5t316.5 93.5h640zM768 192q80 0 136 56t56 136t-56 136t-136 56
1967t-136 -56t-56 -136t56 -136t136 -56zM1344 768v512h-1152v-512h1152z" />
1968 <glyph glyph-name="_534" unicode="&#xf239;"
1969d="M1088 1536q185 0 316.5 -93.5t131.5 -226.5v-896q0 -130 -125.5 -222t-305.5 -97l213 -202q16 -15 8 -35t-30 -20h-1056q-22 0 -30 20t8 35l213 202q-180 5 -305.5 97t-125.5 222v896q0 133 131.5 226.5t316.5 93.5h640zM288 224q66 0 113 47t47 113t-47 113t-113 47
1970t-113 -47t-47 -113t47 -113t113 -47zM704 768v512h-544v-512h544zM1248 224q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM1408 768v512h-576v-512h576z" />
1971 <glyph glyph-name="_535" unicode="&#xf23a;" horiz-adv-x="1792"
1972d="M597 1115v-1173q0 -25 -12.5 -42.5t-36.5 -17.5q-17 0 -33 8l-465 233q-21 10 -35.5 33.5t-14.5 46.5v1140q0 20 10 34t29 14q14 0 44 -15l511 -256q3 -3 3 -5zM661 1014l534 -866l-534 266v600zM1792 996v-1054q0 -25 -14 -40.5t-38 -15.5t-47 13l-441 220zM1789 1116
1973q0 -3 -256.5 -419.5t-300.5 -487.5l-390 634l324 527q17 28 52 28q14 0 26 -6l541 -270q4 -2 4 -6z" />
1974 <glyph glyph-name="_536" unicode="&#xf23b;"
1975d="M809 532l266 499h-112l-157 -312q-24 -48 -44 -92l-42 92l-155 312h-120l263 -493v-324h101v318zM1536 1408v-1536h-1536v1536h1536z" />
1976 <glyph glyph-name="_537" unicode="&#xf23c;" horiz-adv-x="2296"
1977d="M478 -139q-8 -16 -27 -34.5t-37 -25.5q-25 -9 -51.5 3.5t-28.5 31.5q-1 22 40 55t68 38q23 4 34 -21.5t2 -46.5zM1819 -139q7 -16 26 -34.5t38 -25.5q25 -9 51.5 3.5t27.5 31.5q2 22 -39.5 55t-68.5 38q-22 4 -33 -21.5t-2 -46.5zM1867 -30q13 -27 56.5 -59.5t77.5 -41.5
1978q45 -13 82 4.5t37 50.5q0 46 -67.5 100.5t-115.5 59.5q-40 5 -63.5 -37.5t-6.5 -76.5zM428 -30q-13 -27 -56 -59.5t-77 -41.5q-45 -13 -82 4.5t-37 50.5q0 46 67.5 100.5t115.5 59.5q40 5 63 -37.5t6 -76.5zM1158 1094h1q-41 0 -76 -15q27 -8 44 -30.5t17 -49.5
1979q0 -35 -27 -60t-65 -25q-52 0 -80 43q-5 -23 -5 -42q0 -74 56 -126.5t135 -52.5q80 0 136 52.5t56 126.5t-56 126.5t-136 52.5zM1462 1312q-99 109 -220.5 131.5t-245.5 -44.5q27 60 82.5 96.5t118 39.5t121.5 -17t99.5 -74.5t44.5 -131.5zM2212 73q8 -11 -11 -42
1980q7 -23 7 -40q1 -56 -44.5 -112.5t-109.5 -91.5t-118 -37q-48 -2 -92 21.5t-66 65.5q-687 -25 -1259 0q-23 -41 -66.5 -65t-92.5 -22q-86 3 -179.5 80.5t-92.5 160.5q2 22 7 40q-19 31 -11 42q6 10 31 1q14 22 41 51q-7 29 2 38q11 10 39 -4q29 20 59 34q0 29 13 37
1981q23 12 51 -16q35 5 61 -2q18 -4 38 -19v73q-11 0 -18 2q-53 10 -97 44.5t-55 87.5q-9 38 0 81q15 62 93 95q2 17 19 35.5t36 23.5t33 -7.5t19 -30.5h13q46 -5 60 -23q3 -3 5 -7q10 1 30.5 3.5t30.5 3.5q-15 11 -30 17q-23 40 -91 43q0 6 1 10q-62 2 -118.5 18.5t-84.5 47.5
1982q-32 36 -42.5 92t-2.5 112q16 126 90 179q23 16 52 4.5t32 -40.5q0 -1 1.5 -14t2.5 -21t3 -20t5.5 -19t8.5 -10q27 -14 76 -12q48 46 98 74q-40 4 -162 -14l47 46q61 58 163 111q145 73 282 86q-20 8 -41 15.5t-47 14t-42.5 10.5t-47.5 11t-43 10q595 126 904 -139
1983q98 -84 158 -222q85 -10 121 9h1q5 3 8.5 10t5.5 19t3 19.5t3 21.5l1 14q3 28 32 40t52 -5q73 -52 91 -178q7 -57 -3.5 -113t-42.5 -91q-28 -32 -83.5 -48.5t-115.5 -18.5v-10q-71 -2 -95 -43q-14 -5 -31 -17q11 -1 32 -3.5t30 -3.5q1 5 5 8q16 18 60 23h13q5 18 19 30t33 8
1984t36 -23t19 -36q79 -32 93 -95q9 -40 1 -81q-12 -53 -56 -88t-97 -44q-10 -2 -17 -2q0 -49 -1 -73q20 15 38 19q26 7 61 2q28 28 51 16q14 -9 14 -37q33 -16 59 -34q27 13 38 4q10 -10 2 -38q28 -30 41 -51q23 8 31 -1zM1937 1025q0 -29 -9 -54q82 -32 112 -132
1985q4 37 -9.5 98.5t-41.5 90.5q-20 19 -36 17t-16 -20zM1859 925q35 -42 47.5 -108.5t-0.5 -124.5q67 13 97 45q13 14 18 28q-3 64 -31 114.5t-79 66.5q-15 -15 -52 -21zM1822 921q-30 0 -44 1q42 -115 53 -239q21 0 43 3q16 68 1 135t-53 100zM258 839q30 100 112 132
1986q-9 25 -9 54q0 18 -16.5 20t-35.5 -17q-28 -29 -41.5 -90.5t-9.5 -98.5zM294 737q29 -31 97 -45q-13 58 -0.5 124.5t47.5 108.5v0q-37 6 -52 21q-51 -16 -78.5 -66t-31.5 -115q9 -17 18 -28zM471 683q14 124 73 235q-19 -4 -55 -18l-45 -19v1q-46 -89 -20 -196q25 -3 47 -3z
1987M1434 644q8 -38 16.5 -108.5t11.5 -89.5q3 -18 9.5 -21.5t23.5 4.5q40 20 62 85.5t23 125.5q-24 2 -146 4zM1152 1285q-116 0 -199 -82.5t-83 -198.5q0 -117 83 -199.5t199 -82.5t199 82.5t83 199.5q0 116 -83 198.5t-199 82.5zM1380 646q-105 2 -211 0v1q-1 -27 2.5 -86
1988t13.5 -66q29 -14 93.5 -14.5t95.5 10.5q9 3 11 39t-0.5 69.5t-4.5 46.5zM1112 447q8 4 9.5 48t-0.5 88t-4 63v1q-212 -3 -214 -3q-4 -20 -7 -62t0 -83t14 -46q34 -15 101 -16t101 10zM718 636q-16 -59 4.5 -118.5t77.5 -84.5q15 -8 24 -5t12 21q3 16 8 90t10 103
1989q-69 -2 -136 -6zM591 510q3 -23 -34 -36q132 -141 271.5 -240t305.5 -154q172 49 310.5 146t293.5 250q-33 13 -30 34q0 2 0.5 3.5t1.5 3t1 2.5v1v-1q-17 2 -50 5.5t-48 4.5q-26 -90 -82 -132q-51 -38 -82 1q-5 6 -9 14q-7 13 -17 62q-2 -5 -5 -9t-7.5 -7t-8 -5.5t-9.5 -4
1990l-10 -2.5t-12 -2l-12 -1.5t-13.5 -1t-13.5 -0.5q-106 -9 -163 11q-4 -17 -10 -26.5t-21 -15t-23 -7t-36 -3.5q-6 -1 -9 -1q-179 -17 -203 40q-2 -63 -56 -54q-47 8 -91 54q-12 13 -20 26q-17 29 -26 65q-58 -6 -87 -10q1 -2 4 -10zM507 -118q3 14 3 30q-17 71 -51 130
1991t-73 70q-41 12 -101.5 -14.5t-104.5 -80t-39 -107.5q35 -53 100 -93t119 -42q51 -2 94 28t53 79zM510 53q23 -63 27 -119q195 113 392 174q-98 52 -180.5 120t-179.5 165q-6 -4 -29 -13q0 -1 -1 -4t-1 -5q31 -18 22 -37q-12 -23 -56 -34q-10 -13 -29 -24h-1q-2 -83 1 -150
1992q19 -34 35 -73zM579 -113q532 -21 1145 0q-254 147 -428 196q-76 -35 -156 -57q-8 -3 -16 0q-65 21 -129 49q-208 -60 -416 -188h-1v-1q1 0 1 1zM1763 -67q4 54 28 120q14 38 33 71l-1 -1q3 77 3 153q-15 8 -30 25q-42 9 -56 33q-9 20 22 38q-2 4 -2 9q-16 4 -28 12
1993q-204 -190 -383 -284q198 -59 414 -176zM2155 -90q5 54 -39 107.5t-104 80t-102 14.5q-38 -11 -72.5 -70.5t-51.5 -129.5q0 -16 3 -30q10 -49 53 -79t94 -28q54 2 119 42t100 93z" />
1994 <glyph glyph-name="_538" unicode="&#xf23d;" horiz-adv-x="2304"
1995d="M1524 -25q0 -68 -48 -116t-116 -48t-116.5 48t-48.5 116t48.5 116.5t116.5 48.5t116 -48.5t48 -116.5zM775 -25q0 -68 -48.5 -116t-116.5 -48t-116 48t-48 116t48 116.5t116 48.5t116.5 -48.5t48.5 -116.5zM0 1469q57 -60 110.5 -104.5t121 -82t136 -63t166 -45.5
1996t200 -31.5t250 -18.5t304 -9.5t372.5 -2.5q139 0 244.5 -5t181 -16.5t124 -27.5t71 -39.5t24 -51.5t-19.5 -64t-56.5 -76.5t-89.5 -91t-116 -104.5t-139 -119q-185 -157 -286 -247q29 51 76.5 109t94 105.5t94.5 98.5t83 91.5t54 80.5t13 70t-45.5 55.5t-116.5 41t-204 23.5
1997t-304 5q-168 -2 -314 6t-256 23t-204.5 41t-159.5 51.5t-122.5 62.5t-91.5 66.5t-68 71.5t-50.5 69.5t-40 68t-36.5 59.5z" />
1998 <glyph glyph-name="_539" unicode="&#xf23e;" horiz-adv-x="1792"
1999d="M896 1472q-169 0 -323 -66t-265.5 -177.5t-177.5 -265.5t-66 -323t66 -323t177.5 -265.5t265.5 -177.5t323 -66t323 66t265.5 177.5t177.5 265.5t66 323t-66 323t-177.5 265.5t-265.5 177.5t-323 66zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348
2000t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM496 704q16 0 16 -16v-480q0 -16 -16 -16h-32q-16 0 -16 16v480q0 16 16 16h32zM896 640q53 0 90.5 -37.5t37.5 -90.5q0 -35 -17.5 -64t-46.5 -46v-114q0 -14 -9 -23
2001t-23 -9h-64q-14 0 -23 9t-9 23v114q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5zM896 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM544 928v-96
2002q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v96q0 93 65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5v-96q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v96q0 146 -103 249t-249 103t-249 -103t-103 -249zM1408 192v512q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-512
2003q0 -26 19 -45t45 -19h896q26 0 45 19t19 45z" />
2004 <glyph glyph-name="_540" unicode="&#xf240;" horiz-adv-x="2304"
2005d="M1920 1024v-768h-1664v768h1664zM2048 448h128v384h-128v288q0 14 -9 23t-23 9h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288zM2304 832v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113
2006v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160q53 0 90.5 -37.5t37.5 -90.5z" />
2007 <glyph glyph-name="_541" unicode="&#xf241;" horiz-adv-x="2304"
2008d="M256 256v768h1280v-768h-1280zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9
2009h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
2010 <glyph glyph-name="_542" unicode="&#xf242;" horiz-adv-x="2304"
2011d="M256 256v768h896v-768h-896zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9
2012h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
2013 <glyph glyph-name="_543" unicode="&#xf243;" horiz-adv-x="2304"
2014d="M256 256v768h512v-768h-512zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9
2015h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
2016 <glyph glyph-name="_544" unicode="&#xf244;" horiz-adv-x="2304"
2017d="M2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9h-1856q-14 0 -23 -9t-9 -23
2018v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
2019 <glyph glyph-name="_545" unicode="&#xf245;" horiz-adv-x="1280"
2020d="M1133 493q31 -30 14 -69q-17 -40 -59 -40h-382l201 -476q10 -25 0 -49t-34 -35l-177 -75q-25 -10 -49 0t-35 34l-191 452l-312 -312q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v1504q0 42 40 59q12 5 24 5q27 0 45 -19z" />
2021 <glyph glyph-name="_546" unicode="&#xf246;" horiz-adv-x="1024"
2022d="M832 1408q-320 0 -320 -224v-416h128v-128h-128v-544q0 -224 320 -224h64v-128h-64q-272 0 -384 146q-112 -146 -384 -146h-64v128h64q320 0 320 224v544h-128v128h128v416q0 224 -320 224h-64v128h64q272 0 384 -146q112 146 384 146h64v-128h-64z" />
2023 <glyph glyph-name="_547" unicode="&#xf247;" horiz-adv-x="2048"
2024d="M2048 1152h-128v-1024h128v-384h-384v128h-1280v-128h-384v384h128v1024h-128v384h384v-128h1280v128h384v-384zM1792 1408v-128h128v128h-128zM128 1408v-128h128v128h-128zM256 -128v128h-128v-128h128zM1664 0v128h128v1024h-128v128h-1280v-128h-128v-1024h128v-128
2025h1280zM1920 -128v128h-128v-128h128zM1280 896h384v-768h-896v256h-384v768h896v-256zM512 512h640v512h-640v-512zM1536 256v512h-256v-384h-384v-128h640z" />
2026 <glyph glyph-name="_548" unicode="&#xf248;" horiz-adv-x="2304"
2027d="M2304 768h-128v-640h128v-384h-384v128h-896v-128h-384v384h128v128h-384v-128h-384v384h128v640h-128v384h384v-128h896v128h384v-384h-128v-128h384v128h384v-384zM2048 1024v-128h128v128h-128zM1408 1408v-128h128v128h-128zM128 1408v-128h128v128h-128zM256 256
2028v128h-128v-128h128zM1536 384h-128v-128h128v128zM384 384h896v128h128v640h-128v128h-896v-128h-128v-640h128v-128zM896 -128v128h-128v-128h128zM2176 -128v128h-128v-128h128zM2048 128v640h-128v128h-384v-384h128v-384h-384v128h-384v-128h128v-128h896v128h128z" />
2029 <glyph glyph-name="_549" unicode="&#xf249;"
2030d="M1024 288v-416h-928q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1344q40 0 68 -28t28 -68v-928h-416q-40 0 -68 -28t-28 -68zM1152 256h381q-15 -82 -65 -132l-184 -184q-50 -50 -132 -65v381z" />
2031 <glyph glyph-name="_550" unicode="&#xf24a;"
2032d="M1400 256h-248v-248q29 10 41 22l185 185q12 12 22 41zM1120 384h288v896h-1280v-1280h896v288q0 40 28 68t68 28zM1536 1312v-1024q0 -40 -20 -88t-48 -76l-184 -184q-28 -28 -76 -48t-88 -20h-1024q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1344q40 0 68 -28t28 -68
2033z" />
2034 <glyph glyph-name="_551" unicode="&#xf24b;" horiz-adv-x="2304"
2035d="M1951 538q0 -26 -15.5 -44.5t-38.5 -23.5q-8 -2 -18 -2h-153v140h153q10 0 18 -2q23 -5 38.5 -23.5t15.5 -44.5zM1933 751q0 -25 -15 -42t-38 -21q-3 -1 -15 -1h-139v129h139q3 0 8.5 -0.5t6.5 -0.5q23 -4 38 -21.5t15 -42.5zM728 587v308h-228v-308q0 -58 -38 -94.5
2036t-105 -36.5q-108 0 -229 59v-112q53 -15 121 -23t109 -9l42 -1q328 0 328 217zM1442 403v113q-99 -52 -200 -59q-108 -8 -169 41t-61 142t61 142t169 41q101 -7 200 -58v112q-48 12 -100 19.5t-80 9.5l-28 2q-127 6 -218.5 -14t-140.5 -60t-71 -88t-22 -106t22 -106t71 -88
2037t140.5 -60t218.5 -14q101 4 208 31zM2176 518q0 54 -43 88.5t-109 39.5v3q57 8 89 41.5t32 79.5q0 55 -41 88t-107 36q-3 0 -12 0.5t-14 0.5h-455v-510h491q74 0 121.5 36.5t47.5 96.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90
2038t90 38h2048q52 0 90 -38t38 -90z" />
2039 <glyph glyph-name="_552" unicode="&#xf24c;" horiz-adv-x="2304"
2040d="M858 295v693q-106 -41 -172 -135.5t-66 -211.5t66 -211.5t172 -134.5zM1362 641q0 117 -66 211.5t-172 135.5v-694q106 41 172 135.5t66 211.5zM1577 641q0 -159 -78.5 -294t-213.5 -213.5t-294 -78.5q-119 0 -227.5 46.5t-187 125t-125 187t-46.5 227.5q0 159 78.5 294
2041t213.5 213.5t294 78.5t294 -78.5t213.5 -213.5t78.5 -294zM1960 634q0 139 -55.5 261.5t-147.5 205.5t-213.5 131t-252.5 48h-301q-176 0 -323.5 -81t-235 -230t-87.5 -335q0 -171 87 -317.5t236 -231.5t323 -85h301q129 0 251.5 50.5t214.5 135t147.5 202.5t55.5 246z
2042M2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
2043 <glyph glyph-name="_553" unicode="&#xf24d;" horiz-adv-x="1792"
2044d="M1664 -96v1088q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5v-1088q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5zM1792 992v-1088q0 -66 -47 -113t-113 -47h-1088q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1088q66 0 113 -47t47 -113
2045zM1408 1376v-160h-128v160q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5v-1088q0 -13 9.5 -22.5t22.5 -9.5h160v-128h-160q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1088q66 0 113 -47t47 -113z" />
2046 <glyph glyph-name="_554" unicode="&#xf24e;" horiz-adv-x="2304"
2047d="M1728 1088l-384 -704h768zM448 1088l-384 -704h768zM1269 1280q-14 -40 -45.5 -71.5t-71.5 -45.5v-1291h608q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1344q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h608v1291q-40 14 -71.5 45.5t-45.5 71.5h-491q-14 0 -23 9t-9 23v64
2048q0 14 9 23t23 9h491q21 57 70 92.5t111 35.5t111 -35.5t70 -92.5h491q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-491zM1088 1264q33 0 56.5 23.5t23.5 56.5t-23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5zM2176 384q0 -73 -46.5 -131t-117.5 -91
2049t-144.5 -49.5t-139.5 -16.5t-139.5 16.5t-144.5 49.5t-117.5 91t-46.5 131q0 11 35 81t92 174.5t107 195.5t102 184t56 100q18 33 56 33t56 -33q4 -7 56 -100t102 -184t107 -195.5t92 -174.5t35 -81zM896 384q0 -73 -46.5 -131t-117.5 -91t-144.5 -49.5t-139.5 -16.5
2050t-139.5 16.5t-144.5 49.5t-117.5 91t-46.5 131q0 11 35 81t92 174.5t107 195.5t102 184t56 100q18 33 56 33t56 -33q4 -7 56 -100t102 -184t107 -195.5t92 -174.5t35 -81z" />
2051 <glyph glyph-name="_555" unicode="&#xf250;"
2052d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9
2053t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM874 700q77 29 149 92.5t129.5 152.5t92.5 210t35 253h-1024q0 -132 35 -253t92.5 -210t129.5 -152.5t149 -92.5q19 -7 30.5 -23.5t11.5 -36.5t-11.5 -36.5t-30.5 -23.5q-77 -29 -149 -92.5
2054t-129.5 -152.5t-92.5 -210t-35 -253h1024q0 132 -35 253t-92.5 210t-129.5 152.5t-149 92.5q-19 7 -30.5 23.5t-11.5 36.5t11.5 36.5t30.5 23.5z" />
2055 <glyph glyph-name="_556" unicode="&#xf251;"
2056d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9
2057t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM1280 1408h-1024q0 -66 9 -128h1006q9 61 9 128zM1280 -128q0 130 -34 249.5t-90.5 208t-126.5 152t-146 94.5h-230q-76 -31 -146 -94.5t-126.5 -152t-90.5 -208t-34 -249.5h1024z" />
2058 <glyph glyph-name="_557" unicode="&#xf252;"
2059d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9
2060t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM1280 1408h-1024q0 -206 85 -384h854q85 178 85 384zM1223 192q-54 141 -145.5 241.5t-194.5 142.5h-230q-103 -42 -194.5 -142.5t-145.5 -241.5h910z" />
2061 <glyph glyph-name="_558" unicode="&#xf253;"
2062d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9
2063t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM874 700q77 29 149 92.5t129.5 152.5t92.5 210t35 253h-1024q0 -132 35 -253t92.5 -210t129.5 -152.5t149 -92.5q19 -7 30.5 -23.5t11.5 -36.5t-11.5 -36.5t-30.5 -23.5q-137 -51 -244 -196
2064h700q-107 145 -244 196q-19 7 -30.5 23.5t-11.5 36.5t11.5 36.5t30.5 23.5z" />
2065 <glyph glyph-name="_559" unicode="&#xf254;"
2066d="M1504 -64q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v128q0 14 9 23t23 9h1472zM130 0q3 55 16 107t30 95t46 87t53.5 76t64.5 69.5t66 60t70.5 55t66.5 47.5t65 43q-43 28 -65 43t-66.5 47.5t-70.5 55t-66 60t-64.5 69.5t-53.5 76t-46 87
2067t-30 95t-16 107h1276q-3 -55 -16 -107t-30 -95t-46 -87t-53.5 -76t-64.5 -69.5t-66 -60t-70.5 -55t-66.5 -47.5t-65 -43q43 -28 65 -43t66.5 -47.5t70.5 -55t66 -60t64.5 -69.5t53.5 -76t46 -87t30 -95t16 -107h-1276zM1504 1536q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9
2068h-1472q-14 0 -23 9t-9 23v128q0 14 9 23t23 9h1472z" />
2069 <glyph glyph-name="_560" unicode="&#xf255;"
2070d="M768 1152q-53 0 -90.5 -37.5t-37.5 -90.5v-128h-32v93q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-429l-32 30v172q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-224q0 -47 35 -82l310 -296q39 -39 39 -102q0 -26 19 -45t45 -19h640q26 0 45 19t19 45v25
2071q0 41 10 77l108 436q10 36 10 77v246q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-32h-32v125q0 40 -25 72.5t-64 40.5q-14 2 -23 2q-46 0 -79 -33t-33 -79v-128h-32v122q0 51 -32.5 89.5t-82.5 43.5q-5 1 -13 1zM768 1280q84 0 149 -50q57 34 123 34q59 0 111 -27
2072t86 -76q27 7 59 7q100 0 170 -71.5t70 -171.5v-246q0 -51 -13 -108l-109 -436q-6 -24 -6 -71q0 -80 -56 -136t-136 -56h-640q-84 0 -138 58.5t-54 142.5l-308 296q-76 73 -76 175v224q0 99 70.5 169.5t169.5 70.5q11 0 16 -1q6 95 75.5 160t164.5 65q52 0 98 -21
2073q72 69 174 69z" />
2074 <glyph glyph-name="_561" unicode="&#xf256;" horiz-adv-x="1792"
2075d="M880 1408q-46 0 -79 -33t-33 -79v-656h-32v528q0 46 -33 79t-79 33t-79 -33t-33 -79v-528v-256l-154 205q-38 51 -102 51q-53 0 -90.5 -37.5t-37.5 -90.5q0 -43 26 -77l384 -512q38 -51 102 -51h688q34 0 61 22t34 56l76 405q5 32 5 59v498q0 46 -33 79t-79 33t-79 -33
2076t-33 -79v-272h-32v528q0 46 -33 79t-79 33t-79 -33t-33 -79v-528h-32v656q0 46 -33 79t-79 33zM880 1536q68 0 125.5 -35.5t88.5 -96.5q19 4 42 4q99 0 169.5 -70.5t70.5 -169.5v-17q105 6 180.5 -64t75.5 -175v-498q0 -40 -8 -83l-76 -404q-14 -79 -76.5 -131t-143.5 -52
2077h-688q-60 0 -114.5 27.5t-90.5 74.5l-384 512q-51 68 -51 154q0 106 75 181t181 75q78 0 128 -34v434q0 99 70.5 169.5t169.5 70.5q23 0 42 -4q31 61 88.5 96.5t125.5 35.5z" />
2078 <glyph glyph-name="_562" unicode="&#xf257;" horiz-adv-x="1792"
2079d="M1073 -128h-177q-163 0 -226 141q-23 49 -23 102v5q-62 30 -98.5 88.5t-36.5 127.5q0 38 5 48h-261q-106 0 -181 75t-75 181t75 181t181 75h113l-44 17q-74 28 -119.5 93.5t-45.5 145.5q0 106 75 181t181 75q46 0 91 -17l628 -239h401q106 0 181 -75t75 -181v-668
2080q0 -88 -54 -157.5t-140 -90.5l-339 -85q-92 -23 -186 -23zM1024 583l-155 -71l-163 -74q-30 -14 -48 -41.5t-18 -60.5q0 -46 33 -79t79 -33q26 0 46 10l338 154q-49 10 -80.5 50t-31.5 90v55zM1344 272q0 46 -33 79t-79 33q-26 0 -46 -10l-290 -132q-28 -13 -37 -17
2081t-30.5 -17t-29.5 -23.5t-16 -29t-8 -40.5q0 -50 31.5 -82t81.5 -32q20 0 38 9l352 160q30 14 48 41.5t18 60.5zM1112 1024l-650 248q-24 8 -46 8q-53 0 -90.5 -37.5t-37.5 -90.5q0 -40 22.5 -73t59.5 -47l526 -200v-64h-640q-53 0 -90.5 -37.5t-37.5 -90.5t37.5 -90.5
2082t90.5 -37.5h535l233 106v198q0 63 46 106l111 102h-69zM1073 0q82 0 155 19l339 85q43 11 70 45.5t27 78.5v668q0 53 -37.5 90.5t-90.5 37.5h-308l-136 -126q-36 -33 -36 -82v-296q0 -46 33 -77t79 -31t79 35t33 81v208h32v-208q0 -70 -57 -114q52 -8 86.5 -48.5t34.5 -93.5
2083q0 -42 -23 -78t-61 -53l-310 -141h91z" />
2084 <glyph glyph-name="_563" unicode="&#xf258;" horiz-adv-x="2048"
2085d="M1151 1536q61 0 116 -28t91 -77l572 -781q118 -159 118 -359v-355q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v177l-286 143h-546q-80 0 -136 56t-56 136v32q0 119 84.5 203.5t203.5 84.5h420l42 128h-686q-100 0 -173.5 67.5t-81.5 166.5q-65 79 -65 182v32
2086q0 80 56 136t136 56h959zM1920 -64v355q0 157 -93 284l-573 781q-39 52 -103 52h-959q-26 0 -45 -19t-19 -45q0 -32 1.5 -49.5t9.5 -40.5t25 -43q10 31 35.5 50t56.5 19h832v-32h-832q-26 0 -45 -19t-19 -45q0 -44 3 -58q8 -44 44 -73t81 -29h640h91q40 0 68 -28t28 -68
2087q0 -15 -5 -30l-64 -192q-10 -29 -35 -47.5t-56 -18.5h-443q-66 0 -113 -47t-47 -113v-32q0 -26 19 -45t45 -19h561q16 0 29 -7l317 -158q24 -13 38.5 -36t14.5 -50v-197q0 -26 19 -45t45 -19h384q26 0 45 19t19 45z" />
2088 <glyph glyph-name="_564" unicode="&#xf259;" horiz-adv-x="2048"
2089d="M459 -256q-77 0 -137.5 47.5t-79.5 122.5l-101 401q-13 57 -13 108q0 45 -5 67l-116 477q-7 27 -7 57q0 93 62 161t155 78q17 85 82.5 139t152.5 54q83 0 148 -51.5t85 -132.5l83 -348l103 428q20 81 85 132.5t148 51.5q89 0 155.5 -57.5t80.5 -144.5q92 -10 152 -79
2090t60 -162q0 -24 -7 -59l-123 -512q10 7 37.5 28.5t38.5 29.5t35 23t41 20.5t41.5 11t49.5 5.5q105 0 180 -74t75 -179q0 -62 -28.5 -118t-78.5 -94l-507 -380q-68 -51 -153 -51h-694zM1104 1408q-38 0 -68.5 -24t-39.5 -62l-164 -682h-127l-145 602q-9 38 -39.5 62t-68.5 24
2091q-48 0 -80 -33t-32 -80q0 -15 3 -28l132 -547h-26l-99 408q-9 37 -40 62.5t-69 25.5q-47 0 -80 -33t-33 -79q0 -14 3 -26l116 -478q7 -28 9 -86t10 -88l100 -401q8 -32 34 -52.5t59 -20.5h694q42 0 76 26l507 379q56 43 56 110q0 52 -37.5 88.5t-89.5 36.5q-43 0 -77 -26
2092l-307 -230v227q0 4 32 138t68 282t39 161q4 18 4 29q0 47 -32 81t-79 34q-39 0 -69.5 -24t-39.5 -62l-116 -482h-26l150 624q3 14 3 28q0 48 -31.5 82t-79.5 34z" />
2093 <glyph glyph-name="_565" unicode="&#xf25a;" horiz-adv-x="1792"
2094d="M640 1408q-53 0 -90.5 -37.5t-37.5 -90.5v-512v-384l-151 202q-41 54 -107 54q-52 0 -89 -38t-37 -90q0 -43 26 -77l384 -512q38 -51 102 -51h718q22 0 39.5 13.5t22.5 34.5l92 368q24 96 24 194v217q0 41 -28 71t-68 30t-68 -28t-28 -68h-32v61q0 48 -32 81.5t-80 33.5
2095q-46 0 -79 -33t-33 -79v-64h-32v90q0 55 -37 94.5t-91 39.5q-53 0 -90.5 -37.5t-37.5 -90.5v-96h-32v570q0 55 -37 94.5t-91 39.5zM640 1536q107 0 181.5 -77.5t74.5 -184.5v-220q22 2 32 2q99 0 173 -69q47 21 99 21q113 0 184 -87q27 7 56 7q94 0 159 -67.5t65 -161.5
2096v-217q0 -116 -28 -225l-92 -368q-16 -64 -68 -104.5t-118 -40.5h-718q-60 0 -114.5 27.5t-90.5 74.5l-384 512q-51 68 -51 154q0 105 74.5 180.5t179.5 75.5q71 0 130 -35v547q0 106 75 181t181 75zM768 128v384h-32v-384h32zM1024 128v384h-32v-384h32zM1280 128v384h-32
2097v-384h32z" />
2098 <glyph glyph-name="_566" unicode="&#xf25b;"
2099d="M1288 889q60 0 107 -23q141 -63 141 -226v-177q0 -94 -23 -186l-85 -339q-21 -86 -90.5 -140t-157.5 -54h-668q-106 0 -181 75t-75 181v401l-239 628q-17 45 -17 91q0 106 75 181t181 75q80 0 145.5 -45.5t93.5 -119.5l17 -44v113q0 106 75 181t181 75t181 -75t75 -181
2100v-261q27 5 48 5q69 0 127.5 -36.5t88.5 -98.5zM1072 896q-33 0 -60.5 -18t-41.5 -48l-74 -163l-71 -155h55q50 0 90 -31.5t50 -80.5l154 338q10 20 10 46q0 46 -33 79t-79 33zM1293 761q-22 0 -40.5 -8t-29 -16t-23.5 -29.5t-17 -30.5t-17 -37l-132 -290q-10 -20 -10 -46
2101q0 -46 33 -79t79 -33q33 0 60.5 18t41.5 48l160 352q9 18 9 38q0 50 -32 81.5t-82 31.5zM128 1120q0 -22 8 -46l248 -650v-69l102 111q43 46 106 46h198l106 233v535q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5v-640h-64l-200 526q-14 37 -47 59.5t-73 22.5
2102q-53 0 -90.5 -37.5t-37.5 -90.5zM1180 -128q44 0 78.5 27t45.5 70l85 339q19 73 19 155v91l-141 -310q-17 -38 -53 -61t-78 -23q-53 0 -93.5 34.5t-48.5 86.5q-44 -57 -114 -57h-208v32h208q46 0 81 33t35 79t-31 79t-77 33h-296q-49 0 -82 -36l-126 -136v-308
2103q0 -53 37.5 -90.5t90.5 -37.5h668z" />
2104 <glyph glyph-name="_567" unicode="&#xf25c;" horiz-adv-x="1973"
2105d="M857 992v-117q0 -13 -9.5 -22t-22.5 -9h-298v-812q0 -13 -9 -22.5t-22 -9.5h-135q-13 0 -22.5 9t-9.5 23v812h-297q-13 0 -22.5 9t-9.5 22v117q0 14 9 23t23 9h793q13 0 22.5 -9.5t9.5 -22.5zM1895 995l77 -961q1 -13 -8 -24q-10 -10 -23 -10h-134q-12 0 -21 8.5
2106t-10 20.5l-46 588l-189 -425q-8 -19 -29 -19h-120q-20 0 -29 19l-188 427l-45 -590q-1 -12 -10 -20.5t-21 -8.5h-135q-13 0 -23 10q-9 10 -9 24l78 961q1 12 10 20.5t21 8.5h142q20 0 29 -19l220 -520q10 -24 20 -51q3 7 9.5 24.5t10.5 26.5l221 520q9 19 29 19h141
2107q13 0 22 -8.5t10 -20.5z" />
2108 <glyph glyph-name="_568" unicode="&#xf25d;" horiz-adv-x="1792"
2109d="M1042 833q0 88 -60 121q-33 18 -117 18h-123v-281h162q66 0 102 37t36 105zM1094 548l205 -373q8 -17 -1 -31q-8 -16 -27 -16h-152q-20 0 -28 17l-194 365h-155v-350q0 -14 -9 -23t-23 -9h-134q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h294q128 0 190 -24q85 -31 134 -109
2110t49 -180q0 -92 -42.5 -165.5t-115.5 -109.5q6 -10 9 -16zM896 1376q-150 0 -286 -58.5t-234.5 -157t-157 -234.5t-58.5 -286t58.5 -286t157 -234.5t234.5 -157t286 -58.5t286 58.5t234.5 157t157 234.5t58.5 286t-58.5 286t-157 234.5t-234.5 157t-286 58.5zM1792 640
2111q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
2112 <glyph glyph-name="_569" unicode="&#xf25e;" horiz-adv-x="1792"
2113d="M605 303q153 0 257 104q14 18 3 36l-45 82q-6 13 -24 17q-16 2 -27 -11l-4 -3q-4 -4 -11.5 -10t-17.5 -13.5t-23.5 -14.5t-28.5 -13t-33.5 -9.5t-37.5 -3.5q-76 0 -125 50t-49 127q0 76 48 125.5t122 49.5q37 0 71.5 -14t50.5 -28l16 -14q11 -11 26 -10q16 2 24 14l53 78
2114q13 20 -2 39q-3 4 -11 12t-30 23.5t-48.5 28t-67.5 22.5t-86 10q-148 0 -246 -96.5t-98 -240.5q0 -146 97 -241.5t247 -95.5zM1235 303q153 0 257 104q14 18 4 36l-45 82q-8 14 -25 17q-16 2 -27 -11l-4 -3q-4 -4 -11.5 -10t-17.5 -13.5t-23.5 -14.5t-28.5 -13t-33.5 -9.5
2115t-37.5 -3.5q-76 0 -125 50t-49 127q0 76 48 125.5t122 49.5q37 0 71.5 -14t50.5 -28l16 -14q11 -11 26 -10q16 2 24 14l53 78q13 20 -2 39q-3 4 -11 12t-30 23.5t-48.5 28t-67.5 22.5t-86 10q-147 0 -245.5 -96.5t-98.5 -240.5q0 -146 97 -241.5t247 -95.5zM896 1376
2116q-150 0 -286 -58.5t-234.5 -157t-157 -234.5t-58.5 -286t58.5 -286t157 -234.5t234.5 -157t286 -58.5t286 58.5t234.5 157t157 234.5t58.5 286t-58.5 286t-157 234.5t-234.5 157t-286 58.5zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191
2117t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71z" />
2118 <glyph glyph-name="f260" unicode="&#xf260;" horiz-adv-x="2048"
2119d="M736 736l384 -384l-384 -384l-672 672l672 672l168 -168l-96 -96l-72 72l-480 -480l480 -480l193 193l-289 287zM1312 1312l672 -672l-672 -672l-168 168l96 96l72 -72l480 480l-480 480l-193 -193l289 -287l-96 -96l-384 384z" />
2120 <glyph glyph-name="f261" unicode="&#xf261;" horiz-adv-x="1792"
2121d="M717 182l271 271l-279 279l-88 -88l192 -191l-96 -96l-279 279l279 279l40 -40l87 87l-127 128l-454 -454zM1075 190l454 454l-454 454l-271 -271l279 -279l88 88l-192 191l96 96l279 -279l-279 -279l-40 40l-87 -88zM1792 640q0 -182 -71 -348t-191 -286t-286 -191
2122t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
2123 <glyph glyph-name="_572" unicode="&#xf262;" horiz-adv-x="2304"
2124d="M651 539q0 -39 -27.5 -66.5t-65.5 -27.5q-39 0 -66.5 27.5t-27.5 66.5q0 38 27.5 65.5t66.5 27.5q38 0 65.5 -27.5t27.5 -65.5zM1805 540q0 -39 -27.5 -66.5t-66.5 -27.5t-66.5 27.5t-27.5 66.5t27.5 66t66.5 27t66.5 -27t27.5 -66zM765 539q0 79 -56.5 136t-136.5 57
2125t-136.5 -56.5t-56.5 -136.5t56.5 -136.5t136.5 -56.5t136.5 56.5t56.5 136.5zM1918 540q0 80 -56.5 136.5t-136.5 56.5q-79 0 -136 -56.5t-57 -136.5t56.5 -136.5t136.5 -56.5t136.5 56.5t56.5 136.5zM850 539q0 -116 -81.5 -197.5t-196.5 -81.5q-116 0 -197.5 82t-81.5 197
2126t82 196.5t197 81.5t196.5 -81.5t81.5 -196.5zM2004 540q0 -115 -81.5 -196.5t-197.5 -81.5q-115 0 -196.5 81.5t-81.5 196.5t81.5 196.5t196.5 81.5q116 0 197.5 -81.5t81.5 -196.5zM1040 537q0 191 -135.5 326.5t-326.5 135.5q-125 0 -231 -62t-168 -168.5t-62 -231.5
2127t62 -231.5t168 -168.5t231 -62q191 0 326.5 135.5t135.5 326.5zM1708 1110q-254 111 -556 111q-319 0 -573 -110q117 0 223 -45.5t182.5 -122.5t122 -183t45.5 -223q0 115 43.5 219.5t118 180.5t177.5 123t217 50zM2187 537q0 191 -135 326.5t-326 135.5t-326.5 -135.5
2128t-135.5 -326.5t135.5 -326.5t326.5 -135.5t326 135.5t135 326.5zM1921 1103h383q-44 -51 -75 -114.5t-40 -114.5q110 -151 110 -337q0 -156 -77 -288t-209 -208.5t-287 -76.5q-133 0 -249 56t-196 155q-47 -56 -129 -179q-11 22 -53.5 82.5t-74.5 97.5
2129q-80 -99 -196.5 -155.5t-249.5 -56.5q-155 0 -287 76.5t-209 208.5t-77 288q0 186 110 337q-9 51 -40 114.5t-75 114.5h365q149 100 355 156.5t432 56.5q224 0 421 -56t348 -157z" />
2130 <glyph glyph-name="f263" unicode="&#xf263;" horiz-adv-x="1280"
2131d="M640 629q-188 0 -321 133t-133 320q0 188 133 321t321 133t321 -133t133 -321q0 -187 -133 -320t-321 -133zM640 1306q-92 0 -157.5 -65.5t-65.5 -158.5q0 -92 65.5 -157.5t157.5 -65.5t157.5 65.5t65.5 157.5q0 93 -65.5 158.5t-157.5 65.5zM1163 574q13 -27 15 -49.5
2132t-4.5 -40.5t-26.5 -38.5t-42.5 -37t-61.5 -41.5q-115 -73 -315 -94l73 -72l267 -267q30 -31 30 -74t-30 -73l-12 -13q-31 -30 -74 -30t-74 30q-67 68 -267 268l-267 -268q-31 -30 -74 -30t-73 30l-12 13q-31 30 -31 73t31 74l267 267l72 72q-203 21 -317 94
2133q-39 25 -61.5 41.5t-42.5 37t-26.5 38.5t-4.5 40.5t15 49.5q10 20 28 35t42 22t56 -2t65 -35q5 -4 15 -11t43 -24.5t69 -30.5t92 -24t113 -11q91 0 174 25.5t120 50.5l38 25q33 26 65 35t56 2t42 -22t28 -35z" />
2134 <glyph glyph-name="_574" unicode="&#xf264;"
2135d="M927 956q0 -66 -46.5 -112.5t-112.5 -46.5t-112.5 46.5t-46.5 112.5t46.5 112.5t112.5 46.5t112.5 -46.5t46.5 -112.5zM1141 593q-10 20 -28 32t-47.5 9.5t-60.5 -27.5q-10 -8 -29 -20t-81 -32t-127 -20t-124 18t-86 36l-27 18q-31 25 -60.5 27.5t-47.5 -9.5t-28 -32
2136q-22 -45 -2 -74.5t87 -73.5q83 -53 226 -67l-51 -52q-142 -142 -191 -190q-22 -22 -22 -52.5t22 -52.5l9 -9q22 -22 52.5 -22t52.5 22l191 191q114 -115 191 -191q22 -22 52.5 -22t52.5 22l9 9q22 22 22 52.5t-22 52.5l-191 190l-52 52q141 14 225 67q67 44 87 73.5t-2 74.5
2137zM1092 956q0 134 -95 229t-229 95t-229 -95t-95 -229t95 -229t229 -95t229 95t95 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
2138 <glyph glyph-name="_575" unicode="&#xf265;" horiz-adv-x="1720"
2139d="M1565 1408q65 0 110 -45.5t45 -110.5v-519q0 -176 -68 -336t-182.5 -275t-274 -182.5t-334.5 -67.5q-176 0 -335.5 67.5t-274.5 182.5t-183 275t-68 336v519q0 64 46 110t110 46h1409zM861 344q47 0 82 33l404 388q37 35 37 85q0 49 -34.5 83.5t-83.5 34.5q-47 0 -82 -33
2140l-323 -310l-323 310q-35 33 -81 33q-49 0 -83.5 -34.5t-34.5 -83.5q0 -51 36 -85l405 -388q33 -33 81 -33z" />
2141 <glyph glyph-name="_576" unicode="&#xf266;" horiz-adv-x="2304"
2142d="M1494 -103l-295 695q-25 -49 -158.5 -305.5t-198.5 -389.5q-1 -1 -27.5 -0.5t-26.5 1.5q-82 193 -255.5 587t-259.5 596q-21 50 -66.5 107.5t-103.5 100.5t-102 43q0 5 -0.5 24t-0.5 27h583v-50q-39 -2 -79.5 -16t-66.5 -43t-10 -64q26 -59 216.5 -499t235.5 -540
2143q31 61 140 266.5t131 247.5q-19 39 -126 281t-136 295q-38 69 -201 71v50l513 -1v-47q-60 -2 -93.5 -25t-12.5 -69q33 -70 87 -189.5t86 -187.5q110 214 173 363q24 55 -10 79.5t-129 26.5q1 7 1 25v24q64 0 170.5 0.5t180 1t92.5 0.5v-49q-62 -2 -119 -33t-90 -81
2144l-213 -442q13 -33 127.5 -290t121.5 -274l441 1017q-14 38 -49.5 62.5t-65 31.5t-55.5 8v50l460 -4l1 -2l-1 -44q-139 -4 -201 -145q-526 -1216 -559 -1291h-49z" />
2145 <glyph glyph-name="_577" unicode="&#xf267;" horiz-adv-x="1792"
2146d="M949 643q0 -26 -16.5 -45t-41.5 -19q-26 0 -45 16.5t-19 41.5q0 26 17 45t42 19t44 -16.5t19 -41.5zM964 585l350 581q-9 -8 -67.5 -62.5t-125.5 -116.5t-136.5 -127t-117 -110.5t-50.5 -51.5l-349 -580q7 7 67 62t126 116.5t136 127t117 111t50 50.5zM1611 640
2147q0 -201 -104 -371q-3 2 -17 11t-26.5 16.5t-16.5 7.5q-13 0 -13 -13q0 -10 59 -44q-74 -112 -184.5 -190.5t-241.5 -110.5l-16 67q-1 10 -15 10q-5 0 -8 -5.5t-2 -9.5l16 -68q-72 -15 -146 -15q-199 0 -372 105q1 2 13 20.5t21.5 33.5t9.5 19q0 13 -13 13q-6 0 -17 -14.5
2148t-22.5 -34.5t-13.5 -23q-113 75 -192 187.5t-110 244.5l69 15q10 3 10 15q0 5 -5.5 8t-10.5 2l-68 -15q-14 72 -14 139q0 206 109 379q2 -1 18.5 -12t30 -19t17.5 -8q13 0 13 12q0 6 -12.5 15.5t-32.5 21.5l-20 12q77 112 189 189t244 107l15 -67q2 -10 15 -10q5 0 8 5.5
2149t2 10.5l-15 66q71 13 134 13q204 0 379 -109q-39 -56 -39 -65q0 -13 12 -13q11 0 48 64q111 -75 187.5 -186t107.5 -241l-56 -12q-10 -2 -10 -16q0 -5 5.5 -8t9.5 -2l57 13q14 -72 14 -140zM1696 640q0 163 -63.5 311t-170.5 255t-255 170.5t-311 63.5t-311 -63.5
2150t-255 -170.5t-170.5 -255t-63.5 -311t63.5 -311t170.5 -255t255 -170.5t311 -63.5t311 63.5t255 170.5t170.5 255t63.5 311zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191
2151t191 -286t71 -348z" />
2152 <glyph glyph-name="_578" unicode="&#xf268;" horiz-adv-x="1792"
2153d="M893 1536q240 2 451 -120q232 -134 352 -372l-742 39q-160 9 -294 -74.5t-185 -229.5l-276 424q128 159 311 245.5t383 87.5zM146 1131l337 -663q72 -143 211 -217t293 -45l-230 -451q-212 33 -385 157.5t-272.5 316t-99.5 411.5q0 267 146 491zM1732 962
2154q58 -150 59.5 -310.5t-48.5 -306t-153 -272t-246 -209.5q-230 -133 -498 -119l405 623q88 131 82.5 290.5t-106.5 277.5zM896 942q125 0 213.5 -88.5t88.5 -213.5t-88.5 -213.5t-213.5 -88.5t-213.5 88.5t-88.5 213.5t88.5 213.5t213.5 88.5z" />
2155 <glyph glyph-name="_579" unicode="&#xf269;" horiz-adv-x="1792"
2156d="M903 -256q-283 0 -504.5 150.5t-329.5 398.5q-58 131 -67 301t26 332.5t111 312t179 242.5l-11 -281q11 14 68 15.5t70 -15.5q42 81 160.5 138t234.5 59q-54 -45 -119.5 -148.5t-58.5 -163.5q25 -8 62.5 -13.5t63 -7.5t68 -4t50.5 -3q15 -5 9.5 -45.5t-30.5 -75.5
2157q-5 -7 -16.5 -18.5t-56.5 -35.5t-101 -34l15 -189l-139 67q-18 -43 -7.5 -81.5t36 -66.5t65.5 -41.5t81 -6.5q51 9 98 34.5t83.5 45t73.5 17.5q61 -4 89.5 -33t19.5 -65q-1 -2 -2.5 -5.5t-8.5 -12.5t-18 -15.5t-31.5 -10.5t-46.5 -1q-60 -95 -144.5 -135.5t-209.5 -29.5
2158q74 -61 162.5 -82.5t168.5 -6t154.5 52t128 87.5t80.5 104q43 91 39 192.5t-37.5 188.5t-78.5 125q87 -38 137 -79.5t77 -112.5q15 170 -57.5 343t-209.5 284q265 -77 412 -279.5t151 -517.5q2 -127 -40.5 -255t-123.5 -238t-189 -196t-247.5 -135.5t-288.5 -49.5z" />
2159 <glyph glyph-name="_580" unicode="&#xf26a;" horiz-adv-x="1792"
2160d="M1493 1308q-165 110 -359 110q-155 0 -293 -73t-240 -200q-75 -93 -119.5 -218t-48.5 -266v-42q4 -141 48.5 -266t119.5 -218q102 -127 240 -200t293 -73q194 0 359 110q-121 -108 -274.5 -168t-322.5 -60q-29 0 -43 1q-175 8 -333 82t-272 193t-181 281t-67 339
2161q0 182 71 348t191 286t286 191t348 71h3q168 -1 320.5 -60.5t273.5 -167.5zM1792 640q0 -192 -77 -362.5t-213 -296.5q-104 -63 -222 -63q-137 0 -255 84q154 56 253.5 233t99.5 405q0 227 -99 404t-253 234q119 83 254 83q119 0 226 -65q135 -125 210.5 -295t75.5 -361z
2162" />
2163 <glyph glyph-name="_581" unicode="&#xf26b;" horiz-adv-x="1792"
2164d="M1792 599q0 -56 -7 -104h-1151q0 -146 109.5 -244.5t257.5 -98.5q99 0 185.5 46.5t136.5 130.5h423q-56 -159 -170.5 -281t-267.5 -188.5t-321 -66.5q-187 0 -356 83q-228 -116 -394 -116q-237 0 -237 263q0 115 45 275q17 60 109 229q199 360 475 606
2165q-184 -79 -427 -354q63 274 283.5 449.5t501.5 175.5q30 0 45 -1q255 117 433 117q64 0 116 -13t94.5 -40.5t66.5 -76.5t24 -115q0 -116 -75 -286q101 -182 101 -390zM1722 1239q0 83 -53 132t-137 49q-108 0 -254 -70q121 -47 222.5 -131.5t170.5 -195.5q51 135 51 216z
2166M128 2q0 -86 48.5 -132.5t134.5 -46.5q115 0 266 83q-122 72 -213.5 183t-137.5 245q-98 -205 -98 -332zM632 715h728q-5 142 -113 237t-251 95q-144 0 -251.5 -95t-112.5 -237z" />
2167 <glyph glyph-name="_582" unicode="&#xf26c;" horiz-adv-x="2048"
2168d="M1792 288v960q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1248v-960q0 -66 -47 -113t-113 -47h-736v-128h352q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23
2169v64q0 14 9 23t23 9h352v128h-736q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
2170 <glyph glyph-name="_583" unicode="&#xf26d;" horiz-adv-x="1792"
2171d="M138 1408h197q-70 -64 -126 -149q-36 -56 -59 -115t-30 -125.5t-8.5 -120t10.5 -132t21 -126t28 -136.5q4 -19 6 -28q51 -238 81 -329q57 -171 152 -275h-272q-48 0 -82 34t-34 82v1304q0 48 34 82t82 34zM1346 1408h308q48 0 82 -34t34 -82v-1304q0 -48 -34 -82t-82 -34
2172h-178q212 210 196 565l-469 -101q-2 -45 -12 -82t-31 -72t-59.5 -59.5t-93.5 -36.5q-123 -26 -199 40q-32 27 -53 61t-51.5 129t-64.5 258q-35 163 -45.5 263t-5.5 139t23 77q20 41 62.5 73t102.5 45q45 12 83.5 6.5t67 -17t54 -35t43 -48t34.5 -56.5l468 100
2173q-68 175 -180 287z" />
2174 <glyph glyph-name="_584" unicode="&#xf26e;"
2175d="M1401 -11l-6 -6q-113 -113 -259 -175q-154 -64 -317 -64q-165 0 -317 64q-148 63 -259 175q-113 112 -175 258q-42 103 -54 189q-4 28 48 36q51 8 56 -20q1 -1 1 -4q18 -90 46 -159q50 -124 152 -226q98 -98 226 -152q132 -56 276 -56q143 0 276 56q128 55 225 152l6 6
2176q10 10 25 6q12 -3 33 -22q36 -37 17 -58zM929 604l-66 -66l63 -63q21 -21 -7 -49q-17 -17 -32 -17q-10 0 -19 10l-62 61l-66 -66q-5 -5 -15 -5q-15 0 -31 16l-2 2q-18 15 -18 29q0 7 8 17l66 65l-66 66q-16 16 14 45q18 18 31 18q6 0 13 -5l65 -66l65 65q18 17 48 -13
2177q27 -27 11 -44zM1400 547q0 -118 -46 -228q-45 -105 -126 -186q-80 -80 -187 -126t-228 -46t-228 46t-187 126q-82 82 -125 186q-15 33 -15 40h-1q-9 27 43 44q50 16 60 -12q37 -99 97 -167h1v339v2q3 136 102 232q105 103 253 103q147 0 251 -103t104 -249
2178q0 -147 -104.5 -251t-250.5 -104q-58 0 -112 16q-28 11 -13 61q16 51 44 43l14 -3q14 -3 33 -6t30 -3q104 0 176 71.5t72 174.5q0 101 -72 171q-71 71 -175 71q-107 0 -178 -80q-64 -72 -64 -160v-413q110 -67 242 -67q96 0 185 36.5t156 103.5t103.5 155t36.5 183
2179q0 198 -141 339q-140 140 -339 140q-200 0 -340 -140q-53 -53 -77 -87l-2 -2q-8 -11 -13 -15.5t-21.5 -9.5t-38.5 3q-21 5 -36.5 16.5t-15.5 26.5v680q0 15 10.5 26.5t27.5 11.5h877q30 0 30 -55t-30 -55h-811v-483h1q40 42 102 84t108 61q109 46 231 46q121 0 228 -46
2180t187 -126q81 -81 126 -186q46 -112 46 -229zM1369 1128q9 -8 9 -18t-5.5 -18t-16.5 -21q-26 -26 -39 -26q-9 0 -16 7q-106 91 -207 133q-128 56 -276 56q-133 0 -262 -49q-27 -10 -45 37q-9 25 -8 38q3 16 16 20q130 57 299 57q164 0 316 -64q137 -58 235 -152z" />
2181 <glyph glyph-name="_585" unicode="&#xf270;" horiz-adv-x="1792"
2182d="M1551 60q15 6 26 3t11 -17.5t-15 -33.5q-13 -16 -44 -43.5t-95.5 -68t-141 -74t-188 -58t-229.5 -24.5q-119 0 -238 31t-209 76.5t-172.5 104t-132.5 105t-84 87.5q-8 9 -10 16.5t1 12t8 7t11.5 2t11.5 -4.5q192 -117 300 -166q389 -176 799 -90q190 40 391 135z
2183M1758 175q11 -16 2.5 -69.5t-28.5 -102.5q-34 -83 -85 -124q-17 -14 -26 -9t0 24q21 45 44.5 121.5t6.5 98.5q-5 7 -15.5 11.5t-27 6t-29.5 2.5t-35 0t-31.5 -2t-31 -3t-22.5 -2q-6 -1 -13 -1.5t-11 -1t-8.5 -1t-7 -0.5h-5.5h-4.5t-3 0.5t-2 1.5l-1.5 3q-6 16 47 40t103 30
2184q46 7 108 1t76 -24zM1364 618q0 -31 13.5 -64t32 -58t37.5 -46t33 -32l13 -11l-227 -224q-40 37 -79 75.5t-58 58.5l-19 20q-11 11 -25 33q-38 -59 -97.5 -102.5t-127.5 -63.5t-140 -23t-137.5 21t-117.5 65.5t-83 113t-31 162.5q0 84 28 154t72 116.5t106.5 83t122.5 57
2185t130 34.5t119.5 18.5t99.5 6.5v127q0 65 -21 97q-34 53 -121 53q-6 0 -16.5 -1t-40.5 -12t-56 -29.5t-56 -59.5t-48 -96l-294 27q0 60 22 119t67 113t108 95t151.5 65.5t190.5 24.5q100 0 181 -25t129.5 -61.5t81 -83t45 -86t12.5 -73.5v-589zM692 597q0 -86 70 -133
2186q66 -44 139 -22q84 25 114 123q14 45 14 101v162q-59 -2 -111 -12t-106.5 -33.5t-87 -71t-32.5 -114.5z" />
2187 <glyph glyph-name="_586" unicode="&#xf271;" horiz-adv-x="1792"
2188d="M1536 1280q52 0 90 -38t38 -90v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128zM1152 1376v-288q0 -14 9 -23t23 -9
2189h64q14 0 23 9t9 23v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 1376v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM1536 -128v1024h-1408v-1024h1408zM896 448h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224
2190v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224z" />
2191 <glyph glyph-name="_587" unicode="&#xf272;" horiz-adv-x="1792"
2192d="M1152 416v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576q14 0 23 -9t9 -23zM128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23
2193t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47
2194t47 -113v-96h128q52 0 90 -38t38 -90z" />
2195 <glyph glyph-name="_588" unicode="&#xf273;" horiz-adv-x="1792"
2196d="M1111 151l-46 -46q-9 -9 -22 -9t-23 9l-188 189l-188 -189q-10 -9 -23 -9t-22 9l-46 46q-9 9 -9 22t9 23l189 188l-189 188q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l188 -188l188 188q10 9 23 9t22 -9l46 -46q9 -9 9 -22t-9 -23l-188 -188l188 -188q9 -10 9 -23t-9 -22z
2197M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280
2198q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
2199 <glyph glyph-name="_589" unicode="&#xf274;" horiz-adv-x="1792"
2200d="M1303 572l-512 -512q-10 -9 -23 -9t-23 9l-288 288q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l220 -220l444 444q10 9 23 9t22 -9l46 -46q9 -9 9 -22t-9 -23zM128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23
2201t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47
2202t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
2203 <glyph glyph-name="_590" unicode="&#xf275;" horiz-adv-x="1792"
2204d="M448 1536q26 0 45 -19t19 -45v-891l536 429q17 14 40 14q26 0 45 -19t19 -45v-379l536 429q17 14 40 14q26 0 45 -19t19 -45v-1152q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h384z" />
2205 <glyph glyph-name="_591" unicode="&#xf276;" horiz-adv-x="1024"
2206d="M512 448q66 0 128 15v-655q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v655q62 -15 128 -15zM512 1536q212 0 362 -150t150 -362t-150 -362t-362 -150t-362 150t-150 362t150 362t362 150zM512 1312q14 0 23 9t9 23t-9 23t-23 9q-146 0 -249 -103t-103 -249
2207q0 -14 9 -23t23 -9t23 9t9 23q0 119 84.5 203.5t203.5 84.5z" />
2208 <glyph glyph-name="_592" unicode="&#xf277;" horiz-adv-x="1792"
2209d="M1745 1239q10 -10 10 -23t-10 -23l-141 -141q-28 -28 -68 -28h-1344q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h576v64q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-64h512q40 0 68 -28zM768 320h256v-512q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v512zM1600 768
2210q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-1344q-40 0 -68 28l-141 141q-10 10 -10 23t10 23l141 141q28 28 68 28h512v192h256v-192h576z" />
2211 <glyph glyph-name="_593" unicode="&#xf278;" horiz-adv-x="2048"
2212d="M2020 1525q28 -20 28 -53v-1408q0 -20 -11 -36t-29 -23l-640 -256q-24 -11 -48 0l-616 246l-616 -246q-10 -5 -24 -5q-19 0 -36 11q-28 20 -28 53v1408q0 20 11 36t29 23l640 256q24 11 48 0l616 -246l616 246q32 13 60 -6zM736 1390v-1270l576 -230v1270zM128 1173
2213v-1270l544 217v1270zM1920 107v1270l-544 -217v-1270z" />
2214 <glyph glyph-name="_594" unicode="&#xf279;" horiz-adv-x="1792"
2215d="M512 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472q0 20 17 28l480 256q7 4 15 4zM1760 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472
2216q0 20 17 28l480 256q7 4 15 4zM640 1536q8 0 14 -3l512 -256q18 -10 18 -29v-1472q0 -13 -9.5 -22.5t-22.5 -9.5q-8 0 -14 3l-512 256q-18 10 -18 29v1472q0 13 9.5 22.5t22.5 9.5z" />
2217 <glyph glyph-name="_595" unicode="&#xf27a;" horiz-adv-x="1792"
2218d="M640 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 640q0 53 -37.5 90.5t-90.5 37.5
2219t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-110 0 -211 18q-173 -173 -435 -229q-52 -10 -86 -13q-12 -1 -22 6t-13 18q-4 15 20 37q5 5 23.5 21.5t25.5 23.5t23.5 25.5t24 31.5t20.5 37
2220t20 48t14.5 57.5t12.5 72.5q-146 90 -229.5 216.5t-83.5 269.5q0 174 120 321.5t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" />
2221 <glyph glyph-name="_596" unicode="&#xf27b;" horiz-adv-x="1792"
2222d="M640 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 -53 -37.5 -90.5t-90.5 -37.5
2223t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5
2224t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51
2225t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 130 71 248.5t191 204.5t286 136.5t348 50.5t348 -50.5t286 -136.5t191 -204.5t71 -248.5z" />
2226 <glyph glyph-name="_597" unicode="&#xf27c;" horiz-adv-x="1024"
2227d="M512 345l512 295v-591l-512 -296v592zM0 640v-591l512 296zM512 1527v-591l-512 -296v591zM512 936l512 295v-591z" />
2228 <glyph glyph-name="_598" unicode="&#xf27d;" horiz-adv-x="1792"
2229d="M1709 1018q-10 -236 -332 -651q-333 -431 -562 -431q-142 0 -240 263q-44 160 -132 482q-72 262 -157 262q-18 0 -127 -76l-77 98q24 21 108 96.5t130 115.5q156 138 241 146q95 9 153 -55.5t81 -203.5q44 -287 66 -373q55 -249 120 -249q51 0 154 161q101 161 109 246
2230q13 139 -109 139q-57 0 -121 -26q120 393 459 382q251 -8 236 -326z" />
2231 <glyph glyph-name="f27e" unicode="&#xf27e;"
2232d="M0 1408h1536v-1536h-1536v1536zM1085 293l-221 631l221 297h-634l221 -297l-221 -631l317 -304z" />
2233 <glyph glyph-name="uniF280" unicode="&#xf280;"
2234d="M0 1408h1536v-1536h-1536v1536zM908 1088l-12 -33l75 -83l-31 -114l25 -25l107 57l107 -57l25 25l-31 114l75 83l-12 33h-95l-53 96h-32l-53 -96h-95zM641 925q32 0 44.5 -16t11.5 -63l174 21q0 55 -17.5 92.5t-50.5 56t-69 25.5t-85 7q-133 0 -199 -57.5t-66 -182.5v-72
2235h-96v-128h76q20 0 20 -8v-382q0 -14 -5 -20t-18 -7l-73 -7v-88h448v86l-149 14q-6 1 -8.5 1.5t-3.5 2.5t-0.5 4t1 7t0.5 10v387h191l38 128h-231q-6 0 -2 6t4 9v80q0 27 1.5 40.5t7.5 28t19.5 20t36.5 5.5zM1248 96v86l-54 9q-7 1 -9.5 2.5t-2.5 3t1 7.5t1 12v520h-275
2236l-23 -101l83 -22q23 -7 23 -27v-370q0 -14 -6 -18.5t-20 -6.5l-70 -9v-86h352z" />
2237 <glyph glyph-name="uniF281" unicode="&#xf281;" horiz-adv-x="1792"
2238d="M1792 690q0 -58 -29.5 -105.5t-79.5 -72.5q12 -46 12 -96q0 -155 -106.5 -287t-290.5 -208.5t-400 -76.5t-399.5 76.5t-290 208.5t-106.5 287q0 47 11 94q-51 25 -82 73.5t-31 106.5q0 82 58 140.5t141 58.5q85 0 145 -63q218 152 515 162l116 521q3 13 15 21t26 5
2239l369 -81q18 37 54 59.5t79 22.5q62 0 106 -43.5t44 -105.5t-44 -106t-106 -44t-105.5 43.5t-43.5 105.5l-334 74l-104 -472q300 -9 519 -160q58 61 143 61q83 0 141 -58.5t58 -140.5zM418 491q0 -62 43.5 -106t105.5 -44t106 44t44 106t-44 105.5t-106 43.5q-61 0 -105 -44
2240t-44 -105zM1228 136q11 11 11 26t-11 26q-10 10 -25 10t-26 -10q-41 -42 -121 -62t-160 -20t-160 20t-121 62q-11 10 -26 10t-25 -10q-11 -10 -11 -25.5t11 -26.5q43 -43 118.5 -68t122.5 -29.5t91 -4.5t91 4.5t122.5 29.5t118.5 68zM1225 341q62 0 105.5 44t43.5 106
2241q0 61 -44 105t-105 44q-62 0 -106 -43.5t-44 -105.5t44 -106t106 -44z" />
2242 <glyph glyph-name="_602" unicode="&#xf282;" horiz-adv-x="1792"
2243d="M69 741h1q16 126 58.5 241.5t115 217t167.5 176t223.5 117.5t276.5 43q231 0 414 -105.5t294 -303.5q104 -187 104 -442v-188h-1125q1 -111 53.5 -192.5t136.5 -122.5t189.5 -57t213 -3t208 46.5t173.5 84.5v-377q-92 -55 -229.5 -92t-312.5 -38t-316 53
2244q-189 73 -311.5 249t-124.5 372q-3 242 111 412t325 268q-48 -60 -78 -125.5t-46 -159.5h635q8 77 -8 140t-47 101.5t-70.5 66.5t-80.5 41t-75 20.5t-56 8.5l-22 1q-135 -5 -259.5 -44.5t-223.5 -104.5t-176 -140.5t-138 -163.5z" />
2245 <glyph glyph-name="_603" unicode="&#xf283;" horiz-adv-x="2304"
2246d="M0 32v608h2304v-608q0 -66 -47 -113t-113 -47h-1984q-66 0 -113 47t-47 113zM640 256v-128h384v128h-384zM256 256v-128h256v128h-256zM2144 1408q66 0 113 -47t47 -113v-224h-2304v224q0 66 47 113t113 47h1984z" />
2247 <glyph glyph-name="_604" unicode="&#xf284;" horiz-adv-x="1792"
2248d="M1584 246l-218 111q-74 -120 -196.5 -189t-263.5 -69q-147 0 -271 72t-196 196t-72 270q0 110 42.5 209.5t115 172t172 115t209.5 42.5q131 0 247.5 -60.5t192.5 -168.5l215 125q-110 169 -286.5 265t-378.5 96q-161 0 -308 -63t-253 -169t-169 -253t-63 -308t63 -308
2249t169 -253t253 -169t308 -63q213 0 397.5 107t290.5 292zM1030 643l693 -352q-116 -253 -334.5 -400t-492.5 -147q-182 0 -348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71q260 0 470.5 -133.5t335.5 -366.5zM1543 640h-39v-160h-96v352h136q32 0 54.5 -20
2250t28.5 -48t1 -56t-27.5 -48t-57.5 -20z" />
2251 <glyph glyph-name="uniF285" unicode="&#xf285;" horiz-adv-x="1792"
2252d="M1427 827l-614 386l92 151h855zM405 562l-184 116v858l1183 -743zM1424 697l147 -95v-858l-532 335zM1387 718l-500 -802h-855l356 571z" />
2253 <glyph glyph-name="uniF286" unicode="&#xf286;" horiz-adv-x="1792"
2254d="M640 528v224q0 16 -16 16h-96q-16 0 -16 -16v-224q0 -16 16 -16h96q16 0 16 16zM1152 528v224q0 16 -16 16h-96q-16 0 -16 -16v-224q0 -16 16 -16h96q16 0 16 16zM1664 496v-752h-640v320q0 80 -56 136t-136 56t-136 -56t-56 -136v-320h-640v752q0 16 16 16h96
2255q16 0 16 -16v-112h128v624q0 16 16 16h96q16 0 16 -16v-112h128v112q0 16 16 16h96q16 0 16 -16v-112h128v112q0 6 2.5 9.5t8.5 5t9.5 2t11.5 0t9 -0.5v391q-32 15 -32 50q0 23 16.5 39t38.5 16t38.5 -16t16.5 -39q0 -35 -32 -50v-17q45 10 83 10q21 0 59.5 -7.5t54.5 -7.5
2256q17 0 47 7.5t37 7.5q16 0 16 -16v-210q0 -15 -35 -21.5t-62 -6.5q-18 0 -54.5 7.5t-55.5 7.5q-40 0 -90 -12v-133q1 0 9 0.5t11.5 0t9.5 -2t8.5 -5t2.5 -9.5v-112h128v112q0 16 16 16h96q16 0 16 -16v-112h128v112q0 16 16 16h96q16 0 16 -16v-624h128v112q0 16 16 16h96
2257q16 0 16 -16z" />
2258 <glyph glyph-name="_607" unicode="&#xf287;" horiz-adv-x="2304"
2259d="M2288 731q16 -8 16 -27t-16 -27l-320 -192q-8 -5 -16 -5q-9 0 -16 4q-16 10 -16 28v128h-858q37 -58 83 -165q16 -37 24.5 -55t24 -49t27 -47t27 -34t31.5 -26t33 -8h96v96q0 14 9 23t23 9h320q14 0 23 -9t9 -23v-320q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v96h-96
2260q-32 0 -61 10t-51 23.5t-45 40.5t-37 46t-33.5 57t-28.5 57.5t-28 60.5q-23 53 -37 81.5t-36 65t-44.5 53.5t-46.5 17h-360q-22 -84 -91 -138t-157 -54q-106 0 -181 75t-75 181t75 181t181 75q88 0 157 -54t91 -138h104q24 0 46.5 17t44.5 53.5t36 65t37 81.5q19 41 28 60.5
2261t28.5 57.5t33.5 57t37 46t45 40.5t51 23.5t61 10h107q21 57 70 92.5t111 35.5q80 0 136 -56t56 -136t-56 -136t-136 -56q-62 0 -111 35.5t-70 92.5h-107q-17 0 -33 -8t-31.5 -26t-27 -34t-27 -47t-24 -49t-24.5 -55q-46 -107 -83 -165h1114v128q0 18 16 28t32 -1z" />
2262 <glyph glyph-name="_608" unicode="&#xf288;" horiz-adv-x="1792"
2263d="M1150 774q0 -56 -39.5 -95t-95.5 -39h-253v269h253q56 0 95.5 -39.5t39.5 -95.5zM1329 774q0 130 -91.5 222t-222.5 92h-433v-896h180v269h253q130 0 222 91.5t92 221.5zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348
2264t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
2265 <glyph glyph-name="_609" unicode="&#xf289;" horiz-adv-x="2304"
2266d="M1645 438q0 59 -34 106.5t-87 68.5q-7 -45 -23 -92q-7 -24 -27.5 -38t-44.5 -14q-12 0 -24 3q-31 10 -45 38.5t-4 58.5q23 71 23 143q0 123 -61 227.5t-166 165.5t-228 61q-134 0 -247 -73t-167 -194q108 -28 188 -106q22 -23 22 -55t-22 -54t-54 -22t-55 22
2267q-75 75 -180 75q-106 0 -181 -74.5t-75 -180.5t75 -180.5t181 -74.5h1046q79 0 134.5 55.5t55.5 133.5zM1798 438q0 -142 -100.5 -242t-242.5 -100h-1046q-169 0 -289 119.5t-120 288.5q0 153 100 267t249 136q62 184 221 298t354 114q235 0 408.5 -158.5t196.5 -389.5
2268q116 -25 192.5 -118.5t76.5 -214.5zM2048 438q0 -175 -97 -319q-23 -33 -64 -33q-24 0 -43 13q-26 17 -32 48.5t12 57.5q71 104 71 233t-71 233q-18 26 -12 57t32 49t57.5 11.5t49.5 -32.5q97 -142 97 -318zM2304 438q0 -244 -134 -443q-23 -34 -64 -34q-23 0 -42 13
2269q-26 18 -32.5 49t11.5 57q108 164 108 358q0 195 -108 357q-18 26 -11.5 57.5t32.5 48.5q26 18 57 12t49 -33q134 -198 134 -442z" />
2270 <glyph glyph-name="_610" unicode="&#xf28a;"
2271d="M1500 -13q0 -89 -63 -152.5t-153 -63.5t-153.5 63.5t-63.5 152.5q0 90 63.5 153.5t153.5 63.5t153 -63.5t63 -153.5zM1267 268q-115 -15 -192.5 -102.5t-77.5 -205.5q0 -74 33 -138q-146 -78 -379 -78q-109 0 -201 21t-153.5 54.5t-110.5 76.5t-76 85t-44.5 83
2272t-23.5 66.5t-6 39.5q0 19 4.5 42.5t18.5 56t36.5 58t64 43.5t94.5 18t94 -17.5t63 -41t35.5 -53t17.5 -49t4 -33.5q0 -34 -23 -81q28 -27 82 -42t93 -17l40 -1q115 0 190 51t75 133q0 26 -9 48.5t-31.5 44.5t-49.5 41t-74 44t-93.5 47.5t-119.5 56.5q-28 13 -43 20
2273q-116 55 -187 100t-122.5 102t-72 125.5t-20.5 162.5q0 78 20.5 150t66 137.5t112.5 114t166.5 77t221.5 28.5q120 0 220 -26t164.5 -67t109.5 -94t64 -105.5t19 -103.5q0 -46 -15 -82.5t-36.5 -58t-48.5 -36t-49 -19.5t-39 -5h-8h-32t-39 5t-44 14t-41 28t-37 46t-24 70.5
2274t-10 97.5q-15 16 -59 25.5t-81 10.5l-37 1q-68 0 -117.5 -31t-70.5 -70t-21 -76q0 -24 5 -43t24 -46t53 -51t97 -53.5t150 -58.5q76 -25 138.5 -53.5t109 -55.5t83 -59t60.5 -59.5t41 -62.5t26.5 -62t14.5 -63.5t6 -62t1 -62.5z" />
2275 <glyph glyph-name="_611" unicode="&#xf28b;"
2276d="M704 352v576q0 14 -9 23t-23 9h-256q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h256q14 0 23 9t9 23zM1152 352v576q0 14 -9 23t-23 9h-256q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h256q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103
2277t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
2278 <glyph glyph-name="_612" unicode="&#xf28c;"
2279d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM768 96q148 0 273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273
2280t73 -273t198 -198t273 -73zM864 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-192zM480 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-192z" />
2281 <glyph glyph-name="_613" unicode="&#xf28d;"
2282d="M1088 352v576q0 14 -9 23t-23 9h-576q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h576q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5
2283t103 -385.5z" />
2284 <glyph glyph-name="_614" unicode="&#xf28e;"
2285d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM768 96q148 0 273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273
2286t73 -273t198 -198t273 -73zM480 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h576q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-576z" />
2287 <glyph glyph-name="_615" unicode="&#xf290;" horiz-adv-x="1792"
2288d="M1757 128l35 -313q3 -28 -16 -50q-19 -21 -48 -21h-1664q-29 0 -48 21q-19 22 -16 50l35 313h1722zM1664 967l86 -775h-1708l86 775q3 24 21 40.5t43 16.5h256v-128q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5v128h384v-128q0 -53 37.5 -90.5t90.5 -37.5
2289t90.5 37.5t37.5 90.5v128h256q25 0 43 -16.5t21 -40.5zM1280 1152v-256q0 -26 -19 -45t-45 -19t-45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-256q0 -26 -19 -45t-45 -19t-45 19t-19 45v256q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
2290 <glyph glyph-name="_616" unicode="&#xf291;" horiz-adv-x="2048"
2291d="M1920 768q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5h-15l-115 -662q-8 -46 -44 -76t-82 -30h-1280q-46 0 -82 30t-44 76l-115 662h-15q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5h1792zM485 -32q26 2 43.5 22.5t15.5 46.5l-32 416q-2 26 -22.5 43.5
2292t-46.5 15.5t-43.5 -22.5t-15.5 -46.5l32 -416q2 -25 20.5 -42t43.5 -17h5zM896 32v416q0 26 -19 45t-45 19t-45 -19t-19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45zM1280 32v416q0 26 -19 45t-45 19t-45 -19t-19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45zM1632 27l32 416
2293q2 26 -15.5 46.5t-43.5 22.5t-46.5 -15.5t-22.5 -43.5l-32 -416q-2 -26 15.5 -46.5t43.5 -22.5h5q25 0 43.5 17t20.5 42zM476 1244l-93 -412h-132l101 441q19 88 89 143.5t160 55.5h167q0 26 19 45t45 19h384q26 0 45 -19t19 -45h167q90 0 160 -55.5t89 -143.5l101 -441
2294h-132l-93 412q-11 44 -45.5 72t-79.5 28h-167q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45h-167q-45 0 -79.5 -28t-45.5 -72z" />
2295 <glyph glyph-name="_617" unicode="&#xf292;" horiz-adv-x="1792"
2296d="M991 512l64 256h-254l-64 -256h254zM1759 1016l-56 -224q-7 -24 -31 -24h-327l-64 -256h311q15 0 25 -12q10 -14 6 -28l-56 -224q-5 -24 -31 -24h-327l-81 -328q-7 -24 -31 -24h-224q-16 0 -26 12q-9 12 -6 28l78 312h-254l-81 -328q-7 -24 -31 -24h-225q-15 0 -25 12
2297q-9 12 -6 28l78 312h-311q-15 0 -25 12q-9 12 -6 28l56 224q7 24 31 24h327l64 256h-311q-15 0 -25 12q-10 14 -6 28l56 224q5 24 31 24h327l81 328q7 24 32 24h224q15 0 25 -12q9 -12 6 -28l-78 -312h254l81 328q7 24 32 24h224q15 0 25 -12q9 -12 6 -28l-78 -312h311
2298q15 0 25 -12q9 -12 6 -28z" />
2299 <glyph glyph-name="_618" unicode="&#xf293;"
2300d="M841 483l148 -148l-149 -149zM840 1094l149 -149l-148 -148zM710 -130l464 464l-306 306l306 306l-464 464v-611l-255 255l-93 -93l320 -321l-320 -321l93 -93l255 255v-611zM1429 640q0 -209 -32 -365.5t-87.5 -257t-140.5 -162.5t-181.5 -86.5t-219.5 -24.5
2301t-219.5 24.5t-181.5 86.5t-140.5 162.5t-87.5 257t-32 365.5t32 365.5t87.5 257t140.5 162.5t181.5 86.5t219.5 24.5t219.5 -24.5t181.5 -86.5t140.5 -162.5t87.5 -257t32 -365.5z" />
2302 <glyph glyph-name="_619" unicode="&#xf294;" horiz-adv-x="1024"
2303d="M596 113l173 172l-173 172v-344zM596 823l173 172l-173 172v-344zM628 640l356 -356l-539 -540v711l-297 -296l-108 108l372 373l-372 373l108 108l297 -296v711l539 -540z" />
2304 <glyph glyph-name="_620" unicode="&#xf295;"
2305d="M1280 256q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM512 1024q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5
2306t112.5 -271.5zM1440 1344q0 -20 -13 -38l-1056 -1408q-19 -26 -51 -26h-160q-26 0 -45 19t-19 45q0 20 13 38l1056 1408q19 26 51 26h160q26 0 45 -19t19 -45zM768 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5
2307t271.5 -112.5t112.5 -271.5z" />
2308 <glyph glyph-name="_621" unicode="&#xf296;" horiz-adv-x="1792"
2309d="M104 830l792 -1015l-868 630q-18 13 -25 34.5t0 42.5l101 308v0zM566 830h660l-330 -1015v0zM368 1442l198 -612h-462l198 612q8 23 33 23t33 -23zM1688 830l101 -308q7 -21 0 -42.5t-25 -34.5l-868 -630l792 1015v0zM1688 830h-462l198 612q8 23 33 23t33 -23z" />
2310 <glyph glyph-name="_622" unicode="&#xf297;" horiz-adv-x="1792"
2311d="M384 704h160v224h-160v-224zM1221 372v92q-104 -36 -243 -38q-135 -1 -259.5 46.5t-220.5 122.5l1 -96q88 -80 212 -128.5t272 -47.5q129 0 238 49zM640 704h640v224h-640v-224zM1792 736q0 -187 -99 -352q89 -102 89 -229q0 -157 -129.5 -268t-313.5 -111
2312q-122 0 -225 52.5t-161 140.5q-19 -1 -57 -1t-57 1q-58 -88 -161 -140.5t-225 -52.5q-184 0 -313.5 111t-129.5 268q0 127 89 229q-99 165 -99 352q0 209 120 385.5t326.5 279.5t449.5 103t449.5 -103t326.5 -279.5t120 -385.5z" />
2313 <glyph glyph-name="_623" unicode="&#xf298;"
2314d="M515 625v-128h-252v128h252zM515 880v-127h-252v127h252zM1273 369v-128h-341v128h341zM1273 625v-128h-672v128h672zM1273 880v-127h-672v127h672zM1408 20v1240q0 8 -6 14t-14 6h-32l-378 -256l-210 171l-210 -171l-378 256h-32q-8 0 -14 -6t-6 -14v-1240q0 -8 6 -14
2315t14 -6h1240q8 0 14 6t6 14zM553 1130l185 150h-406zM983 1130l221 150h-406zM1536 1260v-1240q0 -62 -43 -105t-105 -43h-1240q-62 0 -105 43t-43 105v1240q0 62 43 105t105 43h1240q62 0 105 -43t43 -105z" />
2316 <glyph glyph-name="_624" unicode="&#xf299;" horiz-adv-x="1792"
2317d="M896 720q-104 196 -160 278q-139 202 -347 318q-34 19 -70 36q-89 40 -94 32t34 -38l39 -31q62 -43 112.5 -93.5t94.5 -116.5t70.5 -113t70.5 -131q9 -17 13 -25q44 -84 84 -153t98 -154t115.5 -150t131 -123.5t148.5 -90.5q153 -66 154 -60q1 3 -49 37q-53 36 -81 57
2318q-77 58 -179 211t-185 310zM549 177q-76 60 -132.5 125t-98 143.5t-71 154.5t-58.5 186t-52 209t-60.5 252t-76.5 289q273 0 497.5 -36t379 -92t271 -144.5t185.5 -172.5t110 -198.5t56 -199.5t12.5 -198.5t-9.5 -173t-20 -143.5t-13 -107l323 -327h-104l-281 285
2319q-22 -2 -91.5 -14t-121.5 -19t-138 -6t-160.5 17t-167.5 59t-179 111z" />
2320 <glyph glyph-name="_625" unicode="&#xf29a;" horiz-adv-x="1792"
2321d="M1374 879q-6 26 -28.5 39.5t-48.5 7.5q-261 -62 -401 -62t-401 62q-26 6 -48.5 -7.5t-28.5 -39.5t7.5 -48.5t39.5 -28.5q194 -46 303 -58q-2 -158 -15.5 -269t-26.5 -155.5t-41 -115.5l-9 -21q-10 -25 1 -49t36 -34q9 -4 23 -4q44 0 60 41l8 20q54 139 71 259h42
2322q17 -120 71 -259l8 -20q16 -41 60 -41q14 0 23 4q25 10 36 34t1 49l-9 21q-28 71 -41 115.5t-26.5 155.5t-15.5 269q109 12 303 58q26 6 39.5 28.5t7.5 48.5zM1024 1024q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z
2323M1600 640q0 -143 -55.5 -273.5t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5zM896 1408q-156 0 -298 -61t-245 -164t-164 -245t-61 -298t61 -298
2324t164 -245t245 -164t298 -61t298 61t245 164t164 245t61 298t-61 298t-164 245t-245 164t-298 61zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
2325 <glyph glyph-name="_626" unicode="&#xf29b;"
2326d="M1438 723q34 -35 29 -82l-44 -551q-4 -42 -34.5 -70t-71.5 -28q-6 0 -9 1q-44 3 -72.5 36.5t-25.5 77.5l35 429l-143 -8q55 -113 55 -240q0 -216 -148 -372l-137 137q91 101 91 235q0 145 -102.5 248t-247.5 103q-134 0 -236 -92l-137 138q120 114 284 141l264 300
2327l-149 87l-181 -161q-33 -30 -77 -27.5t-73 35.5t-26.5 77t34.5 73l239 213q26 23 60 26.5t64 -14.5l488 -283q36 -21 48 -68q17 -67 -26 -117l-205 -232l371 20q49 3 83 -32zM1240 1180q-74 0 -126 52t-52 126t52 126t126 52t126.5 -52t52.5 -126t-52.5 -126t-126.5 -52z
2328M613 -62q106 0 196 61l139 -139q-146 -116 -335 -116q-148 0 -273.5 73t-198.5 198t-73 273q0 188 116 336l139 -139q-60 -88 -60 -197q0 -145 102.5 -247.5t247.5 -102.5z" />
2329 <glyph glyph-name="_627" unicode="&#xf29c;"
2330d="M880 336v-160q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v160q0 14 9 23t23 9h160q14 0 23 -9t9 -23zM1136 832q0 -50 -15 -90t-45.5 -69t-52 -44t-59.5 -36q-32 -18 -46.5 -28t-26 -24t-11.5 -29v-32q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v68q0 35 10.5 64.5
2331t24 47.5t39 35.5t41 25.5t44.5 21q53 25 75 43t22 49q0 42 -43.5 71.5t-95.5 29.5q-56 0 -95 -27q-29 -20 -80 -83q-9 -12 -25 -12q-11 0 -19 6l-108 82q-10 7 -12 20t5 23q122 192 349 192q129 0 238.5 -89.5t109.5 -214.5zM768 1280q-130 0 -248.5 -51t-204 -136.5
2332t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5
2333t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
2334 <glyph glyph-name="_628" unicode="&#xf29d;" horiz-adv-x="1408"
2335d="M366 1225q-64 0 -110 45.5t-46 110.5q0 64 46 109.5t110 45.5t109.5 -45.5t45.5 -109.5q0 -65 -45.5 -110.5t-109.5 -45.5zM917 583q0 -50 -30 -67.5t-63.5 -6.5t-47.5 34l-367 438q-7 12 -14 15.5t-11 1.5l-3 -3q-7 -8 4 -21l122 -139l1 -354l-161 -457
2336q-67 -192 -92 -234q-15 -26 -28 -32q-50 -26 -103 -1q-29 13 -41.5 43t-9.5 57q2 17 197 618l5 416l-85 -164l35 -222q4 -24 -1 -42t-14 -27.5t-19 -16t-17 -7.5l-7 -2q-19 -3 -34.5 3t-24 16t-14 22t-7.5 19.5t-2 9.5l-46 299l211 381q23 34 113 34q75 0 107 -40l424 -521
2337q7 -5 14 -17l3 -3l-1 -1q7 -13 7 -29zM514 433q43 -113 88.5 -225t69.5 -168l24 -55q36 -93 42 -125q11 -70 -36 -97q-35 -22 -66 -16t-51 22t-29 35h-1q-6 16 -8 25l-124 351zM1338 -159q31 -49 31 -57q0 -5 -3 -7q-9 -5 -14.5 0.5t-15.5 26t-16 30.5q-114 172 -423 661
2338q3 -1 7 1t7 4l3 2q11 9 11 17z" />
2339 <glyph glyph-name="_629" unicode="&#xf29e;" horiz-adv-x="2304"
2340d="M504 542h171l-1 265zM1530 641q0 87 -50.5 140t-146.5 53h-54v-388h52q91 0 145 57t54 138zM956 1018l1 -756q0 -14 -9.5 -24t-23.5 -10h-216q-14 0 -23.5 10t-9.5 24v62h-291l-55 -81q-10 -15 -28 -15h-267q-21 0 -30.5 18t3.5 35l556 757q9 14 27 14h332q14 0 24 -10
2341t10 -24zM1783 641q0 -193 -125.5 -303t-324.5 -110h-270q-14 0 -24 10t-10 24v756q0 14 10 24t24 10h268q200 0 326 -109t126 -302zM1939 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-44.5 -108t-73.5 -102.5h-51q38 45 66.5 104.5t41.5 112t21 98t9 72.5l1 27q0 8 -0.5 22.5
2342t-7.5 60t-20 91.5t-41 111.5t-66 124.5h43q41 -47 72 -107t45.5 -111.5t23 -96t10.5 -70.5zM2123 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-45 -108t-74 -102.5h-51q38 45 66.5 104.5t41.5 112t21 98t9 72.5l1 27q0 8 -0.5 22.5t-7.5 60t-19.5 91.5t-40.5 111.5t-66 124.5
2343h43q41 -47 72 -107t45.5 -111.5t23 -96t10.5 -70.5zM2304 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-44.5 -108t-73.5 -102.5h-51q38 45 66 104.5t41 112t21 98t9 72.5l1 27q0 8 -0.5 22.5t-7.5 60t-19.5 91.5t-40.5 111.5t-66 124.5h43q41 -47 72 -107t45.5 -111.5t23 -96
2344t9.5 -70.5z" />
2345 <glyph glyph-name="uniF2A0" unicode="&#xf2a0;" horiz-adv-x="1408"
2346d="M617 -153q0 11 -13 58t-31 107t-20 69q-1 4 -5 26.5t-8.5 36t-13.5 21.5q-15 14 -51 14q-23 0 -70 -5.5t-71 -5.5q-34 0 -47 11q-6 5 -11 15.5t-7.5 20t-6.5 24t-5 18.5q-37 128 -37 255t37 255q1 4 5 18.5t6.5 24t7.5 20t11 15.5q13 11 47 11q24 0 71 -5.5t70 -5.5
2347q36 0 51 14q9 8 13.5 21.5t8.5 36t5 26.5q2 9 20 69t31 107t13 58q0 22 -43.5 52.5t-75.5 42.5q-20 8 -45 8q-34 0 -98 -18q-57 -17 -96.5 -40.5t-71 -66t-46 -70t-45.5 -94.5q-6 -12 -9 -19q-49 -107 -68 -216t-19 -244t19 -244t68 -216q56 -122 83 -161q63 -91 179 -127
2348l6 -2q64 -18 98 -18q25 0 45 8q32 12 75.5 42.5t43.5 52.5zM776 760q-26 0 -45 19t-19 45.5t19 45.5q37 37 37 90q0 52 -37 91q-19 19 -19 45t19 45t45 19t45 -19q75 -75 75 -181t-75 -181q-21 -19 -45 -19zM957 579q-27 0 -45 19q-19 19 -19 45t19 45q112 114 112 272
2349t-112 272q-19 19 -19 45t19 45t45 19t45 -19q150 -150 150 -362t-150 -362q-18 -19 -45 -19zM1138 398q-27 0 -45 19q-19 19 -19 45t19 45q90 91 138.5 208t48.5 245t-48.5 245t-138.5 208q-19 19 -19 45t19 45t45 19t45 -19q109 -109 167 -249t58 -294t-58 -294t-167 -249
2350q-18 -19 -45 -19z" />
2351 <glyph glyph-name="uniF2A1" unicode="&#xf2a1;" horiz-adv-x="2176"
2352d="M192 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM704 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM704 864q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1472 352
2353q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1472 864q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 864
2354q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 1376q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 192q0 -80 -56 -136
2355t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 1216q0 -80 -56 -136t-136 -56
2356t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM2176 192q0 -80 -56 -136t-136 -56t-136 56
2357t-56 136t56 136t136 56t136 -56t56 -136zM1664 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM2176 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136
2358t56 136t136 56t136 -56t56 -136zM2176 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136z" />
2359 <glyph glyph-name="uniF2A2" unicode="&#xf2a2;" horiz-adv-x="1792"
2360d="M128 -192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM320 0q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM365 365l256 -256l-90 -90l-256 256zM704 384q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45z
2361M1411 704q0 -59 -11.5 -108.5t-37.5 -93.5t-44 -67.5t-53 -64.5q-31 -35 -45.5 -54t-33.5 -50t-26.5 -64t-7.5 -74q0 -159 -112.5 -271.5t-271.5 -112.5q-26 0 -45 19t-19 45t19 45t45 19q106 0 181 75t75 181q0 57 11.5 105.5t37 91t43.5 66.5t52 63q40 46 59.5 72
2362t37.5 74.5t18 103.5q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5zM896 576q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45
2363t45 19t45 -19t19 -45zM1184 704q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 93 -65.5 158.5t-158.5 65.5q-92 0 -158 -65.5t-66 -158.5q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 146 103 249t249 103t249 -103t103 -249zM1578 993q10 -25 -1 -49t-36 -34q-9 -4 -23 -4
2364q-19 0 -35.5 11t-23.5 30q-68 178 -224 295q-21 16 -25 42t12 47q17 21 43 25t47 -12q183 -137 266 -351zM1788 1074q9 -25 -1.5 -49t-35.5 -34q-11 -4 -23 -4q-44 0 -60 41q-92 238 -297 393q-22 16 -25.5 42t12.5 47q16 22 42 25.5t47 -12.5q235 -175 341 -449z" />
2365 <glyph glyph-name="uniF2A3" unicode="&#xf2a3;" horiz-adv-x="2304"
2366d="M1032 576q-59 2 -84 55q-17 34 -48 53.5t-68 19.5q-53 0 -90.5 -37.5t-37.5 -90.5q0 -56 36 -89l10 -8q34 -31 82 -31q37 0 68 19.5t48 53.5q25 53 84 55zM1600 704q0 56 -36 89l-10 8q-34 31 -82 31q-37 0 -68 -19.5t-48 -53.5q-25 -53 -84 -55q59 -2 84 -55
2367q17 -34 48 -53.5t68 -19.5q53 0 90.5 37.5t37.5 90.5zM1174 925q-17 -35 -55 -48t-73 4q-62 31 -134 31q-51 0 -99 -17q3 0 9.5 0.5t9.5 0.5q92 0 170.5 -50t118.5 -133q17 -36 3.5 -73.5t-49.5 -54.5q-18 -9 -39 -9q21 0 39 -9q36 -17 49.5 -54.5t-3.5 -73.5
2368q-40 -83 -118.5 -133t-170.5 -50h-6q-16 2 -44 4l-290 27l-239 -120q-14 -7 -29 -7q-40 0 -57 35l-160 320q-11 23 -4 47.5t29 37.5l209 119l148 267q17 155 91.5 291.5t195.5 236.5q31 25 70.5 21.5t64.5 -34.5t21.5 -70t-34.5 -65q-70 -59 -117 -128q123 84 267 101
2369q40 5 71.5 -19t35.5 -64q5 -40 -19 -71.5t-64 -35.5q-84 -10 -159 -55q46 10 99 10q115 0 218 -50q36 -18 49 -55.5t-5 -73.5zM2137 1085l160 -320q11 -23 4 -47.5t-29 -37.5l-209 -119l-148 -267q-17 -155 -91.5 -291.5t-195.5 -236.5q-26 -22 -61 -22q-45 0 -74 35
2370q-25 31 -21.5 70t34.5 65q70 59 117 128q-123 -84 -267 -101q-4 -1 -12 -1q-36 0 -63.5 24t-31.5 60q-5 40 19 71.5t64 35.5q84 10 159 55q-46 -10 -99 -10q-115 0 -218 50q-36 18 -49 55.5t5 73.5q17 35 55 48t73 -4q62 -31 134 -31q51 0 99 17q-3 0 -9.5 -0.5t-9.5 -0.5
2371q-92 0 -170.5 50t-118.5 133q-17 36 -3.5 73.5t49.5 54.5q18 9 39 9q-21 0 -39 9q-36 17 -49.5 54.5t3.5 73.5q40 83 118.5 133t170.5 50h6h1q14 -2 42 -4l291 -27l239 120q14 7 29 7q40 0 57 -35z" />
2372 <glyph glyph-name="uniF2A4" unicode="&#xf2a4;" horiz-adv-x="1792"
2373d="M1056 704q0 -26 19 -45t45 -19t45 19t19 45q0 146 -103 249t-249 103t-249 -103t-103 -249q0 -26 19 -45t45 -19t45 19t19 45q0 93 66 158.5t158 65.5t158 -65.5t66 -158.5zM835 1280q-117 0 -223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5q0 -26 19 -45t45 -19t45 19
2374t19 45q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -55 -18 -103.5t-37.5 -74.5t-59.5 -72q-34 -39 -52 -63t-43.5 -66.5t-37 -91t-11.5 -105.5q0 -106 -75 -181t-181 -75q-26 0 -45 -19t-19 -45t19 -45t45 -19q159 0 271.5 112.5t112.5 271.5q0 41 7.5 74
2375t26.5 64t33.5 50t45.5 54q35 41 53 64.5t44 67.5t37.5 93.5t11.5 108.5q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5zM591 561l226 -226l-579 -579q-12 -12 -29 -12t-29 12l-168 168q-12 12 -12 29t12 29zM1612 1524l168 -168q12 -12 12 -29t-12 -30l-233 -233
2376l-26 -25l-71 -71q-66 153 -195 258l91 91l207 207q13 12 30 12t29 -12z" />
2377 <glyph glyph-name="uniF2A5" unicode="&#xf2a5;"
2378d="M866 1021q0 -27 -13 -94q-11 -50 -31.5 -150t-30.5 -150q-2 -11 -4.5 -12.5t-13.5 -2.5q-20 -2 -31 -2q-58 0 -84 49.5t-26 113.5q0 88 35 174t103 124q28 14 51 14q28 0 36.5 -16.5t8.5 -47.5zM1352 597q0 14 -39 75.5t-52 66.5q-21 8 -34 8q-91 0 -226 -77l-2 2
2379q3 22 27.5 135t24.5 178q0 233 -242 233q-24 0 -68 -6q-94 -17 -168.5 -89.5t-111.5 -166.5t-37 -189q0 -146 80.5 -225t227.5 -79q25 0 25 -3t-1 -5q-4 -34 -26 -117q-14 -52 -51.5 -101t-82.5 -49q-42 0 -42 47q0 24 10.5 47.5t25 39.5t29.5 28.5t26 20t11 8.5q0 3 -7 10
2380q-24 22 -58.5 36.5t-65.5 14.5q-35 0 -63.5 -34t-41 -75t-12.5 -75q0 -88 51.5 -142t138.5 -54q82 0 155 53t117.5 126t65.5 153q6 22 15.5 66.5t14.5 66.5q3 12 14 18q118 60 227 60q48 0 127 -18q1 -1 4 -1q5 0 9.5 4.5t4.5 8.5zM1536 1120v-960q0 -119 -84.5 -203.5
2381t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
2382 <glyph glyph-name="uniF2A6" unicode="&#xf2a6;" horiz-adv-x="1535"
2383d="M744 1231q0 24 -2 38.5t-8.5 30t-21 23t-37.5 7.5q-39 0 -78 -23q-105 -58 -159 -190.5t-54 -269.5q0 -44 8.5 -85.5t26.5 -80.5t52.5 -62.5t81.5 -23.5q4 0 18 -0.5t20 0t16 3t15 8.5t7 16q16 77 48 231.5t48 231.5q19 91 19 146zM1498 575q0 -7 -7.5 -13.5t-15.5 -6.5
2384l-6 1q-22 3 -62 11t-72 12.5t-63 4.5q-167 0 -351 -93q-15 -8 -21 -27q-10 -36 -24.5 -105.5t-22.5 -100.5q-23 -91 -70 -179.5t-112.5 -164.5t-154.5 -123t-185 -47q-135 0 -214.5 83.5t-79.5 219.5q0 53 19.5 117t63 116.5t97.5 52.5q38 0 120 -33.5t83 -61.5
2385q0 -1 -16.5 -12.5t-39.5 -31t-46 -44.5t-39 -61t-16 -74q0 -33 16.5 -53t48.5 -20q45 0 85 31.5t66.5 78t48 105.5t32.5 107t16 90v9q0 2 -3.5 3.5t-8.5 1.5h-10t-10 -0.5t-6 -0.5q-227 0 -352 122.5t-125 348.5q0 108 34.5 221t96 210t156 167.5t204.5 89.5q52 9 106 9
2386q374 0 374 -360q0 -98 -38 -273t-43 -211l3 -3q101 57 182.5 88t167.5 31q22 0 53 -13q19 -7 80 -102.5t61 -116.5z" />
2387 <glyph glyph-name="uniF2A7" unicode="&#xf2a7;" horiz-adv-x="1664"
2388d="M831 863q32 0 59 -18l222 -148q61 -40 110 -97l146 -170q40 -46 29 -106l-72 -413q-6 -32 -29.5 -53.5t-55.5 -25.5l-527 -56l-352 -32h-9q-39 0 -67.5 28t-28.5 68q0 37 27 64t65 32l260 32h-448q-41 0 -69.5 30t-26.5 71q2 39 32 65t69 26l442 1l-521 64q-41 5 -66 37
2389t-19 73q6 35 34.5 57.5t65.5 22.5h10l481 -60l-351 94q-38 10 -62 41.5t-18 68.5q6 36 33 58.5t62 22.5q6 0 20 -2l448 -96l217 -37q1 0 3 -0.5t3 -0.5q23 0 30.5 23t-12.5 36l-186 125q-35 23 -42 63.5t18 73.5q27 38 76 38zM761 661l186 -125l-218 37l-5 2l-36 38
2390l-238 262q-1 1 -2.5 3.5t-2.5 3.5q-24 31 -18.5 70t37.5 64q31 23 68 17.5t64 -33.5l142 -147q-2 -1 -5 -3.5t-4 -4.5q-32 -45 -23 -99t55 -85zM1648 1115l15 -266q4 -73 -11 -147l-48 -219q-12 -59 -67 -87l-106 -54q2 62 -39 109l-146 170q-53 61 -117 103l-222 148
2391q-34 23 -76 23q-51 0 -88 -37l-235 312q-25 33 -18 73.5t41 63.5q33 22 71.5 14t62.5 -40l266 -352l-262 455q-21 35 -10.5 75t47.5 59q35 18 72.5 6t57.5 -46l241 -420l-136 337q-15 35 -4.5 74t44.5 56q37 19 76 6t56 -51l193 -415l101 -196q8 -15 23 -17.5t27 7.5t11 26
2392l-12 224q-2 41 26 71t69 31q39 0 67 -28.5t30 -67.5z" />
2393 <glyph glyph-name="uniF2A8" unicode="&#xf2a8;" horiz-adv-x="1792"
2394d="M335 180q-2 0 -6 2q-86 57 -168.5 145t-139.5 180q-21 30 -21 69q0 9 2 19t4 18t7 18t8.5 16t10.5 17t10 15t12 15.5t11 14.5q184 251 452 365q-110 198 -110 211q0 19 17 29q116 64 128 64q18 0 28 -16l124 -229q92 19 192 19q266 0 497.5 -137.5t378.5 -369.5
2395q20 -31 20 -69t-20 -69q-91 -142 -218.5 -253.5t-278.5 -175.5q110 -198 110 -211q0 -20 -17 -29q-116 -64 -127 -64q-19 0 -29 16l-124 229l-64 119l-444 820l7 7q-58 -24 -99 -47q3 -5 127 -234t243 -449t119 -223q0 -7 -9 -9q-13 -3 -72 -3q-57 0 -60 7l-456 841
2396q-39 -28 -82 -68q24 -43 214 -393.5t190 -354.5q0 -10 -11 -10q-14 0 -82.5 22t-72.5 28l-106 197l-224 413q-44 -53 -78 -106q2 -3 18 -25t23 -34l176 -327q0 -10 -10 -10zM1165 282l49 -91q273 111 450 385q-180 277 -459 389q67 -64 103 -148.5t36 -176.5
2397q0 -106 -47 -200.5t-132 -157.5zM848 896q0 -20 14 -34t34 -14q86 0 147 -61t61 -147q0 -20 14 -34t34 -14t34 14t14 34q0 126 -89 215t-215 89q-20 0 -34 -14t-14 -34zM1214 961l-9 4l7 -7z" />
2398 <glyph glyph-name="uniF2A9" unicode="&#xf2a9;" horiz-adv-x="1280"
2399d="M1050 430q0 -215 -147 -374q-148 -161 -378 -161q-232 0 -378 161q-147 159 -147 374q0 147 68 270.5t189 196.5t268 73q96 0 182 -31q-32 -62 -39 -126q-66 28 -143 28q-167 0 -280.5 -123t-113.5 -291q0 -170 112.5 -288.5t281.5 -118.5t281 118.5t112 288.5
2400q0 89 -32 166q66 13 123 49q41 -98 41 -212zM846 619q0 -192 -79.5 -345t-238.5 -253l-14 -1q-29 0 -62 5q83 32 146.5 102.5t99.5 154.5t58.5 189t30 192.5t7.5 178.5q0 69 -3 103q55 -160 55 -326zM791 947v-2q-73 214 -206 440q88 -59 142.5 -186.5t63.5 -251.5z
2401M1035 744q-83 0 -160 75q218 120 290 247q19 37 21 56q-42 -94 -139.5 -166.5t-204.5 -97.5q-35 54 -35 113q0 37 17 79t43 68q46 44 157 74q59 16 106 58.5t74 100.5q74 -105 74 -253q0 -109 -24 -170q-32 -77 -88.5 -130.5t-130.5 -53.5z" />
2402 <glyph glyph-name="uniF2AA" unicode="&#xf2aa;"
2403d="M1050 495q0 78 -28 147q-41 -25 -85 -34q22 -50 22 -114q0 -117 -77 -198.5t-193 -81.5t-193.5 81.5t-77.5 198.5q0 115 78 199.5t193 84.5q53 0 98 -19q4 43 27 87q-60 21 -125 21q-154 0 -257.5 -108.5t-103.5 -263.5t103.5 -261t257.5 -106t257.5 106.5t103.5 260.5z
2404M872 850q2 -24 2 -71q0 -63 -5 -123t-20.5 -132.5t-40.5 -130t-68.5 -106t-100.5 -70.5q21 -3 42 -3h10q219 139 219 411q0 116 -38 225zM872 850q-4 80 -44 171.5t-98 130.5q92 -156 142 -302zM1207 955q0 102 -51 174q-41 -86 -124 -109q-69 -19 -109 -53.5t-40 -99.5
2405q0 -40 24 -77q74 17 140.5 67t95.5 115q-4 -52 -74.5 -111.5t-138.5 -97.5q52 -52 110 -52q51 0 90 37t60 90q17 42 17 117zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5
2406t84.5 -203.5z" />
2407 <glyph glyph-name="uniF2AB" unicode="&#xf2ab;"
2408d="M1279 388q0 22 -22 27q-67 15 -118 59t-80 108q-7 19 -7 25q0 15 19.5 26t43 17t43 20.5t19.5 36.5q0 19 -18.5 31.5t-38.5 12.5q-12 0 -32 -8t-31 -8q-4 0 -12 2q5 95 5 114q0 79 -17 114q-36 78 -103 121.5t-152 43.5q-199 0 -275 -165q-17 -35 -17 -114q0 -19 5 -114
2409q-4 -2 -14 -2q-12 0 -32 7.5t-30 7.5q-21 0 -38.5 -12t-17.5 -32q0 -21 19.5 -35.5t43 -20.5t43 -17t19.5 -26q0 -6 -7 -25q-64 -138 -198 -167q-22 -5 -22 -27q0 -46 137 -68q2 -5 6 -26t11.5 -30.5t23.5 -9.5q12 0 37.5 4.5t39.5 4.5q35 0 67 -15t54 -32.5t57.5 -32.5
2410t76.5 -15q43 0 79 15t57.5 32.5t53.5 32.5t67 15q14 0 39.5 -4t38.5 -4q16 0 23 10t11 30t6 25q137 22 137 68zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5
2411t103 -385.5z" />
2412 <glyph glyph-name="uniF2AC" unicode="&#xf2ac;" horiz-adv-x="1664"
2413d="M848 1408q134 1 240.5 -68.5t163.5 -192.5q27 -58 27 -179q0 -47 -9 -191q14 -7 28 -7q18 0 51 13.5t51 13.5q29 0 56 -18t27 -46q0 -32 -31.5 -54t-69 -31.5t-69 -29t-31.5 -47.5q0 -15 12 -43q37 -82 102.5 -150t144.5 -101q28 -12 80 -23q28 -6 28 -35
2414q0 -70 -219 -103q-7 -11 -11 -39t-14 -46.5t-33 -18.5q-20 0 -62 6.5t-64 6.5q-37 0 -62 -5q-32 -5 -63 -22.5t-58 -38t-58 -40.5t-76 -33.5t-99 -13.5q-52 0 -96.5 13.5t-75 33.5t-57.5 40.5t-58 38t-62 22.5q-26 5 -63 5q-24 0 -65.5 -7.5t-58.5 -7.5q-25 0 -35 18.5
2415t-14 47.5t-11 40q-219 33 -219 103q0 29 28 35q52 11 80 23q78 32 144.5 101t102.5 150q12 28 12 43q0 28 -31.5 47.5t-69.5 29.5t-69.5 31.5t-31.5 52.5q0 27 26 45.5t55 18.5q15 0 48 -13t53 -13q18 0 32 7q-9 142 -9 190q0 122 27 180q64 137 172 198t264 63z" />
2416 <glyph glyph-name="uniF2AD" unicode="&#xf2ad;"
2417d="M1280 388q0 22 -22 27q-67 14 -118 58t-80 109q-7 14 -7 25q0 15 19.5 26t42.5 17t42.5 20.5t19.5 36.5q0 19 -18.5 31.5t-38.5 12.5q-11 0 -31 -8t-32 -8q-4 0 -12 2q5 63 5 115q0 78 -17 114q-36 78 -102.5 121.5t-152.5 43.5q-198 0 -275 -165q-18 -38 -18 -115
2418q0 -38 6 -114q-10 -2 -15 -2q-11 0 -31.5 8t-30.5 8q-20 0 -37.5 -12.5t-17.5 -32.5q0 -21 19.5 -35.5t42.5 -20.5t42.5 -17t19.5 -26q0 -11 -7 -25q-64 -138 -198 -167q-22 -5 -22 -27q0 -47 138 -69q2 -5 6 -26t11 -30.5t23 -9.5q13 0 38.5 5t38.5 5q35 0 67.5 -15
2419t54.5 -32.5t57.5 -32.5t76.5 -15q43 0 79 15t57.5 32.5t54 32.5t67.5 15q13 0 39 -4.5t39 -4.5q15 0 22.5 9.5t11.5 31t5 24.5q138 22 138 69zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960
2420q119 0 203.5 -84.5t84.5 -203.5z" />
2421 <glyph glyph-name="uniF2AE" unicode="&#xf2ae;" horiz-adv-x="2304"
2422d="M2304 1536q-69 -46 -125 -92t-89 -81t-59.5 -71.5t-37.5 -57.5t-22 -44.5t-14 -29.5q-10 -18 -35.5 -136.5t-48.5 -164.5q-15 -29 -50 -60.5t-67.5 -50.5t-72.5 -41t-48 -28q-47 -31 -151 -231q-341 14 -630 -158q-92 -53 -303 -179q47 16 86 31t55 22l15 7
2423q71 27 163 64.5t133.5 53.5t108 34.5t142.5 31.5q186 31 465 -7q1 0 10 -3q11 -6 14 -17t-3 -22l-194 -345q-15 -29 -47 -22q-128 24 -354 24q-146 0 -402 -44.5t-392 -46.5q-82 -1 -149 13t-107 37t-61 40t-33 34l-1 1v2q0 6 6 6q138 0 371 55q192 366 374.5 524t383.5 158
2424q5 0 14.5 -0.5t38 -5t55 -12t61.5 -24.5t63 -39.5t54 -59t40 -82.5l102 177q2 4 21 42.5t44.5 86.5t61 109.5t84 133.5t100.5 137q66 82 128 141.5t121.5 96.5t92.5 53.5t88 39.5z" />
2425 <glyph glyph-name="uniF2B0" unicode="&#xf2b0;"
2426d="M1322 640q0 -45 -5 -76l-236 14l224 -78q-19 -73 -58 -141l-214 103l177 -158q-44 -61 -107 -108l-157 178l103 -215q-61 -37 -140 -59l-79 228l14 -240q-38 -6 -76 -6t-76 6l14 238l-78 -226q-74 19 -140 59l103 215l-157 -178q-59 43 -108 108l178 158l-214 -104
2427q-39 69 -58 141l224 79l-237 -14q-5 42 -5 76q0 35 5 77l238 -14l-225 79q19 73 58 140l214 -104l-177 159q46 61 107 108l158 -178l-103 215q67 39 140 58l77 -224l-13 236q36 6 75 6q38 0 76 -6l-14 -237l78 225q74 -19 140 -59l-103 -214l158 178q61 -47 107 -108
2428l-177 -159l213 104q37 -62 58 -141l-224 -78l237 14q5 -31 5 -77zM1352 640q0 160 -78.5 295.5t-213 214t-292.5 78.5q-119 0 -227 -46.5t-186.5 -125t-124.5 -187.5t-46 -229q0 -119 46 -228t124.5 -187.5t186.5 -125t227 -46.5q158 0 292.5 78.5t213 214t78.5 294.5z
2429M1425 1023v-766l-657 -383l-657 383v766l657 383zM768 -183l708 412v823l-708 411l-708 -411v-823zM1536 1088v-896l-768 -448l-768 448v896l768 448z" />
2430 <glyph glyph-name="uniF2B1" unicode="&#xf2b1;" horiz-adv-x="1664"
2431d="M339 1318h691l-26 -72h-665q-110 0 -188.5 -79t-78.5 -189v-771q0 -95 60.5 -169.5t153.5 -93.5q23 -5 98 -5v-72h-45q-140 0 -239.5 100t-99.5 240v771q0 140 99.5 240t239.5 100zM1190 1536h247l-482 -1294q-23 -61 -40.5 -103.5t-45 -98t-54 -93.5t-64.5 -78.5
2432t-79.5 -65t-95.5 -41t-116 -18.5v195q163 26 220 182q20 52 20 105q0 54 -20 106l-285 733h228l187 -585zM1664 978v-1111h-795q37 55 45 73h678v1038q0 85 -49.5 155t-129.5 99l25 67q101 -34 163.5 -123.5t62.5 -197.5z" />
2433 <glyph glyph-name="uniF2B2" unicode="&#xf2b2;" horiz-adv-x="1792"
2434d="M852 1227q0 -29 -17 -52.5t-45 -23.5t-45 23.5t-17 52.5t17 52.5t45 23.5t45 -23.5t17 -52.5zM688 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50 -21.5t-20 -51.5v-114q0 -30 20.5 -52t49.5 -22q30 0 50.5 22t20.5 52zM860 -149v114q0 30 -20 51.5t-50 21.5t-50.5 -21.5
2435t-20.5 -51.5v-114q0 -30 20.5 -52t50.5 -22q29 0 49.5 22t20.5 52zM1034 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50.5 -21.5t-20.5 -51.5v-114q0 -30 20.5 -52t50.5 -22t50.5 22t20.5 52zM1208 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50.5 -21.5t-20.5 -51.5v-114
2436q0 -30 20.5 -52t50.5 -22t50.5 22t20.5 52zM1476 535q-84 -160 -232 -259.5t-323 -99.5q-123 0 -229.5 51.5t-178.5 137t-113 197.5t-41 232q0 88 21 174q-104 -175 -104 -390q0 -162 65 -312t185 -251q30 57 91 57q56 0 86 -50q32 50 87 50q56 0 86 -50q32 50 87 50t87 -50
2437q30 50 86 50q28 0 52.5 -15.5t37.5 -40.5q112 94 177 231.5t73 287.5zM1326 564q0 75 -72 75q-17 0 -47 -6q-95 -19 -149 -19q-226 0 -226 243q0 86 30 204q-83 -127 -83 -275q0 -150 89 -260.5t235 -110.5q111 0 210 70q13 48 13 79zM884 1223q0 50 -32 89.5t-81 39.5
2438t-81 -39.5t-32 -89.5q0 -51 31.5 -90.5t81.5 -39.5t81.5 39.5t31.5 90.5zM1513 884q0 96 -37.5 179t-113 137t-173.5 54q-77 0 -149 -35t-127 -94q-48 -159 -48 -268q0 -104 45.5 -157t147.5 -53q53 0 142 19q36 6 53 6q51 0 77.5 -28t26.5 -80q0 -26 -4 -46
2439q75 68 117.5 165.5t42.5 200.5zM1792 667q0 -111 -33.5 -249.5t-93.5 -204.5q-58 -64 -195 -142.5t-228 -104.5l-4 -1v-114q0 -43 -29.5 -75t-72.5 -32q-56 0 -86 50q-32 -50 -87 -50t-87 50q-30 -50 -86 -50q-55 0 -87 50q-30 -50 -86 -50q-47 0 -75 33.5t-28 81.5
2440q-90 -68 -198 -68q-118 0 -211 80q54 1 106 20q-113 31 -182 127q32 -7 71 -7q89 0 164 46q-192 192 -240 306q-24 56 -24 160q0 57 9 125.5t31.5 146.5t55 141t86.5 105t120 42q59 0 81 -52q19 29 42 54q2 3 12 13t13 16q10 15 23 38t25 42t28 39q87 111 211.5 177
2441t260.5 66q35 0 62 -4q59 64 146 64q83 0 140 -57q5 -5 5 -12q0 -5 -6 -13.5t-12.5 -16t-16 -17l-10.5 -10.5q17 -6 36 -18t19 -24q0 -6 -16 -25q157 -138 197 -378q25 30 60 30q45 0 100 -49q90 -80 90 -279z" />
2442 <glyph glyph-name="uniF2B3" unicode="&#xf2b3;"
2443d="M917 631q0 33 -6 64h-362v-132h217q-12 -76 -74.5 -120.5t-142.5 -44.5q-99 0 -169 71.5t-70 170.5t70 170.5t169 71.5q93 0 153 -59l104 101q-108 100 -257 100q-160 0 -272 -112.5t-112 -271.5t112 -271.5t272 -112.5q165 0 266.5 105t101.5 270zM1262 585h109v110
2444h-109v110h-110v-110h-110v-110h110v-110h110v110zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
2445 <glyph glyph-name="uniF2B4" unicode="&#xf2b4;"
2446d="M1536 1024v-839q0 -48 -49 -62q-174 -52 -338 -52q-73 0 -215.5 29.5t-227.5 29.5q-164 0 -370 -48v-338h-160v1368q-63 25 -101 81t-38 124q0 91 64 155t155 64t155 -64t64 -155q0 -68 -38 -124t-101 -81v-68q190 44 343 44q99 0 198 -15q14 -2 111.5 -22.5t149.5 -20.5
2447q77 0 165 18q11 2 80 21t89 19q26 0 45 -19t19 -45z" />
2448 <glyph glyph-name="uniF2B5" unicode="&#xf2b5;" horiz-adv-x="2304"
2449d="M192 384q40 0 56 32t0 64t-56 32t-56 -32t0 -64t56 -32zM1665 442q-10 13 -38.5 50t-41.5 54t-38 49t-42.5 53t-40.5 47t-45 49l-125 -140q-83 -94 -208.5 -92t-205.5 98q-57 69 -56.5 158t58.5 157l177 206q-22 11 -51 16.5t-47.5 6t-56.5 -0.5t-49 -1q-92 0 -158 -66
2450l-158 -158h-155v-544q5 0 21 0.5t22 0t19.5 -2t20.5 -4.5t17.5 -8.5t18.5 -13.5l297 -292q115 -111 227 -111q78 0 125 47q57 -20 112.5 8t72.5 85q74 -6 127 44q20 18 36 45.5t14 50.5q10 -10 43 -10q43 0 77 21t49.5 53t12 71.5t-30.5 73.5zM1824 384h96v512h-93l-157 180
2451q-66 76 -169 76h-167q-89 0 -146 -67l-209 -243q-28 -33 -28 -75t27 -75q43 -51 110 -52t111 49l193 218q25 23 53.5 21.5t47 -27t8.5 -56.5q16 -19 56 -63t60 -68q29 -36 82.5 -105.5t64.5 -84.5q52 -66 60 -140zM2112 384q40 0 56 32t0 64t-56 32t-56 -32t0 -64t56 -32z
2452M2304 960v-640q0 -26 -19 -45t-45 -19h-434q-27 -65 -82 -106.5t-125 -51.5q-33 -48 -80.5 -81.5t-102.5 -45.5q-42 -53 -104.5 -81.5t-128.5 -24.5q-60 -34 -126 -39.5t-127.5 14t-117 53.5t-103.5 81l-287 282h-358q-26 0 -45 19t-19 45v672q0 26 19 45t45 19h421
2453q14 14 47 48t47.5 48t44 40t50.5 37.5t51 25.5t62 19.5t68 5.5h117q99 0 181 -56q82 56 181 56h167q35 0 67 -6t56.5 -14.5t51.5 -26.5t44.5 -31t43 -39.5t39 -42t41 -48t41.5 -48.5h355q26 0 45 -19t19 -45z" />
2454 <glyph glyph-name="uniF2B6" unicode="&#xf2b6;" horiz-adv-x="1792"
2455d="M1792 882v-978q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v978q0 15 11 24q8 7 39 34.5t41.5 36t45.5 37.5t70 55.5t96 73t143.5 107t192.5 140.5q5 4 52.5 40t71.5 52.5t64 35t69 18.5t69 -18.5t65 -35.5t71 -52t52 -40q110 -80 192.5 -140.5t143.5 -107
2456t96 -73t70 -55.5t45.5 -37.5t41.5 -36t39 -34.5q11 -9 11 -24zM1228 297q263 191 345 252q11 8 12.5 20.5t-6.5 23.5l-38 52q-8 11 -21 12.5t-24 -6.5q-231 -169 -343 -250q-5 -3 -52 -39t-71.5 -52.5t-64.5 -35t-69 -18.5t-69 18.5t-64.5 35t-71.5 52.5t-52 39
2457q-186 134 -343 250q-11 8 -24 6.5t-21 -12.5l-38 -52q-8 -11 -6.5 -23.5t12.5 -20.5q82 -61 345 -252q10 -8 50 -38t65 -47t64 -39.5t77.5 -33.5t75.5 -11t75.5 11t79 34.5t64.5 39.5t65 47.5t48 36.5z" />
2458 <glyph glyph-name="uniF2B7" unicode="&#xf2b7;" horiz-adv-x="1792"
2459d="M1474 623l39 -51q8 -11 6.5 -23.5t-11.5 -20.5q-43 -34 -126.5 -98.5t-146.5 -113t-67 -51.5q-39 -32 -60 -48t-60.5 -41t-76.5 -36.5t-74 -11.5h-1h-1q-37 0 -74 11.5t-76 36.5t-61 41.5t-60 47.5q-5 4 -65 50.5t-143.5 111t-122.5 94.5q-11 8 -12.5 20.5t6.5 23.5
2460l37 52q8 11 21.5 13t24.5 -7q94 -73 306 -236q5 -4 43.5 -35t60.5 -46.5t56.5 -32.5t58.5 -17h1h1q24 0 58.5 17t56.5 32.5t60.5 46.5t43.5 35q258 198 313 242q11 8 24 6.5t21 -12.5zM1664 -96v928q-90 83 -159 139q-91 74 -389 304q-3 2 -43 35t-61 48t-56 32.5t-59 17.5
2461h-1h-1q-24 0 -59 -17.5t-56 -32.5t-61 -48t-43 -35q-215 -166 -315.5 -245.5t-129.5 -104t-82 -74.5q-14 -12 -21 -19v-928q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 832v-928q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v928q0 56 41 94
2462q123 114 350 290.5t233 181.5q36 30 59 47.5t61.5 42t76 36.5t74.5 12h1h1q37 0 74.5 -12t76 -36.5t61.5 -42t59 -47.5q43 -36 156 -122t226 -177t201 -173q41 -38 41 -94z" />
2463 <glyph glyph-name="uniF2B8" unicode="&#xf2b8;"
2464d="M330 1l202 -214l-34 236l-216 213zM556 -225l274 218l-11 245l-300 -215zM245 413l227 -213l-48 327l-245 204zM495 189l317 214l-14 324l-352 -200zM843 178l95 -80l-2 239l-103 79q0 -1 1 -8.5t0 -12t-5 -7.5l-78 -52l85 -70q7 -6 7 -88zM138 930l256 -200l-68 465
2465l-279 173zM1173 267l15 234l-230 -164l2 -240zM417 722l373 194l-19 441l-423 -163zM1270 357l20 233l-226 142l-2 -105l144 -95q6 -4 4 -9l-7 -119zM1461 496l30 222l-179 -128l-20 -228zM1273 329l-71 49l-8 -117q0 -5 -4 -8l-234 -187q-7 -5 -14 0l-98 83l7 -161
2466q0 -5 -4 -8l-293 -234q-4 -2 -6 -2q-8 2 -8 3l-228 242q-4 4 -59 277q-2 7 5 11l61 37q-94 86 -95 92l-72 351q-2 7 6 12l94 45q-133 100 -135 108l-96 466q-2 10 7 13l433 135q5 0 8 -1l317 -153q6 -4 6 -9l20 -463q0 -7 -6 -10l-118 -61l126 -85q5 -2 5 -8l5 -123l121 74
2467q5 4 11 0l84 -56l3 110q0 6 5 9l206 126q6 3 11 0l245 -135q4 -4 5 -7t-6.5 -60t-17.5 -124.5t-10 -70.5q0 -5 -4 -7l-191 -153q-6 -5 -13 0z" />
2468 <glyph glyph-name="uniF2B9" unicode="&#xf2b9;" horiz-adv-x="1664"
2469d="M1201 298q0 57 -5.5 107t-21 100.5t-39.5 86t-64 58t-91 22.5q-6 -4 -33.5 -20.5t-42.5 -24.5t-40.5 -20t-49 -17t-46.5 -5t-46.5 5t-49 17t-40.5 20t-42.5 24.5t-33.5 20.5q-51 0 -91 -22.5t-64 -58t-39.5 -86t-21 -100.5t-5.5 -107q0 -73 42 -121.5t103 -48.5h576
2470q61 0 103 48.5t42 121.5zM1028 892q0 108 -76.5 184t-183.5 76t-183.5 -76t-76.5 -184q0 -107 76.5 -183t183.5 -76t183.5 76t76.5 183zM1664 352v-192q0 -14 -9 -23t-23 -9h-96v-224q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v1472q0 66 47 113t113 47h1216
2471q66 0 113 -47t47 -113v-224h96q14 0 23 -9t9 -23v-192q0 -14 -9 -23t-23 -9h-96v-128h96q14 0 23 -9t9 -23v-192q0 -14 -9 -23t-23 -9h-96v-128h96q14 0 23 -9t9 -23z" />
2472 <glyph glyph-name="uniF2BA" unicode="&#xf2ba;" horiz-adv-x="1664"
2473d="M1028 892q0 -107 -76.5 -183t-183.5 -76t-183.5 76t-76.5 183q0 108 76.5 184t183.5 76t183.5 -76t76.5 -184zM980 672q46 0 82.5 -17t60 -47.5t39.5 -67t24 -81t11.5 -82.5t3.5 -79q0 -67 -39.5 -118.5t-105.5 -51.5h-576q-66 0 -105.5 51.5t-39.5 118.5q0 48 4.5 93.5
2474t18.5 98.5t36.5 91.5t63 64.5t93.5 26h5q7 -4 32 -19.5t35.5 -21t33 -17t37 -16t35 -9t39.5 -4.5t39.5 4.5t35 9t37 16t33 17t35.5 21t32 19.5zM1664 928q0 -13 -9.5 -22.5t-22.5 -9.5h-96v-128h96q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-96v-128h96
2475q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-96v-224q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v1472q0 66 47 113t113 47h1216q66 0 113 -47t47 -113v-224h96q13 0 22.5 -9.5t9.5 -22.5v-192zM1408 -96v1472q0 13 -9.5 22.5t-22.5 9.5h-1216
2476q-13 0 -22.5 -9.5t-9.5 -22.5v-1472q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5z" />
2477 <glyph glyph-name="uniF2BB" unicode="&#xf2bb;" horiz-adv-x="2048"
2478d="M1024 405q0 64 -9 117.5t-29.5 103t-60.5 78t-97 28.5q-6 -4 -30 -18t-37.5 -21.5t-35.5 -17.5t-43 -14.5t-42 -4.5t-42 4.5t-43 14.5t-35.5 17.5t-37.5 21.5t-30 18q-57 0 -97 -28.5t-60.5 -78t-29.5 -103t-9 -117.5t37 -106.5t91 -42.5h512q54 0 91 42.5t37 106.5z
2479M867 925q0 94 -66.5 160.5t-160.5 66.5t-160.5 -66.5t-66.5 -160.5t66.5 -160.5t160.5 -66.5t160.5 66.5t66.5 160.5zM1792 416v64q0 14 -9 23t-23 9h-576q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h576q14 0 23 9t9 23zM1792 676v56q0 15 -10.5 25.5t-25.5 10.5h-568
2480q-15 0 -25.5 -10.5t-10.5 -25.5v-56q0 -15 10.5 -25.5t25.5 -10.5h568q15 0 25.5 10.5t10.5 25.5zM1792 928v64q0 14 -9 23t-23 9h-576q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h576q14 0 23 9t9 23zM2048 1248v-1216q0 -66 -47 -113t-113 -47h-352v96q0 14 -9 23t-23 9
2481h-64q-14 0 -23 -9t-9 -23v-96h-768v96q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-96h-352q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1728q66 0 113 -47t47 -113z" />
2482 <glyph glyph-name="uniF2BC" unicode="&#xf2bc;" horiz-adv-x="2048"
2483d="M1024 405q0 -64 -37 -106.5t-91 -42.5h-512q-54 0 -91 42.5t-37 106.5t9 117.5t29.5 103t60.5 78t97 28.5q6 -4 30 -18t37.5 -21.5t35.5 -17.5t43 -14.5t42 -4.5t42 4.5t43 14.5t35.5 17.5t37.5 21.5t30 18q57 0 97 -28.5t60.5 -78t29.5 -103t9 -117.5zM867 925
2484q0 -94 -66.5 -160.5t-160.5 -66.5t-160.5 66.5t-66.5 160.5t66.5 160.5t160.5 66.5t160.5 -66.5t66.5 -160.5zM1792 480v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576q14 0 23 -9t9 -23zM1792 732v-56q0 -15 -10.5 -25.5t-25.5 -10.5h-568
2485q-15 0 -25.5 10.5t-10.5 25.5v56q0 15 10.5 25.5t25.5 10.5h568q15 0 25.5 -10.5t10.5 -25.5zM1792 992v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576q14 0 23 -9t9 -23zM1920 32v1216q0 13 -9.5 22.5t-22.5 9.5h-1728q-13 0 -22.5 -9.5
2486t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h352v96q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-96h768v96q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-96h352q13 0 22.5 9.5t9.5 22.5zM2048 1248v-1216q0 -66 -47 -113t-113 -47h-1728q-66 0 -113 47t-47 113v1216q0 66 47 113
2487t113 47h1728q66 0 113 -47t47 -113z" />
2488 <glyph glyph-name="uniF2BD" unicode="&#xf2bd;" horiz-adv-x="1792"
2489d="M1523 197q-22 155 -87.5 257.5t-184.5 118.5q-67 -74 -159.5 -115.5t-195.5 -41.5t-195.5 41.5t-159.5 115.5q-119 -16 -184.5 -118.5t-87.5 -257.5q106 -150 271 -237.5t356 -87.5t356 87.5t271 237.5zM1280 896q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5
2490t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1792 640q0 -182 -71 -347.5t-190.5 -286t-285.5 -191.5t-349 -71q-182 0 -348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
2491 <glyph glyph-name="uniF2BE" unicode="&#xf2be;" horiz-adv-x="1792"
2492d="M896 1536q182 0 348 -71t286 -191t191 -286t71 -348q0 -181 -70.5 -347t-190.5 -286t-286 -191.5t-349 -71.5t-349 71t-285.5 191.5t-190.5 286t-71 347.5t71 348t191 286t286 191t348 71zM1515 185q149 205 149 455q0 156 -61 298t-164 245t-245 164t-298 61t-298 -61
2493t-245 -164t-164 -245t-61 -298q0 -250 149 -455q66 327 306 327q131 -128 313 -128t313 128q240 0 306 -327zM1280 832q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5z" />
2494 <glyph glyph-name="uniF2C0" unicode="&#xf2c0;"
2495d="M1201 752q47 -14 89.5 -38t89 -73t79.5 -115.5t55 -172t22 -236.5q0 -154 -100 -263.5t-241 -109.5h-854q-141 0 -241 109.5t-100 263.5q0 131 22 236.5t55 172t79.5 115.5t89 73t89.5 38q-79 125 -79 272q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5
2496t198.5 -40.5t163.5 -109.5t109.5 -163.5t40.5 -198.5q0 -147 -79 -272zM768 1408q-159 0 -271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5zM1195 -128q88 0 150.5 71.5t62.5 173.5q0 239 -78.5 377t-225.5 145
2497q-145 -127 -336 -127t-336 127q-147 -7 -225.5 -145t-78.5 -377q0 -102 62.5 -173.5t150.5 -71.5h854z" />
2498 <glyph glyph-name="uniF2C1" unicode="&#xf2c1;" horiz-adv-x="1280"
2499d="M1024 278q0 -64 -37 -107t-91 -43h-512q-54 0 -91 43t-37 107t9 118t29.5 104t61 78.5t96.5 28.5q80 -75 188 -75t188 75q56 0 96.5 -28.5t61 -78.5t29.5 -104t9 -118zM870 797q0 -94 -67.5 -160.5t-162.5 -66.5t-162.5 66.5t-67.5 160.5t67.5 160.5t162.5 66.5
2500t162.5 -66.5t67.5 -160.5zM1152 -96v1376h-1024v-1376q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1280 1376v-1472q0 -66 -47 -113t-113 -47h-960q-66 0 -113 47t-47 113v1472q0 66 47 113t113 47h352v-96q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v96h352
2501q66 0 113 -47t47 -113z" />
2502 <glyph glyph-name="uniF2C2" unicode="&#xf2c2;" horiz-adv-x="2048"
2503d="M896 324q0 54 -7.5 100.5t-24.5 90t-51 68.5t-81 25q-64 -64 -156 -64t-156 64q-47 0 -81 -25t-51 -68.5t-24.5 -90t-7.5 -100.5q0 -55 31.5 -93.5t75.5 -38.5h426q44 0 75.5 38.5t31.5 93.5zM768 768q0 80 -56 136t-136 56t-136 -56t-56 -136t56 -136t136 -56t136 56
2504t56 136zM1792 288v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1408 544v64q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1792 544v64q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23
2505v-64q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1792 800v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM128 1152h1792v96q0 14 -9 23t-23 9h-1728q-14 0 -23 -9t-9 -23v-96zM2048 1248v-1216q0 -66 -47 -113t-113 -47h-1728
2506q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1728q66 0 113 -47t47 -113z" />
2507 <glyph glyph-name="uniF2C3" unicode="&#xf2c3;" horiz-adv-x="2048"
2508d="M896 324q0 -55 -31.5 -93.5t-75.5 -38.5h-426q-44 0 -75.5 38.5t-31.5 93.5q0 54 7.5 100.5t24.5 90t51 68.5t81 25q64 -64 156 -64t156 64q47 0 81 -25t51 -68.5t24.5 -90t7.5 -100.5zM768 768q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136z
2509M1792 352v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23 -9t9 -23zM1408 608v-64q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h320q14 0 23 -9t9 -23zM1792 608v-64q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v64
2510q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 864v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23 -9t9 -23zM1920 32v1120h-1792v-1120q0 -13 9.5 -22.5t22.5 -9.5h1728q13 0 22.5 9.5t9.5 22.5zM2048 1248v-1216q0 -66 -47 -113t-113 -47
2511h-1728q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1728q66 0 113 -47t47 -113z" />
2512 <glyph glyph-name="uniF2C4" unicode="&#xf2c4;" horiz-adv-x="1792"
2513d="M1255 749q0 318 -105 474.5t-330 156.5q-222 0 -326 -157t-104 -474q0 -316 104 -471.5t326 -155.5q74 0 131 17q-22 43 -39 73t-44 65t-53.5 56.5t-63 36t-77.5 14.5q-46 0 -79 -16l-49 97q105 91 276 91q132 0 215.5 -54t150.5 -155q67 149 67 402zM1645 117h117
2514q3 -27 -2 -67t-26.5 -95t-58 -100.5t-107 -78t-162.5 -32.5q-71 0 -130.5 19t-105.5 56t-79 78t-66 96q-97 -27 -205 -27q-150 0 -292.5 58t-253 158.5t-178 249t-67.5 317.5q0 170 67.5 319.5t178.5 250.5t253.5 159t291.5 58q121 0 238.5 -36t217 -106t176 -164.5
2515t119.5 -219t43 -261.5q0 -190 -80.5 -347.5t-218.5 -264.5q47 -70 93.5 -106.5t104.5 -36.5q61 0 94 37.5t38 85.5z" />
2516 <glyph glyph-name="uniF2C5" unicode="&#xf2c5;" horiz-adv-x="2304"
2517d="M453 -101q0 -21 -16 -37.5t-37 -16.5q-1 0 -13 3q-63 15 -162 140q-225 284 -225 676q0 341 213 614q39 51 95 103.5t94 52.5q19 0 35 -13.5t16 -32.5q0 -27 -63 -90q-98 -102 -147 -184q-119 -199 -119 -449q0 -281 123 -491q50 -85 136 -173q2 -3 14.5 -16t19.5 -21
2518t17 -20.5t14.5 -23.5t4.5 -21zM1796 33q0 -29 -17.5 -48.5t-46.5 -19.5h-1081q-26 0 -45 19t-19 45q0 29 17.5 48.5t46.5 19.5h1081q26 0 45 -19t19 -45zM1581 644q0 -134 -67 -233q-25 -38 -69.5 -78.5t-83.5 -60.5q-16 -10 -27 -10q-7 0 -15 6t-8 12q0 9 19 30t42 46
2519t42 67.5t19 88.5q0 76 -35 130q-29 42 -46 42q-3 0 -3 -5q0 -12 7.5 -35.5t7.5 -36.5q0 -22 -21.5 -35t-44.5 -13q-66 0 -66 76q0 15 1.5 44t1.5 44q0 25 -10 46q-13 25 -42 53.5t-51 28.5q-5 0 -7 -0.5t-3.5 -2.5t-1.5 -6q0 -2 16 -26t16 -54q0 -37 -19 -68t-46 -54
2520t-53.5 -46t-45.5 -54t-19 -68q0 -98 42 -160q29 -43 79 -63q16 -5 17 -10q1 -2 1 -5q0 -16 -18 -16q-6 0 -33 11q-119 43 -195 139.5t-76 218.5q0 55 24.5 115.5t60 115t70.5 108.5t59.5 113.5t24.5 111.5q0 53 -25 94q-29 48 -56 64q-19 9 -19 21q0 20 41 20q50 0 110 -29
2521q41 -19 71 -44.5t49.5 -51t33.5 -62.5t22 -69t16 -80q0 -1 3 -17.5t4.5 -25t5.5 -25t9 -27t11 -21.5t14.5 -16.5t18.5 -5.5q23 0 37 14t14 37q0 25 -20 67t-20 52t10 10q27 0 93 -70q72 -76 102.5 -156t30.5 -186zM2304 615q0 -274 -138 -503q-19 -32 -48 -72t-68 -86.5
2522t-81 -77t-74 -30.5q-16 0 -31 15.5t-15 31.5q0 15 29 50.5t68.5 77t48.5 52.5q183 230 183 531q0 131 -20.5 235t-72.5 211q-58 119 -163 228q-2 3 -13 13.5t-16.5 16.5t-15 17.5t-15 20t-9.5 18.5t-4 19q0 19 16 35.5t35 16.5q70 0 196 -169q98 -131 146 -273t60 -314
2523q2 -42 2 -64z" />
2524 <glyph glyph-name="uniF2C6" unicode="&#xf2c6;" horiz-adv-x="1792"
2525d="M1189 229l147 693q9 44 -10.5 63t-51.5 7l-864 -333q-29 -11 -39.5 -25t-2.5 -26.5t32 -19.5l221 -69l513 323q21 14 32 6q7 -5 -4 -15l-415 -375v0v0l-16 -228q23 0 45 22l108 104l224 -165q64 -36 81 38zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71
2526t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
2527 <glyph glyph-name="uniF2C7" unicode="&#xf2c7;" horiz-adv-x="1024"
2528d="M640 192q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 60 35 110t93 71v907h128v-907q58 -21 93 -71t35 -110zM768 192q0 77 -34 144t-94 112v768q0 80 -56 136t-136 56t-136 -56t-56 -136v-768q-60 -45 -94 -112t-34 -144q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5
2529t93.5 226.5zM896 192q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 182 128 313v711q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5v-711q128 -131 128 -313zM1024 768v-128h-192v128h192zM1024 1024v-128h-192v128h192zM1024 1280v-128h-192
2530v128h192z" />
2531 <glyph glyph-name="uniF2C8" unicode="&#xf2c8;" horiz-adv-x="1024"
2532d="M640 192q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 60 35 110t93 71v651h128v-651q58 -21 93 -71t35 -110zM768 192q0 77 -34 144t-94 112v768q0 80 -56 136t-136 56t-136 -56t-56 -136v-768q-60 -45 -94 -112t-34 -144q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5
2533t93.5 226.5zM896 192q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 182 128 313v711q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5v-711q128 -131 128 -313zM1024 768v-128h-192v128h192zM1024 1024v-128h-192v128h192zM1024 1280v-128h-192
2534v128h192z" />
2535 <glyph glyph-name="uniF2C9" unicode="&#xf2c9;" horiz-adv-x="1024"
2536d="M640 192q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 60 35 110t93 71v395h128v-395q58 -21 93 -71t35 -110zM768 192q0 77 -34 144t-94 112v768q0 80 -56 136t-136 56t-136 -56t-56 -136v-768q-60 -45 -94 -112t-34 -144q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5
2537t93.5 226.5zM896 192q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 182 128 313v711q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5v-711q128 -131 128 -313zM1024 768v-128h-192v128h192zM1024 1024v-128h-192v128h192zM1024 1280v-128h-192
2538v128h192z" />
2539 <glyph glyph-name="uniF2CA" unicode="&#xf2ca;" horiz-adv-x="1024"
2540d="M640 192q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 60 35 110t93 71v139h128v-139q58 -21 93 -71t35 -110zM768 192q0 77 -34 144t-94 112v768q0 80 -56 136t-136 56t-136 -56t-56 -136v-768q-60 -45 -94 -112t-34 -144q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5
2541t93.5 226.5zM896 192q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 182 128 313v711q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5v-711q128 -131 128 -313zM1024 768v-128h-192v128h192zM1024 1024v-128h-192v128h192zM1024 1280v-128h-192
2542v128h192z" />
2543 <glyph glyph-name="uniF2CB" unicode="&#xf2cb;" horiz-adv-x="1024"
2544d="M640 192q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 79 56 135.5t136 56.5t136 -56.5t56 -135.5zM768 192q0 77 -34 144t-94 112v768q0 80 -56 136t-136 56t-136 -56t-56 -136v-768q-60 -45 -94 -112t-34 -144q0 -133 93.5 -226.5t226.5 -93.5t226.5 93.5t93.5 226.5z
2545M896 192q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 182 128 313v711q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5v-711q128 -131 128 -313zM1024 768v-128h-192v128h192zM1024 1024v-128h-192v128h192zM1024 1280v-128h-192v128h192z" />
2546 <glyph glyph-name="uniF2CC" unicode="&#xf2cc;" horiz-adv-x="1920"
2547d="M1433 1287q10 -10 10 -23t-10 -23l-626 -626q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l44 44q-72 91 -81.5 207t46.5 215q-74 71 -176 71q-106 0 -181 -75t-75 -181v-1280h-256v1280q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5q106 0 201 -41
2548t166 -115q94 39 197 24.5t185 -79.5l44 44q10 10 23 10t23 -10zM1344 1024q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1600 896q-26 0 -45 19t-19 45t19 45t45 19t45 -19t19 -45t-19 -45t-45 -19zM1856 1024q26 0 45 -19t19 -45t-19 -45t-45 -19
2549t-45 19t-19 45t19 45t45 19zM1216 896q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1408 832q0 26 19 45t45 19t45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45zM1728 896q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1088 768
2550q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1344 640q-26 0 -45 19t-19 45t19 45t45 19t45 -19t19 -45t-19 -45t-45 -19zM1600 768q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1216 512q-26 0 -45 19t-19 45t19 45t45 19t45 -19
2551t19 -45t-19 -45t-45 -19zM1472 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1088 512q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1344 512q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1216 384
2552q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1088 256q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19z" />
2553 <glyph glyph-name="uniF2CD" unicode="&#xf2cd;" horiz-adv-x="1792"
2554d="M1664 448v-192q0 -169 -128 -286v-194q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v118q-63 -22 -128 -22h-768q-65 0 -128 22v-110q0 -17 -9.5 -28.5t-22.5 -11.5h-64q-13 0 -22.5 11.5t-9.5 28.5v186q-128 117 -128 286v192h1536zM704 864q0 -14 -9 -23t-23 -9t-23 9
2555t-9 23t9 23t23 9t23 -9t9 -23zM768 928q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM704 992q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM832 992q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM768 1056q0 -14 -9 -23t-23 -9t-23 9
2556t-9 23t9 23t23 9t23 -9t9 -23zM704 1120q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM1792 608v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v640q0 106 75 181t181 75q108 0 184 -78q46 19 98 12t93 -39l22 22q11 11 22 0l42 -42
2557q11 -11 0 -22l-314 -314q-11 -11 -22 0l-42 42q-11 11 0 22l22 22q-36 46 -40.5 104t23.5 108q-37 35 -88 35q-53 0 -90.5 -37.5t-37.5 -90.5v-640h1504q14 0 23 -9t9 -23zM896 1056q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM832 1120q0 -14 -9 -23t-23 -9
2558t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM768 1184q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM960 1120q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM896 1184q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM832 1248q0 -14 -9 -23
2559t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM1024 1184q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM960 1248q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23zM1088 1248q0 -14 -9 -23t-23 -9t-23 9t-9 23t9 23t23 9t23 -9t9 -23z" />
2560 <glyph glyph-name="uniF2CE" unicode="&#xf2ce;"
2561d="M994 344q0 -86 -17 -197q-31 -215 -55 -313q-22 -90 -152 -90t-152 90q-24 98 -55 313q-17 110 -17 197q0 168 224 168t224 -168zM1536 768q0 -240 -134 -434t-350 -280q-8 -3 -15 3t-6 15q7 48 10 66q4 32 6 47q1 9 9 12q159 81 255.5 234t96.5 337q0 180 -91 330.5
2562t-247 234.5t-337 74q-124 -7 -237 -61t-193.5 -140.5t-128 -202t-46.5 -240.5q1 -184 99 -336.5t257 -231.5q7 -3 9 -12q3 -21 6 -45q1 -9 5 -32.5t6 -35.5q1 -9 -6.5 -15t-15.5 -2q-148 58 -261 169.5t-173.5 264t-52.5 319.5q7 143 66 273.5t154.5 227t225 157.5t272.5 70
2563q164 10 315.5 -46.5t261 -160.5t175 -250.5t65.5 -308.5zM994 800q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5zM1282 768q0 -122 -53.5 -228.5t-146.5 -177.5q-8 -6 -16 -2t-10 14q-6 52 -29 92q-7 10 3 20
2564q58 54 91 127t33 155q0 111 -58.5 204t-157.5 141.5t-212 36.5q-133 -15 -229 -113t-109 -231q-10 -92 23.5 -176t98.5 -144q10 -10 3 -20q-24 -41 -29 -93q-2 -9 -10 -13t-16 2q-95 74 -148.5 183t-51.5 234q3 131 69 244t177 181.5t241 74.5q144 7 268 -60t196.5 -187.5
2565t72.5 -263.5z" />
2566 <glyph glyph-name="uniF2D0" unicode="&#xf2d0;" horiz-adv-x="1792"
2567d="M256 128h1280v768h-1280v-768zM1792 1248v-1216q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
2568 <glyph glyph-name="uniF2D1" unicode="&#xf2d1;" horiz-adv-x="1792"
2569d="M1792 224v-192q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
2570 <glyph glyph-name="uniF2D2" unicode="&#xf2d2;" horiz-adv-x="2048"
2571d="M256 0h768v512h-768v-512zM1280 512h512v768h-768v-256h96q66 0 113 -47t47 -113v-352zM2048 1376v-960q0 -66 -47 -113t-113 -47h-608v-352q0 -66 -47 -113t-113 -47h-960q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h608v352q0 66 47 113t113 47h960q66 0 113 -47
2572t47 -113z" />
2573 <glyph glyph-name="uniF2D3" unicode="&#xf2d3;" horiz-adv-x="1792"
2574d="M1175 215l146 146q10 10 10 23t-10 23l-233 233l233 233q10 10 10 23t-10 23l-146 146q-10 10 -23 10t-23 -10l-233 -233l-233 233q-10 10 -23 10t-23 -10l-146 -146q-10 -10 -10 -23t10 -23l233 -233l-233 -233q-10 -10 -10 -23t10 -23l146 -146q10 -10 23 -10t23 10
2575l233 233l233 -233q10 -10 23 -10t23 10zM1792 1248v-1216q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
2576 <glyph glyph-name="uniF2D4" unicode="&#xf2d4;" horiz-adv-x="1792"
2577d="M1257 425l-146 -146q-10 -10 -23 -10t-23 10l-169 169l-169 -169q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l169 169l-169 169q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l169 -169l169 169q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23
2578l-169 -169l169 -169q10 -10 10 -23t-10 -23zM256 128h1280v1024h-1280v-1024zM1792 1248v-1216q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
2579 <glyph glyph-name="uniF2D5" unicode="&#xf2d5;" horiz-adv-x="1792"
2580d="M1070 358l306 564h-654l-306 -564h654zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
2581 <glyph glyph-name="uniF2D6" unicode="&#xf2d6;" horiz-adv-x="1794"
2582d="M1291 1060q-15 17 -35 8.5t-26 -28.5t5 -38q14 -17 40 -14.5t34 20.5t-18 52zM895 814q-8 -8 -19.5 -8t-18.5 8q-8 8 -8 19t8 18q7 8 18.5 8t19.5 -8q7 -7 7 -18t-7 -19zM1060 740l-35 -35q-12 -13 -29.5 -13t-30.5 13l-38 38q-12 13 -12 30t12 30l35 35q12 12 29.5 12
2583t30.5 -12l38 -39q12 -12 12 -29.5t-12 -29.5zM951 870q-7 -8 -18.5 -8t-19.5 8q-7 8 -7 19t7 19q8 8 19 8t19 -8t8 -19t-8 -19zM1354 968q-34 -64 -107.5 -85.5t-127.5 16.5q-38 28 -61 66.5t-21 87.5t39 92t75.5 53t70.5 -5t70 -51q2 -2 13 -12.5t14.5 -13.5t13 -13.5
2584t12.5 -15.5t10 -15.5t8.5 -18t4 -18.5t1 -21t-5 -22t-9.5 -24zM1555 486q3 20 -8.5 34.5t-27.5 21.5t-33 17t-23 20q-40 71 -84 98.5t-113 11.5q19 13 40 18.5t33 4.5l12 -1q2 45 -34 90q6 20 6.5 40.5t-2.5 30.5l-3 10q43 24 71 65t34 91q10 84 -43 150.5t-137 76.5
2585q-60 7 -114 -18.5t-82 -74.5q-30 -51 -33.5 -101t14.5 -87t43.5 -64t56.5 -42q-45 4 -88 36t-57 88q-28 108 32 222q-16 21 -29 32q-50 0 -89 -19q19 24 42 37t36 14l13 1q0 50 -13 78q-10 21 -32.5 28.5t-47 -3.5t-37.5 -40q2 4 4 7q-7 -28 -6.5 -75.5t19 -117t48.5 -122.5
2586q-25 -14 -47 -36q-35 -16 -85.5 -70.5t-84.5 -101.5l-33 -46q-90 -34 -181 -125.5t-75 -162.5q1 -16 11 -27q-15 -12 -30 -30q-21 -25 -21 -54t21.5 -40t63.5 6q41 19 77 49.5t55 60.5q-2 2 -6.5 5t-20.5 7.5t-33 3.5q23 5 51 12.5t40 10t27.5 6t26 4t23.5 0.5q14 -7 22 34
2587q7 37 7 90q0 102 -40 150q106 -103 101 -219q-1 -29 -15 -50t-27 -27l-13 -6q-4 -7 -19 -32t-26 -45.5t-26.5 -52t-25 -61t-17 -63t-6.5 -66.5t10 -63q-35 54 -37 80q-22 -24 -34.5 -39t-33.5 -42t-30.5 -46t-16.5 -41t-0.5 -38t25.5 -27q45 -25 144 64t190.5 221.5
2588t122.5 228.5q86 52 145 115.5t86 119.5q47 -93 154 -178q104 -83 167 -80q39 2 46 43zM1794 640q0 -182 -71 -348t-191 -286t-286.5 -191t-348.5 -71t-348.5 71t-286.5 191t-191 286t-71 348t71 348t191 286t286.5 191t348.5 71t348.5 -71t286.5 -191t191 -286t71 -348z" />
2589 <glyph glyph-name="uniF2D7" unicode="&#xf2d7;"
2590d="M518 1353v-655q103 -1 191.5 1.5t125.5 5.5l37 3q68 2 90.5 24.5t39.5 94.5l33 142h103l-14 -322l7 -319h-103l-29 127q-15 68 -45 93t-84 26q-87 8 -352 8v-556q0 -78 43.5 -115.5t133.5 -37.5h357q35 0 59.5 2t55 7.5t54 18t48.5 32t46 50.5t39 73l93 216h89
2591q-6 -37 -31.5 -252t-30.5 -276q-146 5 -263.5 8t-162.5 4h-44h-628l-376 -12v102l127 25q67 13 91.5 37t25.5 79l8 643q3 402 -8 645q-2 61 -25.5 84t-91.5 36l-127 24v102l376 -12h702q139 0 374 27q-6 -68 -14 -194.5t-12 -219.5l-5 -92h-93l-32 124q-31 121 -74 179.5
2592t-113 58.5h-548q-28 0 -35.5 -8.5t-7.5 -30.5z" />
2593 <glyph glyph-name="uniF2D8" unicode="&#xf2d8;"
2594d="M922 739v-182q0 -4 0.5 -15t0 -15l-1.5 -12t-3.5 -11.5t-6.5 -7.5t-11 -5.5t-16 -1.5v309q9 0 16 -1t11 -5t6.5 -5.5t3.5 -9.5t1 -10.5v-13.5v-14zM1238 643v-121q0 -1 0.5 -12.5t0 -15.5t-2.5 -11.5t-7.5 -10.5t-13.5 -3q-9 0 -14 9q-4 10 -4 165v7v8.5v9t1.5 8.5l3.5 7
2595t5 5.5t8 1.5q6 0 10 -1.5t6.5 -4.5t4 -6t2 -8.5t0.5 -8v-9.5v-9zM180 407h122v472h-122v-472zM614 407h106v472h-159l-28 -221q-20 148 -32 221h-158v-472h107v312l45 -312h76l43 319v-319zM1039 712q0 67 -5 90q-3 16 -11 28.5t-17 20.5t-25 14t-26.5 8.5t-31 4t-29 1.5
2596h-29.5h-12h-91v-472h56q169 -1 197 24.5t25 180.5q-1 62 -1 100zM1356 515v133q0 29 -2 45t-9.5 33.5t-24.5 25t-46 7.5q-46 0 -77 -34v154h-117v-472h110l7 30q30 -36 77 -36q50 0 66 30.5t16 83.5zM1536 1248v-1216q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113
2597v1216q0 66 47 113t113 47h1216q66 0 113 -47t47 -113z" />
2598 <glyph glyph-name="uniF2D9" unicode="&#xf2d9;" horiz-adv-x="2176"
2599d="M1143 -197q-6 1 -11 4q-13 8 -36 23t-86 65t-116.5 104.5t-112 140t-89.5 172.5q-17 3 -175 37q66 -213 235 -362t391 -184zM502 409l168 -28q-25 76 -41 167.5t-19 145.5l-4 53q-84 -82 -121 -224q5 -65 17 -114zM612 1018q-43 -64 -77 -148q44 46 74 68zM2049 584
2600q0 161 -62 307t-167.5 252t-250.5 168.5t-304 62.5q-147 0 -281 -52.5t-240 -148.5q-30 -58 -45 -160q60 51 143 83.5t158.5 43t143 13.5t108.5 -1l40 -3q33 -1 53 -15.5t24.5 -33t6.5 -37t-1 -28.5q-126 11 -227.5 0.5t-183 -43.5t-142.5 -71.5t-131 -98.5
2601q4 -36 11.5 -92.5t35.5 -178t62 -179.5q123 -6 247.5 14.5t214.5 53.5t162.5 67t109.5 59l37 24q22 16 39.5 20.5t30.5 -5t17 -34.5q14 -97 -39 -121q-208 -97 -467 -134q-135 -20 -317 -16q41 -96 110 -176.5t137 -127t130.5 -79t101.5 -43.5l39 -12q143 -23 263 15
2602q195 99 314 289t119 418zM2123 621q-14 -135 -40 -212q-70 -208 -181.5 -346.5t-318.5 -253.5q-48 -33 -82 -44q-72 -26 -163 -16q-36 -3 -73 -3q-283 0 -504.5 173t-295.5 442q-1 0 -4 0.5t-5 0.5q-6 -50 2.5 -112.5t26 -115t36 -98t31.5 -71.5l14 -26q8 -12 54 -82
2603q-71 38 -124.5 106.5t-78.5 140t-39.5 137t-17.5 107.5l-2 42q-5 2 -33.5 12.5t-48.5 18t-53 20.5t-57.5 25t-50 25.5t-42.5 27t-25 25.5q19 -10 50.5 -25.5t113 -45.5t145.5 -38l2 32q11 149 94 290q41 202 176 365q28 115 81 214q15 28 32 45t49 32q158 74 303.5 104
2604t302 11t306.5 -97q220 -115 333 -336t87 -474z" />
2605 <glyph glyph-name="uniF2DA" unicode="&#xf2da;" horiz-adv-x="1792"
2606d="M1341 752q29 44 -6.5 129.5t-121.5 142.5q-58 39 -125.5 53.5t-118 4.5t-68.5 -37q-12 -23 -4.5 -28t42.5 -10q23 -3 38.5 -5t44.5 -9.5t56 -17.5q36 -13 67.5 -31.5t53 -37t40 -38.5t30.5 -38t22 -34.5t16.5 -28.5t12 -18.5t10.5 -6t11 9.5zM1704 178
2607q-52 -127 -148.5 -220t-214.5 -141.5t-253 -60.5t-266 13.5t-251 91t-210 161.5t-141.5 235.5t-46.5 303.5q1 41 8.5 84.5t12.5 64t24 80.5t23 73q-51 -208 1 -397t173 -318t291 -206t346 -83t349 74.5t289 244.5q20 27 18 14q0 -4 -4 -14zM1465 627q0 -104 -40.5 -199
2608t-108.5 -164t-162 -109.5t-198 -40.5t-198 40.5t-162 109.5t-108.5 164t-40.5 199t40.5 199t108.5 164t162 109.5t198 40.5t198 -40.5t162 -109.5t108.5 -164t40.5 -199zM1752 915q-65 147 -180.5 251t-253 153.5t-292 53.5t-301 -36.5t-275.5 -129t-220 -211.5t-131 -297
2609t-10 -373q-49 161 -51.5 311.5t35.5 272.5t109 227t165.5 180.5t207 126t232 71t242.5 9t236 -54t216 -124.5t178 -197q33 -50 62 -121t31 -112zM1690 573q12 244 -136.5 416t-396.5 240q-8 0 -10 5t24 8q125 -4 230 -50t173 -120t116 -168.5t58.5 -199t-1 -208
2610t-61.5 -197.5t-122.5 -167t-185 -117.5t-248.5 -46.5q108 30 201.5 80t174 123t129.5 176.5t55 225.5z" />
2611 <glyph glyph-name="uniF2DB" unicode="&#xf2db;"
2612d="M192 256v-128h-112q-16 0 -16 16v16h-48q-16 0 -16 16v32q0 16 16 16h48v16q0 16 16 16h112zM192 512v-128h-112q-16 0 -16 16v16h-48q-16 0 -16 16v32q0 16 16 16h48v16q0 16 16 16h112zM192 768v-128h-112q-16 0 -16 16v16h-48q-16 0 -16 16v32q0 16 16 16h48v16
2613q0 16 16 16h112zM192 1024v-128h-112q-16 0 -16 16v16h-48q-16 0 -16 16v32q0 16 16 16h48v16q0 16 16 16h112zM192 1280v-128h-112q-16 0 -16 16v16h-48q-16 0 -16 16v32q0 16 16 16h48v16q0 16 16 16h112zM1280 1440v-1472q0 -40 -28 -68t-68 -28h-832q-40 0 -68 28
2614t-28 68v1472q0 40 28 68t68 28h832q40 0 68 -28t28 -68zM1536 208v-32q0 -16 -16 -16h-48v-16q0 -16 -16 -16h-112v128h112q16 0 16 -16v-16h48q16 0 16 -16zM1536 464v-32q0 -16 -16 -16h-48v-16q0 -16 -16 -16h-112v128h112q16 0 16 -16v-16h48q16 0 16 -16zM1536 720v-32
2615q0 -16 -16 -16h-48v-16q0 -16 -16 -16h-112v128h112q16 0 16 -16v-16h48q16 0 16 -16zM1536 976v-32q0 -16 -16 -16h-48v-16q0 -16 -16 -16h-112v128h112q16 0 16 -16v-16h48q16 0 16 -16zM1536 1232v-32q0 -16 -16 -16h-48v-16q0 -16 -16 -16h-112v128h112q16 0 16 -16v-16
2616h48q16 0 16 -16z" />
2617 <glyph glyph-name="uniF2DC" unicode="&#xf2dc;" horiz-adv-x="1664"
2618d="M1566 419l-167 -33l186 -107q23 -13 29.5 -38.5t-6.5 -48.5q-14 -23 -39 -29.5t-48 6.5l-186 106l55 -160q13 -38 -12 -63.5t-60.5 -20.5t-48.5 42l-102 300l-271 156v-313l208 -238q16 -18 17 -39t-11 -36.5t-28.5 -25t-37 -5.5t-36.5 22l-112 128v-214q0 -26 -19 -45
2619t-45 -19t-45 19t-19 45v214l-112 -128q-16 -18 -36.5 -22t-37 5.5t-28.5 25t-11 36.5t17 39l208 238v313l-271 -156l-102 -300q-13 -37 -48.5 -42t-60.5 20.5t-12 63.5l55 160l-186 -106q-23 -13 -48 -6.5t-39 29.5q-13 23 -6.5 48.5t29.5 38.5l186 107l-167 33
2620q-29 6 -42 29t-8.5 46.5t25.5 40t50 10.5l310 -62l271 157l-271 157l-310 -62q-4 -1 -13 -1q-27 0 -44 18t-19 40t11 43t40 26l167 33l-186 107q-23 13 -29.5 38.5t6.5 48.5t39 30t48 -7l186 -106l-55 160q-13 38 12 63.5t60.5 20.5t48.5 -42l102 -300l271 -156v313
2621l-208 238q-16 18 -17 39t11 36.5t28.5 25t37 5.5t36.5 -22l112 -128v214q0 26 19 45t45 19t45 -19t19 -45v-214l112 128q16 18 36.5 22t37 -5.5t28.5 -25t11 -36.5t-17 -39l-208 -238v-313l271 156l102 300q13 37 48.5 42t60.5 -20.5t12 -63.5l-55 -160l186 106
2622q23 13 48 6.5t39 -29.5q13 -23 6.5 -48.5t-29.5 -38.5l-186 -107l167 -33q27 -5 40 -26t11 -43t-19 -40t-44 -18q-9 0 -13 1l-310 62l-271 -157l271 -157l310 62q29 6 50 -10.5t25.5 -40t-8.5 -46.5t-42 -29z" />
2623 <glyph glyph-name="uniF2DD" unicode="&#xf2dd;" horiz-adv-x="1792"
2624d="M1473 607q7 118 -33 226.5t-113 189t-177 131t-221 57.5q-116 7 -225.5 -32t-192 -110.5t-135 -175t-59.5 -220.5q-7 -118 33 -226.5t113 -189t177.5 -131t221.5 -57.5q155 -9 293 59t224 195.5t94 283.5zM1792 1536l-349 -348q120 -117 180.5 -272t50.5 -321
2625q-11 -183 -102 -339t-241 -255.5t-332 -124.5l-999 -132l347 347q-120 116 -180.5 271.5t-50.5 321.5q11 184 102 340t241.5 255.5t332.5 124.5q167 22 500 66t500 66z" />
2626 <glyph glyph-name="uniF2DE" unicode="&#xf2de;" horiz-adv-x="1792"
2627d="M948 508l163 -329h-51l-175 350l-171 -350h-49l179 374l-78 33l21 49l240 -102l-21 -50zM563 1100l304 -130l-130 -304l-304 130zM907 915l240 -103l-103 -239l-239 102zM1188 765l191 -81l-82 -190l-190 81zM1680 640q0 159 -62 304t-167.5 250.5t-250.5 167.5t-304 62
2628t-304 -62t-250.5 -167.5t-167.5 -250.5t-62 -304t62 -304t167.5 -250.5t250.5 -167.5t304 -62t304 62t250.5 167.5t167.5 250.5t62 304zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71
2629t286 -191t191 -286t71 -348z" />
2630 <glyph glyph-name="uniF2E0" unicode="&#xf2e0;" horiz-adv-x="1920"
2631d="M1334 302q-4 24 -27.5 34t-49.5 10.5t-48.5 12.5t-25.5 38q-5 47 33 139.5t75 181t32 127.5q-14 101 -117 103q-45 1 -75 -16l-3 -2l-5 -2.5t-4.5 -2t-5 -2t-5 -0.5t-6 1.5t-6 3.5t-6.5 5q-3 2 -9 8.5t-9 9t-8.5 7.5t-9.5 7.5t-9.5 5.5t-11 4.5t-11.5 2.5q-30 5 -48 -3
2632t-45 -31q-1 -1 -9 -8.5t-12.5 -11t-15 -10t-16.5 -5.5t-17 3q-54 27 -84 40q-41 18 -94 -5t-76 -65q-16 -28 -41 -98.5t-43.5 -132.5t-40 -134t-21.5 -73q-22 -69 18.5 -119t110.5 -46q30 2 50.5 15t38.5 46q7 13 79 199.5t77 194.5q6 11 21.5 18t29.5 0q27 -15 21 -53
2633q-2 -18 -51 -139.5t-50 -132.5q-6 -38 19.5 -56.5t60.5 -7t55 49.5q4 8 45.5 92t81.5 163.5t46 88.5q20 29 41 28q29 0 25 -38q-2 -16 -65.5 -147.5t-70.5 -159.5q-12 -53 13 -103t74 -74q17 -9 51 -15.5t71.5 -8t62.5 14t20 48.5zM383 86q3 -15 -5 -27.5t-23 -15.5
2634q-14 -3 -26.5 5t-15.5 23q-3 14 5 27t22 16t27 -5t16 -23zM953 -177q12 -17 8.5 -37.5t-20.5 -32.5t-37.5 -8t-32.5 21q-11 17 -7.5 37.5t20.5 32.5t37.5 8t31.5 -21zM177 635q-18 -27 -49.5 -33t-57.5 13q-26 18 -32 50t12 58q18 27 49.5 33t57.5 -12q26 -19 32 -50.5
2635t-12 -58.5zM1467 -42q19 -28 13 -61.5t-34 -52.5t-60.5 -13t-51.5 34t-13 61t33 53q28 19 60.5 13t52.5 -34zM1579 562q69 -113 42.5 -244.5t-134.5 -207.5q-90 -63 -199 -60q-20 -80 -84.5 -127t-143.5 -44.5t-140 57.5q-12 -9 -13 -10q-103 -71 -225 -48.5t-193 126.5
2636q-50 73 -53 164q-83 14 -142.5 70.5t-80.5 128t-2 152t81 138.5q-36 60 -38 128t24.5 125t79.5 98.5t121 50.5q32 85 99 148t146.5 91.5t168 17t159.5 -66.5q72 21 140 17.5t128.5 -36t104.5 -80t67.5 -115t17.5 -140.5q52 -16 87 -57t45.5 -89t-5.5 -99.5t-58 -87.5z
2637M455 1222q14 -20 9.5 -44.5t-24.5 -38.5q-19 -14 -43.5 -9.5t-37.5 24.5q-14 20 -9.5 44.5t24.5 38.5q19 14 43.5 9.5t37.5 -24.5zM614 1503q4 -16 -5 -30.5t-26 -18.5t-31 5.5t-18 26.5q-3 17 6.5 31t25.5 18q17 4 31 -5.5t17 -26.5zM1800 555q4 -20 -6.5 -37t-30.5 -21
2638q-19 -4 -36 6.5t-21 30.5t6.5 37t30.5 22q20 4 36.5 -7.5t20.5 -30.5zM1136 1448q16 -27 8.5 -58.5t-35.5 -47.5q-27 -16 -57.5 -8.5t-46.5 34.5q-16 28 -8.5 59t34.5 48t58 9t47 -36zM1882 792q4 -15 -4 -27.5t-23 -16.5q-15 -3 -27.5 5.5t-15.5 22.5q-3 15 5 28t23 16
2639q14 3 26.5 -5t15.5 -23zM1691 1033q15 -22 10.5 -49t-26.5 -43q-22 -15 -49 -10t-42 27t-10 49t27 43t48.5 11t41.5 -28z" />
2640 <glyph glyph-name="uniF2E1" unicode="&#xf2e1;" horiz-adv-x="1792"
2641 />
2642 <glyph glyph-name="uniF2E2" unicode="&#xf2e2;" horiz-adv-x="1792"
2643 />
2644 <glyph glyph-name="uniF2E3" unicode="&#xf2e3;" horiz-adv-x="1792"
2645 />
2646 <glyph glyph-name="uniF2E4" unicode="&#xf2e4;" horiz-adv-x="1792"
2647 />
2648 <glyph glyph-name="uniF2E5" unicode="&#xf2e5;" horiz-adv-x="1792"
2649 />
2650 <glyph glyph-name="uniF2E6" unicode="&#xf2e6;" horiz-adv-x="1792"
2651 />
2652 <glyph glyph-name="uniF2E7" unicode="&#xf2e7;" horiz-adv-x="1792"
2653 />
2654 <glyph glyph-name="_698" unicode="&#xf2e8;" horiz-adv-x="1792"
2655 />
2656 <glyph glyph-name="uniF2E9" unicode="&#xf2e9;" horiz-adv-x="1792"
2657 />
2658 <glyph glyph-name="uniF2EA" unicode="&#xf2ea;" horiz-adv-x="1792"
2659 />
2660 <glyph glyph-name="uniF2EB" unicode="&#xf2eb;" horiz-adv-x="1792"
2661 />
2662 <glyph glyph-name="uniF2EC" unicode="&#xf2ec;" horiz-adv-x="1792"
2663 />
2664 <glyph glyph-name="uniF2ED" unicode="&#xf2ed;" horiz-adv-x="1792"
2665 />
2666 <glyph glyph-name="uniF2EE" unicode="&#xf2ee;" horiz-adv-x="1792"
2667 />
2668 <glyph glyph-name="lessequal" unicode="&#xf500;" horiz-adv-x="1792"
2669 />
2670 </font>
2671</defs></svg>
diff --git a/tpl/default/fonts/fontawesome-webfont.ttf b/tpl/default/fonts/fontawesome-webfont.ttf
new file mode 100644
index 00000000..35acda2f
--- /dev/null
+++ b/tpl/default/fonts/fontawesome-webfont.ttf
Binary files differ
diff --git a/tpl/default/fonts/fontawesome-webfont.woff b/tpl/default/fonts/fontawesome-webfont.woff
new file mode 100644
index 00000000..400014a4
--- /dev/null
+++ b/tpl/default/fonts/fontawesome-webfont.woff
Binary files differ
diff --git a/tpl/default/fonts/fontawesome-webfont.woff2 b/tpl/default/fonts/fontawesome-webfont.woff2
new file mode 100644
index 00000000..4d13fc60
--- /dev/null
+++ b/tpl/default/fonts/fontawesome-webfont.woff2
Binary files differ
diff --git a/tpl/default/img/apple-touch-icon.png b/tpl/default/img/apple-touch-icon.png
new file mode 100644
index 00000000..f29210ce
--- /dev/null
+++ b/tpl/default/img/apple-touch-icon.png
Binary files differ
diff --git a/tpl/default/img/favicon.png b/tpl/default/img/favicon.png
new file mode 100644
index 00000000..4644321b
--- /dev/null
+++ b/tpl/default/img/favicon.png
Binary files differ
diff --git a/tpl/default/img/icon.png b/tpl/default/img/icon.png
new file mode 100644
index 00000000..474edec3
--- /dev/null
+++ b/tpl/default/img/icon.png
Binary files differ
diff --git a/tpl/default/img/sad_star.png b/tpl/default/img/sad_star.png
new file mode 100644
index 00000000..ed3bd158
--- /dev/null
+++ b/tpl/default/img/sad_star.png
Binary files differ
diff --git a/tpl/default/import.html b/tpl/default/import.html
new file mode 100644
index 00000000..000a50ac
--- /dev/null
+++ b/tpl/default/import.html
@@ -0,0 +1,86 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9<form method="POST" action="?do=import" enctype="multipart/form-data" name="uploadform" id="uploadform">
10 <div class="pure-g">
11 <div class="pure-u-lg-1-4 pure-u-1-24"></div>
12 <div class="pure-u-lg-1-2 pure-u-22-24 page-form page-form-complete">
13 <div>
14 <h2 class="window-title">{"Import Database"|t}</h2>
15 </div>
16
17 <input type="hidden" name="token" value="{$token}">
18 <div class="center" id="import-field">
19 <input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize}">
20 <input type="file" name="filetoupload">
21 <p><br>{'Maximum size allowed:'|t} <strong>{$maxfilesizeHuman}</strong></p>
22 </div>
23
24 <div class="pure-g">
25 <div class="pure-u-lg-1-3 pure-u-1">
26 <div class="form-label">
27 <label><span class="label-name">{'Visibility'|t}</span></label>
28 </div>
29 </div>
30 <div class="pure-u-lg-2-3 pure-u-1">
31 <div class="radio-buttons">
32 <div>
33 <input type="radio" name="privacy" value="default" checked="checked">
34 {'Use values from the imported file, default to public'|t}
35 </div>
36 <div>
37 <input type="radio" name="privacy" value="private">
38 {'Import all bookmarks as private'|t}
39 </div>
40 <div>
41 <input type="radio" name="privacy" value="public">
42 {'Import all bookmarks as public'|t}
43 </div>
44 </div>
45 </div>
46 </div>
47
48 <div class="pure-g">
49 <div class="pure-u-lg-1-3 pure-u-7-8">
50 <div class="form-label">
51 <label for="overwrite">
52 <span class="label-name">{'Overwrite existing bookmarks'|t}</span><br>
53 <span class="label-desc">{'Duplicates based on URL'|t}</span>
54 </label>
55 </div>
56 </div>
57 <div class="pure-u-lg-2-3 pure-u-1-8">
58 <div class="form-input">
59 <input type="checkbox" name="overwrite" id="overwrite">
60 </div>
61 </div>
62 </div>
63
64 <div class="pure-g">
65 <div class="pure-u-lg-1-3 pure-u-1">
66 <div class="form-label">
67 <label for="default_tags"><span class="label-name">{'Add default tags'|t}</span></label>
68 </div>
69 </div>
70 <div class="pure-u-lg-2-3 pure-u-1">
71 <div class="form-input">
72 <input type="text" name="default_tags" id="default_tags" placeholder="{'Tag'|t}">
73 </div>
74 </div>
75 </div>
76
77 <div class="center">
78 <input type="submit" name="import_file" value="{'Import'|t}">
79 </div>
80 </div>
81 </div>
82</form>
83
84{include="page.footer"}
85</body>
86</html>
diff --git a/tpl/default/includes.html b/tpl/default/includes.html
new file mode 100644
index 00000000..b2bfec30
--- /dev/null
+++ b/tpl/default/includes.html
@@ -0,0 +1,21 @@
1<title>{$pagetitle}</title>
2<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
3<meta name="format-detection" content="telephone=no" />
4<meta name="viewport" content="width=device-width, initial-scale=1">
5<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
6<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
7<link href="img/favicon.png" rel="shortcut icon" type="image/png" />
8<link href="img/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180" />
9<link type="text/css" rel="stylesheet" href="css/pure.min.css?v={$version_hash}" />
10<link type="text/css" rel="stylesheet" href="css/grids-responsive.min.css?v={$version_hash}">
11<link type="text/css" rel="stylesheet" href="css/pure-extras.css?v={$version_hash}">
12<link type="text/css" rel="stylesheet" href="css/font-awesome.min.css?v={$version_hash}" />
13<link type="text/css" rel="stylesheet" href="inc/awesomplete.css?v={$version_hash}#" />
14<link type="text/css" rel="stylesheet" href="css/shaarli.css?v={$version_hash}" />
15{if="is_file('data/user.css')"}
16 <link type="text/css" rel="stylesheet" href="data/user.css#" />
17{/if}
18{loop="$plugins_includes.css_files"}
19 <link type="text/css" rel="stylesheet" href="{$value}?v={$version_hash}#"/>
20{/loop}
21<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle}"/>
diff --git a/tpl/default/install.html b/tpl/default/install.html
new file mode 100644
index 00000000..6199b33d
--- /dev/null
+++ b/tpl/default/install.html
@@ -0,0 +1,168 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7
8{$ratioLabel='1-4'}
9{$ratioInput='3-4'}
10{$ratioLabelMobile='7-8'}
11{$ratioInputMobile='1-8'}
12
13<form method="POST" action="#" name="installform" id="installform">
14<div class="pure-g">
15 <div class="pure-u-lg-1-6 pure-u-1-24"></div>
16 <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-form-complete">
17 <h2 class="window-title">{'Install Shaarli'|t}</h2>
18
19 <div class="center">
20 {'It looks like it\'s the first time you run Shaarli. Please configure it.'|t}
21 </div>
22
23 <div class="pure-g">
24 <div class="pure-u-lg-{$ratioLabel} pure-u-1">
25 <div class="form-label">
26 <label for="username">
27 <span class="label-name">{'Username'|t}</span>
28 </label>
29 </div>
30 </div>
31 <div class="pure-u-lg-{$ratioInput} pure-u-1">
32 <div class="form-input">
33 <input type="text" name="setlogin" id="username">
34 </div>
35 </div>
36 </div>
37
38 <div class="pure-g">
39 <div class="pure-u-lg-{$ratioLabel} pure-u-1">
40 <div class="form-label">
41 <label for="password">
42 <span class="label-name">{'Password'|t}</span>
43 </label>
44 </div>
45 </div>
46 <div class="pure-u-lg-{$ratioInput} pure-u-1">
47 <div class="form-input">
48 <input type="password" name="setpassword" id="password">
49 </div>
50 </div>
51 </div>
52
53 <div class="pure-g">
54 <div class="pure-u-lg-{$ratioLabel} pure-u-1">
55 <div class="form-label">
56 <label for="title">
57 <span class="label-name">{'Shaarli title'|t}</span>
58 </label>
59 </div>
60 </div>
61 <div class="pure-u-lg-{$ratioInput} pure-u-1">
62 <div class="form-input">
63 <input type="text" name="title" id="title" placeholder="{'My links'|t}">
64 </div>
65 </div>
66 </div>
67
68 <div class="pure-g">
69 <div class="pure-u-lg-{$ratioLabel} pure-u-1">
70 <div class="form-label">
71 <label for="language">
72 <span class="label-name">{'Language'|t}</span>
73 </label>
74 </div>
75 </div>
76 <div class="pure-u-lg-{$ratioInput} pure-u-1">
77 <div class="form-input">
78 <select name="language" id="language" class="align">
79 {loop="$languages"}
80 <option value="{$key}">
81 {$value}
82 </option>
83 {/loop}
84 </select>
85 </div>
86 </div>
87 </div>
88
89 <div class="pure-g">
90 <div class="pure-u-lg-{$ratioLabel} pure-u-1">
91 <div class="form-label">
92 <label>
93 <span class="label-name">{'Timezone'|t}</span><br>
94 <span class="label-desc">{'Continent'|t} &middot; {'City'|t}</span>
95 </label>
96 </div>
97 </div>
98 <div class="pure-u-lg-{$ratioInput} pure-u-1">
99 <div class="form-input">
100 <div class="timezone">
101 <select id="continent" name="continent">
102 {loop="$continents"}
103 {if="$key !== 'selected'"}
104 <option value="{$value}" {if="$continents.selected === $value"}selected{/if}>
105 {$value}
106 </option>
107 {/if}
108 {/loop}
109 </select>
110 <select id="city" name="city">
111 {loop="$cities"}
112 {if="$key !== 'selected'"}
113 <option value="{$value.city}"
114 {if="$cities.selected === $value.city"}selected{/if}
115 data-continent="{$value.continent}">
116 {$value.city}
117 </option>
118 {/if}
119 {/loop}
120 </select>
121 </div>
122 </div>
123 </div>
124 </div>
125
126 <div class="pure-g">
127 <div class="pure-u-lg-{$ratioLabel} pure-u-7-8">
128 <div class="form-label">
129 <label for="update">
130 <span class="label-name">{'Check updates'|t}</span><br>
131 <span class="label-desc">
132 {'Notify me when a new release is ready'|t}
133 </span>
134 </label>
135 </div>
136 </div>
137 <div class="pure-u-lg-{$ratioInput} pure-u-1-8">
138 <div class="form-input">
139 <input type="checkbox" name="updateCheck" id="update" checked="checked">
140 </div>
141 </div>
142 </div>
143
144 <div class="pure-g">
145 <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile}">
146 <div class="form-label">
147 <label for="enableApi">
148 <span class="label-name">{'Enable REST API'|t}</span><br>
149 <span class="label-desc">{'Allow third party software to use Shaarli such as mobile application'|t}</span>
150 </label>
151 </div>
152 </div>
153 <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}">
154 <div class="form-input">
155 <input type="checkbox" name="enableApi" id="enableApi" checked />
156 </div>
157 </div>
158 </div>
159
160 <div class="center">
161 <input type="submit" value="{'Install'|t}" name="Save">
162 </div>
163 </div>
164</div>
165</form>
166{include="page.footer"}
167</body>
168</html>
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js
new file mode 100644
index 00000000..cf628e87
--- /dev/null
+++ b/tpl/default/js/shaarli.js
@@ -0,0 +1,664 @@
1/** @licstart The following is the entire license notice for the
2 * JavaScript code in this page.
3 *
4 * Copyright: (c) 2011-2015 Sébastien SAUVAGE <sebsauvage@sebsauvage.net>
5 * (c) 2011-2017 The Shaarli Community, see AUTHORS
6 *
7 * This software is provided 'as-is', without any express or implied warranty.
8 * In no event will the authors be held liable for any damages arising from
9 * the use of this software.
10 *
11 * Permission is granted to anyone to use this software for any purpose,
12 * including commercial applications, and to alter it and redistribute it
13 * freely, subject to the following restrictions:
14 *
15 * 1. The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software. If you use this software
17 * in a product, an acknowledgment in the product documentation would
18 * be appreciated but is not required.
19 *
20 * 2. Altered source versions must be plainly marked as such, and must
21 * not be misrepresented as being the original software.
22 *
23 * 3. This notice may not be removed or altered from any source distribution.
24 *
25 * @licend The above is the entire license notice
26 * for the JavaScript code in this page.
27 */
28
29window.onload = function () {
30
31 /**
32 * Retrieve an element up in the tree from its class name.
33 */
34 function getParentByClass(el, className) {
35 var p = el.parentNode;
36 if (p == null || p.classList.contains(className)) {
37 return p;
38 }
39 return getParentByClass(p, className);
40 }
41
42
43 /**
44 * Handle responsive menu.
45 * Source: http://purecss.io/layouts/tucked-menu-vertical/
46 */
47 (function (window, document) {
48 var menu = document.getElementById('shaarli-menu'),
49 WINDOW_CHANGE_EVENT = ('onorientationchange' in window) ? 'orientationchange':'resize';
50
51 function toggleHorizontal() {
52 [].forEach.call(
53 document.getElementById('shaarli-menu').querySelectorAll('.menu-transform'),
54 function(el){
55 el.classList.toggle('pure-menu-horizontal');
56 }
57 );
58 };
59
60 function toggleMenu() {
61 // set timeout so that the panel has a chance to roll up
62 // before the menu switches states
63 if (menu.classList.contains('open')) {
64 setTimeout(toggleHorizontal, 500);
65 }
66 else {
67 toggleHorizontal();
68 }
69 menu.classList.toggle('open');
70 document.getElementById('menu-toggle').classList.toggle('x');
71 };
72
73 function closeMenu() {
74 if (menu.classList.contains('open')) {
75 toggleMenu();
76 }
77 }
78
79 var menuToggle = document.getElementById('menu-toggle');
80 if (menuToggle != null) {
81 menuToggle.addEventListener('click', function (e) {
82 toggleMenu();
83 });
84 }
85
86 window.addEventListener(WINDOW_CHANGE_EVENT, closeMenu);
87 })(this, this.document);
88
89 /**
90 * Fold/Expand shaares description and thumbnail.
91 */
92 var foldAllButtons = document.getElementsByClassName('fold-all');
93 var foldButtons = document.getElementsByClassName('fold-button');
94
95 [].forEach.call(foldButtons, function (foldButton) {
96 // Retrieve description
97 var description = null;
98 var thumbnail = null;
99 var linklistItem = getParentByClass(foldButton, 'linklist-item');
100 if (linklistItem != null) {
101 description = linklistItem.querySelector('.linklist-item-description');
102 thumbnail = linklistItem.querySelector('.linklist-item-thumbnail');
103 if (description != null || thumbnail != null) {
104 foldButton.style.display = 'inline';
105 }
106 }
107
108 foldButton.addEventListener('click', function (event) {
109 event.preventDefault();
110 toggleFold(event.target, description, thumbnail);
111 });
112 });
113
114 if (foldAllButtons != null) {
115 [].forEach.call(foldAllButtons, function (foldAllButton) {
116 foldAllButton.addEventListener('click', function (event) {
117 event.preventDefault();
118 var state = foldAllButton.firstElementChild.getAttribute('class').indexOf('down') != -1 ? 'down' : 'up';
119 [].forEach.call(foldButtons, function (foldButton) {
120 if (foldButton.firstElementChild.classList.contains('fa-chevron-up') && state == 'down'
121 || foldButton.firstElementChild.classList.contains('fa-chevron-down') && state == 'up'
122 ) {
123 return;
124 }
125 // Retrieve description
126 var description = null;
127 var thumbnail = null;
128 var linklistItem = getParentByClass(foldButton, 'linklist-item');
129 if (linklistItem != null) {
130 description = linklistItem.querySelector('.linklist-item-description');
131 thumbnail = linklistItem.querySelector('.linklist-item-thumbnail');
132 if (description != null || thumbnail != null) {
133 foldButton.style.display = 'inline';
134 }
135 }
136
137 toggleFold(foldButton.firstElementChild, description, thumbnail);
138 });
139 foldAllButton.firstElementChild.classList.toggle('fa-chevron-down');
140 foldAllButton.firstElementChild.classList.toggle('fa-chevron-up');
141 foldAllButton.title = state === 'down'
142 ? document.getElementById('translation-fold-all').innerHTML
143 : document.getElementById('translation-expand-all').innerHTML
144 });
145 });
146 }
147
148 function toggleFold(button, description, thumb)
149 {
150 // Switch fold/expand - up = fold
151 if (button.classList.contains('fa-chevron-up')) {
152 button.title = document.getElementById('translation-expand').innerHTML;
153 if (description != null) {
154 description.style.display = 'none';
155 }
156 if (thumb != null) {
157 thumb.style.display = 'none';
158 }
159 }
160 else {
161 button.title = document.getElementById('translation-fold').innerHTML;
162 if (description != null) {
163 description.style.display = 'block';
164 }
165 if (thumb != null) {
166 thumb.style.display = 'block';
167 }
168 }
169 button.classList.toggle('fa-chevron-down');
170 button.classList.toggle('fa-chevron-up');
171 }
172
173 /**
174 * Confirmation message before deletion.
175 */
176 var deleteLinks = document.querySelectorAll('.confirm-delete');
177 [].forEach.call(deleteLinks, function(deleteLink) {
178 deleteLink.addEventListener('click', function(event) {
179 if(! confirm(document.getElementById('translation-delete-link').innerHTML)) {
180 event.preventDefault();
181 }
182 });
183 });
184
185 /**
186 * Close alerts
187 */
188 var closeLinks = document.querySelectorAll('.pure-alert-close');
189 [].forEach.call(closeLinks, function(closeLink) {
190 closeLink.addEventListener('click', function(event) {
191 var alert = getParentByClass(event.target, 'pure-alert-closable');
192 alert.style.display = 'none';
193 });
194 });
195
196 /**
197 * New version dismiss.
198 * Hide the message for one week using localStorage.
199 */
200 var newVersionDismiss = document.getElementById('new-version-dismiss');
201 var newVersionMessage = document.querySelector('.new-version-message');
202 if (newVersionMessage != null
203 && localStorage.getItem('newVersionDismiss') != null
204 && parseInt(localStorage.getItem('newVersionDismiss')) + 7*24*60*60*1000 > (new Date()).getTime()
205 ) {
206 newVersionMessage.style.display = 'none';
207 }
208 if (newVersionDismiss != null) {
209 newVersionDismiss.addEventListener('click', function () {
210 localStorage.setItem('newVersionDismiss', (new Date()).getTime());
211 });
212 }
213
214 var hiddenReturnurl = document.getElementsByName('returnurl');
215 if (hiddenReturnurl != null) {
216 hiddenReturnurl.value = window.location.href;
217 }
218
219 /**
220 * Autofocus text fields
221 */
222 var autofocusElements = document.querySelectorAll('.autofocus');
223 var breakLoop = false;
224 [].forEach.call(autofocusElements, function(autofocusElement) {
225 if (autofocusElement.value == '' && ! breakLoop) {
226 autofocusElement.focus();
227 breakLoop = true;
228 }
229 });
230
231 /**
232 * Handle sub menus/forms
233 */
234 var openers = document.getElementsByClassName('subheader-opener');
235 if (openers != null) {
236 [].forEach.call(openers, function(opener) {
237 opener.addEventListener('click', function(event) {
238 event.preventDefault();
239
240 var id = opener.getAttribute('data-open-id');
241 var sub = document.getElementById(id);
242
243 if (sub != null) {
244 [].forEach.call(document.getElementsByClassName('subheader-form'), function (element) {
245 if (element != sub) {
246 removeClass(element, 'open')
247 }
248 });
249
250 sub.classList.toggle('open');
251 }
252 });
253 });
254 }
255
256 function removeClass(element, classname) {
257 element.className = element.className.replace(new RegExp('(?:^|\\s)'+ classname + '(?:\\s|$)'), ' ');
258 }
259
260 /**
261 * Remove CSS target padding (for fixed bar)
262 */
263 if (location.hash != '') {
264 var anchor = document.getElementById(location.hash.substr(1));
265 if (anchor != null) {
266 var padsize = anchor.clientHeight;
267 this.window.scroll(0, this.window.scrollY - padsize);
268 anchor.style.paddingTop = 0;
269 }
270 }
271
272 /**
273 * Text area resizer
274 */
275 var description = document.getElementById('lf_description');
276 var observe = function (element, event, handler) {
277 element.addEventListener(event, handler, false);
278 };
279 function init () {
280 function resize () {
281 /* Fix jumpy resizing: https://stackoverflow.com/a/18262927/1484919 */
282 var scrollTop = window.pageYOffset ||
283 (document.documentElement || document.body.parentNode || document.body).scrollTop;
284
285 description.style.height = 'auto';
286 description.style.height = description.scrollHeight+10+'px';
287
288 window.scrollTo(0, scrollTop);
289 }
290 /* 0-timeout to get the already changed text */
291 function delayedResize () {
292 window.setTimeout(resize, 0);
293 }
294 observe(description, 'change', resize);
295 observe(description, 'cut', delayedResize);
296 observe(description, 'paste', delayedResize);
297 observe(description, 'drop', delayedResize);
298 observe(description, 'keydown', delayedResize);
299
300 resize();
301 }
302
303 if (description != null) {
304 init();
305 // Submit editlink form with CTRL + Enter in the text area.
306 description.addEventListener('keydown', function (event) {
307 if (event.ctrlKey && event.keyCode === 13) {
308 document.getElementById('button-save-edit').click();
309 }
310 });
311 }
312
313 /**
314 * Awesomplete trigger.
315 */
316 var tags = document.getElementById('lf_tags');
317 if (tags != null) {
318 awesompleteUniqueTag('#lf_tags');
319 }
320
321 /**
322 * bLazy trigger
323 */
324 var picwall = document.getElementById('picwall_container');
325 if (picwall != null) {
326 var bLazy = new Blazy();
327 }
328
329 /**
330 * Bookmarklet alert
331 */
332 var bookmarkletLinks = document.querySelectorAll('.bookmarklet-link');
333 var bkmMessage = document.getElementById('bookmarklet-alert');
334 [].forEach.call(bookmarkletLinks, function(link) {
335 link.addEventListener('click', function(event) {
336 event.preventDefault();
337 alert(bkmMessage.value);
338 });
339 });
340
341 /**
342 * Firefox Social
343 */
344 var ffButton = document.getElementById('ff-social-button');
345 if (ffButton != null) {
346 ffButton.addEventListener('click', function(event) {
347 activateFirefoxSocial(event.target);
348 });
349 }
350
351 /**
352 * Plugin admin order
353 */
354 var orderPA = document.querySelectorAll('.order');
355 [].forEach.call(orderPA, function(link) {
356 link.addEventListener('click', function(event) {
357 event.preventDefault();
358 if (event.target.classList.contains('order-up')) {
359 return orderUp(event.target.parentNode.parentNode.getAttribute('data-order'));
360 } else if (event.target.classList.contains('order-down')) {
361 return orderDown(event.target.parentNode.parentNode.getAttribute('data-order'));
362 }
363 });
364 });
365
366 var continent = document.getElementById('continent');
367 var city = document.getElementById('city');
368 if (continent != null && city != null) {
369 continent.addEventListener('change', function (event) {
370 hideTimezoneCities(city, continent.options[continent.selectedIndex].value, true);
371 });
372 hideTimezoneCities(city, continent.options[continent.selectedIndex].value, false);
373 }
374
375 /**
376 * Bulk actions
377 */
378 var linkCheckboxes = document.querySelectorAll('.delete-checkbox');
379 var bar = document.getElementById('actions');
380 [].forEach.call(linkCheckboxes, function(checkbox) {
381 checkbox.style.display = 'inline-block';
382 checkbox.addEventListener('click', function(event) {
383 var count = 0;
384 var linkCheckedCheckboxes = document.querySelectorAll('.delete-checkbox:checked');
385 [].forEach.call(linkCheckedCheckboxes, function(checkbox) {
386 count++;
387 });
388 if (count == 0 && bar.classList.contains('open')) {
389 bar.classList.toggle('open');
390 } else if (count > 0 && ! bar.classList.contains('open')) {
391 bar.classList.toggle('open');
392 }
393 });
394 });
395
396 var deleteButton = document.getElementById('actions-delete');
397 var token = document.querySelector('input[type="hidden"][name="token"]');
398 if (deleteButton != null && token != null) {
399 deleteButton.addEventListener('click', function(event) {
400 event.preventDefault();
401
402 var links = [];
403 var linkCheckedCheckboxes = document.querySelectorAll('.delete-checkbox:checked');
404 [].forEach.call(linkCheckedCheckboxes, function(checkbox) {
405 links.push({
406 'id': checkbox.value,
407 'title': document.querySelector('.linklist-item[data-id="'+ checkbox.value +'"] .linklist-link').innerHTML
408 });
409 });
410
411 var message = 'Are you sure you want to delete '+ links.length +' links?\n';
412 message += 'This action is IRREVERSIBLE!\n\nTitles:\n';
413 var ids = [];
414 links.forEach(function(item) {
415 message += ' - '+ item['title'] +'\n';
416 ids.push(item['id']);
417 });
418
419 if (window.confirm(message)) {
420 window.location = '?delete_link&lf_linkdate='+ ids.join('+') +'&token='+ token.value;
421 }
422 });
423 }
424
425 /**
426 * Tag list operations
427 *
428 * TODO: support error code in the backend for AJAX requests
429 */
430 var tagList = document.querySelector('input[name="taglist"]');
431 var existingTags = tagList ? tagList.value.split(' ') : [];
432 var awesomepletes = [];
433
434 // Display/Hide rename form
435 var renameTagButtons = document.querySelectorAll('.rename-tag');
436 [].forEach.call(renameTagButtons, function(rename) {
437 rename.addEventListener('click', function(event) {
438 event.preventDefault();
439 var block = findParent(event.target, 'div', {'class': 'tag-list-item'});
440 var form = block.querySelector('.rename-tag-form');
441 if (form.style.display == 'none' || form.style.display == '') {
442 form.style.display = 'block';
443 } else {
444 form.style.display = 'none';
445 }
446 block.querySelector('input').focus();
447 });
448 });
449
450 // Rename a tag with an AJAX request
451 var renameTagSubmits = document.querySelectorAll('.validate-rename-tag');
452 [].forEach.call(renameTagSubmits, function(rename) {
453 rename.addEventListener('click', function(event) {
454 event.preventDefault();
455 var block = findParent(event.target, 'div', {'class': 'tag-list-item'});
456 var input = block.querySelector('.rename-tag-input');
457 var totag = input.value.replace('/"/g', '\\"');
458 if (totag.trim() == '') {
459 return;
460 }
461 var fromtag = block.getAttribute('data-tag');
462 var token = document.getElementById('token').value;
463
464 xhr = new XMLHttpRequest();
465 xhr.open('POST', '?do=changetag');
466 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
467 xhr.onload = function() {
468 if (xhr.status !== 200) {
469 alert('An error occurred. Return code: '+ xhr.status);
470 location.reload();
471 } else {
472 block.setAttribute('data-tag', totag);
473 input.setAttribute('name', totag);
474 input.setAttribute('value', totag);
475 findParent(input, 'div', {'class': 'rename-tag-form'}).style.display = 'none';
476 block.querySelector('a.tag-link').innerHTML = htmlEntities(totag);
477 block.querySelector('a.tag-link').setAttribute('href', '?searchtags='+ encodeURIComponent(totag));
478 block.querySelector('a.rename-tag').setAttribute('href', '?do=changetag&fromtag='+ encodeURIComponent(totag));
479
480 // Refresh awesomplete values
481 for (var key in existingTags) {
482 if (existingTags[key] == fromtag) {
483 existingTags[key] = totag;
484 }
485 }
486 awesomepletes = updateAwesompleteList('.rename-tag-input', existingTags, awesomepletes);
487 }
488 };
489 xhr.send('renametag=1&fromtag='+ encodeURIComponent(fromtag) +'&totag='+ encodeURIComponent(totag) +'&token='+ token);
490 refreshToken();
491 });
492 });
493
494 // Validate input with enter key
495 var renameTagInputs = document.querySelectorAll('.rename-tag-input');
496 [].forEach.call(renameTagInputs, function(rename) {
497
498 rename.addEventListener('keypress', function(event) {
499 if (event.keyCode === 13) { // enter
500 findParent(event.target, 'div', {'class': 'tag-list-item'}).querySelector('.validate-rename-tag').click();
501 }
502 });
503 });
504
505 // Delete a tag with an AJAX query (alert popup confirmation)
506 var deleteTagButtons = document.querySelectorAll('.delete-tag');
507 [].forEach.call(deleteTagButtons, function(rename) {
508 rename.style.display = 'inline';
509 rename.addEventListener('click', function(event) {
510 event.preventDefault();
511 var block = findParent(event.target, 'div', {'class': 'tag-list-item'});
512 var tag = block.getAttribute('data-tag');
513 var token = document.getElementById('token').value;
514
515 if (confirm('Are you sure you want to delete the tag "'+ tag +'"?')) {
516 xhr = new XMLHttpRequest();
517 xhr.open('POST', '?do=changetag');
518 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
519 xhr.onload = function() {
520 block.remove();
521 };
522 xhr.send(encodeURI('deletetag=1&fromtag='+ tag +'&token='+ token));
523 refreshToken();
524 }
525 });
526 });
527
528 updateAwesompleteList('.rename-tag-input', existingTags, awesomepletes);
529};
530
531/**
532 * Find a parent element according to its tag and its attributes
533 *
534 * @param element Element where to start the search
535 * @param tagName Expected parent tag name
536 * @param attributes Associative array of expected attributes (name=>value).
537 *
538 * @returns Found element or null.
539 */
540function findParent(element, tagName, attributes)
541{
542 while (element) {
543 if (element.tagName.toLowerCase() == tagName) {
544 var match = true;
545 for (var key in attributes) {
546 if (! element.hasAttribute(key)
547 || (attributes[key] != '' && element.getAttribute(key).indexOf(attributes[key]) == -1)
548 ) {
549 match = false;
550 break;
551 }
552 }
553
554 if (match) {
555 return element;
556 }
557 }
558 element = element.parentElement;
559 }
560 return null;
561}
562
563/**
564 * Ajax request to refresh the CSRF token.
565 */
566function refreshToken()
567{
568 var xhr = new XMLHttpRequest();
569 xhr.open('GET', '?do=token');
570 xhr.onload = function() {
571 var token = document.getElementById('token');
572 token.setAttribute('value', xhr.responseText);
573 };
574 xhr.send();
575}
576
577/**
578 * Update awesomplete list of tag for all elements matching the given selector
579 *
580 * @param selector CSS selector
581 * @param tags Array of tags
582 * @param instances List of existing awesomplete instances
583 */
584function updateAwesompleteList(selector, tags, instances)
585{
586 // First load: create Awesomplete instances
587 if (instances.length == 0) {
588 var elements = document.querySelectorAll(selector);
589 [].forEach.call(elements, function (element) {
590 instances.push(new Awesomplete(
591 element,
592 {'list': tags}
593 ));
594 });
595 } else {
596 // Update awesomplete tag list
597 for (var key in instances) {
598 instances[key].list = tags;
599 }
600 }
601 return instances;
602}
603
604/**
605 * html_entities in JS
606 *
607 * @see http://stackoverflow.com/questions/18749591/encode-html-entities-in-javascript
608 */
609function htmlEntities(str)
610{
611 return str.replace(/[\u00A0-\u9999<>\&]/gim, function(i) {
612 return '&#'+i.charCodeAt(0)+';';
613 });
614}
615
616function activateFirefoxSocial(node) {
617 var loc = location.href;
618 var baseURL = loc.substring(0, loc.lastIndexOf("/") + 1);
619 var title = document.title;
620
621 // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable.
622 var data = {
623 name: title,
624 description: document.getElementById('translation-delete-link').innerHTML,
625 author: "Shaarli",
626 version: "1.0.0",
627
628 iconURL: baseURL + "/images/favicon.ico",
629 icon32URL: baseURL + "/images/favicon.ico",
630 icon64URL: baseURL + "/images/favicon.ico",
631
632 shareURL: baseURL + "?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi",
633 homepageURL: baseURL
634 };
635 node.setAttribute("data-service", JSON.stringify(data));
636
637 var activate = new CustomEvent("ActivateSocialFeature");
638 node.dispatchEvent(activate);
639}
640
641/**
642 * Add the class 'hidden' to city options not attached to the current selected continent.
643 *
644 * @param cities List of <option> elements
645 * @param currentContinent Current selected continent
646 * @param reset Set to true to reset the selected value
647 */
648function hideTimezoneCities(cities, currentContinent) {
649 var first = true;
650 if (reset == null) {
651 reset = false;
652 }
653 [].forEach.call(cities, function (option) {
654 if (option.getAttribute('data-continent') != currentContinent) {
655 option.className = 'hidden';
656 } else {
657 option.className = '';
658 if (reset === true && first === true) {
659 option.setAttribute('selected', 'selected');
660 first = false;
661 }
662 }
663 });
664}
diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html
new file mode 100644
index 00000000..c666e30a
--- /dev/null
+++ b/tpl/default/linklist.html
@@ -0,0 +1,273 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9<div class="linkcount pure-u-0 pure-u-lg-visible">
10 {if="!empty($linkcount)"}
11 <span class="strong">{$linkcount}</span> {function="t('shaare', 'shaares', $linkcount)"}
12 {if="$privateLinkcount>0"}
13 <br><span class="strong">{$privateLinkcount}</span> {function="t('private link', 'private links', $privateLinkcount)"}
14 {/if}
15 {/if}
16</div>
17
18<input type="hidden" name="token" value="{$token}">
19
20<div id="search-linklist">
21
22 <form method="GET" class="pure-form searchform" name="searchform">
23 <input type="text" tabindex="1" name="searchterm" class="searchterm" placeholder="{'Search text'|t}"
24 {if="!empty($search_term)"}
25 value="{$search_term}"
26 {/if}
27 >
28 <input type="text" tabindex="2" name="searchtags" class="searchtags" placeholder="{'Filter by tag'|t}"
29 {if="!empty($search_tags)"}
30 value="{$search_tags}"
31 {/if}
32 autocomplete="off" data-multiple data-autofirst data-minChars="1"
33 data-list="{loop="$tags"}{$key}, {/loop}"
34 >
35 <button type="submit" class="search-button"><i class="fa fa-search"></i></button>
36 </form>
37</div>
38
39{loop="$plugins_header.fields_toolbar"}
40 <form
41 {loop="$value.attr"}
42 {$key}="{$value}"
43 {/loop}>
44 <div class="toolbar-plugin pure-u-lg-1">
45 {loop="$value.inputs"}
46 <input
47 {loop="$value"}
48 {$key}="{$value}"
49 {/loop}>
50 {/loop}
51 </div>
52 </form>
53{/loop}
54
55<div id="linklist">
56 <div id="link-count-block" class="pure-g">
57 <div class="pure-u-lg-2-24 pure-u-1-24"></div>
58 <div id="link-count-content" class="pure-u-lg-20-24 pure-u-22-24">
59 <div class="linkcount pure-u-lg-0 center">
60 {if="!empty($linkcount)"}
61 <span class="strong">{$linkcount}</span> {function="t('shaare', 'shaares', $linkcount)"}
62 {if="$privateLinkcount>0"}
63 &middot; <span class="strong">{$privateLinkcount}</span> {function="t('private link', 'private links', $privateLinkcount)"}
64 {/if}
65 {/if}
66 </div>
67
68 {include="linklist.paging"}
69
70 <div id="plugin_zone_start_linklist" class="plugin_zone">
71 {loop="$plugin_start_zone"}
72 {$value}
73 {/loop}
74 </div>
75 </div>
76 </div>
77
78 {if="count($links)==0"}
79 <div id="search-result-block" class="pure-g pure-alert pure-alert-error search-result">
80 <div class="pure-u-2-24"></div>
81 <div id="search-result-content" class="pure-u-20-24">
82 <div id="searchcriteria">{'Nothing found.'|t}</div>
83 </div>
84 </div>
85 {elseif="!empty($search_term) or $search_tags !== '' or !empty($visibility) or $untaggedonly"}
86 <div id="search-result-block" class="pure-g pure-alert pure-alert-success search-result">
87 <div class="pure-u-2-24"></div>
88 <div id="search-result-content" class="pure-u-20-24 search-result-main">
89 {function="sprintf(t('%s result', '%s results', $result_count), $result_count)"}
90 {if="!empty($search_term)"}
91 {'for'|t} <em><strong>{$search_term}</strong></em>
92 {/if}
93 {if="!empty($search_tags)"}
94 {$exploded_tags=explode(' ', $search_tags)}
95 {'tagged'|t}
96 {loop="$exploded_tags"}
97 <span class="label label-tag" title="{'Remove tag'|t}">
98 <a href="?removetag={function="urlencode($value)"}">{$value}<span class="remove"><i class="fa fa-times"></i></span></a>
99 </span>
100 {/loop}
101 {/if}
102 {if="!empty($visibility)"}
103 {'with status'|t}
104 <span class="label label-private">
105 {$visibility|t}
106 </span>
107 {/if}
108 {if="$untaggedonly"}
109 <span class="label label-private">
110 {'without any tag'|t}
111 </span>
112 {/if}
113 </div>
114 </div>
115 {/if}
116
117 <div id="linklist-loop-block" class="pure-g">
118 <div class="pure-u-lg-2-24 pure-u-1-24"></div>
119 <div id="linklist-loop-content" class="pure-u-lg-20-24 pure-u-22-24">
120 {ignore}Set translation here, for performances{/ignore}
121 {$strPrivate=t('Private')}
122 {$strEdit=t('Edit')}
123 {$strDelete=t('Delete')}
124 {$strFold=t('Fold')}
125 {$strEdited=t('Edited: ')}
126 {$strPermalink=t('Permalink')}
127 {$strPermalinkLc=t('permalink')}
128 {$strAddTag=t('Add tag')}
129 {ignore}End of translations{/ignore}
130 {loop="links"}
131 <div class="anchor" id="{$value.shorturl}"></div>
132
133 <div class="linklist-item linklist-item{if="$value.class"} {$value.class}{/if}" data-id="{$value.id}">
134 <div class="linklist-item-title">
135 {$thumb=thumbnail($value.url)}
136 {if="$thumb!=false"}
137 <div class="linklist-item-thumbnail">{$thumb}</div>
138 {/if}
139
140 {if="isLoggedIn()"}
141 <div class="linklist-item-editbuttons">
142 {if="$value.private"}
143 <span class="label label-private">{$strPrivate}</span>
144 {/if}
145 </div>
146 {/if}
147
148 <h2>
149 <a href="{$value.real_url}">
150 {if="strpos($value.url, $value.shorturl) === false"}
151 <i class="fa fa-external-link"></i>
152 {else}
153 <i class="fa fa-sticky-note"></i>
154 {/if}
155
156 <span class="linklist-link">{$value.title}</span>
157 </a>
158 </h2>
159 </div>
160
161 {if="$value.description"}
162 <div class="linklist-item-description">
163 {$value.description}
164 </div>
165 {/if}
166
167 <div class="linklist-item-infos clear">
168 {if="$value.tags"}
169 <div class="linklist-item-tags">
170 <i class="fa fa-tags"></i>
171 {$tag_counter=count($value.taglist)}
172 {loop="value.taglist"}
173 <span class="label label-tag" title="{$strAddTag}">
174 <a href="?addtag={$value|urlencode}">{$value}</a>
175 </span>
176 {if="$tag_counter - 1 != $counter"}&middot;{/if}
177 {/loop}
178 </div>
179 {/if}
180
181 <div class="linklist-item-infos-date-url-block pure-g">
182 <div class="linklist-item-infos-dateblock pure-u-lg-7-12 pure-u-1">
183 {if="isLoggedIn()"}
184 <div class="linklist-item-infos-controls-group pure-u-0 pure-u-lg-visible">
185 <span class="linklist-item-infos-controls-item ctrl-checkbox">
186 <input type="checkbox" class="delete-checkbox" value="{$value.id}">
187 </span>
188 <span class="linklist-item-infos-controls-item ctrl-edit">
189 <a href="?edit_link={$value.id}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link"></i></a>
190 </span>
191 <span class="linklist-item-infos-controls-item ctrl-delete">
192 <a href="?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}"
193 title="{$strDelete}" class="delete-link pure-u-0 pure-u-lg-visible confirm-delete">
194 <i class="fa fa-trash"></i>
195 </a>
196 </span>
197 </div>
198 {/if}
199 <a href="?{$value.shorturl}" title="{$strPermalink}">
200 {if="!$hide_timestamps || isLoggedIn()"}
201 {$updated=$value.updated_timestamp ? $strEdited. format_date($value.updated) : $strPermalink}
202 <span class="linkdate" title="{$updated}">
203 <i class="fa fa-clock-o"></i>
204 {$value.created|format_date}
205 {if="$value.updated_timestamp"}*{/if}
206 &middot;
207 </span>
208 {/if}
209 {$strPermalinkLc}
210 </a>
211
212 <div class="pure-u-0 pure-u-lg-visible">
213 {if="isset($value.link_plugin)"}
214 &middot;
215 {$link_plugin_counter=count($value.link_plugin)}
216 {loop="$value.link_plugin"}
217 {$value}
218 {if="$link_plugin_counter - 1 != $counter"}&middot;{/if}
219 {/loop}
220 {/if}
221 </div>
222 </div><div
223 {ignore}do not add space or line break between these div - Firefox issue{/ignore}
224 class="linklist-item-infos-url pure-u-lg-5-12 pure-u-1">
225 <a href="{$value.real_url}" title="{$value.title}">
226 <i class="fa fa-link"></i> {$value.url}
227 </a>
228 <div class="linklist-item-buttons pure-u-0 pure-u-lg-visible">
229 <a href="#" title="{$strFold}" class="fold-button"><i class="fa fa-chevron-up"></i></a>
230 </div>
231 </div>
232 <div class="mobile-buttons pure-u-1 pure-u-lg-0">
233 {if="isset($value.link_plugin)"}
234 {$link_plugin_counter=count($value.link_plugin)}
235 {loop="$value.link_plugin"}
236 {$value}
237 {if="$link_plugin_counter - 1 != $counter"}&middot;{/if}
238 {/loop}
239 {/if}
240 {if="isLoggedIn()"}
241 &middot;
242 <a href="?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}"
243 title="{$strDelete}" class="delete-link confirm-delete">
244 <i class="fa fa-trash"></i>
245 </a>
246 &middot;
247 <a href="?edit_link={$value.id}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link"></i></a>
248 {/if}
249 </div>
250 </div>
251 </div>
252 </div>
253 {/loop}
254 </div>
255 </div>
256</div>
257
258 <div id="plugin_zone_end_linklist" class="plugin_zone">
259 {loop="$plugin_end_zone"}
260 {$value}
261 {/loop}
262 </div>
263
264<div id="linklist-paging-bottom-block" class="pure-g">
265 <div class="pure-u-lg-2-24 pure-u-1-24"></div>
266 <div id="linklist-paging-bottom-content" class="pure-u-lg-20-24 pure-u-22-24">
267 {include="linklist.paging"}
268 </div>
269</div>
270
271{include="page.footer"}
272</body>
273</html>
diff --git a/tpl/default/linklist.paging.html b/tpl/default/linklist.paging.html
new file mode 100644
index 00000000..347b3d13
--- /dev/null
+++ b/tpl/default/linklist.paging.html
@@ -0,0 +1,61 @@
1<div class="linklist-paging">
2 <div class="paging pure-g">
3 <div class="linklist-filters pure-u-1-3">
4 {if="isLoggedIn() or !empty($action_plugin)"}
5 <span class="linklist-filters-text pure-u-0 pure-u-lg-visible">
6 {'Filters'|t}
7 </span>
8 {if="isLoggedIn()"}
9 <a href="?privateonly" title="{'Filter private links'|t}"
10 class={if="$privateonly"}"filter-on"{else}"filter-off"{/if}
11 ><i class="fa fa-key"></i></a>
12 {/if}
13 <a href="?untaggedonly" title="{'Filter untagged links'|t}"
14 class={if="$untaggedonly"}"filter-on"{else}"filter-off"{/if}
15 ><i class="fa fa-tag"></i></a>
16 <a href="#" class="filter-off fold-all pure-u-lg-0" title="{'Fold all'|t}">
17 <i class="fa fa-chevron-up"></i>
18 </a>
19 {loop="$action_plugin"}
20 {$value.attr.class=isset($value.attr.class) ? $value.attr.class : ''}
21 {$value.attr.class=!empty($value.on) ? $value.attr.class .' filter-on' : $value.attr.class .' filter-off'}
22 <a
23 {loop="$value.attr"}
24 {$key}="{$value}"
25 {/loop}>
26 {$value.html}
27 </a>
28 {/loop}
29 {/if}
30 </div>
31
32
33 <div class="linklist-pages pure-u-1-3">
34 {if="$next_page_url"}
35 <a href="{$next_page_url}" class="paging_newer">
36 <i class="fa fa-arrow-circle-left"></i>
37 </a>
38 {/if}
39 {if="$page_max>1"}<span class="strong">{$page_current} / {$page_max}</span>{/if}
40 {if="$previous_page_url"}
41 <a href="{$previous_page_url}" class="paging_older">
42 <i class="fa fa-arrow-circle-right"></i>
43 </a>
44 {/if}
45
46 </div>
47
48 <div class="linksperpage pure-u-1-3">
49 <div class="pure-u-0 pure-u-lg-visible">{'Links per page'|t}</div>
50 <a href="?linksperpage=20">20</a>
51 <a href="?linksperpage=50">50</a>
52 <a href="?linksperpage=100">100</a>
53 <form method="GET" class="pure-u-0 pure-u-lg-visible">
54 <input type="text" name="linksperpage" placeholder="133">
55 </form>
56 <a href="#" class="filter-off fold-all pure-u-0 pure-u-lg-visible" title="{'Fold all'|t}">
57 <i class="fa fa-chevron-up"></i>
58 </a>
59 </div>
60 </div>
61</div>
diff --git a/tpl/default/loginform.html b/tpl/default/loginform.html
new file mode 100644
index 00000000..5777a218
--- /dev/null
+++ b/tpl/default/loginform.html
@@ -0,0 +1,51 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8{if="!ban_canLogin($conf)"}
9<div class="pure-g pure-alert pure-alert-error pure-alert-closable center">
10 <div class="pure-u-2-24"></div>
11 <div class="pure-u-20-24">
12 {'You have been banned after too many failed login attempts. Try again later.'|t}
13 </div>
14 <div class="pure-u-2-24">
15 <i class="fa fa-times pure-alert-close"></i>
16 </div>
17</div>
18{else}
19 <div class="pure-g">
20 <div class="pure-u-lg-1-3 pure-u-1-24"></div>
21 <div id="login-form" class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24">
22 <form method="post" name="loginform">
23 <h2 class="window-title">{'Login'|t}</h2>
24 <div>
25 <input type="text" name="login" placeholder="{'Username'|t}"
26 {if="!empty($username)"}value="{$username}"{/if} class="autofocus" tabindex="20">
27 </div>
28 <div>
29 <input type="password" name="password" placeholder="{'Password'|t}" class="autofocus" tabindex="21">
30 </div>
31 <div class="remember-me">
32 <input type="checkbox" name="longlastingsession" id="longlastingsessionform"
33 {if="$remember_user_default"}checked="checked"{/if}
34 tabindex="22">
35 <label for="longlastingsessionform">{'Remember me'|t}</label>
36 </div>
37 <div>
38 <input type="submit" value="{'Login'|t}" class="bigbutton" tabindex="23">
39 </div>
40 <input type="hidden" name="token" value="{$token}">
41 {if="$returnurl"}<input type="hidden" name="returnurl" value="{$returnurl}">{/if}
42 </form>
43 </div>
44 <div class="pure-u-lg-1-3 pure-u-1-8"></div>
45 </div>
46{/if}
47
48{include="page.footer"}
49</body>
50</html>
51
diff --git a/tpl/opensearch.html b/tpl/default/opensearch.html
index 3fcc30b7..3fcc30b7 100644
--- a/tpl/opensearch.html
+++ b/tpl/default/opensearch.html
diff --git a/tpl/default/page.footer.html b/tpl/default/page.footer.html
new file mode 100644
index 00000000..659e8c7f
--- /dev/null
+++ b/tpl/default/page.footer.html
@@ -0,0 +1,43 @@
1</div>
2
3<div class="pure-g">
4 <div class="pure-u-2-24"></div>
5 <div id="footer" class="pure-u-20-24">
6 <strong><a href="https://github.com/shaarli/Shaarli">Shaarli</a></strong>
7 {if="isLoggedIn()===true"}
8 {$version}
9 {/if}
10 &middot;
11 {'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t} &middot;
12 <a href="doc/html/index.html" rel="nofollow">{'Documentation'|t}</a>
13 {loop="$plugins_footer.text"}
14 {$value}
15 {/loop}
16 </div>
17 <div class="pure-u-2-24"></div>
18</div>
19
20<input type="hidden" name="token" value="{$token}" id="token" />
21
22{loop="$plugins_footer.endofpage"}
23 {$value}
24{/loop}
25
26{loop="$plugins_footer.js_files"}
27 <script src="{$value}#"></script>
28{/loop}
29
30<div id="js-translations" class="hidden">
31 <span id="translation-fold">{'Fold'|t}</span>
32 <span id="translation-fold-all">{'Fold all'|t}</span>
33 <span id="translation-expand">{'Expand'|t}</span>
34 <span id="translation-expand-all">{'Expand all'|t}</span>
35 <span id="translation-delete-link">{'Are you sure you want to delete this link?'|t}</span>
36 <span id="translation-shaarli-desc">
37 {'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t}
38 </span>
39</div>
40
41<script src="js/shaarli.js?v={$version_hash}"></script>
42<script src="inc/awesomplete.js?v={$version_hash}#"></script>
43<script src="inc/awesomplete-multiple-tags.js?v={$version_hash}#"></script>
diff --git a/tpl/default/page.header.html b/tpl/default/page.header.html
new file mode 100644
index 00000000..6f15c1c5
--- /dev/null
+++ b/tpl/default/page.header.html
@@ -0,0 +1,172 @@
1<div class="shaarli-menu pure-g" id="shaarli-menu">
2 <div class="pure-u-lg-0 pure-u-1">
3 <div class="pure-menu">
4 <a href="{$titleLink}" class="pure-menu-link shaarli-title" id="shaarli-title-mobile">
5 <img src="img/icon.png" width="16" height="16" class="head-logo" alt="logo" />
6 {$shaarlititle}
7 </a>
8 <a href="#" class="menu-toggle" id="menu-toggle"><s class="bar"></s><s class="bar"></s></a>
9 </div>
10 </div>
11 <div class="pure-u-1">
12 <div class="pure-menu menu-transform pure-menu-horizontal pure-g">
13 <ul class="pure-menu-list pure-u-lg-5-6 pure-u-1">
14 <li class="pure-menu-item pure-u-0 pure-u-lg-visible">
15 <a href="{$titleLink}" class="pure-menu-link shaarli-title" id="shaarli-title-desktop">
16 <img src="img/icon.png" width="16" height="16" class="head-logo" alt="logo" />
17 {$shaarlititle}
18 </a>
19 </li>
20 {if="isLoggedIn() || $openshaarli"}
21 <li class="pure-menu-item">
22 <a href="?do=addlink" class="pure-menu-link" id="shaarli-menu-shaare">
23 <i class="fa fa-plus" ></i> {'Shaare'|t}
24 </a>
25 </li>
26 <li class="pure-menu-item" id="shaarli-menu-tools">
27 <a href="?do=tools" class="pure-menu-link">{'Tools'|t}</a>
28 </li>
29 {/if}
30 <li class="pure-menu-item" id="shaarli-menu-tags">
31 <a href="?do=tagcloud" class="pure-menu-link">{'Tag cloud'|t}</a>
32 </li>
33 <li class="pure-menu-item" id="shaarli-menu-picwall">
34 <a href="?do=picwall{$searchcrits}" class="pure-menu-link">{'Picture wall'|t}</a>
35 </li>
36 <li class="pure-menu-item" id="shaarli-menu-daily">
37 <a href="?do=daily" class="pure-menu-link">{'Daily'|t}</a>
38 </li>
39 {loop="$plugins_header.buttons_toolbar"}
40 <li class="pure-menu-item shaarli-menu-plugin">
41 <a
42 {$value.attr.class=isset($value.class) ? $value.attr.class . ' pure-menu-link' : 'pure-menu-link'}
43 {loop="$value.attr"}
44 {$key}="{$value}"
45 {/loop}>
46 {$value.html}
47 </a>
48 </li>
49 {/loop}
50 <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-rss">
51 <a href="?do={$feed_type}{$searchcrits}" class="pure-menu-link">{'RSS Feed'|t}</a>
52 </li>
53 {if="isLoggedIn()"}
54 <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-logout">
55 <a href="?do=logout" class="pure-menu-link">{'Logout'|t}</a>
56 </li>
57 {else}
58 <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-login">
59 <a href="?do=login" class="pure-menu-link">{'Login'|t}</a>
60 </li>
61 {/if}
62 </ul>
63 <div class="header-buttons pure-u-lg-1-6 pure-u-0 pure-u-lg-visible">
64 <ul class="pure-menu-list">
65 <li class="pure-menu-item" id="shaarli-menu-desktop-search">
66 <a href="#" class="pure-menu-link subheader-opener"
67 data-open-id="search"
68 id="search-button" title="{'Search'|t}">
69 <i class="fa fa-search"></i>
70 </a>
71 </li>
72 <li class="pure-menu-item" id="shaarli-menu-desktop-rss">
73 <a href="?do={$feed_type}{$searchcrits}" class="pure-menu-link" title="{'RSS Feed'|t}">
74 <i class="fa fa-rss"></i>
75 </a>
76 </li>
77 {if="!isLoggedIn()"}
78 <li class="pure-menu-item" id="shaarli-menu-desktop-login">
79 <a href="?do=login" class="pure-menu-link"
80 data-open-id="header-login-form"
81 id="login-button" title="{'Login'|t}">
82 <i class="fa fa-user"></i>
83 </a>
84 </li>
85 {else}
86 <li class="pure-menu-item" id="shaarli-menu-desktop-logout">
87 <a href="?do=logout" class="pure-menu-link" title="{'Logout'|t}">
88 <i class="fa fa-sign-out"></i>
89 </a>
90 </li>
91 {/if}
92 </ul>
93 </div>
94 </div>
95 </div>
96</div>
97
98<div id="content">
99 <div id="search" class="subheader-form">
100 <form method="GET" class="pure-form searchform" name="searchform">
101 <input type="text" tabindex="1" id="searchform_value" name="searchterm" placeholder="{'Search text'|t}"
102 {if="!empty($search_term)"}
103 value="{$search_term}"
104 {/if}
105 >
106 <input type="text" tabindex="2" name="searchtags" id="tagfilter_value" placeholder="{'Filter by tag'|t}"
107 {if="!empty($search_tags)"}
108 value="{$search_tags}"
109 {/if}
110 autocomplete="off" data-multiple data-autofirst data-minChars="1"
111 data-list="{loop="$tags"}{$key}, {/loop}"
112 >
113 <button type="submit" class="search-button"><i class="fa fa-search"></i></button>
114 </form>
115 </div>
116 <div id="actions" class="subheader-form">
117 <div class="pure-g">
118 <div class="pure-u-1">
119 <a href="" id="actions-delete" class="button">Delete</a>
120 </div>
121 </div>
122 </div>
123 {if="!isLoggedIn()"}
124 <form method="post" name="loginform">
125 <div class="subheader-form" id="header-login-form">
126 <input type="text" name="login" placeholder="{'Username'|t}" tabindex="3">
127 <input type="password" name="password" placeholder="{'Password'|t}" tabindex="5">
128 <div class="remember-me">
129 <input type="checkbox" name="longlastingsession" id="longlastingsession" tabindex="6" checked>
130 <label for="longlastingsession">{'Remember me'|t}</label>
131 </div>
132 <input type="hidden" name="token" value="{$token}">
133 <input type="hidden" name="returnurl">
134 <input type="submit" value="Login" tabindex="7">
135 </div>
136 </form>
137 {/if}
138{if="!empty($newVersion) || !empty($versionError)"}
139 <div class="pure-g new-version-message pure-alert pure-alert-warning pure-alert-closable">
140 <div class="pure-u-2-24"></div>
141 {if="$newVersion"}
142 <div class="pure-u-20-24">
143 Shaarli {$newVersion}
144 <a href="https://github.com/shaarli/Shaarli/releases">{'is available'|t}</a>.
145 </div>
146 {/if}
147 {if="$versionError"}
148 <div class="pure-u-20-24">
149 {'Error'|t}: {$versionError}
150 </div>
151 {/if}
152 <div class="pure-u-2-24">
153 <i id="new-version-dismiss" class="fa fa-times pure-alert-close"></i>
154 </div>
155 </div>
156{/if}
157
158{if="!empty($plugin_errors) && isLoggedIn()"}
159 <div class="pure-g new-version-message pure-alert pure-alert-error pure-alert-closable" id="shaarli-errors-alert">
160 <div class="pure-u-2-24"></div>
161 <div class="pure-u-20-24">
162 {loop="plugin_errors"}
163 <p>{$value}</p>
164 {/loop}
165 </div>
166 <div class="pure-u-2-24">
167 <i class="fa fa-times pure-alert-close"></i>
168 </div>
169 </div>
170{/if}
171
172 <div class="clear"></div>
diff --git a/tpl/default/picwall.html b/tpl/default/picwall.html
new file mode 100644
index 00000000..248e56df
--- /dev/null
+++ b/tpl/default/picwall.html
@@ -0,0 +1,45 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9<div class="pure-g">
10 <div class="pure-u-lg-1-6 pure-u-1-24"></div>
11 <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor">
12 {$countPics=count($linksToDisplay)}
13 <h2 class="window-title">{'Picture Wall'|t} - {$countPics} {'pics'|t}</h2>
14
15 <div id="plugin_zone_start_picwall" class="plugin_zone">
16 {loop="$plugin_start_zone"}
17 {$value}
18 {/loop}
19 </div>
20
21 <div id="picwall_container">
22 {loop="$linksToDisplay"}
23 <div class="picwall_pictureframe">
24 {$value.thumbnail}<a href="{$value.real_url}"><span class="info">{$value.title}</span></a>
25 {loop="$value.picwall_plugin"}
26 {$value}
27 {/loop}
28 </div>
29 {/loop}
30 <div class="clear"></div>
31 </div>
32
33 <div id="plugin_zone_end_picwall" class="plugin_zone">
34 {loop="$plugin_end_zone"}
35 {$value}
36 {/loop}
37 </div>
38 </div>
39</div>
40
41{include="page.footer"}
42<script src="inc/blazy-1.3.1.min.js#"></script>
43</body>
44</html>
45
diff --git a/tpl/default/pluginsadmin.html b/tpl/default/pluginsadmin.html
new file mode 100644
index 00000000..b2d7cdc5
--- /dev/null
+++ b/tpl/default/pluginsadmin.html
@@ -0,0 +1,182 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9<noscript>
10 <div class="pure-g new-version-message pure-alert pure-alert-warning">
11 <div class="pure-u-2-24"></div>
12 <div class="pure-u-20-24">
13 {'You need to enable Javascript to change plugin loading order.'|t}
14 </div>
15 </div>
16 <div class="clear"></div>
17</noscript>
18
19<form method="POST" action="?do=save_pluginadmin" name="pluginform" id="pluginform">
20 <div class="pure-g">
21 <div class="pure-u-lg-1-8 pure-u-1-24"></div>
22 <div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete">
23 <h2 class="window-title">{'Plugin administration'|t}</h2>
24
25 <section id="enabled_plugins">
26 <h3 class="window-subtitle">{'Enabled Plugins'|t}</h3>
27
28 <div>
29 {if="count($enabledPlugins)==0"}
30 <p class="center">{'No plugin enabled.'|t}</p>
31 {else}
32 <table id="plugin_table">
33 <thead>
34 <tr>
35 <th class="center">{'Disable'|t}</th>
36 <th>{'Name'|t}</th>
37 <th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
38 <th class="center">{'Order'|t}</th>
39 </tr>
40 </thead>
41 <tbody>
42 {loop="$enabledPlugins"}
43 <tr data-line="{$key}" data-order="{$counter}" class="main-row">
44 <td class="center"><input type="checkbox" name="{$key}" id="{$key}" checked="checked"></td>
45 <td class="center">
46 <label for="{$key}"><strong>{function="str_replace('_', ' ', $key)"}</strong></label>
47 </td>
48 <td><div class="pure-u-0 pure-u-lg-visible"><label for="{$key}">{$value.description}</label></div></td>
49 <td class="center">
50 {if="count($enabledPlugins)>1"}
51 <a href="#" class="order order-up">▲</a>
52 <a href="#" class="order order-down">▼</a>
53 {/if}
54 <input type="hidden" name="order_{$key}" value="{$counter}">
55 </td>
56 </tr>
57 <tr data-line="{$key}" data-order="{$counter}" class="pure-u-lg-0 mobile-row">
58 <td colspan="4"><label for="{$key}">{$value.description}</label></td>
59 </tr>
60 {/loop}
61 </tbody>
62 <tfoot>
63 <tr>
64 <th class="center">{'Disable'|t}</th>
65 <th>{'Name'|t}</th>
66 <th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
67 <th class="center">{'Order'|t}</th>
68 </tr>
69 </tfoot>
70 </table>
71 {/if}
72 </div>
73 </section>
74
75 <section id="disabled_plugins">
76 <h3 class="window-subtitle">{'Disabled Plugins'|t}</h3>
77
78 <div>
79 {if="count($disabledPlugins)==0"}
80 <p class="center">{'No plugin disabled.'|t}</p>
81 {else}
82 <table>
83 <thead>
84 <tr>
85 <th class="center">{'Enable'|t}</th>
86 <th>{'Name'|t}</th>
87 <th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
88 </tr>
89 </thead>
90 <tbody>
91 {loop="$disabledPlugins"}
92 <tr class="main-row">
93 <td class="center"><input type="checkbox" name="{$key}" id="{$key}"></td>
94 <td class="center">
95 <label for="{$key}"><strong>{function="str_replace('_', ' ', $key)"}</strong></label>
96 </td>
97 <td><div class="pure-u-0 pure-u-lg-visible">
98 <label for="{$key}">{$value.description}</label>
99 </div></td>
100 </tr>
101 <tr class="pure-u-lg-0 mobile-row">
102 <td colspan="3"><label for="{$key}">{$value.description}</label></td>
103 </tr>
104 {/loop}
105 </tbody>
106 <tfoot>
107 <tr>
108 <th class="center">{'Enable'|t}</th>
109 <th>{'Name'|t}</th>
110 <th><div class="pure-u-0 pure-u-lg-visible">{'Description'|t}</div></th>
111 </tr>
112 </tfoot>
113 </table>
114 {/if}
115 </div>
116 </section>
117
118 <div class="center more">
119 {"More plugins available"|t}
120 <a href="doc/Community-&-Related-software.html#third-party-plugins">{"in the documentation"|t}</a>.
121 </div>
122 <div class="center">
123 <input type="submit" value="{'Save'|t}" name="save">
124 </div>
125 </div>
126 </div>
127 <input type="hidden" name="token" value="{$token}">
128</form>
129
130<form action="?do=save_pluginadmin" method="POST">
131 <div class="pure-g">
132 <div class="pure-u-lg-1-8 pure-u-1-24"></div>
133 <div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-light">
134 <h2 class="window-title">{'Plugin configuration'|t}</h2>
135 <section id="plugin_parameters">
136 <div>
137 {if="count($enabledPlugins)==0"}
138 <p class="center">{'No plugin enabled.'|t}</p>
139 {else}
140 {$nbParameters=0}
141 {loop="$enabledPlugins"}
142 {$nbParameters=$nbParameters+count($value.parameters)}
143 {if="count($value.parameters) > 0"}
144 <div class="plugin_parameters">
145 <h3 class="window-subtitle">{function="str_replace('_', ' ', $key)"}</h3>
146 {loop="$value.parameters"}
147 <div class="plugin_parameter">
148 <p class="float_label">
149 <label for="{$key}">
150 <code>{$key}</code>
151 {if="isset($value.desc)"}
152 &middot; {$value.desc}
153 {/if}
154 </label>
155 </p>
156 <div class="float_input">
157 <input name="{$key}" value="{$value.value}" id="{$key}" type="text" />
158 </div>
159 </div>
160 {/loop}
161 </div>
162 {/if}
163 {/loop}
164 {if="$nbParameters===0"}
165 <p class="center">{'No parameter available.'|t}</p>
166 {else}
167 <div class="center">
168 <input type="submit" name="parameters_form" value="{'Save'|t}"/>
169 </div>
170 {/if}
171 {/if}
172 </div>
173 </section>
174 </div>
175 </div>
176</form>
177
178{include="page.footer"}
179<script src="inc/plugin_admin.js#"></script>
180
181</body>
182</html>
diff --git a/tpl/default/tag.cloud.html b/tpl/default/tag.cloud.html
new file mode 100644
index 00000000..12701465
--- /dev/null
+++ b/tpl/default/tag.cloud.html
@@ -0,0 +1,71 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9{include="tag.sort"}
10
11<div class="pure-g">
12 <div class="pure-u-lg-1-6 pure-u-1-24"></div>
13 <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor">
14 {$countTags=count($tags)}
15 <h2 class="window-title">{'Tag cloud'|t} - {$countTags} {'tags'|t}</h2>
16 {if="!empty($search_tags)"}
17 <p class="center">
18 <a href="?searchtags={$search_tags|urlencode}" class="pure-button pure-button-shaarli">
19 {'List all links with those tags'|t}
20 </a>
21 </p>
22 {/if}
23
24 <div id="search-tagcloud" class="pure-g">
25 <div class="pure-u-lg-1-4"></div>
26 <div class="pure-u-1 pure-u-lg-1-2">
27 <form method="GET">
28 <input type="hidden" name="do" value="tagcloud">
29 <input type="text" name="searchtags" placeholder="{'Filter by tag'|t}"
30 {if="!empty($search_tags)"}
31 value="{$search_tags}"
32 {/if}
33 autocomplete="off" data-multiple data-autofirst data-minChars="1"
34 data-list="{loop="$tags"}{$key}, {/loop}"
35 >
36 <button type="submit" class="search-button"><i class="fa fa-search"></i></button>
37 </form>
38 </div>
39 <div class="pure-u-lg-1-4"></div>
40 </div>
41
42 <div id="plugin_zone_start_tagcloud" class="plugin_zone">
43 {loop="$plugin_start_zone"}
44 {$value}
45 {/loop}
46 </div>
47
48 <div id="cloudtag">
49 {loop="tags"}
50 <a href="?searchtags={$key|urlencode} {$search_tags|urlencode}" style="font-size:{$value.size}em;">{$key}</a
51 ><a href="?addtag={$key|urlencode}" title="{'Filter by tag'|t}" class="count">{$value.count}</a>
52 {loop="$value.tag_plugin"}
53 {$value}
54 {/loop}
55 {/loop}
56 </div>
57
58 <div id="plugin_zone_end_tagcloud" class="plugin_zone">
59 {loop="$plugin_end_zone"}
60 {$value}
61 {/loop}
62 </div>
63 </div>
64</div>
65
66{include="tag.sort"}
67
68{include="page.footer"}
69</body>
70</html>
71
diff --git a/tpl/default/tag.list.html b/tpl/default/tag.list.html
new file mode 100644
index 00000000..7140c67a
--- /dev/null
+++ b/tpl/default/tag.list.html
@@ -0,0 +1,91 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9{include="tag.sort"}
10
11<div class="pure-g">
12 <div class="pure-u-lg-1-6 pure-u-1-24"></div>
13 <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor">
14 {$countTags=count($tags)}
15 <h2 class="window-title">{'Tag list'|t} - {$countTags} {'tags'|t}</h2>
16 {if="!empty($search_tags)"}
17 <p class="center">
18 <a href="?searchtags={$search_tags|urlencode}" class="pure-button pure-button-shaarli">
19 {'List all links with those tags'|t}
20 </a>
21 </p>
22 {/if}
23
24 <div id="search-tagcloud" class="pure-g">
25 <div class="pure-u-lg-1-4"></div>
26 <div class="pure-u-1 pure-u-lg-1-2">
27 <form method="GET">
28 <input type="hidden" name="do" value="taglist">
29 <input type="text" name="searchtags" placeholder="{'Filter by tag'|t}"
30 {if="!empty($search_tags)"}
31 value="{$search_tags}"
32 {/if}
33 autocomplete="off" data-multiple data-autofirst data-minChars="1"
34 data-list="{loop="$tags"}{$key}, {/loop}"
35 >
36 <button type="submit" class="search-button"><i class="fa fa-search"></i></button>
37 </form>
38 </div>
39 <div class="pure-u-lg-1-4"></div>
40 </div>
41
42 <div id="plugin_zone_start_tagcloud" class="plugin_zone">
43 {loop="$plugin_start_zone"}
44 {$value}
45 {/loop}
46 </div>
47
48 <div id="taglist">
49 {loop="tags"}
50 <div class="tag-list-item pure-g" data-tag="{$key}">
51 <div class="pure-u-1">
52 {if="isLoggedIn()===true"}
53 <a href="#" class="delete-tag"><i class="fa fa-trash"></i></a>&nbsp;&nbsp;
54 <a href="?do=changetag&fromtag={$key|urlencode}" class="rename-tag">
55 <i class="fa fa-pencil-square-o {$key}"></i>
56 </a>
57 {/if}
58
59 <a href="?addtag={$key|urlencode}" title="{'Filter by tag'|t}" class="count">{$value}</a>
60 <a href="?searchtags={$key|urlencode} {$search_tags|urlencode}" class="tag-link">{$key}</a>
61
62 {loop="$value.tag_plugin"}
63 {$value}
64 {/loop}
65 </div>
66 {if="isLoggedIn()===true"}
67 <div class="rename-tag-form pure-u-1">
68 <input type="text" name="{$key}" value="{$key}" class="rename-tag-input" />
69 <a href="#" class="validate-rename-tag"><i class="fa fa-check"></i></a>
70 </div>
71 {/if}
72 </div>
73 {/loop}
74 </div>
75
76 <div id="plugin_zone_end_tagcloud" class="plugin_zone">
77 {loop="$plugin_end_zone"}
78 {$value}
79 {/loop}
80 </div>
81 </div>
82</div>
83
84{if="isLoggedIn()===true"}
85 <input type="hidden" name="taglist" value="{loop="$tags"}{$key} {/loop}"
86{/if}
87
88{include="page.footer"}
89</body>
90</html>
91
diff --git a/tpl/default/tag.sort.html b/tpl/default/tag.sort.html
new file mode 100644
index 00000000..89acda0d
--- /dev/null
+++ b/tpl/default/tag.sort.html
@@ -0,0 +1,8 @@
1<div class="pure-g">
2 <div class="pure-u-1 pure-alert pure-alert-success tag-sort">
3 {'Sort by:'|t}
4 <a href="?do=tagcloud" title="cloud">{'Cloud'|t}</a> &middot;
5 <a href="?do=taglist&sort=usage" title="cloud">{'Most used'|t}</a> &middot;
6 <a href="?do=taglist&sort=alpha" title="cloud">{'Alphabetical'|t}</a>
7 </div>
8</div> \ No newline at end of file
diff --git a/tpl/default/tools.html b/tpl/default/tools.html
new file mode 100644
index 00000000..72fd58af
--- /dev/null
+++ b/tpl/default/tools.html
@@ -0,0 +1,166 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9<div class="pure-g">
10 <div class="pure-u-lg-1-3 pure-u-1-24"></div>
11 <div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light">
12 <h2 class="window-title">{'Settings'|t}</h2>
13 <div class="tools-item">
14 <a href="?do=configure" title="{'Change Shaarli settings: title, timezone, etc.'|t}">
15 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Configure your Shaarli'|t}</span>
16 </a>
17 </div>
18 <div class="tools-item">
19 <a href="?do=pluginadmin" title="{'Enable, disable and configure plugins'|t}">
20 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Plugin administration'|t}</span>
21 </a>
22 </div>
23 {if="!$openshaarli"}
24 <div class="tools-item">
25 <a href="?do=changepasswd" title="{'Change your password'|t}">
26 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Change password'|t}</span>
27 </a>
28 </div>
29 {/if}
30 <div class="tools-item">
31 <a href="?do=changetag" title="{'Rename or delete a tag in all links'|t}">
32 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Manage tags'|t}</span>
33 </a>
34 </div>
35 <div class="tools-item">
36 <a href="?do=import"
37 title="{'Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, delicious...)'|t}">
38 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Import links'|t}</span>
39 </a>
40 </div>
41 <div class="tools-item">
42 <a href="?do=export"
43 title="{'Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)'|t}">
44 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Export database'|t}</span>
45 </a>
46 </div>
47
48 {loop="$tools_plugin"}
49 <div class="tools-item">
50 {$value}
51 </div>
52 {/loop}
53 </div>
54
55
56 <div class="clear"></div>
57</div>
58
59<div class="pure-g">
60 <div class="pure-u-lg-1-3 pure-u-1-24"></div>
61 <div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light">
62 <h2 class="window-title">Bookmarklets</h2>
63 <p>
64 {'Drag one of these button to your bookmarks toolbar or right-click it and "Bookmark This Link"'|t},
65 {'then click on the bookmarklet in any page you want to share.'|t}
66 </p>
67 <div class="tools-item">
68 <a title="{'Drag this link to your bookmarks toolbar or right-click it and Bookmark This Link'|t},
69 {'then click ✚Shaare link button in any page you want to share'|t}"
70 class="bookmarklet-link"
71 href="javascript:(
72 function(){
73 var%20url%20=%20location.href;
74 var%20title%20=%20document.title%20||%20url;
75 var%20desc=document.getSelection().toString();
76 if(desc.length>4000){
77 desc=desc.substr(0,4000)+'...';
78 alert('{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}');
79 }
80 window.open(
81 '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+
82 '&amp;title='%20+%20encodeURIComponent(title)+
83 '&amp;description='%20+%20encodeURIComponent(desc)+
84 '&amp;source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
85 );
86 }
87 )();">
88 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Shaare link'|t}</span>
89 </a>
90 </div>
91 <div class="tools-item">
92 <a title="{'Drag this link to your bookmarks toolbar or right-click it and Bookmark This Link'|t},
93 {'Then click ✚Add Note button anytime to start composing a private Note (text post) to your Shaarli'|t}"
94 class="bookmarklet-link"
95 href="javascript:(
96 function(){
97 var%20desc=document.getSelection().toString();
98 if(desc.length>4000){
99 desc=desc.substr(0,4000)+'...';
100 alert('{function="str_replace(' ', '%20', t('The selected text is too long, it will be truncated.'))"}');
101 }
102 window.open(
103 '{$pageabsaddr}?private=1&amp;post='+
104 '&amp;description='%20+%20encodeURIComponent(desc)+
105 '&amp;source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
106 );
107 }
108 )();">
109 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Add Note'|t}</span>
110 </a>
111 </div>
112 </div>
113</div>
114
115{if="$sslenabled"}
116 <div class="pure-g">
117 <div class="pure-u-lg-1-3 pure-u-1-24"></div>
118 <div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light">
119 <h2 class="window-title">Firefox Social API</h2>
120 <p>{'You need to browse your Shaarli over <strong>HTTPS</strong> to use this functionality.'|t}</p>
121
122 <div class="tools-item">
123 <a title="{'Click on this button to add Shaarli to the 'Share this page' button in Firefox"
124 id="ff-social-button">
125 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Add to'|t} Firefox Social</span>
126 </a>
127 </div>
128 </div>
129 </div>
130{/if}
131
132<div class="pure-g">
133 <div class="pure-u-lg-1-3 pure-u-1-24"></div>
134 <div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light">
135 <h2 class="window-title">{'3rd party'|t}</h2>
136 <div class="tools-item">
137 <a href="https://addons.mozilla.org/fr/firefox/addon/shaarli/" title="Firefox {'Plugin'|t}">
138 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Firefox {'plugin'|t}</span>
139 </a>
140 </div>
141 <div class="tools-item">
142 <a href="https://chrome.google.com/webstore/detail/shiny-shaarli/hajdfkmbdmadjmmpkkbbcnllepomekin"
143 title="Chrome {'Plugin'|t}">
144 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Chrome {'plugin'|t}</span>
145 </a>
146 </div>
147 <div class="tools-item">
148 <a href="https://play.google.com/store/apps/details?id=com.dimtion.shaarlier&hl=fr"
149 title="Android">
150 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Android</span>
151 </a>
152 </div>
153 <div class="tools-item">
154 <a href="https://itunes.apple.com/app/ShaarliOS/id1027441388?mt=8"
155 title="iOS">
156 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">iOS</span>
157 </a>
158 </div>
159 </div>
160</div>
161
162{include="page.footer"}
163<input type="hidden" id="bookmarklet-alert"
164 value="{'Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link'|t}">
165</body>
166</html>
diff --git a/tpl/install.html b/tpl/install.html
deleted file mode 100644
index 88eb540e..00000000
--- a/tpl/install.html
+++ /dev/null
@@ -1,23 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>{include="includes"}{$timezone_js}</head>
4<body onload="document.installform.setlogin.focus();">
5<div id="install">
6 <h1>Shaarli</h1>
7 It looks like it's the first time you run Shaarli. Please configure it:<br>
8 <form method="POST" action="#" name="installform" id="installform">
9 <table>
10 <tr><td><b>Login:</b></td><td><input type="text" name="setlogin" size="30"></td></tr>
11 <tr><td><b>Password:</b></td><td><input type="password" name="setpassword" size="30"></td></tr>
12 {$timezone_html}
13 <tr><td><b>Page title:</b></td><td><input type="text" name="title" size="30"></td></tr>
14 <tr><td valign="top"><b>Update:</b></td><td>
15 <input type="checkbox" name="updateCheck" id="updateCheck" checked="checked"><label for="updateCheck">&nbsp;Notify me when a new release is ready</label></td>
16 </tr>
17 <tr><td colspan="2"><input type="submit" name="Save" value="Save config" class="bigbutton"></td></tr>
18 </table>
19 </form>
20</div>
21{include="page.footer"}
22</body>
23</html>
diff --git a/tpl/404.html b/tpl/vintage/404.html
index 53e98e2e..53e98e2e 100644
--- a/tpl/404.html
+++ b/tpl/vintage/404.html
diff --git a/tpl/addlink.html b/tpl/vintage/addlink.html
index da50f45e..da50f45e 100644
--- a/tpl/addlink.html
+++ b/tpl/vintage/addlink.html
diff --git a/tpl/changepassword.html b/tpl/vintage/changepassword.html
index c40daf9d..c40daf9d 100644
--- a/tpl/changepassword.html
+++ b/tpl/vintage/changepassword.html
diff --git a/tpl/changetag.html b/tpl/vintage/changetag.html
index 13cc5cf1..a0df3328 100644
--- a/tpl/changetag.html
+++ b/tpl/vintage/changetag.html
@@ -1,7 +1,7 @@
1<!DOCTYPE html> 1<!DOCTYPE html>
2<html> 2<html>
3<head>{include="includes"} 3<head>{include="includes"}
4 <link type="text/css" rel="stylesheet" href="../inc/awesomplete.css" /> 4 <link type="text/css" rel="stylesheet" href="inc/awesomplete.css#" />
5 <script src="inc/awesomplete.min.js#"></script> 5 <script src="inc/awesomplete.min.js#"></script>
6</head> 6</head>
7<body onload="document.changetag.fromtag.focus();"> 7<body onload="document.changetag.fromtag.focus();">
diff --git a/tpl/configure.html b/tpl/vintage/configure.html
index 983bcd08..479284eb 100644
--- a/tpl/configure.html
+++ b/tpl/vintage/configure.html
@@ -4,7 +4,6 @@
4<body onload="document.configform.title.focus();"> 4<body onload="document.configform.title.focus();">
5<div id="pageheader"> 5<div id="pageheader">
6 {include="page.header"} 6 {include="page.header"}
7 {$timezone_js}
8 <form method="POST" action="#" name="configform" id="configform"> 7 <form method="POST" action="#" name="configform" id="configform">
9 <input type="hidden" name="token" value="{$token}"> 8 <input type="hidden" name="token" value="{$token}">
10 <table id="configuration_table"> 9 <table id="configuration_table">
@@ -15,13 +14,48 @@
15 </tr> 14 </tr>
16 15
17 <tr> 16 <tr>
18 <td><b>Title link:</b></td> 17 <td><b>Home link:</b></td>
19 <td><input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}"><br/><label 18 <td><input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}"><br/><label
20 for="titleLink">(default value is: ?)</label></td> 19 for="titleLink">(default value is: ?)</label></td>
21 </tr> 20 </tr>
21
22 <tr>
23 <td><b>Theme:</b></td>
24 <td>
25 <select name="theme" id="theme">
26 {loop="$theme_available"}
27 <option value="{$value}" {if="$value===$theme"}selected{/if}>
28 {$value|ucfirst}
29 </option>
30 {/loop}
31 </select>
32 </td>
33 </tr>
34
22 <tr> 35 <tr>
23 <td><b>Timezone:</b></td> 36 <td><b>Timezone:</b></td>
24 <td>{$timezone_form}</td> 37 <td>
38 <select id="continent" name="continent">
39 {loop="$continents"}
40 {if="$key !== 'selected'"}
41 <option value="{$value}" {if="$continents.selected === $value"}selected{/if}>
42 {$value}
43 </option>
44 {/if}
45 {/loop}
46 </select>
47 <select id="city" name="city">
48 {loop="$cities"}
49 {if="$key !== 'selected'"}
50 <option value="{$value.city}"
51 {if="$cities.selected === $value.city"}selected{/if}
52 data-continent="{$value.continent}">
53 {$value.city}
54 </option>
55 {/if}
56 {/loop}
57 </select>
58 </td>
25 </tr> 59 </tr>
26 60
27 <tr> 61 <tr>
@@ -80,6 +114,20 @@
80 <label for="updateCheck">&nbsp;Notify me when a new release is ready</label> 114 <label for="updateCheck">&nbsp;Notify me when a new release is ready</label>
81 </td> 115 </td>
82 </tr> 116 </tr>
117 <tr>
118 <td valign="top"><b>Enable REST API</b></td>
119 <td>
120 <input type="checkbox" name="enableApi" id="enableApi"
121 {if="$api_enabled"}checked{/if}/>
122 <label for="enableApi">&nbsp;Allow third party software to use Shaarli such as mobile application.</label>
123 </td>
124 </tr>
125 <tr>
126 <td valign="top"><b>API secret</b></td>
127 <td>
128 <input type="text" name="apiSecret" id="apiSecret" size="50" value="{$api_secret}" />
129 </td>
130 </tr>
83 131
84 <tr> 132 <tr>
85 <td></td> 133 <td></td>
diff --git a/inc/reset.css b/tpl/vintage/css/reset.css
index e29699e2..e29699e2 100644
--- a/inc/reset.css
+++ b/tpl/vintage/css/reset.css
diff --git a/inc/shaarli.css b/tpl/vintage/css/shaarli.css
index a24d4b7c..9c72d993 100644
--- a/inc/shaarli.css
+++ b/tpl/vintage/css/shaarli.css
@@ -41,8 +41,12 @@ strong {
41 font-weight: bold; 41 font-weight: bold;
42} 42}
43 43
44.hidden {
45 display: none;
46}
47
44/* Buttons */ 48/* Buttons */
45.bigbutton { 49.bigbutton, #pageheader a.bigbutton {
46 background-color: #c0c0c0; 50 background-color: #c0c0c0;
47 background: -moz-linear-gradient(#c0c0c0, #ffffff) repeat scroll 0 0 transparent; 51 background: -moz-linear-gradient(#c0c0c0, #ffffff) repeat scroll 0 0 transparent;
48 background: -webkit-gradient(linear, 0 0, 0 bottom, from(#c0c0c0), to(#ffffff)); 52 background: -webkit-gradient(linear, 0 0, 0 bottom, from(#c0c0c0), to(#ffffff));
@@ -54,11 +58,17 @@ strong {
54 box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5); 58 box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
55 cursor: pointer; 59 cursor: pointer;
56 height: 24px; 60 height: 24px;
57 margin-left: 5px;
58 padding: 0 5px; 61 padding: 0 5px;
62 margin: 0 5px 0 0;
59 color: #606060; 63 color: #606060;
60 border-style: outset; 64 border-style: outset;
61 border-width: 1px; 65 border-width: 1px;
66 display: inline-block;
67}
68
69a.bigbutton, #pageheader a.bigbutton {
70 height: 22px;
71 line-height: 22px;
62} 72}
63 73
64.smallbutton { 74.smallbutton {
@@ -103,7 +113,7 @@ strong {
103} 113}
104 114
105#pageheader #logo { 115#pageheader #logo {
106 background-image: url('../images/logo.png'); 116 background-image: url('../../../images/logo.png');
107 background-repeat: no-repeat; 117 background-repeat: no-repeat;
108 float: left; 118 float: left;
109 margin: 0 10px 0 10px; 119 margin: 0 10px 0 10px;
@@ -803,6 +813,10 @@ div.dailyAbout img {
803 height: 14px; 813 height: 14px;
804} 814}
805 815
816div.dailyEntryPermalink {
817 float: right;
818}
819
806div.dailyTitle { 820div.dailyTitle {
807 font-weight: bold; 821 font-weight: bold;
808 font-size: 44pt; 822 font-size: 44pt;
@@ -1005,7 +1019,7 @@ div.dailyNoEntry {
1005 display: inline !important; 1019 display: inline !important;
1006 } 1020 }
1007 1021
1008 .tagfilter input.bigbutton, .searchform input.bigbutton, .addform input.bigbutton { 1022 .tagfilter input.bigbutton, .searchform input.bigbutton, .addform input.bigbutton, a.bigbutton {
1009 width: 30%; 1023 width: 30%;
1010 font-size: smaller; 1024 font-size: smaller;
1011 } 1025 }
diff --git a/tpl/daily.html b/tpl/vintage/daily.html
index eba0af3b..e86e90b1 100644
--- a/tpl/daily.html
+++ b/tpl/vintage/daily.html
@@ -28,9 +28,9 @@
28 </div> 28 </div>
29 29
30 <div class="dailyTitle"> 30 <div class="dailyTitle">
31 <img src="../images/floral_left.png" width="51" height="50" class="nomobile" alt="floral_left"> 31 <img src="images/floral_left.png" width="51" height="50" class="nomobile" alt="floral_left">
32 The Daily Shaarli 32 The Daily Shaarli
33 <img src="../images/floral_right.png" width="51" height="50" class="nomobile" alt="floral_right"> 33 <img src="images/floral_right.png" width="51" height="50" class="nomobile" alt="floral_right">
34 </div> 34 </div>
35 35
36 <div class="dailyDate"> 36 <div class="dailyDate">
@@ -50,7 +50,7 @@
50 <div class="dailyEntry"> 50 <div class="dailyEntry">
51 <div class="dailyEntryPermalink"> 51 <div class="dailyEntryPermalink">
52 <a href="?{$value.shorturl}"> 52 <a href="?{$value.shorturl}">
53 <img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"> 53 <img src="images/squiggle.png" width="25" height="26" title="permalink" alt="permalink">
54 </a> 54 </a>
55 </div> 55 </div>
56 {if="!$hide_timestamps || isLoggedIn()"} 56 {if="!$hide_timestamps || isLoggedIn()"}
@@ -94,7 +94,7 @@
94 {$value} 94 {$value}
95 {/loop} 95 {/loop}
96 </div> 96 </div>
97 <div id="closing"><img src="../images/squiggle_closing.png" width="66" height="61" alt="-"></div> 97 <div id="closing"><img src="images/squiggle_closing.png" width="66" height="61" alt="-"></div>
98</div> 98</div>
99{include="page.footer"} 99{include="page.footer"}
100</body> 100</body>
diff --git a/tpl/dailyrss.html b/tpl/vintage/dailyrss.html
index ddbd6c5e..ddbd6c5e 100644
--- a/tpl/dailyrss.html
+++ b/tpl/vintage/dailyrss.html
diff --git a/tpl/editlink.html b/tpl/vintage/editlink.html
index 870cc168..f855dfb1 100644
--- a/tpl/editlink.html
+++ b/tpl/vintage/editlink.html
@@ -1,7 +1,7 @@
1<!DOCTYPE html> 1<!DOCTYPE html>
2<html> 2<html>
3<head>{include="includes"} 3<head>{include="includes"}
4 <link type="text/css" rel="stylesheet" href="../inc/awesomplete.css" /> 4 <link type="text/css" rel="stylesheet" href="inc/awesomplete.css#" />
5</head> 5</head>
6<body 6<body
7{if="$link.title==''"}onload="document.linkform.lf_title.focus();" 7{if="$link.title==''"}onload="document.linkform.lf_title.focus();"
@@ -35,11 +35,17 @@
35 &nbsp;<label for="lf_private"><i>Private</i></label><br> 35 &nbsp;<label for="lf_private"><i>Private</i></label><br>
36 {else} 36 {else}
37 <input type="checkbox" name="lf_private" id="lf_private"> 37 <input type="checkbox" name="lf_private" id="lf_private">
38 &nbsp;<label for="lf_private"><i>Private</i></label><br> 38 &nbsp;<label for="lf_private"><i>Private</i></label><br><br>
39 {/if} 39 {/if}
40 <input type="submit" value="Save" name="save_edit" class="bigbutton"> 40 <input type="submit" value="Save" name="save_edit" class="bigbutton">
41 <input type="submit" value="Cancel" name="cancel_edit" class="bigbutton"> 41 <input type="submit" value="Cancel" name="cancel_edit" class="bigbutton">
42 {if="!$link_is_new"}<input type="submit" value="Delete" name="delete_link" class="bigbutton delete" onClick="return confirmDeleteLink();">{/if} 42 {if="!$link_is_new && isset($link.id)"}
43 <a href="?delete_link&amp;lf_linkdate={$link.id}&amp;token={$token}"
44 name="delete_link" class="bigbutton"
45 onClick="return confirmDeleteLink();">
46 {'Delete'|t}
47 </a>
48 {/if}
43 <input type="hidden" name="token" value="{$token}"> 49 <input type="hidden" name="token" value="{$token}">
44 {if="$http_referer"}<input type="hidden" name="returnurl" value="{$http_referer}">{/if} 50 {if="$http_referer"}<input type="hidden" name="returnurl" value="{$http_referer}">{/if}
45 </form> 51 </form>
diff --git a/tpl/export.bookmarks.html b/tpl/vintage/export.bookmarks.html
index 127a5c20..127a5c20 100644
--- a/tpl/export.bookmarks.html
+++ b/tpl/vintage/export.bookmarks.html
diff --git a/tpl/export.html b/tpl/vintage/export.html
index 67c3d05f..67c3d05f 100644
--- a/tpl/export.html
+++ b/tpl/vintage/export.html
diff --git a/tpl/vintage/feed.atom.html b/tpl/vintage/feed.atom.html
new file mode 100644
index 00000000..49798e85
--- /dev/null
+++ b/tpl/vintage/feed.atom.html
@@ -0,0 +1,42 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<feed xmlns="http://www.w3.org/2005/Atom">
3 <title>{$pagetitle}</title>
4 <subtitle>Shaared links</subtitle>
5 {if="$show_dates"}
6 <updated>{$last_update}</updated>
7 {/if}
8 <link rel="self" href="{$self_link}#" />
9 <link rel="search" type="application/opensearchdescription+xml" href="{$index_url}?do=opensearch#"
10 title="Shaarli search - {$shaarlititle}" />
11 {loop="$feed_plugins_header"}
12 {$value}
13 {/loop}
14 <author>
15 <name>{$index_url}</name>
16 <uri>{$index_url}</uri>
17 </author>
18 <id>{$index_url}</id>
19 <generator>Shaarli</generator>
20 {loop="$links"}
21 <entry>
22 <title>{$value.title}</title>
23 {if="$usepermalinks"}
24 <link href="{$value.guid}#" />
25 {else}
26 <link href="{$value.url}#" />
27 {/if}
28 <id>{$value.guid}</id>
29 {if="$show_dates"}
30 <published>{$value.pub_iso_date}</published>
31 <updated>{$value.up_iso_date}</updated>
32 {/if}
33 <content type="html" xml:lang="{$language}"><![CDATA[{$value.description}]]></content>
34 {loop="$value.taglist"}
35 <category scheme="{$index_url}?searchtags=" term="{$value|strtolower}" label="{$value}" />
36 {/loop}
37 {loop="$value.feed_plugins"}
38 {$value}
39 {/loop}
40 </entry>
41 {/loop}
42</feed>
diff --git a/tpl/vintage/feed.rss.html b/tpl/vintage/feed.rss.html
new file mode 100644
index 00000000..ee3fef88
--- /dev/null
+++ b/tpl/vintage/feed.rss.html
@@ -0,0 +1,39 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
3 <channel>
4 <title>{$pagetitle}</title>
5 <link>{$index_url}</link>
6 <description>Shaared links</description>
7 <language>{$language}</language>
8 <copyright>{$index_url}</copyright>
9 <generator>Shaarli</generator>
10 <atom:link rel="self" href="{$self_link}" />
11 <atom:link rel="search" type="application/opensearchdescription+xml" href="{$index_url}?do=opensearch#"
12 title="Shaarli search - {$shaarlititle}" />
13 {loop="$feed_plugins_header"}
14 {$value}
15 {/loop}
16 {loop="$links"}
17 <item>
18 <title>{$value.title}</title>
19 <guid isPermaLink="{if="$usepermalinks"}true{else}false{/if}">{$value.guid}</guid>
20 {if="$usepermalinks"}
21 <link>{$value.guid}</link>
22 {else}
23 <link>{$value.url}</link>
24 {/if}
25 {if="$show_dates"}
26 <pubDate>{$value.pub_iso_date}</pubDate>
27 <atom:modified>{$value.up_iso_date}</atom:modified>
28 {/if}
29 <description><![CDATA[{$value.description}]]></description>
30 {loop="$value.taglist"}
31 <category domain="{$index_url}?searchtags=">{$value}</category>
32 {/loop}
33 {loop="$value.feed_plugins"}
34 {$value}
35 {/loop}
36 </item>
37 {/loop}
38 </channel>
39</rss>
diff --git a/images/50pc_transparent.png b/tpl/vintage/images/50pc_transparent.png
index 8d8f99de..8d8f99de 100644
--- a/images/50pc_transparent.png
+++ b/tpl/vintage/images/50pc_transparent.png
Binary files differ
diff --git a/images/Paper_texture_v5_by_bashcorpo_w1000.jpg b/tpl/vintage/images/Paper_texture_v5_by_bashcorpo_w1000.jpg
index dd8e67ac..dd8e67ac 100644
--- a/images/Paper_texture_v5_by_bashcorpo_w1000.jpg
+++ b/tpl/vintage/images/Paper_texture_v5_by_bashcorpo_w1000.jpg
Binary files differ
diff --git a/images/calendar.png b/tpl/vintage/images/calendar.png
index 81c74519..81c74519 100644
--- a/images/calendar.png
+++ b/tpl/vintage/images/calendar.png
Binary files differ
diff --git a/images/floral_left.png b/tpl/vintage/images/floral_left.png
index f09a861d..f09a861d 100644
--- a/images/floral_left.png
+++ b/tpl/vintage/images/floral_left.png
Binary files differ
diff --git a/images/floral_right.png b/tpl/vintage/images/floral_right.png
index 0dfb6112..0dfb6112 100644
--- a/images/floral_right.png
+++ b/tpl/vintage/images/floral_right.png
Binary files differ
diff --git a/images/private.png b/tpl/vintage/images/private.png
index 8919d658..8919d658 100644
--- a/images/private.png
+++ b/tpl/vintage/images/private.png
Binary files differ
diff --git a/images/squiggle2.png b/tpl/vintage/images/squiggle.png
index c795f0a3..c795f0a3 100644
--- a/images/squiggle2.png
+++ b/tpl/vintage/images/squiggle.png
Binary files differ
diff --git a/images/squiggle_closing.png b/tpl/vintage/images/squiggle_closing.png
index 3f9d02b1..3f9d02b1 100644
--- a/images/squiggle_closing.png
+++ b/tpl/vintage/images/squiggle_closing.png
Binary files differ
diff --git a/images/tag_blue.png b/tpl/vintage/images/tag_blue.png
index 7ec902fc..7ec902fc 100644
--- a/images/tag_blue.png
+++ b/tpl/vintage/images/tag_blue.png
Binary files differ
diff --git a/tpl/import.html b/tpl/vintage/import.html
index 071e1160..bb9e4a56 100644
--- a/tpl/import.html
+++ b/tpl/vintage/import.html
@@ -5,7 +5,7 @@
5<div id="pageheader"> 5<div id="pageheader">
6 {include="page.header"} 6 {include="page.header"}
7 <div id="uploaddiv"> 7 <div id="uploaddiv">
8 Import Netscape HTML bookmarks (as exported from Firefox/Chrome/Opera/Delicious/Diigo...) (Max: {$maxfilesize} bytes). 8 Import Netscape HTML bookmarks (as exported from Firefox/Chrome/Opera/Delicious/Diigo...) (Max: {$maxfilesize}).
9 <form method="POST" action="?do=import" enctype="multipart/form-data" 9 <form method="POST" action="?do=import" enctype="multipart/form-data"
10 name="uploadform" id="uploadform"> 10 name="uploadform" id="uploadform">
11 <input type="hidden" name="token" value="{$token}"> 11 <input type="hidden" name="token" value="{$token}">
diff --git a/tpl/includes.html b/tpl/vintage/includes.html
index 7b2997ce..17b78b17 100644
--- a/tpl/includes.html
+++ b/tpl/vintage/includes.html
@@ -6,9 +6,9 @@
6<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" /> 6<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
7<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" /> 7<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
8<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" /> 8<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />
9<link type="text/css" rel="stylesheet" href="../inc/reset.css" /> 9<link type="text/css" rel="stylesheet" href="css/reset.css" />
10<link type="text/css" rel="stylesheet" href="../inc/shaarli.css" /> 10<link type="text/css" rel="stylesheet" href="css/shaarli.css" />
11{if="is_file('inc/user.css')"}<link type="text/css" rel="stylesheet" href="../inc/user.css" />{/if} 11{if="is_file('data/user.css')"}<link type="text/css" rel="stylesheet" href="data/user.css#" />{/if}
12{loop="$plugins_includes.css_files"} 12{loop="$plugins_includes.css_files"}
13<link type="text/css" rel="stylesheet" href="{$value}#"/> 13<link type="text/css" rel="stylesheet" href="{$value}#"/>
14{/loop} 14{/loop}
diff --git a/tpl/vintage/install.html b/tpl/vintage/install.html
new file mode 100644
index 00000000..aca890d6
--- /dev/null
+++ b/tpl/vintage/install.html
@@ -0,0 +1,59 @@
1<!DOCTYPE html>
2<html>
3<head>{include="includes"}</head>
4<body onload="document.installform.setlogin.focus();">
5<div id="install">
6 <h1>Shaarli</h1>
7 It looks like it's the first time you run Shaarli. Please configure it:<br>
8 <form method="POST" action="#" name="installform" id="installform">
9 <table>
10 <tr><td><b>Login:</b></td><td><input type="text" name="setlogin" size="30"></td></tr>
11 <tr><td><b>Password:</b></td><td><input type="password" name="setpassword" size="30"></td></tr>
12 <tr>
13 <td><b>Timezone:</b></td>
14 <td>
15 <select id="continent" name="continent">
16 {loop="$continents"}
17 {if="$key !== 'selected'"}
18 <option value="{$value}" {if="$continents.selected === $value"}selected{/if}>
19 {$value}
20 </option>
21 {/if}
22 {/loop}
23 </select>
24 <select id="city" name="city">
25 {loop="$cities"}
26 {if="$key !== 'selected'"}
27 <option value="{$value.city}"
28 {if="$cities.selected === $value.city"}selected{/if}
29 data-continent="{$value.continent}">
30 {$value.city}
31 </option>
32 {/if}
33 {/loop}
34 </select>
35 </td>
36 </tr>
37 <tr><td><b>Page title:</b></td><td><input type="text" name="title" size="30"></td></tr>
38 <tr><td valign="top"><b>Update:</b></td><td>
39 <input type="checkbox" name="updateCheck" id="updateCheck" checked="checked"><label for="updateCheck">&nbsp;Notify me when a new release is ready</label></td>
40 </tr>
41 <tr>
42 <td valign="top">
43 <b>API:</b>
44 </td>
45 <td>
46 <input type="checkbox" name="enableApi" id="enableApi" checked="checked">
47 <label for="enableApi">
48 &nbsp;Enable Shaarli's REST API.
49 Allow third party software to use Shaarli such as mobile application.
50 </label>
51 </td>
52 </tr>
53 <tr><td colspan="2"><input type="submit" name="Save" value="Save config" class="bigbutton"></td></tr>
54 </table>
55 </form>
56</div>
57{include="page.footer"}
58</body>
59</html>
diff --git a/tpl/vintage/js/shaarli.js b/tpl/vintage/js/shaarli.js
new file mode 100644
index 00000000..9bcc96fb
--- /dev/null
+++ b/tpl/vintage/js/shaarli.js
@@ -0,0 +1,32 @@
1window.onload = function () {
2 var continent = document.getElementById('continent');
3 var city = document.getElementById('city');
4 if (continent != null && city != null) {
5 continent.addEventListener('change', function(event) {
6 hideTimezoneCities(city, continent.options[continent.selectedIndex].value, true);
7 });
8 hideTimezoneCities(city, continent.options[continent.selectedIndex].value, false);
9 }
10};
11
12/**
13 * Add the class 'hidden' to city options not attached to the current selected continent.
14 *
15 * @param cities List of <option> elements
16 * @param currentContinent Current selected continent
17 * @param reset Set to true to reset the selected value
18 */
19function hideTimezoneCities(cities, currentContinent, reset = false) {
20 var first = true;
21 [].forEach.call(cities, function(option) {
22 if (option.getAttribute('data-continent') != currentContinent) {
23 option.className = 'hidden';
24 } else {
25 option.className = '';
26 if (reset === true && first === true) {
27 option.setAttribute('selected', 'selected');
28 first = false;
29 }
30 }
31 });
32}
diff --git a/tpl/linklist.html b/tpl/vintage/linklist.html
index 0f1a5e8c..8458caa1 100644
--- a/tpl/linklist.html
+++ b/tpl/vintage/linklist.html
@@ -1,7 +1,7 @@
1<!DOCTYPE html> 1<!DOCTYPE html>
2<html> 2<html>
3<head> 3<head>
4 <link type="text/css" rel="stylesheet" href="../inc/awesomplete.css" /> 4 <link type="text/css" rel="stylesheet" href="inc/awesomplete.css#" />
5 {include="includes"} 5 {include="includes"}
6</head> 6</head>
7<body> 7<body>
@@ -55,7 +55,7 @@
55 55
56 {if="count($links)==0"} 56 {if="count($links)==0"}
57 <div id="searchcriteria">Nothing found.</div> 57 <div id="searchcriteria">Nothing found.</div>
58 {elseif="!empty($search_term) or !empty($search_tags)"} 58 {elseif="!empty($search_term) or $search_tags !== ''"}
59 <div id="searchcriteria"> 59 <div id="searchcriteria">
60 {$result_count} results 60 {$result_count} results
61 {if="!empty($search_term)"} 61 {if="!empty($search_term)"}
@@ -69,6 +69,10 @@
69 <a href="?removetag={function="urlencode($value)"}">{$value} <span class="remove">x</span></a> 69 <a href="?removetag={function="urlencode($value)"}">{$value} <span class="remove">x</span></a>
70 </span> 70 </span>
71 {/loop} 71 {/loop}
72 {elseif="$search_tags === false"}
73 <span class="linktag" title="Remove tag">
74 <a href="?">untagged <span class="remove">x</span></a>
75 </span>
72 {/if} 76 {/if}
73 </div> 77 </div>
74 {/if} 78 {/if}
@@ -84,7 +88,7 @@
84 <input type="hidden" name="edit_link" value="{$value.id}"> 88 <input type="hidden" name="edit_link" value="{$value.id}">
85 <input type="image" alt="Edit" src="images/edit_icon.png#" title="Edit" class="button_edit"> 89 <input type="image" alt="Edit" src="images/edit_icon.png#" title="Edit" class="button_edit">
86 </form><br> 90 </form><br>
87 <form method="POST" class="buttoneditform"> 91 <form method="GET" class="buttoneditform">
88 <input type="hidden" name="lf_linkdate" value="{$value.id}"> 92 <input type="hidden" name="lf_linkdate" value="{$value.id}">
89 <input type="hidden" name="token" value="{$token}"> 93 <input type="hidden" name="token" value="{$token}">
90 <input type="hidden" name="delete_link"> 94 <input type="hidden" name="delete_link">
@@ -99,11 +103,11 @@
99 <br> 103 <br>
100 {if="$value.description"}<div class="linkdescription">{$value.description}</div>{/if} 104 {if="$value.description"}<div class="linkdescription">{$value.description}</div>{/if}
101 {if="!$hide_timestamps || isLoggedIn()"} 105 {if="!$hide_timestamps || isLoggedIn()"}
102 {$updated=$value.updated_timestamp ? 'Edited: '. strftime('%c', $value.updated_timestamp) : 'Permalink'} 106 {$updated=$value.updated_timestamp ? 'Edited: '. format_date($value.updated) : 'Permalink'}
103 <span class="linkdate" title="Permalink"> 107 <span class="linkdate" title="Permalink">
104 <a href="?{$value.shorturl}"> 108 <a href="?{$value.shorturl}">
105 <span title="{$updated}"> 109 <span title="{$updated}">
106 {function="strftime('%c', $value.timestamp)"} 110 {$value.created|format_date}
107 {if="$value.updated_timestamp"}*{/if} 111 {if="$value.updated_timestamp"}*{/if}
108 </span> 112 </span>
109 - permalink 113 - permalink
diff --git a/tpl/linklist.paging.html b/tpl/vintage/linklist.paging.html
index 86019c01..86019c01 100644
--- a/tpl/linklist.paging.html
+++ b/tpl/vintage/linklist.paging.html
diff --git a/tpl/loginform.html b/tpl/vintage/loginform.html
index 84176385..1becd44f 100644
--- a/tpl/loginform.html
+++ b/tpl/vintage/loginform.html
@@ -24,7 +24,9 @@
24 </label> 24 </label>
25 <input type="submit" value="Login" class="bigbutton" tabindex="4"> 25 <input type="submit" value="Login" class="bigbutton" tabindex="4">
26 <label for="longlastingsession"> 26 <label for="longlastingsession">
27 <input type="checkbox" name="longlastingsession" id="longlastingsession" tabindex="3"> 27 <input type="checkbox" name="longlastingsession"
28 id="longlastingsession" tabindex="3"
29 {if="$remember_user_default"}checked="checked"{/if}>
28 Stay signed in (Do not check on public computers)</label> 30 Stay signed in (Do not check on public computers)</label>
29 <input type="hidden" name="token" value="{$token}"> 31 <input type="hidden" name="token" value="{$token}">
30 {if="$returnurl"}<input type="hidden" name="returnurl" value="{$returnurl}">{/if} 32 {if="$returnurl"}<input type="hidden" name="returnurl" value="{$returnurl}">{/if}
diff --git a/tpl/vintage/opensearch.html b/tpl/vintage/opensearch.html
new file mode 100644
index 00000000..3fcc30b7
--- /dev/null
+++ b/tpl/vintage/opensearch.html
@@ -0,0 +1,45 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
3 <ShortName>Shaarli search - {$pagetitle}</ShortName>
4 <Description>Shaarli search - {$pagetitle}</Description>
5 <Url type="text/html" template="{$serverurl}?searchterm={searchTerms}" />
6 <Url type="application/atom+xml" template="{$serverurl}?do=atom&amp;searchterm={searchTerms}"/>
7 <Url type="application/rss+xml" template="{$serverurl}?do=rss&amp;searchterm={searchTerms}"/>
8 <InputEncoding>UTF-8</InputEncoding>
9 <Developer>Shaarli Community - https://github.com/shaarli/Shaarli/</Developer>
10 <Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAHRklE
11 QVRIx5WWaWxU5xWG3++7986dfYYZb+MN2xiMDRiDFePUiQsNoiwpUNpAmhInJVEqpa0oQUlbJVKq
12 olaiqpLKUtOKhAJRm1BKRVWctuykpFjAgPcFx/uMl5mxPTOeuXPv3O3rjyiV0lIpfX+dc36c55xf
13 70vwP9TZ2fFpSQCwT5u6unX4f0QeNLx27RoMQwfRveTd11T23M+8S9w+Z3NRma1W4Hk6/nEimFpM
14 Xnun9Xpmz1MPY+feOhBi/fwAAOjq7iJEqmQqCZf5i7NvyNZ/bJPYgAjCiJc2Zmhyw68SM/T1+NlK
15 uf61BPoH+tHU1PT5ACMjI8RXvACvpZ5NT0+fmrG+2TKqtDLV0BgA2AUfXS3+UtfDX2ixCf73E+oA
16 rat92CTkv9fRBwEkSaLDt/JZR/v0Q7qjb8dQ5hjSqmYSOCkzBbogL+ij2RN8bik9wK88Al9tH4tG
17 ow88lvb19yEyPwfGGLq6OungYD9fUlosrqwoQVVVUeOU8qE/mU0ZTq6KNvreNort+5hugkayQUgY
18 qQld/u6qnVRhkciscOdOkNy5E0RnZ+e/AbwsZxAaHyORZA+prW01CTlnGppOqAcwUnCmlDAkAyin
19 Dapb2t7lNeRijpwvTGlJROXugoKS+upz/S19Kj9lJjxXGY1VU49tGevt7WOCSMHTeAXclePsQts9
20 Jq9oLR7rPVkHxpUYkK2c07ZDiieRNcAx3ZlNphcnsxbiMuEsXFSTZpabp+VVS17UNSV/8n7+gN75
21 +C1DM6VEjkgatiz/5IOCAheiUdeyr+198keKZXLzTKYjMDk/ZzGJhkV9AiPSdWaYIAY4U7TYNJMR
22 pugMqgHcXTiJqDK8ycMv2+TPWyWtKFw3KEdtJxNz8u8+/PNYIqeUgY/Oz+Z7q5X3gtqvG7qip8yM
23 HqdZg5kGgwGACoQQQkEMQ2DMIFnGE04xCRQTZFaexUT6jEEImJ2njjxx9fr13hfqfULTQ4apHept
24 lxf4mrqS3Tek0w1toTc1K6WcXfAwnyWH8kSkIueEhdhNrzUAv16fSCUzNwR3vr/G2lKWojMqbxF4
25 FWlLPDvBR+RBNpTsNqfkV7htuUe/UVq456qdzzvFh2KjdSH0I6ODs1ps9NHcw2jMfRYcEQyOCiox
26 aWR0fOQWVLFNUuOnrXJxfIPnpXLRKzocLpsJanhUU/bfjJ4gfwm/ys3JGX1cuS3UBvauLa/MBe9z
27 5c/xGRdSKpiVmhhN98JK/w4DGgg4uLh8u1NfPhWbmzszeH3G1rxv3dL7+qXyGaXHJi46s4QQophp
28 TKSDkHWGlAqmGCbAGAUA3sY5LlRZv3w44Dhnm0iFzbnsGfJR5E+EEsppTBVXuBptL5b8YQMlwnO+
29 Z2wtea4cl8Rc3KXJ4zShRm0CFaCaGhSDwGSMlbtLhSr7FnVhKhscC4+AO3L0x5PSFBdfE9i40SE6
30 xLSWRCIbJ6phIqEysqvk+2aJ0vhB1NK353zyaL3GS76NgRbVYykkt2OXuaQqMwuxkk0FT+OJpS+z
31 piXPRP1KzRvz4dRvO68PaWCMEQAIDcbqFiLJtyaSA/Ef3NnMGttgvHS7mUUWw7cTMemtY/cPsw3n
32 oe2+4mGXpt7VGWPJ6zOn1V2Xfaz5AxgvBzexodmeGWmCbWWTDOGpSZIIqeAe2/IYvnXgWbomUj2T
33 lNlwUP7bV64lzuRIeoodqDxi1OKRs/e0i08dH/6JPWtk6KKaZd3xj2jAXkY3BvZGK1xrhZvRNktP
34 fNA0ubQrxyxV4jHpSkWoXJPKYqBetxeRpgsMWwE5b/bxaYxUDSWmzCLbStqQuy02LY4/cWLsqH8i
35 HYNbyEeJczkJSzH2855DwsXp932F9hXEKQSQ1UHa568iRAa3uFyeNVolMBmeIrzT4cTXm37KMuvA
36 xb8XXTqiDELRgKg8h/dGWwP9iSDaIzcYJSCbA/uNR3N2sNahV/hbsSA70vEdW66tCOOpj8FRkIgU
37 Q5ybLUopiTzeTpFWUoTXdR3knwQMzLANOyQX50fWhDktLeAX3UcIA2EEQHPgi6TBsrWzaLGm7emC
38 H7bY+GPlV6YumiEpDhslxGBgROApz+yyhROzduIEzwngDh48iD3jO0nBRAUUXtHcoq+ZWbI5EWWa
39 WTieFjoKsaVoN92T88J4vlz+asXqpb+hEcdotbdueZ47vyiqhpA2UoRQwpoLtpNHxR0382jR8RzT
40 k8xYMyCMMfR33Uc8rxdrA9tpuHPyS7pPOTRPZ1arepa4rUsybiWnnU9a39ZXxdur+XoGAGMdoXLi
41 M789axnfNxDr8omiDcvF1f3OhPf18efjF/nfz6PGvv6zlrlwWwYBgcBZbKH4WKHODLHEURDxbHDF
42 QWGePftHUlZWjsy8guYnH2EgwORfZ5cuavEqgGhLnL6+sycvRP1Fbux/fheIn3wCCN4N/qdPMwA4
43 2fYOeoe7kc6kcfCbh8n+r7YwAOjs6QCl9DNx5t7dew+MOf8CcuqqoLxlhwgAAAAASUVORK5CYII=
44 </Image>
45</OpenSearchDescription>
diff --git a/tpl/page.footer.html b/tpl/vintage/page.footer.html
index 006d1d68..4ce0803a 100644
--- a/tpl/page.footer.html
+++ b/tpl/vintage/page.footer.html
@@ -26,6 +26,7 @@
26<script>function confirmDeleteLink() { var agree=confirm("Are you sure you want to delete this link ?"); if (agree) return true ; else return false ; }</script> 26<script>function confirmDeleteLink() { var agree=confirm("Are you sure you want to delete this link ?"); if (agree) return true ; else return false ; }</script>
27{/if} 27{/if}
28 28
29<script src="js/shaarli.js"></script>
29{loop="$plugins_footer.js_files"} 30{loop="$plugins_footer.js_files"}
30 <script src="{$value}#"></script> 31 <script src="{$value}#"></script>
31{/loop} 32{/loop}
diff --git a/tpl/page.header.html b/tpl/vintage/page.header.html
index cce61ec4..8a58844e 100644
--- a/tpl/page.header.html
+++ b/tpl/vintage/page.header.html
@@ -1,5 +1,5 @@
1 1
2<div id="logo" title="Share your links !" onclick="document.location='?';"></div> 2<div id="logo" title="Share your links !" onclick="document.location='{$titleLink}';"></div>
3 3
4<div id="linkcount" class="nomobile"> 4<div id="linkcount" class="nomobile">
5 {if="!empty($linkcount)"}{$linkcount} links{/if}<br> 5 {if="!empty($linkcount)"}{$linkcount} links{/if}<br>
@@ -16,7 +16,7 @@
16{if="!empty($_GET['source']) && $_GET['source']=='bookmarklet'"} 16{if="!empty($_GET['source']) && $_GET['source']=='bookmarklet'"}
17 {ignore} When called as a popup from bookmarklet, do not display menu. {/ignore} 17 {ignore} When called as a popup from bookmarklet, do not display menu. {/ignore}
18{else} 18{else}
19<li><a href="?" class="nomobile">Home</a></li> 19<li><a href="{$titleLink}" class="nomobile">Home</a></li>
20 {if="isLoggedIn()"} 20 {if="isLoggedIn()"}
21 <li><a href="?do=logout">Logout</a></li> 21 <li><a href="?do=logout">Logout</a></li>
22 <li><a href="?do=tools">Tools</a></li> 22 <li><a href="?do=tools">Tools</a></li>
diff --git a/tpl/page.html b/tpl/vintage/page.html
index 834915ec..834915ec 100644
--- a/tpl/page.html
+++ b/tpl/vintage/page.html
diff --git a/tpl/picwall.html b/tpl/vintage/picwall.html
index 4e227e37..4e227e37 100644
--- a/tpl/picwall.html
+++ b/tpl/vintage/picwall.html
diff --git a/tpl/pluginsadmin.html b/tpl/vintage/pluginsadmin.html
index ead1734e..ead1734e 100644
--- a/tpl/pluginsadmin.html
+++ b/tpl/vintage/pluginsadmin.html
diff --git a/tpl/readme.txt b/tpl/vintage/readme.txt
index b18deaed..b18deaed 100644
--- a/tpl/readme.txt
+++ b/tpl/vintage/readme.txt
diff --git a/tpl/tagcloud.html b/tpl/vintage/tag.cloud.html
index 05e45273..d93bf4f9 100644
--- a/tpl/tagcloud.html
+++ b/tpl/vintage/tag.cloud.html
@@ -12,7 +12,7 @@
12 12
13 <div id="cloudtag"> 13 <div id="cloudtag">
14 {loop="$tags"} 14 {loop="$tags"}
15 <span class="count">{$value.count}</span><a 15 <a href="?addtag={$key|urlencode}" class="count">{$value.count}</a><a
16 href="?searchtags={$key|urlencode}" style="font-size:{$value.size}em;">{$key}</a> 16 href="?searchtags={$key|urlencode}" style="font-size:{$value.size}em;">{$key}</a>
17 {loop="$value.tag_plugin"} 17 {loop="$value.tag_plugin"}
18 {$value} 18 {$value}
diff --git a/tpl/tools.html b/tpl/vintage/tools.html
index e06d239d..69689807 100644
--- a/tpl/tools.html
+++ b/tpl/vintage/tools.html
@@ -30,9 +30,7 @@
30 '&amp;source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1' 30 '&amp;source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1'
31 ); 31 );
32 } 32 }
33 )();"> 33 )();"><b>✚Shaare link</b></a>
34 <b>✚Shaare link</b>
35 </a>
36 <a href="#" onclick="return alertBookmarklet();"> 34 <a href="#" onclick="return alertBookmarklet();">
37 <span> 35 <span>
38 &#x21D0; Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).<br> 36 &#x21D0; Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).<br>
@@ -41,9 +39,15 @@
41 </a><br><br> 39 </a><br><br>
42 <a class="smallbutton" 40 <a class="smallbutton"
43 onclick="return alertBookmarklet();" 41 onclick="return alertBookmarklet();"
44 href="?private=1&amp;post="> 42 href="javascript:(
45 <b>✚Add Note</b> 43 function(){
46 </a> 44 window.open(
45 '{$pageabsaddr}?private=1&amp;post='+
46 '&amp;description='%20+%20encodeURIComponent(document.getSelection())+
47 '&amp;source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
48 );
49 }
50 )();"><b>✚Add Note</b></a>
47 <a href="#" onclick="return alertBookmarklet();"> 51 <a href="#" onclick="return alertBookmarklet();">
48 <span> 52 <span>
49 &#x21D0; Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).<br> 53 &#x21D0; Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).<br>
@@ -52,9 +56,7 @@
52 </a><br><br> 56 </a><br><br>
53 57
54 {if="$sslenabled"} 58 {if="$sslenabled"}
55 <a class="smallbutton" onclick="activateFirefoxSocial(this)"> 59 <a class="smallbutton" onclick="activateFirefoxSocial(this)"><b>✚Add to Firefox social</b></a>
56 <b>✚Add to Firefox social</b>
57 </a>
58 <a href="#"> 60 <a href="#">
59 <span>&#x21D0; Click on this button to add Shaarli to the "Share this page" button in Firefox.</span> 61 <span>&#x21D0; Click on this button to add Shaarli to the "Share this page" button in Firefox.</span>
60 </a><br><br> 62 </a><br><br>