@fortawesome/free-solid-svg-icons#faCompass JavaScript Examples

The following examples show how to use @fortawesome/free-solid-svg-icons#faCompass. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EventList.jsx    From jitsi-party with MIT License 6 votes vote down vote up
EventGroup = props => {
    const className = `event-list ${props.className}`
    return (
        <div className={className}>
            {props.events.map((event, index) => (
                <div className="event-item" key={`event-${index}`}>
                    <div className="event-info">
                        <div className="event-name">
                            {event.name}
                        </div>
                        <div className="event-description">
                            <ReactMarkdown
                                source={event.description}
                                allowedTypes={['text', 'break', 'emphasis', 'strong', 'delete', 'link']}
                                unwrapDisallowed={true}>
                            </ReactMarkdown>
                        </div>
                        <div className="event-coordinates">
                            <div className="event-time">
                                <FontAwesomeIcon icon={faClock} />
                                {formatEventTime(event)}
                            </div>
                            <div className="event-room">
                                <FontAwesomeIcon icon={faCompass} />
                                {event.roomName}
                            </div>
                        </div>
                    </div>
                    <div className="event-image">
                        <img src={event.image} />
                    </div>
                </div>
            ))}
        </div>
    )
}
Example #2
Source File: index.js    From Website with Apache License 2.0 4 votes vote down vote up
export default function Downloads() {
  const [releases, setReleases] = useState([]);

  useEffect(() => {
    async function getReleases() {
      const response = await fetch(
        "https://api.github.com/repos/PGMDev/PGM/releases"
      );

      return setReleases(await response.json());
    }

    getReleases();
  }, []);

  return (
    <Layout title="Downloads">
      <div className={classnames("container", styles.downloads_container)}>
        <h1 className={styles.downloads_title}>Downloads</h1>
        {releases.length === 0 ? (
          <div className={classnames("hero", styles.spinner_hero)}>
            <div className={styles.lds_ripple}>
              <div></div>
              <div></div>
            </div>
          </div>
        ) : (
          <div
            className={classnames(
              "hero",
              styles.downloads_hero,
              styles.appearing
            )}
          >
            <div className="container row">
              <div className="col">
                <div className="row">
                  <img src="/img/shield.png" className={styles.pgm_logo} />
                  <div className={styles.pgm}>
                    <h1>PGM {releases[0].name}</h1>
                    <p>
                      <label>
                        {" "}
                        {format(
                          new Date(releases[0].published_at),
                          "LLLL do, yyyy"
                        )}{" "}
                      </label>
                    </p>
                    <a href={releases[0].html_url}>
                      Changelog <FontAwesomeIcon icon={faAngleRight} />
                    </a>
                  </div>
                </div>
                <div className={styles.description}>
                  <p>
                    Minecraft multiplayer game-server suite for managing PvP
                    matches across various gamemodes
                  </p>
                </div>
              </div>
              <div className={classnames("col col--4", styles.col_border)}>
                <h2>Download PGM</h2>
                <p>
                  PvP Game Manager (PGM) is a plugin that manages running and
                  instancing multiple PvP maps across various gamemodes for
                  Minecraft multiplayer.
                </p>
                <a
                  className={classnames(
                    "button button--primary",
                    styles.download_button
                  )}
                  href={releases[0].assets[0].browser_download_url}
                >
                  Download <FontAwesomeIcon icon={faArrowDown} />
                </a>
              </div>
              <div className={classnames("col col--4", styles.col_margin_left)}>
                <h2>Download SportPaper</h2>
                <p>
                  SportPaper is a Minecraft server jar based on Paper 1.8 tuned
                  for maximum performance and high intensity PvP. It is
                  mandatory and should run alongside PGM.
                </p>
                <a
                  className={classnames(
                    "button button--primary",
                    styles.download_button
                  )}
                  href={releases[0].assets[1].browser_download_url}
                >
                  Download <FontAwesomeIcon icon={faArrowDown} />
                </a>
              </div>
            </div>
          </div>
        )}
        <div className={styles.others}>
          <h2 style={{ marginBottom: "-15px" }}>Other Resources</h2>
          <div className="row">
            <div className={classnames("col col--6", styles.column)}>
              <div className={classnames("hero", styles.others_hero)}>
                <div className="col">
                  <div className="row">
                    <div className="col col--6">
                      <div className="row">
                        <h1 className={styles.others_icon}>
                          <FontAwesomeIcon icon={faCalendarAlt} />
                        </h1>
                        <div className={styles.others_header}>
                          <h2>Events</h2>
                          <a href="https://github.com/PGMDev/Events/">
                            <label>GitHub</label>
                          </a>
                        </div>
                      </div>
                    </div>
                    <div className="col col--6">
                      <a
                        className={classnames(
                          "button button--primary",
                          styles.others_button
                        )}
                        href="https://github.com/PGMDev/Events/releases/latest"
                      >
                        Download <FontAwesomeIcon icon={faArrowDown} />
                      </a>
                    </div>
                  </div>
                  <div className={styles.others_description}>
                    <p>
                      Events is the official PGM plugin for managing PvP matches
                      in a competitive setting. Upon joining or cycling, all
                      team members are forced onto their respective teams.
                    </p>
                  </div>
                </div>
              </div>
            </div>
            <div className={classnames("col col--6", styles.column)}>
              <div className={classnames("hero", styles.others_hero)}>
                <div className="col">
                  <div className="row">
                    <div className="col col--6">
                      <div className="row">
                        <h1 className={styles.others_icon}>
                          <FontAwesomeIcon icon={faUsers} />
                        </h1>
                        <div className={styles.others_header}>
                          <h2>Community</h2>
                          <a href="https://github.com/PGMDev/Community/">
                            <label>GitHub</label>
                          </a>
                        </div>
                      </div>
                    </div>
                    <div className="col col--6">
                      <button
                        className={classnames(
                          "button disabled button--primary",
                          styles.others_button
                        )}
                      >
                        Coming Soon <FontAwesomeIcon icon={faArrowDown} />
                      </button>
                    </div>
                  </div>
                  <div className={styles.others_description}>
                    <p>
                      Community is a standalone plugin for managing PGM servers.
                      It includes various PGM features, such as punishments,
                      moderation, freezing and other aspects.
                    </p>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <hr style={{ marginTop: "40px", marginBottom: "10px" }} />
          <div className="row">
            <div className={classnames("col col--6", styles.column)}>
              <div className={classnames("hero", styles.others_hero)}>
                <div className="col">
                  <div className="row">
                    <div className="col col--6">
                      <div className="row">
                        <h1 className={styles.others_icon}>
                          <FontAwesomeIcon icon={faFolderOpen} />
                        </h1>
                        <div className={styles.others_header}>
                          <h2>ResourcePile</h2>
                          <a href="https://github.com/MCResourcePile">
                            <label>GitHub</label>
                          </a>
                        </div>
                      </div>
                    </div>
                    <div className="col col--6">
                      <a
                        className={classnames(
                          "button button--primary",
                          styles.others_button
                        )}
                        href="https://mcresourcepile.github.io"
                      >
                        Visit <FontAwesomeIcon icon={faFolderOpen} />
                      </a>
                    </div>
                  </div>
                  <div className={styles.others_description}>
                    <p>
                      ResourcePile is a community project which aims to provide
                      various collections of resources, such as maps or
                      statistics, for users with backgrounds in Overcast and
                      similar networks.
                    </p>
                  </div>
                </div>
              </div>
            </div>
            <div className={classnames("col col--6", styles.column)}>
              <div className={classnames("hero", styles.others_hero)}>
                <div className="col">
                  <div className="row">
                    <div className="col col--6">
                      <div className="row">
                        <h1 className={styles.others_icon}>
                          <FontAwesomeIcon icon={faCompass} />
                        </h1>
                        <div className={styles.others_header}>
                          <h2>PGM Tracker</h2>
                          <a href="https://pgm.fyi">
                            <label>Website</label>
                          </a>
                        </div>
                      </div>
                    </div>
                    <div className="col col--6">
                      <a
                        className={classnames(
                          "button button--primary",
                          styles.others_button
                        )}
                        href="https://pgm.fyi"
                      >
                        Visit <FontAwesomeIcon icon={faCompass} />
                      </a>
                    </div>
                  </div>
                  <div className={styles.others_description}>
                    <p>
                      PGM Tracker is a community tool made by{" "}
                      <a href="https://github.com/applenick">applenick</a> that
                      tracks public PGM servers. Take a look at it, play a
                      variety of Minecraft PvP maps and get involved with
                      development!
                    </p>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </Layout>
  );
}
Example #3
Source File: ol-init.js    From raster-playground with GNU General Public License v3.0 4 votes vote down vote up
export default function OlInit() {
  const [shape] = useQueryParam(URL_SHAPE, StringParam);
  const [tiles] = useQueryParam(URL_TILES, StringParam);
  const [colors] = useQueryParam(URL_COLORS, StringParam);
  const [opacity] = useQueryParam(URL_OPACITY, StringParam);

  const prevTiles = usePrevious(tiles);
  const prevShape = usePrevious(shape);

  useEffect(() => {
    const olInstances = olMain({ shape, tiles, colors, opacity });
    setSource(olInstances.map.getLayers().getArray()[0].values_.source);

    if (olInstances.rasterSource && shape && prevTiles !== tiles) {
      olInstances.rasterSource.setUrl(tiles);
      olInstances.rasterSource.refresh();
    }

    if (olInstances.shapeSource && shape && prevShape !== shape) {
      olInstances.shapeSource.setUrl(shape);
      olInstances.shapeSource.refresh();

      olInstances.shapeSource.on('change', () => {
        let shapeExtentArray = olInstances.shapeSource.getExtent();
        if (
          shapeExtentArray &&
          !shapeExtentArray.includes(Infinity) &&
          !shapeExtentArray.includes(-Infinity)
        ) {
          olInstances.map.getView().fit(olInstances.shapeSource.getExtent(), {
            padding: [20, 20, 20, 420],
          });
        }
      });
    }

    if (olInstances.rasterLayer) {
      olInstances.rasterLayer.setOpacity(parseFloat(opacity));
    }

    if (olInstances.rasterSource) {
      olInstances.rasterSource.refresh();
    }
  }, [shape, tiles, colors, opacity, prevTiles, prevShape]);

  return (
    <>
      <div>
        <div id="map" className="main-map">
          <div className="ol-control location-btn">
            <button onClick={() => handleLocationButton()}>
              <FontAwesomeIcon icon={faCompass} />
            </button>
          </div>
        </div>
        <div id="popup" class="ol-popup">
          <div className="powered">
            Powered by{' '}
            <a href="http://blueskyhq.in/" target="_blank" rel="noreferrer">
              Blue Sky Analytics
            </a>{' '}
            | Made on{' '}
            <a href="https://openlayers.org/" target="_blank" rel="noreferrer">
              OpenLayers
            </a>{' '}
            | Basemap by{' '}
            <a href="mapbox.com" target="_blank" rel="noreferrer">
              Mapbox
            </a>
          </div>
          <div className="badges">
            {FOOTER_ICON.map(footer => (
              <a href={footer.url} target="_blank" rel="noreferrer">
                <img src={footer.img} alt={footer.label} />
              </a>
            ))}
          </div>
        </div>
      </div>
    </>
  );
}