Code Monkey home page Code Monkey logo

the-claw-webring-widget's Introduction

The Claw Webring Widget

Example usage

Add the following to a page on your website.

The fallback content is provided in case JavaScript isn't available. Feel free to omit this or edit this as you wish.

<script
  src="https://the-claw-webring-widget.netlify.app/the-claw-webring-widget.mjs"
  type="module"
></script>

<the-claw-webring-widget>
  <!-- start optional fallback content in the case of no JavaScript -->
  <div style="color: inherit; font-family: system-ui; padding: 1rem; font-size: 1rem;">
    <div
      style="display: grid; gap: 0.5rem 1rem; align-items: center; margin-bottom: 1rem; justify-content: flex-start; grid-template-areas: 'image title' 'image view';"
    >
      <img
        src="https://the-claw-webring.netlify.app/img/theclaw.png"
        alt="The Claw Webring"
        style="grid-area: image; height: 4rem; transform: rotate(-8deg);"
      />
      <h2 style="grid-area: title; font-size: 1.4rem; margin: 0;">The Claw Webring</h2>
      <a
        href="https://github.com/whitep4nth3r/the-claw-webring"
        style="grid-area: view; margin: 0; color: inherit;"
      >
        View on GitHub
      </a>
    </div>
  </div>
  <!-- end optional fallback content in the case of no JavaScript -->
</the-claw-webring-widget>

Options

Set the following options as attributes on the web component tag.

theme: "dark | light" (default: dark)
hideMembers: "true | false" (default: false)
fullWidth: "true | false" (default: false)

For example:

<the-claw-webring-widget theme="light" hideMembers="true" fullWidth="true">
  <!-- ... -->
</the-claw-webring-widget>

About fullWidth

The component has a default fixed width of 320px for nostalgia reasons 🌚. If you'd like to put the widget inside a container and allow the widget to span the full width of that container, use fullWidth="true".

the-claw-webring-widget's People

Contributors

whitep4nth3r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

the-claw-webring-widget's Issues

Simple endpoint for prev, next and random

An idea would be to create 3 endpoints that are dynamic.

this moves away from the WC slightly but gives the ability for it to be β€œstatic” as the endpoint link auto redirects based on hostname.

Alternatively a simplified wc that just has links and no list.

Fail url lookup more gracefully

Currently, if you are on a deploy preview URL etc, the webring widget will error when it tries to find the next/previous URLs in the ring.

Make this more graceful.

Allow custom styles to be applied to the widget

As mentioned on PR #23 of "The Claw webring" repo.

Add the ability so that custom styles can be added to members' websites so they can style the widget to best suit their own design.

Maybe we still have some form of branding that does stay however to keep that link to "The Claw"?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.