Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
svallory committed Dec 12, 2023
1 parent 77fdaaf commit c5f0e15
Show file tree
Hide file tree
Showing 77 changed files with 1,023 additions and 167,050 deletions.
39 changes: 0 additions & 39 deletions deploy.yml

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"colorguard": "^1.2.1",
"cssnano": "^6.0.1",
"dts-gen": "^0.7.3",
"jquery": "^3.7.1",
"postcss-cli": "^11.0.0",
"postcss-easy-import": "^4.0.0",
"postcss-font-magician": "^3.0.0",
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 29 additions & 20 deletions src/app/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
if (!console) console = { log: function() {} };
import jQuery from 'jquery';

if (!console) console = { log: function () {} };
var debug = true;

if (window.location.hostname != "localhost") {
if (window.location.hostname != 'localhost') {
debug = false;
}

Expand All @@ -12,60 +14,67 @@ var cl = function cl(msg) {
};

if (!debug) {
console = { log: function() {} };
console = { log: function () {} };
}

var app = (function($) {

var app = (function ($) {
var init = function init($) {
cl('Application initializing...');
var errors = 0;
// var scroll = new SmoothScroll('a[href*="#"]');

setTimeout(function() {
setTimeout(function () {
$(window).scroll();
}, 100);

$('.form-control, .form-select').on('blur', function(){
if($(this).val().length > 0){
$('.form-control, .form-select').on('blur', function () {
if ($(this).val().length > 0) {
$(this).addClass('active');
} else {
$(this).removeClass('active');
}
});

$('.component').each(function() {
$('.component').each(function () {
var componentName = $(this).attr('cp-name');
var check = typeof window[componentName];
if (check != "undefined" && window[componentName].init) {
if (check != 'undefined' && window[componentName].init) {
window[componentName].init();
} else {
if (typeof componentName != "undefined") {
cl('+++[ERROR]+++ Unable to load component [' + componentName + '], function was not found or missing init().');
if (typeof componentName != 'undefined') {
cl(
'+++[ERROR]+++ Unable to load component [' +
componentName +
'], function was not found or missing init().',
);
} else {
cl('+++[ERROR]+++ Component missing "cp-name" parameter.');
console.log($(this));
}
errors++;
}
});
});

if (errors > 0) {
cl('Application was initiaded but ' + errors + ' component(s) did not load.');
cl(
'Application was initiaded but ' +
errors +
' component(s) did not load.',
);
} else {
cl('All application components initiated.');
}
$(".loader").addClass('loaded');

$('.loader').addClass('loaded');
};

//write new functions here

return {
init: init
}
init: init,
};
})();

jQuery(document).ready(function($) {
jQuery(document).ready(function ($) {
app.init($);
});
});
5 changes: 2 additions & 3 deletions src/components/Head.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const { title, description } = Astro.props;
<title>{title ? `${title} - Calligo` : 'Calligo'}</title>
<meta name="description" content={description} />

<link rel="stylesheet" href="/src/styles/vendors.scss" />
<link rel="stylesheet" href="/src/styles/app/main.scss" />

<!-----
Expand All @@ -28,8 +27,8 @@ const { title, description } = Astro.props;
/>
<script
src="https://kit.fontawesome.com/491335a88c.js"
crossorigin="anonymous"
></script>
crossorigin="anonymous">
</script>
</head>

<!--
Expand Down
3 changes: 0 additions & 3 deletions src/components/ImgAsset.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ interface Props extends Omit<ImgConfigOptions, 'src' | 'alt'> {
const { file, alt, class: className, ...attributes } = Astro.props;
const images = import.meta.glob('../assets/img/*.*');
console.log('---------------- IMAGES', images);
---

<!-- <Img src={`/src/assets/img/${file}`} alt={alt || ''} /> -->
<Image
src={images[`../assets/img/${file}`]() as any}
alt={alt || ''}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,6 @@ import '../styles/pages/index.scss';
</div>
</div>
</div>
<!-- <script is:inline src="/js/Vendors.js"></script>
<script is:inline src="/js/app/main.js"></script> -->
<!-- <script is:inline src="/js/Vendors.js"></script> -->
<script is:inline src="/src/app/main.js"></script>
</DefaultLayout>
24 changes: 13 additions & 11 deletions src/styles/app/main.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
//utilities
@import "utils/reset.scss";
@import "utils/colors.scss";
@import "utils/mixins.scss";
@import "utils/fonts.scss";
@import "utils/breakpoints.scss";
@import 'utils/reset.scss';
@import 'utils/colors.scss';
@import 'utils/mixins.scss';
@import 'utils/fonts.scss';
@import 'utils/breakpoints.scss';

@import "utils/bs-overrides.scss";
@import 'utils/bs-overrides.scss';

@import "utils/bootstrap/bootstrap.scss";
@import 'utils/bootstrap/bootstrap.scss';

//global styles
@import "globals/globals.scss";
@import "globals/typography.scss";
@import 'globals/globals.scss';
@import 'globals/typography.scss';

@import "components/__all.scss";
@import "pages/__all.scss";
@import 'components/__all.scss';
@import 'pages/__all.scss';

@import '../vendors';
Loading

0 comments on commit c5f0e15

Please sign in to comment.