Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support language-specific CSS files #3464 #3978

Merged
merged 48 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8ae7ab7
Issue#3769 resolved
cmcd22 Aug 1, 2022
b7e67a6
Issue#3464 commit for pull-request
cmcd22 Aug 18, 2022
ae79a16
Delete c.css
cmcd22 Aug 18, 2022
652292a
Delete cplusplus.css
cmcd22 Aug 18, 2022
dc11e4c
Delete csharp.css
cmcd22 Aug 18, 2022
b9030c1
Delete go.css
cmcd22 Aug 18, 2022
793e6ea
Delete java.css
cmcd22 Aug 18, 2022
309730b
Delete javascript.css
cmcd22 Aug 18, 2022
eeb4c8e
Delete json.css
cmcd22 Aug 18, 2022
3e5e191
Delete kotlin.css
cmcd22 Aug 18, 2022
6a31541
Delete python.css
cmcd22 Aug 18, 2022
2f81cdc
Delete swagger.css
cmcd22 Aug 18, 2022
1a25cdb
Delete swift.css
cmcd22 Aug 18, 2022
4d36a8f
Delete xml.css
cmcd22 Aug 18, 2022
1595303
Delete launchSettings.json
cmcd22 Aug 18, 2022
bf1a1ae
Delete reviews.js
cmcd22 Aug 18, 2022
0abe4a7
Delete reviews.js.map
cmcd22 Aug 18, 2022
e77ae95
Update appsettings.json
cmcd22 Aug 18, 2022
d274d1a
Update appsettings.json
cmcd22 Aug 18, 2022
4c7ec2b
Update JavaASTAnalyser.java
cmcd22 Aug 18, 2022
955a5fe
Update _Layout.cshtml
cmcd22 Aug 18, 2022
168ee80
Issue#3769 resolved
cmcd22 Aug 1, 2022
0e3485c
Issue#3464 commit for pull-request
cmcd22 Aug 18, 2022
ad795e5
Issue#3464 commit for pull-request
cmcd22 Aug 18, 2022
f2fd868
Merge remote-tracking branch 'origin/Issue_#3464' into Issue_#3464
cmcd22 Aug 18, 2022
a2b8f10
Update _Layout.cshtml
cmcd22 Aug 18, 2022
bbd1548
Update appsettings.json
cmcd22 Aug 18, 2022
8445dfd
Update JavaASTAnalyser.java
cmcd22 Aug 18, 2022
f6a3475
Delete c.css
cmcd22 Aug 18, 2022
523068d
Delete cplusplus.css
cmcd22 Aug 18, 2022
c4feb97
Delete csharp.css
cmcd22 Aug 18, 2022
e25a614
Delete go.css
cmcd22 Aug 18, 2022
5797b8d
Delete java.css
cmcd22 Aug 18, 2022
3a6694b
Delete javascript.css
cmcd22 Aug 18, 2022
902964f
Delete json.css
cmcd22 Aug 18, 2022
4cbb318
Delete kotlin.css
cmcd22 Aug 18, 2022
9c453bf
Delete python.css
cmcd22 Aug 18, 2022
8be123c
Delete swagger.css
cmcd22 Aug 18, 2022
3eaae4c
Delete swift.css
cmcd22 Aug 18, 2022
6321066
Delete xml.css
cmcd22 Aug 18, 2022
6bb6fca
Update launchSettings.json
cmcd22 Aug 18, 2022
d688c90
Update launchSettings.json
cmcd22 Aug 18, 2022
56570aa
Update webpack.config.js
cmcd22 Aug 18, 2022
c406a1d
Update launchSettings.json
cmcd22 Aug 18, 2022
14e81c4
Update launchSettings.json
cmcd22 Aug 18, 2022
0317d8b
Update _Layout.cshtml
cmcd22 Aug 19, 2022
51fec15
Merge branch 'main' into Issue_#3464
cmcd22 Aug 25, 2022
5ab3267
Update webpack.config.js
JonathanGiles Aug 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
17 changes: 15 additions & 2 deletions src/dotnet/APIView/APIViewWeb/Client/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,20 @@ module.exports = {
navbar: './src/navbar.ts',
review: './src/review.ts',
reviews: './src/reviews.ts',
site: './css/site.scss'
site: './css/site.scss',

c: './css/c.scss',
cplusplus: './css/cplusplus.scss',
csharp: './css/csharp.scss',
go: './css/go.scss',
java: './css/java.scss',
javascript: './css/javascript.scss',
json: './css/json.scss',
kotlin: './css/kotlin.scss',
python: './css/python.scss',
swagger: './css/swagger.scss',
swift: './css/swift.scss',
xml: './css/xml.scss'
},
devtool: 'source-map',
module: {
Expand Down Expand Up @@ -45,7 +58,7 @@ module.exports = {
},
plugins: [
new MiniCssExtractPlugin({
filename: 'site.css'
filename: "[name].css"
}),
],
resolve: {
Expand Down
15 changes: 15 additions & 0 deletions src/dotnet/APIView/APIViewWeb/Pages/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@
<!-- BootStrap Select -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/css/bootstrap-select.min.css"/>
<link id="theme-css" rel="stylesheet" href="~/site.css" asp-append-version="true" />
@{
var modelType = ViewData.ModelMetadata.ModelType.Name;
if (modelType == "ReviewPageModel")
{
@functions {
public string getLanguage()
{
return ViewData.Model.Review.GetLanguageCssSafeName();
}
}
var lang = getLanguage();
var hrefNew = "~/" + lang + ".css";
<link rel="stylesheet" href=@hrefNew asp-append-version="true"/>
}
}
</head>
@{
var userPreference = (ViewData["UserPreference"] as UserPreferenceModel) ?? new UserPreferenceModel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"applicationUrl": "http://localhost:5000"
}
}
}
}