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

📝 docs(Example): using local image files #2137

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Dark
ShrinkOnScroll
Prominent
Src="https://picsum.photos/1920/1080?random"
Src="_content/Masa.Blazor.Docs/img/423-1920x1080.jpg"
FadeImgOnScroll
ScrollTarget="#scrolling-sheet-3">
<ImgContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Color="#fcb69f"
Dark
ShrinkOnScroll
Src="https://picsum.photos/1920/1080?random"
Src="_content/Masa.Blazor.Docs/img/423-1920x1080.jpg"
ScrollTarget="#scrolling-techniques-5">
<ImgContent>
<MImage Gradient="to top right, rgba(19,84,122,.5), rgba(128,208,199,.8)" @attributes="@context"></MImage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Dark
ShrinkOnScroll
Prominent
Src="https://picsum.photos/1920/1080?random"
Src="_content/Masa.Blazor.Docs/img/423-1920x1080.jpg"
FadeImgOnScroll
ScrollTarget="#scrolling-techniques-4">
<ImgContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Dark
ShrinkOnScroll
Prominent
Src="https://picsum.photos/1920/1080?random"
Src="_content/Masa.Blazor.Docs/img/423-1920x1080.jpg"
FadeImgOnScroll
ScrollTarget="#scrolling-techniques-55"
ScrollThreshold="500">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@
},
new DataDemo
{
Avatar = "https://picsum.photos/250/300?image=660",
Avatar = "_content/Masa.Blazor.Docs/img/660-250x300.jpg",
Title = "Meeting @ Noon",
SubTtile = "<span class=\"font-weight-bold\">Spike Lee</span> &mdash; I'll be in your neighborhood"
},
new DataDemo
{
Avatar = "https://picsum.photos/250/300?image=821",
Avatar = "_content/Masa.Blazor.Docs/img/661-250x300.jpg",
Title = "Summer BBQ <span class=\"grey--text text--lighten-1\"></span>",
SubTtile = "<span class=\"font-weight-bold\">to Operations support</span> &mdash; Wish I could come."
},
new DataDemo
{
Avatar = "https://picsum.photos/250/300?image=783",
Avatar = "_content/Masa.Blazor.Docs/img/663-250x300.jpg",
Title = "Yes yes",
SubTtile = "<span class=\"font-weight-bold\">Bella</span> &mdash; Do you have Paris recommendations"
},
Expand All @@ -91,13 +91,13 @@
},
new DataDemo
{
Avatar = "https://picsum.photos/250/300?image=1006",
Avatar = "_content/Masa.Blazor.Docs/img/664-250x300.jpg",
Title = "Dinner tonight?",
SubTtile = "<span class=\"font-weight-bold\">LaToya</span> &mdash; Do you want to hang out?"
},
new DataDemo
{
Avatar = "https://picsum.photos/250/300?image=146",
Avatar = "_content/Masa.Blazor.Docs/img/665-250x300.jpg",
Title = "So long",
SubTtile = "<span class=\"font-weight-bold\">Nancy</span> &mdash; Do you see what time it is?"
},
Expand All @@ -111,19 +111,19 @@
},
new DataDemo
{
Avatar = "https://picsum.photos/250/300?image=1008",
Avatar = "_content/Masa.Blazor.Docs/img/666-250x300.jpg",
Title = "Breakfast?",
SubTtile = "<span class=\"font-weight-bold\">LaToya</span> &mdash; Do you want to hang out?"
},
new DataDemo
{
Avatar = "https://picsum.photos/250/300?image=839",
Avatar = "_content/Masa.Blazor.Docs/img/667-250x300.jpg",
Title = "Winter Porridge <span class=\"grey--text text--lighten-1\"></span>",
SubTtile = "<span class=\"font-weight-bold\">cc: Daniel</span> &mdash; Tell me more..."
},
new DataDemo
{
Avatar = "https://picsum.photos/250/300?image=145",
Avatar = "_content/Masa.Blazor.Docs/img/668-250x300.jpg",
Title = "Oui oui",
SubTtile = "<span class=\"font-weight-bold\">Nancy</span> &mdash; Do you see what time it is?"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</MListItem>
</MList>

<MImage Src="https://picsum.photos/700?image=996" Height="200"></MImage>
<MImage Src="_content/Masa.Blazor.Docs/img/996-700x700.jpg" Height="200"></MImage>
</MCard>
</MCol>
</MRow>
12 changes: 6 additions & 6 deletions docs/Masa.Blazor.Docs/Examples/components/images/Contain.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
<div>
Matching
</div>
<MImage Src="https://picsum.photos/510/300?random"
<MImage Src="_content/Masa.Blazor.Docs/img/524-510x300.jpg"
AspectRatio="1.7">
</MImage>
<div>
Too high
</div>
<MImage Src="https://picsum.photos/510/300?random"
<MImage Src="_content/Masa.Blazor.Docs/img/524-510x300.jpg"
AspectRatio="2">
</MImage>
<div>
Too low
</div>
<MImage Src="https://picsum.photos/510/300?random"
<MImage Src="_content/Masa.Blazor.Docs/img/524-510x300.jpg"
AspectRatio="1.4">
</MImage>
</MCol>
Expand All @@ -31,21 +31,21 @@
<div>
Matching
</div>
<MImage Src="https://picsum.photos/510/300?random"
<MImage Src="_content/Masa.Blazor.Docs/img/524-510x300.jpg"
AspectRatio="1.7"
contain>
</MImage>
<div>
Too high
</div>
<MImage Src="https://picsum.photos/510/300?random"
<MImage Src="_content/Masa.Blazor.Docs/img/524-510x300.jpg"
AspectRatio="2"
contain>
</MImage>
<div>
Too low
</div>
<MImage Src="https://picsum.photos/510/300?random"
<MImage Src="_content/Masa.Blazor.Docs/img/524-510x300.jpg"
AspectRatio="1.4"
contain>
</MImage>
Expand Down
6 changes: 3 additions & 3 deletions docs/Masa.Blazor.Docs/Examples/components/images/Grid.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<MRow>
@for (var index = 0; index < 9; index++)
{
var localVariable = index;
var localVariable = 660+ index;
<MCol Cols="4">
<MImage Src="@("https://picsum.photos/500/300?image=" + (localVariable * 5 + 10))"
LazySrc="@("https://picsum.photos/500/6?image=" + (localVariable * 5 + 10))" AspectRatio="1"
<MImage Src="@("_content/Masa.Blazor.Docs/img/" + (localVariable) + "-250x300.jpg")"
AspectRatio="1"
Class="grey lighten-2">
<PlaceholderContent>
<MRow Class="fill-height ma-0"
Expand Down
8 changes: 4 additions & 4 deletions docs/Masa.Blazor.Docs/Examples/components/images/Height.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<MRow>
<MCol Cols="6">
<MCard>
<MImage Src="https://picsum.photos/350/165?random"
<MImage Src="_content/Masa.Blazor.Docs/img/524-510x300.jpg"
Height="125"
Class="grey darken-4"></MImage>
<MCardTitle Class="text-h6">
Expand All @@ -15,7 +15,7 @@

<MCol Cols="6">
<MCard>
<MImage Src="https://picsum.photos/350/165?random"
<MImage Src="_content/Masa.Blazor.Docs/img/524-510x300.jpg"
Height="125"
Contain
Class="grey darken-4"></MImage>
Expand All @@ -27,7 +27,7 @@

<MCol Cols="6">
<MCard>
<MImage Src="https://picsum.photos/350/165?random"
<MImage Src="_content/Masa.Blazor.Docs/img/524-510x300.jpg"
MaxHeight="125"
Class="grey darken-4"></MImage>
<MCardTitle Class="text-h6">
Expand All @@ -38,7 +38,7 @@

<MCol Cols="6">
<MCard>
<MImage Src="https://picsum.photos/350/165?random"
<MImage Src="_content/Masa.Blazor.Docs/img/524-510x300.jpg"
MaxHeight="125"
Contain
Class="grey darken-4"></MImage>
Expand Down
3 changes: 1 addition & 2 deletions docs/Masa.Blazor.Docs/Examples/components/images/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<MImage MaxHeight="@MaxHeight"
MaxWidth="@MaxWidth"
Contain="@Contain"
Src="https://picsum.photos/id/11/500/300"
LazySrc="https://picsum.photos/id/11/10/6">
Src="_content/Masa.Blazor.Docs/img/365-510x300.jpg">
</MImage>
</MRow>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<MImage MaxHeight="300"
MaxWidth="500"
Src="https://bad.src/not/valid"
LazySrc="https://picsum.photos/id/11/100/60">
LazySrc="_content/Masa.Blazor.Docs/img/365-510x300.jpg">
<PlaceholderContent>
<MRow Class="fill-height ma-0"
Align="@AlignTypes.Center"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<MNavigationDrawer Dark MiniVariant MiniVariantWidth="56" Permanent>
<MListItem Class="px-2">
<MListItemAvatar Size="40">
<MImage Src="@("https://randomuser.me/api/portraits/women/75.jpg")"></MImage>
<MImage Src="@("https://cdn.masastack.com/stack/images/website/masa-blazor/jack.png")"></MImage>
</MListItemAvatar>
</MListItem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<MList>
<MListItem Class="px-2">
<MListItemAvatar Size="40">
<MImage Src="https://randomuser.me/api/portraits/women/85.jpg"></MImage>
<MImage Src="https://cdn.masastack.com/stack/images/website/masa-blazor/jack.png"></MImage>
</MListItemAvatar>
</MListItem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<MNavigationDrawer @bind-Value="_drawer" @bind-MiniVariant="_mini" Permanent>
<MListItem Class="px-2">
<MListItemAvatar Size="40">
<MImage Src="@("https://randomuser.me/api/portraits/men/85.jpg")"></MImage>
<MImage Src="@("https://cdn.masastack.com/stack/images/website/masa-blazor/jack.png")"></MImage>
</MListItemAvatar>

<MListItemTitle>MASA</MListItemTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PrependContent>
<MListItem TwoLine>
<MListItemAvatar>
<MImage Src="https://randomuser.me/api/portraits/women/81.jpg"></MImage>
<MImage Src="https://cdn.masastack.com/stack/images/website/masa-blazor/jack.png"></MImage>
</MListItemAvatar>

<MListItemContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<MNavigationDrawer @bind-Value="_drawer" Absolute Temporary>
<MListItem>
<MListItemAvatar>
<MImage Src="https://randomuser.me/api/portraits/men/78.jpg"></MImage>
<MImage Src="https://cdn.masastack.com/stack/images/website/masa-blazor/jack.png"></MImage>
</MListItemAvatar>

<MListItemContent>
Expand Down
12 changes: 6 additions & 6 deletions docs/Masa.Blazor.Docs/Examples/components/subheaders/Grid.razor
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<MSubheader>May</MSubheader>
<MContainer Fluid>
<MRow>
@for (var i = 1; i <= 6; i++)
@for (var i = 1; i <= 3; i++)
{
var index = i + 20;
var index = i + 660;
<MCol Cols="4">
<MImage Src="@($"https://randomuser.me/api/portraits/men/{index}.jpg")" Alt="lorem" Class="image" Height="@("100%")" Width="@("100%")"></MImage>
<MImage Src="@("_content/Masa.Blazor.Docs/img/" + (index) + "-250x300.jpg")" Alt="lorem" Class="image" Height="@("100%")" Width="@("100%")"></MImage>
</MCol>
}
</MRow>
Expand All @@ -31,11 +31,11 @@
<MSubheader>June</MSubheader>
<MContainer Fluid>
<MRow>
@for (var i = 1; i <= 6; i++)
@for (var i = 1; i <= 3; i++)
{
var index = i + 5;
var index = i + 663;
<MCol Cols="4">
<MImage Src="@($"https://randomuser.me/api/portraits/women/{index}.jpg")" Alt="lorem" Class="image" Height="@("100%")" Width="@("100%")"></MImage>
<MImage Src="@("_content/Masa.Blazor.Docs/img/" + (index) + "-250x300.jpg")" Alt="lorem" Class="image" Height="@("100%")" Width="@("100%")"></MImage>
</MCol>
}
</MRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{
<MCol Cols="12" Sm="6" Md="4">
<MCard>
<MImage Src="@($"https://picsum.photos/200/300?image={GetImage(type,card)}")" Height="300">
<MImage Src="@("_content/Masa.Blazor.Docs/img/" + GetImage(type, card) + "-250x300.jpg")" Height="250">
<span class="text-h5 white--text pl-4 pt-4 d-inline-block">@card</span>
</MImage>

Expand Down Expand Up @@ -60,7 +60,7 @@
var row = Array.IndexOf(types, type);
var col = Array.IndexOf(cards, card)+1;

return 550 + types.Length * row + col;
return 660 + types.Length * row + col;
}

public class Social
Expand Down
14 changes: 7 additions & 7 deletions docs/Masa.Blazor.Docs/Examples/components/tabs/Right.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
<MTab>City</MTab>
<MTab>Abstract</MTab>

@foreach (var item in Enumerable.Range(1, 3))
@for (int i = 0; i < 3; i++)
{
var tab = i;
<MTabItem>
<MContainer Fluid>
<MRow>
@foreach (var col in Enumerable.Range(1, 6))
@for (int j = 0; j < 3; j++)
{
<MCol
Cols="12"
Md="4">
var localVariable = 660 + (tab * 3) + j;
<MCol Cols="12"
Md="4">
<MImage
Src="@($"https://picsum.photos/500/300?image={col * item * 5 + 10}")"
LazySrc="@($"https://picsum.photos/10/6?image={col * item * 5 + 10}")"
Src="@("_content/Masa.Blazor.Docs/img/" + (localVariable) + "-250x300.jpg")"
AspectRatio="1">
</MImage>
</MCol>
Expand Down
Binary file added docs/Masa.Blazor.Docs/wwwroot/img/365-510x300.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Masa.Blazor.Docs/wwwroot/img/524-510x300.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Masa.Blazor.Docs/wwwroot/img/660-250x300.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Masa.Blazor.Docs/wwwroot/img/661-250x300.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Masa.Blazor.Docs/wwwroot/img/662-250x300.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Masa.Blazor.Docs/wwwroot/img/663-250x300.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Masa.Blazor.Docs/wwwroot/img/665-250x300.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Masa.Blazor.Docs/wwwroot/img/666-250x300.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Masa.Blazor.Docs/wwwroot/img/667-250x300.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Masa.Blazor.Docs/wwwroot/img/668-250x300.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Masa.Blazor.Docs/wwwroot/img/996-700x700.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading