feat(Icons) Added font awesome icons (#29)
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
<a href="@Href" class="codeLinkButton">
|
<a href="@Href" target="_blank" class="codeLinkButton">
|
||||||
View on GitHub
|
View on GitHub <i class="fa-brands fa-github" style="font-size: 24px; margin-left: 5px;"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.codeLinkButton {
|
.codeLinkButton {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: var(--info);
|
background-color: var(--info);
|
||||||
border: 1px solid var(--info-border);
|
border: 2px solid var(--info-border);
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
display: block;
|
display: block;
|
||||||
width: 180px;
|
width: 200px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<a href="@Href" class="editLinkButton">
|
<a href="@Href" target="_blank" class="editLinkButton">
|
||||||
Edit on GitHub
|
Edit on GitHub
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<a href="@Href" class="linkButtonContainer" >
|
||||||
|
@ChildContent
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.linkButtonContainer {
|
||||||
|
padding: 16px;
|
||||||
|
border: 1px solid;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
border-color: var(--primary);
|
||||||
|
background-color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.linkButtonContainer:hover {
|
||||||
|
background-color: var(--primary-hover);
|
||||||
|
border-color: var(--primary-border-hover);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment ChildContent { get; set; } = default!;
|
||||||
|
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Href { get; set; } = "";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,10 +4,18 @@
|
|||||||
|
|
||||||
<button id="@Id" class="searchButtonContainer" @onclick="ButtonClicked">
|
<button id="@Id" class="searchButtonContainer" @onclick="ButtonClicked">
|
||||||
<div class="searchText">
|
<div class="searchText">
|
||||||
Search...
|
<i class="fa-solid fa-magnifying-glass" style="margin-left: 3px; margin-right: 6px;"></i> Search...
|
||||||
</div>
|
</div>
|
||||||
<div class="searchHotkey">
|
<div class="searchHotkey">
|
||||||
@CommandKey + K
|
@if (IsMac)
|
||||||
|
{
|
||||||
|
<span><i class="fa-solid fa-command"></i>K</span>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<span>CTRL + K</span>
|
||||||
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -28,10 +36,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.searchHotkey {
|
.searchHotkey {
|
||||||
padding: 2px;
|
padding: 4px;
|
||||||
|
background-color: rgba(255,255,255,0.05);
|
||||||
background-color: var(--info);
|
border: 2px solid rgba(255,255,255,0.25);
|
||||||
border: 2px solid var(--primary-border);
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@@ -42,9 +50,9 @@
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public string Id { get; set; } = default!;
|
public string Id { get; set; } = default!;
|
||||||
|
|
||||||
private string userAgent = "";
|
private string _userAgent = "";
|
||||||
|
|
||||||
string CommandKey => userAgent.Contains("Mac OS") ? "CMD" : "Ctrl";
|
bool IsMac => _userAgent.Contains("Mac OS");
|
||||||
|
|
||||||
private void ButtonClicked(EventArgs eventArgs)
|
private void ButtonClicked(EventArgs eventArgs)
|
||||||
{
|
{
|
||||||
@@ -53,7 +61,7 @@
|
|||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
userAgent = await JsRuntime.InvokeAsync<string>("getUserAgent");
|
_userAgent = await JsRuntime.InvokeAsync<string>("getUserAgent");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,24 +3,28 @@
|
|||||||
@inject IJSRuntime JsRuntime
|
@inject IJSRuntime JsRuntime
|
||||||
|
|
||||||
<button id="@Id" class="searchIconButtonContainer" @onclick="ButtonClicked">
|
<button id="@Id" class="searchIconButtonContainer" @onclick="ButtonClicked">
|
||||||
<div class="searchText">
|
<div class="searchIcon">
|
||||||
S
|
<i class="fa-solid fa-magnifying-glass"></i>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.searchIconButtonContainer {
|
.searchIconButtonContainer {
|
||||||
background-color: var(--primary);
|
|
||||||
border: 2px solid var(--primary-border);
|
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
width: 32px;
|
width: 100%;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.searchIcon {
|
||||||
|
font-size: 28px;
|
||||||
|
text-align: center;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<div class="desktopNavContainer">
|
<div class="desktopNavContainer">
|
||||||
<div class="menuHeader">
|
<div class="menuHeader">
|
||||||
<NavLink id="desktop-homeLink" href="/" class="websiteTitle">
|
<NavLink id="desktop-homeLink" href="/" class="websiteTitle">
|
||||||
IGP Fan Reference
|
<i class="fa-solid fa-house" style="margin-right: 4px;"></i> IGP Fan Reference
|
||||||
</NavLink>
|
</NavLink>
|
||||||
|
|
||||||
<div class="sectionNavs">
|
<div class="sectionNavs">
|
||||||
@@ -27,7 +27,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
<div class="sectionNav">
|
<div class="sectionNav">
|
||||||
<button onclick="@(() => { MenuClicked(webSection.Id); })" class="@sectionButtonStyle">@webSection.Name</button>
|
|
||||||
|
<button onclick="@(() => { MenuClicked(webSection.Id); })" class="@sectionButtonStyle"><i class="fa-solid @webSection.Icon"></i>
|
||||||
|
@if (!webSection.OnlyIcon)
|
||||||
|
{
|
||||||
|
<span style="margin-left: 12px">@webSection.Name</span>
|
||||||
|
}
|
||||||
|
</button>
|
||||||
@if (isSelected)
|
@if (isSelected)
|
||||||
{
|
{
|
||||||
<div class="navMenuPosition">
|
<div class="navMenuPosition">
|
||||||
@@ -95,7 +101,7 @@
|
|||||||
|
|
||||||
.sectionNavs {
|
.sectionNavs {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 16px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,6 +146,7 @@
|
|||||||
box-shadow: 0 2px 3px black;
|
box-shadow: 0 2px 3px black;
|
||||||
background-color: var(--info);
|
background-color: var(--info);
|
||||||
transform: translateY(-1px) scale(1.08);
|
transform: translateY(-1px) scale(1.08);
|
||||||
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@media only screen and (max-width: 1025px) {
|
@@media only screen and (max-width: 1025px) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
{
|
{
|
||||||
<div class="mobileNavSectionButton" @onclick="() => OnSectionClicked(webSection)" @onclick:preventDefault="true" @onclick:stopPropagation="true">
|
<div class="mobileNavSectionButton" @onclick="() => OnSectionClicked(webSection)" @onclick:preventDefault="true" @onclick:stopPropagation="true">
|
||||||
<div class="mobileNavSectionButtonText">
|
<div class="mobileNavSectionButtonText">
|
||||||
@webSection?.Name
|
<i class="fa-solid @webSection.Icon" style="font-size: 28px;"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -96,6 +96,7 @@
|
|||||||
border: 1px solid var(--primary);
|
border: 1px solid var(--primary);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
|
border-radius: 2px;
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color: var(--primary);
|
background-color: var(--primary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -146,7 +147,7 @@
|
|||||||
@code {
|
@code {
|
||||||
#if NO_SQL
|
#if NO_SQL
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public List<WebSectionModel?> WebSections { get; set; } = default!;
|
public List<WebSectionModel> WebSections { get; set; } = default!;
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public List<WebPageModel> WebPages { get; set; } = default!;
|
public List<WebPageModel> WebPages { get; set; } = default!;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<SearchButtonComponent/>
|
<SearchButtonComponent/>
|
||||||
<div class="tabletButton">
|
<div class="tabletButton">
|
||||||
<div class="tabletMenuTitle">
|
<div class="tabletMenuTitle">
|
||||||
Menu
|
<i class="fa-solid fa-bars" style="font-size: 32px; margin:auto"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Binary file not shown.
@@ -116,8 +116,18 @@
|
|||||||
|
|
||||||
.searchLink {
|
.searchLink {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@media only screen and (max-width: 1025px) {
|
||||||
|
.searchContainer {
|
||||||
|
height: 300px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.searchBox {
|
||||||
|
height: 230px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -6,7 +6,8 @@
|
|||||||
@layout PageLayout
|
@layout PageLayout
|
||||||
|
|
||||||
<DevOnlyComponent>
|
<DevOnlyComponent>
|
||||||
<PermissionsPage/>
|
<LinkButtonComponent Href="https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/blob/main/IGP/Pages/HarassCalculatorPage.razor">
|
||||||
|
View on GitHub <i class="fa-brands fa-github" style="font-size: 24px; margin-left: 5px;"></i>
|
||||||
|
</LinkButtonComponent>
|
||||||
</DevOnlyComponent>
|
</DevOnlyComponent>
|
||||||
|
|
||||||
<HomePage/>
|
<HomePage/>
|
||||||
@@ -16,7 +16,9 @@ else
|
|||||||
</div>
|
</div>
|
||||||
<div class="docContent">@((MarkupString)Markdown.ToHtml(content, Pipeline))</div>
|
<div class="docContent">@((MarkupString)Markdown.ToHtml(content, Pipeline))</div>
|
||||||
<div class="docFooter">
|
<div class="docFooter">
|
||||||
<EditLinkComponent Href="@GitUrl"></EditLinkComponent>
|
<LinkButtonComponent Href="@GitUrl">
|
||||||
|
Edit on GitHub <i class="fa-brands fa-github" style="font-size: 24px; margin-left: 5px;"></i>
|
||||||
|
</LinkButtonComponent>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,7 +180,10 @@
|
|||||||
Can I see the code for the calculation?
|
Can I see the code for the calculation?
|
||||||
</InfoQuestionComponent>
|
</InfoQuestionComponent>
|
||||||
<InfoAnswerComponent>
|
<InfoAnswerComponent>
|
||||||
<CodeLinkComponent Href="https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/blob/main/IGP/Pages/HarassCalculatorPage.razor"/>
|
<br/>
|
||||||
|
<LinkButtonComponent Href="https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/blob/main/IGP/Pages/HarassCalculatorPage.razor">
|
||||||
|
View on GitHub <i class="fa-brands fa-github" style="font-size: 24px; margin-left: 5px;"></i>
|
||||||
|
</LinkButtonComponent>
|
||||||
</InfoAnswerComponent>
|
</InfoAnswerComponent>
|
||||||
</InfoBodyComponent>
|
</InfoBodyComponent>
|
||||||
</PaperComponent>
|
</PaperComponent>
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ else
|
|||||||
</div>
|
</div>
|
||||||
<div class="noteContent">@((MarkupString)Markdown.ToHtml(content, Pipeline))</div>
|
<div class="noteContent">@((MarkupString)Markdown.ToHtml(content, Pipeline))</div>
|
||||||
<div class="noteFooter">
|
<div class="noteFooter">
|
||||||
<EditLinkComponent Href="@GitUrl"></EditLinkComponent>
|
<LinkButtonComponent Href="@GitUrl">
|
||||||
|
Edit on GitHub <i class="fa-brands fa-github" style="font-size: 24px; margin-left: 5px;"></i>
|
||||||
|
</LinkButtonComponent>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
[{"Id":1,"Name":"Tools","Description":"Tools Stuff","Order":1,"IsPrivate":"False","WebPageModels":[]},{"Id":2,"Name":"Resources","Description":"Resources Stuff","Order":2,"IsPrivate":"False","WebPageModels":[]},{"Id":3,"Name":"General","Description":"About Stuff","Order":3,"IsPrivate":"False","WebPageModels":[]},{"Id":4,"Name":"Development","Description":"Development Stuff","Order":4,"IsPrivate":"False","WebPageModels":[]},{"Id":5,"Name":"Settings","Description":"Settings Stuff","Order":5,"IsPrivate":"False","WebPageModels":[]}]
|
[{"Id":1,"Name":"Tools","Description":"Tools Stuff","Order":1,"IsPrivate":"False","Icon":"fa-screwdriver-wrench","OnlyIcon":false,"WebPageModels":[]},{"Id":2,"Name":"Resources","Description":"Resources Stuff","Order":2,"IsPrivate":"False","Icon":"fa-toolbox","OnlyIcon":false,"WebPageModels":[]},{"Id":3,"Name":"General","Description":"About Stuff","Order":3,"IsPrivate":"False","Icon":"fa-circle-info","OnlyIcon":false,"WebPageModels":[]},{"Id":4,"Name":"Development","Description":"Development Stuff","Order":4,"IsPrivate":"False","Icon":"fa-code","OnlyIcon":false,"WebPageModels":[]},{"Id":5,"Name":"Settings","Description":"Settings Stuff","Order":5,"IsPrivate":"False","Icon":"fa-gear","OnlyIcon":false,"WebPageModels":[]}]
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.min.js"></script>
|
src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.min.js"></script>
|
||||||
<script src="javascript/download.js"></script>
|
<script src="javascript/download.js"></script>
|
||||||
<script src="_content/Blazor-Analytics/blazor-analytics.js"></script>
|
<script src="_content/Blazor-Analytics/blazor-analytics.js"></script>
|
||||||
|
<script src="https://kit.fontawesome.com/c77aa98347.js" crossorigin="anonymous"></script>
|
||||||
<script>
|
<script>
|
||||||
Blazor.start({
|
Blazor.start({
|
||||||
applicationCulture: 'en-US'
|
applicationCulture: 'en-US'
|
||||||
|
|||||||
@@ -8,4 +8,5 @@ public class WebPageModel
|
|||||||
public string Description { get; set; } = "Add description";
|
public string Description { get; set; } = "Add description";
|
||||||
public string Href { get; set; } = null;
|
public string Href { get; set; } = null;
|
||||||
public string IsPrivate { get; set; } = "True";
|
public string IsPrivate { get; set; } = "True";
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,5 +11,8 @@ public class WebSectionModel
|
|||||||
public int Order { get; set; } = 0;
|
public int Order { get; set; } = 0;
|
||||||
public string IsPrivate { get; set; } = "True";
|
public string IsPrivate { get; set; } = "True";
|
||||||
|
|
||||||
|
public string Icon { get; set; } = "fa-icons";
|
||||||
|
public bool OnlyIcon { get; set; } = false;
|
||||||
|
|
||||||
[NotMapped] public List<WebPageModel> WebPageModels { get; set; } = new();
|
[NotMapped] public List<WebPageModel> WebPageModels { get; set; } = new();
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user