[libhandy/pages] Add a documentation page



commit 98f5b47198ef6354292999414938da47f1e28023
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Mon Nov 16 12:54:23 2020 +0100

    Add a documentation page
    
    It links to the documentations of:
    - the latest 1.x version
    - the 1.0 version
    - the master version

 .gitlab-ci.yml |  4 +++-
 doc.sh         |  6 +++++
 doc/index.html | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 index.html     |  2 +-
 style.css      | 50 +++++++++++++++++++++++++++++++++-------
 5 files changed, 124 insertions(+), 10 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 72ce1735..24e797ac 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,9 +1,11 @@
 pages:
   image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
   script:
-    - ./doc.sh
+    - mkdir public
     - mv index.html public/
+    - mv doc public/
     - mv style.css public/
+    - ./doc.sh
   artifacts:
     paths:
       - public
diff --git a/doc.sh b/doc.sh
index 97ed2a5c..67c0e5ac 100755
--- a/doc.sh
+++ b/doc.sh
@@ -3,8 +3,11 @@
 DOC_DIR=public/doc/
 REFS="
 master
+libhandy-1-0
 "
 
+LATEST_STABLE_1=1.0
+
 IFS='
 '
 
@@ -12,6 +15,7 @@ mkdir -p $DOC_DIR
 
 for REF in $REFS; do
   API_VERSION=`echo $REF | sed 's/libhandy-\([0-9][0-9]*\)-\([0-9][0-9]*\)/\1.\2/'`
+  API_VERSION=`echo $API_VERSION | sed 's/v0.0.\([0-9][0-9]*\)/0.0.\1/'`
 
   curl -L --output "$REF.zip" 
"https://gitlab.gnome.org/GNOME/libhandy/-/jobs/artifacts/$REF/download?job=build-gtkdoc";
   unzip -d "$REF" "$REF.zip"
@@ -20,3 +24,5 @@ for REF in $REFS; do
   rm "$REF.zip"
   rm -rf "$REF"
 done
+
+cp -r $DOC_DIR/$LATEST_STABLE_1 $DOC_DIR/1-latest
diff --git a/doc/index.html b/doc/index.html
new file mode 100644
index 00000000..9c24ca8d
--- /dev/null
+++ b/doc/index.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+  <!-- Meta -->
+  <title>Handy</title>
+  <meta name="title" content="Handy">
+  <meta itemprop="name" content="Handy">
+  <meta name="description" content="Building blocks for modern adaptive GNOME applications.">
+  <meta itemprop="description" content="Building blocks for modern adaptive GNOME applications.">
+
+  <!-- Twitter -->
+  <meta property="twitter:title" content="Handy">
+  <meta property="twitter:description" content="Building blocks for modern adaptive GNOME applications.">
+
+  <!-- Open Graph -->
+  <meta property="og:title" content="Handy">
+  <meta property="og:description" content="Building blocks for modern adaptive GNOME applications.">
+
+  <link rel="stylesheet" href="../style.css">
+</head>
+
+<body>
+  <header>
+    <div class="container">
+      <h1 id="logo">
+        <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg";>
+          <path class="dim" d="m6.9996 0c-2.1973 0-4 1.8027-4 4 0 1.4666 0.81247 2.7431 2 
3.4394v-3.4394c0-1.0907 0.9093-2 2-2s2 0.9093 2 2v3a1.0001 1.0001 0 0 1 0.24219 0.0293l0.25586 
0.0645c0.90704-0.73542 1.502-1.8442 1.502-3.0938 0-2.1973-1.8027-4-4-4z"/>
+          <path d="m6.957 3.0156c-0.1006 4e-3 -0.20002 0.023-0.29492 0.0566-0.06261 0.0226-0.1228 
0.0514-0.17969 0.0859-0.02827 0.0175-0.05564 0.0364-0.08203 0.0566-0.08061 0.06-0.15172 0.13173-0.21094 
0.21289-0.07827 0.10828-0.13406 0.23114-0.16406 0.36133-0.0075 0.0323-0.01334 0.0649-0.01758 0.0977-0.0048 
0.0376-0.0074 0.0755-0.0078 0.11336v8.3828l-2.5527-1.2773c-1.0913-0.54803-2.0257 0.96501-1.0469 1.6953l3.9785 
2.9824 0.02148 0.0176c0.0097 7e-3 0.01942 0.0132 0.0293 0.0195 0.01533 0.0108 0.03096 0.0212 0.04687 0.0312 
0.01159 7e-3 0.02331 0.0132 0.03516 0.0195 0.01477 8e-3 0.02975 0.016 0.04492 0.0234 0.01544 8e-3 0.03106 
0.0147 0.04687 0.0215 0.01417 7e-3 0.02849 0.0133 0.04297 0.0195 0.02822 0.0104 0.0569 0.0195 0.08594 0.0273 
0.0213 6e-3 0.0428 0.0111 0.06445 0.0156 0.01684 4e-3 0.03377 7e-3 0.05078 0.01 0.0091 1e-3 0.01821 3e-3 
0.02734 4e-3 0.02725 3e-3 0.05462 5e-3 0.08203 6e-3 0.01431 8.7e-4 0.02865 1e-3 0.04298 2e-3h5s0.45875 0.0138 
0.94727-0.23047c0.48851-0.24456 1.0527-0
 .9365 1.0527-1.7698v-4c1.8e-4 
