ama_layout 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.simplecov +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +146 -0
- data/Rakefile +2 -0
- data/ama_layout.gemspec +33 -0
- data/app/assets/images/AMA-Logo.png +0 -0
- data/app/assets/images/alberta-blur.jpg +0 -0
- data/app/assets/images/footer-racetrack-big.png +0 -0
- data/app/assets/javascripts/ama_layout/ama_layout_namespace.js.coffee +1 -0
- data/app/assets/javascripts/ama_layout/desktop/drop_down.js.coffee +46 -0
- data/app/assets/javascripts/ama_layout/desktop/foundation-namespace.coffee +2 -0
- data/app/assets/javascripts/ama_layout/desktop/foundation-ready.js.coffee +2 -0
- data/app/assets/javascripts/ama_layout/desktop/header_menu.coffee +3 -0
- data/app/assets/javascripts/ama_layout/desktop/index.js +9 -0
- data/app/assets/javascripts/ama_layout/desktop/ready.js.coffee +3 -0
- data/app/assets/javascripts/ama_layout/desktop/sticky-footer.coffee +16 -0
- data/app/assets/javascripts/ama_layout/desktop/toggle_menu.js.coffee +8 -0
- data/app/assets/javascripts/ama_layout/mobile/index.js +4 -0
- data/app/assets/javascripts/ama_layout/mobile/mobile_menu.js.coffee +11 -0
- data/app/assets/javascripts/ama_layout/mobile/ready.js.coffee +2 -0
- data/app/assets/javascripts/ama_layout/mobile/tablesaw.stackonly.js +277 -0
- data/app/assets/stylesheets/ama_layout/application.scss +10 -0
- data/app/assets/stylesheets/ama_layout/foundation_and_overrides.scss +1486 -0
- data/app/assets/stylesheets/ama_layout/layout/base-styles.scss +60 -0
- data/app/assets/stylesheets/ama_layout/layout/helper-classes.scss +342 -0
- data/app/assets/stylesheets/ama_layout/layout/index.scss +3 -0
- data/app/assets/stylesheets/ama_layout/layout/variables.scss +32 -0
- data/app/assets/stylesheets/ama_layout/layout_components/accordions.scss +24 -0
- data/app/assets/stylesheets/ama_layout/layout_components/blue-boxes.scss +32 -0
- data/app/assets/stylesheets/ama_layout/layout_components/error-messages.scss +9 -0
- data/app/assets/stylesheets/ama_layout/layout_components/error-page.scss +25 -0
- data/app/assets/stylesheets/ama_layout/layout_components/forms.scss +189 -0
- data/app/assets/stylesheets/ama_layout/layout_components/index.scss +8 -0
- data/app/assets/stylesheets/ama_layout/layout_components/responsive-table.scss +175 -0
- data/app/assets/stylesheets/ama_layout/layout_components/sidebar.scss +170 -0
- data/app/assets/stylesheets/ama_layout/layout_components/siteheader.scss +14 -0
- data/app/assets/stylesheets/ama_layout/media_queries/index.scss +3 -0
- data/app/assets/stylesheets/ama_layout/media_queries/mobile-and-tablet.scss +14 -0
- data/app/assets/stylesheets/ama_layout/media_queries/mobile.scss +69 -0
- data/app/assets/stylesheets/ama_layout/media_queries/tablet.scss +13 -0
- data/app/assets/stylesheets/ama_layout/old-ie.scss +74 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.eot +0 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.scss +50 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.svg +982 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.ttf +0 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons-block.woff +0 -0
- data/app/assets/stylesheets/ama_layout/webfonts/ss-symbolicons.js +84 -0
- data/app/helpers/ama_layout_content_helper.rb +56 -0
- data/app/helpers/ama_layout_path_helper.rb +69 -0
- data/app/views/ama_layout/_alert.html.erb +3 -0
- data/app/views/ama_layout/_applogo.html.erb +3 -0
- data/app/views/ama_layout/_custom_nav_links.html.erb +0 -0
- data/app/views/ama_layout/_custom_sidebar.html.erb +1 -0
- data/app/views/ama_layout/_footer.html.erb +2 -0
- data/app/views/ama_layout/_main_nav_item.html.erb +7 -0
- data/app/views/ama_layout/_main_top_nav_item.html.erb +5 -0
- data/app/views/ama_layout/_notice.html.erb +5 -0
- data/app/views/ama_layout/_notices.html.erb +2 -0
- data/app/views/ama_layout/_sidebar.html.erb +11 -0
- data/app/views/ama_layout/_siteheader.html.erb +32 -0
- data/app/views/ama_layout/_sub_nav.html.erb +3 -0
- data/app/views/ama_layout/_sub_nav_item.html.erb +3 -0
- data/app/views/ama_layout/_top_nav.html.erb +12 -0
- data/app/views/ama_layout/_top_sub_nav.html.erb +3 -0
- data/app/views/ama_layout/_top_sub_nav_item.html.erb +4 -0
- data/lib/ama_layout.rb +19 -0
- data/lib/ama_layout/decorators/moneris_decorator.rb +9 -0
- data/lib/ama_layout/decorators/navigation_decorator.rb +24 -0
- data/lib/ama_layout/decorators/navigation_item_decorator.rb +30 -0
- data/lib/ama_layout/moneris.rb +12 -0
- data/lib/ama_layout/moneris/textbox.txt +61 -0
- data/lib/ama_layout/navigation.rb +33 -0
- data/lib/ama_layout/navigation.yml +66 -0
- data/lib/ama_layout/navigation_item.rb +21 -0
- data/lib/ama_layout/version.rb +3 -0
- data/spec/helpers/ama_layout_content_helper_spec.rb +131 -0
- data/spec/helpers/ama_layout_path_helper_spec.rb +117 -0
- data/spec/internal/config/database.yml +3 -0
- data/spec/internal/config/routes.rb +3 -0
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/db/schema.rb +3 -0
- data/spec/internal/log/.gitignore +1 -0
- data/spec/internal/public/favicon.ico +0 -0
- data/spec/spec_helper.rb +25 -0
- metadata +325 -0
|
Binary file
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Symbolset
|
|
3
|
+
* www.symbolset.com
|
|
4
|
+
* Copyright © 2013 Oak Studios LLC
|
|
5
|
+
*
|
|
6
|
+
* Upload this file to your web server
|
|
7
|
+
* and place this before the closing </body> tag.
|
|
8
|
+
* <script src="webfonts/ss-symbolicons-block.js"></script>
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
if (/(MSIE [7-9]\.|Opera.*Version\/(10\.[5-9]|(11|12)\.)|Chrome\/([1-9]|10)\.|Version\/[2-4][\.0-9]+ Safari\/|Version\/(4\.0\.[4-9]|4\.[1-9]|5\.0)[\.0-9]+? Mobile\/.*Safari\/|Android ([1-2]|4\.[2-9].*Version\/4)\.|BlackBerry.*WebKit)/.test(navigator.userAgent) && !/(IEMobile)/.test(navigator.userAgent)) {
|
|
12
|
+
|
|
13
|
+
if (/Android 4\.[2-9].*Version\/4/.test(navigator.userAgent)) {
|
|
14
|
+
var ss_android = document.createElement('style');
|
|
15
|
+
ss_android.innerHTML = '.ss-icon,[class^="ss-"],[class*=" ss-"],[class^="ss-"]:before,[class*=" ss-"]:before,[class^="ss-"].right:after[class*=" ss-"].right:after{text-rendering:auto!important}';
|
|
16
|
+
document.body.appendChild(ss_android);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var ss_set={'wheelchair accessible':'\u267F','waxing crescent moon':'\uD83C\uDF12','wheelchairaccessible':'\u267F','waning crescent moon':'\uD83C\uDF18','waxing gibbous moon':'\uD83C\uDF14','waning gibbous moon':'\uD83C\uDF16','waningcrescentmoon':'\uD83C\uDF18','hammer screwdriver':'\uF035','waxingcrescentmoon':'\uD83C\uDF12','first quarter moon':'\uD83C\uDF13','screwdriver mobile':'\uEA20','screwdriver pencil':'\uF034','screwdrivermobile':'\uEA20','screwdriverpencil':'\uF034','compact lightbulb':'\uEA85','waxinggibbousmoon':'\uD83C\uDF14','waninggibbousmoon':'\uD83C\uDF16','last quarter moon':'\uD83C\uDF17','hammerscrewdriver':'\uF035','flip horizontally':'\uE260','compactlightbulb':'\uEA85','firstquartermoon':'\uD83C\uDF13','charging battery':'\uEA14','exclamation chat':'\uE397','pencil brush pen':'\uE223','scissors needles':'\uF1F7','fliphorizontally':'\uE260','download folder':'\uEC76','scissorsneedles':'\uF1F7','chargingbattery':'\uEA14','flip vertically':'\uE261','delete database':'\uE7A5','toothless smile':'\uD83D\uDE00','exclamationchat':'\uE397','touchtone phone':'\u260F','lastquartermoon':'\uD83C\uDF17','downloadfolder':'\uEC76','download cloud':'\uEB00','search picture':'\uE856','christmas tree':'\uD83C\uDF84','deletedatabase':'\uE7A5','flux capacitor':'\uEAD0','utensils frame':'\uEA95','graduation cap':'\uD83C\uDF93','download crate':'\uEB03','question frame':'\uEA94','heavy asterisk':'\u2731','toothlesssmile':'\uD83D\uDE00','pencilbrushpen':'\uE223','life preserver':'\uEE11','medium battery':'\uEA11','navigate right':'\u25BB','flipvertically':'\uE261','touchtonephone':'\u260F','pencil mobile':'\uEA22','crescent moon':'\uD83C\uDF19','remove folder':'\uEC72','delete folder':'\uEC74','navigate down':'\uF501','mediumbattery':'\uEA11','wrench pencil':'\uF033','announcements':'\uD83D\uDCE2','searchpicture':'\uE856','downloadcloud':'\uEB00','questionframe':'\uEA94','downloadcrate':'\uEB03','heavyasterisk':'\u2731','incoming mail':'\uD83D\uDCE9','shopping cart':'\uE500','utensilsframe':'\uEA95','partly cloudy':'\u26C5','fluxcapacitor':'\uEAD0','birthday cake':'\uD83C\uDF82','upload folder':'\uEC77','question chat':'\uE398','medical cross':'\uF4B0','ellipsis chat':'\uE399','graduationcap':'\uD83C\uDF93','notifications':'\uD83D\uDD14','wedding rings':'\uD83D\uDC8D','christmastree':'\uD83C\uDF84','lifepreserver':'\uEE11','empty battery':'\uEA13','swaddled baby':'\uE430','navigate left':'\u25C5','navigateright':'\u25BB','record script':'\uE703','user portrait':'\uE420','wrenchpencil':'\uF033','userportrait':'\uE420','picnic table':'\uEAB1','swaddledbaby':'\uE430','navigateleft':'\u25C5','pencilmobile':'\uEA22','brush mobile':'\uEA21','mobile tools':'\uEA20','navigatedown':'\uF501','address book':'\uD83D\uDCD1','shoppingcart':'\uE500','partlycloudy':'\u26C5','french fries':'\uD83C\uDF5F','shopping bag':'\uE520','ellipsischat':'\uE399','questionchat':'\uE398','birthdaycake':'\uD83C\uDF82','emptybattery':'\uEA13','uploadfolder':'\uEC77','incomingmail':'\uD83D\uDCE9','announcement':'\uD83D\uDCE2','rotary phone':'\u260E','deletefolder':'\uEC74','full battery':'\uD83D\uDD0B','removefolder':'\uEC72','mobile phone':'\uD83D\uDCF1','trailer dump':'\uF302','flower frame':'\uEA93','crescentmoon':'\uD83C\uDF19','keyboarddown':'\uF0D1','partly sunny':'\u26C5','recordscript':'\uE703','medicalcross':'\uF4B0','notification':'\uD83D\uDD14','rotate right':'\u21BB','weddingrings':'\uD83D\uDC8D','tape measure':'\uF036','add database':'\uE7A2','paint roller':'\uE225','spiral bound':'\uE971','pencil brush':'\uE222','jackolantern':'\uD83C\uDF83','books pencil':'\uE960','download hdd':'\uE7B7','upload crate':'\uEB43','file cabinet':'\uE900','upload cloud':'\uEB40','skip forward':'\u23ED','fast forward':'\u23E9','ruler pencil':'\uE205','download box':'\uEB02','delete heart':'\uD83D\uDC94','play script':'\uE701','rulerpencil':'\uE205','photographs':'\uE851','users frame':'\uE422','downloadbox':'\uEB02','videocamera':'\uD83D\uDCF9','fastforward':'\u23E9','pencilbrush':'\uE222','pail shovel':'\uEAA4','skipforward':'\u23ED','uploadcloud':'\uEB40','filecabinet':'\uE900','uploadcrate':'\uEB43','storage box':'\uE901','bookspencil':'\uE960','downloadhdd':'\uE7B7','deleteheart':'\uD83D\uDC94','book insert':'\uE961','tapemeasure':'\uF036','network hdd':'\uE7B6','spiralbound':'\uE971','paintroller':'\uE225','adddatabase':'\uE7A2','rotateright':'\u21BB','thumbs down':'\uD83D\uDC4E','alarm clock':'\u23F0','auto repair':'\uF300','stop script':'\uE702','keyboard up':'\uF0D0','medical bag':'\uF4B1','navigate up':'\uF500','remove file':'\uEC02','delete file':'\uEC04','trailerdump':'\uF302','flowerframe':'\uEA93','mobilephone':'\uD83D\uDCF1','search file':'\uEC05','fullbattery':'\uD83D\uDD0B','rotaryphone':'\u260E','radioactive':'\u2622','partlysunny':'\u26C5','credit card':'\uD83D\uDCB3','information':'\u2139','frenchfries':'\uD83C\uDF5F','shoppingbag':'\uE520','tooth smile':'\uD83D\uDE03','addressbook':'\uD83D\uDCD1','mobiletools':'\uEA20','remove user':'\uE402','brushmobile':'\uEA21','happy robot':'\uE441','symbolicons':'\uE440','delete user':'\uE404','heart frame':'\uD83D\uDC9F','male female':'\uD83D\uDC6B','toiletpaper':'\uEA84','raised hand':'\u270B','picnictable':'\uEAB1','clap board':'\uD83C\uDFAC','square key':'\uF310','television':'\uD83D\uDCFA','flatscreen':'\uE8C0','controller':'\uD83C\uDFAE','autorepair':'\uF300','motorcycle':'\uF303','navigateup':'\uF500','searchfile':'\uEC05','user frame':'\uE421','pailshovel':'\uEAA4','deletefile':'\uEC04','usersframe':'\uE422','removefile':'\uEC02','directions':'\uE672','storagebox':'\uE901','creditcard':'\uD83D\uDCB3','connection':'\uEB85','automobile':'\uD83D\uDE98','playscript':'\uE701','bookinsert':'\uE961','grid lines':'\uE206','stopscript':'\uE702','medicalbag':'\uF4B1','easter egg':'\uEAE0','no smoking':'\uD83D\uDEAD','wine glass':'\uD83C\uDF77','happyrobot':'\uE441','keyboardup':'\uF0D0','thumbnails':'\uE9A3','toothsmile':'\uD83D\uDE03','car repair':'\uF300','babybottle':'\uD83C\uDF7C','binoculars':'\uE010','flaginhole':'\u26F3','alarmclock':'\u23F0','hard drive':'\uE7B0','eyedropper':'\uE200','networkhdd':'\uE7B6','disapprove':'\uD83D\uDC4E','cell phone':'\uD83D\uDCF1','scale down':'\uEE05','tree frame':'\uEA92','pull quote':'\u201C','removeuser':'\uE402','smartphone':'\uD83D\uDCF1','cell tower':'\uD83D\uDCF6','star frame':'\uEA91','wheelchair':'\u267F','microphone':'\uD83C\uDFA4','basketball':'\uD83C\uDFC0','headphones':'\uD83C\uDFA7','upload box':'\uEB42','phonograph':'\uE802','thumbsdown':'\uD83D\uDC4E','deleteuser':'\uE404','music home':'\uE821','magic wand':'\uE203','heart user':'\uE405','raisedhand':'\u270B','photograph':'\uD83C\uDF04','brightness':'\uD83D\uDD06','calculator':'\uE551','malefemale':'\uD83D\uDC6B','screenshot':'\u2316','switch off':'\uF003','heartframe':'\uD83D\uDC9F','typewriter':'\uED41','discussion':'\uE390','fuzzy dice':'\uEA87','add folder':'\uEC71','flashlight':'\uD83D\uDD26','newspaper':'\uD83D\uDCF0','full moon':'\uD83C\uDF15','voicemail':'\u2315','teddybear':'\uEAA0','megaphone':'\uD83D\uDCE2','paper bag':'\uF161','christmas':'\uD83C\uDF84','pullquote':'\u201C','scaledown':'\uEE05','flash off':'\uF011','evergreen':'\uD83C\uDF32','harddrive':'\uE7B0','open book':'\uD83D\uDCD6','palm tree':'\uD83C\uDF34','magicwand':'\uE203','heartuser':'\uE405','halloween':'\uD83C\uDF83','backspace':'\u232B','switchoff':'\uF003','money bag':'\uD83D\uDCB0','installer':'\uE7B7','easteregg':'\uEAE0','switch on':'\uF002','musicnote':'\u266B','calculate':'\uE551','stop sign':'\uE0D1','add heart':'\uE1A2','billiards':'\uD83C\uDFB1','bear face':'\uD83D\uDC3B','uploadbox':'\uEB42','bar chart':'\uD83D\uDCCA','checkmark':'\u2713','pie chart':'\uE570','musichome':'\uE821','crosshair':'\u2316','cellphone':'\uD83D\uDCF1','linechart':'\uD83D\uDCC8','flowchart':'\uE577','addfolder':'\uEC71','userframe':'\uE421','cut paste':'\uE204','buildings':'\uD83C\uDFE2','treeframe':'\uEA92','cell bars':'\uD83D\uDCF6','celltower':'\uD83D\uDCF6','briefcase':'\uD83D\uDCBC','clipboard':'\uD83D\uDCCB','lightning':'\u2607','text chat':'\uE396','nosmoking':'\uD83D\uDEAD','documents':'\uEC00','clapboard':'\uD83C\uDFAC','dashboard':'\uF000','gridlines':'\uE206','fuzzydice':'\uEA87','play film':'\uE8B1','squarekey':'\uF310','stopwatch':'\u23F1','telephone':'\uD83D\uDCDE','projector':'\uE8C1','videogame':'\uD83C\uDFAE','carrepair':'\uF300','three die':'\u2682','starframe':'\uEA91','thumbs up':'\uD83D\uDC4D','hourglass':'\u23F3','tombstone':'\u26FC','fireplace':'\uEA82','headstone':'\u26FC','wineglass':'\uD83C\uDF77','lightbulb':'\uD83D\uDCA1','footsteps':'\uD83D\uDC63','hamburger':'\uD83C\uDF54','skip back':'\u23EE','phonebook':'\uE301','redirect':'\u2197','campfire':'\uD83D\uDD25','previous':'\u25C5','utensils':'\uD83C\uDF74','paperbag':'\uF161','zoom out':'\uE003','cocktail':'\uD83C\uDF78','unlocked':'\uD83D\uDD13','cellbars':'\uD83D\uDCF6','pancakes':'\uF113','insecure':'\uD83D\uDD13','trashcan':'\uE0D0','asterisk':'\u2731','stopsign':'\uE0D1','keywords':'\uE100','computer':'\uD83D\uDCBB','calendar':'\uD83D\uDCC5','thumbsup':'\uD83D\uDC4D','testtube':'\uF4C1','addheart':'\uE1A2','favorite':'\u22C6','bullseye':'\uD83C\uDFAF','balloons':'\uD83C\uDF88','wrenches':'\uF032','flashoff':'\uF011','scissors':'\u2702','cutpaste':'\uE204','switchon':'\uF002','controls':'\uF001','umbrella':'\u2602','hanukkah':'\uEAE1','notebook':'\uD83D\uDCD3','openbook':'\uD83D\uDCD6','hospital':'\u26E8','settings':'\u2699','exercise':'\uF414','new moon':'\uD83C\uDF11','palmtree':'\uD83C\uDF34','envelope':'\u2709','skipback':'\u23EE','bearface':'\uD83D\uDC3B','cat face':'\uD83D\uDC31','dog face':'\uD83D\uDC36','subtract':'\u002D','comments':'\uE390','textchat':'\uE396','fullmoon':'\uD83C\uDF15','threedie':'\u2682','question':'\u2753','ski boot':'\uF408','four die':'\u2683','add user':'\uE401','five die':'\u2684','scale up':'\uEE04','contract':'\uEE01','playfilm':'\uE8B1','shredder':'\uED40','download':'\uEB00','typeface':'\uED01','contacts':'\uD83D\uDCC7','pictures':'\uE851','football':'\uD83C\uDFC8','banknote':'\uD83D\uDCB5','moneybag':'\uD83D\uDCB0','baseball':'\u26BE','playlist':'\uE820','barchart':'\uD83D\uDCCA','piechart':'\uE570','activity':'\uD83D\uDCC8','elevator':'\uF380','add file':'\uEC01','transfer':'\u21C6','signpost':'\uE672','database':'\uE7A0','restroom':'\uD83D\uDEBB','location':'\uE6D0','hot tub':'\uF411','crochet':'\uF1F5','refresh':'\u21BB','addfile':'\uEC01','airplay':'\uE800','compass':'\uE671','lodging':'\uD83C\uDFE8','dictate':'\uD83C\uDFA4','theatre':'\uD83C\uDFAD','package':'\uD83D\uDCE6','speaker':'\uD83D\uDD08','parking':'\uF312','meeting':'\uE581','invoice':'\uE550','picture':'\uD83C\uDF04','present':'\uD83C\uDF81','printer':'\u2399','paddles':'\uF407','females':'\uD83D\uDC6D','skiboot':'\uF408','six die':'\u2685','scaleup':'\uEE04','fivedie':'\u2684','adduser':'\uE401','avatars':'\uD83D\uDC65','fourdie':'\u2683','two die':'\u2681','warning':'\u26A0','caution':'\u26D4','one die':'\u2680','comment':'\uD83D\uDCAC','checked':'\u2713','dogface':'\uD83D\uDC36','catface':'\uD83D\uDC31','bicycle':'\uD83D\uDEB2','pushpin':'\uD83D\uDCCC','mailbox':'\uD83D\uDCEB','podcast':'\uE311','newmoon':'\uD83C\uDF11','syncing':'\uEB82','shuffle':'\uD83D\uDD00','cabinet':'\uE900','effects':'\uE280','palette':'\uD83C\uDFA8','menorah':'\uEAE1','toggles':'\uF001','crayons':'\uE242','notepad':'\uE972','windows':'\uE202','toolbox':'\uF030','balloon':'\uD83C\uDF88','bandage':'\uF4B2','dislike':'\uD83D\uDC4E','rainbow':'\uD83C\uDF08','approve':'\uD83D\uDC4D','forward':'\u27A1','desktop':'\uD83D\uDCBB','new tag':'\uE101','display':'\uD83D\uDCBB','keyword':'\uE100','monitor':'\uD83D\uDCBB','battery':'\uD83D\uDD0B','private':'\uD83D\uDD12','growler':'\uF121','compose':'\uD83D\uDCDD','trailer':'\uF301','zoomout':'\uE003','needles':'\uF1F6','takeout':'\uF160','laundry':'\uEA80','zoom in':'\uE002','diaper':'\uEAA3','script':'\uE700','rattle':'\uEAA2','blocks':'\uEAA1','candle':'\uEAB0','expand':'\u2922','upload':'\uEB40','itunes':'\uE822','pixels':'\uE2A1','bezier':'\uE2A0','sixdie':'\u2685','tennis':'\uD83C\uDFBE','camera':'\uD83D\uDCF7','puzzle':'\uE710','ledger':'\uD83D\uDCD2','switch':'\uF002','search':'\uD83D\uDD0D','avatar':'\uD83D\uDC64','stroke':'\uE241','easter':'\uEAE0','flight':'\u2708','folder':'\uD83D\uDCC1','gaming':'\uD83C\uDFAE','ticket':'\uD83C\uDFAB','wrench':'\uD83D\uDD27','twodie':'\u2681','layers':'\uE202','soccer':'\u26BD','sample':'\uE200','notice':'\uE973','trophy':'\uD83C\uDFC6','keypad':'\uE9A0','filter':'\uE9B0','funnel':'\uE9B0','images':'\uE851','photos':'\uE851','genius':'\u269B','anchor':'\uED10','hyphen':'\u002D','remove':'\u002D','onedie':'\u2680','newtag':'\uE101','volume':'\uD83D\uDD08','runner':'\uD83C\uDFC3','tagged':'\uE100','delete':'\u2421','laptop':'\uEA00','target':'\u25CE','cheese':'\uF101','hotdog':'\uF102','burger':'\uD83C\uDF54','tablet':'\uEA01','iphone':'\uD83D\uDCF1','public':'\uD83D\uDD13','mobile':'\uD83D\uDCF1','window':'\uE714','unlock':'\uD83D\uDD13','secure':'\uD83D\uDD12','rocket':'\uD83D\uDE80','coffee':'\uF120','videos':'\uD83D\uDCF9','bottle':'\uF122','zipper':'\uF1F9','locked':'\uD83D\uDD12','record':'\u25CF','rewind':'\u23EA','button':'\uF1F8','pencil':'\u270E','washer':'\uEA80','outbox':'\uD83D\uDCE4','people':'\uD83D\uDC6B','hottub':'\uF411','bridge':'\uE603','action':'\uEE00','framed':'\uEA90','tshirt':'\uD83D\uDC55','zoomin':'\uE002','toilet':'\uD83D\uDEBD','fabric':'\uF1F0','swatch':'\uF1F1','thread':'\uF1F3','flower':'\u2698','dryer':'\uEA81','ghost':'\uD83D\uDC7B','video':'\uD83D\uDCF9','badge':'\uD83D\uDCDB','quote':'\u201C','crown':'\uD83D\uDC51','truck':'\uD83D\uDE9A','train':'\uD83D\uDE86','plane':'\u2708','brush':'\uE224','print':'\u2399','trash':'\uE0D0','phone':'\uD83D\uDCDE','tools':'\uF031','males':'\uD83D\uDC6C','shred':'\uED40','right':'\u27A1','crate':'\uE5D8','frame':'\uEA90','rules':'\uD83D\uDCCF','visit':'\uEE00','fence':'\uE601','women':'\uD83D\uDC6D','email':'\u2709','write':'\u270E','clock':'\u23F2','music':'\u266B','store':'\uD83C\uDFEA','timer':'\u23F1','alarm':'\u23F0','pause':'\uE8A0','power':'\uEE10','audio':'\u266B','smile':'\u263B','earth':'\uD83C\uDF0E','world':'\uD83C\uDF0E','globe':'\uD83C\uDF10','vault':'\uE540','alert':'\u26A0','sound':'\uD83D\uDD08','frown':'\u2639','radio':'\uD83D\uDCFB','rings':'\uD83D\uDC8D','share':'\uF601','minus':'\u002D','eject':'\u23CF','flask':'\uF4C0','check':'\u2713','pizza':'\uD83C\uDF55','discs':'\uE811','inbox':'\uD83D\uDCE5','heart':'\u2665','apple':'\uD83C\uDF4F','close':'\u2421','nodes':'\uEB85','stamp':'\uE351','sunny':'\u2600','files':'\uEC00','skull':'\uD83D\uDC80','pages':'\uEC00','books':'\uD83D\uDCDA','users':'\uD83D\uDC65','award':'\uE1C0','sheep':'\uD83D\uDC11','drink':'\uF125','image':'\uD83C\uDF04','photo':'\uD83C\uDF04','tooth':'\uEF61','robot':'\uE440','teddy':'\uEAA0','hiker':'\uF410','gavel':'\uD83D\uDD28','chats':'\uE390','heath':'\uD83D\uDCD2','album':'\uE970','medal':'\uE1C1','sweep':'\uEA86','weave':'\uF1F2','broom':'\uEA86','alien':'\uD83D\uDC7D','tire':'\uF311','yarn':'\uF1F4','zoom':'\uE002','hand':'\u270B','soda':'\uF124','wine':'\uF123','link':'\uD83D\uDD17','beer':'\uD83C\uDF7A','edit':'\u270E','lock':'\uD83D\uDD12','next':'\u25BB','date':'\uD83D\uDCC5','time':'\u23F2','bell':'\uD83D\uDD14','gear':'\u2699','tags':'\uE100','leaf':'\uD83C\uDF42','tree':'\uD83C\uDF32','bone':'\uEF60','back':'\u2B05','left':'\u2B05','bird':'\uD83D\uDC26','down':'\u2B07','plus':'\u002B','info':'\u2139','help':'\u2753','flag':'\u2691','list':'\uED50','like':'\uD83D\uDC4D','font':'\uED01','undo':'\u21A9','love':'\u2665','star':'\u22C6','wifi':'\uEB84','sync':'\uEB82','redo':'\u21AA','crop':'\uE201','atom':'\u269B','taxi':'\uD83D\uDE96','fill':'\uE240','call':'\uD83D\uDCDE','send':'\uE350','idea':'\uD83D\uDCA1','door':'\uD83D\uDEAA','cell':'\uD83D\uDCF1','ipad':'\uEA01','grid':'\uE9A0','news':'\uD83D\uDCF0','bike':'\uD83D\uDEB2','skip':'\u23ED','stop':'\u25A0','boat':'\uD83D\uDEA2','play':'\u25B6','mail':'\u2709','chat':'\uD83D\uDCAC','film':'\uE8B0','oven':'\uF140','fuel':'\u26FD','hike':'\uF410','disc':'\uD83D\uDCBF','talk':'\uD83D\uDCAC','skis':'\uD83C\uDFBF','user':'\uD83D\uDC64','baby':'\uD83D\uDC76','barn':'\uE604','city':'\uD83C\uDFE2','work':'\uD83D\uDCBC','home':'\u2302','cart':'\uE500','golf':'\uF400','meet':'\uE581','bank':'\uD83C\uDFE6','cash':'\uD83D\uDCB5','bill':'\uE550','safe':'\uE540','gift':'\uD83C\uDF81','exit':'\uD83D\uDEAA','box':'\uD83D\uDCE6','men':'\uD83D\uDC6C','bug':'\uD83D\uDC1B','hdd':'\uE7B0','mic':'\uD83C\uDFA4','gas':'\u26FD','jug':'\uF126','run':'\uD83C\uDFC3','ufo':'\uF304','bus':'\uD83D\uDE8D','rss':'\uE310','cfl':'\uEA85','cup':'\uF125','cab':'\uD83D\uDE96','pen':'\u2712','cut':'\u2702','rip':'\u26FC','map':'\uE673','usb':'\uEB86','sun':'\u2600','fax':'\uD83D\uDCE0','out':'\uEE00','add':'\u002B','dog':'\uD83D\uDC15','pig':'\uD83D\uDC16','cog':'\u2699','tag':'\uE100','ban':'\uD83D\uDEAB','key':'\uD83D\uDD11','egg':'\uF100','mug':'\u2615','car':'\uD83D\uDE98','za':'\uD83C\uDF55','up':'\u2B06','fx':'\uE280','tv':'\uD83D\uDCFA'};
|
|
20
|
+
|
|
21
|
+
if (typeof ss_icons !== 'object' || typeof ss_icons !== 'object') {
|
|
22
|
+
var ss_icons = ss_set;
|
|
23
|
+
var ss_keywords = [];
|
|
24
|
+
for (var i in ss_set) { ss_keywords.push(i); };
|
|
25
|
+
} else {
|
|
26
|
+
for (var i in ss_set) { ss_icons[i] = ss_set[i]; ss_keywords.push(i); }
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
if (typeof ss_legacy !== 'function') {
|
|
30
|
+
|
|
31
|
+
/* domready.js */
|
|
32
|
+
!function(a,b){typeof module!="undefined"?module.exports=b():typeof define=="function"&&typeof define.amd=="object"?define(b):this[a]=b()}("ss_ready",function(a){function m(a){l=1;while(a=b.shift())a()}var b=[],c,d=!1,e=document,f=e.documentElement,g=f.doScroll,h="DOMContentLoaded",i="addEventListener",j="onreadystatechange",k="readyState",l=/^loade|c/.test(e[k]);return e[i]&&e[i](h,c=function(){e.removeEventListener(h,c,d),m()},d),g&&e.attachEvent(j,c=function(){/^c/.test(e[k])&&(e.detachEvent(j,c),m())}),a=g?function(c){self!=top?l?c():b.push(c):function(){try{f.doScroll("left")}catch(b){return setTimeout(function(){a(c)},50)}c()}()}:function(a){l?a():b.push(a)}})
|
|
33
|
+
|
|
34
|
+
var ss_legacy = function(node) {
|
|
35
|
+
|
|
36
|
+
if (!node instanceof Object) return false;
|
|
37
|
+
|
|
38
|
+
if (node.length) {
|
|
39
|
+
for (var i=0; i<node.length; i++) {
|
|
40
|
+
ss_legacy(node[i]);
|
|
41
|
+
}
|
|
42
|
+
return;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
if (node.value) {
|
|
46
|
+
node.value = ss_liga(node.value);
|
|
47
|
+
} else if (node.nodeValue) {
|
|
48
|
+
node.nodeValue = ss_liga(node.nodeValue);
|
|
49
|
+
} else if (node.innerHTML) {
|
|
50
|
+
node.innerHTML = ss_liga(node.innerHTML);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var ss_getElementsByClassName = function(node, classname) {
|
|
56
|
+
if (document.querySelectorAll) {
|
|
57
|
+
return document.querySelectorAll('.'+classname);
|
|
58
|
+
}
|
|
59
|
+
var a = [];
|
|
60
|
+
var re = new RegExp('(^| )'+classname+'( |$)');
|
|
61
|
+
var els = node.getElementsByTagName("*");
|
|
62
|
+
for(var i=0,j=els.length; i<j; i++)
|
|
63
|
+
if(re.test(els[i].className))a.push(els[i]);
|
|
64
|
+
return a;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
var ss_liga = function(that) {
|
|
68
|
+
var re = new RegExp(ss_keywords.join('|').replace(/[-[\]{}()*+?.,\\^$#\s]/g, "\\$&"),"gi");
|
|
69
|
+
return that.replace(re, function(v) {
|
|
70
|
+
return ss_icons[v.toLowerCase()];
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
ss_ready(function() {
|
|
75
|
+
if (document.getElementsByClassName) {
|
|
76
|
+
ss_legacy(document.getElementsByClassName('ss-icon'));
|
|
77
|
+
} else {
|
|
78
|
+
ss_legacy(ss_getElementsByClassName(document.body, 'ss-icon'));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
module AmaLayoutContentHelper
|
|
2
|
+
def greeting
|
|
3
|
+
cookies["logged_in_meta"]
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def utm_source
|
|
7
|
+
Rails.configuration.site_name.downcase.gsub(/\W/, "")
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def active_section(nav_item)
|
|
11
|
+
paths = [nav_item.link]
|
|
12
|
+
paths += nav_item.sub_nav.map(&:link)
|
|
13
|
+
active_page(*paths)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def active_page(*path)
|
|
17
|
+
"activepage" if path.include?(request.fullpath) || path.include?(request.url)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def active_domain(domain)
|
|
21
|
+
"active" if request.url.include?(domain)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def renew_or_join_path(logged_in)
|
|
25
|
+
return "" if logged_in
|
|
26
|
+
link_to("Become a Member", "http://www.ama.ab.ca/membership/join-ama-online", target: "_blank")
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def gift_or_pricing_path(logged_in)
|
|
30
|
+
return "" if logged_in
|
|
31
|
+
link_to("Gift Membership", "http://www.ama.ab.ca/membership-rewards/ama-gift-membership", target: "_blank")
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def dropdown_menu(logged_in, greeting)
|
|
35
|
+
return "" unless logged_in
|
|
36
|
+
render partial: "ama_layout/dropdown_menu", locals: { logged_in: logged_in, greeting: greeting }
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def tablet_menu(logged_in, greeting)
|
|
40
|
+
return "" unless logged_in
|
|
41
|
+
render partial: "ama_layout/tablet_menu", locals: { logged_in: logged_in, greeting: greeting }
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def tablet_signout(logged_in)
|
|
45
|
+
return "" unless logged_in
|
|
46
|
+
render "ama_layout/tablet_signout"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def notice(notice)
|
|
50
|
+
render "ama_layout/notice" if notice
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def alert(alert)
|
|
54
|
+
render "ama_layout/alert" if alert
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
module AmaLayoutPathHelper
|
|
2
|
+
def gatekeeper_profile_path
|
|
3
|
+
"#{Rails.configuration.gatekeeper_site}/user/edit"
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def youraccount_dashboard_path
|
|
7
|
+
"#{Rails.configuration.youraccount_site}/dashboard"
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def youraccount_help_path
|
|
11
|
+
"#{Rails.configuration.youraccount_site}/help"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def youraccount_billing_path
|
|
15
|
+
"#{Rails.configuration.youraccount_site}/billing"
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def youraccount_automatic_credit_card_renewals_path
|
|
19
|
+
"#{Rails.configuration.youraccount_site}/automatic_credit_card_renewals"
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def youraccount_ebill_path
|
|
23
|
+
"#{Rails.configuration.youraccount_site}/ebill"
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def youraccount_reward_dollars_path
|
|
27
|
+
"#{Rails.configuration.youraccount_site}/reward_dollars"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def youraccount_membership_path
|
|
31
|
+
"#{Rails.configuration.youraccount_site}/membership"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def youraccount_new_membership_update_path
|
|
35
|
+
"#{Rails.configuration.youraccount_site}/membership_update/new"
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def youraccount_memberships_printcard_path
|
|
39
|
+
"#{Rails.configuration.youraccount_site}/memberships/printcard"
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def youraccount_subscriptions_path
|
|
43
|
+
"#{Rails.configuration.youraccount_site}/subscriptions"
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def youraccount_westworld_path
|
|
47
|
+
"#{Rails.configuration.youraccount_site}/westworld"
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def youraccount_privacy_path
|
|
51
|
+
"#{Rails.configuration.youraccount_site}/privacy"
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def youraccount_terms_path
|
|
55
|
+
"#{Rails.configuration.youraccount_site}/terms"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def insurance_path
|
|
59
|
+
Rails.configuration.insurance_site
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def membership_esso_reload_path
|
|
63
|
+
"#{Rails.configuration.membership_site}/reward_cards"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def driveredonline_path
|
|
67
|
+
"#{Rails.configuration.driveredonline_site}/login"
|
|
68
|
+
end
|
|
69
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= navigation.sidebar %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<li class="dashboard-nav dashboard-title <%= nav_item.active_class %>">
|
|
2
|
+
<span class="nav-icon fa <%= nav_item.icon %> <%= nav_item.active_class %>"></span>
|
|
3
|
+
<%= link_to nav_item.text, nav_item.link,
|
|
4
|
+
target: nav_item.target, alt: nav_item.alt,
|
|
5
|
+
class: nav_item.active_class %>
|
|
6
|
+
<%= nav_item.sidebar_sub_nav %>
|
|
7
|
+
</li>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div class="medium-4 large-3 columns show-for-medium-up pl0">
|
|
2
|
+
<div class="white-trans pb0">
|
|
3
|
+
<div class="large-12 fullwidth center">
|
|
4
|
+
<%= render partial: "ama_layout/main_nav_item", collection: navigation.items, as: :nav_item %>
|
|
5
|
+
<li class="dashboard-nav dashboard-title">
|
|
6
|
+
<span class="nav-icon fa fa-power-off"></span>
|
|
7
|
+
<%= link_to "Sign Out", "/logout" %>
|
|
8
|
+
</li>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<div class="sticky contain-to-grid top-bar-nav">
|
|
2
|
+
<nav class="top-bar" data-topbar data-options="mobile_show_parent_link: false" role="navigation">
|
|
3
|
+
<ul class="title-area">
|
|
4
|
+
<li class="name">
|
|
5
|
+
<%= link_to(image_tag("AMA-Logo.png"), "https://www.ama.ab.ca") %>
|
|
6
|
+
</li>
|
|
7
|
+
<li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>
|
|
8
|
+
</ul>
|
|
9
|
+
<section class="top-bar-section show-for-small-only">
|
|
10
|
+
<ul class="right">
|
|
11
|
+
<%= render partial: "ama_layout/main_top_nav_item", collection: navigation.items, as: :nav_item %>
|
|
12
|
+
<li class="divider"></li>
|
|
13
|
+
<li><a href="<%= Rails.configuration.amaabca_site %>">AMA Website</a></li>
|
|
14
|
+
<li class="divider"></li>
|
|
15
|
+
<li><a href="#">AMA Road Reports</a></li>
|
|
16
|
+
<li class="divider"></li>
|
|
17
|
+
<li><a href="<%= Rails.configuration.youraccount_site %>/help#faq1">Help</a></li>
|
|
18
|
+
<li class="divider"></li>
|
|
19
|
+
<li><a href="<%= Rails.configuration.amaabca_site %>/membership/contact-us--centre-locations-hours-and-contact-information">Contact Us</a></li>
|
|
20
|
+
<li class="divider show-for-small-only"></li>
|
|
21
|
+
<%= navigation.sign_out_link %>
|
|
22
|
+
</ul>
|
|
23
|
+
</section>
|
|
24
|
+
<section class="top-bar-section show-for-medium-up">
|
|
25
|
+
<ul class="right">
|
|
26
|
+
<li><a href="<%= Rails.configuration.youraccount_site %>/help#faq1">Help</a></li>
|
|
27
|
+
<li><a href="<%= Rails.configuration.amaabca_site %>/membership/contact-us--centre-locations-hours-and-contact-information">Contact Us</a></li>
|
|
28
|
+
<%= navigation.top_nav %>
|
|
29
|
+
</ul>
|
|
30
|
+
</section>
|
|
31
|
+
</nav>
|
|
32
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<li class="has-dropdown dropdown-open-link">
|
|
2
|
+
<a>My Online Account</a>
|
|
3
|
+
<ul class="dropdown">
|
|
4
|
+
<%= render partial: "ama_layout/main_top_nav_item", collection: navigation.items, as: :nav_item %>
|
|
5
|
+
<li class="divider"></li>
|
|
6
|
+
<li><a href="#">AMA Website</a></li>
|
|
7
|
+
<li class="divider"></li>
|
|
8
|
+
<li><a href="#">AMA Road Reports</a></li>
|
|
9
|
+
<li class="divider"></li>
|
|
10
|
+
<li><a href="/logout">Sign Out</a></li>
|
|
11
|
+
</ul>
|
|
12
|
+
</li>
|
data/lib/ama_layout.rb
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
require "ama_layout/version"
|
|
2
|
+
require "rails/all"
|
|
3
|
+
require "foundation-rails"
|
|
4
|
+
require "sass-rails"
|
|
5
|
+
require "font-awesome-sass"
|
|
6
|
+
require "draper"
|
|
7
|
+
require "ama_layout/moneris"
|
|
8
|
+
require "ama_layout/navigation"
|
|
9
|
+
require "ama_layout/navigation_item"
|
|
10
|
+
require "ama_layout/decorators/moneris_decorator"
|
|
11
|
+
require "ama_layout/decorators/navigation_decorator"
|
|
12
|
+
require "ama_layout/decorators/navigation_item_decorator"
|
|
13
|
+
|
|
14
|
+
module AmaLayout
|
|
15
|
+
module Rails
|
|
16
|
+
class Engine < ::Rails::Engine
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module AmaLayout
|
|
2
|
+
class NavigationDecorator < Draper::Decorator
|
|
3
|
+
delegate_all
|
|
4
|
+
|
|
5
|
+
def items
|
|
6
|
+
object.items.map { |i| i.decorate }
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def sign_out_link
|
|
10
|
+
return "" unless user
|
|
11
|
+
h.content_tag :li do
|
|
12
|
+
h.concat h.link_to "Sign Out", "/logout"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def top_nav
|
|
17
|
+
h.render partial: "ama_layout/top_nav", locals: { navigation: self } if items.any?
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def sidebar
|
|
21
|
+
h.render partial: "ama_layout/sidebar", locals: { navigation: self } if items.any?
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module AmaLayout
|
|
2
|
+
class NavigationItemDecorator < Draper::Decorator
|
|
3
|
+
delegate_all
|
|
4
|
+
|
|
5
|
+
def sub_nav
|
|
6
|
+
object.sub_nav.map { |sn| sn.decorate }
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def sub_nav_class
|
|
10
|
+
"has-dropdown" if sub_nav.any?
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def top_sub_nav
|
|
14
|
+
h.render partial: "ama_layout/top_sub_nav", locals: { sub_nav: sub_nav } if sub_nav.any?
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def sidebar_sub_nav
|
|
18
|
+
h.render partial: "ama_layout/sub_nav", locals: { sub_nav: sub_nav } if sub_nav.any?
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def active_class
|
|
22
|
+
"activepage" if active_link?
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
def active_link?
|
|
27
|
+
sub_nav.map(&:link).push(link).include? current_url
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module AmaLayout
|
|
2
|
+
class Moneris
|
|
3
|
+
include ActiveModel::Model
|
|
4
|
+
include Draper::Decoratable
|
|
5
|
+
|
|
6
|
+
attr_accessor :textbox_style_file
|
|
7
|
+
|
|
8
|
+
def textbox_style_file
|
|
9
|
+
@textbox_style_file ||= File.join Gem.loaded_specs["ama_layout"].full_gem_path, "lib", "ama_layout", "moneris", "textbox.txt"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
-webkit-appearance: none;
|
|
2
|
+
-webkit-box-shadow: rgba(0, 0, 0, 0.0980392) 0px 1px 2px 0px inset;
|
|
3
|
+
-webkit-rtl-ordering: logical;
|
|
4
|
+
-webkit-transition-delay: 0s, 0s;
|
|
5
|
+
-webkit-transition-duration: 0.45s, 0.45s;
|
|
6
|
+
-webkit-transition-property: box-shadow, border-color;
|
|
7
|
+
-webkit-transition-timing-function: ease, ease-in-out;
|
|
8
|
+
-webkit-user-select: text;
|
|
9
|
+
-webkit-writing-mode: horizontal-tb;
|
|
10
|
+
background-color: rgb(255, 255, 255);
|
|
11
|
+
border-bottom-color: rgb(204, 204, 204);
|
|
12
|
+
border-bottom-left-radius: 3px;
|
|
13
|
+
border-bottom-right-radius: 3px;
|
|
14
|
+
border-bottom-style: solid;
|
|
15
|
+
border-bottom-width: 1px;
|
|
16
|
+
border-image-outset: 0px;
|
|
17
|
+
border-image-repeat: stretch;
|
|
18
|
+
border-image-slice: 100%;
|
|
19
|
+
border-image-source: none;
|
|
20
|
+
border-image-width: 1;
|
|
21
|
+
border-left-color: rgb(204, 204, 204);
|
|
22
|
+
border-left-style: solid;
|
|
23
|
+
border-left-width: 1px;
|
|
24
|
+
border-right-color: rgb(204, 204, 204);
|
|
25
|
+
border-right-style: solid;
|
|
26
|
+
border-right-width: 1px;
|
|
27
|
+
border-top-color: rgb(204, 204, 204);
|
|
28
|
+
border-top-left-radius: 3px;
|
|
29
|
+
border-top-right-radius: 3px;
|
|
30
|
+
border-top-style: solid;
|
|
31
|
+
border-top-width: 1px;
|
|
32
|
+
box-shadow: rgba(0, 0, 0, 0.0980392) 0px 1px 2px 0px inset;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
color: rgba(0, 0, 0, 0.74902);
|
|
35
|
+
cursor: auto;
|
|
36
|
+
display: block;
|
|
37
|
+
font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;font-size: 14px;
|
|
38
|
+
font-style: normal;font-variant: normal;
|
|
39
|
+
font-weight: normal;
|
|
40
|
+
height: 37px;
|
|
41
|
+
letter-spacing: normal;
|
|
42
|
+
line-height: normal;
|
|
43
|
+
margin-bottom: 0px;
|
|
44
|
+
margin-left: 0px;
|
|
45
|
+
margin-right: 0px;
|
|
46
|
+
margin-top: 0px;
|
|
47
|
+
padding-bottom: 8px;
|
|
48
|
+
padding-left: 8px;
|
|
49
|
+
padding-right: 8px;
|
|
50
|
+
padding-top: 8px;
|
|
51
|
+
text-align: start;
|
|
52
|
+
text-indent: 0px;
|
|
53
|
+
text-shadow: none;
|
|
54
|
+
text-transform: none;
|
|
55
|
+
transition-delay: 0s, 0s;
|
|
56
|
+
transition-duration: 0.45s, 0.45s;
|
|
57
|
+
transition-property: box-shadow, border-color;
|
|
58
|
+
transition-timing-function: ease, ease-in-out;
|
|
59
|
+
width: 100%;
|
|
60
|
+
word-spacing: 0px;
|
|
61
|
+
writing-mode: lr-tb;
|