Update currency and gold rates API responses, enhance views, and improve branding

- Updated API responses for currency and gold rates to include the latest data and improved metadata, ensuring accurate and informative responses.
- Added a new view for displaying currency rates, enhancing the user interface with dynamic data presentation.
- Updated the welcome view to integrate the new currency display and improved layout for better user experience.
- Changed the logo in the Scribe configuration to a new light SVG for better visual consistency.
- Enhanced styling in the welcome view and currency display for a modern look and feel.

These changes collectively improve the functionality, usability, and branding of the Truncgil Finance application.
This commit is contained in:
Ümit Tunç
2025-01-21 18:05:33 +03:00
parent c478be2f3f
commit e2684ef05a
7 changed files with 232 additions and 36 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -183,7 +183,7 @@ INTRO
// For example, if your logo is in public/img: // For example, if your logo is in public/img:
// - 'logo' => '../img/logo.png' // for `static` type (output folder is public/docs) // - 'logo' => '../img/logo.png' // for `static` type (output folder is public/docs)
// - 'logo' => 'img/logo.png' // for `laravel` type // - 'logo' => 'img/logo.png' // for `laravel` type
'logo' => 'img/icons/icon-128x128.png', 'logo' => 'img/logo-light.svg',
// Customize the "Last updated" value displayed in the docs by specifying tokens and formats. // Customize the "Last updated" value displayed in the docs by specifying tokens and formats.
// Examples: // Examples:
+30
View File
@@ -0,0 +1,30 @@
<div class="card">
<div class="title">
<p class="title-text">
{{$currencyName}}
</p>
<p class="percent" style="color: {{ $rate['Change'] > 0 ? 'green' : '#B9101E' }}">
{{ $rate['Change'] }}%
</p>
@if($rate['Change'] > 0)
<svg width="20" height="20" fill="green" style="position: relative; top: -2px;" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg" transform="rotate(180)"> <path d="M384 576q0-26 19-45t45-19h896q26 0 45 19t19 45-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45z"></path> </svg>
@else
<svg width="20" height="20" fill="#B9101E" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <path d="M384 576q0-26 19-45t45-19h896q26 0 45 19t19 45-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45z"></path> </svg>
@endif
</p>
</div>
<div class="data">
<p>
{{$rate['Selling']}}
</p>
<div class="range">
<div class="fill" style="background-color: {{ $rate['Change'] > 0 ? 'green' : '#B9101E' }};">
</div>
</div>
</div>
</div>
+27 -5
View File
@@ -1,26 +1,48 @@
<!-- See https://github.com/stoplightio/elements/blob/main/docs/getting-started/elements/elements-options.md for config --> <!-- See https://github.com/stoplightio/elements/blob/main/docs/getting-started/elements/elements-options.md for config -->
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en" class="dark">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Truncgil Finance</title> <title>Truncgil Finance</title>
<!-- Embed elements Elements via Web Component --> <!-- Embed elements Elements via Web Component -->
<script src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script> <script src="https://unpkg.com/@stoplight/elements@9.0.0/web-components.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css"> <link rel="stylesheet" href="https://unpkg.com/@stoplight/elements@9.0.0/styles.min.css">
<style> <style>
body { body {
height: 100vh; height: 100vh;
} }
elements-api {
--elements-border-radius: 6px;
}
.sl-inline img {
width: 400px;
margin: 0 auto;
display: block;
}
.sl-prose p {
font-size: var(--fs-paragraph);
margin-bottom: 1em;
margin-top: 1em;
}
.sl-text-base {
font-size: 16px;
}
</style> </style>
</head> </head>
<body> <body>
asdadas
<elements-api <elements-api
apiDescriptionUrl="{{ route("scribe.openapi") }}" apiDescriptionUrl="{{ route("scribe.openapi") }}"
router="hash" router="hash"
layout="responsive" layout="responsive"
appearance="auto"
hideTryIt="" hideTryIt=""
logo="img/icons/icon-128x128.png" logo="img/logo-light.svg"
/> />
<script> <script>
@@ -28,7 +50,7 @@ setTimeout(function() {
const linkElement = document.querySelector('a.sl-flex.sl-items-center.sl-px-4.sl-py-3.sl-border-t'); const linkElement = document.querySelector('a.sl-flex.sl-items-center.sl-px-4.sl-py-3.sl-border-t');
if (linkElement) { if (linkElement) {
linkElement.href = "https://truncgil.com"; // Yeni URL'yi buraya ekleyin linkElement.href = "https://truncgil.com"; // Yeni URL'yi buraya ekleyin
linkElement.innerHTML = '<img src="https://truncgil.com.tr/yatay.svg" alt="Açıklama">'; // Resim URL'sini ve alternatif metni buraya ekleyin // linkElement.innerHTML = '<img src="https://truncgil.com.tr/yatay.svg" alt="Truncgil Teknoloji">'; // Resim URL'sini ve alternatif metni buraya ekleyin
} }
}, 1000); // 1 saniye gecikme }, 1000); // 1 saniye gecikme
</script> </script>
+25 -4
View File
@@ -1,17 +1,37 @@
<!-- See https://github.com/stoplightio/elements/blob/main/docs/getting-started/elements/elements-options.md for config --> <!-- See https://github.com/stoplightio/elements/blob/main/docs/getting-started/elements/elements-options.md for config -->
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en" class="dark">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{!! $metadata['title'] !!}</title> <title>{!! $metadata['title'] !!}</title>
<!-- Embed elements Elements via Web Component --> <!-- Embed elements Elements via Web Component -->
<script src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script> <script src="https://unpkg.com/@stoplight/elements@9.0.0/web-components.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css"> <link rel="stylesheet" href="https://unpkg.com/@stoplight/elements@9.0.0/styles.min.css">
<style> <style>
body { body {
height: 100vh; height: 100vh;
} }
elements-api {
--elements-border-radius: 6px;
}
.sl-inline img {
width: 400px;
margin: 0 auto;
display: block;
}
.sl-prose p {
font-size: var(--fs-paragraph);
margin-bottom: 1em;
margin-top: 1em;
}
.sl-text-base {
font-size: 16px;
}
</style> </style>
</head> </head>
<body> <body>
@@ -23,6 +43,7 @@
apiDescriptionUrl="{!! $metadata['openapi_spec_url'] !!}" apiDescriptionUrl="{!! $metadata['openapi_spec_url'] !!}"
router="hash" router="hash"
layout="responsive" layout="responsive"
appearance="auto"
hideTryIt="{!! ($tryItOut['enabled'] ?? true) ? '' : 'true'!!}" hideTryIt="{!! ($tryItOut['enabled'] ?? true) ? '' : 'true'!!}"
@if(!empty($metadata['logo'])) @if(!empty($metadata['logo']))
logo="{!! $metadata['logo'] !!}" logo="{!! $metadata['logo'] !!}"
@@ -34,7 +55,7 @@ setTimeout(function() {
const linkElement = document.querySelector('a.sl-flex.sl-items-center.sl-px-4.sl-py-3.sl-border-t'); const linkElement = document.querySelector('a.sl-flex.sl-items-center.sl-px-4.sl-py-3.sl-border-t');
if (linkElement) { if (linkElement) {
linkElement.href = "https://truncgil.com"; // Yeni URL'yi buraya ekleyin linkElement.href = "https://truncgil.com"; // Yeni URL'yi buraya ekleyin
linkElement.innerHTML = '<img src="https://truncgil.com.tr/yatay.svg" alt="Truncgil Teknoloji">'; // Resim URL'sini ve alternatif metni buraya ekleyin // linkElement.innerHTML = '<img src="https://truncgil.com.tr/yatay.svg" alt="Truncgil Teknoloji">'; // Resim URL'sini ve alternatif metni buraya ekleyin
} }
}, 1000); // 1 saniye gecikme }, 1000); // 1 saniye gecikme
</script> </script>
File diff suppressed because one or more lines are too long