diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index 2121170bd97c..0bd3928a2b8c 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -8,11 +8,10 @@ on: jobs: build: - if: false runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4.2.2 with: ref: rewrite/main @@ -25,17 +24,24 @@ jobs: - name: Install Node.js packages run: npm install - - name: Build site - run: npm run build + - name: Build stylesheets using Tailwind CSS + run: npm run-script tailwindcss -- --minify + + - name: Build React components using Webpack + run: npm run-script webpack -- --mode=production + + - name: Build site using Jekyll + env: + JEKYLL_ENV: production + run: npm run-script jekyll:build -- --baseurl ${{ github.event.repository.name }} - name: Upload artifact id: deployment - uses: actions/upload-pages-artifact@3 + uses: actions/upload-pages-artifact@v3.0.1 with: path: dist/ deploy: - if: false runs-on: ubuntu-latest needs: build @@ -50,4 +56,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@4 + uses: actions/deploy-pages@v4.0.5 diff --git a/.vscode/settings.json b/.vscode/settings.json index f7af08199c46..972819d29020 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { "files.associations": { - "**/content/**/*.html": "liquid" + "**/content/**/*.{html,js}": "liquid", } -} \ No newline at end of file +} diff --git a/content/site.js b/content/site.js index 80834078b0fb..9a6a2fe57d21 100644 --- a/content/site.js +++ b/content/site.js @@ -1,5 +1,25 @@ --- --- +{%- assign values = site.data.site-constants -%} + +{%- capture constants -%} +{ + "logo": "{{ values.logo | relative_url }}", + "baseUrl": "{{ site.baseurl }}", + "topNav": [ + { "title": "Home", "href": "{{ site.baseurl }}", "key": 0 }, + { "title": "Blogs and instructions", "href": "{{ '/publications' | relative_url }}", "key": 1 }, + { "title": "Status", "href": "{{ '/status' | relative_url }}", "key": 2 }, + { "title": "Events", "href": "{{ '/events' | relative_url }}", "key": 3 }, + { "title": "Search", "href": "{{ '/search' | relative_url }}", "key": 4 } + ], + "cardNav": [ + { "title": "How to get access", "href": "{{ '/access' | relative_url }}", "key": 5 }, + { "title": "Blogs and instructions", "href": "{{ '/publications' | relative_url }}", "key": 6 }, + { "title": "About FiQCI", "href": "{{ '/about' | relative_url }}", "key": 7 } + ] +} +{%- endcapture -%} {%- capture publications -%} [ @@ -37,7 +57,7 @@ "key": "{{ forloop.index }}", "type": "Event", "title": "{{ event_post.title }}", - "url": "{{ event_post.link }}", + "url": "{{ event_post.link | relative_url }}", "date": "{{ event_post.date | date: '%-d.%-m.%Y' }}", "content": {{ event_post.content | strip_html | strip_newlines | jsonify }}, "filters": { @@ -60,6 +80,7 @@ {%- endcapture -%} const SITE = { + constants: JSON.parse(String.raw`{{- constants -}}`), publications: JSON.parse(String.raw`{{- publications -}}`), events: JSON.parse(String.raw`{{- events -}}`), } diff --git a/src/components/Home.jsx b/src/components/Home.jsx index 6eef2c89c1f6..ad647dd753de 100644 --- a/src/components/Home.jsx +++ b/src/components/Home.jsx @@ -10,8 +10,8 @@ const style = { "--_c-icon-color": "white" }; -const ContentButton = ({ text, href, icon=mdiArrowDown }) => { - const isActive = window.location.pathname === href; +const ContentButton = props => { + const isActive = window.location.pathname === props.href; var styleClass = "text-white text-md py-3" if (isActive) { @@ -23,16 +23,25 @@ const ContentButton = ({ text, href, icon=mdiArrowDown }) => { className='w-min ml-0 mt-[10px] md:ml-0 mr-[20px] sm:ml-0 bg-[#0D2B53] hover:bg-blue-600' no-radius style={style} - - onClick={() => (window.location.href = href)} + onClick={() => (window.location.href = props.href)} > -
{text}
-{props.title}
+Open call for pilot access to Helmi quantum computer now open!
- How to access Helmi, instructions{text}
-{props.title}
+{text}
+{props.title}