\def\ShadowXshift{0.5ex}
\def\ShadowYshift{-0.5ex}

\newsavebox{\NotebookBox}

\makeatletter
\define@key{educnotebook}{spiralspace}{\def\SpiralSpace{#1}}
\define@key{educnotebook}{nbcolorbg}{\def\NbColorBg{#1}}
\define@key{educnotebook}{minorgridcolor}{\def\MinorGridColor{#1}}
\define@key{educnotebook}{majorgridcolor}{\def\MajorGridColor{#1}}
\define@boolkey{educnotebook}{majorgrid}[false]{
\ifKV@educnotebook@majorgrid 
  \def\DrawMajorGrid{
    \path[clip,rounded corners=10pt]
        ([xshift=-30pt,yshift=20pt]Notebook.north west) rectangle
        ([xshift=30pt,yshift=-20pt]Notebook.south east);
    \draw[\MajorGridColor,opacity=0.3]
          ([xshift=30pt,yshift=-20pt]Notebook.south east) grid[step=10mm]
          ([xshift=-30pt,yshift=20pt]Notebook.north west);
  }
\else
  \def\DrawMajorGrid{\relax}
\fi
}
\define@boolkey{educnotebook}{minorgrid}[false]{
\ifKV@educnotebook@minorgrid 
  \def\DrawMinorGrid{
    \path[clip,rounded corners=10pt]
        ([xshift=-30pt,yshift=20pt]Notebook.north west) rectangle
        ([xshift=30pt,yshift=-20pt]Notebook.south east);
    \draw[\MinorGridColor,opacity=0.3]
          ([xshift=30pt,yshift=-20pt]Notebook.south east) grid[step=1mm]
          ([xshift=-30pt,yshift=20pt]Notebook.north west);
  }
\else
  \def\DrawMinorGrid{\relax}
\fi
}
\define@choicekey+{educnotebook}{spiralposition}[\val\nr]{left,right,top}[left]{%
  \ifcase\nr\relax
    \def\SpiralPosition{
      ([xshift=9pt,yshift=7pt-\SpiralOffset-\Valor*\SpiralSpace]Notebook.north west)
    }
    \def\RotateAngle{0}
  \or
    \def\SpiralPosition{
      ([xshift=-9pt,yshift=-3pt-\SpiralOffset-\Valor*\SpiralSpace]Notebook.north east)
    }
    \def\RotateAngle{180}
    \def\ShadowXshift{-0.5ex}
    \def\ShadowYshift{-0.5ex}
  \or
    \def\SpiralPosition{
      ([yshift=-19pt,xshift=4pt+\SpiralOffset+\Valor*\SpiralSpace]Notebook.north west)
      }
    \def\RotateAngle{270}
  \fi
}{}

\setkeys{educnotebook}{
  nbcolorbg=white,
  minorgrid=false,
  majorgrid=false,
  minorgridcolor=black!20,
  majorgridcolor=black!60,
  spiralposition=left,
  spiralspace=0.5in
  }
\def\RotateAngle{0}
\def\ShadowXshift{0.5ex}
\def\ShadowYshift{-0.5ex}

\makeatother

\tikzset{
spiral/.pic={
  \draw[rotate=\RotateAngle,
    draw=black,
    left color=black!70,
    right color=black!60,
    middle color=gray!40
    ] 
    (-1.1,-0.35) rectangle ++(10pt,10pt);
  \draw[
    rotate=\RotateAngle,
    double=gray!60,
    double distance=1pt,
    ]
    (-1,-0.2) arc (40:-250:10pt and 2pt);
  \draw[
    rotate=\RotateAngle,
    double=gray!60,
    double distance=1pt,
    ]
    (-1,-0.05) arc (40:-250:10pt and 2pt);
  }
}
\tikzset{
spirale/.pic={
  \draw[rotate=\RotateAngle,
    draw=black,
    left color=black!70,
    right color=black!60,
    middle color=gray!40
    ] 
    (-1,-0.18) circle(0.175);
  \draw[
    rotate=\RotateAngle,
    double=gray!60,
    double distance=1pt,
    ]
    (-1,-0.2) arc (40:-250:10pt and 2pt);
  \draw[
    rotate=\RotateAngle,
    double=gray!60,
    double distance=1pt,
    ]
    (-1,-0.05) arc (40:-250:10pt and 2pt);
  }
}

\newcommand{\naamNotebook}[2][]% #1 = options (optional), #2 = contents, preferably in the form of a \parbox
{\bgroup
  \savebox{\NotebookBox}{#2}%
  \setkeys{educnotebook}{#1}%
  \ifnum\RotateAngle=270\relax
    \dimen0=\dimexpr \wd\NotebookBox\relax
  \else
    \dimen0=\dimexpr \ht\NotebookBox+\dp\NotebookBox\relax
  \fi
  \dimen1=\SpiralSpace\relax
  \def\SpiralNumber{\the\numexpr \dimen0/\dimen1 - 1\relax}%
  \dimen2=\dimexpr \dimen0 - \SpiralNumber\dimen1\relax
  \def\SpiralOffset{\the\dimexpr 0.5\dimen2\relax}%
  \par\noindent\tikz{
    \node (Notebook) [inner sep=0pt] {\usebox\NotebookBox};
    \begin{scope}[on background layer]
      \shade[rounded corners=5pt,ball color=LightSkyBlue,drop shadow={shadow xshift=\ShadowXshift, shadow yshift=\ShadowYshift}]
        ([xshift=-0.7cm,yshift=20pt]Notebook.north west) rectangle
        ([xshift=30pt,yshift=-20pt]Notebook.south east);
      \begin{scope}%clipping
        \DrawMajorGrid
        \DrawMinorGrid
      \end{scope}
      \foreach \Valor in {0,1,...,\SpiralNumber}
        \pic at \SpiralPosition {spiral};
    \end{scope}
  }\par
\egroup}
\newcommand{\nNotebook}[2][]% #1 = options (optional), #2 = contents, preferably in the form of a \parbox
{\bgroup
  \savebox{\NotebookBox}{#2}%
  \setkeys{educnotebook}{#1}%
  \ifnum\RotateAngle=270\relax
    \dimen0=\dimexpr \wd\NotebookBox\relax
  \else
    \dimen0=\dimexpr \ht\NotebookBox+\dp\NotebookBox\relax
  \fi
  \dimen1=\SpiralSpace\relax
  \def\SpiralNumber{\the\numexpr \dimen0/\dimen1 - 1\relax}%
  \dimen2=\dimexpr \dimen0 - \SpiralNumber\dimen1\relax
  \def\SpiralOffset{\the\dimexpr 0.5\dimen2\relax}%
  \par\noindent\tikz{
    \node (Notebook) [inner sep=0pt] {\usebox\NotebookBox};
    \begin{scope}[on background layer]
      \draw[rounded corners=4pt,pattern=crosshatch dots light steel blue,drop shadow]
        ([xshift=-0.3cm,yshift=20pt]Notebook.north west) rectangle
        ([xshift=10pt,yshift=-20pt]Notebook.south east);
      \begin{scope}%clipping
        \DrawMajorGrid
        \DrawMinorGrid
      \end{scope}
      \foreach \Valor in {0,1,...,\SpiralNumber}
        \pic at \SpiralPosition {spirale};
    \end{scope}
  }\par
\egroup}