Skip to content

Commit

Permalink
started the addition of odu branding to the platform
Browse files Browse the repository at this point in the history
  • Loading branch information
chef-danny-d committed Aug 20, 2020
1 parent 016e77a commit a6eb7e6
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
src/assets
node_modules
.cache
25 changes: 11 additions & 14 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $(document).ready(() => {
let path = course + '-' + moduleNum
$('.content').attr(
'src',
`http://127.0.0.1:8080/src/assets/${path}/story.html`
`http://127.0.0.1:8080/src/assets/modules/${path}/story.html`
)
})
}
Expand Down Expand Up @@ -53,8 +53,9 @@ $(document).ready(() => {
if ($('.breadcrumb-item').hasClass('is-active')) {
$('#course-title').click(() => {
$('#module-title').parent().removeClass('is-active')
$('#module-title').remove()
$('#module-title').text('')
$('#course-title').parent().addClass('is-active')
$('.content').attr('src', '')
})
}
}
Expand Down Expand Up @@ -99,8 +100,13 @@ $(document).ready(() => {
//TODO: [CDI-3] implement sorting modules
const sortModules = () => {}

//TODO: [CDI-5] reset search/sort
const resetFilter = () => {}
const resetFilter = () => {
$('.reset').css('visibility', 'initial')
$('.reset').click(() => {
$('#search').val('')
$('.dropdown').removeClass('is-active')
})
}

//removes course and module text from breadcrumb
const removeBreadcrumb = () => {
Expand All @@ -118,16 +124,6 @@ $(document).ready(() => {
toggleDropdown(event.target)
})

//TODO: [AODP-13] show alt text if iframe returns 404
const moduleUnavailable = () => {
if (!$('.content').attr('src', '')) {
console.log('module content not available.')
} else {
return null
}
}
moduleUnavailable()

const toggleDropdown = (e) => {
if ($(e).parent().hasClass('is-active')) {
$(e).parent().removeClass('is-active')
Expand All @@ -142,6 +138,7 @@ $(document).ready(() => {

const handleSearch = () => {
$('#search').on('keyup', function () {
resetFilter()
const value = $(this).val().toLowerCase()
$('.dropdown').addClass('is-active')
$('.module-link').filter(function () {
Expand Down
6 changes: 4 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
<body>
<nav class="panel">
<p class="panel-heading">
Curriculum
<img src="./assets/images/odu-fullsig-blu.png" alt="old dominion university all blue logo" class="panel-brand">
<span class="panel-text">Curriculum</span>
</p>
<div class="panel-block">
<p class="control has-icons-left">
<p class="control has-icons-left has-icons-right">
<input class="input" type="text" placeholder="Search" id="search" />
<a href="#" class="reset icon is-right"><i class="far fa-times-circle" aria-hidden="true"></i></a>
<span class="icon is-left">
<i class="fas fa-search" aria-hidden="true"></i>
</span>
Expand Down
14 changes: 14 additions & 0 deletions src/style.sass
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
radius: 0
right:
radius: 0
&-heading
display: flex
align-items: center
&-text
margin:
right: 0
left: auto
&-brand
width: 25%
left: 0
&-block
width: 100%
.dropdown
Expand All @@ -40,6 +50,10 @@
.display
transition: 0.5s ease all
display: block !important
.reset
visibility: hidden
cursor: pointer !important
pointer-events: visible !important

@import './styles/large'
@import './styles/medium'
Expand Down
22 changes: 21 additions & 1 deletion src/styles/_variables.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,24 @@
text-align: center
margin:
left: auto
right: auto
right: auto

$blue: #003057
$silver: #828a8f
$sky: #98c5ea
$metal: #404a5a
$royal: #2b1ed9
$big: #202898
$midnight: #0a192d
$storm: #acaab4
$azure: #4348dd
$denim: #3658ad
$tide: #164c6d
$alu: #e1eaf0
$barry: #729be6
$hampton: #4d89c1
$waterside: #2188a2
$vanilla: #ffffff
$wisconsin: #d6d5da
$evening: #63b9d6
$seafoam: #20aec5

0 comments on commit a6eb7e6

Please sign in to comment.