-0.45916-0.31233-0.85946-0.75781-0.9707l-4-1c-0.079231-0.01961-0.16056-0.02945-0.24219-0.0293h-1v-4c-0.0014-0.1002-0.01787-0.19961-0.04883-0.29492-0.03123-0.0955-0.07666-0.18566-0.13477-0.26758-0.01888-0.027-0.03909-0.0531-0.06055-0.0781-0.0659-0.0763-0.14294-0.1421-0.22852-0.19532-0.02786-0.017-0.05654-0.0327-0.08594-0.0469-0.02989-0.0152-0.06053-0.0289-0.0918-0.041-0.03139-0.0114-0.06333-0.0211-0.0957-0.0293-0.03217-9e-3
 -0.06477-0.016-0.09766-0.0215-0.06591-0.01-0.13264-0.0133-0.19922-0.01z"/>
+        </svg>
+        Handy
+      </h1>
+    </div>
+  </header>
+
+  <div class="description-row">
+    <div class="container">
+      <h2>Documentation</h2>
+
+      <ul class="doclist">
+        <li><a href="1-latest/">Latest 1.x stable version</a></li>
+      </ul>
+
+      <ul class="doclist">
+        <li><a href="1.0/">1.0</a></li>
+      </ul>
+
+      <ul class="doclist">
+        <li><a href="master/">Upcoming version</a></li>
+      </ul>
+    </div>
+  </div>
+
+  <div class="urllist-row">
+    <div class="container">
+      <div><a href="../" class="button back-button">Go back</a></div>
+    </div>
+  </div>
+
+  <footer>
+    <div class="container">
+      <a href="https://gnome.org";>&copy; 2020 The GNOME Project</a>
+
+      <p>Creative Commons CC-BY-SA</p>
+    </div>
+  </footer>
+
+</body>
+
+</html>
diff --git a/index.html b/index.html
index c9f25416..4c6c7768 100644
--- a/index.html
+++ b/index.html
@@ -50,7 +50,7 @@
     <div class="container">
       <ul class="urllist">
         <li>
-          <a href="doc/master/">
+          <a href="doc/">
             <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg";>
               <g transform="translate(-83 -175)">
                 <path d="m85.007 175.98v14h11c0.51254 0 1-0.53386 1-1h-11v-2h10c0.57495 0 1-0.60225 
1-1v-9c0-0.48814-0.44713-1-1-1zm4.4492 2h0.26562v1.0117h-0.12695c-0.36996 0-0.55078 0.20372-0.55078 
0.55859v1.1172c0 0.52098-0.15854 0.74-0.50586 0.8457 0.34732 0.10571 0.50586 0.32472 0.50586 0.84571v1.1445c0 
0.35486 0.18082 0.55859 0.55078 0.55859h0.12695v0.98438h-0.26562c-0.94381 
0-1.4277-0.48327-1.4277-1.3516v-1.3066c0-0.24162-0.12817-0.35427-0.33203-0.35351l-0.34179-2e-3v-1.0059h0.34179c0.20386
 1.6e-4 0.33203-0.11385 0.33203-0.35546v-1.3398c0-0.86831 0.48393-1.3516 1.4277-1.3516zm2.8594 
