Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy PR previews

on: pull_request

concurrency: preview-${{ github.ref }}

jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set up php 8.3
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
- name: Set up PHP dependencie
run: composer i
- name: Change config.php
run: |
sed -i "s|libresign.coop|libresign.github.io|g" CNAME
sed -i "s|baseUrl' => '/'|baseUrl' => '/site-preview/pr-preview/pr-${{ github.event.pull_request.number }}/'|g" config.php
cat config.php|grep baseUrl
sed -i "/'matomo_container'/d" config.production.php
- name: Run composer command
run: composer prod

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./build_production/
pages-base-url: libresign.github.io/site-preview
deploy-repository: LibreSign/site-preview
preview-branch: main
token: ${{ secrets.PREVIEW_TOKEN }}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tightenco/jigsaw": "^1.7",
"gregwar/captcha": "^1.2",
"libresign/espeak": "dev-main",
"elaborate-code/jigsaw-localization": "dev-fix/use-package-default-locale",
"elaborate-code/jigsaw-localization": "dev-main",
"nesbot/carbon": "^3.3",
"samdark/sitemap": "^2.4"
},
Expand Down
39 changes: 23 additions & 16 deletions composer.lock

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

6 changes: 3 additions & 3 deletions source/_assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ require('aos/dist/aos.css');

// === logo change
if (ud_header.classList.contains("sticky")) {
logo.src = "/assets/images/logo/logo-2.svg";
logo.src = window.baseUrl + "/assets/images/logo/logo-2.svg";
} else {
logo.src = "/assets/images/logo/logo.svg";
logo.src = window.baseUrl + "/assets/images/logo/logo.svg";
}

// show or hide the back-top-top button
Expand Down Expand Up @@ -90,4 +90,4 @@ require('aos/dist/aos.css');
document.querySelector(".back-to-top").onclick = () => {
scrollTo(document.documentElement);
};
})();
})();
9 changes: 6 additions & 3 deletions source/_layouts/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="row">
<div class="col-xl-3 col-lg-4 col-md-6">
<div class="ud-widget">
<a href="{{ locale_path($page, $page->baseUrl) }}#home" class="ud-footer-logo">
<a href="{{ $page->baseUrl . locale_path($page, 'contact-us') }}#home" class="ud-footer-logo">
<img src="{{ $page->baseUrl }}assets/images/logo/logo.svg" alt="logo" />
</a>
<p class="ud-widget-desc">
Expand Down Expand Up @@ -89,7 +89,7 @@
<div class="col-md-8">
<ul class="ud-footer-bottom-left">
<li>
<a href="{{ locale_path($page, $page->baseUrl) }}privacy-policy">{{ $page->t("Privacy policy")}}</a>
<a href="{{ $page->baseUrl . locale_path($page, 'contact-us') }}privacy-policy">{{ $page->t("Privacy policy")}}</a>
</li>
</ul>
</div>
Expand Down Expand Up @@ -120,7 +120,10 @@
</script>

