show.mustache 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. <%
  2. # Copyright (C) 2015 - present Instructure, Inc.
  3. #
  4. # This file is part of Canvas.
  5. #
  6. # Canvas is free software: you can redistribute it and/or modify it under
  7. # the terms of the GNU Affero General Public License as published by the Free
  8. # Software Foundation, version 3 of the License.
  9. #
  10. # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
  11. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License along
  16. # with this program. If not, see <http://www.gnu.org/licenses/>.
  17. %>
  18. <%
  19. js_bundle :theme_preview
  20. css_bundle :theme_preview
  21. %>
  22. <h1 class="theme-preview__page-header">{{#t}}Welcome to the Canvas Theme Editor{{/t}}</h1>
  23. <p>
  24. <%= t do %>
  25. This sample page includes common UI elements in Canvas to help you build your custom branding. Once you start making changes to the color values and images in the left sidebar, you will see a <b>Preview Your Changes</b> button. Click it to refresh this page and see how your changes look.
  26. <% end %>
  27. </p>
  28. <p>
  29. <%= t do %>
  30. <em>Important note: Educational institutions have an obligation to make their content as accessible as possible. Instructure recommends at least a 3:1 text-to-background-color ratio to keep your text readable. Easily test your contrast ratios with the
  31. <%= link_to "WebAIM Color Contrast Checker", "http://webaim.org/resources/contrastchecker/" %></em>.
  32. <% end %>
  33. </p>
  34. <br />
  35. <div class="content-box">
  36. <div class="grid-row">
  37. <div class="col-xs-7">
  38. <p style="margin-top: 0;">Set Canvas' default text color using the <b>Main Text Color</b> field in Theme Editor. Check this text after you change it to see your edits.</p>
  39. <div class="ic-Form-group">
  40. <div class="ic-Form-control">
  41. <label for="theme-preview-input-1" class="ic-Label">{{#t}}Text input{{/t}}</label>
  42. <input type="text" id="theme-preview-input-1" class="ic-Input" ></input>
  43. </div>
  44. <div class="ic-Form-control">
  45. <label for="theme-preview-input-3" class="ic-Label">{{#t}}Select input{{/t}}</label>
  46. <select id="theme-preview-input-3" class="ic-Input">
  47. <option>{{#t}}Option 1{{/t}}</option>
  48. <option>{{#t}}Option 2{{/t}}</option>
  49. <option>{{#t}}Option 3{{/t}}</option>
  50. <option>{{#t}}Option 4{{/t}}</option>
  51. </select>
  52. </div>
  53. <div class="ic-Form-control">
  54. <label class="ic-Label">{{#t}}Progress/loading bar{{/t}}</label>
  55. <div class="progress-bar__bar-container">
  56. <div class="progress-bar__bar" style="width: 70%;"></div>
  57. </div>
  58. </div>
  59. <div class="ic-Form-control">
  60. <!-- start super toggle -->
  61. <label class="ic-Super-toggle--ui-switch" for="theme-preview-input-8">
  62. <div class="ic-Label">{{#t}}Switch-style checkbox{{/t}}</div>
  63. <input type="checkbox" id="theme-preview-input-8" class="ic-Super-toggle__input">
  64. <div class="ic-Super-toggle__container" aria-hidden="true" data-checked="Option A is selected" data-unchecked="Option B is selected">
  65. <div class="ic-Super-toggle__option--LEFT">
  66. <i class="icon-muted"></i>
  67. </div>
  68. <div class="ic-Super-toggle__switch"></div>
  69. <div class="ic-Super-toggle__option--RIGHT">
  70. <i class="icon-unmuted"></i>
  71. </div>
  72. </div>
  73. </label>
  74. <!-- end super toggle -->
  75. </div>
  76. <div class="ic-Checkbox-group">
  77. <div class="ic-Form-control ic-Form-control--checkbox">
  78. <input type="checkbox" id="theme-preview-input-4" checked>
  79. <label class="ic-Label" for="theme-preview-input-4">{{#t}}Regular-style checkbox{{/t}}</label>
  80. </div>
  81. </div>
  82. <div class="ic-Form-control ic-Form-control--radio">
  83. <div class="ic-Radio">
  84. <input id="theme-preview-input-5" type="radio" value="hoodie" name="demo-radio-horiz-group-2" checked>
  85. <label for="theme-preview-input-5" class="ic-Label">{{#t}}Radio button option 1{{/t}}</label>
  86. </div>
  87. <div class="ic-Radio">
  88. <input id="theme-preview-input-6" type="radio" value="frisbee" name="demo-radio-horiz-group-2">
  89. <label for="theme-preview-input-6" class="ic-Label">{{#t}}Radio button option 2{{/t}}</label>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="col-xs-4 off-xs-1">
  95. <div>
  96. <button type="button" class="Button Button--primary Button--block">{{#t}}Primary color button{{/t}}</button>
  97. <div class="content-box-mini">
  98. <button type="button" class="Button Button--primary Button--block" disabled>{{#t}}Primary color button disabled{{/t}}</button>
  99. </div>
  100. <div class="content-box-mini">
  101. <button type="button" class="Button Button--secondary Button--block">{{#t}}Secondary color button{{/t}}</button>
  102. </div>
  103. <div class="content-box-mini">
  104. <button type="button" class="Button Button--secondary Button--block" disabled>{{#t}}Secondary color button disabled{{/t}}</button>
  105. </div>
  106. <div class="al-dropdown__container">
  107. <a class="al-trigger Button Button--block" role="button" href="#">
  108. {{#t}}Click to test dropdown{{/t}}
  109. <i class="icon-mini-arrow-down"></i>
  110. </a>
  111. <ul class="al-options" role="menu" tabindex="0" aria-hidden="true" aria-expanded="false">
  112. <li>
  113. <a href="#" class="icon-edit" tabindex="-1" role="menuitem">{{#t}}Dropdown option 1{{/t}}</a>
  114. </li>
  115. <li>
  116. <a href="#" class="icon-trash" tabindex="-1" role="menuitem">{{#t}}Dropdown option 2{{/t}}</a>
  117. </li>
  118. </ul>
  119. </div>
  120. <div class="content-box">
  121. <ul>
  122. <li><a href="#">{{#t}}Link number 1{{/t}}</a></li>
  123. <li><a href="#">{{#t}}Link number 2{{/t}}</a></li>
  124. <li><a href="#">{{#t}}Link number 3{{/t}}</a></li>
  125. </ul>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. <ul class="ig-list" id="cond_group_1">
  132. <li>
  133. <div class="ig-row">
  134. <div class="ig-row__layout">
  135. <div class="ig-type-icon" aria-hidden="true">
  136. <i class="icon-assignment"></i>
  137. </div>
  138. <div class="ig-info">
  139. <a href="#" class="ig-title">
  140. {{#t}}An Assignment Name{{/t}}
  141. </a>
  142. <div class="ig-details">
  143. <div class="ig-details__item"><b>Due</b> Nov 4</div>
  144. <div class="ig-details__item"><b>Available</b> Nov 1</div>
  145. <div class="ig-details__item">10 pts</div>
  146. </div>
  147. </div>
  148. <div class="ig-admin">
  149. <span
  150. class="publish-icon publish-icon-publish"
  151. data-tooltip=""
  152. title="Publish"
  153. role="button"
  154. tabindex="0">
  155. <i class="icon-unpublish"></i>
  156. <span class="publish-text" tabindex="-1">
  157. &nbsp;{{#t}}Publish{{/t}}
  158. </span>
  159. <span class="screenreader-only accessible_label">
  160. {{#t}}Unpublished. Click to publish.{{/t}}
  161. </span>
  162. </span>
  163. <div class="inline-block">
  164. <a class="al-trigger al-trigger-gray" href="#" role="button">
  165. <i class="icon-settings"></i><i class="icon-mini-arrow-down"></i>
  166. </a>
  167. <ul class="al-options">
  168. <li><a href="#">{{#t}}Edit{{/t}}</a></li>
  169. <li><a href="#">{{#t}}Delete{{/t}}</a></li>
  170. </ul>
  171. </div>
  172. </div>
  173. </div>
  174. </div>
  175. </li>
  176. <li>
  177. <div class="ig-row ig-published">
  178. <div class="ig-row__layout">
  179. <div class="ig-type-icon" aria-hidden="true">
  180. <i class="icon-assignment"></i>
  181. </div>
  182. <div class="ig-info">
  183. <a href="#" class="ig-title">
  184. {{#t}}Another Assignment Name{{/t}}
  185. </a>
  186. <div class="ig-details">
  187. <div class="ig-details__item"><b>Due</b> June 20</div>
  188. <div class="ig-details__item"><b>Available</b> May 1</div>
  189. <div class="ig-details__item">100 pts</div>
  190. </div>
  191. </div>
  192. <div class="ig-admin">
  193. <span
  194. class="publish-icon publish-icon-publish"
  195. data-tooltip=""
  196. title="Publish"
  197. role="button"
  198. tabindex="0">
  199. <i class="icon-unpublish"></i>
  200. <span class="publish-text" tabindex="-1">
  201. &nbsp;{{#t}}Publish{{/t}}
  202. </span>
  203. <span class="screenreader-only accessible_label">
  204. {{#t}}Unpublished. Click to publish.{{/t}}
  205. </span>
  206. </span>
  207. <div class="inline-block">
  208. <a class="al-trigger al-trigger-gray" href="#" role="button">
  209. <i class="icon-settings"></i><i class="icon-mini-arrow-down"></i>
  210. </a>
  211. <ul class="al-options">
  212. <li><a href="#">{{#t}}Edit{{/t}}</a></li>
  213. <li><a href="#">{{#t}}Delete{{/t}}</a></li>
  214. </ul>
  215. </div>
  216. </div>
  217. </div>
  218. </div>
  219. </li>
  220. </ul>
  221. <div class="content-box">
  222. <div class="ic-app-nav-toggle-and-crumbs ic-app-nav-toggle-and-crumbs--theme-preview">
  223. <button type="button" aria-hidden="true" class="Button Button--link ic-app-course-nav-toggle">
  224. <i class="icon-hamburger"></i>
  225. </button>
  226. <div class="ic-app-crumbs">
  227. <nav aria-label="breadcrumbs" id="breadcrumbs" role="navigation">
  228. <ul>
  229. <li class="home">
  230. <a href="#">
  231. <span class="ellipsible">
  232. <i class="icon-home" title="My Dashboard"></i>
  233. </span>
  234. </a>
  235. </li>
  236. <li>
  237. <a href="#">
  238. <span class="ellipsible">{{#t}}Breadcrumb 1{{/t}}</span>
  239. </a>
  240. </li>
  241. <li>
  242. <a href="#">
  243. <span class="ellipsible">{{#t}}Breadcrumb 2{{/t}}</span>
  244. </a>
  245. </li>
  246. </ul>
  247. </nav>
  248. </div>
  249. </div>
  250. <div class="content-box">
  251. <div class="grid-row">
  252. <div class="col-xs-3">
  253. <div class="list-view">
  254. <nav aria-label="context" role="navigation">
  255. <ul>
  256. <li><a href="#">{{#t}}Context nav link{{/t}}</a></li>
  257. <li><a class="active" href="#">{{#t}}Context nav link active{{/t}}</a></li>
  258. <li><a href="#">{{#t}}Context nav link{{/t}}</a></li>
  259. <li><a href="#">{{#t}}Context nav link{{/t}}</a></li>
  260. <li><a href="#">{{#t}}Context nav link{{/t}}</a></li>
  261. </ul>
  262. </nav>
  263. </div>
  264. </div>
  265. <div class="col-xs-8 off-xs-1">
  266. <table class="ic-Table ic-Table--hover-row">
  267. <thead>
  268. <tr>
  269. <th>{{#t}}Name{{/t}}</th>
  270. <th>{{#t}}Email address{{/t}}</th>
  271. <th>{{#t}}More information{{/t}}</th>
  272. </tr>
  273. </thead>
  274. <tbody>
  275. <tr>
  276. <td><a href="#">Joe Bloggs</a></td>
  277. <td>jbloggs1980@gmail.com</td>
  278. <td>{{#t}}Hover over me{{/t}}</td>
  279. </tr>
  280. <tr>
  281. <td><a href="#">Jane Doe</a></td>
  282. <td>jane-doe-11@hotmail.com</td>
  283. <td>{{#t}}Hover over me{{/t}}</td>
  284. </tr>
  285. </tbody>
  286. </table>
  287. </div>
  288. </div>
  289. </div>
  290. </div>
  291. <div class="grid-row">
  292. <div class="col-xs-12 col-lg-7">
  293. <div class="content-box-mini">
  294. <div id="theme-preview-tabs">
  295. <ul>
  296. <li><a href="#tabs-1">{{#t}}Tab 1{{/t}}</a></li>
  297. <li><a href="#tabs-2">{{#t}}Tab 2{{/t}}</a></li>
  298. <li><a href="#tabs-3">{{#t}}Tab 3{{/t}}</a></li>
  299. </ul>
  300. <div id="tabs-1">{{#t}}Tab 1 content{{/t}}</div>
  301. <div id="tabs-2">{{#t}}Tab 2 content{{/t}}</div>
  302. <div id="tabs-3">{{#t}}Tab 3 content{{/t}}</div>
  303. </div>
  304. </div>
  305. </div>
  306. <div class="col-xs-12 col-lg-4 off-lg-1">
  307. <div class="content-box-mini">
  308. <div class="accordion ui-accordion--mini" id="theme-preview-accordion">
  309. <h3><a href="#">{{#t}}Accordion Section 1{{/t}}</a></h3>
  310. <div>
  311. <div class="pad-box-mini">
  312. {{#t}}Content for Section 1{{/t}}
  313. </div>
  314. </div>
  315. <h3><a href="#">{{#t}}Accordion Section 2{{/t}}</a></h3>
  316. <div>
  317. <div class="pad-box-mini">
  318. {{#t}}Content for Section 2{{/t}}
  319. </div>
  320. </div>
  321. <h3><a href="#">{{#t}}Accordion Section 3{{/t}}</a></h3>
  322. <div>
  323. <div class="pad-box-mini">
  324. {{#t}}Content for Section 3{{/t}}
  325. </div>
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. </div>
  331. <div class="content-box">
  332. <h3 id="login-preview">
  333. {{#t}}Login{{/t}}
  334. </h3>
  335. <div class="ic-login--theme-preview">
  336. <iframe id="login-preview-iframe" src="<%= canvas_login_url(previewing_from_themeeditor: true) %>" title="{{#t}}Login{{/t}}" ></iframe>
  337. </div>
  338. </div>