-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a92c890
commit d1e4a21
Showing
8 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace VocaDb.Web.Controllers | ||
{ | ||
public class ReactController : Controller | ||
{ | ||
public IActionResult Index() | ||
{ | ||
return View(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react'; | ||
|
||
import './i18n'; | ||
|
||
const App = (): React.ReactElement => { | ||
return <></>; | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import i18n from 'i18next'; | ||
import LanguageDetector from 'i18next-browser-languagedetector'; | ||
import Backend from 'i18next-http-backend'; | ||
import { initReactI18next } from 'react-i18next'; | ||
|
||
i18n | ||
.use(Backend) | ||
.use(LanguageDetector) | ||
.use(initReactI18next) | ||
.init({ | ||
load: 'languageOnly', | ||
fallbackLng: 'en', | ||
|
||
interpolation: { | ||
escapeValue: false, | ||
}, | ||
|
||
react: { | ||
useSuspense: false, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
|
||
import App from './App'; | ||
|
||
const app = document.getElementById('app'); | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
app, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@using System.Globalization | ||
@using VocaDb.Model.DataContracts.Users | ||
@using VocaDb.Model.Domain.Globalization | ||
@using VocaDb.Model.Helpers | ||
@using VocaDb.Model.Utils | ||
@using VocaDb.Web.Models.Shared | ||
@inherits VocaDbPage | ||
@addTagHelper *, VocaDb.ReMikus | ||
|
||
@{ | ||
Layout = null; | ||
|
||
var stylesheet = Login.IsLoggedIn && !string.IsNullOrEmpty(Login.User.Stylesheet) ? Login.User.Stylesheet : Config.SiteSettings.DefaultStylesheet; | ||
} | ||
|
||
<!DOCTYPE html> | ||
<html lang="@InterfaceLanguage.GetAvailableLanguageCode(CultureInfo.CurrentUICulture)"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vocaloid Database</title> | ||
|
||
<link rel="shortcut icon" href="@(Config.Assets.FavIconUrl.EmptyToNull() ?? Url.Content("~/Content/favicon.ico"))" type="image/x-icon" /> | ||
<remikus path="/Content/css.css" /> | ||
@if (!string.IsNullOrEmpty(stylesheet)) | ||
{ | ||
<link href="@Url.Content("~/Content/Styles/" + stylesheet)" rel="stylesheet" type="text/css" /> | ||
} | ||
<link href="@Url.Content("~/Content/Styles/Icons.css")" rel="stylesheet" type="text/css" /> | ||
<link href="@Url.Content("~/Content/themes/redmond/jquery-ui-1.10.1.custom.min.css")" rel="stylesheet" type="text/css" /> | ||
<link href="@Url.Content("~/Scripts/qTip/jquery.qtip.css")" rel="stylesheet" type="text/css" /> | ||
<link rel="search" type="application/opensearchdescription+xml" title="@BrandableStrings.SiteName" href="@Config.SiteSettings.OpenSearchPath" /> | ||
|
||
<partial name="Partials/_GoogleAnalytics" /> | ||
</head> | ||
<body class="vdb"> | ||
<div id="app"></div> | ||
<script>window.vdb = @ToJS(new { Values = new GlobalValues(this) })</script> | ||
<remikus path="/bundles/manifest.js" /> | ||
<remikus path="/bundles/vendor.js" /> | ||
<remikus path="/bundles/index.js" /> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters