From 9f01d0fde09fa055a7db9f26e77c5e6b3d6c2224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 28 Nov 2016 11:02:10 +0100 Subject: Added list view --- app/DoctrineMigrations/Version20161128084725.php | 49 ++++++++++++++++++++++ app/Resources/static/themes/_global/img/list.png | Bin 0 -> 201 bytes app/Resources/static/themes/_global/img/table.png | Bin 0 -> 229 bytes app/Resources/static/themes/baggy/css/main.css | 15 +++---- app/Resources/static/themes/material/css/main.css | 10 ++++- 5 files changed, 64 insertions(+), 10 deletions(-) create mode 100644 app/DoctrineMigrations/Version20161128084725.php create mode 100755 app/Resources/static/themes/_global/img/list.png create mode 100755 app/Resources/static/themes/_global/img/table.png (limited to 'app') diff --git a/app/DoctrineMigrations/Version20161128084725.php b/app/DoctrineMigrations/Version20161128084725.php new file mode 100644 index 00000000..347a4256 --- /dev/null +++ b/app/DoctrineMigrations/Version20161128084725.php @@ -0,0 +1,49 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix').$tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $configTable = $schema->getTable($this->getTable('config')); + $this->skipIf($configTable->hasColumn('view_mode'), 'It seems that you already played this migration.'); + + $configTable->addColumn('view_mode', 'integer'); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $configTable = $schema->getTable($this->getTable('config')); + $configTable->dropColumn('view_mode'); + } +} diff --git a/app/Resources/static/themes/_global/img/list.png b/app/Resources/static/themes/_global/img/list.png new file mode 100755 index 00000000..bd5aff5a Binary files /dev/null and b/app/Resources/static/themes/_global/img/list.png differ diff --git a/app/Resources/static/themes/_global/img/table.png b/app/Resources/static/themes/_global/img/table.png new file mode 100755 index 00000000..859c4cd8 Binary files /dev/null and b/app/Resources/static/themes/_global/img/table.png differ diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 4f48f8ca..126c451b 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -297,18 +297,14 @@ h2::after { text-decoration: none; } -#listmode a:hover { - opacity: 1; -} - #listmode.tablemode { - background-image: url("../img/baggy/table.png"); + background-image: url("../../_global/img/table.png"); background-repeat: no-repeat; background-position: bottom; } #listmode.listmode { - background-image: url("../img/baggy/list.png"); + background-image: url("../../_global/img/list.png"); background-repeat: no-repeat; background-position: bottom; } @@ -352,9 +348,9 @@ footer a { letter-spacing: -5px; } -.listmode .entry { - width: 100% !important; - margin-left: 0 !important; +.listmode.entry { + width: 100%; + height: inherit; } .card-entry-labels { @@ -588,6 +584,7 @@ div.pagination ul { text-align: left; font-style: italic; color: #999; + display: inline-flex; } div.pagination ul > * { diff --git a/app/Resources/static/themes/material/css/main.css b/app/Resources/static/themes/material/css/main.css index 82a74c23..76423409 100755 --- a/app/Resources/static/themes/material/css/main.css +++ b/app/Resources/static/themes/material/css/main.css @@ -194,7 +194,6 @@ main, .results { height: 1em; - line-height: 30px; } .results .nb-results, @@ -203,6 +202,14 @@ main, margin-bottom: 0; } +.results .nb-results { + display: inline-flex; +} + +.results a { + color: #444; +} + .pagination { float: right; } @@ -593,6 +600,7 @@ a.original { background-position: 50%; } + /* ========================================================================== 5 = Article ========================================================================== */ -- cgit v1.2.3 From 56a7ce17f3a9a22e0bfc8651cb690a14447e0afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 28 Nov 2016 11:26:08 +0100 Subject: Hide article text on mobile with list mode --- app/Resources/static/themes/baggy/css/main.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 126c451b..6d656c21 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -1203,6 +1203,10 @@ pre code { } @media screen and (max-width: 500px) { + .hide { + display: none; + } + .entry { width: 100%; margin-left: 0; -- cgit v1.2.3 From 9aa991281ddd315f607cabcfc3b917401d3d2104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 28 Nov 2016 12:08:51 +0100 Subject: Renamed view_mode by list_mode and hide excerpt --- app/DoctrineMigrations/Version20161128084725.php | 8 ++++---- app/Resources/static/themes/baggy/css/main.css | 8 ++++---- app/Resources/static/themes/material/css/main.css | 9 ++++++++- 3 files changed, 16 insertions(+), 9 deletions(-) (limited to 'app') diff --git a/app/DoctrineMigrations/Version20161128084725.php b/app/DoctrineMigrations/Version20161128084725.php index 347a4256..242d5900 100644 --- a/app/DoctrineMigrations/Version20161128084725.php +++ b/app/DoctrineMigrations/Version20161128084725.php @@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Added view_mode in user config. + * Added list_mode in user config. */ class Version20161128084725 extends AbstractMigration implements ContainerAwareInterface { @@ -33,9 +33,9 @@ class Version20161128084725 extends AbstractMigration implements ContainerAwareI public function up(Schema $schema) { $configTable = $schema->getTable($this->getTable('config')); - $this->skipIf($configTable->hasColumn('view_mode'), 'It seems that you already played this migration.'); + $this->skipIf($configTable->hasColumn('list_mode'), 'It seems that you already played this migration.'); - $configTable->addColumn('view_mode', 'integer'); + $configTable->addColumn('list_mode', 'integer'); } /** @@ -44,6 +44,6 @@ class Version20161128084725 extends AbstractMigration implements ContainerAwareI public function down(Schema $schema) { $configTable = $schema->getTable($this->getTable('config')); - $configTable->dropColumn('view_mode'); + $configTable->dropColumn('list_mode'); } } diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 6d656c21..e16846ea 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -617,6 +617,10 @@ div.pagination ul .current { background-color: #ccc; } +.hide { + display: none; +} + /* ========================================================================== 2.1 = "save a link" related styles ========================================================================== */ @@ -1203,10 +1207,6 @@ pre code { } @media screen and (max-width: 500px) { - .hide { - display: none; - } - .entry { width: 100%; margin-left: 0; diff --git a/app/Resources/static/themes/material/css/main.css b/app/Resources/static/themes/material/css/main.css index 76423409..8f7b7a3d 100755 --- a/app/Resources/static/themes/material/css/main.css +++ b/app/Resources/static/themes/material/css/main.css @@ -555,6 +555,14 @@ a.original { margin-right: 5px !important; } +.card-stacked:hover ul.tools-list { + display: block; +} + +.card-stacked ul.tools-list { + display: none; +} + .card .card-action a { color: #fff; margin: 0; @@ -600,7 +608,6 @@ a.original { background-position: 50%; } - /* ========================================================================== 5 = Article ========================================================================== */ -- cgit v1.2.3