uga aga
This commit is contained in:
		@@ -120,10 +120,9 @@ html[theme="orange"] .image-brand {
 | 
			
		||||
.tag {
 | 
			
		||||
  box-shadow: 1px 1px 1px black;
 | 
			
		||||
  display: grid;
 | 
			
		||||
  grid-template-rows: auto;
 | 
			
		||||
  grid-template-columns: 1fr auto;
 | 
			
		||||
  margin: 10px;
 | 
			
		||||
  margin-right: 10px;
 | 
			
		||||
  margin: 5px;
 | 
			
		||||
  grid-template-columns: auto;
 | 
			
		||||
  grid-template-rows: 1fr;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navigation-rechts {
 | 
			
		||||
@@ -149,3 +148,14 @@ html[theme="orange"] .image-brand {
 | 
			
		||||
.dropdown-menu.shii {
 | 
			
		||||
  width: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media (min-width: 900px) {
 | 
			
		||||
  .tags {
 | 
			
		||||
    grid-template-columns: repeat(auto-fill, 20em);
 | 
			
		||||
    justify-content: center;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.tag img {
 | 
			
		||||
  width: 100%;
 | 
			
		||||
}
 | 
			
		||||
@@ -4,20 +4,22 @@ import lib from "../../inc/lib.mjs";
 | 
			
		||||
import f0cklib from "../routeinc/f0cklib.mjs";
 | 
			
		||||
 | 
			
		||||
export default (router, tpl) => {
 | 
			
		||||
  router.get(/^\/tags$/,lib.loggedin, async (req, res) => {
 | 
			
		||||
  router.get(/^\/tags$/, async (req, res) => {
 | 
			
		||||
 | 
			
		||||
    const phrase = cfg.websrv.phrases[~~(Math.random() * cfg.websrv.phrases.length)];
 | 
			
		||||
 | 
			
		||||
    const nsfp = cfg.nsfp.map(n => `${n}`);
 | 
			
		||||
 | 
			
		||||
    const toptags = await db`
 | 
			
		||||
      SELECT t.id, t.tag, COUNT(DISTINCT ta.item_id) AS total_items
 | 
			
		||||
      FROM tags t
 | 
			
		||||
      LEFT JOIN tags_assign ta ON t.id = ta.tag_id
 | 
			
		||||
      WHERE t.id not in (${db.unsafe(nsfp)})
 | 
			
		||||
      GROUP BY t.id, t.tag
 | 
			
		||||
      ORDER BY total_items DESC
 | 
			
		||||
      LIMIT 500
 | 
			
		||||
      ;
 | 
			
		||||
    `;
 | 
			
		||||
 | 
			
		||||
    res.reply({
 | 
			
		||||
      body: tpl.render('tags', {
 | 
			
		||||
        toptags,
 | 
			
		||||
 
 | 
			
		||||
@@ -110,7 +110,7 @@ process.on('unhandledRejection', err => {
 | 
			
		||||
          db({
 | 
			
		||||
            user_id: +user[0].id,
 | 
			
		||||
            mode: user[0].mode ?? 0,
 | 
			
		||||
            theme: req.session.theme ?? 'f0ck',
 | 
			
		||||
            theme: req.session.theme ?? 'atmos',
 | 
			
		||||
            fullscreen: req.session.fullscreen || 0
 | 
			
		||||
          }, 'user_id', 'mode', 'theme', 'fullscreen')
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -114,24 +114,6 @@
 | 
			
		||||
        </span>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      @if(session)
 | 
			
		||||
      <comentario-count path="/{{ item.id }}" 
 | 
			
		||||
                  placeholder="..."
 | 
			
		||||
                  error-text="ERR"
 | 
			
		||||
                  zero-text="foobar"
 | 
			
		||||
                  prefix="("
 | 
			
		||||
                  suffix=")"></comentario-count>
 | 
			
		||||
      <div class="comments">
 | 
			
		||||
        <script defer src="https://c.w0bm.com/comentario.js"></script>
 | 
			
		||||
        <comentario-comments  auto-init="false" 
 | 
			
		||||
                              no-fonts="true">
 | 
			
		||||
 | 
			
		||||
        </comentario-comments>
 | 
			
		||||
      </div>
 | 
			
		||||
      @else
 | 
			
		||||
      @endif
 | 
			
		||||
    </div>
 | 
			
		||||
    
 | 
			
		||||
  </div>
 | 
			
		||||
</div>
 | 
			
		||||
@include(snippets/footer)
 | 
			
		||||
 
 | 
			
		||||
@@ -166,6 +166,7 @@
 | 
			
		||||
  </div>
 | 
			
		||||
</nav>
 | 
			
		||||
@else
 | 
			
		||||
<!-- not logged in -->
 | 
			
		||||
<nav class="navbar navbar-expand-lg">
 | 
			
		||||
  <a class="navbar-brand" href="/"><img class="image-brand" src="/s/img/w0bm_mosh_banner_by_marderchen.gif" alt="w...?"><span class="f0ck" width="" height=""></span></a>
 | 
			
		||||
 | 
			
		||||
@@ -182,6 +183,16 @@
 | 
			
		||||
          @endeach
 | 
			
		||||
        </ul>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li class="nav-item">
 | 
			
		||||
        <a id="explore-tags" class="nav-link" href="/tags">
 | 
			
		||||
          <span class="nav-link-identifier">Tags</span>
 | 
			
		||||
        </a>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li class="nav-item">
 | 
			
		||||
        <a id="random" class="nav-link" href="/random">
 | 
			
		||||
          <span class="nav-link-identifier">Random</span>
 | 
			
		||||
        </a>
 | 
			
		||||
      </li>
 | 
			
		||||
    </ul>
 | 
			
		||||
  </div>
 | 
			
		||||
  <!-- rechte seite -->
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@
 | 
			
		||||
    <div class="tags">
 | 
			
		||||
      @each(toptags as toptag)
 | 
			
		||||
      <div class="tag badge badge-light mr-2">
 | 
			
		||||
        <!-- <img src="/s/img/tags/{!! toptag.tag !!}.webp" alt=""> -->
 | 
			
		||||
        
 | 
			
		||||
        <div class="tagbox-body">
 | 
			
		||||
          <span class="toptag_id">{!! toptag.tag !!}</span>
 | 
			
		||||
          <span class="toptag_tag"><a href="/tag/{!! toptag.tag !!}">{{ toptag.total_items }}</a></span>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user