ソースを参照

improve UI using purecss.io

Pi 2 年 前
コミット
0d84699479
1 ファイル変更265 行追加163 行削除
  1. 265 163
      index.html

+ 265 - 163
index.html

@@ -1,189 +1,291 @@
 <html>
 <head>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css" integrity="sha384-yHIFVG6ClnONEA5yB5DJXfW2/KC173DIQrYoZMEtBvGzmf0PKiGyNEqe9N6BNDBH" crossorigin="anonymous">
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/grids-responsive-min.css"/>
 <link rel="alternate" title="News RSS Feed" href="https://shandan.one/feed/news/rss.xml" type="application/rss+xml"/>
 <link rel="alternate" title="Discovery RSS Feed" href="https://shandan.one/feed/discovery/rss.xml" type="application/rss+xml"/>
-<link rel="alternate" type="application/rss+xml" title="Humour RSS"  href="http://shandan.one/feed/humour/rss.xml">
+<link rel="alternate" title="Humour RSS Feed" href="http://shandan.one/feed/humour/rss.xml" type="application/rss+xml" >
 </head>
 <body style="background-color: darkgrey;">
 <title>Portal - Access, manage and share</title>
 <meta name="title" content="Portal - Access, manage and share">
 <meta name="description" content="Self-hosted services for remote access, management and syndication.">
 <style>