<!-- ====== All Javascript Files ====== -->
<script defer src="{{ mix('js/main.js', 'assets/build') }}"></script>
<script>
window.baseUrl = "{{ $page->baseUrl === '/' ? '' : $page->baseUrl }}";
</script>
<script defer src="{{ $page->baseUrl . mix('js/main.js', 'assets/build') }}"></script>
<script>
document.getElementById('back-to-top').onclick = function(e) {
e.preventDefault()
Expand Down
18 changes: 9 additions & 9 deletions source/_layouts/header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="row">
<div class="col-lg-12">
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="{{ locale_path($page, $page->baseUrl) }}">
<a class="navbar-brand" href="{{ $page->baseUrl . locale_path($page, '') }}">
<img src="{{ $page->baseUrl }}assets/images/logo/logo.svg" alt="Logo" />
</a>
<button class="navbar-toggler" title="{{$page->t("Toggle navigation menu")}}">
Expand All @@ -15,32 +15,32 @@
<div class="navbar-collapse">
<ul id="nav" class="navbar-nav mx-auto">
<li class="nav-item">
<a class="ud-menu-scroll" href="{{ locale_path($page, $page->baseUrl) }}#home">{{$page->t("Home")}}</a>
<a class="ud-menu-scroll" href="{{ rtrim($page->baseUrl, '/') . locale_path($page, '') }}#home">{{$page->t("Home")}}</a>
</li>
<li class="nav-item">
<a class="ud-menu-scroll" href="{{ locale_path($page, $page->baseUrl) }}#features">{{$page->t("Features")}}</a>
<a class="ud-menu-scroll" href="{{ rtrim($page->baseUrl, '/') . locale_path($page, '') }}#features">{{$page->t("Features")}}</a>
</li>
<li class="nav-item">
<a class="ud-menu-scroll" href="{{ locale_path($page, $page->baseUrl) }}#about">{{ $page->t("About") }}</a>
<a class="ud-menu-scroll" href="{{ rtrim($page->baseUrl, '/') . locale_path($page, '') }}#about">{{ $page->t("About") }}</a>
</li>
<li class="nav-item">
<a class="ud-menu-scroll" href="{{ locale_path($page, $page->baseUrl) }}pricing">{{ $page->t('Pricing')}}</a>
<a class="ud-menu-scroll" href="{{ rtrim($page->baseUrl, '/') . locale_path($page, 'pricing') }}">{{ $page->t('Pricing')}}</a>
</li>
<li class="nav-item">
<a class="ud-menu-scroll" href="{{ locale_path($page, $page->baseUrl) }}#target_audience">{{ $page->t("Target audience") }}</a>
<a class="ud-menu-scroll" href="{{ rtrim($page->baseUrl, '/') . locale_path($page, '') }}#target_audience">{{ $page->t("Target audience") }}</a>
</li>
<li class="nav-item">
<a class="ud-menu-scroll" href="{{ locale_path($page, $page->baseUrl) }}#contact">{{ $page->t("Contact") }}</a>
<a class="ud-menu-scroll" href="{{ rtrim($page->baseUrl, '/') . locale_path($page, '') }}#contact">{{ $page->t("Contact") }}</a>
</li>
<li class="nav-item">
<a class="ud-menu-scroll" href="{{ locale_path($page, $page->baseUrl) }}posts">{{ $page->t("Posts") }}</a>
<a class="ud-menu-scroll" href="{{ rtrim($page->baseUrl, '/') . locale_path($page, 'posts') }}">{{ $page->t("Posts") }}</a>
</li>
<li class="nav-item nav-item-has-children">
<a href="javascript:void(0)">{{ $page->t('Language') }}</a>
<ul class="ud-submenu">
@foreach($page->locales as $localeCode => $localeName)
<li class="ud-submenu-item">
<a class="ud-submenu-link" href="{{ translate_url($page, $localeCode) }}">{{ $localeName }}</a>
<a class="ud-submenu-link" href="/{{ translate_url($page, $localeCode) }}">{{ $localeName }}</a>
</li>
@endforeach
</ul>
Expand Down
2 changes: 1 addition & 1 deletion source/_layouts/main.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/>

<!-- ===== All CSS files ===== -->
<link rel="stylesheet" href="{{ mix('css/main.css', 'assets/build') }}">
<link rel="stylesheet" href="{{ $page->baseUrl . mix('css/main.css', 'assets/build') }}">
<link rel="stylesheet" href="{{ $page->baseUrl }}assets/build/css/ud-styles.css" />
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions source/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</p>
<ul class="ud-hero-buttons">
<li>
<a href="{{ locale_path($page, $page->baseUrl) }}contact-us" class="ud-main-btn ud-white-btn mt-1">
<a href="{{ $page->baseUrl . locale_path($page, 'contact-us') }}" class="ud-main-btn ud-white-btn mt-1">
{{ $page->t('Talk to sales') }}
</a>
</li>
Expand Down Expand Up @@ -192,7 +192,7 @@ class="shape shape-2"
<img src="{{ $page->baseUrl }}assets/images/mobile_libresign.png" alt="print_main_screen"/>
</div>
<div class="col-lg-12 d-flex justify-content-center mt-5">
<a href="{{ locale_path($page, $page->baseUrl) }}contact-us" class="ud-main-btn ud-border-btn">
<a href="{{ $page->baseUrl . locale_path($page, 'contact-us') }}contact-us" class="ud-main-btn ud-border-btn">
{{ $page->t('Talk to sales') }}
</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions source/pricing.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class="ud-single-pricing first-item{{ $content->isActive ? ' active' : ''}} wow
</div>
@endif
<div class="ud-pricing-footer">
<a href="{{ locale_path($page, $page->baseUrl) }}contact-us" class="ud-main-btn ud-border-btn">
<a href="{{ $page->baseUrl . locale_path($page, 'contact-us') }}contact-us" class="ud-main-btn ud-border-btn">
{{ $page->t('Under Consultation') }}
</a>
</div>
Expand Down Expand Up @@ -89,7 +89,7 @@ class="ud-single-pricing first-item{{ $content->isActive ? ' active' : ''}} wow
</div>

<div class="ud-pricing-footer text-center mt-5">
<a href="{{ locale_path($page, $page->baseUrl) }}contact-us" class="ud-main-btn ud-white-btn mt-1">
<a href="{{ $page->baseUrl . locale_path($page, 'contact-us') }}contact-us" class="ud-main-btn ud-white-btn mt-1">
{{ $page->t('Under Consultation') }}
</a>
</div>
Expand Down Expand Up @@ -127,7 +127,7 @@ class="ud-single-pricing first-item{{ $content->isActive ? ' active' : ''}} wow
</div>
</div>
<div class="ud-pricing-footer text-center mt-5">
<a href="{{ locale_path($page, $page->baseUrl) }}contact-us" class="ud-main-btn ud-white-btn mt-1">
<a href="{{ $page->baseUrl . locale_path($page, 'contact-us') }}contact-us" class="ud-main-btn ud-white-btn mt-1">
{{ $page->t('Under Consultation') }}
</a>
</div>
Expand Down