|
1 | 1 | import React from "react"; |
2 | 2 |
|
3 | | -import { defaultDecorator } from "../../../../../shared/components/Layout"; |
4 | | - |
| 3 | +import { imageName } from "../../../../../shared/assets"; |
| 4 | +import { htmlRootDecorator } from "../../../../../shared/components/Layout"; |
| 5 | +import {getLoremSentences} from "../../../../../shared/constants/strings"; |
5 | 6 | export default { |
6 | 7 | title: "Atoms/Anchor Menu", |
7 | | - decorators: [ defaultDecorator ], |
8 | | - parameters: { |
9 | | - controls: { disable: true }, |
10 | | - docs: { |
11 | | - description: { |
12 | | - component: `This example has moved to unity-react-core. |
13 | | -
|
14 | | -React components and HTML templates are now located in a shared space to ensure consistency between the React and Bootstrap usages. |
15 | | - `, |
16 | | - }, |
| 8 | + parameters: { |
| 9 | + header: { |
| 10 | + forced: true, |
17 | 11 | }, |
18 | | - } |
| 12 | + controls: { disable: true }, |
| 13 | + }, |
| 14 | + decorators: [htmlRootDecorator], |
19 | 15 | }; |
20 | | - |
21 | | - |
22 | | -export const AnchorMenu = { |
23 | | - render: () => <p> |
24 | | - Follow the link to view the{" "} |
25 | | - <a |
26 | | - href="../../@asu/unity-react-core/index.html?path=/story/components-anchormenu--default" |
27 | | - target="_parent" |
28 | | - > |
29 | | - anchor menu |
30 | | - </a>{" "} |
31 | | - example in @asu/unity-react-core. |
32 | | - </p> |
| 16 | +let loremOffset = 0; |
| 17 | +export const AnchorMenu = () => { |
| 18 | + return ( |
| 19 | + <> |
| 20 | + <div className="container-fluid"> |
| 21 | + <div className="uds-hero-lg has-btn-row"> |
| 22 | + <img |
| 23 | + className="hero" |
| 24 | + src={imageName.hero02} |
| 25 | + alt="Sample placeholder image." |
| 26 | + width="1920" |
| 27 | + height="1000" |
| 28 | + loading="lazy" |
| 29 | + decoding="async" |
| 30 | + fetchpriority="high" |
| 31 | + /> |
| 32 | + <h1> |
| 33 | + <span className="highlight-gold">Gettysburg Address</span> |
| 34 | + </h1> |
| 35 | + <div className="content"> |
| 36 | + <p className="text-white"> |
| 37 | + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do |
| 38 | + eiusmod tempor incididunt ut labore et dolore magna aliqua. |
| 39 | + </p> |
| 40 | + </div> |
| 41 | + <div className="btn-row"> |
| 42 | + <a href="#" className="btn btn-default btn-gold"> |
| 43 | + Read the 13th Amendment |
| 44 | + </a> |
| 45 | + </div> |
| 46 | + </div> |
| 47 | + <div |
| 48 | + id="uds-anchor-menu" |
| 49 | + className="uds-anchor-menu uds-anchor-menu-expanded-lg" |
| 50 | + > |
| 51 | + <div className="container"> |
| 52 | + <div className="uds-anchor-menu-wrapper"> |
| 53 | + <h2 |
| 54 | + data-bs-toggle="collapse" |
| 55 | + data-bs-target="#collapseExample" |
| 56 | + aria-expanded="false" |
| 57 | + aria-controls="collapseExample" |
| 58 | + data-ga-name="onclick" |
| 59 | + data-ga-event="collapse" |
| 60 | + data-ga-type="click" |
| 61 | + data-ga="On this page" |
| 62 | + > |
| 63 | + On This Page: <span className="fas fa-chevron-down"></span> |
| 64 | + </h2> |
| 65 | + <div id="collapseExample" className="card card-body collapse"> |
| 66 | + <nav className="nav" aria-label="Same Page"> |
| 67 | + <a |
| 68 | + className="nav-link" |
| 69 | + href="#first" |
| 70 | + data-ga-name="onclick" |
| 71 | + data-ga-event="link" |
| 72 | + data-ga-action="click" |
| 73 | + data-ga-type="internal link" |
| 74 | + data-ga-region="main content" |
| 75 | + data-ga-section="gettysburg address" |
| 76 | + data-ga="Anchor item" |
| 77 | + > |
| 78 | + <span className="fas fa-link"></span>First item |
| 79 | + </a> |
| 80 | + <a |
| 81 | + className="nav-link" |
| 82 | + href="#second" |
| 83 | + data-ga-name="onclick" |
| 84 | + data-ga-event="link" |
| 85 | + data-ga-action="click" |
| 86 | + data-ga-type="internal link" |
| 87 | + data-ga-region="main content" |
| 88 | + data-ga-section="gettysburg address" |
| 89 | + data-ga="Anchor item" |
| 90 | + > |
| 91 | + <span className="fas fa-link"></span>Second item |
| 92 | + </a> |
| 93 | + <a |
| 94 | + className="nav-link" |
| 95 | + href="#third" |
| 96 | + data-ga-name="onclick" |
| 97 | + data-ga-event="link" |
| 98 | + data-ga-action="click" |
| 99 | + data-ga-type="internal link" |
| 100 | + data-ga-region="main content" |
| 101 | + data-ga-section="gettysburg address" |
| 102 | + data-ga="Anchor item" |
| 103 | + > |
| 104 | + <span className="fa fa-link"></span>Third item |
| 105 | + </a> |
| 106 | + <a |
| 107 | + className="nav-link" |
| 108 | + href="#fourth" |
| 109 | + data-ga-name="onclick" |
| 110 | + data-ga-event="link" |
| 111 | + data-ga-action="click" |
| 112 | + data-ga-type="internal link" |
| 113 | + data-ga-region="main content" |
| 114 | + data-ga-section="gettysburg address" |
| 115 | + data-ga="Anchor item" |
| 116 | + > |
| 117 | + <span className="fa fa-link"></span>Fourth item |
| 118 | + </a> |
| 119 | + <a |
| 120 | + className="nav-link" |
| 121 | + href="#fifth" |
| 122 | + data-ga-name="onclick" |
| 123 | + data-ga-event="link" |
| 124 | + data-ga-action="click" |
| 125 | + data-ga-type="internal link" |
| 126 | + data-ga-region="main content" |
| 127 | + data-ga-section="gettysburg address" |
| 128 | + data-ga="Anchor item" |
| 129 | + > |
| 130 | + <span className="fa fa-link"></span>Fifth item |
| 131 | + </a> |
| 132 | + </nav> |
| 133 | + </div> |
| 134 | + </div> |
| 135 | + </div> |
| 136 | + </div> |
| 137 | + </div> |
| 138 | + <div className="container"> |
| 139 | + <div className="row"> |
| 140 | + <div className="col-md-12 pb-5"> |
| 141 | + <div className="py-2"> |
| 142 | + <p>{getLoremSentences(40, loremOffset++ * 3)}</p> |
| 143 | + <p>{getLoremSentences(30, loremOffset++ * 3)}</p> |
| 144 | + <p>{getLoremSentences(20, loremOffset++ * 3)}</p> |
| 145 | + <p>{getLoremSentences(40, loremOffset++ * 3)}</p> |
| 146 | + </div> |
| 147 | + <div className="py-2"> |
| 148 | + <h2 id="first" > first </h2> |
| 149 | + <p>First. {getLoremSentences(40, loremOffset++ * 3)}</p> |
| 150 | + <p>First. {getLoremSentences(50, loremOffset++ * 3)}</p> |
| 151 | + <p>First. {getLoremSentences(10, loremOffset++ * 3)}</p> |
| 152 | + </div> |
| 153 | + <div className="py-2"> |
| 154 | + <h2 id="second"> second </h2> |
| 155 | + <p>Second. {getLoremSentences(20, loremOffset++ * 3)}</p> |
| 156 | + <p>Second. {getLoremSentences(50, loremOffset++ * 3)}</p> |
| 157 | + <p>Second. {getLoremSentences(60, loremOffset++ * 3)}</p> |
| 158 | + </div> |
| 159 | + <div className="py-2"> |
| 160 | + <h2 id="third" > third </h2> |
| 161 | + <p>Third. {getLoremSentences(20, loremOffset++ * 3)}</p> |
| 162 | + <p>Third. {getLoremSentences(10, loremOffset++ * 3)}</p> |
| 163 | + <p>Third. {getLoremSentences(40, loremOffset++ * 3)}</p> |
| 164 | + <p>Third. {getLoremSentences(10, loremOffset++ * 3)}</p> |
| 165 | + </div> |
| 166 | + <div className="py-2"> |
| 167 | + <h2 id="fourth"> fourth </h2> |
| 168 | + <p>Fourth. {getLoremSentences(70, loremOffset++ * 3)}</p> |
| 169 | + <p>Fourth. {getLoremSentences(40, loremOffset++ * 3)}</p> |
| 170 | + </div> |
| 171 | + <div className="py-2"> |
| 172 | + <h2 id="fifth" > fifth </h2> |
| 173 | + <p>Fifth. {getLoremSentences(40, loremOffset++ * 3)}</p> |
| 174 | + <p>Fifth. {getLoremSentences(10, loremOffset++ * 3)}</p> |
| 175 | + <p>Fifth. {getLoremSentences(30, loremOffset++ * 3)}</p> |
| 176 | + <p>Fifth. {getLoremSentences(20, loremOffset++ * 3)}</p> |
| 177 | + </div> |
| 178 | + </div> |
| 179 | + <div className="py-2"></div> |
| 180 | + </div> |
| 181 | + </div> |
| 182 | + <div style={{ height: "1000px" }}></div> |
| 183 | + </> |
| 184 | + ); |
33 | 185 | }; |
0 commit comments