diff --git a/miniflux/assets/css/app.css b/miniflux/assets/css/app.css index 6f9848a..f9f3717 100644 --- a/miniflux/assets/css/app.css +++ b/miniflux/assets/css/app.css @@ -443,6 +443,44 @@ nav .active a { color: purple; } +.item nav span, +.item nav a, +.item nav a:visited { + color: #3366CC; +} + +.item nav { + border-top: 1px dotted #ddd; + padding-top: 8px; + margin-top: 50px; + width: 100%; +} + +.nav-left { + width: 30%; + display: block; + float: left; +} + +.nav-middle { + text-align: center; + float: left; + width: 40%; +} + +.nav-right { + text-align: right; + margin-left: 70%; + width: 30%; + display: block; +} + +/* other pages */ +section li { + margin-left: 20px; + list-style-type: square; +} + /* mobile design */ @media only screen and (max-width: 480px) { diff --git a/miniflux/index.php b/miniflux/index.php index d198445..88b0446 100644 --- a/miniflux/index.php +++ b/miniflux/index.php @@ -74,14 +74,26 @@ Router\post_action('login', function() { }); +Router\get_action('show', function() { + + $id = Request\param('id'); + + Response\html(Template\layout('read_item', array( + 'item' => Model\get_item($id) + ))); +}); + + Router\get_action('read', function() { $id = Request\param('id'); + $item = Model\get_item($id); Model\set_item_read($id); Response\html(Template\layout('read_item', array( - 'item' => Model\get_item($id) + 'item' => $item, + 'item_nav' => Model\get_nav_item($item) ))); }); @@ -221,10 +233,17 @@ Router\post_action('add', function() { }); +Router\get_action('optimize-db', function() { + + \PicoTools\singleton('db')->getConnection()->exec('VACUUM'); + Response\redirect('?action=config'); +}); + + Router\get_action('download-db', function() { Response\force_download('db.sqlite.gz'); - Response\binary(gzencode(file_get_contents('data/db.sqlite'))); + Response\binary(gzencode(file_get_contents(get_db_filename()))); }); @@ -264,6 +283,7 @@ Router\get_action('config', function() { Response\html(Template\layout('config', array( 'errors' => array(), 'values' => Model\get_config(), + 'db_size' => filesize(get_db_filename()), 'menu' => 'config' ))); }); diff --git a/miniflux/templates/read_item.php b/miniflux/templates/read_item.php index 170d2ee..99fbc1c 100644 --- a/miniflux/templates/read_item.php +++ b/miniflux/templates/read_item.php @@ -15,6 +15,38 @@

+ + + + \ No newline at end of file diff --git a/miniflux/templates/read_items.php b/miniflux/templates/read_items.php index 12accb3..922c1f6 100644 --- a/miniflux/templates/read_items.php +++ b/miniflux/templates/read_items.php @@ -14,7 +14,7 @@
-

+

| |