# fritzmg/contao-sharebuttons architecture

> Architecture diagram of the GitHub repository fritzmg/contao-sharebuttons, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fritzmg/contao-sharebuttons
- Repository: https://github.com/fritzmg/contao-sharebuttons

## Overview

##### Flow Representation

- How requests flow from Contao to the ShareButtons module
- How theme assets are loaded
- How social network sharing links are generated
- How the module integrates with different Contao elements

##### Important Elements to Highlight

a) Theme System:
- To the assets directory structure
- Relationship with template system

b) Integration Methods:
- Three main ways to use the module:
- Content Element
- Module
- Direct Template Integration
- Insert Tag System

c) Social Networks Support:
- Connection to Pinterest's special image handling

##### Additional Details

- Notes about the Font Awesome integration
- Configuration options available for each integration method
- Image handling system for Pinterest integration

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core
        ShareButtons["ShareButtons Core Class"]:::core
        ContentHandler["Content Elements Handler"]:::core
        ModuleHandler["Module Handler"]:::core
        ShareButtons --> ContentHandler
        ShareButtons --> ModuleHandler
    end

    subgraph "Configuration Layer"
        DCA["DCA Controllers"]:::config
        AutoLoad["Autoload Configuration"]:::config
        LangFiles["Language Files"]:::config
        Config["System Config"]:::config
    end

    subgraph "Template Layer"
        Templates["HTML5 Templates"]:::template
        ThemeAssets["Theme Assets"]:::template
        CSS["CSS Styles"]:::template
    end

    subgraph "Integration Points"
        News["News Integration"]:::integration
        Calendar["Calendar Integration"]:::integration
        Article["Article Integration"]:::integration
        InsertTag["Insert Tag System"]:::integration
    end

    subgraph "Theme System"
        Boxxed["Boxxed Theme"]:::theme
        Light["Light Theme"]:::theme
        Shadow["Shadow Theme"]:::theme
        SimpleFLat["Simple Flat Theme"]:::theme
        SimpleIcons["Simple Icons Theme"]:::theme
    end

    DCA --> ShareButtons
    AutoLoad --> ShareButtons
    LangFiles --> ShareButtons
    Config --> ShareButtons

    ShareButtons --> Templates
    Templates --> ThemeAssets
    ThemeAssets --> CSS

    News --> ShareButtons
    Calendar --> ShareButtons
    Article --> ShareButtons
    InsertTag --> ShareButtons

    ThemeAssets --> Boxxed
    ThemeAssets --> Light
    ThemeAssets --> Shadow
    ThemeAssets --> SimpleFLat
    ThemeAssets --> SimpleIcons

    %% Component Mappings
    click ShareButtons "https://github.com/fritzmg/contao-sharebuttons/blob/master/system/modules/sharebuttons/classes/ShareButtons.php"
    click ContentHandler "https://github.com/fritzmg/contao-sharebuttons/blob/master/system/modules/sharebuttons/elements/ContentShareButtons.php"
    click ModuleHandler "https://github.com/fritzmg/contao-sharebuttons/blob/master/system/modules/sharebuttons/modules/ModuleShareButtons.php"
    click DCA "https://github.com/fritzmg/contao-sharebuttons/tree/master/system/modules/sharebuttons/dca"
    click AutoLoad "https://github.com/fritzmg/contao-sharebuttons/blob/master/system/modules/sharebuttons/config/autoload.php"
    click Config "https://github.com/fritzmg/contao-sharebuttons/blob/master/system/modules/sharebuttons/config/config.php"
    click LangFiles "https://github.com/fritzmg/contao-sharebuttons/tree/master/system/modules/sharebuttons/languages"
    click Templates "https://github.com/fritzmg/contao-sharebuttons/tree/master/system/modules/sharebuttons/templates"
    click ThemeAssets "https://github.com/fritzmg/contao-sharebuttons/tree/master/system/modules/sharebuttons/assets"
    click CSS "https://github.com/fritzmg/contao-sharebuttons/blob/master/system/modules/sharebuttons/assets/base.css"
    click Boxxed "https://github.com/fritzmg/contao-sharebuttons/tree/master/system/modules/sharebuttons/assets/boxxed"
    click Light "https://github.com/fritzmg/contao-sharebuttons/tree/master/system/modules/sharebuttons/assets/light"
    click Shadow "https://github.com/fritzmg/contao-sharebuttons/tree/master/system/modules/sharebuttons/assets/shadow"
    click SimpleFLat "https://github.com/fritzmg/contao-sharebuttons/tree/master/system/modules/sharebuttons/assets/simpleflat"
    click SimpleIcons "https://github.com/fritzmg/contao-sharebuttons/tree/master/system/modules/sharebuttons/assets/simpleicons"

    classDef core fill:#2374ab,stroke:#2374ab,color:#fff
    classDef config fill:#949494,stroke:#949494,color:#fff
    classDef template fill:#4caf50,stroke:#4caf50,color:#fff
    classDef integration fill:#ff9800,stroke:#ff9800,color:#fff
    classDef theme fill:#009688,stroke:#009688,color:#fff
```
