Skip to content

Commit

Permalink
Update node packages (#57)
Browse files Browse the repository at this point in the history
Update node packages
* bootstrap v5.2.3 to v5.3.3
* bootstrap-icons v1.11.2 to v1.11.3
* autoprefixer v9.8.8 to 10.4.19
* cssnano v4.1.11 to 7.0.1
* grunt-postcss v0.9.0 to @lodder/grunt-postcss v3.1.1
* @eonasdan/tempus-dominus v6.7.19 to v6.9.6

Replace depreciated Bootstrap navbar-dark class

* Dark navbar items: Add attribute data-bs-theme="dark"
* Ligth navbar items: Add attribute data-bs-theme="light"
* Updatae affected razor views

Bump version to v4.1.0
  • Loading branch information
axunonb committed May 7, 2024
1 parent 9b47c68 commit 083a418
Show file tree
Hide file tree
Showing 20 changed files with 2,086 additions and 3,589 deletions.
8 changes: 4 additions & 4 deletions TournamentCalendar/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module.exports = function (grunt) {
'use strict';
var sass = require('node-sass'); // used in grunt-sass options, must be included in package.json

grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-sass'); // Bootstrap 5 uses https://sass-lang.com/dart-sass; they also maintain the node-sass package
grunt.loadNpmTasks('@lodder/grunt-postcss'); // grunt-postcss is retired, use @lodder/grunt-postcss
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
Expand Down Expand Up @@ -39,10 +39,10 @@ module.exports = function (grunt) {
// Postcss
postcss: {
options: {
// map: true, // inline sourcemaps
// map: true, // inline source maps
// or
map: {
inline: false, // save all sourcemaps as separate files...
inline: false, // save all source maps as separate files...
annotation: 'wwwroot/css/maps/', // ...to the specified directory relative to the project root
sourcesContent: true // whether original contents (e.g. Sass sources) will be included to a sourcemap.
},
Expand Down
15 changes: 10 additions & 5 deletions TournamentCalendar/Styles/bootstrap/_custom.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
// Bootstrap dependencies - javascript and fonts must be copied manually!!
// font-awesome is included by site.scss

// Does not exist in BS5
//@import '../../node_modules/tether/src/css/tether.sass';

// Always required for Bootstrap
@import "node_modules/bootstrap/scss/functions";
//@import "node_modules/bootstrap/scss/variables";
//@import "node_modules/bootstrap/scss/mixins";

// Bootstrap overrides
//
// Copy variables from `_variables.scss` to this file to override default values
// without modifying source files.
// Variable customizations in Bootstrap have to come after @import "functions",
// but before @import "variables" and the rest of our import stack. The same applies to Sass maps.

//
// Color system
Expand Down Expand Up @@ -55,6 +52,7 @@ $dropdown-link-hover-bg: shade-color($dropdown-link-hover-bg, 10%);

$dropdown-link-active-color: $black;
$dropdown-link-active-bg: tint-color($primary, 80%);
$dropdown-bg: $white; /* changed! */

// Body
//
Expand Down Expand Up @@ -98,3 +96,10 @@ $box-shadow-sm: 0 .125rem .25rem rgba($black, .015);
$box-shadow: 0 .5rem 1rem rgba($black, .30);
$box-shadow-lg: 0 1rem 3rem rgba($black, .35);

// Tables
$table-bg: $white;
$table-hover-bg-factor: .2; /* .075 !default;*/
$table-hover-bg: rgba(#3299BB, $table-hover-bg-factor);

// Cards
$card-bg: $white;
9 changes: 7 additions & 2 deletions TournamentCalendar/TournamentCalendar.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<PropertyGroup>
<Product>TournamentCalendar</Product>
<TargetFramework>net8.0</TargetFramework>
<Version>4.0.0</Version>
<FileVersion>4.0.0</FileVersion>
<Version>4.1.0</Version>
<FileVersion>4.1.0</FileVersion>
<EnableDefaultContentItems>true</EnableDefaultContentItems>
<Authors>axuno gGmbH</Authors>
<CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</CurrentYear>
Expand Down Expand Up @@ -137,6 +137,11 @@
<ItemGroup>
<ProjectReference Include="..\Data\TournamentCalender.Data.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="app_offline_.htm">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<!-- Custom PropertyGroup to add the Environment name during publish. The EnvironmentName property is used for the 'Environment' variable in web.config when publishing. -->
<PropertyGroup Condition=" '$(Configuration)' == '' Or '$(Configuration)' == 'Debug'">
<EnvironmentName>Development</EnvironmentName>
Expand Down
9 changes: 5 additions & 4 deletions TournamentCalendar/Views/Calendar/Overview.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
</label>
}
</div>
<div class="col-md-12 pb-2 table-responsive">
<table id="tournaments-table" class="table table-striped table-bordered border-light table-hover nowrap rounded">
<div class="pb-2 table-responsive">
<table id="tournaments-table" class="table table-striped table-bordered border-light table-hover rounded">
<thead>
<tr>
<th>Datum</th>
Expand All @@ -38,7 +38,7 @@
<th>Art</th>
<th>Belag</th>
<th>PLZ</th>
<th class="text-right"><i class="bi bi-info-circle-fill"></i></th>
<th class="text-center"><i class="bi bi-info-circle-fill"></i></th>
</tr>
</thead>
<tbody>
Expand All @@ -51,7 +51,7 @@
<td>@m.GetTournamentTypeShort()</td>
<td>@m.GetSurface()</td>
<td>@m.CountryId-@m.PostalCode</td>
<td class="text-right"><a href="@Url.Action(nameof(Calendar.Id), nameof(Calendar), new {id = m.Id})" style="text-decoration: none" aria-label="@(m.TournamentName)"><i class="bi bi-info-circle @((DateTime.Now.Date - m.ModifiedOn.Date).Days < 2 ? "text-primary" : "")"></i></a></td>
<td class="text-center"><a href="@Url.Action(nameof(Calendar.Id), nameof(Calendar), new {id = m.Id})" style="text-decoration: none" aria-label="@(m.TournamentName)"><i class="bi bi-info-circle @((DateTime.Now.Date - m.ModifiedOn.Date).Days < 2 ? "text-primary" : "")"></i></a></td>
</tr>
}
</tbody>
Expand Down Expand Up @@ -120,6 +120,7 @@
searchable: true,
sortable: true,
paging: false,
fixedColumns: true,
columns: [
{
select: 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@model NavigationViewModel
@addTagHelper *, cloudscribe.Web.Navigation
<ul class="navbar-nav me-auto mt-2 mt-md-0">
<ul class="navbar-nav me-auto mt-2 mt-md-0" data-bs-theme="light">
@if (await Model.HasVisibleChildren(Model.RootNode))
{
foreach (var node in Model.RootNode.Children)
Expand Down
2 changes: 1 addition & 1 deletion TournamentCalendar/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</a>
</div>
</header>
<nav id="nav-main" class="navbar navbar-expand-md navbar-dark sticky-top rounded">
<nav id="nav-main" class="navbar navbar-expand-md sticky-top rounded" data-bs-theme="dark">
<div class="container-fluid">
@* <a class="navbar-brand" href="#">axuno</a>*@
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-content" aria-label="Hauptmenü">
Expand Down
Loading

0 comments on commit 083a418

Please sign in to comment.