mirror of
https://github.com/typemill/typemill.git
synced 2025-07-25 00:02:28 +02:00
fixed bug with direct published images in meta, favicons, wrong cropping with black border
This commit is contained in:
2
cache/timer.yaml
vendored
2
cache/timer.yaml
vendored
@@ -1 +1 @@
|
||||
licenseupdate: 1744847559
|
||||
licenseupdate: 1745325860
|
||||
|
@@ -2,6 +2,7 @@ meta:
|
||||
navtitle: 'create your first page'
|
||||
title: 'Create Your First Page'
|
||||
description: "To create a new page in Typemill, follow these simple steps: \nUse the interactive navigation located on the left side of the screen. \nEnter a page title for"
|
||||
heroimage: ''
|
||||
owner: trendschau
|
||||
author: 'Sebastian Schürmanns'
|
||||
modified: '2024-04-27'
|
||||
|
@@ -2,6 +2,7 @@ meta:
|
||||
navtitle: 'getting started'
|
||||
title: 'Getting Started with Typemill'
|
||||
description: 'Use this demo-content to familiarize yourself with Typemill. Not sure where to start?'
|
||||
heroimage: media/live/web-optimized-1200x800-97kb.jpg
|
||||
owner: trendschau
|
||||
author: 'Sebastian Schürmanns'
|
||||
modified: '2024-05-17'
|
||||
@@ -10,4 +11,4 @@ meta:
|
||||
hide: false
|
||||
noindex: false
|
||||
contains: pages
|
||||
template: ''
|
||||
template: ''
|
||||
|
@@ -5,5 +5,4 @@ Typemill is a lightweight, flat-file CMS designed for simple, fast, and flexible
|
||||
Stay in the loop and subscribe to the [Typemill newsletter](https://typemill.net/news)!
|
||||
|
||||
{.center loading="lazy" width="820" height="470"}
|
||||
*Just a dummy image*
|
||||
|
||||
|
@@ -2,10 +2,11 @@ meta:
|
||||
navtitle: Home
|
||||
title: Typemill
|
||||
description: 'The open-source flat-file cms for text-driven websites. Create handbooks, documentations, manuals, web-novels, traditional websites, and more.'
|
||||
heroimage: ''
|
||||
owner: typemill
|
||||
author: typemill
|
||||
modified: '2024-04-25'
|
||||
modified: '2025-04-22'
|
||||
created: '2024-03-19'
|
||||
time: 17-56-00
|
||||
hide: false
|
||||
noindex: false
|
||||
noindex: false
|
||||
|
@@ -191,7 +191,7 @@ class ControllerApiImage extends Controller
|
||||
{
|
||||
$response->getBody()->write(json_encode([
|
||||
'message' => Translations::translate('Image saved successfully'),
|
||||
'name' => 'media/live/' . $media->getFullName(),
|
||||
'path' => 'media/live/' . $media->getFullName(),
|
||||
]));
|
||||
|
||||
return $response->withHeader('Content-Type', 'application/json');
|
||||
@@ -239,7 +239,7 @@ class ControllerApiImage extends Controller
|
||||
{
|
||||
$response->getBody()->write(json_encode([
|
||||
'message' => Translations::translate('Image saved successfully'),
|
||||
'name' => 'media/tmp/' . $media->getFullName(),
|
||||
'path' => 'media/tmp/' . $media->getFullName(),
|
||||
]));
|
||||
|
||||
return $response->withHeader('Content-Type', 'application/json');
|
||||
|
@@ -459,12 +459,12 @@ class Media
|
||||
{
|
||||
# resize
|
||||
$ratio = max(
|
||||
$desired['width']/$original['width'],
|
||||
$desired['height']/$original['height']
|
||||
$desired['width'] / $original['width'],
|
||||
$desired['height'] / $original['height']
|
||||
);
|
||||
|
||||
# prevent upscaling
|
||||
$ratio = ($ratio > 1) ? 1 : $ratio;
|
||||
# $ratio = ($ratio > 1) ? 1 : $ratio;
|
||||
|
||||
$w = $desired['width'] / $ratio;
|
||||
$h = $desired['height'] / $ratio;
|
||||
|
@@ -1958,7 +1958,7 @@ bloxeditor.component('image-component', {
|
||||
self.saveimage = true;
|
||||
|
||||
self.imgmeta = true;
|
||||
self.imgfile = response.data.name;
|
||||
self.imgfile = response.data.path;
|
||||
|
||||
if(self.imgwidth > 820)
|
||||
{
|
||||
|
@@ -969,19 +969,19 @@ app.component('component-image', {
|
||||
tmaxios.post('/api/v1/image',{
|
||||
'image': e.target.result,
|
||||
'name': imageFile.name,
|
||||
'publish': true,
|
||||
'publish': false,
|
||||
'keepformat': keepformat
|
||||
})
|
||||
.then(function (response) {
|
||||
sharedself.update(response.data.name);
|
||||
})
|
||||
sharedself.update(response.data.path);
|
||||
})
|
||||
.catch(function (error)
|
||||
{
|
||||
sharedself.load = false;
|
||||
if(error.response)
|
||||
{
|
||||
console.info(error.response);
|
||||
/* publishController.errors.message = error.response.data.errors; */
|
||||
console.info(error.response);
|
||||
/* publishController.errors.message = error.response.data.errors; */
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user