Songhay.Modules.Bolero 6.1.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Songhay.Modules.Bolero --version 6.1.2
NuGet\Install-Package Songhay.Modules.Bolero -Version 6.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Songhay.Modules.Bolero" Version="6.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Songhay.Modules.Bolero --version 6.1.2
#r "nuget: Songhay.Modules.Bolero, 6.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Songhay.Modules.Bolero as a Cake Addin
#addin nuget:?package=Songhay.Modules.Bolero&version=6.1.2

// Install Songhay.Modules.Bolero as a Cake Tool
#tool nuget:?package=Songhay.Modules.Bolero&version=6.1.2

Songhay.Modules.Bolero

shared functions and types for Bolero, supporting CSS 💄, specifically Bulma CSS đŸ±đŸ–Œ

NuGet package 📩: Songhay.Modules.Bolero

These are the main concerns of this work:

  • Utility, mostly sharing functions for Remoting and IJSRuntime
  • Visuals, a deliberately incomplete coverage of HTML, CSS and Bulma by Jeremy Thomas
  • Models (Primitives), F♯ primitive obsession, supporting the Visuals

Utility

There are four utilities:

  1. a utility for Bolero [src]
  2. a utility for JSON documents [src]
  3. a utility for IJSRuntime [src]
  4. a utility for IRemoteService [src]

Visuals and Models

Here is my first attempt at building a <acronym title="Domain-Specific Language">DSL</acronym> for HTML, CSS and Bulma CSS on top of Bolero. For example, here is an expression for building a Bulma footer:

let footerNode =
    let cssClassesParentLevel = CssClasses [ levelContainer; isMobileModifier ]
    let cssClassesSvgVersionNodes = [ bulmaTextGreyLightTone ] |> cssClassesParentLevel.AppendList
    let versionsNode =
        div {
            cssClassesSvgVersionNodes.ToHtmlClassAttribute
            forEach App.appVersions <| svgVersionNode
        }
    let socialNode =
        bulmaLevel
            (HasClasses (CssClasses [ isMobileModifier ]))
            (forEach App.appSocialLinks <| studioAnchor)
    let signatureNode =
        paragraphElement
            NoCssClasses
            NoAttr
            (span {
                "copyright" |> CssClasses.toHtmlClass
                rawHtml $"© Bryan D. Wilhite {DateTime.Now.Year}"
            })
    bulmaContainer
        ContainerWidthFluid
        NoCssClasses
        (concat {
            bulmaColumnsContainer
                NoCssClasses
                (concat {
                    bulmaColumn
                        (HasClasses (CssClasses [ HSize4.CssClass; elementTextAlign AlignCentered ]))
                        studioLogo
                    bulmaColumn
                        (HasClasses (CssClasses [ HSize4.CssClass ]))
                        socialNode
                    bulmaColumn
                        (HasClasses (CssClasses [ HSize4.CssClass; elementTextAlign AlignCentered ]))
                        signatureNode
                })
            bulmaColumnsContainer
                (HasClasses (CssClasses [ AlignCentered.CssClass ]))
                (concat {
                    bulmaColumn
                        (HasClasses (CssClasses [ HSize4.CssClass ]))
                        versionsNode
                })
        })

The preference here (at the moment) is to have more types than functions for the DSL. These types are grouped into four models of primitives:

  1. Bulma Primitives [src]
  2. CSS Primitives [src]
  3. HTML Primitives [src]
  4. SVG Primitives [src]

These models support the functions of the Visuals:

  1. HTML Body Visuals [src]
  2. CSS Declarations [src]
  3. HTML Head Elements [src]
  4. Bulma Component Visuals [src]
  5. Bulma CSS Class names [src]
  6. Bulma Element Visuals [src]
  7. Bulma Layout Visuals [src]

The coverage of HTML is quite limited because Bulma itself has its own, excellent HTML DSL on which this work depends heavily. The generic CSS coverage is starting off with typography. The Bulma-specific coverage is the most extensive but lacking in the following areas:

I look forward to working a bit more on this Bulma coverage, likely starting with Bulma pagination.

custom JavaScript is needed for the Bulma Navbar

In order to toggle the Bulma Navbar burger and its dropdown menu, the following JavaScript is needed:

(() => {

    window.addEventListener('DOMContentLoaded', () => {
        const burger = document.querySelector('.navbar-burger');
        const nav = document.querySelector(`#${burger.dataset.target}`);
        const isActiveCssClass = 'is-active';

        burger.addEventListener('click', () => {
            burger.classList.toggle(isActiveCssClass);
            nav.classList.toggle(isActiveCssClass);
        });
    });

})();

This JavaScript is similar to the code provided in the Bulma documentation.

@BryanWilhite

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Songhay.Modules.Bolero:

Package Downloads
Songhay.Player.YouTube

Bolero Components, Elmish types and JSON handlers for the b-roll player for YouTube 🎥 content

Songhay.Player.ProgressiveAudio

Bolero Components, Elmish types and JSON handlers for b-roll player for progressive audio 🎤 content

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
6.4.0 172 1/23/2024
6.3.0 298 7/7/2023
6.2.0 200 4/9/2023
6.1.2 251 3/13/2023
6.1.1 263 2/27/2023
6.1.0 407 11/9/2022
6.0.0 441 9/27/2022

upgrade of dependencies 📦🔝