diff --git a/app/Http/Controllers/LanguageController.php b/app/Http/Controllers/LanguageController.php new file mode 100644 index 0000000..07d4321 --- /dev/null +++ b/app/Http/Controllers/LanguageController.php @@ -0,0 +1,31 @@ + $language], + ['language' => ['required', Rule::in(self::$supportedLanguages)]] + ); + $validated = $validator->validated(); + + // Save the language preference in the session + $request->session()->put(['language' => $validated['language']]); + + return redirect()->back(); + } +} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php deleted file mode 100644 index 494c050..0000000 --- a/app/Http/Kernel.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ - protected $middleware = [ - // \App\Http\Middleware\TrustHosts::class, - \App\Http\Middleware\TrustProxies::class, - \Illuminate\Http\Middleware\HandleCors::class, - \App\Http\Middleware\PreventRequestsDuringMaintenance::class, - \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, - \App\Http\Middleware\TrimStrings::class, - \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, - ]; - - /** - * The application's route middleware groups. - * - * @var array> - */ - protected $middlewareGroups = [ - 'web' => [ - \App\Http\Middleware\EncryptCookies::class, - \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\VerifyCsrfToken::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - - 'api' => [ - // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, - \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - ]; - - /** - * The application's middleware aliases. - * - * Aliases may be used instead of class names to conveniently assign middleware to routes and groups. - * - * @var array - */ - protected $middlewareAliases = [ - 'auth' => \App\Http\Middleware\Authenticate::class, - 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, - 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, - 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, - 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, - 'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class, - 'signed' => \App\Http\Middleware\ValidateSignature::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, - ]; -} diff --git a/app/Http/Middleware/Language.php b/app/Http/Middleware/Language.php new file mode 100644 index 0000000..791772e --- /dev/null +++ b/app/Http/Middleware/Language.php @@ -0,0 +1,28 @@ +session()->has('language')) { + // Get the language from the session + $language = $request->session()->get('language'); + + // Set the language + app()->setLocale($language); + } + + return $next($request); + } +} diff --git a/bootstrap/app.php b/bootstrap/app.php index 6d27c75..32da867 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -26,6 +26,9 @@ Request::HEADER_X_FORWARDED_AWS_ELB ); }) + ->withMiddleware(function (Middleware $middleware) { + $middleware->appendToGroup('web', \App\Http\Middleware\Language::class); + }) ->withExceptions(function (Exceptions $exceptions) { // })->create(); diff --git a/lang/en/app/netbar.php b/lang/en/app/netbar.php new file mode 100644 index 0000000..334ba1c --- /dev/null +++ b/lang/en/app/netbar.php @@ -0,0 +1,12 @@ + 'No news are currently available.', + 'select-language' => 'Select language:', + + 'current-language-code' => "EN", + 'current-language' => "English", + + 'lang.en' => 'English', + 'lang.ro' => 'Romanian', +]; diff --git a/lang/ro/app/netbar.php b/lang/ro/app/netbar.php new file mode 100644 index 0000000..d3f8a09 --- /dev/null +++ b/lang/ro/app/netbar.php @@ -0,0 +1,12 @@ + 'Momentan nu există știri disponibile.', + 'select-language' => 'Alege limba:', + + 'current-language-code' => "RO", + 'current-language' => "Română", + + 'lang.en' => 'Engleză', + 'lang.ro' => 'Română', +]; diff --git a/public/assets/main/css/netbar.css b/public/assets/main/css/netbar.css new file mode 100644 index 0000000..022184b --- /dev/null +++ b/public/assets/main/css/netbar.css @@ -0,0 +1,986 @@ +body { + margin: 0; + padding: 0; +} + +div.openX_interstitial div.openX_int_closeButton a { + text-indent: -4000px; + float: right; + height: 23px; + width: 23px; + display: block; + background: transparent url(http://gameforge.com/cdn/img/netbar/close_x.png) repeat-x; +} + +#mmonetbar { + background: transparent url(../img/netbar/netbar.bg.png) repeat-x; + font: normal 11px Tahoma, Arial, Helvetica, sans-serif; + height: 32px; + left: 0; + padding: 0; + position: absolute; + text-align: center; + top: 0; + width: 100%; + /*z-index: 3000;*/ +} + +#mmonetbar #mmoContent { + height: 32px; + margin: 0 auto; + width: 1024px; + position: relative; +} + +#mmonetbar .mmosmallbar { + width: 585px !important; +} + +#mmonetbar .mmosmallbar div.mmoBoxMiddle { + width: 290px; +} + +#mmonetbar .mmonewsout { + width: 800px !important; +} + +#mmonetbar .mmouseronlineout { + width: 768px !important; +} + +#mmonetbar .mmolangout { + width: 380px !important; +} + +#mmonetbar .mmolangout .mmoGame { + width: 265px; +} + +#mmonetbar #mmoContent.mmoingame { + width: 533px; +} + +#mmonetbar #mmoContent.mmoingame .mmoGame { + width: auto; +} + +#mmonetbar a { + color: #666; + font: normal 11px Tahoma, Arial, Helvetica, sans-serif; + outline: none; + text-decoration: none; + white-space: nowrap; +} + +#mmonetbar select { + background-color: #611200 !important; + border: 1px solid #000 !important; + color: #d0b88c !important; + font: normal 11px Verdana, Arial, Helvetica, sans-serif; + height: 18px; + margin-top: 3px; + width: 100px; +} + +#mmonetbar .mmoGames select { + width: 80px; +} + +#mmonetbar option { + background-color: #611200 !important; + color: #d0b88c !important; +} + +#mmonetbar option:hover { + background-color: #7a1801 !important; +} + +#mmonetbar select#mmoCountry { + width: 120px; +} + +#mmonetbar .mmoSelectbox { + background-color: #611200; + float: left; + margin: 3px 0 0 3px; + position: relative; +} + +* html #mmonetbar .mmoSelectbox { + position: static; +} + +* + html #mmonetbar .mmoSelectbox { + position: static; +} + +#mmonetbar #mmoOneGame { + cursor: default; + height: 14px; + margin-top: 3px; + padding-left: 5px; + width: 80px; +} + +#mmonetbar .label { + float: left; + font-weight: bold; + margin-right: 4px; + overflow: hidden !important; +} + +#mmonetbar #mmoUsers .label { + font-size: 10px; +} + +#mmonetbar .mmoBoxLeft, #mmonetbar .mmoBoxRight { + background: transparent url(../img/netbar/netbar.sprites.png) no-repeat -109px -4px; + float: left; + width: 5px; + height: 24px; +} + +#mmonetbar .mmoBoxRight { + background-position: -126px -4px; +} + +#mmonetbar .mmoBoxMiddle { + background: transparent url(../img/netbar/netbar.bg.png) repeat-x 0 -36px; + color: #d0b88c !important; + float: left; + height: 24px; + line-height: 22px; + text-align: left; + white-space: nowrap; + position: relative; + /*z-index: 10000;*/ +} + +#mmonetbar #mmoGames, #mmonetbar #mmoLangs { + margin: 0px 4px 0 0; +} + +#mmonetbar #mmoNews, #mmonetbar #mmoUsers, #mmonetbar #mmoGame, #mmonetbar .nojsGame { + margin: 4px 4px 0 0; +} + +#mmonetbar #mmoLogo { + background: transparent url(../img/netbar/netbar.sprites.png) no-repeat top left; + float: left; + display: block; + height: 32px; + width: 108px; + text-indent: -9999px; + position: relative; + /*z-index: 1*/ +} + +#mmonetbar #mmoNews { + float: left; + width: 252px; +} + +#mmonetbar #mmoNews #mmoNewsContent { + text-align: left; + width: 200px; +} + +#mmonetbar #mmoNews #mmoNewsticker { + overflow: hidden; + width: 240px; +} + +#mmonetbar #mmoNews #mmoNewsticker ul { + margin: 0; + padding: 0; + list-style: none; +} + +#mmonetbar #mmoNews #mmoNewsticker ul li { + font: normal 11px/22px Tahoma, Arial, Helvetica, sans-serif !important; + color: #d0b88c !important; + padding: 0; + margin: 0; + background: none; + display: none; +} + +#mmonetbar #mmoNews #mmoNewsticker ul li.mmoTickShow { + display: block; +} + +#mmonetbar #mmoNews #mmoNewsticker ul li a img { + border: 0; +} + +#mmonetbar #mmoNews #mmoNewsticker ul li a { + color: #d0b88c !important; + display: block; + height: 24px; + line-height: 23px; +} + +#mmonetbar #mmoNews #mmoNewsticker ul li a:hover { + text-decoration: underline; +} + +#mmonetbar #mmoUsers { + float: left; + width: 178px; +} + +#mmonetbar #mmoUsers .mmoBoxLeft { + width: 17px; +} + +#mmonetbar #mmoUsers .mmoBoxMiddle { + padding-left: 3px; + width: 150px; +} + +#mmonetbar .mmoGame { + display: none; + float: left; + width: 432px; +} + +#mmonetbar .mmoGame #mmoGames { + float: left; + width: 206px; +} + +#mmonetbar .mmoGame #mmoLangs { + float: left; + margin: 0; + width: 252px; +} + +#mmonetbar .mmoGame label { + color: #d0b88c !important; + float: left; + font-weight: 400 !important; + line-height: 22px; + margin: 0px; + text-align: right !important; + width: 110px; + font-size: 11px !important; +} + +#mmonetbar .nojsGame { + display: block; + width: 470px; +} + +#mmonetbar .nojsGame .mmoBoxMiddle { + width: 450px; +} + +#mmonetbar .nojsGame .mmoSelectbox { + margin: 0px 0 0 3px; +} + +* + html #mmonetbar .nojsGame .mmoSelectbox { + margin: 2px 0 0 3px; +} + +* html #mmonetbar .nojsGame .mmoSelectbox { + margin: 2px 0 0 3px; +} + +#mmonetbar .nojsGame .mmoGameBtn { + background: transparent url(../img/netbar/netbar.sprites.png) no-repeat -162px -7px; + border: none; + cursor: pointer; + float: left; + height: 18px; + margin: 3px 0 0 7px; + padding: 0; + width: 18px; +} + +#mmonetbar .mmoSelectArea { + border: 1px solid #000; + color: #d0b88c !important; + display: block !important; + float: none; + font-weight: 400 !important; + font-size: 11px; + height: 16px; + line-height: 13px; + overflow: hidden !important; + width: 90px; +} + +#mmonetbar #mmoLangSelect .mmoSelectArea { + width: 129px; +} + +#mmonetbar #mmoLangSelect .mmoOptionsDivVisible { + min-width: 129px; +} + +#mmonetbar .mmoSelectArea .mmoSelectButton { + background: url(../img/netbar/netbar.sprites.png) no-repeat -141px -8px; + float: right; + width: 17px; + height: 16px; +} + +#mmonetbar .mmoSelectText { + cursor: pointer; + float: left; + overflow: hidden; + padding: 1px 2px; + width: 68px; +} + +#mmonetbar #mmoLangSelect .mmoSelectText { + width: 107px; +} + +#mmonetbar #mmoOneLang { + cursor: default; + height: 14px; +} + +#mmonetbar div.mmoOneLang { + background: none; +} + +#mmonetbar div.mmoOneLang #mmoOneLang { + border: none; + padding: 2px 3px; +} + +#mmonetbar .mmoOptionsDivInvisible, #mmonetbar .mmoOptionsDivVisible { + background-color: #611200 !important; + border: 1px solid #000; + position: absolute; + min-width: 90px; + z-index: 3100; +} + +* html #mmonetbar .mmoOptionsDivVisible .highlight { + background-color: #7a1801 !important +} + +#mmonetbar .mmoOptionsDivInvisible { + display: none; +} + +#mmonetbar .mmoOptionsDivVisible ul { + border: 0; + font: normal 11px Tahoma, Arial, Helvetica, sans-serif; + list-style: none; + margin: 0; + padding: 2px; + overflow: auto; + overflow-x: hidden; +} + +#mmonetbar #mmoLangs .mmoOptionsDivVisible ul { + min-width: 125px; +} + +#mmonetbar .mmoOptionsDivVisible ul li { + background-color: #611200; + height: 14px; + padding: 2px 0; +} + +#mmonetbar .mmoOptionsDivVisible a { + color: #d0b88c !important; + display: block; + font-weight: 400 !important; + height: 16px !important; + min-width: 80px; + text-decoration: none; + white-space: nowrap; + width: 100%; +} + +#mmonetbar #mmoContent .mmoLangList a { + min-width: 102px; +} + +#mmonetbar .mmoOptionsDivVisible li:hover { + background-color: #7a1801; +} + +#mmonetbar .mmoOptionsDivVisible li a:hover { + color: #d0b88c !important; +} + +#mmonetbar .mmoOptionsDivVisible li.mmoActive { + background-color: #7a1801 !important; +} + +#mmonetbar .mmoOptionsDivVisible li.mmoActive a { + color: #d0b88c !important; +} + +#mmonetbar .mmoOptionsDivVisible ul.mmoListHeight { + height: 240px +} + +#mmonetbar .mmoOptionsDivVisible ul.mmoLangList.mmoListHeight li { + padding-right: 15px !important; + width: 100%; +} + +#mmonetbar #mmoGameSelect ul.mmoListHeight a { + min-width: 85px; +} + +#mmonetbar #mmoLangSelect ul.mmoListHeight a { + min-width: 105px; +} + +#mmonetbar #mmoFocus { + position: absolute; + left: -2000px; + top: -2000px; +} + +#mmonetbar #mmoLangs .mmoSelectText span, #mmonetbar #mmoLangs .mmoflag { + background: transparent url(../img/netbar/mmoflags.png) no-repeat; + height: 14px !important; + padding-left: 23px; +} + +.mmo_AE { + background-position: left 0px !important +} + +.mmo_AR { + background-position: left -14px !important +} + +.mmo_BE { + background-position: left -28px !important +} + +.mmo_BG { + background-position: left -42px !important +} + +.mmo_BR { + background-position: left -56px !important +} + +.mmo_BY { + background-position: left -70px !important +} + +.mmo_CA { + background-position: left -84px !important +} + +.mmo_CH { + background-position: left -98px !important +} + +.mmo_CL { + background-position: left -112px !important +} + +.mmo_CN { + background-position: left -126px !important +} + +.mmo_CO { + background-position: left -140px !important +} + +.mmo_CZ { + background-position: left -154px !important +} + +.mmo_DE { + background-position: left -168px !important +} + +.mmo_DK { + background-position: left -182px !important +} + +.mmo_EE { + background-position: left -196px !important +} + +.mmo_EG { + background-position: left -210px !important +} + +.mmo_EN { + background-position: left -224px !important +} + +.mmo_ES { + background-position: left -238px !important +} + +.mmo_EU { + background-position: left -252px !important +} + +.mmo_FI { + background-position: left -266px !important +} + +.mmo_FR { + background-position: left -280px !important +} + +.mmo_GR { + background-position: left -294px !important +} + +.mmo_HK { + background-position: left -308px !important +} + +.mmo_HR { + background-position: left -322px !important +} + +.mmo_HU { + background-position: left -336px !important +} + +.mmo_ID { + background-position: left -350px !important +} + +.mmo_IL { + background-position: left -364px !important +} + +.mmo_IN { + background-position: left -378px !important +} + +.mmo_INTL { + background-position: left -392px !important +} + +.mmo_IR { + background-position: left -406px !important +} + +.mmo_IT { + background-position: left -420px !important +} + +.mmo_JP { + background-position: left -434px !important +} + +.mmo_KE { + background-position: left -448px !important +} + +.mmo_KR { + background-position: left -462px !important +} + +.mmo_LT { + background-position: left -476px !important +} + +.mmo_LV { + background-position: left -490px !important +} + +.mmo_ME { + background-position: left -504px !important +} + +.mmo_MK { + background-position: left -518px !important +} + +.mmo_MX { + background-position: left -532px !important +} + +.mmo_NL { + background-position: left -546px !important +} + +.mmo_NO { + background-position: left -560px !important +} + +.mmo_PE { + background-position: left -574px !important +} + +.mmo_PH { + background-position: left -588px !important +} + +.mmo_PK { + background-position: left -602px !important +} + +.mmo_PL { + background-position: left -616px !important +} + +.mmo_PT { + background-position: left -630px !important +} + +.mmo_RO { + background-position: left -644px !important +} + +.mmo_RS { + background-position: left -658px !important +} + +.mmo_RU { + background-position: left -672px !important +} + +.mmo_SE { + background-position: left -686px !important +} + +.mmo_SI { + background-position: left -700px !important +} + +.mmo_SK { + background-position: left -714px !important +} + +.mmo_TH { + background-position: left -728px !important +} + +.mmo_TR { + background-position: left -742px !important +} + +.mmo_TW { + background-position: left -756px !important +} + +.mmo_UA { + background-position: left -770px !important +} + +.mmo_UK { + background-position: left -784px !important +} + +.mmo_US { + background-position: left -798px !important +} + +.mmo_VE { + background-position: left -812px !important +} + +.mmo_VN { + background-position: left -826px !important +} + +.mmo_YU { + background-position: left -840px !important +} + +.mmo_ZA { + background-position: left -854px !important +} + +.mmo_WW { + background-position: left -392px !important +} + +.mmo_AU { + background-position: left -868px !important +} + +div#mmonetbar a:active { + top: 0; +} + +div#mmoGamesOverviewPanel { + width: 582px; + position: absolute; + top: 0; + right: 0; + font: 12px Arial, sans-serif; +} + +div#mmoGamesOverviewPanel h4, div#mmoGamesOverviewPanel h5 { + margin: 0; + font-size: 12px; + font-weight: bold; + text-align: left; +} + +div#mmoGamesOverviewPanel a { + text-decoration: none; +} + +div#mmoGamesOverviewPanel a img { + border: none; +} + +div#mmoGamesOverviewToggle { + width: 168px; + padding: 4px 0 4px 414px; +} + +div#mmoGamesOverviewToggle h4 { + height: 18px; + position: relative; + background: url(../img/netbar/netbar.bg.png) repeat-x 0 -36px; + top: 0px; + padding: 3px 20px; +} + +div#mmoGamesOverviewToggle h4 a { + display: block; + width: 116px; + height: 16px; + line-height: 14px; + text-align: left; + font-weight: normal; + outline: none; + color: #d0b88c !important; + font-size: 11px !important; + position: relative; + border: 1px solid #000; + padding: 0 0 0 10px; + background: #611200; +} + +div#mmoGamesOverviewToggle h4 a.gameCountZero { + cursor: default; + text-align: center; + padding: 0; + width: 126px; +} + +div#mmoGamesOverviewToggle h4 a span.mmoNbPseudoSelect_icon { + display: block; + position: absolute; + top: 0; + right: 0; + width: 17px; + height: 16px; + background: url(../img/netbar/netbar.sprites.png) no-repeat -141px -8px; +} + +span.iconTriangle { + display: block; + position: absolute; + top: 5px; + right: 10px; + width: 0px; + border: 5px solid transparent; + border-bottom-color: #d0b88c; +} + +div#mmoGamesOverviewToggle h4 a.toggleHidden { +} + +div#mmoGamesOverviewToggle h4 a.toggleHidden span.iconTriangle { + top: 10px; + border: 5px solid transparent; + border-top-color: #d0b88c; +} + +div#mmoGamesOverviewToggle h4 span.mmoNbBoxEdge { + display: block; + width: 5px; + height: 24px; + background: url(../img/netbar/netbar.sprites.png) no-repeat -109px -4px; + position: absolute; + top: 0; +} + +div#mmoGamesOverviewToggle h4 span.mmoNbBoxEdge_left { + left: 0; +} + +div#mmoGamesOverviewToggle h4 span.mmoNbBoxEdge_right { + right: 0; + background-position: -126px -4px; +} + +div#mmoGamesOverviewLists { + clear: both; + background: #611200; + width: 580px; + border: 1px solid #000; + float: left; + position: relative; + top: 0px; +} + +div#mmoGamesOverviewLists h5 { + clear: both; + width: 544px; + margin: 0; + padding: 0 18px; + height: 27px; + line-height: 27px; + color: #d0b88c; + border-bottom: 1px solid #000; + background: url(../img/netbar/netbar.bg.png) repeat-x 0 -3px; + font-family: inherit; +} + +#mmoGamesOverviewLists #mmoGamesOverview_featured li { + width: auto; +} + +#mmoGamesOverviewLists #mmoGamesOverview_featured span { + display: block; + width: 560px; + height: 180px; + margin: 0; +} + +#mmoGamesOverviewLists #mmoGamesOverview_featured span.gameName { + display: none; +} + +#mmoGamesOverview_featured img { + display: block; +} + +div#mmoGamesOverviewLists ul { + margin: 0; + padding: 5px 5px; + list-style: none; + width: 570px; + float: left; + text-align: left; +} + +div#mmoGamesOverviewLists ul li { + margin: 0; + padding: 0; + list-style: none; + width: 190px; + float: left; + background: none; +} + +div#mmoGamesOverviewLists ul li a { + display: block; + padding: 5px; + font-weight: bold; + line-height: 1; + color: #d0b88c !important; + font-size: 11px !important; +} + +div#mmoGamesOverviewLists ul li a:focus, div#mmoGamesOverviewLists ul li a:hover { + background-color: #7a1801; +} + +div#mmoGamesOverviewLists ul li a span.gameImgTarget { + display: block; + width: 180px; + height: 90px; + background: none; + margin: 0 0 4px 0; +} + +div#mmoGamesOverviewLists ul li a span img { + display: block; +} + +div#mmoGamesOverviewLists div#mmoGamesOverviewCountry { + width: 20px; + height: 14px; + position: absolute; + top: 6px; + right: 12px; + background-image: url(../img/netbar/mmoflags.png); + background-repeat: no-repeat; +} + +#mmonetbar div.nojsGame { + width: 432px !important; +} + +#mmonetbar div.nojsGame div.mmoBoxMiddle { + width: 422px; +} + +#mmonetbar div.nojsGame label { + width: 105px; +} + +#pagefoldtarget .nbPF { + position: absolute; + top: 0; + z-index: 999999; + text-indent: -9999px; + width: 125px; + height: 120px; +} + +#pagefoldtarget .nbPFLeft { + left: 0px; +} + +#pagefoldtarget .nbPF.nbPFRight { + right: 0px; + background-position: right 0px +} + +#pagefoldtarget .nbPFDark.nbPFRight { + background-image: url(../img/netbar/bg_dark_sprite_rtl.png); + _background-image: url(../img/netbar/bg_dark_sprite_rtl.gif); +} + +#pagefoldtarget .nbPFDark.nbPFLeft { + background-image: url(../img/netbar/bg_dark_sprite.png); + _background-image: url(../img/netbar/bg_dark_sprite.gif); +} + +#pagefoldtarget .nbPFLight.nbPFRight { + background-image: url(../img/netbar/bg_light_sprite_rtl.png); + _background-image: url(../img/netbar/bg_light_sprite_rtl.gif); +} + +#pagefoldtarget .nbPFLight.nbPFLeft { + background: url(../img/netbar/bg_light_sprite.png) no-repeat; + _background-image: url(../img/netbar/bg_light_sprite.gif); +} + +#pagefoldtarget .nbPF a { + text-indent: -9999px; + display: block; + width: 110px; + height: 95px; +} + +#pagefoldtarget .nbPF.nbPFRight a { + float: right; +} + +#pagefoldtarget .nbPF.nbPFHover a { + width: 358px; + height: 320px; +} + +#pagefoldtarget .nbPF.nbPFHover { + background-position: left -129px !important; + width: 400px; + height: 400px; +} + +#pagefoldtarget .nbPF.nbPFRight.nbPFHover { + background-position: right -129px !important; +} diff --git a/public/assets/main/img/netbar/bg_dark_sprite.gif b/public/assets/main/img/netbar/bg_dark_sprite.gif new file mode 100644 index 0000000..df16701 Binary files /dev/null and b/public/assets/main/img/netbar/bg_dark_sprite.gif differ diff --git a/public/assets/main/img/netbar/bg_dark_sprite.png b/public/assets/main/img/netbar/bg_dark_sprite.png new file mode 100644 index 0000000..327f3ac Binary files /dev/null and b/public/assets/main/img/netbar/bg_dark_sprite.png differ diff --git a/public/assets/main/img/netbar/bg_dark_sprite_rtl.gif b/public/assets/main/img/netbar/bg_dark_sprite_rtl.gif new file mode 100644 index 0000000..eaab3cf Binary files /dev/null and b/public/assets/main/img/netbar/bg_dark_sprite_rtl.gif differ diff --git a/public/assets/main/img/netbar/bg_dark_sprite_rtl.png b/public/assets/main/img/netbar/bg_dark_sprite_rtl.png new file mode 100644 index 0000000..ed5685b Binary files /dev/null and b/public/assets/main/img/netbar/bg_dark_sprite_rtl.png differ diff --git a/public/assets/main/img/netbar/bg_light_sprite.gif b/public/assets/main/img/netbar/bg_light_sprite.gif new file mode 100644 index 0000000..7f08882 Binary files /dev/null and b/public/assets/main/img/netbar/bg_light_sprite.gif differ diff --git a/public/assets/main/img/netbar/bg_light_sprite.png b/public/assets/main/img/netbar/bg_light_sprite.png new file mode 100644 index 0000000..9fcf10b Binary files /dev/null and b/public/assets/main/img/netbar/bg_light_sprite.png differ diff --git a/public/assets/main/img/netbar/bg_light_sprite_rtl.gif b/public/assets/main/img/netbar/bg_light_sprite_rtl.gif new file mode 100644 index 0000000..9335876 Binary files /dev/null and b/public/assets/main/img/netbar/bg_light_sprite_rtl.gif differ diff --git a/public/assets/main/img/netbar/bg_light_sprite_rtl.png b/public/assets/main/img/netbar/bg_light_sprite_rtl.png new file mode 100644 index 0000000..2125641 Binary files /dev/null and b/public/assets/main/img/netbar/bg_light_sprite_rtl.png differ diff --git a/public/assets/main/img/netbar/close_x.png b/public/assets/main/img/netbar/close_x.png new file mode 100644 index 0000000..054baeb Binary files /dev/null and b/public/assets/main/img/netbar/close_x.png differ diff --git a/public/assets/main/img/netbar/mmoflags.png b/public/assets/main/img/netbar/mmoflags.png new file mode 100644 index 0000000..19d68f7 Binary files /dev/null and b/public/assets/main/img/netbar/mmoflags.png differ diff --git a/public/assets/main/img/netbar.bg.png b/public/assets/main/img/netbar/netbar.bg.png similarity index 100% rename from public/assets/main/img/netbar.bg.png rename to public/assets/main/img/netbar/netbar.bg.png diff --git a/public/assets/main/img/netbar.sprites.png b/public/assets/main/img/netbar/netbar.sprites.png similarity index 100% rename from public/assets/main/img/netbar.sprites.png rename to public/assets/main/img/netbar/netbar.sprites.png diff --git a/public/assets/main/js/netbar.js b/public/assets/main/js/netbar.js new file mode 100644 index 0000000..89ce641 --- /dev/null +++ b/public/assets/main/js/netbar.js @@ -0,0 +1,312 @@ +function mmoEl(name) { + if (document.getElementById) { + return document.getElementById(name); + } else if (document.all) { + return document.all[name]; + } else if (document.layers) { + return document.layers[name]; + } + return false; +} + +function mmoJump(el) { + window.location.href = el.options[el.selectedIndex].value; +} + +var mmo_tickDly = 3000; +var mmo_tickFadeDly = 50; +var mmo_tickFadeTicks = 10; +var mmoTickEl = null; +var mmoTickItems = null; +var mmoTickIdx = 0; +var mmoTickState = 0; +var mmoTickFade = 1; +var mmoTickHalt = false; + +function mmoTicker() { + var f = 0; + try { + mmoTickEl = mmoEl('mmoNewsticker'); + if (mmoTickEl) { + mmoTickItems = mmoTickEl.getElementsByTagName("li"); + if (mmoTickItems) { + f = 1; + } + } + } catch (e) { + f = 0; + } + if (!f) { + setTimeout(mmoTicker, 10); + return; + } + setTimeout(mmoTicknext, 0); +} + +function mmoTicknext() { + if (mmoTickHalt) { + mmoTickAlphaFor(mmoTickEl, 100); + setTimeout(mmoTicknext, 500); + return; + } + if (mmoTickState == 0) { + mmoTickFade = mmoTickFade - 1; + mmoTickAlpha(); + if (mmoTickFade <= 0) { + mmoTickState = 1; + setTimeout(mmoTicknext, 0); + return; + } + setTimeout(mmoTicknext, mmo_tickFadeDly); + return; + } + if (mmoTickState == 1) { + mmoTickItems[mmoTickIdx].className = ""; + mmoTickIdx++; + if (mmoTickIdx >= mmoTickItems.length) mmoTickIdx = 0; + mmoTickItems[mmoTickIdx].className = "mmoTickShow"; + setTimeout(mmoTicknext, mmo_tickFadeDly); + mmoTickState = 2; + return; + } + if (mmoTickState == 2) { + mmoTickFade = mmoTickFade + 1; + mmoTickAlpha(); + if (mmoTickFade >= mmo_tickFadeTicks) { + if (mmoTickItems.length < 2) return; + mmoTickState = 0; + setTimeout(mmoTicknext, mmo_tickDly); + return; + } + setTimeout(mmoTicknext, mmo_tickFadeDly); + return; + } +} + +function mmoTickAlpha() { + var a = (100 / mmo_tickFadeTicks) * mmoTickFade; + mmoTickAlphaFor(mmoTickEl, a); +} + +function mmoTickAlphaFor(el, a) { + el.style.filter = 'Alpha(opacity=' + a + ')'; + el.style.opacity = a / 100; + el.style.MozOpacity = a / 100; + el.style.KhtmlOpacity = a / 100; +} + +var mmoActive_select = null; + +function mmoInitSelect() { + if (!document.getElementById) return false; + document.getElementById('mmonetbar').style.display = 'block'; + document.getElementById('mmoGame').style.display = 'block'; + document.getElementById('mmoFocus').onkeyup = function(e) { + mmo_selid = mmoActive_select.id.replace('mmoOptionsDiv', ''); + var e = e || window.event; + if (e.keyCode) var thecode = e.keyCode; + else if (e.which) var thecode = e.which; + mmoSelectMe(mmo_selid, thecode); + } +} + +function mmoSelectMe(selid, thecode) { + var mmolist = document.getElementById('mmoList' + selid); + var mmoitems = mmolist.getElementsByTagName('li'); + switch (thecode) { + case 13: + mmoShowOptions(selid); + window.location = mmoActive_select.url; + break; + case 38: + mmoActive_select.activeit.className = ''; + var minus = ((mmoActive_select.activeid - 1) <= 0) ? '0' : (mmoActive_select.activeid - 1); + mmoActive_select = mmoSetActive(selid, minus); + break; + case 40: + mmoActive_select.activeit.className = ''; + var plus = ((mmoActive_select.activeid + 1) >= mmoitems.length) ? (mmoitems.length - 1) : (mmoActive_select.activeid + 1); + mmoActive_select = mmoSetActive(selid, plus); + break; + default: + thecode = String.fromCharCode(thecode); + var found = false; + for (var i = 0; i < mmoitems.length; i++) { + var _a = mmoitems[i].getElementsByTagName('a'); + if (navigator.appName.indexOf("Explorer") > -1) {} else { + txtContent = _a[0].textContent; + } + if (!found && (thecode.toLowerCase() == txtContent.charAt(0).toLowerCase())) { + mmoActive_select.activeit.className = ''; + mmoActive_select = mmoSetActive(selid, i); + found = true; + } + } + break; + } +} + +function mmoSetActive(selid, itemid) { + mmoActive_select = null; + var mmolist = document.getElementById('mmoList' + selid); + var mmoitems = mmolist.getElementsByTagName('li'); + mmoActive_select = document.getElementById('mmoOptionsDiv' + selid);; + mmoActive_select.selid = selid; + if (itemid != undefined) { + var _a = mmoitems[itemid].getElementsByTagName('a'); + var textVar = document.getElementById("mmoMySelectText" + selid); + textVar.innerHTML = _a[0].innerHTML; + if (selid == 1) textVar.className = _a[0].className; + mmoitems[itemid].className = 'mmoActive'; + } + for (var i = 0; i < mmoitems.length; i++) { + if (mmoitems[i].className == 'mmoActive') { + mmoActive_select.activeit = mmoitems[i]; + mmoActive_select.activeid = i; + mmoActive_select.url = (mmoitems[i].getElementsByTagName('a')) ? mmoitems[i].getElementsByTagName('a')[0].href : null; + } + } + return mmoActive_select; +} + +function mmoShowOptions(g) { + var _elem = document.getElementById("mmoOptionsDiv" + g); + if ((mmoActive_select) && (mmoActive_select != _elem)) { + mmoActive_select.className = "mmoOptionsDivInvisible"; + document.getElementById('mmonetbar').focus(); + } + if (_elem.className == "mmoOptionsDivInvisible") { + document.getElementById('mmoFocus').focus(); + mmoActive_select = mmoSetActive(g); + if (document.documentElement) { + document.documentElement.onclick = mmoHideOptions; + } else { + window.onclick = mmoHideOptions; + } + _elem.className = "mmoOptionsDivVisible"; + } else if (_elem.className == "mmoOptionsDivVisible") { + _elem.className = "mmoOptionsDivInvisible"; + document.getElementById('mmonetbar').focus(); + } +} + +function mmoHideOptions(e) { + if (mmoActive_select) { + if (!e) e = window.event; + var _target = (e.target || e.srcElement); + if ((_target.id.indexOf('mmoOptionsDiv') != -1)) return false; + if (mmoisElementBefore(_target, 'mmoSelectArea') == 0 && (mmoisElementBefore(_target, 'mmoOptionsDiv') == 0)) { + mmoActive_select.className = "mmoOptionsDivInvisible"; + mmoActive_select = null; + } + } else { + if (document.documentElement) document.documentElement.onclick = function() {}; + else window.onclick = null; + } +} + +function mmoisElementBefore(_el, _class) { + var _parent = _el; + do _parent = _parent.parentNode; while (_parent && (_parent.className != null) && (_parent.className.indexOf(_class) == -1)) + return (_parent.className && (_parent.className.indexOf(_class) != -1)) ? 1 : 0; +} + +var ua = navigator.userAgent.toLowerCase(); +var ie6browser = ((ua.indexOf("msie 6") > -1) && (ua.indexOf("opera") < 0)) ? true : false; + +function highlight(el, mod) { + if (ie6browser) { + if (mod == 1 && !el.className.match(/highlight/)) el.className = el.className + ' highlight'; + else if (mod == 0) el.className = el.className.replace(/highlight/g, ''); + } +} + +var mmoToggleDisplay = { + init: function(wrapper) { + var wrapper = document.getElementById(wrapper); + if (!wrapper) return; + var headline = wrapper.getElementsByTagName("h4")[0], + link = headline.getElementsByTagName("a")[0]; + if (link.className.indexOf("gameCountZero") != -1) return false; + var panel = document.getElementById(link.hash.substr(1)); + mmoToggleDisplay.hidePanel(panel, link); + link.onclick = function(e) { + mmoToggleDisplay.loadImages(); + mmoToggleDisplay.toggle(this, panel); + return false; + }; + mmoToggleDisplay.outerClick(wrapper, link, panel); + var timeoutID = null, + delay = 8000; + wrapper.onmouseout = function(e) { + if (!e) { + var e = window.event; + } + var reltg = (e.relatedTarget) ? e.relatedTarget : e.toElement; + if (reltg == wrapper || mmoToggleDisplay.isChildOf(reltg, wrapper)) { + return; + } + timeoutID = setTimeout(function() { + mmoToggleDisplay.hidePanel(panel, link); + }, delay); + }; + wrapper.onmouseover = function(e) { + if (timeoutID) { + clearTimeout(timeoutID); + } + }; + }, + isChildOf: function(child, parent) { + while (child && child != parent) { + child = child.parentNode; + } + if (child == parent) { + return true; + } else { + return false; + } + }, + hidePanel: function(panel, link) { + panel.style.display = "none"; + link.className = "toggleHidden"; + }, + toggle: function(link, panel) { + panel.style.display = panel.style.display == "none" ? "block" : "none"; + link.className = link.className == "toggleHidden" ? "" : "toggleHidden"; + }, + outerClick: function(wrapper, link, panel) { + document.body.onclick = function(e) { + if (!e) { + e = window.event + }; + if (!(mmoToggleDisplay.isChildOf((e.target || e.srcElement), wrapper)) && panel.style.display != "none") { + mmoToggleDisplay.toggle(link, panel); + } + } + }, + loadImages: function() { + var script = document.createElement("script"); + script.type = "text/javascript"; + var jsonGameData_browser = '{"goblinkeeper":"http:\/\/web.archive.org\/web\/20130708185211\/http:\/\/gf2.geo.gfsrv.net\/cdnab\/cb244b7c4c2e3b5a5b29c425cf4c34.png"}', + jsonGameData_client = '{"wizard101":"http:\/\/web.archive.org\/web\/20130708185211\/http:\/\/gf1.geo.gfsrv.net\/cdnfe\/145389879c3de525f215d58a2164ec.png","4story":"http:\/\/web.archive.org\/web\/20130708185211\/http:\/\/gf2.geo.gfsrv.net\/cdn48\/f45f7af83937fdcd603f8832c9af7e.png","nostale":"http:\/\/web.archive.org\/web\/20130708185211\/http:\/\/gf1.geo.gfsrv.net\/cdnf2\/5e6a67dad4ce5709555ec4b9d6c460.png","airrivals":"http:\/\/web.archive.org\/web\/20130708185211\/http:\/\/gf2.geo.gfsrv.net\/cdnd4\/02ac9b8a1b4b30a1c0652111e8ead7.png","aion":"http:\/\/web.archive.org\/web\/20130708185211\/http:\/\/gf1.geo.gfsrv.net\/cdn36\/19670436cde4ed9579ad5c75bfe430.png","runesofmagic":"http:\/\/web.archive.org\/web\/20130708185211\/http:\/\/gf3.geo.gfsrv.net\/cdne0\/c0ea241e7c3638305000233c263593.png","raiderz":"http:\/\/web.archive.org\/web\/20130708185211\/http:\/\/gf2.geo.gfsrv.net\/cdn7f\/d4ee9d948d95a3475346617f3a12ed.png"}', + jsonGameData_featured = '{"tera":"http:\/\/web.archive.org\/web\/20130708185211\/http:\/\/gf1.geo.gfsrv.net\/cdnf9\/9859166bf0117be2311fcb09086006.png"}'; + script.text = ''; + script.text += ' mmoToggleDisplay.callback(' + jsonGameData_featured + ', "featured");'; + script.text += ' mmoToggleDisplay.callback(' + jsonGameData_client + ', "client");'; + script.text += 'mmoToggleDisplay.callback(' + jsonGameData_browser + ', "browser");'; + document.getElementsByTagName("head")[0].appendChild(script); + mmoToggleDisplay.loadImages = function() {}; + }, + callback: function(data, gamesCat) { + for (var gameName in data) { + var gameSpan = document.getElementById("gameImgTarget_" + gameName); + if (!gameSpan) { + return false; + } + var gameImg = document.createElement("img"); + gameImg.src = "" + data[gameName]; + gameImg.alt = ""; + gameSpan.appendChild(gameImg); + } + } +} diff --git a/resources/views/components/netbar/games-overview.blade.php b/resources/views/components/netbar/games-overview.blade.php new file mode 100644 index 0000000..dc2febd --- /dev/null +++ b/resources/views/components/netbar/games-overview.blade.php @@ -0,0 +1,84 @@ +{{-- To be used with
--}} + +
+
+

+ More games + + +

+
+
+
+ + +
Featured game
+ + + +
MMORPGs
+ + + +
Browser games
+ +
+
diff --git a/resources/views/components/netbar/main.blade.php b/resources/views/components/netbar/main.blade.php new file mode 100644 index 0000000..0a4ee79 --- /dev/null +++ b/resources/views/components/netbar/main.blade.php @@ -0,0 +1,126 @@ + +
+ + + +
+
+ {{-- + + --}} + + + + + +
+
+
+ + + +
+ +
+
+
+
+ {{ __('app/netbar.current-language') }} +
+
+
+
+
+ +
+
+
+
+
+ + {{-- --}} +
+ +
+
+ + + + + + diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index f4b0ae8..3fde4f9 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -16,6 +16,7 @@ @endif + @@ -30,6 +31,7 @@ +