feat: ajuste ads
All checks were successful
Deploy ASP.NET MVC to OCI / build-and-deploy (push) Successful in 17m22s

This commit is contained in:
Ricardo Carneiro 2026-01-26 08:06:48 -03:00
parent 724e03176e
commit 665d36d81c
5 changed files with 96 additions and 45 deletions

View File

@ -1,32 +1,57 @@
using Microsoft.AspNetCore.Mvc;
using Convert_It_Online.Services;
using Microsoft.AspNetCore.Localization;
using Microsoft.Extensions.Localization;
using System.IO;
namespace Convert_It_Online.Areas.AudioTools.Controllers
{
[Area("AudioTools")]
[Route("{culture}/[area]/[controller]")]
[Route("[area]/[controller]")] // Adicionado para Share Target sem cultura fixa
[Route("[area]/[controller]")]
public class SpeechToTextController : Controller
{
private readonly IAudioTranscriptionService _transcriptionService;
private readonly ILogger<SpeechToTextController> _logger;
private readonly IStringLocalizer<SharedResource> _localizer;
public SpeechToTextController(IAudioTranscriptionService transcriptionService, ILogger<SpeechToTextController> logger)
public SpeechToTextController(IAudioTranscriptionService transcriptionService,
ILogger<SpeechToTextController> logger,
IStringLocalizer<SharedResource> localizer)
{
_transcriptionService = transcriptionService;
_logger = logger;
_localizer = localizer;
}
private void SetViewBag()
{
ViewBag.HomeLink = _localizer["HomeLink"];
ViewBag.TextMenuTitle = _localizer["TextMenuTitle"];
ViewBag.DocumentMenuTitle = _localizer["DocumentMenuTitle"];
ViewBag.ImageMenuTitle = _localizer["ImageMenuTitle"];
ViewBag.CaseConverterTitle = _localizer["CaseConverterTitle"];
ViewBag.PdfToTextTitle = _localizer["PdfToTextTitle"];
ViewBag.PdfBarcodeTitle = _localizer["PdfBarcodeTitle"];
ViewBag.JpgToWebpTitle = _localizer["JpgToWebpTitle"];
ViewBag.HeicToJpgTitle = _localizer["HeicToJpgTitle"];
ViewBag.FooterText = _localizer["FooterText"];
ViewBag.About = _localizer["About"];
ViewBag.Contact = _localizer["Contact"];
ViewBag.Terms = _localizer["Terms"];
}
[HttpGet]
public IActionResult Index()
{
SetViewBag();
return View();
}
[HttpPost]
public async Task<IActionResult> Transcribe(IFormFile audioFile)
{
SetViewBag();
if (audioFile == null || audioFile.Length == 0)
{
ViewBag.Error = "Por favor, selecione um arquivo de áudio.";

View File

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Localization;
namespace Convert_It_Online.Areas.AudioTools.Controllers
{
@ -6,9 +7,34 @@ namespace Convert_It_Online.Areas.AudioTools.Controllers
[Route("{culture}/[area]/[controller]")]
public class TextToSpeechController : Controller
{
private readonly IStringLocalizer<SharedResource> _localizer;
public TextToSpeechController(IStringLocalizer<SharedResource> localizer)
{
_localizer = localizer;
}
private void SetViewBag()
{
ViewBag.HomeLink = _localizer["HomeLink"];
ViewBag.TextMenuTitle = _localizer["TextMenuTitle"];
ViewBag.DocumentMenuTitle = _localizer["DocumentMenuTitle"];
ViewBag.ImageMenuTitle = _localizer["ImageMenuTitle"];
ViewBag.CaseConverterTitle = _localizer["CaseConverterTitle"];
ViewBag.PdfToTextTitle = _localizer["PdfToTextTitle"];
ViewBag.PdfBarcodeTitle = _localizer["PdfBarcodeTitle"];
ViewBag.JpgToWebpTitle = _localizer["JpgToWebpTitle"];
ViewBag.HeicToJpgTitle = _localizer["HeicToJpgTitle"];
ViewBag.FooterText = _localizer["FooterText"];
ViewBag.About = _localizer["About"];
ViewBag.Contact = _localizer["Contact"];
ViewBag.Terms = _localizer["Terms"];
}
[HttpGet]
public IActionResult Index()
{
SetViewBag();
return View();
}
}

BIN
ProducaoBanners.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

View File

@ -133,13 +133,13 @@
{
@if (adProvider == "House")
{
<a href="https://qrrapido.site" target="_blank" class="house-ad-top text-decoration-none d-none d-lg-block">
<div class="ad-content">
<a href="https://qrrapido.site" target="_blank" class="featured-top text-decoration-none d-none d-lg-block">
<div class="banner-content">
<div class="qr-animation">
<div class="qr-box"></div>
<div class="scan-line"></div>
</div>
<div class="ad-text">
<div class="banner-text">
<span class="badge bg-warning text-dark mb-1">NOVO</span>
<h5>Gerador de QR Code Ultrarrápido</h5>
<p>Crie QR Codes para WiFi, Links e Pix em 1 segundo. Grátis!</p>
@ -180,11 +180,11 @@
{
@if (adProvider == "House")
{
<a href="https://jobmaker.com.br" target="_blank" class="house-ad-side text-decoration-none">
<a href="https://jobmaker.com.br" target="_blank" class="featured-side text-decoration-none">
<div class="terminal-header">
<span class="dot red"></span><span class="dot yellow"></span><span class="dot green"></span>
</div>
<div class="ad-body">
<div class="banner-body">
<div class="code-typing">
<span class="comment">// Precisa integrar sistemas?</span><br>
<span class="keyword">await</span> JobMaker.<span class="method">Automate</span>(legacy_sys);<br>

View File

@ -314,8 +314,8 @@ h3.h4.mb-3.text-center {
text-decoration: underline !important;
}
/* ========== PLACEHOLDERS DE ANÚNCIO ========== */
.ad-placeholder {
/* ========== PLACEHOLDERS DE PROMOÇÃO ========== */
.promo-placeholder {
background-color: var(--light-color) !important;
border: 2px dashed var(--border-color);
border-radius: 1rem;
@ -329,17 +329,17 @@ h3.h4.mb-3.text-center {
font-weight: 500;
}
.ad-placeholder:hover {
.promo-placeholder:hover {
border-color: rgba(13, 110, 253, 0.3);
background-color: #e9ecef !important;
}
.ad-top {
.promo-top {
min-height: 90px;
margin-bottom: 2rem;
}
.ad-side {
.promo-side {
min-height: 600px;
position: sticky;
top: 2rem;
@ -432,10 +432,10 @@ h1, h2, h3, h4, h5, h6, p, div, span, a {
background: var(--text-muted);
}
/* ========== HOUSE ADS (BANNERS PRÓPRIOS) ========== */
/* ========== BANNERS PROMOCIONAIS ========== */
/* Banner Topo - QR Rápido */
.house-ad-top {
.featured-top {
display: block;
background: linear-gradient(135deg, #6610f2 0%, #d63384 100%);
border-radius: 1rem;
@ -449,13 +449,13 @@ h1, h2, h3, h4, h5, h6, p, div, span, a {
text-decoration: none !important;
}
.house-ad-top:hover {
.featured-top:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(102, 16, 242, 0.3);
color: white !important;
}
.house-ad-top .ad-content {
.featured-top .banner-content {
display: flex;
align-items: center;
justify-content: space-between;
@ -463,7 +463,7 @@ h1, h2, h3, h4, h5, h6, p, div, span, a {
position: relative;
}
.house-ad-top .qr-animation {
.featured-top .qr-animation {
width: 60px;
height: 60px;
background: rgba(255, 255, 255, 0.2);
@ -475,7 +475,7 @@ h1, h2, h3, h4, h5, h6, p, div, span, a {
margin-right: 1.5rem;
}
.house-ad-top .qr-box {
.featured-top .qr-box {
width: 40px;
height: 40px;
border: 3px solid white;
@ -483,7 +483,7 @@ h1, h2, h3, h4, h5, h6, p, div, span, a {
position: relative;
}
.house-ad-top .qr-box::after {
.featured-top .qr-box::after {
content: '';
position: absolute;
top: 50%;
@ -494,7 +494,7 @@ h1, h2, h3, h4, h5, h6, p, div, span, a {
background: white;
}
.house-ad-top .scan-line {
.featured-top .scan-line {
position: absolute;
width: 100%;
height: 2px;
@ -510,21 +510,21 @@ h1, h2, h3, h4, h5, h6, p, div, span, a {
100% { top: 90%; }
}
.house-ad-top .ad-text h5 {
.featured-top .banner-text h5 {
margin: 0;
font-weight: 700;
font-size: 1.25rem;
color: white !important;
}
.house-ad-top .ad-text p {
.featured-top .banner-text p {
margin: 0;
font-size: 0.9rem;
opacity: 0.9;
color: white !important;
}
.house-ad-top .cta-button {
.featured-top .cta-button {
background: white;
color: #6610f2;
padding: 0.5rem 1rem;
@ -537,7 +537,7 @@ h1, h2, h3, h4, h5, h6, p, div, span, a {
}
/* Banner Lateral - JobMaker */
.house-ad-side {
.featured-side {
display: block;
background-color: #0f172a; /* Slate 900 */
border-radius: 1rem;
@ -548,15 +548,15 @@ h1, h2, h3, h4, h5, h6, p, div, span, a {
top: 2rem;
text-decoration: none !important;
transition: border-color 0.3s ease;
min-height: auto; /* Remove min-height fixo se necessário */
min-height: auto;
}
.house-ad-side:hover {
.featured-side:hover {
border-color: #3b82f6;
color: #e2e8f0 !important;
}
.house-ad-side .terminal-header {
.featured-side .terminal-header {
background: #1e293b;
padding: 0.75rem 1rem;
display: flex;
@ -564,33 +564,33 @@ h1, h2, h3, h4, h5, h6, p, div, span, a {
border-bottom: 1px solid #334155;
}
.house-ad-side .dot {
.featured-side .dot {
width: 10px;
height: 10px;
border-radius: 50%;
}
.house-ad-side .dot.red { background: #ef4444; }
.house-ad-side .dot.yellow { background: #f59e0b; }
.house-ad-side .dot.green { background: #22c55e; }
.featured-side .dot.red { background: #ef4444; }
.featured-side .dot.yellow { background: #f59e0b; }
.featured-side .dot.green { background: #22c55e; }
.house-ad-side .ad-body {
.featured-side .banner-body {
padding: 1.5rem;
font-family: 'Consolas', 'Monaco', monospace;
}
.house-ad-side .code-typing {
.featured-side .code-typing {
font-size: 0.85rem;
line-height: 1.6;
margin-bottom: 1.5rem;
}
.house-ad-side .comment { color: #64748b; }
.house-ad-side .keyword { color: #c084fc; }
.house-ad-side .method { color: #60a5fa; }
.house-ad-side .success { color: #4ade80; display: block; margin-top: 0.5rem; font-weight: bold;}
.featured-side .comment { color: #64748b; }
.featured-side .keyword { color: #c084fc; }
.featured-side .method { color: #60a5fa; }
.featured-side .success { color: #4ade80; display: block; margin-top: 0.5rem; font-weight: bold;}
.house-ad-side h5 {
.featured-side h5 {
font-family: system-ui, -apple-system, sans-serif;
color: white !important;
font-weight: 700;
@ -598,23 +598,23 @@ h1, h2, h3, h4, h5, h6, p, div, span, a {
margin-bottom: 1rem;
}
.house-ad-side .text-muted {
.featured-side .text-muted {
color: #94a3b8 !important; /* Slate 400 */
}
.house-ad-side .btn-outline-primary {
.featured-side .btn-outline-primary {
border-color: #3b82f6;
color: #3b82f6;
}
.house-ad-side .btn-outline-primary:hover {
.featured-side .btn-outline-primary:hover {
background-color: #3b82f6;
color: white;
}
/* Responsividade para o House Ad Top */
/* Responsividade para o Banner Top */
@media (max-width: 992px) {
.house-ad-top {
.featured-top {
display: none;
}
}