Skip to content

Commit

Permalink
fixed the Ruby upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
HarikaMunipalle committed Nov 2, 2023
1 parent 2067731 commit 3eed931
Showing 30 changed files with 908 additions and 857 deletions.
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -277,8 +277,9 @@ autoprefixer:
sass:
source_dir: _sass
load_paths:
- node_modules/uswds/dist/
- node_modules/uswds/dist
sourcemap: development
quiet_deps: true
style: compressed
verbose: true

2 changes: 1 addition & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
>
<div class="usa-banner__inner">
<div class="grid-col-auto">
<img class="usa-banner__header-flag" alt="U.S. flag" src="{{ site.baseurl }}/assets/img/us_flag_small.png">
<img class="usa-banner__header-flag" alt="U.S. flag" src="{{site.baseurl}}/assets/uswds/img/us_flag_small.png">
</div>
<div class="grid-col-fill tablet:grid-col-auto">
<p class="usa-banner__header-text">
4 changes: 2 additions & 2 deletions _includes/scripts.html
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@
{% endif %}

<script src="https://code.jquery.com/jquery-3.6.0.min.js" type="text/javascript"></script>
<script src="{{ site.baseurl }}/assets/files/js/app.js"></script>
<script src="{{ site.baseurl }}/assets/files/js/carousel.js"></script>
<script src="{{ site.baseurl }}/assets/js/app.js"></script>
<script src="{{ site.baseurl }}/assets/js/carousel.js"></script>
<script src="{{site.baseurl}}/assets/js/uswds.min.js"></script>
{% if site.searchgov %}
{% if site.searchgov.suggestions == true %}
12 changes: 12 additions & 0 deletions _plugins/jekyll_copy_uswds.rb
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
2 changes: 1 addition & 1 deletion _posts/2019-01-14-hello-world.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ layout: post
date: January 14, 2019
author: Abraham Lincoln
excerpt: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dapibus interdum pellentesque. Integer eu vehicula elit. Sed cursus magna in dui suscipit rhoncus.
image: hire-us.jpg
image: /assets/img/hire-us.jpg
image_alt_text: Hire Us
---

7 changes: 7 additions & 0 deletions _sass/_add-background-svg.scss
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;
}
3 changes: 3 additions & 0 deletions _sass/_all.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import "add-background-svg";
@import "font-face";
@import "hero";
13 changes: 13 additions & 0 deletions _sass/_font-face.scss
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");
}
}
5 changes: 5 additions & 0 deletions _sass/_hero.scss
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;
}
6 changes: 3 additions & 3 deletions _sass/carousel.scss
Original file line number Diff line number Diff line change
@@ -75,23 +75,23 @@
}

.carousel-item1 {
background-image: url(../assets/img/hero-homepage-data-viz.png);
background-image: url(/assets/img/hero-homepage-data-viz.png);
background-color: #172636;
background-repeat: no-repeat;
background-position: top center;
background-size: cover;
}

.carousel-item2 {
background-image: url(../assets/img/event-writing-participant.png);
background-image: url(/assets/img/event-writing-participant.png);
background-color: #172636;
background-repeat: no-repeat;
background-position: top center;
background-size: cover;
}

