Skip to content

Commit

Permalink
Mise à jour pour la version 1.0.0 du CMS.
Browse files Browse the repository at this point in the history
  • Loading branch information
noelma committed Mar 21, 2021
1 parent 1a66778 commit d9d39b0
Show file tree
Hide file tree
Showing 12 changed files with 99 additions and 66 deletions.
15 changes: 15 additions & 0 deletions Extend.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace SoosyzeApp\Theme\Editorial;

class Extend extends \SoosyzeCore\System\ExtendTheme
{
public function boot()
{
}

public function getDir()
{
return __DIR__;
}
}
4 changes: 3 additions & 1 deletion assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ input, select, textarea {
-ms-appearance: none;
appearance: none;
}

.img-thumbnail {
max-width: 100%;
}
/* Basic */

@-ms-viewport {
Expand Down
16 changes: 0 additions & 16 deletions assets/js/admin.js

This file was deleted.

24 changes: 17 additions & 7 deletions components/block/news-last.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,35 @@

<article>
<a class="image" href="<?php echo $new[ 'link_view' ]; ?>">
<img src="<?php echo $new[ 'field' ][ 'image' ][ 'field_value' ]; ?>" alt="Illustration <?php echo $new[ 'title' ]; ?>">
<img src="<?php echo $new[ 'field' ][ 'image' ][ 'field_value' ]; ?>" alt="Illustration <?php echo t($new[ 'title' ]); ?>">
</a>
<h3><a href="<?php echo $new[ 'link_view' ]; ?>"><?php echo $new[ 'title' ]; ?></a></h3>

<h3>
<a href="<?php echo $new[ 'link_view' ]; ?>"><?php echo t($new[ 'title' ]); ?></a>
</h3>

<small><?php echo date('F d, Y', $new[ 'date_created' ]); ?></small>
<small> ~<?php echo $new[ 'field' ][ 'reading_time' ][ 'field_value' ] . ' ' . t('minute(s)'); ?></small>
<p><?php echo $new[ 'field' ][ 'summary' ][ 'field_display' ]; ?></p>

<small> ~<?php echo $new[ 'field' ][ 'reading_time' ][ 'field_value' ]
. ' '
. t(if_or($new[ 'field' ][ 'reading_time' ][ 'field_value' ] === 1, 'minute', 'minutes')); ?></small>

<p><?php echo xss($new[ 'field' ][ 'summary' ][ 'field_display' ]); ?></p>

<ul class="actions">
<li><a href="<?php echo $new[ 'link_view' ]; ?>" class="button">En savoir plus</a></li>
<li>
<a href="<?php echo $new[ 'link_view' ]; ?>" class="button"><?php echo t('Learn more'); ?></a>
</li>
</ul>
</article>
<?php endforeach; ?>

</div>

</div>
<?php if ($is_link_more): ?>
<footer class="major">
<ul class="buttons">
<li><a href="<?php echo $link_more; ?>" class="btn btn-primary"><?php echo t('Toutes les actualités'); ?></a></li>
<li><a href="<?php echo $link_more; ?>" class="btn btn-primary"><?php echo t('All news'); ?></a></li>
</ul>
</footer>
<?php endif; ?>
Expand Down
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@
"name": "soosyze-extension/editorial",
"type": "soosyze-theme",
"description": "Say hello to Editorial, a blog/magazine-ish template built around a toggleable \"locking\" sidebar (scroll down to see what I mean) and an accordion-style menu.",
"version": "1.0",
"version": "1.0.0",
"autoload": {
"psr-4": {
"SoosyzeApp\\Theme\\Editorial\\": "/"
}
},
"extra": {
"soosyze-theme": {
"soosyze": {
"title": "Editorial",
"sections": [
"header",
"sidebar",
Expand Down
25 changes: 13 additions & 12 deletions html.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,38 @@
<html lang="fr">
<head>
<meta charset="utf-8" />
<title><?php echo $title; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><?php echo htmlspecialchars($title); ?></title>
<?php if ($favicon): ?>

<link rel="shortcut icon" type="image/png" href="<?php echo $favicon; ?>"/>
<?php endif; ?>
<meta name="description" content="<?php echo $description; ?>"/>
<meta name="keywords" content="<?php echo $keyboard; ?>"/>
<meta name="generator" content="<?php echo $generator; ?>"/>

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<?php echo $meta; ?>
<?php echo $styles; ?>

<link rel="stylesheet" href="<?php echo $base_theme; ?>assets/css/main.css" />
<link rel="stylesheet" href="<?php echo $base_theme; ?>assets/css/admin.css" />
<?php echo $styles; ?>
</head>
<body class="is-preload">
<!-- Wrapper -->
<div id="wrapper">
<?php echo $section[ 'page' ]; ?>

<?php if (isset($section[ 'page_bottom' ])): ?>
<?php echo $section[ 'page_bottom' ]; ?>
<?php endif; ?>
</div>
<!-- Scripts -->
<script src="<?php echo $base_theme; ?>assets/js/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.min.js" integrity="sha256-eGE6blurk5sHj+rmkfsGYeKyZx3M4bG+ZlFyA7Kns7E=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.8.3/Sortable.min.js"></script>
<?php echo $scripts; ?>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.min.js"
integrity="sha256-eGE6blurk5sHj+rmkfsGYeKyZx3M4bG+ZlFyA7Kns7E="
crossorigin="anonymous">
</script>
<?php echo $script_inline; ?>
<script src="<?php echo $base_theme; ?>assets/js/browser.min.js"></script>
<script src="<?php echo $base_theme; ?>assets/js/breakpoints.min.js"></script>
<script src="<?php echo $base_theme; ?>assets/js/util.js"></script>
<script src="<?php echo $base_theme; ?>assets/js/main.js"></script>
<script src="<?php echo $base_theme; ?>assets/js/admin.js"></script>
<?php echo $scripts; ?>
</body>
</html>
12 changes: 6 additions & 6 deletions menu-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<?php foreach ($menu as $link): ?>

<li class="<?php echo $link[ 'link_active' ]; ?>">
<?php if (!empty($link[ 'submenu' ])): ?>
<span class="opener"><?php echo $link[ 'title_link' ]; ?></span>
<?php echo $link[ 'submenu' ]; ?>
<?php else: ?>
<?php if (empty($link[ 'submenu' ])): ?>
<a href="<?php echo $link[ 'link' ]; ?>"<?php if ($link[ 'target_link' ]): ?> target="_blank" rel="noopener noreferrer" <?php endif; ?>>
<?php echo !empty($link['icon']) ? "<i class='{$link['icon']}' aria-hidden='true'></i> " : ''; ?><?php echo $link[ 'title_link' ]; ?>
<?php echo if_or($link['icon'], '<i class="' . htmlspecialchars($link['icon']) . ' aria-hidden="true"></i> ') . t($link[ 'title_link' ]); ?>
</a>
<?php endif; ?>
<?php else: ?>
<span class="opener"><?php echo t($link[ 'title_link' ]); ?></span>
<?php echo $link[ 'submenu' ]; ?>
<?php endif; ?>

</li>
<?php endforeach; ?>
Expand Down
12 changes: 6 additions & 6 deletions menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<?php foreach ($menu as $link): ?>

<li class="<?php echo $link[ 'link_active' ]; ?>">
<?php if (!empty($link[ 'submenu' ])): ?>
<span class="opener"><?php echo $link[ 'title_link' ]; ?></span>
<?php echo $link[ 'submenu' ]; ?>
<?php else: ?>
<?php if (empty($link[ 'submenu' ])): ?>
<a href="<?php echo $link[ 'link' ]; ?>"<?php if ($link[ 'target_link' ]): ?> target="_blank" rel="noopener noreferrer" <?php endif; ?>>
<?php echo !empty($link['icon']) ? "<i class='{$link['icon']}' aria-hidden='true'></i> " : ''; ?><?php echo $link[ 'title_link' ]; ?>
<?php echo if_or($link['icon'], '<i class="' . htmlspecialchars($link['icon']) . ' aria-hidden="true"></i> ') . t($link[ 'title_link' ]); ?>
</a>
<?php endif; ?>
<?php else: ?>
<span class="opener"><?php echo t($link[ 'title_link' ]); ?></span>
<?php echo $link[ 'submenu' ]; ?>
<?php endif; ?>

</li>
<?php endforeach; ?>
Expand Down
23 changes: 17 additions & 6 deletions news/content-news-index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,31 @@

<article>
<a class="image" href="<?php echo $new[ 'link_view' ]; ?>">
<img src="<?php echo $new[ 'field' ][ 'image' ][ 'field_value' ]; ?>" alt="Illustration <?php echo $new[ 'title' ]; ?>">
<img src="<?php echo $new[ 'field' ][ 'image' ][ 'field_value' ]; ?>" alt="Illustration <?php echo t($new[ 'title' ]); ?>">
</a>
<h3><a href="<?php echo $new[ 'link_view' ]; ?>"><?php echo $new[ 'title' ]; ?></a></h3>

<h3>
<a href="<?php echo $new[ 'link_view' ]; ?>"><?php echo t($new[ 'title' ]); ?></a>
</h3>

<small><?php echo date('F d, Y', $new[ 'date_created' ]); ?></small>
<small> ~<?php echo $new[ 'field' ][ 'reading_time' ][ 'field_value' ] . ' ' . t('minute(s)'); ?></small>
<p><?php echo $new[ 'field' ][ 'summary' ][ 'field_display' ]; ?></p>

<small> ~<?php echo $new[ 'field' ][ 'reading_time' ][ 'field_value' ]
. ' '
. t(if_or($new[ 'field' ][ 'reading_time' ][ 'field_value' ] === 1, 'minute', 'minutes')); ?></small>

<p><?php echo xss($new[ 'field' ][ 'summary' ][ 'field_display' ]); ?></p>

<ul class="actions">
<li><a href="<?php echo $new[ 'link_view' ]; ?>" class="button">En savoir plus</a></li>
<li>
<a href="<?php echo $new[ 'link_view' ]; ?>" class="button"><?php echo t('Learn more'); ?></a>
</li>
</ul>
</article>
<?php endforeach; ?>

</div>
<?php else: ?>
<?php else: ?>

<div class="col-12">
<p><?php echo $default; ?></p>
Expand Down
8 changes: 4 additions & 4 deletions node/content-node-show_article.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

<?php echo $node_submenu; ?>

<div class="article_img">
<?php echo $fields[ 'image' ][ 'field_display' ]; ?>
</div>
Expand All @@ -9,6 +7,8 @@
<?php echo strftime('%d.%B.%Y', $node[ 'date_created' ]); ?>
-
<i class="fa fa-clock"></i>
~<?php echo $fields[ 'reading_time' ][ 'field_value' ] . ' ' . t('minute(s)'); ?>
~<?php echo $fields[ 'reading_time' ][ 'field_value' ]
. ' '
. t(if_or($fields[ 'reading_time' ][ 'field_value' ] === 1, 'minute', 'minutes')); ?>
</div>
<?php echo $fields[ 'body' ][ 'field_display' ]; ?>
<?php echo xss($fields[ 'body' ][ 'field_display' ]); ?>
8 changes: 5 additions & 3 deletions page-front.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<?php if ($logo): ?>
<img src="<?php echo $logo; ?>" class="logo home" alt="Logo site">
<?php endif; ?>
<h1><?php echo $title; ?></h1>
</a>
<h1><?php echo htmlspecialchars($title); ?></h1>
</a>
<ul class="icons">
<li><a href="#" class="icon fab fa-twitter"><span class="label">Twitter</span></a></li>
<li><a href="#" class="icon fab fa-facebook"><span class="label">Facebook</span></a></li>
Expand All @@ -22,7 +22,7 @@
<!-- Content -->
<section>
<header class="main">
<h2><?php echo $title_main; ?></h2>
<h2><?php echo htmlspecialchars($title_main); ?></h2>
</header>

<?php if (!empty($section[ 'messages' ])): ?>
Expand All @@ -31,6 +31,8 @@
<?php if (!empty($section[ 'content_header' ])): ?>
<?php echo $section[ 'content_header' ]; ?>
<?php endif; ?>
<?php echo $section[ 'submenu' ]; ?>

<?php echo $section[ 'content' ]; ?>
<?php if (!empty($section[ 'content_footer' ])): ?>
<?php echo $section[ 'content_footer' ]; ?>
Expand Down
8 changes: 5 additions & 3 deletions page.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<?php if ($logo): ?>
<img src="<?php echo $logo; ?>" class="logo" alt="Logo site">
<?php endif; ?>
<strong><?php echo $title; ?></strong>
</a>
<strong><?php echo htmlspecialchars($title); ?></strong>
</a>
<ul class="icons">
<li><a href="#" class="icon fab fa-twitter"><span class="label">Twitter</span></a></li>
<li><a href="#" class="icon fab fa-facebook"><span class="label">Facebook</span></a></li>
Expand All @@ -22,7 +22,7 @@
<!-- Content -->
<section>
<header class="main">
<h1><?php echo $title_main; ?></h1>
<h1><?php echo htmlspecialchars($title_main); ?></h1>
</header>

<?php if (!empty($section[ 'messages' ])): ?>
Expand All @@ -31,6 +31,8 @@
<?php if (!empty($section[ 'content_header' ])): ?>
<?php echo $section[ 'content_header' ]; ?>
<?php endif; ?>
<?php echo $section[ 'submenu' ]; ?>

<?php echo $section[ 'content' ]; ?>
<?php if (!empty($section[ 'content_footer' ])): ?>
<?php echo $section[ 'content_footer' ]; ?>
Expand Down

0 comments on commit d9d39b0

Please sign in to comment.