Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
upgrade js codebase (#232)
Browse files Browse the repository at this point in the history

Signed-off-by: Christopher Guindon <chris.guindon@eclipse-foundation.org>
  • Loading branch information
chrisguindon committed Jul 12, 2021
1 parent b5e4782 commit a9859f1
Show file tree
Hide file tree
Showing 10 changed files with 1,546 additions and 4,084 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -3,7 +3,7 @@
!/static/js/
/static/images/vendor/
!/static/images/fake_logo/
/static/js/solstice.js
/static/js/solstice.js*
/exampleSite/public
/exampleSite/layouts/robots.txt
/public
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/featured_footer.html
@@ -1,5 +1,5 @@
{{ if ne .Page.Params.show_featured_footer false }}
<div class="featured-footer" id="featured-footer" data-publish-target="{{ .Page.Params.featured_content_publish_target | default .Site.Params.featured_content_publish_target | default "eclipse_org"}}">
<div class="eclipsefdn-featured-footer featured-footer" id="featured-footer" data-publish-target="{{ .Page.Params.featured_content_publish_target | default .Site.Params.featured_content_publish_target | default "eclipse_org"}}">
<div class="container">
<div class="row">
<div class="col-sm-24 featured-container">
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/featured_story.html
@@ -1,5 +1,5 @@
{{ if eq .Page.Params.show_featured_story true }}
<div class="featured-story" id="featured-story" data-publish-target="{{ .Page.Params.featured_content_publish_target | default .Site.Params.featured_content_publish_target | default "eclipse_org"}}">
<div class="eclipsefdn-featured-story featured-story" id="featured-story" data-publish-target="{{ .Page.Params.featured_content_publish_target | default .Site.Params.featured_content_publish_target | default "eclipse_org"}}">
<div class="container">
<div class="row">
<div class="col-sm-12 col-sm-offset-2 col-md-16 col-md-offset-0 featured-story-block featured-story-block-content match-height-item-by-row featured-container">
Expand Down
12 changes: 0 additions & 12 deletions layouts/partials/footer_js.html
Expand Up @@ -7,8 +7,6 @@
{{- with .Site.Params.hugo_js }}
<script src="{{ . | relURL }}"></script>
{{ end }}
{{ else }}
<script src="{{ "/js/solstice.hugo.js" | relURL }}"></script>
{{ end }}

<!-- Read in mustache templates registered in page scratch -->
Expand All @@ -31,15 +29,5 @@
type: "newsItems"
});
{{ end }}
{{ if ne .Page.Params.show_featured_story false }}
$("{{ .Site.Params.featured_footer_selector | default "#featured-story" }}").eclipseFdnApi({
type: "featuredStory"
});
{{ end }}
{{ if ne .Page.Params.show_featured_footer false }}
$("{{ .Site.Params.featured_footer_selector | default "#featured-footer" }}").eclipseFdnApi({
type: "featuredFooter"
});
{{ end }}
})(jQuery, document);
</script>
7 changes: 3 additions & 4 deletions layouts/shortcodes/eclipsefdn_adopters.html
@@ -1,20 +1,19 @@
<!--
<!--
Copyright (c) 2019 Eclipse Foundation, Inc.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0.
Contributors:
Christopher Guindon <chris.guindon@eclipse-foundation.org>
SPDX-License-Identifier: EPL-2.0
-->
-->
{{ $container_id := .Get "container_id" | default "" }}
{{ $class := .Get "class" | default "eclipsefdn-adopters" }}
{{ $working_group := .Get "working_group" | default "" }}
{{ $ul_classes := .Get "ul_classes" | default "text-center list-inline" }}

<div id="{{ $container_id }}" class="{{ $class }}"></div>
<script src="{{ "js/eclipsefdn.adopters.js" | relURL}}"></script>
<script>
eclipseFdnAdopters.getWGList({src_root: "https://api.eclipse.org/adopters", working_group: "{{ $working_group }}", ul_classes: "{{ $ul_classes }}"})
</script>
5,568 changes: 1,527 additions & 4,041 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -24,7 +24,7 @@
"readmeFilename": "README.md",
"dependencies": {
"axios": "^0.21.1",
"eclipsefdn-solstice-assets": "0.0.156",
"eclipsefdn-solstice-assets": "0.0.160",
"json2yaml": "^1.1.0",
"parse-link-header": "^1.0.1",
"toml": "^3.0.0"
Expand Down
1 change: 0 additions & 1 deletion static/js/eclipsefdn.adopters.js

This file was deleted.

1 change: 0 additions & 1 deletion static/js/solstice.hugo.js

This file was deleted.

33 changes: 12 additions & 21 deletions webpack.mix.js
@@ -1,30 +1,21 @@
let mix = require('laravel-mix');

require('laravel-mix-transpile-node-modules')
mix.transpileNodeModules(['eclipsefdn-solstice-assets']);

mix.options({uglify: {uglifyOptions: {compress: false, output: {comments: true}}}});

mix.setPublicPath('static');
mix.setResourceRoot('../');

mix.less('./node_modules/eclipsefdn-solstice-assets/less/quicksilver/styles.less', 'static/css/styles.css');

mix.babel([
'./node_modules/eclipsefdn-solstice-assets/js/eclipsefdn.adopters.js'
], './static/js/eclipsefdn.adopters.js');

mix.scripts([
'./node_modules/jquery/dist/jquery.min.js',
'./node_modules/bootstrap/dist/js/bootstrap.min.js',
'./node_modules/cookieconsent/src/cookieconsent.js',
'./node_modules/eclipsefdn-solstice-assets/js/solstice.cookieconsent.js',
'./node_modules/eclipsefdn-solstice-assets/js/eclipsefdn.videos.js',
'./node_modules/jquery-match-height/dist/jquery.matchHeight-min.js',
'./node_modules/jquery-eclipsefdn-api/dist/jquery.eclipsefdn-api.min.js',
'./node_modules/feather-icons/dist/feather.min.js',
'./node_modules/owl.carousel/dist/owl.carousel.min.js',
'./node_modules/eclipsefdn-solstice-assets/js/solstice.cookies.js',
'./node_modules/eclipsefdn-solstice-assets/js/solstice.js',
'./node_modules/eclipsefdn-solstice-assets/js/solstice.eventsmodal.js'
], './static/js/solstice.js');
mix.webpackConfig({
resolve: {
alias: {
jquery: 'jquery/src/jquery',
},
},
});

mix.scripts([
'./node_modules/eclipsefdn-solstice-assets/js/solstice.tables.js'
], './static/js/solstice.hugo.js');
mix.js(['./node_modules/eclipsefdn-solstice-assets/js/main.js'], './static/js/solstice.js');

0 comments on commit a9859f1

Please sign in to comment.