.carousel-item3 {
background-image: url(../assets/img/conference-chairs-stock.png);
background-image: url(/assets/img/conference-chairs-stock.png);
background-color: #172636;
background-repeat: no-repeat;
background-position: top center;
4 changes: 2 additions & 2 deletions _sass/menu-collapsible.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.usa-menu-collapsible {
[aria-controls] {
background-image: url("../assets/img/usa-icons/add.svg"),linear-gradient(transparent,transparent);
background-image: url("/assets/uswds/img/usa-icons/add.svg"),linear-gradient(transparent,transparent);
background-repeat: no-repeat;
background-size: 1.5rem;
background-position: right 1.25rem center;
@@ -11,7 +11,7 @@
}
&.open {
[aria-controls] {
background-image: url("../assets/img/usa-icons/remove.svg"),linear-gradient(transparent,transparent);
background-image: url("/assets/uswds/img/usa-icons/remove.svg"),linear-gradient(transparent,transparent);
}
.usa-menu-collapsible__content {
display: initial;
22 changes: 16 additions & 6 deletions assets/css/styles.scss
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ $theme-font-path: "../uswds/fonts";
$theme-image-path: "../uswds/img";
$theme-show-notifications: false;


// -------------------------------------
// Import individual USWDS packages...
@import "scss/packages/required";
@@ -50,6 +51,10 @@ i.e.

@import "../_sass/menu-collapsible.scss";
@import "../_sass/carousel.scss";
@import "../_sass/add-background-svg.scss";
@import "../_sass/all.scss";
@import "../_sass/font-face.scss";
@import "../_sass/hero.scss";

h2, h3, h4 {
font-family: Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif !important;
@@ -177,7 +182,7 @@ small {
@media screen and (min-width: 640px) {
.usa-banner__button[aria-expanded="true"]::after {
background-color: transparent !important;
background-image: url("../assets/img/angle-arrow-up-primary.png"), linear-gradient(transparent, transparent);
background-image: url("/assets/img/angle-arrow-up-primary.png"), linear-gradient(transparent, transparent);
background-repeat: no-repeat;
background-position: center center;
background-size: 0.5rem;
@@ -189,14 +194,14 @@ small {
}

.usa-banner__button[aria-expanded="true"]:hover::after {
background-image: url("../assets/img/angle-arrow-up-primary-hover.png"), linear-gradient(transparent, transparent);
background-image: url("/assets/img/angle-arrow-up-primary-hover.png"), linear-gradient(transparent, transparent);
background-color: transparent !important;
transform: rotate(0deg) !important;
-webkit-mask: none !important;
}

.usa-banner__button::after {
background-image: url("../assets/img/angle-arrow-down-primary.png"), linear-gradient(transparent, transparent);
background-image: url("/assets/img/angle-arrow-down-primary.png"), linear-gradient(transparent, transparent);
background-repeat: no-repeat;
background-position: center center;
background-size: 0.5rem;
@@ -208,7 +213,7 @@ small {
}

.usa-banner__button:hover::after {
background-image: url("../assets/img/angle-arrow-down-primary-hover.png"), linear-gradient(transparent, transparent);
background-image: url("/assets/img/angle-arrow-down-primary-hover.png"), linear-gradient(transparent, transparent);
background-color: transparent !important;
-webkit-mask: none !important;
}
@@ -218,7 +223,7 @@ small {

.usa-banner__button[aria-expanded="true"]::after {
border: 0;
background-image: url("../assets/img/close-blue-60v-alt.png"), linear-gradient(transparent, transparent);
background-image: url("/assets/img/close-blue-60v-alt.png"), linear-gradient(transparent, transparent);
background-repeat: no-repeat;
background-position: center center;
background-size: 1rem;
@@ -231,7 +236,7 @@ small {
}

.usa-banner__header-action::after {
background-image: url("../assets/img/angle-arrow-down-primary.png"), linear-gradient(transparent, transparent);
background-image: url("/assets/img/angle-arrow-down-primary.png"), linear-gradient(transparent, transparent);
background-repeat: no-repeat;
background-position: center center;
background-size: 0.5rem;
@@ -265,4 +270,9 @@ small {

.conference-date {
font-size: 20px;
}


.usa-link--external::after {
background-color: transparent;
}
File renamed without changes.
12 changes: 6 additions & 6 deletions assets/files/js/bootstrap.min.js → assets/js/bootstrap.min.js
100755 → 100644

Large diffs are not rendered by default.

File renamed without changes.
122 changes: 61 additions & 61 deletions assets/files/js/contact-form-script.js → assets/js/contact-form-script.js
100755 → 100644
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
Loading

0 comments on commit 3eed931

Please sign in to comment.