From b37cd68daffd0a59d0d7e6543e4fb5a9a18c205e Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Tue, 11 Dec 2018 20:24:21 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9D=D1=83=D0=BC=D0=B5=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B8=D0=B3=D1=80=20=D0=B2=20=D0=B0=D0=BB=D1=84?= =?UTF-8?q?=D0=B0=D0=B2=D0=B8=D1=82=D0=BD=D0=BE=D0=BC=20=D0=BF=D0=BE=D1=80?= =?UTF-8?q?=D1=8F=D0=B4=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/gamelist.js | 3 +++ sass/theme/_child_theme.scss | 9 ++++++++- shortcodes/gamelist.php | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/js/gamelist.js b/js/gamelist.js index 7753442..beb3414 100644 --- a/js/gamelist.js +++ b/js/gamelist.js @@ -35,6 +35,9 @@ jQuery(document).ready(function($){ } return -1; }); + games.forEach(function(game, index) { + game.querySelector(".nGameNum").innerHTML = (index + 1); + }); list.empty(); list.append(games); }); diff --git a/sass/theme/_child_theme.scss b/sass/theme/_child_theme.scss index 2df4960..f6ab83c 100644 --- a/sass/theme/_child_theme.scss +++ b/sass/theme/_child_theme.scss @@ -153,9 +153,16 @@ aside.widget { .nGameHeader { .nRating { float: right; + font-weight: bold; + } + .nRating, .nGameNum { font-size: $font-size-base * 1.2; margin-top: $font-size-base * 0.25; - font-weight: bold; + } + .nGameNum { + float: left; + margin-right: $font-size-base; + color: grey; } .nGameName { font-size: $h3-font-size; diff --git a/shortcodes/gamelist.php b/shortcodes/gamelist.php index 83d37d4..7be7fc4 100644 --- a/shortcodes/gamelist.php +++ b/shortcodes/gamelist.php @@ -102,6 +102,7 @@ function gamelist($atts){ if (isset($rating) && !empty($rating) && $rating !== '0+' && $rating !== '6+') { $retval .= '
'.$rating.'
'; } + $retval .= ''; $retval .= '
'. ''.$title.'
'; $retval .= '
';