mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-09-10 19:25:15 -05:00
Added tabs bar, new header colour for battle video section.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="BattleVideo.aspx.cs" Inherits="PkmnFoundations.GTS.BattleVideo" %>
|
||||
<%@ Register TagPrefix="pf" Namespace="PkmnFoundations.GTS" Assembly="PkmnFoundations.GTS" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="cpHead" runat="server">
|
||||
<pf:HeaderColour CssClass="bv" runat="server" />
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="cpMain" runat="server">
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MasterPage.master.cs" Inherits="PkmnFoundations.GTS.MasterPage" %>
|
||||
<%@ Register TagPrefix="pf" Namespace="PkmnFoundations.GTS" Assembly="PkmnFoundations.GTS" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title></title>
|
||||
<pf:HeaderColour ID="HeaderColour1" CssClass="gts" runat="server" />
|
||||
<asp:ContentPlaceHolder ID="cpHead" runat="server" />
|
||||
<link rel="stylesheet" href="~/css/main.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<body class="<%= HeaderCssClass %>">
|
||||
<div id="gtsHeader">
|
||||
<asp:Literal ID="litHeaderCssClassKeep" Visible="false" runat="server" />
|
||||
<div class="setWidth">
|
||||
<h1>
|
||||
<asp:HyperLink ID="hlHome" NavigateUrl="~/" runat="server">Foundations GTS</asp:HyperLink>
|
||||
@@ -30,7 +33,17 @@
|
||||
<div class="github-contain">
|
||||
<a class="github" href="https://github.com/mm201/pkmnFoundations" target="_blank">Fork me on GitHub!</a>
|
||||
</div>
|
||||
<div class="hideShadow"></div>
|
||||
</div>
|
||||
<nav id="gtsTabsBar">
|
||||
<div class="setWidth">
|
||||
<ul>
|
||||
<li><asp:HyperLink ID="hlGts" CssClass="gts" NavigateUrl="~/" Text="GTS" runat="server" /></li>
|
||||
<li><asp:HyperLink ID="hlBattleVideos" CssClass="bv" NavigateUrl="~/BattleVideo.aspx" Text="Battle Videos" runat="server" /></li>
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="gtsMain">
|
||||
<div class="setWidth">
|
||||
<asp:ContentPlaceHolder ID="cpMain" runat="server" />
|
||||
|
||||
@@ -15,5 +15,19 @@ namespace PkmnFoundations.GTS
|
||||
int availTotal = manager.AvailablePokemon4 + manager.AvailablePokemon5;
|
||||
litPokemon.Text = availTotal.ToString();
|
||||
}
|
||||
|
||||
public String HeaderCssClass
|
||||
{
|
||||
get
|
||||
{
|
||||
return litHeaderCssClassKeep.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
litHeaderCssClassKeep.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
36
gts/MasterPage.master.designer.cs
generated
36
gts/MasterPage.master.designer.cs
generated
@@ -12,6 +12,15 @@ namespace PkmnFoundations.GTS {
|
||||
|
||||
public partial class MasterPage {
|
||||
|
||||
/// <summary>
|
||||
/// HeaderColour1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::PkmnFoundations.GTS.HeaderColour HeaderColour1;
|
||||
|
||||
/// <summary>
|
||||
/// cpHead control.
|
||||
/// </summary>
|
||||
@@ -21,6 +30,15 @@ namespace PkmnFoundations.GTS {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ContentPlaceHolder cpHead;
|
||||
|
||||
/// <summary>
|
||||
/// litHeaderCssClassKeep control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal litHeaderCssClassKeep;
|
||||
|
||||
/// <summary>
|
||||
/// hlHome control.
|
||||
/// </summary>
|
||||
@@ -48,6 +66,24 @@ namespace PkmnFoundations.GTS {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink hlAllPokemon;
|
||||
|
||||
/// <summary>
|
||||
/// hlGts control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink hlGts;
|
||||
|
||||
/// <summary>
|
||||
/// hlBattleVideos control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink hlBattleVideos;
|
||||
|
||||
/// <summary>
|
||||
/// cpMain control.
|
||||
/// </summary>
|
||||
|
||||
@@ -7,13 +7,22 @@
|
||||
|
||||
#gtsHeader
|
||||
{
|
||||
background-color: #ff8063;
|
||||
color: white;
|
||||
font-family: Arial,sans-serif;
|
||||
padding: 20px 0 4px;
|
||||
height: 108px;
|
||||
border-bottom: 2px solid;
|
||||
box-shadow: 0 1px 3px 0 rgba(0,0,0,0.3);
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.gts #gtsHeader { background-color: #ff8063; border-color: #9b4b39; }
|
||||
.bv #gtsHeader { background-color: #64ceff; border-color: #3a7d9b; }
|
||||
|
||||
.gts #gtsHeader .hideShadow { background-color: #ff8063; }
|
||||
.bv #gtsHeader .hideShadow { background-color: #64ceff; }
|
||||
|
||||
#gtsHeader h1
|
||||
{
|
||||
margin: 0;
|
||||
@@ -50,18 +59,62 @@
|
||||
|
||||
#gtsHeader .stats
|
||||
{
|
||||
background-color: #ffac9f;
|
||||
border-radius: 9px;
|
||||
padding: 4px;
|
||||
width: 200px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.gts #gtsHeader .stats { background-color: #ffac9f; }
|
||||
.bv #gtsHeader .stats { background-color: #9fdcff; }
|
||||
|
||||
#gtsHeader a
|
||||
{
|
||||
color: white;
|
||||
}
|
||||
|
||||
#gtsTabsBar
|
||||
{
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#gtsTabsBar ul
|
||||
{
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#gtsTabsBar li
|
||||
{
|
||||
display: block;
|
||||
margin: 0; padding: 0;
|
||||
padding-right: 3px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#gtsTabsBar li a
|
||||
{
|
||||
display: block;
|
||||
height: 24px;
|
||||
min-width: 72px;
|
||||
text-align: center;
|
||||
margin: 0; padding: 5px 5px;
|
||||
border: 2px solid;
|
||||
border-top: none;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
border-radius: 0 0 12px 12px;
|
||||
position: relative;
|
||||
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
#gtsTabsBar li a.gts { background-color: #ff8063; border-color: #9b4b39; }
|
||||
#gtsTabsBar li a.bv { background-color: #64ceff; border-color: #3a7d9b; }
|
||||
|
||||
.gts #gtsTabsBar li a.gts { z-index: 2; padding-top: 7px; top: -2px; }
|
||||
.bv #gtsTabsBar li a.bv { z-index: 2; padding-top: 7px; top: -2px; }
|
||||
|
||||
#gtsMain
|
||||
{
|
||||
padding: 4px 0;
|
||||
@@ -74,6 +127,13 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.clear
|
||||
{
|
||||
clear: both;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.github-contain
|
||||
{
|
||||
position: absolute;
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
<Compile Include="BattleVideo.aspx.designer.cs">
|
||||
<DependentUpon>BattleVideo.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="src\HeaderColour.cs" />
|
||||
<Compile Include="test\BoxUp.aspx.cs">
|
||||
<DependentUpon>BoxUp.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
52
gts/src/HeaderColour.cs
Normal file
52
gts/src/HeaderColour.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace PkmnFoundations.GTS
|
||||
{
|
||||
public class HeaderColour : System.Web.UI.Control
|
||||
{
|
||||
public HeaderColour()
|
||||
{
|
||||
CssClass = null;
|
||||
this.PreRender += HeaderColour_PreRender;
|
||||
}
|
||||
|
||||
private void HeaderColour_PreRender(object sender, EventArgs e)
|
||||
{
|
||||
PkmnFoundations.GTS.MasterPage master = Page.Master as PkmnFoundations.GTS.MasterPage;
|
||||
if (master == null) return;
|
||||
|
||||
master.HeaderCssClass = CssClass;
|
||||
}
|
||||
|
||||
protected override void LoadViewState(object savedState)
|
||||
{
|
||||
HeaderColourViewState state = (HeaderColourViewState)savedState;
|
||||
|
||||
this.CssClass = state.CssClass;
|
||||
|
||||
base.LoadViewState(state.ControlViewState);
|
||||
}
|
||||
|
||||
protected override object SaveViewState()
|
||||
{
|
||||
HeaderColourViewState state = new HeaderColourViewState();
|
||||
|
||||
state.CssClass = this.CssClass;
|
||||
state.ControlViewState = base.SaveViewState();
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
public String CssClass { get; set; }
|
||||
|
||||
[Serializable()]
|
||||
private struct HeaderColourViewState
|
||||
{
|
||||
public object ControlViewState;
|
||||
public String CssClass;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user