-.grid {
-  margin: min(1vmin, 10px) min(1vmin, 10px);
-  padding: 10px;
-  text-align: center;
-  position: relative;
-}
-.grid form {
-  display: inline;
-}
-.grid button {
-  border-style: solid;
-  font-size: min(3vmin,25px);
-  borderwidth: 3%;
-  background: transparent;
-  width: 40vmin;
-  height: 30vmin;
-  max-width: 350px;
-  max-height: 263px;
-  text-align: center;
+.card {
   display: inline-block;
-  vertical-align: middle;
-  margin: max(1.5vmin, 20px);
-  padding: 10px;
+  box-shadow: 0 1px 2px 0 rgba(0,0,0,.15);
+  margin: 10px;
+  margin-bottom: 10px;
   position: relative;
-  cursor: pointer;
+  transition: all .2s ease-in-out;
+  min-width: 100%;
 }
 
-.grid button > div {
-  position: relative;
-  height: 100%;
-  width: 100%;
-  line-height: 1;
+.card:hover {
+  /*box-shadow: 0 5px 22px 0 rgba(0,0,0,.25);*/
+  box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
+  margin-bottom: 10px;
+}
+
+.image {
+  max-height: 70%;
+  min-height: 70%;
+  opacity: .7;
+  overflow: hidden;
+  transition: all .2s ease-in-out;
 }
-.grid button > div > h1 {
-  line-height: 0.5;
-  text-align: center;
+
+.image:hover,
+.card:hover .image {
+  max-height: 70%;
+  min-height: 70%;
+  opacity: 1;
 }
-.grid button > div > p {
-  padding: max(0.5vmin, 10px);
-  margin: 0;
+
+.text {
   color: black;
   text-align: left;
-  line-height: 1;
+  background: transparent;
+  padding: 10px 20px;
+  min-height: 30%;
+  max-height: 30%;
+  margin: 10px;
+}
+
+.text p {
+  margin-bottom: 10px;
+}
+
+.pure-g > div {
+  
+}
+.card > button {
+  display: block;
+  background: transparent;
+  min-height: 100%;
+  min-width: 100%;
+}
+.l-box {
+  padding: 1em;
 }
 </style>
-<div class="grid">
-<form action="https://shandan.one/feed/news/rss.html"
-  id="news" rel="external" method="get" formtarget="_self">
-	<button form="news" style="color: gold; border-color: gold">
-		<div>
-			<h1>News</h1>
-			<p>News Feed</p>
-			<p>Notable events but not weather or sports</p>
-		</div>
-	</button>
-</form>
-<form action="https://shandan.one/feed/discovery/rss.html"
-  id="discovery" rel="external" method="get" formtarget="_self">
-	<button form="discovery" style="color: gold; border-color: gold">
-		<div>
-			<h1>Discovery</h1>
-			<p>Discovery Feed</p>
-			<p>Cool and inspirational articles</p>
-		</div>
-	</button>
-</form>
-<form action="https://shandan.one/feed/humour/rss.html"
-  id="humour" rel="external" method="get" formtarget="_self">
-	<button form="humour" style="color: gold; border-color: gold">
-		<div>
-			<h1>Humour</h1>
-			<p>Humour Feed</p>
-			<p>Humourous articles, memes or anything funny</p>
-		</div>
-	</button>
-</form>
+<div class="pure-g">
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://shandan.one/feed/news/rss.html"
+      id="news" rel="external" method="get" target="_self">
+      <div class="card">
+        <button form="news" style="color: gold; border-color: gold">
+          <div class="image">
+            <table style="display: inline-block"><tr><td><img src="//upload.wikimedia.org/wikipedia/en/thumb/4/43/Feed-icon.svg/128px-Feed-icon.svg.png" width="64" alt="RSS"></td><td style="padding: 10px"><h1>News</h1></td></tr></table>
+          </div>
+          <div class="text">
+            <h3>News Feed</h3>
+            <p>Notable events but not weather or sports</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://shandan.one/feed/discovery/rss.html"
+      id="discovery" rel="external" method="get" formtarget="_self">
+      <div class="card">
+        <button form="discovery" style="color: gold; border-color: gold">
+          <div class="image">
+            <table style="display: inline-block"><tr><td><img src="//upload.wikimedia.org/wikipedia/en/thumb/4/43/Feed-icon.svg/128px-Feed-icon.svg.png" width="64" alt="RSS"></td><td style="padding: 10px"><h1>Discovery</h1></td></tr></table>
+          </div>
+          <div class="text">
+            <h3>Disocvery Feed</h3>
+            <p>Cool and inspirational articles</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://shandan.one/feed/humour/rss.html"
+      id="humour" rel="external" method="get" formtarget="_self">
+      <div class="card">
+        <button form="humour" style="color: gold; border-color: gold">
+          <div class="image">
+            <table style="display: inline-block"><tr><td><img src="//upload.wikimedia.org/wikipedia/en/thumb/4/43/Feed-icon.svg/128px-Feed-icon.svg.png" width="64" alt="RSS"></td><td style="padding: 10px"><h1>Humour</h1></td></tr></table>
+          </div>
+          <div class="text">
+            <h3>Humour Feed</h3>
+            <p>Humourous articles, memes or anything funny</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
 </div>
 <hr/>
-<div class="grid">
-<form action="https://wol.shandan.one"
-  id="wol" rel="external" method="get" formtarget="_self">
-	<button form="wol" style="color: firebrick; border-color: firebrick">
-  		<div>
-  			<h1>WoL</h1>
-  			<p>Wake a device</p>
-  		</div>
-	</button>
-</form>
-<form action="https://shandan.one/pgadmin4"
-  id="pgadmin" rel="external" method="get" formtarget="_self">
-	<button form="pgadmin" style="color: steelblue; border-color: steelblue">
-  		<div>
-  			<h1>pgAdmin</h1>
-  			<p class="child">Manage and access postgresql databases</p>
-  		</div>
-	</button>
-</form>
-<form action="https://shandan.one/guacamole"
-  id="guacamole" rel="external" method="get" formtarget="_self">
-	<button form="guacamole" style="color: darkolivegreen; border-color: darkolivegreen">
-  		<div>
-  			<h1>Gaucamole</h1>
-  			<p>Remote desktop</p>
-  		</div>
-	</button>
-	</form>
-<form action="https://gogs.shandan.one"
-  id="vcs" rel="external" method="get" formtarget="_self">
-    <button form="vcs" style="color: yellow; border-color: yellow">
-		<div>
-  			<h1>gogs</h1>
-  			<p class="child">Manage and access git repositories</p>
-  		</div>
-	</button>
-</form>
-<form action="https://syncthing.shandan.one"
-  id="syncthing" rel="external" method="get" formtarget="_self">
-	<button form="syncthing" style="color: royalblue; border-color: royalblue">
-  		<div>
-  			<h1>Syncthing</h1>
-  			<p>Manage syncthing</p>
-  		</div>
-	</button>
-	</form>
-<form action="https://tv.shandan.one"
-  id="tv" rel="external" method="get" formtarget="_self">
-	<button form="tv" style="color: orange; border-color: orange">
-		<div>
-  			<h1>TvHeadend</h1>
-  			<p>Access PVR</p>
-  			<p>Schedule recordings and view TV guide</p>
-  		</div>
-	</button>
-</form>
-<form action="https://shandan.one/wekan"
-  id="wekan" rel="external" method="get" formtarget="_self">
-	<button form="wekan" style="color: teal; border-color: teal">
-		<div>
-			<h1>Wekan</h1>
-			<p>Kanban board</p>
-			<p>Manage projects and tasks</p>
-		</div>
-	</button>
-</form>
-<form action="https://mouse.shandan.one/#remote-mouse"
-  id="mouse" rel="external" method="get" formtarget="_self">
-	<button form="mouse" style="color: saddlebrown; border-color: saddlebrown">
-		<div>
-			<h1>Mouse</h1>
-			<p>Use device as touchpad</p>
-			<p>Turn your device's touchscreen into a remote touchpad</p>
-		</div>
-	</button>
-</form>
-<form action="https://gateway.shandan.one"
-  id="gateway" rel="external" method="get" formtarget="_self">
-	<button form="gateway" style="color: lightblue; border-color: lightblue">
-		<div>
-			<h1>Gateway</h1>
-			<p>Access the gateway</p>
-			<p>Manage local LAN and internet connection settings</p>
-		</div>
-	</button>
-</form>
-<form action="https://listgarden.shandan.one"
-  id="listgarden" rel="external" method="get" formtarget="_self">
-	<button form="listgarden" style="color: olivedrab; border-color: olivedrab">
-		<div>
-			<h1>ListGarden</h1>
-			<p>Manage RSS Feeds</p>
-			<p>Publish new items and create new feeds</p>
-		</div>
-	</button>
+<div class="pure-g">
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://wol.shandan.one"
+      id="wol" rel="external" method="get" target="_self">
+      <div class="card">
+        <button form="wol" style="color: firebrick; border-color: firebrick">
+          <div class="image">
+            <h1>Wol</h1>
+          </div>
+          <div class="text">
+            <h3>Wake a device</h3>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://shandan.one/pgadmin4"
+      id="pgadmin" rel="external" method="get" target="_self">
+      <div class="card">
+        <button form="pgadmin" style="color: steelblue; border-color: steelblue">
+          <div class="image">
+            <img src="http://shandan.one/pgadmin4/favicon.ico?ver=61100" width="64" alt="pgAdmin">
+          </div>
+          <div class="text">
+            <h3>pgAdmin</h3>
+            <p>Manage and access postgresql databases</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
+    <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://shandan.one/guacamole"
+      id="guacamole" rel="external" method="get" target="_self">
+      <div class="card">
+        <button form="guacamole" style="color: darkolivegreen; border-color: darkolivegreen">
+          <div class="image">
+            <img src="http://shandan.one/guacamole/images/logo-64.png" width="64" alt="Guacamole">
+          </div>
+          <div class="text">
+            <h3>Guacamole</h3>
+            <p>Remote desktop</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://gogs.shandan.one"
+      id="gogs" rel="external" method="get" target="_self">
+      <div class="card">
+        <button form="vcs" style="color: yellow; border-color: yellow">
+          <div class="image">
+            <img src="https://gogs.shandan.one/img/favicon.png" width="64" alt="Gogs">
+          </div>
+          <div class="text">
+            <h3>Gogs</h3>
+            <p>Manage and access git repositories</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://syncthing.shandan.one"
+      id="syncthing" rel="external" method="get" target="_self">
+      <div class="card">
+        <button form="syncthing" style="color: royalblue; border-color: royalblue">
+          <div class="image">
+            <img src="https://syncthing.shandan.one/assets/img/favicon-default.png" width="64" alt="Syncthing">
+          </div>
+          <div class="text">
+            <h3>Syncthing</h3>
+            <p>Manage and access git repositories</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://tv.shandan.one"
+      id="tv" rel="external" method="get" target="_self">
+      <div class="card">
+        <button form="tv" style="color: orange; border-color: orange">
+          <div class="image">
+            <img src="https://tv.shandan.one/static/img/logo.png" width="64" alt="TvHeadend">
+          </div>
+          <div class="text">
+            <h3>TvHeadend</h3>
+            <p>Schedule recordings and view TV guide</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://shandan.one/wekan"
+      id="wekan" rel="external" method="get" target="_self">
+      <div class="card">
+        <button form="wekan" style="color: teal; border-color: teal">
+          <div class="image">
+            <img src="https://shandan.one/wekan/logo-header.png" width="128" alt="WeKan">
+          </div>
+          <div class="text">
+            <h3>WeKan</h3>
+            <p>Kanban board</p>
+            <p>Manage projects and tasks</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://mouse.shandan.one/#remote-mouse"
+      id="mouse" rel="external" method="get" target="_self">
+      <div class="card">
+        <button form="mouse" style="color: teal; border-color: teal">
+          <div class="image">
+            <img src="https://mouse.shandan.one/icon.png" width="64" alt="Mouse">
+          </div>
+          <div class="text">
+            <h3>Remote Touchpad</h3>
+            <p>Use device as touchpad</p>
+            <p>Turn your device's touchscreen into a remote touchpad</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://gateway.shandan.one"
+      id="mouse" rel="external" method="get" target="_self">
+      <div class="card">
+        <button form="gateway" style="color: lightblue; border-color: lightblue">
+          <div class="image">
+            <img src="https://gateway.shandan.one/favicon.ico?t=6dcc8b66" width="64" alt="Gateway">
+          </div>
+          <div class="text">
+            <h3>Gateway</h3>
+            <p>Access the gateway</p>
+            <p>Manage local LAN and internet connection settings</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
+  <div class="pure-u-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 l-box">
+    <form action="https://listgarden.shandan.one"
+      id="listgarden" rel="external" method="get" target="_self">
+      <div class="card">
+          <button form="listgarden" style="color: olivedrab; border-color: olivedrab">
+          <div class="image">
+            <!--<img src="https://gateway.shandan.one/favicon.ico?t=6dcc8b66" width="64" alt="Gateway">-->
+            <h1>ListGarden</h1>
+          </div>
+          <div class="text">
+            <h3>Manage RSS Feeds</h3>
+            <p>Publish new items and create new feeds</p>
+          </div>
+        </button>
+      </div>
+    </form>
+  </div>
 </form>
 </div>
 </body>
 </html>
-