Lesson 3: Advance Codes - GameAdventure/CrosStrap GitHub Wiki

Advance Codes

There are mainly two advance codes in CrosStrap. The first is the context menu and the second is the nav. They are the two advance codes in CrosStrap.

Advance Codes: Menu(tag)

Description: The is also known as the custom context menu is a special code. Firefox has one but not in any other browser so this will insert it into any browser but a quick warning that this is required and you must have your own custom menu or when people right-click nothing will pop up. We are either going to fix that or create a default one or we will do both. An example one is in the CrosStrap.html file. Recently I have edited the context menu tag. it works a lot better than before...the

tag switched to and has new functions included in it...it now shows default context menu if the tag is no where in file...there is also one new attribute to the tag which is avail="off", this attribute makes it if you set it to off it will ignore the tag and set the context menu to default. You can only have one tag and it will only listen to the top one.
<cm>
   <li onclick="window.history.back();">You can insert javascript as well.</li>
   <li><a href="#">A link also works and gives it a natural style</a></li>
   <li>Or one that doesn't work, your call.</li>
</cm>

<p>If avail="off" than custom context menu will not show.</p>
<cm avail="off">
   <li onclick="window.history.back();">You can insert javascript as well.</li>
   <li><a href="#">A link also works and gives it a natural style</a></li>
   <li>Or one that doesn't work, your call.</li>
</cm>

Advance Codes: Nav(tag)

Description: The nav just gives a nav to your website but this is the most advance code in CrosStrap right now. For the dropdown it is quite special (Well not that special but somewhat special). You must have a "drop" tag in the "nav" tag lines and than have a "button" tag in the beginning in the "drop" tag like so in the example below and than have a "div" class right after the "button" tag still in the "drop" tag and have a class named "dd", the "dd" stands for "drop down" and than in it just add links or what ever element/tag you want inside.

<nav>
   <a href="#">Home</a>
   <a href="#">News</a>
   <a href="#">Contact</a>
      <drop>
            <button class="dropbtn">Dropdown
               <i class="fa fa-caret-down"></i>
            </button>
         <div class="dd">
            <a href="#">Link 1</a>
            <a href="#">Link 2</a>
            <a href="#">Link 3</a>
         </div>
      </drop>
</nav>

And that is the end of Lesson 3. There will be probably more elements being added soon so stay toon.

⚠️ **GitHub.com Fallback** ⚠️