0h0.26563c0.94381 0 1.4277 0.48325 1.4277 1.3516v1.3398c0 0.24161 0.12817 0.35562 0.33203 
0.35546h0.3418v1.0059l-0.3418 2e-3c-0.20386-7.6e-4 -0.33203 0.1119-0.33203 0.35352v1.3066c0 0.8683-0.48392 
1.3516-1.4277 1.3516h-0.26563v-0.98437h0.12696c0.36996 0 0.55078-0.20373 0.55078-0.55859v-1.1445c0-0.52099 
0.15854-0.74 0.50586-0.84571-0.34732-0.1057-0.50586-0.32472-0.50586-0.8457v-1.1172c0-0.35487-0.1
 8082-0.55859-0.55078-0.55859h-0.12696z" enable-background="new" fill-opacity=".99608" 
style="paint-order:normal"/>
diff --git a/style.css b/style.css
index 122a813e..0c3c088f 100644
--- a/style.css
+++ b/style.css
@@ -139,7 +139,7 @@ header h1 svg .dim {
   overflow: hidden;
 }
 
-ul.urllist {
+ul.urllist, ul.doclist {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
   width: 100%;
@@ -147,19 +147,23 @@ ul.urllist {
   gap: 1rem;
 }
 
-ul.urllist li, ul.textlist li {
-  background-color: var(--dark4);
+ul.urllist li, ul.doclist li {
   display: block;
   transition: all 200ms ease-in-out;
   border-radius: 10px;
 }
 
-ul.urllist li:hover, ul.textlist li:hover { background-color: var(--dark3); }
-ul.urllist li:active, ul.textlist li:active { background-color: var(--dark5); }
+ul.urllist li { background-color: var(--dark4); }
+ul.urllist li:hover { background-color: var(--dark3); }
+ul.urllist li:active { background-color: var(--dark5); }
+ul.doclist li { background-color: var(--dark32); }
+ul.doclist li:hover { background-color: var(--dark2); }
+ul.doclist li:active { background-color: var(--dark4); }
 ul.urllist li:hover svg,
-ul.textlist li:hover img { transform: scale(1.3); transition: transform 300ms ease-in-out; }
+ul.doclist li:hover svg { transform: scale(1.3); transition: transform 300ms ease-in-out; }
 
-ul.urllist li a {
+ul.urllist li a,
+ul.doclist li a {
   display: flex;
   text-decoration: none;
   color: var(--light3);
@@ -173,7 +177,8 @@ ul.urllist li a {
   padding: 1em;
 }
 
-ul.urllist svg {
+ul.urllist svg,
+ul.doclist svg {
   display: block;
   width: 64px;
   height: auto;
@@ -181,6 +186,35 @@ ul.urllist svg {
   transition: transform 600ms ease-in-out;
 }
 
+.back-button {
+  width: 12em;
+  padding: 0.9em 3em;
+  font-size: 1.4em;
+  background: linear-gradient(0deg, #c01c28 0%, #ed333b 100%);
+  color: white;
+}
+
+.button {
+  display: block;
+  border-radius: 99999px;
+  margin: 16px auto;
+  text-align: center;
+  font-weight: bold;
+  text-decoration: none;
+  transition: all 0.35s cubic-bezier(0.17, 0.89, 0.32, 1.28);
+  filter: /* Sharp drop shadow */
+          drop-shadow(0 0.08rem 0.1em rgba(0,0,0, 0.2))
+          /* Diffuse ambient shadow */
+          drop-shadow(0 0.1rem 0.9em rgba(0,0,0, 0.2));
+}
+.button:hover {
+  transform: scale(1.05);
+  cursor: pointer;
+}
+.button:active {
+  transform: scale(0.98);
+}
+
 /* FOOTER */
 footer {
   font-size: 80%;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]