Skip to content

Commit 3e75a80

Browse files
committed
Merge branch 'main' of https://github.com/coreui/coreui
2 parents ec79b62 + 8bfc850 commit 3e75a80

File tree

10 files changed

+107
-232
lines changed

10 files changed

+107
-232
lines changed

build/build-plugins.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
import path from 'node:path'
1010
import { fileURLToPath } from 'node:url'
1111
import { babel } from '@rollup/plugin-babel'
12-
import globby from 'globby'
12+
import { globby } from 'globby'
1313
import { rollup } from 'rollup'
1414
import banner from './banner.mjs'
1515

1616
const __filename = fileURLToPath(import.meta.url)
1717
const __dirname = path.dirname(fileURLToPath(import.meta.url))
1818

1919
const sourcePath = path.resolve(__dirname, '../js/src/').replace(/\\/g, '/')
20-
const jsFiles = globby.sync(`${sourcePath}/**/*.js`)
20+
const jsFiles = await globby(`${sourcePath}/**/*.js`)
2121

2222
// Array which holds the resolved plugins
2323
const resolvedPlugins = []
@@ -37,6 +37,9 @@ for (const file of jsFiles) {
3737
}
3838

3939
const build = async plugin => {
40+
/**
41+
* @type {import('rollup').GlobalsOption}
42+
*/
4043
const globals = {}
4144

4245
const bundle = await rollup({

docs/content/components/avatar.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: docs
33
title: Avatar
4-
description: Avatar component can be used to display circular user profile pictures. Avatar can be used to portray people or objects. It supports images, icons, or letters.
4+
description: The Avatar component is used to display circular user profile pictures. Avatars can portray people or objects and support images, icons, or letters.
55
group: components
66
aliases:
77
- "/4.0/components/avatar/"
@@ -13,6 +13,8 @@ other_frameworks: avatar
1313

1414
## Image avatars
1515

16+
Showcase avatars using images. These avatars are typically circular and can display user profile pictures.
17+
1618
{{< example >}}
1719
<div class="avatar">
1820
<img class="avatar-img" src="/assets/img/avatars/1.jpg" alt="user@email.com">
@@ -27,6 +29,8 @@ other_frameworks: avatar
2729

2830
## Letter avatars
2931

32+
Use letters inside avatars to represent users or objects when images are not available. This can be useful for displaying initials.
33+
3034
{{< example >}}
3135
<div class="avatar bg-primary text-white">CUI</div>
3236
<div class="avatar bg-secondary">CUI</div>
@@ -35,6 +39,8 @@ other_frameworks: avatar
3539

3640
## Icons avatars
3741

42+
Incorporate icons within avatars, allowing for a visual representation using scalable vector graphics (SVG).
43+
3844
{{< example >}}
3945
<div class="avatar bg-info text-white">
4046
<svg id="cib-coreui-c" class="icon" viewBox="0 0 32 32">
@@ -55,7 +61,7 @@ other_frameworks: avatar
5561

5662
## Rounded avatars
5763

58-
Use the `.rounded` class to make avatars squared with rounded corners.
64+
Create avatars with rounded corners by adding the `.rounded` class. This gives a softer, less angular appearance.
5965

6066
{{< example >}}
6167
<div class="avatar rounded bg-primary text-white">CUI</div>
@@ -65,7 +71,7 @@ Use the `.rounded` class to make avatars squared with rounded corners.
6571

6672
## Square avatars
6773

68-
Use the `.rounded-0` class to make avatars squared.
74+
Make avatars square by using the `.rounded-0` class, removing any rounded edges for a sharper look.
6975

7076
{{< example >}}
7177
<div class="avatar rounded-0 bg-primary text-white">CUI</div>
@@ -75,16 +81,19 @@ Use the `.rounded-0` class to make avatars squared.
7581

7682
## Sizes
7783

78-
Fancy larger or smaller avatar? Add .avatar-lg or .avatar-sm for additional sizes.
79-
84+
Adjust the size of avatars using the `.avatar-sm`, `.avatar-md`, `.avatar-lg`, and `.avatar-xl` classes for larger or smaller versions.
8085
{{< example >}}
86+
<div class="avatar avatar-xl bg-secondary">CUI</div>
8187
<div class="avatar avatar-lg bg-secondary">CUI</div>
88+
<div class="avatar avatar-md bg-secondary">CUI</div>
8289
<div class="avatar bg-secondary">CUI</div>
8390
<div class="avatar avatar-sm bg-secondary">CUI</div>
8491
{{< /example >}}
8592

8693
## Stacked avatars
8794

95+
Display multiple avatars in a stack to represent a group of users or items, with additional count if there are more avatars than can be displayed.
96+
8897
{{< example >}}
8998
<div class="avatars-stack">
9099
<div class="avatar">
@@ -104,6 +113,8 @@ Fancy larger or smaller avatar? Add .avatar-lg or .avatar-sm for additional size
104113

105114
## Avatars with status
106115

116+
Add a status indicator to avatars using the .avatar-status class to show online or offline status.
117+
107118
{{< example >}}
108119
<div class="avatar">
109120
<img class="avatar-img" src="/assets/img/avatars/1.jpg" alt="user@email.com">
@@ -118,6 +129,12 @@ Fancy larger or smaller avatar? Add .avatar-lg or .avatar-sm for additional size
118129

119130
## Customizing
120131

132+
### CSS variables
133+
134+
Avatars use local CSS variables on `.avatar` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too.
135+
136+
{{< scss-docs name="avatar-css-vars" file="scss/_avatar.scss" >}}
137+
121138
### SASS variables
122139

123140
{{< scss-docs name="avatar-variables" file="scss/_variables.scss" >}}

package-lock.json

Lines changed: 0 additions & 195 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"docs-serve": "hugo server --port 9001 --disableFastRender --printUnusedTemplates",
6565
"docs-serve-only": "npx sirv-cli _gh_pages --port 9001",
6666
"lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
67-
"update-deps": "ncu -u -x globby,jasmine,karma-browserstack-launcher,karma-rollup-preprocessor,terser && echo Manually update docs/assets/js/vendor",
67+
"update-deps": "ncu -u -x jasmine,karma-browserstack-launcher,karma-rollup-preprocessor,terser && echo Manually update docs/assets/js/vendor",
6868
"release": "npm-run-all dist release-sri docs-build release-zip*",
6969
"release-sri": "node build/generate-sri.mjs",
7070
"release-version": "node build/change-version.mjs",

0 commit comments

Comments
 (0)