generated from cloud-gov/pages-uswds-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2067731
commit 3eed931
Showing
30 changed files
with
908 additions
and
857 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Jekyll | ||
class JekyllCopyUswds < Generator | ||
def generate(site) | ||
source = "node_modules/uswds/dist" | ||
Dir.glob(File.join(source, "{fonts,img}", "**", "*")) do |filename| | ||
next if File.directory?(filename) | ||
dir, name = File.split(filename.delete_prefix(source)) | ||
site.static_files.push(Jekyll::StaticFile.new(site, source, dir, name)) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Override USWDS mixin to use jekyll-assets asset_url() | ||
|
||
@mixin add-background-svg($image-name, $image-path: $theme-image-path) { | ||
background-image: asset_url("#{$image-path}/#{$image-name}.svg"), | ||
linear-gradient(transparent, transparent); | ||
background-repeat: no-repeat; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@import "add-background-svg"; | ||
@import "font-face"; | ||
@import "hero"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Override USWDS mixin to use jekyll-assets asset_url() | ||
|
||
@mixin at-font-face($display-name, $file-path, $font-weight, $font-style) { | ||
@font-face { | ||
font-family: $display-name; | ||
font-style: unquote($font-style); | ||
font-weight: $font-weight; | ||
font-display: fallback; | ||
src: asset_url("'#{$file-path}.woff2'") format("woff2"), | ||
asset_url("'#{$file-path}.woff'") format("woff"), | ||
asset_url("'#{$file-path}.ttf'") format("truetype"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Override USWDS mixin to use jekyll-assets asset_url() | ||
|
||
.usa-hero { | ||
background-image: $theme-hero-image !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
12 changes: 6 additions & 6 deletions
12
assets/files/js/bootstrap.min.js → assets/js/bootstrap.min.js
100755 → 100644
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
122 changes: 61 additions & 61 deletions
122
assets/files/js/contact-form-script.js → assets/js/contact-form-script.js
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
/*==============================================================*/ | ||
// Klev Contact Form JS | ||
/*==============================================================*/ | ||
(function ($) { | ||
"use strict"; // Start of use strict | ||
$("#contactForm").validator().on("submit", function (event) { | ||
if (event.isDefaultPrevented()) { | ||
// handle the invalid form... | ||
formError(); | ||
submitMSG(false, "Did you fill in the form properly?"); | ||
} else { | ||
// everything looks good! | ||
event.preventDefault(); | ||
submitForm(); | ||
} | ||
}); | ||
|
||
|
||
function submitForm(){ | ||
// Initiate Variables With Form Content | ||
var name = $("#name").val(); | ||
var email = $("#email").val(); | ||
var msg_subject = $("#msg_subject").val(); | ||
var phone_number = $("#phone_number").val(); | ||
var message = $("#message").val(); | ||
|
||
|
||
$.ajax({ | ||
type: "POST", | ||
url: "assets/php/form-process.php", | ||
data: "name=" + name + "&email=" + email + "&msg_subject=" + msg_subject + "&phone_number=" + phone_number + "&message=" + message, | ||
success : function(text){ | ||
if (text == "success"){ | ||
formSuccess(); | ||
} else { | ||
formError(); | ||
submitMSG(false,text); | ||
} | ||
} | ||
}); | ||
} | ||
|
||
function formSuccess(){ | ||
$("#contactForm")[0].reset(); | ||
submitMSG(true, "Message Submitted!") | ||
} | ||
|
||
function formError(){ | ||
$("#contactForm").removeClass().addClass('shake animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ | ||
$(this).removeClass(); | ||
}); | ||
} | ||
|
||
function submitMSG(valid, msg){ | ||
if(valid){ | ||
var msgClasses = "h4 text-left tada animated text-success"; | ||
} else { | ||
var msgClasses = "h4 text-left text-danger"; | ||
} | ||
$("#msgSubmit").removeClass().addClass(msgClasses).text(msg); | ||
} | ||
/*==============================================================*/ | ||
// Klev Contact Form JS | ||
/*==============================================================*/ | ||
(function ($) { | ||
"use strict"; // Start of use strict | ||
$("#contactForm").validator().on("submit", function (event) { | ||
if (event.isDefaultPrevented()) { | ||
// handle the invalid form... | ||
formError(); | ||
submitMSG(false, "Did you fill in the form properly?"); | ||
} else { | ||
// everything looks good! | ||
event.preventDefault(); | ||
submitForm(); | ||
} | ||
}); | ||
|
||
|
||
function submitForm(){ | ||
// Initiate Variables With Form Content | ||
var name = $("#name").val(); | ||
var email = $("#email").val(); | ||
var msg_subject = $("#msg_subject").val(); | ||
var phone_number = $("#phone_number").val(); | ||
var message = $("#message").val(); | ||
|
||
|
||
$.ajax({ | ||
type: "POST", | ||
url: "assets/php/form-process.php", | ||
data: "name=" + name + "&email=" + email + "&msg_subject=" + msg_subject + "&phone_number=" + phone_number + "&message=" + message, | ||
success : function(text){ | ||
if (text == "success"){ | ||
formSuccess(); | ||
} else { | ||
formError(); | ||
submitMSG(false,text); | ||
} | ||
} | ||
}); | ||
} | ||
|
||
function formSuccess(){ | ||
$("#contactForm")[0].reset(); | ||
submitMSG(true, "Message Submitted!") | ||
} | ||
|
||
function formError(){ | ||
$("#contactForm").removeClass().addClass('shake animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ | ||
$(this).removeClass(); | ||
}); | ||
} | ||
|
||
function submitMSG(valid, msg){ | ||
if(valid){ | ||
var msgClasses = "h4 text-left tada animated text-success"; | ||
} else { | ||
var msgClasses = "h4 text-left text-danger"; | ||
} | ||
$("#msgSubmit").removeClass().addClass(msgClasses).text(msg); | ||
} | ||
}(jQuery)); // End of use strict |
Oops, something went wrong.