Compare commits
6 Commits
2a22a3e027
...
db9e1cd469
| Author | SHA1 | Date | |
|---|---|---|---|
| db9e1cd469 | |||
| b1726bba34 | |||
| 4ed6c18825 | |||
| 5ac8736004 | |||
| 36f3ab3bd1 | |||
| 4a1777d160 |
@@ -33,7 +33,8 @@ RUN docker-php-ext-install \
|
||||
xml \
|
||||
intl \
|
||||
pdo_mysql \
|
||||
pdo_pgsql
|
||||
pdo_pgsql \
|
||||
pdo_sqlite
|
||||
|
||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
|
||||
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
|
||||
@@ -65,6 +66,7 @@ RUN echo "/var/log/sermon-notes.log {
|
||||
}" > /etc/logrotate.d/sermon-notes
|
||||
|
||||
RUN COMPOSER_ALLOW_SUPERUSER=1 composer install --no-scripts --no-dev --optimize-autoloader
|
||||
RUN /usr/local/bin/php bin/console asset-map:compile
|
||||
RUN mkdir /data
|
||||
|
||||
RUN mkdir /var/www/html/var/cache
|
||||
@@ -75,5 +77,6 @@ RUN find /var/www/html -type d -exec chmod 755 '{}' \;
|
||||
RUN find /var/www/html -type f -exec chmod 644 '{}' \;
|
||||
RUN chmod 755 /data
|
||||
RUN chmod 644 /data/*
|
||||
RUN a2enmod rewrite setenvif headers
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
print "Updating packages and compiling assets".PHP_EOL;
|
||||
`COMPOSE_ALLOW_SUPERUSER=1 composer update`;
|
||||
`symfony console asset-map:compile`;
|
||||
//`symfony console asset-map:compile`;
|
||||
|
||||
print "Creating database schema".PHP_EOL;
|
||||
`symfony console doctrine:database:create`;
|
||||
|
||||
9
public/.htaccess
Normal file
9
public/.htaccess
Normal file
@@ -0,0 +1,9 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
Options -MultiViews
|
||||
RewriteEngine On
|
||||
|
||||
SetEnvIf X-Forwarded-Proto "https" HTTPS=on
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^(.*)$ index.php [QSA,L]
|
||||
</IfModule>
|
||||
BIN
public/images/Notes-icon-192x192.png
Normal file
BIN
public/images/Notes-icon-192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
BIN
public/images/Notes-icon-512x512.png
Normal file
BIN
public/images/Notes-icon-512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 255 KiB |
35
public/manifest.json
Normal file
35
public/manifest.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "Sermon Notes",
|
||||
"short_name": "Sermon Notes",
|
||||
"description": "A personal note-taking app for sermons with reference material",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"orientation": "landscape",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#000000",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/images/Notes-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/images/Notes-icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"screenshots": [
|
||||
{
|
||||
"src": "/images/Notes-icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/images/Notes-icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"form_factor": "wide"
|
||||
}
|
||||
]
|
||||
}
|
||||
56
public/sw.js
Normal file
56
public/sw.js
Normal file
@@ -0,0 +1,56 @@
|
||||
// public/sw.js
|
||||
const CACHE_NAME = 'app-cache-v1';
|
||||
const ASSETS_TO_CACHE = [
|
||||
'/',
|
||||
'/manifest.json',
|
||||
// Add paths to your main CSS and JS files here
|
||||
// e.g., '/build/app.css', '/build/app.js'
|
||||
];
|
||||
|
||||
// Install Event: Cache core static assets
|
||||
self.addEventListener('install', event => {
|
||||
event.waitUntil(
|
||||
caches.open(CACHE_NAME)
|
||||
.then(cache => {
|
||||
return cache.addAll(ASSETS_TO_CACHE);
|
||||
})
|
||||
);
|
||||
self.skipWaiting();
|
||||
});
|
||||
|
||||
// Activate Event: Clean up old caches if you change the CACHE_NAME version
|
||||
self.addEventListener('activate', event => {
|
||||
event.waitUntil(
|
||||
caches.keys().then(cacheNames => {
|
||||
return Promise.all(
|
||||
cacheNames.map(cache => {
|
||||
if (cache !== CACHE_NAME) {
|
||||
return caches.delete(cache);
|
||||
}
|
||||
})
|
||||
);
|
||||
})
|
||||
);
|
||||
self.clients.claim();
|
||||
});
|
||||
|
||||
// Fetch Event: Network First, Fallback to Cache
|
||||
self.addEventListener('fetch', event => {
|
||||
// Only cache GET requests
|
||||
if (event.request.method !== 'GET') return;
|
||||
|
||||
event.respondWith(
|
||||
fetch(event.request)
|
||||
.then(networkResponse => {
|
||||
// If the network request succeeds, clone it and put it in the cache
|
||||
return caches.open(CACHE_NAME).then(cache => {
|
||||
cache.put(event.request, networkResponse.clone());
|
||||
return networkResponse;
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
// If the network fails (offline), try to serve from cache
|
||||
return caches.match(event.request);
|
||||
})
|
||||
);
|
||||
});
|
||||
@@ -133,6 +133,7 @@ class DefaultController extends AbstractController
|
||||
if (isset($classes[$step])) {
|
||||
$class = explode("\\", $classes[$step]);
|
||||
$className = end($class);
|
||||
|
||||
$func = "transfer{$className}Table";
|
||||
|
||||
if (method_exists($service, $func)) {
|
||||
@@ -145,10 +146,10 @@ class DefaultController extends AbstractController
|
||||
}
|
||||
|
||||
$progress = round((($step+1) / $totalClasses) * 100);
|
||||
$nextStep = ($step + 1 < $totalClasses) ? ($step + 1) : 'summary';
|
||||
$nextStep = (($step + 1) < $totalClasses) ? ($step + 1) : 'summary';
|
||||
|
||||
return $this->render('default/transfer_progress.html.twig', [
|
||||
'current' => $className,
|
||||
'current' => (isset($classes[$step+1]) ? end(explode("\\", $classes[$step+1])) : 'summary'),
|
||||
'progress' => $progress,
|
||||
'next_step' => $nextStep,
|
||||
]);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||
<link rel='manifest' href='{{ asset('manifest.json') }}'>
|
||||
|
||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||
{% block stylesheets %}{% endblock %}
|
||||
@@ -15,5 +16,19 @@
|
||||
<body class='is-preload' onload='{% if onLoad is defined %}{{ onLoad }}{% endif %}'>
|
||||
{% block body %}{% endblock %}
|
||||
{% block javascripts %}{% endblock %}
|
||||
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/sw.js')
|
||||
.then(registration => {
|
||||
console.log('ServiceWorker registration successful with scope: ', registration.scope);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log('ServiceWorker registration failed: ', error);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -181,7 +181,7 @@ let saveFailureCount = {{ meta.saveFailureCount }};
|
||||
<!-- The modal body -->
|
||||
<form id="emailForm" class="modal-body">
|
||||
<label for="shareEmail">Enter Friends Email:</label>
|
||||
<input type="email" id="shareEmail" name="email" required />
|
||||
<input type="email" id="shareEmail" name="email" autocomplete=false required />
|
||||
<button type='button' id="submit" class="btn btn-primary" onclick='shareNote()'>Submit</button>
|
||||
</form>
|
||||
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<link href="{{ asset('css/main.css') }}" rel="stylesheet" />
|
||||
<link href='{{ asset('css/jquery-ui.theme.css') }}' rel='stylesheet' />
|
||||
<link href='{{ asset('css/jquery-ui.structure.css') }}' rel='stylesheet' />
|
||||
<link href='{{ asset('styles/style.css') }}' rel='stylesheet' />
|
||||
<link href='//cdn.datatables.net/2.0.8/css/dataTables.dataTables.min.css' rel='stylesheet' />
|
||||
<style>
|
||||
button.button i {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.input-error {
|
||||
border: solid 2px red !important;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
<script src="{{ asset('js/jquery.min.js') }}"></script>
|
||||
<script src='{{ asset('js/jquery-ui.js') }}'></script>
|
||||
<script src="{{ asset('js/browser.min.js') }}"></script>
|
||||
<script src="{{ asset('js/breakpoints.min.js') }}"></script>
|
||||
<script src="{{ asset('js/util.js') }}"></script>
|
||||
<script src="{{ asset('js/main.js') }}"></script>
|
||||
<script src='//momentjs.com/downloads/moment-with-locales.js'></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.2/markdown-it.min.js" integrity="sha512-ohlWmsCxOu0bph1om5eDL0jm/83eH09fvqLDhiEdiqfDeJbEvz4FSbeY0gLJSVJwQAp0laRhTXbUQG+ZUuifUQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src='//cdn.datatables.net/2.0.8/js/dataTables.min.js'></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mt-5 text-center">
|
||||
<h2 class="text-success">Database Transfer Complete!</h2>
|
||||
|
||||
Reference in New Issue
Block a user