Please bookmark this page to avoid losing your image tool!

Wikipedia Page Template Photo Program Creator

(Free & Supports Bulk Upload)

Drag & drop your images here or

The result will appear here...
You can edit the below JavaScript code to customize the image tool.
function processImage(originalImg, title = "Заголовок статьи", caption = "Описание изображения", text = "Материал из Википедии — свободной энциклопедии.\n\nЭта статья является заготовкой. Вы можете помочь проекту, расширив её текст и добавив полезные сведения.\n\nВикипедия — поддерживаемая сообществом онлайн-энциклопедия. Её может редактировать каждый. Этот шаблон страницы позволяет вам предпросматривать то, как фотографии будут выглядеть в формате стандартной информационной карточки статьи.") {
    // Create the main container mimicking Wikipedia layout
    const container = document.createElement('div');
    container.style.width = '100%';
    container.style.fontFamily = 'sans-serif';
    container.style.color = '#202122';
    container.style.backgroundColor = '#f6f6f6';
    container.style.lineHeight = '1.6';
    container.style.border = '1px solid #ccc';
    container.style.display = 'flex';
    container.style.boxSizing = 'border-box';
    container.style.textAlign = 'left';
    container.style.minHeight = '600px';
    container.style.overflow = 'hidden';

    // Left Sidebar Menu
    const leftPanel = document.createElement('div');
    leftPanel.style.width = '160px';
    leftPanel.style.flexShrink = '0';
    leftPanel.style.padding = '25px 15px';
    leftPanel.style.boxSizing = 'border-box';

    // Mock Wikipedia logo & links
    const logoHTML = `
        <div style="font-family: 'Times New Roman', Times, serif; text-align: center; margin-bottom: 25px;">
            <div style="font-size:36px; color:black; margin-bottom: 2px;">W</div>
            <div style="font-size:18px; color:black; letter-spacing: -1px; margin-bottom: 5px;">ВИКИПЕДИЯ</div>
            <div style="font-size:11px; color:#54595d;">Свободная энциклопедия</div>
        </div>
    `;
    const linksHTML = ['Заглавная страница', 'Содержание', 'Избранные статьи', 'Случайная статья', 'Текущие события', 'Пожертвовать']
        .map(linkText => `<div style="font-size: 13px; color: #0645ad; margin-bottom: 6px; cursor: pointer; text-decoration: none;">${linkText}</div>`)
        .join('');

    leftPanel.innerHTML = logoHTML + `
        <div style="margin-bottom: 15px; font-weight: bold; font-size: 12px; color: #54595d;">Участие</div>
        ${linksHTML}
    `;

    // Main Content Panel
    const mainPanel = document.createElement('div');
    mainPanel.style.flexGrow = '1';
    mainPanel.style.backgroundColor = '#ffffff';
    mainPanel.style.border = '1px solid #a7d7f9';
    mainPanel.style.borderWidth = '1px 0 0 1px';
    mainPanel.style.padding = '25px 35px 40px';
    mainPanel.style.boxSizing = 'border-box';

    // Top Navigation (login, etc)
    const topNavHTML = `
        <div style="text-align: right; font-size: 12px; color: #0645ad; margin-bottom: 20px;">
            <span style="cursor: pointer;">Создать учётную запись</span> 
            <span style="margin-left: 15px; cursor: pointer;">Войти</span>
        </div>
    `;

    // Page Title
    const titleHTML = `
        <h1 style="font-family: 'Linux Libertine', Georgia, Times, serif; font-size: 32px; font-weight: normal; margin: 0 0 0.25em 0; border-bottom: 1px solid #a2a9b1; padding-bottom: 5px;">${title}</h1>
        <div style="font-size: 13px; color: #54595d; margin-bottom: 20px;">Материал из Википедии — свободной энциклопедии</div>
    `;
    mainPanel.innerHTML = topNavHTML + titleHTML;

    // Article Content container
    const articleDiv = document.createElement('div');
    articleDiv.style.position = 'relative';

    // Infobox / Image Box (floats on the right)
    const thumbDiv = document.createElement('div');
    thumbDiv.style.float = 'right';
    thumbDiv.style.clear = 'right';
    thumbDiv.style.margin = '0 0 1.5em 1.5em';
    thumbDiv.style.backgroundColor = '#f8f9fa';
    thumbDiv.style.border = '1px solid #c8ccd1';
    thumbDiv.style.padding = '4px';
    thumbDiv.style.width = '320px'; // Set standard width
    thumbDiv.style.maxWidth = '100%';
    thumbDiv.style.boxSizing = 'border-box';

    // Create a clone of the original image to avoid altering it elsewhere
    const imgWrapper = document.createElement('div');
    imgWrapper.style.border = '1px solid #c8ccd1';
    imgWrapper.style.backgroundColor = '#fff';
    imgWrapper.style.overflow = 'hidden';
    
    const imgInfo = new Image();
    imgInfo.src = originalImg.src;
    imgInfo.style.display = 'block';
    imgInfo.style.width = '100%';
    imgInfo.style.height = 'auto';

    imgWrapper.appendChild(imgInfo);
    
    // Caption styling
    const captionDiv = document.createElement('div');
    captionDiv.style.padding = '6px 5px 2px';
    captionDiv.style.fontSize = '12px';
    captionDiv.style.lineHeight = '1.4';
    captionDiv.style.color = '#202122';
    // Small generic icon to resemble wikipedia media viewer
    captionDiv.innerHTML = `<span style="display:inline-block; margin-right:5px; background:#eaecf0; cursor:pointer; padding: 2px 4px; border-radius: 2px;">🖼️</span>${caption}`;

    thumbDiv.appendChild(imgWrapper);
    thumbDiv.appendChild(captionDiv);

    // Add Paragraphs built from 'text' 
    const textContainer = document.createElement('div');
    const paragraphs = text.split('\n');
    for (let pText of paragraphs) {
        pText = pText.trim();
        if (pText.length === 0) continue;
        const p = document.createElement('p');
        p.style.margin = '0 0 1em 0';
        p.style.fontSize = '14.5px';
        p.style.lineHeight = '1.6';
        p.textContent = pText;
        textContainer.appendChild(p);
    }

    // Assemble the parts
    articleDiv.appendChild(thumbDiv);
    articleDiv.appendChild(textContainer);
    
    // Clearfix to ensure container fully wraps floating elements
    const clearfix = document.createElement('div');
    clearfix.style.clear = 'both';
    articleDiv.appendChild(clearfix);

    mainPanel.appendChild(articleDiv);

    // Build overall layout
    container.appendChild(leftPanel);
    container.appendChild(mainPanel);

    return container;
}

Free Image Tool Creator

Can't find the image tool you're looking for?
Create one based on your own needs now!

Description

This tool allows users to generate a visual mock-up of a Wikipedia article page featuring a specific image. It takes an original image and places it within a simulated Wikipedia layout, complete with a title, a caption, and descriptive text, styled to mimic the appearance of a standard encyclopedia entry and information card. This can be useful for designers creating educational mock-ups, content creators wanting to preview how their imagery might look in an encyclopedic context, or for use in presentations and digital storytelling.

Leave a Reply

Your email address will not be published. Required fields are marked *